libavcodec/bytestream.h File Reference
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Data Structures

struct  GetByteContext
struct  PutByteContext

Defines

#define DEF_T(type, name, bytes, read, write)
#define DEF(name, bytes, read, write)   DEF_T(unsigned int, name, bytes, read, write)
#define DEF64(name, bytes, read, write)   DEF_T(uint64_t, name, bytes, read, write)
#define bytestream2_get_ne16   bytestream2_get_le16
#define bytestream2_get_ne24   bytestream2_get_le24
#define bytestream2_get_ne32   bytestream2_get_le32
#define bytestream2_get_ne64   bytestream2_get_le64
#define bytestream2_get_ne16u   bytestream2_get_le16u
#define bytestream2_get_ne24u   bytestream2_get_le24u
#define bytestream2_get_ne32u   bytestream2_get_le32u
#define bytestream2_get_ne64u   bytestream2_get_le64u
#define bytestream2_put_ne16   bytestream2_put_le16
#define bytestream2_put_ne24   bytestream2_put_le24
#define bytestream2_put_ne32   bytestream2_put_le32
#define bytestream2_put_ne64   bytestream2_put_le64
#define bytestream2_peek_ne16   bytestream2_peek_le16
#define bytestream2_peek_ne24   bytestream2_peek_le24
#define bytestream2_peek_ne32   bytestream2_peek_le32
#define bytestream2_peek_ne64   bytestream2_peek_le64

Functions

static av_always_inline void bytestream2_init (GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_init_writer (PutByteContext *p, uint8_t *buf, int buf_size)
static av_always_inline
unsigned int 
bytestream2_get_bytes_left (GetByteContext *g)
static av_always_inline
unsigned int 
bytestream2_get_bytes_left_p (PutByteContext *p)
static av_always_inline void bytestream2_skip (GetByteContext *g, unsigned int size)
static av_always_inline void bytestream2_skipu (GetByteContext *g, unsigned int size)
static av_always_inline void bytestream2_skip_p (PutByteContext *p, unsigned int size)
static av_always_inline int bytestream2_tell (GetByteContext *g)
static av_always_inline int bytestream2_tell_p (PutByteContext *p)
static av_always_inline int bytestream2_seek (GetByteContext *g, int offset, int whence)
static av_always_inline int bytestream2_seek_p (PutByteContext *p, int offset, int whence)
static av_always_inline
unsigned int 
bytestream2_get_buffer (GetByteContext *g, uint8_t *dst, unsigned int size)
static av_always_inline
unsigned int 
bytestream2_get_bufferu (GetByteContext *g, uint8_t *dst, unsigned int size)
static av_always_inline
unsigned int 
bytestream2_put_buffer (PutByteContext *p, const uint8_t *src, unsigned int size)
static av_always_inline
unsigned int 
bytestream2_put_bufferu (PutByteContext *p, const uint8_t *src, unsigned int size)
static av_always_inline void bytestream2_set_buffer (PutByteContext *p, const uint8_t c, unsigned int size)
static av_always_inline void bytestream2_set_bufferu (PutByteContext *p, const uint8_t c, unsigned int size)
static av_always_inline
unsigned int 
bytestream2_get_eof (PutByteContext *p)
static av_always_inline
unsigned int 
bytestream_get_buffer (const uint8_t **b, uint8_t *dst, unsigned int size)
static av_always_inline void bytestream_put_buffer (uint8_t **b, const uint8_t *src, unsigned int size)

Variables

 le32_TMPL
 AV_RL32
AV_WL32 le24_TMPL
AV_WL32 AV_RL24
AV_WL32 AV_WL24 le16_TMPL
AV_WL32 AV_WL24 AV_RL16
AV_WL32 AV_WL24 AV_WL16 be32_TMPL
AV_WL32 AV_WL24 AV_WL16 AV_RB32
AV_WL32 AV_WL24 AV_WL16 AV_WB32 be24_TMPL
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_RB24
AV_WL32 AV_WL24 AV_WL16
AV_WB32 AV_WB24 
be16_TMPL
AV_WL32 AV_WL24 AV_WL16
AV_WB32 AV_WB24 
AV_RB16
AV_WL32 AV_WL24 AV_WL16
AV_WB32 AV_WB24 AV_WB16 
byte_TMPL
AV_WL32 AV_WL24 AV_WL16
AV_WB32 AV_WB24 AV_WB16 
AV_RB8

Define Documentation

#define bytestream2_get_ne16   bytestream2_get_le16

Definition at line 120 of file bytestream.h.

#define bytestream2_get_ne16u   bytestream2_get_le16u

Definition at line 124 of file bytestream.h.

Referenced by read_uncompressed_sgi().

#define bytestream2_get_ne24   bytestream2_get_le24

Definition at line 121 of file bytestream.h.

#define bytestream2_get_ne24u   bytestream2_get_le24u

Definition at line 125 of file bytestream.h.

#define bytestream2_get_ne32   bytestream2_get_le32

Definition at line 122 of file bytestream.h.

#define bytestream2_get_ne32u   bytestream2_get_le32u

Definition at line 126 of file bytestream.h.

#define bytestream2_get_ne64   bytestream2_get_le64

Definition at line 123 of file bytestream.h.

#define bytestream2_get_ne64u   bytestream2_get_le64u

Definition at line 127 of file bytestream.h.

#define bytestream2_peek_ne16   bytestream2_peek_le16

Definition at line 132 of file bytestream.h.

#define bytestream2_peek_ne24   bytestream2_peek_le24

Definition at line 133 of file bytestream.h.

#define bytestream2_peek_ne32   bytestream2_peek_le32

Definition at line 134 of file bytestream.h.

#define bytestream2_peek_ne64   bytestream2_peek_le64

Definition at line 135 of file bytestream.h.

#define bytestream2_put_ne16   bytestream2_put_le16

Definition at line 128 of file bytestream.h.

#define bytestream2_put_ne24   bytestream2_put_le24

Definition at line 129 of file bytestream.h.

#define bytestream2_put_ne32   bytestream2_put_le32

Definition at line 130 of file bytestream.h.

#define bytestream2_put_ne64   bytestream2_put_le64

Definition at line 131 of file bytestream.h.

#define DEF (   name,
  bytes,
  read,
  write 
)    DEF_T(unsigned int, name, bytes, read, write)

