1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
FFmpeg/tests/fate
Rudolf Polzer dcc9454ab9 vf_paletteuse: fix color cache lookup for Bayer dithering mode.
To trigger this bug, use `paletteuse=dither=bayer:bayer_scale=0`; you will see
that adjacent pixel lines will use the same dither pattern, instead of being
shifted from each other by 32 units (0x20).

One way to demostrate the bug is:

$ convert -size 64x256 gradient:black-white -rotate 270 grad.png
$ echo 'P2 2 1 255 0 255' > bw.pnm
$ ffmpeg -i grad.png -filter_complex 'movie=bw.pnm,scale=256x1[bw]; [0:v][bw]paletteuse=dither=bayer:bayer_scale=0' gradbw.png

Previously: https://www.rm.cloudns.org/img/uploaded/0bd152c11b9cd99e5945115534b1bdde.png
Now:        https://www.rm.cloudns.org/img/uploaded/89caaa5e36c38bc2c01755b30811f969.png

This was caused by passing inconsistent color vs (a,r,g,b) parameters to
color_get(), and NBITS being 5 meaning actually hitting the same cache node
does happen in this case, but ONLY if bayer_scale is zero.

The fix is passing the correct color value to color_get().

Also added a previous-failing FATE test; image comparison of the first frame:

Previously: https://www.rm.cloudns.org/img/uploaded/d0ff9db8d8a7d8a3b8b88bbe92bf5fed.png
Now:        https://www.rm.cloudns.org/img/uploaded/a72389707e719b5cd1c58916a9e79ca8.png

(on this less synthetic test image, the bug basically causes noise from cache
 hits vs misses)

