bytestream.h File Reference
#include <stdint.h>
#include <string.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
Include dependency graph for bytestream.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
 

Typedefs

typedef struct GetByteContext GetByteContext
 
typedef struct PutByteContext PutByteContext
 

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 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

#define bytestream2_get_ne16   bytestream2_get_le16

Definition at line 112 of file bytestream.h.

#define bytestream2_get_ne16u   bytestream2_get_le16u

Definition at line 116 of file bytestream.h.

Referenced by read_uncompressed_sgi().

#define bytestream2_get_ne24   bytestream2_get_le24

Definition at line 113 of file bytestream.h.

#define bytestream2_get_ne24u   bytestream2_get_le24u

Definition at line 117 of file bytestream.h.

#define bytestream2_get_ne32   bytestream2_get_le32

Definition at line 114 of file bytestream.h.

#define bytestream2_get_ne32u   bytestream2_get_le32u

Definition at line 118 of file bytestream.h.

#define bytestream2_get_ne64   bytestream2_get_le64

Definition at line 115 of file bytestream.h.

#define bytestream2_get_ne64u   bytestream2_get_le64u

Definition at line 119 of file bytestream.h.

#define bytestream2_peek_ne16   bytestream2_peek_le16

Definition at line 124 of file bytestream.h.

#define bytestream2_peek_ne24   bytestream2_peek_le24

Definition at line 125 of file bytestream.h.

#define bytestream2_peek_ne32   bytestream2_peek_le32

Definition at line 126 of file bytestream.h.

#define bytestream2_peek_ne64   bytestream2_peek_le64

Definition at line 127 of file bytestream.h.

#define bytestream2_put_ne16   bytestream2_put_le16

Definition at line 120 of file bytestream.h.

#define bytestream2_put_ne24   bytestream2_put_le24

Definition at line 121 of file bytestream.h.

#define bytestream2_put_ne32   bytestream2_put_le32

Definition at line 122 of file bytestream.h.

#define bytestream2_put_ne64   bytestream2_put_le64

Definition at line 123 of file bytestream.h.

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

Typedef Documentation

Function Documentation

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

Definition at line 149 of file bytestream.h.

Referenced by add_doubles_metadata(), add_shorts_metadata(), add_string_metadata(), adpcm_decode_frame(), bfi_decode_frame(), brpix_decode_frame(), codec2subblock(), decode_0(), decode_6(), decode_bdlt(), decode_codestream(), decode_dds1(), decode_dsw1(), decode_frame(), decode_init(), decode_mvc1(), decode_mvc2(), decode_p_block(), decode_packet(), decode_rgb8(), decode_rgbn(), decode_tdlt(), decode_tsw1(), decode_wdlt(), dfa_decode_frame(), expand_rle_row(), flic_decode_frame_15_16BPP(), flic_decode_frame_8BPP(), get_coc(), get_cod(), get_cox(), get_qcc(), get_qcx(), get_siz(), get_sot(), gif_parse_next_image(), gif_read_extension(), gif_read_header1(), gif_read_image(), handle_notify(), ipvideo_decode_opcodes(), jp2_find_codestream(), 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(), old_codec1(), old_codec37(), old_codec47(), op(), opcode_0xf7(), opcode_0xf8(), paf_vid_decode(), pcx_palette(), 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(), set_palette(), targa_decode_rle(), tgq_decode_mb(), tiff_decode_tag(), tscc2_decode_frame(), txd_decode_frame(), ulti_decode_frame(), vb_decode_framedata(), vmd_decode(), vqa_decode_chunk(), xan_decode_chroma(), xan_decode_frame(), xan_unpack(), xan_unpack_luma(), and xwd_decode_frame().

static av_always_inline unsigned int bytestream2_get_bytes_left_p ( PutByteContext p)
static

Definition at line 154 of file bytestream.h.

static av_always_inline unsigned int bytestream2_get_eof ( PutByteContext p)
static

Definition at line 323 of file bytestream.h.

static av_always_inline void bytestream2_init_writer ( PutByteContext p,
uint8_t buf,
int  buf_size 
)
static
static av_always_inline unsigned int bytestream2_put_buffer ( PutByteContext p,
const uint8_t src,
unsigned int  size 
)
static
static av_always_inline unsigned int bytestream2_put_bufferu ( PutByteContext p,
const uint8_t src,
unsigned int  size 
)
static

Definition at line 292 of file bytestream.h.

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

Definition at line 227 of file bytestream.h.

Referenced by encode_plane().

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

Definition at line 301 of file bytestream.h.

Referenced by encode_frame().

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

Definition at line 315 of file bytestream.h.

static av_always_inline int bytestream2_size ( GetByteContext g)
static

Definition at line 193 of file bytestream.h.

Referenced by smc_decode_stream(), tiff_decode_tag(), and xan_decode_frame_type0().

static av_always_inline int bytestream2_size_p ( PutByteContext p)
static

Definition at line 198 of file bytestream.h.

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

Definition at line 171 of file bytestream.h.

Referenced by handle_notify(), and sunrast_image_write_image().

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