Definition at line 83 of file bytestream.h.

#define DEF64 (   name,
  bytes,
  read,
  write 
)    DEF_T(uint64_t, name, bytes, read, write)

Definition at line 85 of file bytestream.h.

#define DEF_T (   type,
  name,
  bytes,
  read,
  write 
)

Definition at line 40 of file bytestream.h.


Function Documentation

static av_always_inline unsigned int bytestream2_get_buffer ( GetByteContext g,
uint8_t *  dst,
unsigned int  size 
) [static]
static av_always_inline unsigned int bytestream2_get_bufferu ( GetByteContext g,
uint8_t *  dst,
unsigned int  size 
) [static]

Definition at line 266 of file bytestream.h.

static av_always_inline unsigned int bytestream2_get_bytes_left_p ( PutByteContext p) [static]

Definition at line 162 of file bytestream.h.

static av_always_inline unsigned int bytestream2_get_eof ( PutByteContext p) [static]

Definition at line 321 of file bytestream.h.

static av_always_inline void bytestream2_init_writer ( PutByteContext p,
uint8_t *  buf,
int  buf_size 
) [static]

Definition at line 147 of file bytestream.h.

static av_always_inline unsigned int bytestream2_put_buffer ( PutByteContext p,
const uint8_t *  src,
unsigned int  size 
) [static]

Definition at line 275 of file bytestream.h.

static av_always_inline unsigned int bytestream2_put_bufferu ( PutByteContext p,
const uint8_t *  src,
unsigned int  size 
) [static]

Definition at line 290 of file bytestream.h.

static av_always_inline int bytestream2_seek ( GetByteContext g,
int  offset,
int  whence 
) [static]
static av_always_inline int bytestream2_seek_p ( PutByteContext p,
int  offset,
int  whence 
) [static]

Definition at line 225 of file bytestream.h.

static av_always_inline void bytestream2_set_buffer ( PutByteContext p,
const uint8_t  c,
unsigned int  size 
) [static]

Definition at line 299 of file bytestream.h.

static av_always_inline void bytestream2_set_bufferu ( PutByteContext p,
const uint8_t  c,
unsigned int  size 
) [static]

Definition at line 313 of file bytestream.h.

static av_always_inline void bytestream2_skip_p ( PutByteContext p,
unsigned int  size 
) [static]

Definition at line 179 of file bytestream.h.

static av_always_inline void bytestream2_skipu ( GetByteContext g,
unsigned int  size 
) [static]

Definition at line 173 of file bytestream.h.

Referenced by decode_frame().

static av_always_inline int bytestream2_tell_p ( PutByteContext p) [static]

Definition at line 196 of file bytestream.h.

Referenced by bytestream2_seek_p().

static av_always_inline unsigned int bytestream_get_buffer ( const uint8_t **  b,
uint8_t *  dst,
unsigned int  size 
) [static]

Variable Documentation

Definition at line 89 of file bytestream.h.

Referenced by ac3_decode_frame(), adpcm_decode_frame(), adts_aac_probe(), adx_decode(), adx_decode_frame(), adx_read_packet(), av_read_image_line(), av_write_image_line(), avpriv_adx_decode_header(), avpriv_copy_bits(), avpriv_split_xiph_headers(), cinepak_decode(), dca_convert_bitstream(), decode_13(), decode_dvd_subtitles(), decode_frame(), decode_frame_byterun1(), decode_frame_header(), decode_frame_ilbm(), decode_hybrid(), decode_init(), decode_packet(), decode_picture_header(), decode_slice(), decode_slice_thread(), decrypt_init(), dnxhd_decode_header(), dnxhd_probe(), dvbsub_decode(), dvbsub_init_decoder(), dvbsub_parse(), dvbsub_parse_object_segment(), dvbsub_parse_page_segment(), dvbsub_parse_region_segment(), dvdsub_parse(), dxa_probe(), encode_rgb48_10bit(), enqueue_packet(), extract_header(), ff_amf_tag_size(), ff_cmap_read_palette(), ff_h264_decode_extradata(), ff_parse_pes_pts(), ff_rdt_parse_header(), ff_rtsp_tcp_read_packet(), film_read_header(), find_headers_search(), find_new_headers(), flv_write_packet(), get16(), get_video_private_data(), h263_handle_packet(), h264_handle_packet(), h264_mp4toannexb_filter(), handle_packet(), lag_rac_refill(), lmlm4_probe(), matroska_parse_block(), mjpega_dump_header(), mov2textsub(), mov_write_packet_internal(), mpegts_get_pcr(), mpegts_push_data(), mpegts_read_header(), mpegts_write_packet(), msrle_decode_8_16_24_32(), mxf_read_local_tags(), mxg_read_packet(), mxpeg_decode_app(), mxpeg_decode_com(), oma_read_header(), planar_rgb16be_to_uv(), planar_rgb16be_to_y(), planarCopyWrapper(), probe(), pva_check(), qcelp_decode_frame(), qdm2_parse_config(), qdm2_parse_subpacket(), qtrle_decode_16bpp(), qtrle_decode_frame(), read_access_unit(), rpza_decode_stream(), rtcp_parse_packet(), rtmp_parse_result(), rtp_parse_mp4_au(), rtp_parse_one_packet(), rtp_parse_packet_internal(), sap_fetch_packet(), sap_read_header(), spdif_header_dts(), tget_short(), unpack(), vmnc_get_pixel(), vp6_parse_header(), vp8_handle_packet(), write_hint_packets(), write_section_data(), xan_wc3_decode_frame(), xiph_handle_packet(), and yop_probe().

Definition at line 89 of file bytestream.h.

