ffmpeg/libavcodec/tests
Andreas Rheinhardt ff9f3fb607 avcodec/mjpegenc_huffman: Avoid AV_QSORT to sort entries by length
It is unnecessary, as we already have the entries sorted by
probability and therefore implicitly by length. All we need
on top of that to build the tree is the number of entries
of a given length.
Doing so gives a 3.6% speedup of ff_mjpeg_encode_huffman_close()
here; it also saves about 640B of .text here.

The new code puts values with higher probability to the left
of the tree. The old code did not and therefore
the FATE checksums needed to be updated. Due to MJPEG's
0xFF unescaping file sizes as well as file checksums
needed to be updated; the decoded picture hashes stayed
the same. Given that codes on the left of the tree have
on average fewer bits set than codes on the right, the
file sizes mostly improve (all except vsynth3-mjpeg-444).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2025-04-18 08:40:17 +02:00
..
aarch64
arm
ppc
x86
.gitignore
av1_levels.c
avcodec.c avcodec/tests/avcodec: Silence deprecation warnings 2025-03-13 02:20:05 +01:00
avpacket.c
bitstream_be.c
bitstream_le.c
bitstream_template.c
cabac.c
celp_math.c avcodec/celp_math: Reuse ff_scalarproduct_float_c() 2025-04-09 13:52:29 +02:00
codec_desc.c
dct.c avcodec/simple_idct: Move ProRes-only code to proresdsp.c 2025-02-27 15:30:12 +01:00
golomb.c
h264_levels.c
h265_levels.c
htmlsubtitles.c
iirfilter.c avcodec/iirfilter: Move ff_iir_filter() to lavc/tests/iirfilter.c 2024-06-30 11:37:25 +02:00
jpeg2000dwt.c avcodec/jpeg2000: Fix undefined behaviour in left shift operations 2024-12-07 15:41:30 -08:00
mathops.c
mjpegenc_huffman.c avcodec/mjpegenc_huffman: Avoid AV_QSORT to sort entries by length 2025-04-18 08:40:17 +02:00
motion.c avcodec/me_cmp: Zero MECmpContext in ff_me_cmp_init() 2024-06-20 18:58:38 +02:00
mpeg12framerate.c
rangecoder.c
snowenc.c