22 #include <vo-aacenc/voAAC.h>
23 #include <vo-aacenc/cmnMemory.h>
38 AACENC_PARAM params = { 0 };
51 s->
user_data.memflag = VO_IMF_USERMEMOPERATOR;
65 for (index = 0; index < 16; index++)
80 avctx->
extradata[0] = 0x02 << 3 | index >> 1;
98 int buf_size,
void *
data)
101 VO_CODECBUFFER input = { 0 }, output = { 0 };
102 VO_AUDIO_OUTPUTINFO output_info = { { 0 } };
106 output.Buffer = frame;
107 output.Length = buf_size;
115 return output.Length;
119 .
name =
"libvo_aacenc",
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
AVFrame * coded_frame
the picture in the bitstream
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
AVCodec ff_libvo_aacenc_encoder
static int aac_encode_frame(AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static av_cold int aac_encode_init(AVCodecContext *avctx)
static int init(AVCodecParserContext *s)
VO_MEM_OPERATOR mem_operator
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
struct AACContext AACContext
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
int bit_rate
the average bitrate
VO_CODEC_INIT_USERDATA user_data
int frame_size
Samples per packet, initialized when calling 'init'.
int sample_rate
samples per second
main external API structure.
static void close(AVCodecParserContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define CODEC_FLAG_GLOBAL_HEADER
Place global headers in extradata instead of every keyframe.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
const int avpriv_mpeg4audio_sample_rates[16]
static int aac_encode_close(AVCodecContext *avctx)
AVSampleFormat
all in native-endian format
int channels
number of audio channels
VO_AUDIO_CODECAPI codec_api