ffmpeg/tests/ref/seek
Ramiro Polla 384fe39623 swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats
There is an issue with the constants used in YUV to YUV range conversion,
where the upper bound is not respected when converting to mpeg range.

With this commit, the constants are calculated at runtime, depending on
the bit depth. This approach also allows us to more easily understand how
the constants are derived.

For bit depths <= 14, the number of fixed point bits has been set to 14
for all conversions, to simplify the code.
For bit depths > 14, the number of fixed points bits has been raised and
set to 18, to allow for the conversion to be accurate enough for the mpeg
range to be respected.

The convert functions now take the conversion constants (coeff and offset)
as function arguments.
For bit depths <= 14, coeff is unsigned 16-bit and offset is 32-bit.
For bit depths > 14, coeff is unsigned 32-bit and offset is 64-bit.

x86_64:
chrRangeFromJpeg8_1920_c:    2127.4   2125.0  (1.00x)
chrRangeFromJpeg16_1920_c:   2325.2   2127.2  (1.09x)
chrRangeToJpeg8_1920_c:      3166.9   3168.7  (1.00x)
chrRangeToJpeg16_1920_c:     2152.4   3164.8  (0.68x)
lumRangeFromJpeg8_1920_c:    1263.0   1302.5  (0.97x)
lumRangeFromJpeg16_1920_c:   1080.5   1299.2  (0.83x)
lumRangeToJpeg8_1920_c:      1886.8   2112.2  (0.89x)
lumRangeToJpeg16_1920_c:     1077.0   1906.5  (0.56x)

aarch64 A55:
chrRangeFromJpeg8_1920_c:   28835.2  28835.6  (1.00x)
chrRangeFromJpeg16_1920_c:  28839.8  32680.8  (0.88x)
chrRangeToJpeg8_1920_c:     23074.7  23075.4  (1.00x)
chrRangeToJpeg16_1920_c:    17318.9  24996.0  (0.69x)
lumRangeFromJpeg8_1920_c:   15389.7  15384.5  (1.00x)
lumRangeFromJpeg16_1920_c:  15388.2  17306.7  (0.89x)
lumRangeToJpeg8_1920_c:     19227.8  19226.6  (1.00x)
lumRangeToJpeg16_1920_c:    15387.0  21146.3  (0.73x)

aarch64 A76:
chrRangeFromJpeg8_1920_c:    6324.4   6268.1  (1.01x)
chrRangeFromJpeg16_1920_c:   6339.9  11521.5  (0.55x)
chrRangeToJpeg8_1920_c:      9656.0   9612.8  (1.00x)
chrRangeToJpeg16_1920_c:     6340.4  11651.8  (0.54x)
lumRangeFromJpeg8_1920_c:    4422.0   4420.8  (1.00x)
lumRangeFromJpeg16_1920_c:   4420.9   5762.0  (0.77x)
lumRangeToJpeg8_1920_c:      5949.1   5977.5  (1.00x)
lumRangeToJpeg16_1920_c:     4446.8   5946.2  (0.75x)

NOTE: all simd optimizations for range_convert have been disabled.
      they will be re-enabled when they are fixed for each architecture.

NOTE2: the same issue still exists in rgb2yuv conversions, which is not
       addressed in this commit.
