diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-28 04:23:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-28 04:26:01 +0200 |
commit | 0665199e438fcdd2000717352fc665a8cf017f7c (patch) | |
tree | 41e6d53948b16b9b1c82900da0d28c61efab9333 /libavcodec/aaccoder.c | |
parent | e5d80c7b2d893422e2e60a97e08bfc48ca1684e6 (diff) | |
parent | b239526873dc81f9b66796ad4d9fe1cb93ec34d3 (diff) | |
download | ffmpeg-0665199e438fcdd2000717352fc665a8cf017f7c.tar.gz |
Merge remote branch 'qatar/master'
* qatar/master:
vorbisdec: Rename silly "class_" variable to plain "class".
simple_idct_alpha: Drop some useless casts.
Simplify av_log_missing_feature().
ac3enc: remove check for mismatching channels and channel_layout
If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is non-zero, set channels based on channel_layout.
If AVCodecContext.channel_layout and AVCodecContext.channels are both non-zero, check to make sure they do not contradict eachother.
cosmetics: indentation
Check AVCodec.supported_samplerates and AVCodec.channel_layouts in avcodec_open().
aacdec: remove sf_scale and sf_offset.
aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient table values from the spec.
Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead of hardcoding 200 everywhere.
Large intensity stereo and PNS indices are legal. Clip them instead of erroring out. A magnitude of 100 corresponds to 2^25 so the will most likely result in clipped output anyway.
qpeg: use reget_buffer() in decode_frame()
ultimotion: use reget_buffer() in ulti_decode_frame()
smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
avparser: don't av_malloc(0).
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 35b31c708a..6d55acbc45 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -109,8 +109,8 @@ static av_always_inline float quantize_and_encode_band_cost_template( int *bits, int BT_ZERO, int BT_UNSIGNED, int BT_PAIR, int BT_ESC) { - const float IQ = ff_aac_pow2sf_tab[200 + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; - const float Q = ff_aac_pow2sf_tab[200 - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]; + const float IQ = ff_aac_pow2sf_tab[POW_SF2_ZERO + scale_idx - SCALE_ONE_POS + SCALE_DIV_512]; + const float Q = ff_aac_pow2sf_tab[POW_SF2_ZERO - scale_idx + SCALE_ONE_POS - SCALE_DIV_512]; const float CLIPPED_ESCAPE = 165140.0f*IQ; int i, j; float cost = 0; @@ -281,7 +281,7 @@ static float find_max_val(int group_len, int swb_size, const float *scaled) { } static int find_min_book(float maxval, int sf) { - float Q = ff_aac_pow2sf_tab[200 - sf + SCALE_ONE_POS - SCALE_DIV_512]; + float Q = ff_aac_pow2sf_tab[POW_SF2_ZERO - sf + SCALE_ONE_POS - SCALE_DIV_512]; float Q34 = sqrtf(Q * sqrtf(Q)); int qmaxval, cb; qmaxval = maxval * Q34 + 0.4054f; @@ -956,7 +956,7 @@ static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s, dist -= b; } dist *= 1.0f / 512.0f / lambda; - quant_max = quant(maxq[w*16+g], ff_aac_pow2sf_tab[200 - scf + SCALE_ONE_POS - SCALE_DIV_512]); + quant_max = quant(maxq[w*16+g], ff_aac_pow2sf_tab[POW_SF2_ZERO - scf + SCALE_ONE_POS - SCALE_DIV_512]); if (quant_max >= 8191) { // too much, return to the previous quantizer sce->sf_idx[w*16+g] = prev_scf; break; |