On 16/05/2024 20:30, Michael Niedermayer wrote:
On Thu, May 16, 2024 at 12:08:11PM +0200, Lynne via ffmpeg-devel wrote:
AAC uses an unconventional system to send scalefactors
(the volume+quantization value for each band).
Each window is split into either 1 or 8 blocks (long vs short),
and transformed separately from one another, with the coefficients
for each being also completely independent. The scalefactors
slightly increase from 64 (long) to 128 (short) to accomodate
better per-block-per-band volume for each window.

To reduce overhead, the codec signals scalefactor sizes in an obtuse way,
where each group's scalefactor types are sent via a variable length decoding,
with a range.
But our decoder was written in a way where those ranges were carried through
the entire decoder, and to actually read them you had to use the range.

Instead of having a dedicated array with a range for each scalefactor,
just let the decoder directly index each scalefactor.

This also switches the form of quantized scalefactors to the format
the spec uses, where for intensity stereo and regular, scalefactors
are stored in a scalefactor - 100 form, rather than as-is.

USAC gets rid of the complex scalefactor handling. This commit permits
for code sharing between both.
---
  libavcodec/aac/Makefile              |   3 +-
  libavcodec/aac/aacdec.c              | 100 ++++++++++++---------------
  libavcodec/aac/aacdec.h              |   5 +-
  libavcodec/aac/aacdec_dsp_template.c |  95 ++++++++++---------------
  4 files changed, 85 insertions(+), 118 deletions(-)

diff --git a/libavcodec/aac/Makefile b/libavcodec/aac/Makefile
index c3e525d373..8b0bfff3e5 100644
--- a/libavcodec/aac/Makefile
+++ b/libavcodec/aac/Makefile
@@ -2,6 +2,7 @@ clean::
                $(RM) $(CLEANSUFFIXES:%=libavcodec/aac/%)
OBJS-$(CONFIG_AAC_DECODER) += aac/aacdec.o aac/aacdec_tab.o \
-                                        aac/aacdec_float.o
+                                        aac/aacdec_float.o aac/aacdec_usac.o \
+                                        aac/aacdec_ac.o

AR      libavcodec/libavcodec.a
ar: libavcodec/aac/aacdec_ac.o: No such file or directory
make: *** [ffbuild/library.mak:38: libavcodec/libavcodec.a] Error 1

Thanks, a stray git add, fixed in my repo

Attachment: OpenPGP_0xA2FEA5F03F034464.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to