Tested: FATE passes, which exercises this filter but at the default bayer_scale.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
2022-01-17 01:31:06 +05:30
..
aac.mak fate-aac: use the fast coder for tests 2021-05-21 19:28:50 +02:00
ac3.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
acodec.mak fate: add adpcm_ima_ws test 2021-04-26 19:56:33 +10:00
adpcm.mak fate: add adpcm_ima_ws test in a VQA v3 file 2021-04-29 23:52:46 +10:00
alac.mak
als.mak fate/als: Add test for conformance file with 512 channels. 2019-08-24 09:33:44 +02:00
amrnb.mak fate/amr[nw]b: Add remux tests 2022-01-08 18:09:58 +01:00
amrwb.mak fate/amrwb: Fix container type 2022-01-08 18:10:56 +01:00
api.mak tests: drop api-codec-param test 2020-12-10 09:46:30 +01:00
apng.mak fate: add a more extensive test for APNG_DISPOSE_OP_BACKGROUND 2021-05-14 11:15:13 +02:00
atrac.mak avcodec/atrac1: fix decoder: QMF delay compensation should be 39 samples 2015-11-21 11:38:45 +01:00
audio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
bmp.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
build.mak Merge commit 'db869f4ea4405fb8f9736e5ecdca70f77621a28e' 2017-10-11 19:02:04 -03:00
caf.mak fate/caf: Add remux tests 2021-09-27 07:08:53 +02:00
canopus.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
cbs.mak avcodec/av1dec: avoid probing with av1dec 2020-10-06 11:28:12 -03:00
cdxl.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
checkasm.mak swscale/x86/output.asm: add x86-optimized planer gbr yuv2anyX functions 2022-01-11 16:33:17 -03:00
concatdec.mak fate: fix concat demuxer tests on msys/cygwin by using relative paths 2015-11-16 11:05:19 +01:00
cover-art.mak fate/cover-art: Add test for muxing cover arts to FLAC 2021-10-07 22:09:04 +02:00
dca.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
demux.mak fate/demux: Move Sony OpenMG audio (oma) test into a new file 2021-09-27 07:08:59 +02:00
dfa.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
dnn.mak tests/dnn: Make DNN tests regular libavfilter tests 2021-12-19 00:46:29 +01:00
dnxhd.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
dpcm.mak
ea.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
exif.mak
ffmpeg.mak fate/ffmpeg: add missing samples dependency to fate-shortest 2022-01-16 00:32:52 -03:00
ffprobe.mak fate/ffprobe: Verify ffprobe XML output against schema file 2021-07-13 08:57:23 +02:00
fft.mak fft: remove 16-bit FFT and MDCT code 2021-01-14 01:44:21 +01:00
fifo-muxer.mak tests/fate/fifo-muxer: update fifo-muxer dependencies 2017-05-08 08:42:00 +02:00
filter-audio.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
filter-video.mak vf_paletteuse: fix color cache lookup for Bayer dithering mode. 2022-01-17 01:31:06 +05:30
fits.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
flac.mak
flvenc.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
gapless.mak fate/demux, gapless, image: Add missing ffprobe dependencies 2021-09-19 23:52:20 +02:00
gif.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
h264.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
hap.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
hevc.mak fate: Limit Dolby Vision RPU test frame count 2022-01-04 11:59:41 +01:00
hlsenc.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
hw.mak tests: Add EXESUF to program calls. 2019-04-19 01:11:39 +02:00
id3v2.mak fate/id3v2: Add test for id3v2 chapters 2021-04-18 02:20:30 +02:00
image.mak fate/image: Modify aliaspix tests to also cover the encoder 2021-10-07 11:56:53 +02:00
indeo.mak fate: Add separate target for all indeo3 tests 2016-03-01 21:54:10 +01:00
lavf-audio.mak fate: add wav chapters test 2020-09-07 19:04:09 +02:00
lavf-container.mak fate/lavf-container: add an AV1 in Matroska muxing test 2020-01-26 12:41:32 -03:00
lavf-image2pipe.mak tests: Convert image2pipe tests to non-legacy test scripts 2019-02-16 18:15:11 +01:00
lavf-image.mak fate/lavf-image: fix passed arguments for some high bit depth tests 2019-03-14 17:15:28 -03:00
lavf-video.mak tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies 2020-01-30 20:30:36 +01:00
libavcodec.mak avcodec/tests/utils: Rename to avcodec 2021-09-26 12:56:08 +02:00
libavdevice.mak tests: Move all test programs to a subdirectory 2016-05-13 14:55:56 +02:00
libavformat.mak avformat/imf: Tests 2021-12-31 17:26:01 +10:00
libavutil.mak tests: Add EXESUF to program calls. 2019-04-19 01:11:39 +02:00
libswresample.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
libswscale.mak fate/libswcale: add missing samples dependency to sws-slice tests 2022-01-03 09:42:38 -03:00
lossless-audio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
lossless-video.mak tests: stop using -vsync drop 2020-12-10 09:53:52 +01:00
matroska.mak fate/matroska: Add test for QT-mode 2022-01-13 21:00:26 +01:00
microsoft.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
monkeysaudio.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
mov.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
mp3.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
mpc.mak fate: Convert the musepack8 test to an oneoff test 2020-11-17 23:47:31 +02:00
mpeg4.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
mpegps.mak fate: Fix dependencies to sample files to use local paths 2019-12-12 11:27:55 +02:00
mpegts.mak avformat/mpegts: add merge_pmt_versions option 2018-05-18 19:00:29 -07:00
mxf.mak fate/mxf: Fix d10-user-comments test 2021-02-16 22:50:08 +01:00
oma.mak fate/oma: Add remux tests for ATRAC3 and ATRAC3P 2021-09-27 07:08:59 +02:00
opus.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
pcm.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
pixfmt.mak fate/pixfmt: test xyz12le 2021-08-29 18:44:46 +02:00
pixlet.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
probe.mak
prores.mak fate: add scale filters for big-endian architectures. 2020-09-30 16:39:34 +02:00
qt.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
qtrle.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
real.mak Merge commit '043b0b9fb1481053b712d06d2c5b772f1845b72b' 2017-03-24 11:40:35 +01:00
screen.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
seek.mak tests/fate: Don't keep unnecessary temp files 2021-03-05 09:24:34 +01:00
segment.mak FATE: always pass -nostdin to ffmpeg 2021-12-22 18:38:40 -06:00
source-check.sh tests/fate/source-check: Use git grep in place of grep 2017-03-30 03:12:05 +02:00
source.mak
speedhq.mak speedhq: add FATE tests 2017-08-03 16:36:02 -03:00
subtitles.mak fate/subtitles: Fix check for fate-binsub-mksenc test 2022-01-08 18:16:17 +01:00
truehd.mak avcodec/options_table: Treat (request_)channel_layout as channel layout 2021-08-15 23:19:35 +02:00
utvideo.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
vcodec.mak FATE: stop using numeric arguments to -vsync 2021-12-07 11:23:45 +01:00
video.mak Revert "fate: Add test for ticket 6024, truncated decoding mode" 2021-09-20 00:23:52 +02:00
voice.mak fate: disable automatic conversions on many tests. 2020-09-08 14:16:08 +02:00
vorbis.mak fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES 2021-07-12 09:55:21 +02:00
vpx.mak fate: drop the vp8-alpha test 2021-05-09 11:07:20 +02:00
vqf.mak Merge commit '4141a5a240fba44b4b4a1c488c279d7dd8a11ec7' 2017-10-03 21:28:07 -03:00
wavpack.mak avformat/matroskaenc: Pass dispositions through unchanged by default 2021-08-24 04:23:29 +02:00
wma.mak avcodec/wmadec: fix WMA gapless playback 2021-09-12 22:23:35 +02:00
xvid.mak