diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-10-17 02:22:51 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-10-17 02:31:20 +0100 |
commit | 27d23ae07424a7c3a5d5e242ca702299cdd2e14c (patch) | |
tree | a0dbfe397948ae22e5ed1f591c00a90ed00a89e4 /libavcodec/aacenc.h | |
parent | 83900c0ed34c22487d6a97cdf9e9949d0795f5b0 (diff) | |
download | ffmpeg-27d23ae07424a7c3a5d5e242ca702299cdd2e14c.tar.gz |
aacenc: add support for encoding files using Long Term Prediction
Long Term Prediction allows for prediction of spectral coefficients
via the previously decoded time-dependent samples. This feature
works well with harmonic content 2 or more frames long, like speech,
human or non-human, piano music or any constant tones at very low
bitrates.
It should be noted that the current coder is highly efficient and
the rate control system is unable to encode files at extremely
low bitrates (less than 14kbps seems to be impossible) so this
extension isn't capable of optimum operation. Dramatic difference
is observable with some types of audio and speech but for the most
part the audiable differences are subtle. The spectrum looks better
however so the encoder is able to harvest the additional bits that
this feature provies, should the user choose to enable it. So
it's best to enable this feature only if encoding at the absolutely
lowest bitrate that the encoder is capable of.
Diffstat (limited to 'libavcodec/aacenc.h')
-rw-r--r-- | libavcodec/aacenc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index 0f4fc05e3d..d8bed82abe 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -45,6 +45,7 @@ typedef struct AACEncOptions { int coder; int pns; int tns; + int ltp; int pred; int mid_side; int intensity_stereo; @@ -60,14 +61,19 @@ typedef struct AACCoefficientsEncoder { void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, int scale_idx, int cb, const float lambda, int rtz); void (*encode_tns_info)(struct AACEncContext *s, SingleChannelElement *sce); + void (*encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window); void (*encode_main_pred)(struct AACEncContext *s, SingleChannelElement *sce); void (*adjust_common_pred)(struct AACEncContext *s, ChannelElement *cpe); + void (*adjust_common_ltp)(struct AACEncContext *s, ChannelElement *cpe); void (*apply_main_pred)(struct AACEncContext *s, SingleChannelElement *sce); void (*apply_tns_filt)(struct AACEncContext *s, SingleChannelElement *sce); + void (*update_ltp)(struct AACEncContext *s, SingleChannelElement *sce); + void (*ltp_insert_new_frame)(struct AACEncContext *s); void (*set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce); void (*search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce); void (*mark_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce); void (*search_for_tns)(struct AACEncContext *s, SingleChannelElement *sce); + void (*search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window); void (*search_for_ms)(struct AACEncContext *s, ChannelElement *cpe); void (*search_for_is)(struct AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe); void (*search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce); |