56 goto packet_too_small;
68 "Multiple RDBs per frame with CRC");
75 goto packet_too_small;
78 if (!
ctx->first_frame_done) {
87 "PCE-based channel configuration "
88 "without PCE as first syntax "
116 memcpy(extradata + 2, pce_data, pce_size);
119 ctx->first_frame_done = 1;
135 if (
ctx->par_in->extradata) {
138 ctx->par_in->extradata_size, 1,
ctx);
153 .
name =
"aac_adtstoasc",
static int aac_adtstoasc_init(AVBSFContext *ctx)
static enum AVCodecID codec_ids[]
const AVBitStreamFilter ff_aac_adtstoasc_bsf
static int aac_adtstoasc_filter(AVBSFContext *bsfc, AVPacket *pkt)
This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4 ADTS header and removes the ADTS h...
#define AV_AAC_ADTS_HEADER_SIZE
uint8_t * av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type, buffer_size_t size)
static av_cold int init(AVCodecContext *avctx)
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
static av_always_inline void filter(int16_t *output, ptrdiff_t out_stride, const int16_t *low, ptrdiff_t low_stride, const int16_t *high, ptrdiff_t high_stride, int len, int clip)
bitstream reader API header.
static int get_bits_count(const GetBitContext *s)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
AVCodecID
Identify the syntax and semantics of the bitstream.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
common internal API header
void avpriv_report_missing_feature(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, int size, int sync_extension, void *logctx)
Parse MPEG-4 systems extradata from a raw buffer to retrieve audio configuration.
static int ff_copy_pce_data(PutBitContext *pb, GetBitContext *gb)
#define MAX_PCE_SIZE
Maximum size of a PCE including the 3-bit ID_PCE.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
The bitstream filter state.
void * priv_data
Opaque filter-specific private data.
AVCodecParameters * par_in
Parameters of the input stream.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
This structure stores compressed data.