mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00

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>
5 lines
296 B
Plaintext
5 lines
296 B
Plaintext
d16eaa6ece27bc10715f24509334c402 *tests/data/fate/vsynth2-mjpeg-trell-huffman.avi
|
|
734736 tests/data/fate/vsynth2-mjpeg-trell-huffman.avi
|
|
8612dfee87e32268f6f533188a097785 *tests/data/fate/vsynth2-mjpeg-trell-huffman.out.rawvideo
|
|
stddev: 5.03 PSNR: 34.10 MAXDIFF: 67 bytes: 7603200/ 7603200
|