Diego Biurrun
42c4c2d2a6
aac: Drop broken cruft
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Ganesh Ajjanagadde
def3c83e1b
lavc/aacsbr: sbr_dequant optimization
...
This uses ff_exp2fi to get a speedup (~ 6x).
sample benchmark (Haswell, GNU/Linux):
old:
19102 decicycles in sbr_dequant, 1023 runs, 1 skips
19002 decicycles in sbr_dequant, 2045 runs, 3 skips
17638 decicycles in sbr_dequant, 4093 runs, 3 skips
15825 decicycles in sbr_dequant, 8189 runs, 3 skips
16404 decicycles in sbr_dequant, 16379 runs, 5 skips
new:
3063 decicycles in sbr_dequant, 1024 runs, 0 skips
3049 decicycles in sbr_dequant, 2048 runs, 0 skips
2968 decicycles in sbr_dequant, 4096 runs, 0 skips
2818 decicycles in sbr_dequant, 8191 runs, 1 skips
2853 decicycles in sbr_dequant, 16383 runs, 1 skips
Reviewed-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
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>
9 years ago
Michael Niedermayer
58fba4b02f
avcodec/aacsbr: Replace a noise_facs_q check by an av_assert0
...
The replaced check should have become redundant
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
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>
10 years ago
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>
10 years ago
Michael Niedermayer
2e13a45b1a
avcodec/aacsbr: Assert that bs_num_env is positive
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
79a98294da
avcodec/aacsbr: check that the element type matches before applying SBR
...
Fixes out of array access
Fixes: signal_sigsegv_3670fc0_2818_cov_2307326154_moon.mux
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Andreas Cadhalpun
584cc1ade1
aacsbr: break infinite loop in sbr_hf_calc_npatches
...
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
0b961423ee
avcodec/aacsbr: Replace impossible condition by assert
...
bits can have a value of 0 or 1 they are never -1 or otherwise negative
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
cdce9e8025
aacsbr: Fix type for index variable
...
Prevents unsigned overflow and variable truncation.
Bug-Id: CID 603186
10 years ago
Reimar Döffinger
8c1ce7787a
aacsbr: silence message for SBR extension "padding".
...
Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
10 years ago
Michael Niedermayer
68b8e21b8b
avcodec/aacdec: Use avpriv_float_dsp_alloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
208f3abb91
aacsbr: always initialize max_qmf_subbands
...
Fixes a wordly warning from clang -Wsometimes-uninitialized.
10 years ago
Michael Niedermayer
930ffd46e1
aacsbr: change order of operation to prevent out of array read
...
CC: libav-stable@libav.org
Bug-Id: CID 732250
10 years ago
Vittorio Giovara
9f6f407463
aacsbr: treat 1-d arrays as such
...
CC: libav-stable@libav.org
Bug-Id: CID 1238802 / CID 1238793 / CID 1238785
CID 1238808 / CID 1238809
10 years ago
Reimar Döffinger
87c7fb2b21
aacsbr: support hardcoding tables.
...
For sbr_qmf_window_us there is even a question if it maybe
should be fully hardcoded all the time.
Since half of it is coded, it ends up in .data and not .bss.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Diego Biurrun
5145ccf02b
aacsbr: Add some const casts to silence warnings in ff_sbr_apply()
11 years ago
Gian-Carlo Pascutto
454959a5aa
aacdec: Set the profile during decoding
...
Previously the profile would not be set if the bitstream needs
to be decoded to know the profile.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Diego Biurrun
12e25ed284
avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Michael Niedermayer
eab49f4fb5
Revert "aacdec: Reconfigure output as needed, disable pop_output_configuration()"
...
This reverts commit 60dbf2eff9
.
This is not needed anymore, Ticket 1694 has been fixed differently
12 years ago
Michael Niedermayer
8978c743fb
aacsbr: Check for envelope scalefactors overflowing
...
This prevents various values from becoming stuck at NAN and
output to become silent
If someone knows a cleaner solution, thats welcome!
Fixes Ticket2335
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
60dbf2eff9
aacdec: Reconfigure output as needed, disable pop_output_configuration()
...
Fixes Ticket1694
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c6d3b3be15
aacsbr: Silence warning: max_qmf_subbands may be used uninitialized in this function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mirjana Vulin
8d2eb5fe58
mips: optimization for float aac decoder (sbr module)
...
Signed-off-by: Mirjana Vulin <mvulin@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
218aefce44
dsputil: Move LOCAL_ALIGNED macros to libavutil
12 years ago
Ronald S. Bultje
42d3246948
floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
...
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
12 years ago
Ronald S. Bultje
55aa03b9f8
floatdsp: move vector_fmul_add from dsputil to avfloatdsp.
12 years ago
Christophe Gisquet
9a16359c38
AAC SBR: use AVFloatDSPContext's vector_fmul
...
Around 5% speedup on the code block using 'vector_fmul_add's.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Christophe Gisquet
e32bea8eb4
aac: avoid a memcpy in sbr_qmf_analysis
...
Swapping buffer indices allows saving one memcpy that accounts for 1% of the
runtime, according to oprofile.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Justin Ruggles
3d3cf6745e
aacdec: use float planar sample format for output
12 years ago
Michael Niedermayer
cf5f4c5169
aacsbr: check sample_rate before using it, fix division by 0
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a15adabdd3
aacsbr: fix integer overflow
...
Fixes CID603186
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
8f4c414df6
Improve wording and spelling of av_log_missing_feature messages.
12 years ago
Michael Niedermayer
248b1ff26b
Fix various uses of av_log_missing_feature()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c2340831b8
aacsbr: change order of operation to prevent out of array read
...
Fixes CID732250
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
d0f34c96b1
aacsbr: remove unused variables
13 years ago
Michael Niedermayer
0e3cec9f7d
aacsbr: optimize sine level addition
...
Based-on commit by Måns Rullgård <mans@mansr.com>
original: 1424 decicycles in phi, 1024 runs, 0 skips
mans code: 1104 decicycles in phi, 1024 runs, 0 skips
this change: 734 decicycles in phi, 1024 runs, 0 skips
mans code: 1 file changed, 20 insertions(+), 10 deletions(-)
this change: 1 file changed, 10 insertions(+), 6 deletions(-)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
9fb7e14635
aacdec: More robust output configuration.
...
Save the old output configuration (if it has been used
successfully) when trying a new configuration. If the new configuration
fails to decode, restore the last successful configuration.
13 years ago
Reimar Döffinger
1ac606bae6
aacsbr: silence message for SBR extension "padding".
...
Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.
Fixes trac issue #836 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Alex Converse
b00307ecd0
aacsbr: Add a debug check to sbr_mapping.
...
There have been multiple bugs caused by inconsistencies here.
Based on an idea from Michael Niedermayer.
CC: libav-stable@libav.org
13 years ago
Alex Converse
0cb93dacee
aac: Reset some state variables when turning SBR off
...
This makes sure the reset flag gets set when SBR gets turned back on
and sets control variables for unguided mode back to their defaults.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
6e2821160b
Revert "AAC SBR: group some writes."
...
This reverts commit ba36f14e5d
. It
broke decoding on x86-32 on some systems.
13 years ago
Christophe Gisquet
ba36f14e5d
AAC SBR: group some writes.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Christophe Gisquet
cc412b7104
aacsbr: use a swap index for the Y matrix rather than copy buffers.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
13 years ago
Mans Rullgard
8996ed2b73
aacsbr: align some arrays
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
aac46e088d
aacsbr: move some simdable loops to function pointers
...
This prepares for assembly optimisations by moving the most
time-consuming loops to functions called through pointers
in a new context.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago