Libav
Data Structures | Macros | Functions
bytestream.h File Reference
#include <stdint.h>
#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
 

Macros

#define DEF(type, 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_size (GetByteContext *g)
 
static av_always_inline int bytestream2_size_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 bytestream2_copy_bufferu (PutByteContext *p, GetByteContext *g, unsigned int size)
 
static av_always_inline unsigned int bytestream2_copy_buffer (PutByteContext *p, GetByteContext *g, unsigned int size)
 
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)
 

Macro Definition Documentation

§ DEF

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

Definition at line 41 of file bytestream.h.

§ bytestream2_get_ne16

#define bytestream2_get_ne16   bytestream2_get_le16

Definition at line 114 of file bytestream.h.

Referenced by expand_rle_row16(), and rle_unpack().

§ bytestream2_get_ne24

#define bytestream2_get_ne24   bytestream2_get_le24

Definition at line 115 of file bytestream.h.

§ bytestream2_get_ne32

#define bytestream2_get_ne32   bytestream2_get_le32

Definition at line 116 of file bytestream.h.

§ bytestream2_get_ne64

#define bytestream2_get_ne64   bytestream2_get_le64

Definition at line 117 of file bytestream.h.

§ bytestream2_get_ne16u

#define bytestream2_get_ne16u   bytestream2_get_le16u

Definition at line 118 of file bytestream.h.

Referenced by read_uncompressed_sgi().

§ bytestream2_get_ne24u

#define bytestream2_get_ne24u   bytestream2_get_le24u

Definition at line 119 of file bytestream.h.

§ bytestream2_get_ne32u

#define bytestream2_get_ne32u   bytestream2_get_le32u

Definition at line 120 of file bytestream.h.

§ bytestream2_get_ne64u

#define bytestream2_get_ne64u   bytestream2_get_le64u

Definition at line 121 of file bytestream.h.

§ bytestream2_put_ne16

#define bytestream2_put_ne16   bytestream2_put_le16

Definition at line 122 of file bytestream.h.

§ bytestream2_put_ne24

#define bytestream2_put_ne24   bytestream2_put_le24

Definition at line 123 of file bytestream.h.

§ bytestream2_put_ne32

#define bytestream2_put_ne32   bytestream2_put_le32

Definition at line 124 of file bytestream.h.

§ bytestream2_put_ne64

#define bytestream2_put_ne64   bytestream2_put_le64

Definition at line 125 of file bytestream.h.

§ bytestream2_peek_ne16

#define bytestream2_peek_ne16   bytestream2_peek_le16

Definition at line 126 of file bytestream.h.

§ bytestream2_peek_ne24

#define bytestream2_peek_ne24   bytestream2_peek_le24

Definition at line 127 of file bytestream.h.

§ bytestream2_peek_ne32

#define bytestream2_peek_ne32   bytestream2_peek_le32

Definition at line 128 of file bytestream.h.

§ bytestream2_peek_ne64

#define bytestream2_peek_ne64   bytestream2_peek_le64

Definition at line 129 of file bytestream.h.

Function Documentation

§ bytestream2_init()

