Andreas Rheinhardt
c13b5d96c8
avcodec/aac/aacdec_float: Call ff_aac_float_common_init() only once
...
That's enough.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
41ea317ced
avcodec/aac/aacdec: Avoid branch to set sample_fmt
...
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
ef16882e8f
avcodec/aac/aacdec: Move channel number check out of init_dsp()
...
Also move initializing random_state.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
e4e9144a5c
avcodec/aac/aacdec: Remove unnecessary ff_thread_once()
...
ff_aacdec_common_init_once() already uses its own AVOnce.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Andreas Rheinhardt
44474dd7b9
avcodec/aacsbr: Fix type mismatch
...
ff_aac_sbr_apply() and ff_aac_sbr_apply_fixed() still used
pointers to INTFLOAT which is float or int depending upon
whether USE_FIXED is set or not; in particular, according
to these declarations both functions have the same type.
But that is wrong and given that aacdec.c sets USE_FIXED,
it sees the wrong type for ff_aac_sbr_apply().
This leads to a -Wlto-type-mismatch warning when using lto [1].
Fix this by avoiding INTFLOAT in aacsbr.h (which also means
that aac_defines.h need not be included there any more).
[1]: https://fate.ffmpeg.org/log.cgi?slot=x86_64-archlinux-gcc-lto&time=20240506022217&log=compile
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
8 months ago
Lynne
3390693bfb
aacdec: avoid generating unused code when either implementation is disabled
...
Minor optimization to remove extra branches.
We need to include the header for xHE anyway, which is float-only.
8 months ago
James Almer
63702d5f9c
avcodec/aac/aacdec: remove double colon
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 months ago
Lynne
e3650886c7
aacdec: initialize float/fixed SBR tables only when either is needed
9 months ago
Lynne
03cf101645
aacdec: remove AAC-specific MIPS optimizations
...
The code was written in 2012, but seems to have been broken
for just as long. Compilation is broken on every MIPS/MIPS64
system with an FPU (which the code depends on).
9 months ago
Lynne
ae7c6cc17d
aac: move aacdec.c to aac/aacdec.c
9 months ago
Lynne
551ce16b59
aacdec: move aacdec.h into libavcodec/aac
9 months ago
Lynne
ce740618d1
aacdec: move LATM decode functions into a separate file
9 months ago
Lynne
e93793bf3c
aacdec: fully detemplate decoder core
9 months ago
Lynne
2f90d83981
aacdec: move fixed/float DSP initialization to templated init functions
9 months ago
Lynne
49e7be1e37
aacdec: move prediction to separate files
9 months ago
Lynne
b1718ce0f9
aacdec: move CCE decoding to a separate templated file
...
Unfortunately, although it's a purely decode function, it does
need to be templated.
9 months ago
Lynne
41c04bec0a
aacdec: move fixed-point clipping to a separate function
9 months ago
Lynne
87a93a5670
aacdec: split off channel coupling into a new file
9 months ago
Lynne
b7387ea00e
aacdec: deduplicate table initizalization
...
All tables now initialized by aac/aacdec_fixed|float
9 months ago
Lynne
41ae2b03a5
aacdec: move spectrum decode and dequantization to a new file
9 months ago
Lynne
eef9100a8e
aacdec: template LTP windowing separately
...
The function is called only internally in DSP, so we do not
need to expose it.
apply_ltp on MIPS uses this function, but due to the function
being just a glue function with no real optimizations,
duplicate it there.
9 months ago
Lynne
091d85217d
aacdec: template windowing and transforms separately
9 months ago
Lynne
a309aa4127
aacdec: duplicate table initialization
...
Preparation to move all table init and support windowing functions.
9 months ago
Lynne
e9fc7661da
aacdec: template LTP application separately
9 months ago
Lynne
db5128ef70
aacdec: template TNS application separately
9 months ago
Lynne
ad16349f9b
aacdec: template intensity stereo application separately
9 months ago
Lynne
9f3fa77e0d
aacdec: template mid/side stereo application separately
9 months ago
Lynne
a6295586f5
aacdec: template scalefactor dequantization separately
9 months ago
Andreas Rheinhardt
9de66fd449
avcodec/aacdec_template: Deduplicate common part of aac_decode_init()
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
9 months ago
Andreas Rheinhardt
980a55fb46
avcodec/aacdec_template: Deduplicate AVClass+AVOptions
...
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
9 months ago
Andreas Rheinhardt
e3693c6f56
avcodec/aacdec_template: Deduplicate aac_decode_close()
...
This is possible now that both AAC decoders share the same
context.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
9 months ago
Lynne
f55b587820
aacdec: move aacdec_common to aac/aacdec_tab
...
Start to clean up the decoder.
Also renames a confusingly named file.
9 months ago