FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libfdk-aacenc.c File Reference
#include <fdk-aac/aacenc_lib.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "audio_frame_queue.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AACContext
 main AAC context More...
 

Macros

#define FDKENC_VER_AT_LEAST(vl0, vl1)   0
 

Functions

static const char * aac_get_error (AACENC_ERROR err)
 
static int aac_encode_close (AVCodecContext *avctx)
 
static av_cold int aac_encode_init (AVCodecContext *avctx)
 
static int aac_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static const AVOption aac_enc_options []
 
static const AVClass aac_enc_class
 
static const AVProfile profiles []
 
static const AVCodecDefault aac_encode_defaults []
 
static const uint64_t aac_channel_layout []
 
static const int aac_sample_rates []
 
AVCodec ff_libfdk_aac_encoder
 

Macro Definition Documentation

#define FDKENC_VER_AT_LEAST (   vl0,
  vl1 
)    0

Definition at line 34 of file libfdk-aacenc.c.

Function Documentation

static const char* aac_get_error ( AACENC_ERROR  err)
static

Definition at line 75 of file libfdk-aacenc.c.

Referenced by aac_encode_frame(), and aac_encode_init().

static int aac_encode_close ( AVCodecContext avctx)
static

Definition at line 107 of file libfdk-aacenc.c.

Referenced by aac_encode_init().

static av_cold int aac_encode_init ( AVCodecContext avctx)
static

Definition at line 119 of file libfdk-aacenc.c.

static int aac_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int got_packet_ptr 
)
static

Definition at line 350 of file libfdk-aacenc.c.

Variable Documentation

const AVOption aac_enc_options[]
static
Initial value:
= {
{ "afterburner", "Afterburner (improved quality)", 0x42, AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "eld_sbr", "Enable SBR for ELD (for SBR in other configurations, use the -profile parameter)", 0x42, AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "signaling", "SBR/PS signaling style", 0x42, AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 2, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" },
{ "default", "Choose signaling implicitly (explicit hierarchical by default, implicit if global header is disabled)", 0, AV_OPT_TYPE_CONST, { .i64 = -1 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" },
{ "implicit", "Implicit backwards compatible signaling", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" },
{ "explicit_sbr", "Explicit SBR, implicit PS signaling", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" },
{ "explicit_hierarchical", "Explicit hierarchical signaling", 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, 0, 0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM, "signaling" },
{ "latm", "Output LATM/LOAS encapsulated data", 0x42, AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "header_period", "StreamMuxConfig and PCE repetition period (in frames)", 0x42, AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xffff, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "vbr", "VBR mode (1-5)", 0x42, AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 5, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_AUDIO_PARAM
Definition: opt.h:278
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276

Definition at line 51 of file libfdk-aacenc.c.

const AVClass aac_enc_class
static
Initial value:
= {
.class_name = "libfdk_aac",
.item_name = av_default_item_name,
.option = aac_enc_options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption aac_enc_options[]
Definition: libfdk-aacenc.c:51

Definition at line 68 of file libfdk-aacenc.c.

const AVProfile profiles[]
static
Initial value:
= {
{ FF_PROFILE_AAC_LOW, "LC" },
{ FF_PROFILE_AAC_HE, "HE-AAC" },
{ FF_PROFILE_AAC_HE_V2, "HE-AACv2" },
{ FF_PROFILE_AAC_LD, "LD" },
{ FF_PROFILE_AAC_ELD, "ELD" },
}
#define FF_PROFILE_AAC_HE_V2
Definition: avcodec.h:2868
#define FF_PROFILE_AAC_LD
Definition: avcodec.h:2869
#define FF_PROFILE_AAC_ELD
Definition: avcodec.h:2870
#define FF_PROFILE_AAC_LOW
Definition: avcodec.h:2864
#define FF_PROFILE_UNKNOWN
Definition: avcodec.h:2860
#define FF_PROFILE_AAC_HE
Definition: avcodec.h:2867

Definition at line 426 of file libfdk-aacenc.c.

const AVCodecDefault aac_encode_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 435 of file libfdk-aacenc.c.

const uint64_t aac_channel_layout[]
static
Initial value:
= {
0,
}
#define AV_CH_LAYOUT_SURROUND
#define AV_CH_LAYOUT_4POINT0
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_5POINT1_BACK
#define AV_CH_LAYOUT_5POINT0_BACK
#define AV_CH_LAYOUT_MONO

Definition at line 440 of file libfdk-aacenc.c.

const int aac_sample_rates[]
static
Initial value:
= {
96000, 88200, 64000, 48000, 44100, 32000,
24000, 22050, 16000, 12000, 11025, 8000, 0
}

Definition at line 454 of file libfdk-aacenc.c.

AVCodec ff_libfdk_aac_encoder
Initial value:
= {
.name = "libfdk_aac",
.long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"),
.priv_data_size = sizeof(AACContext),
.encode2 = aac_encode_frame,
.close = aac_encode_close,
.priv_class = &aac_enc_class,
.defaults = aac_encode_defaults,
.profiles = profiles,
.supported_samplerates = aac_sample_rates,
.channel_layouts = aac_channel_layout,
.wrapper_name = "libfdk",
}
static const int aac_sample_rates[]
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:993
static int aac_encode_close(AVCodecContext *avctx)
static const AVClass aac_enc_class
Definition: libfdk-aacenc.c:68
static av_cold int aac_encode_init(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
Definition: avcodec.h:998
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static const AVCodecDefault aac_encode_defaults[]
static const AVProfile profiles[]
main AAC context
Definition: aac.h:293
signed 16 bits
Definition: samplefmt.h:61
static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static const uint64_t aac_channel_layout[]
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701

Definition at line 459 of file libfdk-aacenc.c.