1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-11 03:45:05 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
Rostislav Pehlivanov
a04ae469e7 aacsbr: reduce element type mismatch warning severity
All HE-AAC samples with an LFE channel make this warning get spammed on
every frame. Turning off SBR for LFE channels makes sense (since it has
much less coefficients than normal channels do), so this error print is
of no value in this case.
It makes sense to keep the error in other cases, hence why it's still
around, degraded to warning severity since the decoder will still
attempt to decode without SBR.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-06-08 21:01:04 +01:00
Michael Niedermayer
625b582d5a avcodec/aacsbr_template: Add Check to read_sbr_envelope()
The limit is a conservative guess, the spec does not seem to specify a limit

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 19:05:07 +01:00
Michael Niedermayer
b78885a3c5 avcodec/aacsbr: Split the env_facs table
This also removes a #ifdef and special case for the fixed point case

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-12 12:19:07 +01:00
Andreas Cadhalpun
fdc94db37e sbr_qmf_analysis: sanitize input for 32-bit imdct
If the input contains too many too large values, the imdct can overflow.
Even if it didn't, the output would be larger than the valid range of 29
bits.

Note that this is a very delicate limit: Allowing values up to 1<<25
does not prevent input larger than 1<<29 from arriving at
sbr_sum_square, while limiting values to 1<<23 breaks the
fate-aac-fixed-al_sbr_hq_cm_48_5.1 test.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-11 00:04:04 +01:00
Andreas Cadhalpun
ff8816f717 aacsbr: ensure strictly monotone time borders
This fixes a division by zero in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-11 00:04:04 +01:00
Andreas Cadhalpun
1c3e43a627 aacsbr: don't call sbr_dequant twice without intermediate read_sbr_data
Doing that doesn't make sense, because the only purpose of sbr_dequant
is to process the data from read_sbr_data.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-20 23:25:24 +01:00
Michael Niedermayer
d877b88f51 avcodec/aacsbr_template: Check values read in read_sbr_noise()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-19 13:12:43 +01:00
Michael Niedermayer
bfd0e02dd6 avcodec/aacsbr: Split pre dequantization noise factors table
This allows removing a special case for the fixed point decoder and will
make error checks simpler

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-19 13:12:20 +01:00
Michael Niedermayer
dcf1cf5d24 avcodec/aacsbr: Use FLOAT_0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-08 11:05:48 +01:00
Ganesh Ajjanagadde
fd0bf457b7 avcodec/aacsbr_template: replace qsort with AV_QSORT
When sbr->reset is set in encode_frame, a bunch of qsort calls might get made.
Thus, there is the potential of calling qsort whenever the spectral
contents change.

AV_QSORT is substantially faster due to the inlining of the comparison callback.
Thus, the increase in performance should be worth the increase in binary size.

Tested with FATE.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-04 08:15:24 -05:00
Djordje Pesut
5fd81cf6f0 avcodec: Implementation of AAC_fixed_decoder (PS-module)
Add fixed point implementation.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-22 21:51:28 +02:00
Djordje Pesut
f85bc147fb avcodec: Implementation of AAC_fixed_decoder (SBR-module)
Add fixed poind code.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 17:20:16 +02:00
Djordje Pesut
5499467d5d avcodec: Template creation for AAC decoder (SBR-module)
Move the existing code to a new template file.

Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 17:20:16 +02:00