Referenced by a64_write_header(), a64_write_packet(), adts_aac_probe(), alac_set_info(), av_base64_encode(), av_packet_split_side_data(), avpriv_adx_decode_header(), avpriv_mpv_find_start_code(), cinepak_decode_codebook(), cinepak_decode_vectors(), cmv_decode_frame(), dca_convert_bitstream(), decode_13(), decode_dvd_subtitles(), decode_frame(), decode_init(), decode_picture_header(), decode_slice(), decrypt_init(), dirac_combine_frame(), dirac_decode_frame(), dnxhd_decode_header(), dnxhd_probe(), dv_probe(), dvdsub_parse(), dxa_read_packet(), ea_probe(), ff_amf_tag_size(), ff_isom_write_avcc(), ff_mov_read_stsd_entries(), ff_rtmp_packet_dump(), ff_rtmp_packet_read(), ffm_read_packet(), film_probe(), film_read_header(), find_headers_search(), flac_decode_frame(), flv_probe(), gen_pong(), get_nb_samples(), get_slice_offset(), h264_mp4toannexb_filter(), id3v2_check_write_tag(), jp2_find_codestream(), libopenjpeg_decode_frame(), libschroedinger_encode_frame(), lmlm4_probe(), matroska_probe(), mkv_write_block(), mlp_parse(), mov_probe(), mov_write_avid_tag(), mp3_header_compress(), mp3_header_decompress(), mp3_read_probe(), mp3len(), mpeg_decode_frame(), mpegts_prefix_m2ts_header(), mpegts_write_packet(), mxf_read_packet_old(), mxf_write_header(), nc_probe(), nprobe(), old_dirac_header(), parse_pcr(), probe(), qdm2_decode_init(), qdm2_parse_config(), qtrle_decode_32bpp(), read32(), read_header(), rl2_probe(), rpza_decode_stream(), rtcp_parse_packet(), rtmp_parse_result(), rtp_parse_packet_internal(), rv10_decode_init(), rv34_parse(), s302m_parse_frame_header(), sha1_transform(), sox_probe(), spdif_header_dts(), sunrast_decode_frame(), svq3_decode_init(), swf_read_packet(), tcp_write_packet(), tget_long(), twin_decode_init(), txd_decode_frame(), unpack_parse_unit(), vaapi_vc1_decode_slice(), vc1_decode_frame(), vc1_decode_init(), vc1_extract_headers(), vmdaudio_decode_frame(), vmnc_get_pixel(), vqf_read_header(), write_hint_packets(), wsvqa_probe(), wsvqa_read_header(), and wsvqa_read_packet().

Definition at line 89 of file bytestream.h.

Referenced by adpcm_decode_frame(), adpcm_decode_init(), ape_decode_init(), av_read_image_line(), av_write_image_line(), avs_decode_frame(), cin_decode_lzss(), cinaudio_decode_frame(), cinvideo_decode_frame(), cmv_process_header(), dca_convert_bitstream(), decode_audio_s16(), decode_frame(), decode_frame_header(), decode_init(), decode_p_frame(), dxt1_decode_pixels(), encode_rgb48_10bit(), ff_mlp_checksum16(), ff_mlp_read_major_sync(), ff_mms_asf_header_parser(), ff_rtmp_packet_read(), flic_decode_frame_15_16BPP(), flic_decode_init(), get_chunk_header(), get_tcp_server_response(), ipmovie_read_header(), ipvideo_decode_block_opcode_0x8_16(), ipvideo_decode_block_opcode_0xA_16(), ipvideo_decode_opcodes(), lxf_read_header(), mm_decode_frame(), msrle_decode_8_16_24_32(), msvideo1_decode_16bit(), mtv_probe(), mxf_write_d10_audio_packet(), mxpeg_decode_mxm(), nc_probe(), nsv_probe(), ogm_dshow_header(), parse_mpeg1waveformatex(), pcx_decode_frame(), planar_rgb16le_to_uv(), planar_rgb16le_to_y(), planarCopyWrapper(), probe(), process_ipmovie_chunk(), ptx_decode_frame(), read_gab2_sub(), read_packet(), rl2_decode_init(), roq_probe(), roq_read_header(), roq_read_packet(), skeleton_header(), spdif_header_dts(), str_probe(), str_read_packet(), tget_short(), tgv_decode_frame(), tgv_decode_inter(), tmv_probe(), tqi_decode_frame(), truemotion1_decode_header(), txd_decode_frame(), vmd_decode(), vmd_probe(), vmd_read_header(), vmnc_get_pixel(), voc_probe(), vqa_decode_init(), wavpack_decode_block(), wavpack_decode_init(), wma_decode_init(), ws_snd_decode_frame(), wsaud_probe(), wsaud_read_header(), wsaud_read_packet(), wsvqa_read_header(), wsvqa_read_packet(), wtvfile_open2(), xa_probe(), xan_decode_chroma(), xan_wc3_decode_frame(), and yop_read_header().

