ffmpeg-bb/tests/ref/vsynth/vsynth1-mjpeg-444
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

5 lines
267 B
Plaintext

6df1ef3c72846b43b7bbaaed6272e433 *tests/data/fate/vsynth1-mjpeg-444.avi
1831046 tests/data/fate/vsynth1-mjpeg-444.avi
c51ee467d03242dfc1e4536b0485d00f *tests/data/fate/vsynth1-mjpeg-444.out.rawvideo
stddev: 7.37 PSNR: 30.77 MAXDIFF: 63 bytes: 7603200/ 7603200