dca_parser.c File Reference
#include "parser.h"
#include "dca.h"
#include "get_bits.h"
Include dependency graph for dca_parser.c:

Go to the source code of this file.

Data Structures

struct  DCAParseContext
 

Macros

#define IS_MARKER(state, i, buf, buf_size)
 

Typedefs

typedef struct DCAParseContext DCAParseContext
 

Functions

static int dca_find_frame_end (DCAParseContext *pc1, const uint8_t *buf, int buf_size)
 Find the end of the current frame in the bitstream. More...
 
static av_cold int dca_parse_init (AVCodecParserContext *s)
 
static int dca_parse_params (const uint8_t *buf, int buf_size, int *duration, int *sample_rate)
 
static int dca_parse (AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
 

Variables

AVCodecParser ff_dca_parser
 

Macro Definition Documentation

#define IS_MARKER (   state,
  i,
  buf,
  buf_size 
)
Value:
((state == DCA_MARKER_14B_LE && (i < buf_size-2) && (buf[i+1] & 0xF0) == 0xF0 && buf[i+2] == 0x07) \
|| (state == DCA_MARKER_14B_BE && (i < buf_size-2) && buf[i+1] == 0x07 && (buf[i+2] & 0xF0) == 0xF0) \
#define DCA_HD_MARKER
DCA-HD specific block starts with this marker.
Definition: dca.h:38
#define DCA_MARKER_14B_LE
Definition: dca.h:35
#define DCA_MARKER_RAW_LE
Definition: dca.h:33
void * buf
Definition: avisynth_c.h:594
synthesis window for stochastic i
static uint32_t state
Definition: trasher.c:27
#define DCA_MARKER_14B_BE
Definition: dca.h:34
#define DCA_MARKER_RAW_BE
DCA syncwords, also used for bitstream type detection.
Definition: dca.h:32

Definition at line 37 of file dca_parser.c.

Referenced by dca_find_frame_end(), dxva2_vc1_decode_slice(), vaapi_vc1_decode_slice(), vc1_decode_frame(), vc1_find_frame_end(), and vc1_split().

Typedef Documentation

Function Documentation

static int dca_find_frame_end ( DCAParseContext pc1,
const uint8_t buf,
int  buf_size 
)
static

Find the end of the current frame in the bitstream.

Returns
the position of the first byte of the next frame, or -1

Definition at line 46 of file dca_parser.c.

Referenced by dca_parse().

static int dca_parse ( AVCodecParserContext s,
AVCodecContext avctx,
const uint8_t **  poutbuf,
int *  poutbuf_size,
const uint8_t buf,
int  buf_size 
)
static

Definition at line 132 of file dca_parser.c.

static av_cold int dca_parse_init ( AVCodecParserContext s)
static

Definition at line 94 of file dca_parser.c.

static int dca_parse_params ( const uint8_t buf,
int  buf_size,
int *  duration,
int *  sample_rate 
)
static

Definition at line 102 of file dca_parser.c.

Referenced by dca_parse().

Variable Documentation

AVCodecParser ff_dca_parser
Initial value:
= {
.codec_ids = { AV_CODEC_ID_DTS },
.priv_data_size = sizeof(DCAParseContext),
.parser_init = dca_parse_init,
.parser_parse = dca_parse,
.parser_close = ff_parse_close,
}
static av_cold int dca_parse_init(AVCodecParserContext *s)
Definition: dca_parser.c:94
void ff_parse_close(AVCodecParserContext *s)
Definition: parser.c:279
struct DCAParseContext DCAParseContext
static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
Definition: dca_parser.c:132

Definition at line 165 of file dca_parser.c.