[FFmpeg-devel] [PATCH 2/5] avcodec/fft_template: Remove unused fixed-point cosine tables

Michael Niedermayer michael at niedermayer.cc
Sun Jan 10 02:40:41 EET 2021


On Thu, Jan 07, 2021 at 12:13:05AM +0100, Andreas Rheinhardt wrote:
> There are three types of FFTs: floating-point, 32-bit fixed-point and
> 16-bit fixed-point. The latter has exactly one user: The fixed-point
> AC-3-encoder; the cosine tables used by it use up to seven bits. The
> tables corresponding to eight to seventeen bits are unused, as are the
> FFT functions for these bits.
> 
> Therefore this commit removes these tables and functions. This is
> especially beneficial when using hardcoded tables as they take up more
> than 255 KiB. But even without it one saves said unused functions as
> well as entries in corresponding tables (this also saves relocations).
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> Thee changes to ARM assembly are honstely untested. I hope someone can
> test them. Btw: It seems that the ARM assembly code wouldn't be able to
> deal with an FFT with more than 16 bits (no function for this has been
> defined), which only worked because no one ever used that many bits with
> the fixed-point FFT.
> 
>  libavcodec/arm/fft_fixed_neon.S | 18 ------------------
>  libavcodec/cos_tablegen.c       |  4 ++--
>  libavcodec/fft.h                |  4 +++-
>  libavcodec/fft_fixed.c          |  1 +
>  libavcodec/fft_template.c       | 31 +++++++++++++++++++++++--------
>  tests/fate/fft.mak              |  8 ++++++--
>  6 files changed, 35 insertions(+), 31 deletions(-)

make -j32 libavcodec/tests/fft-fixed && libavcodec/tests/fft-fixed
Segmentation fault (core dumped)

(if you cant repro say so and ill rebuild with debug symbols ...)

thx
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Any man who breaks a law that conscience tells him is unjust and willingly 
accepts the penalty by staying in jail in order to arouse the conscience of 
the community on the injustice of the law is at that moment expressing the 
very highest respect for law. - Martin Luther King Jr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210110/4233e08b/attachment.sig>


More information about the ffmpeg-devel mailing list