27 #define BITSTREAM_READER_LE 38 const uint8_t **poutbuf,
int *poutbuf_size,
39 const uint8_t *buf,
int buf_size)
50 *poutbuf_size = buf_size;
62 while (buf_size || t->
index + needed <= pc->
index) {
70 consumed += tmp_buf_size;
72 buf_size -= tmp_buf_size;
116 *poutbuf_size = buf_size;
122 return buf_size + consumed;
int ff_tak_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb, TAKStreamInfo *ti, int log_level_offset)
Validate and decode a frame header.
AVCodecParser ff_tak_parser
int duration
Duration of the current frame.
static int tak_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
int ff_tak_check_crc(const uint8_t *buf, unsigned int buf_size)
#define TAK_FRAME_FLAG_HAS_INFO
static int get_bits_count(const GetBitContext *s)
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is needed
void ff_parse_close(AVCodecParserContext *s)
int overread
the number of bytes which where irreversibly read from the next frame
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
main external API structure.
TAK (Tom's lossless Audio Kompressor) decoder/demuxer common functions.
#define PARSER_FLAG_COMPLETE_FRAMES
#define TAK_MAX_FRAME_HEADER_BYTES
int key_frame
Set by parser to 1 for key frames and 0 for non-key frames.