static av_always_inline void bytestream2_init ( GetByteContext g,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 132 of file bytestream.h.

Referenced by aasc_decode_frame(), adpcm_decode_frame(), aic_decode_frame(), alac_set_info(), bethsoftvid_decode_frame(), bfi_decode_frame(), bmp_decode_frame(), cdg_decode_frame(), cook_decode_init(), decode_frame(), decode_frame_headers(), decode_header(), decode_i2_frame(), decode_init(), decode_interframe_v4(), decode_interframe_v4a(), decode_p_frame(), decode_wave_header(), dfa_decode_frame(), dpcm_decode_frame(), dxtory_decode_v2_410(), dxtory_decode_v2_420(), dxtory_decode_v2_444(), dxtory_decode_v2_565(), dxtory_decode_v2_rgb(), ff_lzw_decode_init(), find_tracked_method(), flic_decode_frame_15_16BPP(), flic_decode_frame_8BPP(), g2m_decode_frame(), gif_decode_frame(), handle_notify(), hevc_decode_extradata(), hnm_update_palette(), ipvideo_decode_frame(), jpeg2000_decode_frame(), jpeg2000_read_main_headers(), lz_unpack(), mimic_decode_frame(), mm_decode_frame(), mm_decode_inter(), msrle_decode_frame(), mss2_decode_frame(), mss3_decode_frame(), mss4_decode_frame(), mvc_decode_frame(), ogm_header(), on2avc_decode_frame(), paf_video_decode(), pcm_bluray_decode_frame(), pcm_dvd_decode_samples(), pcx_decode_frame(), pix_decode_frame(), piz_uncompress(), qtrle_decode_frame(), read_connect(), rle_unpack(), roq_decode_frame(), rpza_decode_frame(), rtmp_send_packet(), send_invoke_response(), smc_decode_frame(), tgq_decode_frame(), tiff_unpack_strip(), tm2_read_stream(), tscc2_decode_frame(), txd_decode_frame(), ulti_decode_frame(), unpack_intraframe(), vmd_decode(), vp8_lossy_decode_alpha(), vqa_decode_chunk(), vqa_decode_frame(), wavpack_decode_block(), webp_decode_frame(), xan_decode_frame(), xan_unpack(), xan_wc3_decode_frame(), and xwd_decode_frame().

§ bytestream2_init_writer()

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

§ bytestream2_get_bytes_left()

static av_always_inline unsigned int bytestream2_get_bytes_left ( GetByteContext g)
static

Definition at line 151 of file bytestream.h.

Referenced by adpcm_decode_frame(), bfi_decode_frame(), check_header_variable(), codec2subblock(), cook_decode_init(), decode_0(), decode_6(), decode_bdlt(), decode_dds1(), decode_dsw1(), decode_frame(), decode_header(), decode_hextile(), decode_init(), decode_mvc1(), decode_mvc2(), decode_tdlt(), decode_tsw1(), decode_wave_header(), decode_wdlt(), dfa_decode_frame(), expand_rle_row16(), expand_rle_row8(), ff_lzw_decode_tail(), flic_decode_frame_15_16BPP(), flic_decode_frame_8BPP(), g2m_decode_frame(), g2m_load_cursor(), get_coc(), get_cod(), get_cox(), get_qcc(), get_qcx(), get_siz(), get_sot(), gif_parse_next_image(), gif_read_header1(), gif_read_image(), handle_notify(), hevc_decode_extradata(), huf_decode(), huf_uncompress(), huf_unpack_enc_table(), ipvideo_decode_opcodes(), jp2_find_codestream(), jpeg2000_decode_frame(), jpeg2000_decode_packet(), jpeg2000_read_main_headers(), kmvc_decode_inter_8x8(), kmvc_decode_intra_8x8(), lz_unpack(), mm_decode_inter(), mm_decode_intra(), msrle_decode_8_16_24_32(), msrle_decode_pal4(), mss3_decode_frame(), mss4_decode_frame(), ogm_header(), old_codec1(), old_codec37(), old_codec47(), on2avc_decode_frame(), op(), opcode_0xf7(), opcode_0xf8(), paf_video_decode(), pcx_decode_frame(), pcx_rle_decode(), pix_decode_frame(), png_decode_idat(), process_block(), qpeg_decode_inter(), qpeg_decode_intra(), read_connect(), read_frame_header(), read_rle_sgi(), read_uncompressed_sgi(), rle_decode(), rle_unpack(), roqvideo_decode_frame(), rpza_decode_stream(), set_palette(), targa_decode_rle(), tiff_decode_tag(), tiff_unpack_strip(), tscc2_decode_frame(), ulti_decode_frame(), vb_decode_framedata(), vmd_decode(), vqa_decode_chunk(), wavpack_decode_block(), webp_decode_frame(), xan_decode_chroma(), xan_decode_frame(), xan_unpack(), xan_unpack_luma(), and xwd_decode_frame().

§ bytestream2_get_bytes_left_p()

static av_always_inline unsigned int bytestream2_get_bytes_left_p ( PutByteContext p)
static

Definition at line 156 of file bytestream.h.

§ bytestream2_skip()

static av_always_inline void bytestream2_skip ( GetByteContext g,
unsigned int  size 
)
static

§ bytestream2_skipu()

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

§ bytestream2_skip_p()

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

Definition at line 173 of file bytestream.h.

Referenced by append_flv_data(), and sunrast_image_write_image().

§ bytestream2_tell()

static av_always_inline int bytestream2_tell ( GetByteContext g)
static

§ bytestream2_tell_p()

static av_always_inline int bytestream2_tell_p ( PutByteContext p)
static

§ bytestream2_size()

static av_always_inline int bytestream2_size ( GetByteContext g)
static

Definition at line 195 of file bytestream.h.

§ bytestream2_size_p()

static av_always_inline int bytestream2_size_p ( PutByteContext p)
static

Definition at line 200 of file bytestream.h.

§ bytestream2_seek()

static av_always_inline int bytestream2_seek ( GetByteContext g,
int  offset,
int  whence 
)
static

§ bytestream2_seek_p()

static av_always_inline int bytestream2_seek_p ( PutByteContext p,
int  offset,
int  whence 
)
static

Definition at line 229 of file bytestream.h.

Referenced by encode_plane(), and tiff_unpack_strip().

§ bytestream2_get_buffer()

static av_always_inline unsigned int bytestream2_get_buffer ( GetByteContext g,
uint8_t dst,
unsigned int  size 
)
static

§ bytestream2_get_bufferu()

static av_always_inline unsigned int bytestream2_get_bufferu ( GetByteContext g,
uint8_t dst,
unsigned int  size 
)
static

§ bytestream2_put_buffer()

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

§ bytestream2_put_bufferu()

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

Definition at line 294 of file bytestream.h.

§ bytestream2_set_buffer()

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

Definition at line 303 of file bytestream.h.

Referenced by encode_frame(), and tiff_unpack_strip().

§ bytestream2_set_bufferu()

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

Definition at line 317 of file bytestream.h.

§ bytestream2_get_eof()

static av_always_inline unsigned int bytestream2_get_eof ( PutByteContext p)
static

Definition at line 325 of file bytestream.h.

Referenced by tiff_unpack_strip().

§ bytestream2_copy_bufferu()

static av_always_inline unsigned int bytestream2_copy_bufferu ( PutByteContext p,
GetByteContext g,
unsigned int  size 
)
static

Definition at line 330 of file bytestream.h.

Referenced by bytestream2_copy_buffer().

§ bytestream2_copy_buffer()

static av_always_inline unsigned int bytestream2_copy_buffer ( PutByteContext p,
GetByteContext g,
unsigned int  size 
)
static

Definition at line 340 of file bytestream.h.

Referenced by tiff_unpack_strip().

§ bytestream_get_buffer()

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

Definition at line 356 of file bytestream.h.

Referenced by flac_read_header(), and rtmp_write().

§ bytestream_put_buffer()

static av_always_inline void bytestream_put_buffer ( uint8_t **  b,
const uint8_t src,
unsigned int  size 
)
static