30 #define AC3_HEADER_SIZE 7
61 memset(hdr, 0,
sizeof(*hdr));
89 if(frame_size_code > 37)
159 memcpy(hdr, ptmp, ((intptr_t)&tmp.
channel_layout) - ((intptr_t)&tmp) +
sizeof(uint64_t));
164 int *need_next_header,
int *new_frame_start)
static unsigned int show_bits_long(GetBitContext *s, int n)
Show 0-32 bits.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
const uint16_t ff_ac3_frame_size_tab[38][3]
Possible frame sizes.
static const uint8_t eac3_blocks[4]
const uint16_t ff_ac3_sample_rate_tab[3]
int(* sync)(uint64_t state, struct AACAC3ParseContext *hdr_info, int *need_next_header, int *new_frame_start)
static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, int *need_next_header, int *new_frame_start)
#define AV_CH_LOW_FREQUENCY
bitstream reader API header.
const uint16_t avpriv_ac3_channel_layout_tab[8]
Map audio coding mode (acmod) to channel layout mask.
static const uint8_t center_levels[4]
Table for center mix levels reference: Section 5.4.2.4 cmixlev.
const uint16_t ff_ac3_bitrate_tab[19]
void ff_parse_close(AVCodecParserContext *s)
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
audio channel layout utility functions
int avpriv_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr)
int avpriv_ac3_parse_header2(GetBitContext *gbc, AC3HeaderInfo **phdr)
Parse AC-3 frame header.
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
AVCodecParser ff_ac3_parser
static av_cold int ac3_parse_init(AVCodecParserContext *s1)
static const uint8_t surround_levels[4]
Table for surround mix levels reference: Section 5.4.2.5 surmixlev.
int ff_aac_ac3_parse(AVCodecParserContext *s1, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
const uint8_t ff_ac3_channels_tab[8]
Map audio coding mode (acmod) to number of full-bandwidth channels.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...