1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2025-04-19 02:04:19 +03:00
ffmpeg/libavcodec
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
..
2025-04-13 22:49:21 +02:00
2025-04-16 23:38:16 +02:00
2025-04-09 13:52:29 +02:00
2025-02-26 17:12:08 +01:00
2025-02-26 17:12:08 +01:00
2025-02-04 00:14:14 +01:00
2025-02-09 20:27:49 -06:00
2025-02-09 20:27:49 -06:00
2024-09-06 13:59:28 +02:00
2024-09-28 18:35:35 +02:00
2024-09-28 18:35:35 +02:00
2025-01-01 20:31:08 +01:00
2025-03-17 08:51:23 +01:00
2024-09-24 15:37:19 +02:00
2025-04-10 03:01:33 +02:00
2025-02-06 13:48:47 -03:00
2024-11-03 10:53:15 +11:00
2024-11-03 10:53:15 +11:00
2024-11-03 10:53:15 +11:00
2024-11-03 10:53:15 +11:00
2025-03-19 21:02:56 +01:00
2025-04-02 09:25:46 +02:00
2025-04-02 09:25:46 +02:00
2025-03-20 07:10:17 +01:00
2024-10-12 11:21:14 -03:00
2024-10-12 11:21:14 -03:00
2024-10-12 11:21:14 -03:00
2024-11-01 12:13:07 +08:00
2024-09-24 15:37:19 +02:00
2025-02-09 20:27:49 -06:00
2025-03-14 02:03:58 +01:00
2024-10-31 17:49:48 +11:00
2024-10-31 17:49:48 +11:00
2024-10-31 17:49:48 +11:00
2024-10-31 17:49:48 +11:00
2024-09-24 15:37:20 +02:00