ffmpeg-bb/tests/ref/fate/jpg-icc
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

46 lines
837 B
Plaintext

4d8f3d93f55267cc90bd1d2a94cfa84f *tests/data/fate/jpg-icc.mjpeg
11011 tests/data/fate/jpg-icc.mjpeg
#tb 0: 1/25
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 128x128
#sar 0: 1/1
0, 0, 0, 1, 49152, 0xea4329bc
[FRAME]
media_type=video
stream_index=0
key_frame=1
pts=0
pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
duration=1
duration_time=0.040000
pkt_pos=0
pkt_size=11011
width=128
height=128
crop_top=0
crop_bottom=0
crop_left=0
crop_right=0
pix_fmt=yuvj444p
sample_aspect_ratio=1:1
pict_type=I
interlaced_frame=0
top_field_first=0
lossless=0
repeat_pict=0
color_range=pc
color_space=bt470bg
color_primaries=unknown
color_transfer=unknown
chroma_location=center
[SIDE_DATA]
side_data_type=ICC profile
size=3144
[/SIDE_DATA]
[/FRAME]