|
FFmpeg
|
#include <float.h>#include "libavutil/channel_layout.h"#include "libavutil/libm.h"#include "libavutil/float_dsp.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "avcodec.h"#include "codec_internal.h"#include "encode.h"#include "put_bits.h"#include "mpeg4audio.h"#include "sinewin.h"#include "profiles.h"#include "version.h"#include "aac.h"#include "aactab.h"#include "aacenc.h"#include "aacenctab.h"#include "aacenc_utils.h"#include "psymodel.h"Go to the source code of this file.
Macros | |
| #define | WINDOW_FUNC(type) |
| #define | AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM |
Functions | |
| static void | put_pce (PutBitContext *pb, AVCodecContext *avctx) |
| static int | put_audio_specific_config (AVCodecContext *avctx) |
| Make AAC audio config object. More... | |
| void | ff_quantize_band_cost_cache_init (struct AACEncContext *s) |
| WINDOW_FUNC (only_long) | |
| WINDOW_FUNC (long_start) | |
| WINDOW_FUNC (long_stop) | |
| WINDOW_FUNC (eight_short) | |
| static void | apply_window_and_mdct (AACEncContext *s, SingleChannelElement *sce, float *audio) |
| static void | put_ics_info (AACEncContext *s, IndividualChannelStream *info) |
| Encode ics_info element. More... | |
| static void | encode_ms_info (PutBitContext *pb, ChannelElement *cpe) |
| Encode MS data. More... | |
| static void | adjust_frame_information (ChannelElement *cpe, int chans) |
| Produce integer coefficients from scalefactors provided by the model. More... | |
| static void | apply_intensity_stereo (ChannelElement *cpe) |
| static void | apply_mid_side_stereo (ChannelElement *cpe) |
| static void | encode_band_info (AACEncContext *s, SingleChannelElement *sce) |
| Encode scalefactor band coding type. More... | |
| static void | encode_scale_factors (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce) |
| Encode scalefactors. More... | |
| static void | encode_pulses (AACEncContext *s, Pulse *pulse) |
| Encode pulse data. More... | |
| static void | encode_spectral_coeffs (AACEncContext *s, SingleChannelElement *sce) |
| Encode spectral coefficients processed by psychoacoustic model. More... | |
| static void | avoid_clipping (AACEncContext *s, SingleChannelElement *sce) |
| Downscale spectral coefficients for near-clipping windows to avoid artifacts. More... | |
| static int | encode_individual_channel (AVCodecContext *avctx, AACEncContext *s, SingleChannelElement *sce, int common_window) |
| Encode one channel of audio data. More... | |
| static void | put_bitstream_info (AACEncContext *s, const char *name) |
| Write some auxiliary information about the created AAC file. More... | |
| static void | copy_input_samples (AACEncContext *s, const AVFrame *frame) |
| static int | aac_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
| static av_cold int | aac_encode_end (AVCodecContext *avctx) |
| static av_cold int | dsp_init (AVCodecContext *avctx, AACEncContext *s) |
| static av_cold int | alloc_buffers (AVCodecContext *avctx, AACEncContext *s) |
| static av_cold int | aac_encode_init (AVCodecContext *avctx) |
Variables | |
| static const AACPCEInfo | aac_pce_configs [] |
| List of PCE (Program Configuration Element) for the channel layouts listed in channel_layout.h. More... | |
| static void(*const | apply_window [4])(AVFloatDSPContext *fdsp, SingleChannelElement *sce, const float *audio) |
| static const AVOption | aacenc_options [] |
| static const AVClass | aacenc_class |
| static const FFCodecDefault | aac_encode_defaults [] |
| const FFCodec | ff_aac_encoder |
AAC encoder
Definition in file aacenc.c.
| #define WINDOW_FUNC | ( | type | ) |
| #define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM |
|
static |
Definition at line 328 of file aacenc.c.
Referenced by put_audio_specific_config().
|
static |
Make AAC audio config object.
Definition at line 369 of file aacenc.c.
Referenced by aac_encode_init().
| void ff_quantize_band_cost_cache_init | ( | struct AACEncContext * | s | ) |
Definition at line 401 of file aacenc.c.
Referenced by search_for_quantizers_fast(), and search_for_quantizers_twoloop().
|
static |
Definition at line 475 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Encode ics_info element.
Definition at line 496 of file aacenc.c.
Referenced by aac_encode_frame(), and encode_individual_channel().
|
static |
Encode MS data.
Definition at line 517 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Produce integer coefficients from scalefactors provided by the model.
Definition at line 531 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Definition at line 579 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Definition at line 608 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Encode scalefactor band coding type.
Definition at line 643 of file aacenc.c.
Referenced by encode_individual_channel().
|
static |
Encode scalefactors.
Definition at line 657 of file aacenc.c.
Referenced by encode_individual_channel().
|
static |
Encode pulse data.
Definition at line 693 of file aacenc.c.
Referenced by encode_individual_channel().
|
static |
Encode spectral coefficients processed by psychoacoustic model.
Definition at line 712 of file aacenc.c.
Referenced by encode_individual_channel().
|
static |
Downscale spectral coefficients for near-clipping windows to avoid artifacts.
Definition at line 740 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Encode one channel of audio data.
Definition at line 760 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Write some auxiliary information about the created AAC file.
Definition at line 781 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
Definition at line 802 of file aacenc.c.
Referenced by aac_encode_frame().
|
static |
|
static |
|
static |
Definition at line 1149 of file aacenc.c.
Referenced by aac_encode_init().
|
static |
Definition at line 1168 of file aacenc.c.
Referenced by aac_encode_init().
|
static |
|
static |
List of PCE (Program Configuration Element) for the channel layouts listed in channel_layout.h.
For those wishing in the future to add other layouts:
index: there are three independent indices for SCE, CPE and LFE; they are incremented irrespective of the group to which the element belongs; they are not reset when going from one group to another
Example: for 7.0 channel layout, .pairing = { { 1, 0 }, { 1 }, { 1 }, }, (3 CPE and 1 SCE in front group) .index = { { 0, 0 }, { 1 }, { 2 }, }, (index is 0 for the single SCE but goes from 0 to 2 for the CPEs)
The index order impacts the channel ordering. But is otherwise arbitrary (the sequence could have been 2, 0, 1 instead of 0, 1, 2).
Spec allows for discontinuous indices, e.g. if one has a total of two SCE, SCE.0 SCE.15 is OK per spec; BUT it won't be decoded by our AAC decoder which at this time requires that indices fully cover some range starting from 0 (SCE.1 SCE.0 is OK but not SCE.0 SCE.15).
Definition at line 90 of file aacenc.c.
Referenced by aac_encode_init().
|
static |
Definition at line 466 of file aacenc.c.
Referenced by apply_window_and_mdct(), and ff_mpa_synth_filter_TMPL().
|
static |
|
static |
|
static |
| const FFCodec ff_aac_encoder |
1.8.17