2024-12-05 21:10:29 +01:00
..
acodec-adpcm-ima_qt
acodec-adpcm-ima_qt-trellis
acodec-adpcm-ima_wav avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-adpcm-ima_wav-trellis avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-adpcm-ms avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-adpcm-ms-trellis avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-adpcm-swf avcodec/adpcm_ima_swf: fix frame size to 4096 2020-11-07 23:43:26 +10:00
acodec-adpcm-swf-trellis avcodec/adpcm_ima_swf: fix frame size to 4096 2020-11-07 23:43:26 +10:00
acodec-adpcm-yamaha avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-adpcm-yamaha-trellis avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-alac avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
acodec-flac
acodec-mp2
acodec-pcm-alaw avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-f32be avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-f32le avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-f64be avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-f64le avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-mulaw avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-s8 avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
acodec-pcm-s16be avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
acodec-pcm-s16le avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-s24be avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
acodec-pcm-s24le avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-s32be avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
acodec-pcm-s32le avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
acodec-pcm-u8 avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
cache-pipe ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
empty-edit-mp4 lavf/mov.c: Use the correct offset to shift timestamp when seeking. 2018-03-10 17:55:50 +01:00
extra-mp3 ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
extra-mp4 lavf/mov: Change default to prefer TFDT time and allow for fallback to SIDX or TFDT 2021-11-05 16:22:04 +01:00
lavf-aiff fate/lavf-audio: Test writing AIFF-native tags 2024-03-17 16:08:13 +01:00
lavf-al avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-asf
lavf-au avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-avi
lavf-bmp
lavf-dv lavf/dv: use a more granular timebase for audio 2023-05-02 10:57:21 +02:00
lavf-flv Merge commit '618d02c1fa' 2019-03-14 14:36:24 -03:00
lavf-gif
lavf-gxf
lavf-jpg swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
lavf-mkv avcodec/pnm: explicitly tag color range 2023-11-09 12:53:35 +01:00
lavf-mmf
lavf-mov avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-mpg
lavf-mxf avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-mxf_d10 avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-mxf_dv25 avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-mxf_dvcpro50 avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-mxf_opatom avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-mxf_opatom_audio avformat/mxfenc: Add Padding Bits 2018-05-08 23:02:58 +02:00
lavf-nut
lavf-ogg
lavf-pbmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-pcx
lavf-pgm
lavf-pgmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-ppm
lavf-ppmpipe lavf/img2dec: add pnm pipe demuxers 2016-06-22 15:24:19 +02:00
lavf-rm avcodec/eac3: add support for dependent stream 2018-03-29 10:19:03 +02:00
lavf-sgi Merge commit '99f40fd02f' 2015-11-29 15:42:33 +01:00
lavf-swf
lavf-tga
lavf-tiff
lavf-ts avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt 2019-08-23 22:49:01 +02:00
lavf-ul avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-voc avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-wav avformat/pcm: decrease target audio frame per sec to 10 2024-03-16 19:19:42 +01:00
lavf-wtv
lavf-y4m avcodec/pnm: explicitly tag color range 2023-11-09 12:53:35 +01:00
mkv-codec-delay ffmpeg, ffprobe: don't "merge" side data into packet data by default 2017-03-14 23:37:28 +01:00
test-iibbibb-mp4 lavf/mov.c: Use the correct offset to shift timestamp when seeking. 2018-03-10 17:55:50 +01:00
test-iibbibb-neg-ctts-mp4 lavf/mov.c: Use the correct offset to shift timestamp when seeking. 2018-03-10 17:55:50 +01:00
vsynth_lena-asv1
vsynth_lena-asv2
vsynth_lena-dnxhd-4k-hr-lb tests/fate: add dnxhr encoding tests 2016-07-24 12:31:07 +02:00
vsynth_lena-dnxhd-720p
vsynth_lena-dnxhd-720p-rd
vsynth_lena-dnxhd-1080i avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
vsynth_lena-dv lavf/dv: do not set video timebase more than once 2023-05-02 10:57:21 +02:00
vsynth_lena-dv-50 lavf/dv: do not set video timebase more than once 2023-05-02 10:57:21 +02:00
vsynth_lena-dv-411 lavf/dv: do not set video timebase more than once 2023-05-02 10:57:21 +02:00
vsynth_lena-ffv1
vsynth_lena-flashsv Revert "tests/fate: disable compression for zlib-based codecs" 2024-10-16 17:38:57 -03:00
vsynth_lena-flv lavf/flvdec: init AVPacket::pos to FLVTAG offset 2016-10-26 02:12:18 +02:00
vsynth_lena-h261
vsynth_lena-h263
vsynth_lena-h263p
vsynth_lena-huffyuv
vsynth_lena-jpegls
vsynth_lena-ljpeg
vsynth_lena-mjpeg swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
vsynth_lena-mpeg1
vsynth_lena-mpeg1b
vsynth_lena-mpeg2-422 avcodec/mpegvideo_enc: Fix a chroma mb size error in sse_mb() 2022-07-09 21:05:02 +02:00
vsynth_lena-mpeg2-idct-int
vsynth_lena-mpeg2-ilace
vsynth_lena-mpeg2-ivlc-qprd
vsynth_lena-mpeg2-thread
vsynth_lena-mpeg2-thread-ivlc
vsynth_lena-mpeg4 avformat/movenc: ensure we don't write the major brand as a compatible brand more than once 2019-12-21 11:57:28 -03:00
vsynth_lena-mpeg4-adap avcodec/mpegpicture: Move mb_var, mc_mb_var and mb_mean to MpegEncCtx 2022-08-09 19:17:22 +02:00
vsynth_lena-mpeg4-adv
vsynth_lena-mpeg4-error
vsynth_lena-mpeg4-nr
vsynth_lena-mpeg4-nsse
vsynth_lena-mpeg4-qpel
vsynth_lena-mpeg4-qprd
vsynth_lena-mpeg4-rc
vsynth_lena-mpeg4-thread
vsynth_lena-msmpeg4
vsynth_lena-msmpeg4v2
vsynth_lena-rgb
vsynth_lena-roqvideo swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats 2024-12-05 21:10:29 +01:00
vsynth_lena-rv10
vsynth_lena-rv20
vsynth_lena-snow avcodec/snowenc: Fix visual weight calculation 2023-03-26 01:46:48 +01:00
vsynth_lena-snow-ll
vsynth_lena-svq1 avcodec/svq1enc: do not use ambiguous interframe mean symbols 2022-11-01 09:24:29 +11:00
vsynth_lena-wmv1
vsynth_lena-wmv2
vsynth_lena-yuv