Definition at line 89 of file bytestream.h.

Referenced by a64multi_init_encoder(), aasc_decode_frame(), add_input_streams(), adpcm_decode_init(), aea_read_probe(), av_lfg_init(), avi_read_header(), avpriv_dv_frame_profile2(), avpriv_flac_is_extradata_valid(), bfi_probe(), celt_header(), check_checksum(), cin_probe(), cmv_decode_frame(), decode_frame(), decode_header_trees(), decode_i_frame(), decode_init(), decode_p_frame(), decode_plane(), decode_vol_header(), dfa_decode_frame(), dfa_probe(), dfa_read_packet(), dirac_probe(), dxa_read_packet(), dxt1_decode_pixels(), ea_probe(), ff_h263_decode_frame(), ff_mjpeg_decode_sos(), ff_mms_asf_header_parser(), ff_mov_read_stsd_entries(), ff_mpeg4_decode_picture_header(), ff_rtmp_packet_read(), fourxm_probe(), fourxm_read_header(), fourxm_read_packet(), get_chunk_header(), get_nb_samples(), get_packet_header(), get_quant(), get_slice_offset(), get_tcp_server_response(), h263_decode_picture_header(), handle_packet_stream_changing_type(), idcin_probe(), idct_mb(), iff_probe(), ivf_write_header(), lag_decode_arith_plane(), lag_decode_frame(), libcelt_dec_init(), lxf_read_header(), lxf_read_packet(), lz_unpack(), matroska_read_header(), mjpeg_decode_app(), mjpega_dump_header(), mov_probe(), mov_read_header(), mov_read_packet(), mov_write_audio_tag(), mpc8_probe(), mpeg_decode_frame(), mpeg_decode_slice(), mpegts_set_stream_info(), msrle_decode_8_16_24_32(), multiswap_init(), new_output_stream(), nsv_probe(), nuv_packet(), nuv_read_dts(), ogm_dshow_header(), parse_media_type(), parse_mpeg1waveformatex(), pmp_probe(), pmt_cb(), probe(), process_ipmovie_chunk(), prores_encode_init(), qcp_probe(), r3d_probe(), raw_decode(), raw_encode(), read32(), read_packet(), rl2_decode_init(), rm_read_audio_stream_info(), roq_probe(), roq_read_packet(), rtp_asf_fix_header(), siff_probe(), skeleton_header(), smacker_read_packet(), smka_decode_frame(), sol_probe(), sox_probe(), speex_header(), str_probe(), str_read_header(), str_read_packet(), svq3_decode_slice_header(), tget_long(), tgq_decode_frame(), tgv_decode_frame(), thp_probe(), tm2_read_header(), tmv_probe(), tta_check_crc(), tta_decode_init(), tta_read_header(), txd_decode_frame(), txd_probe(), udp_read(), utvideo_decode_init(), v410_decode_frame(), vble_decode_frame(), vc1t_probe(), vcr2_init_sequence(), vid_probe(), vmd_read_header(), vmdvideo_decode_init(), vmnc_get_pixel(), vorbis_header(), vqf_probe(), wavesynth_decode(), wavesynth_parse_extradata(), wavpack_decode_block(), wavpack_decode_frame(), wc3_probe(), wmavoice_decode_init(), wsaud_probe(), wsaud_read_packet(), wtvfile_open2(), wv_read_block_header(), wv_read_packet(), xa_probe(), xmv_fetch_video_packet(), xmv_probe(), and xmv_process_packet_header().

Definition at line 89 of file bytestream.h.

Definition at line 89 of file bytestream.h.

Definition at line 89 of file bytestream.h.

Definition at line 89 of file bytestream.h.

Definition at line 89 of file bytestream.h.