This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 73749924b05b514cf0f26944aa88070a73fbd91d Author: Kacper Michajłow <[email protected]> AuthorDate: Wed Sep 30 03:16:01 2026 +0200 Commit: Kacper Michajłow <[email protected]> CommitDate: Thu Oct 1 14:31:15 2026 +0000 tests/fate: add chroma location negotiation tests Check that a location set by setparams is kept by a following scale, that the reference input of scale does not have to match the main one, that untagged input to scale is tagged with the output location instead of being converted, that top-left 4:2:0 reaches mpeg2video converted to left, that noformat converts away from an excluded location, and that zscale tags the frames it passes through unconverted with the negotiated location. Signed-off-by: Kacper Michajłow <[email protected]> --- tests/fate/ffmpeg.mak | 3 +++ tests/fate/filter-video.mak | 16 ++++++++++++++++ tests/ref/fate/ffmpeg-chroma-location | 6 ++++++ ...ter-scalechroma-alphablend => filter-noformat-chroma} | 2 +- tests/ref/fate/filter-scalechroma-ref | 6 ++++++ ...alechroma-alphablend => filter-scalechroma-setparams} | 2 +- ...ter-scalechroma-infer => filter-scalechroma-untagged} | 0 ...chroma-alphablend => filter-scalechroma-untagged-422} | 2 +- tests/ref/fate/filter-zscale-chroma-input-override | 9 +++++++++ 9 files changed, 43 insertions(+), 3 deletions(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index e255cdcc0b..b749af4a7e 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@ -16,6 +16,9 @@ fate-ffmpeg-filter_colorkey: CMD = framecrc -auto_conversion_filters -idct simpl FATE_FFMPEG-$(call FILTERFRAMECRC, COLOR) += fate-ffmpeg-lavfi fate-ffmpeg-lavfi: CMD = framecrc -lavfi color=d=1:r=5 -fflags +bitexact +FATE_FFMPEG-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SETPARAMS SCALE, LAVFI_INDEV WRAPPED_AVFRAME_DECODER MPEG2VIDEO_ENCODER) += fate-ffmpeg-chroma-location +fate-ffmpeg-chroma-location: CMD = framecrc -auto_conversion_filters -f lavfi -i testsrc2=s=64x64:r=25:d=1,format=yuv420p,setparams=chroma_location=topleft -sws_flags +accurate_rnd+bitexact -flags +bitexact -idct simple -dct fastint -threads 1 -c:v mpeg2video -qscale:v 2 -frames:v 1 + FATE_FFMPEG-$(call ENCDEC2, MPEG4, RAWVIDEO, AVI, RAWVIDEO_DEMUXER FRAMECRC_MUXER) += fate-force_key_frames fate-force_key_frames: tests/data/vsynth1.yuv fate-force_key_frames: CMD = enc_dec \ diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index b24379ae81..b746f6a0e8 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -592,6 +592,22 @@ FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SCALE) += fate-filter-scalech fate-filter-scalechroma-matrix: CMD = framecrc -flags bitexact -lavfi testsrc2=s=64x64:r=1:d=1,format=yuv420p,scale=96:80:in_color_matrix=bt709:out_color_matrix=bt470bg:in_range=tv:out_range=tv:in_chroma_loc=topleft:out_chroma_loc=center:flags=accurate_rnd+bitexact,format=yuv420p -frames:v 1 fate-filter-scalechroma-downscale: CMD = framecrc -flags bitexact -lavfi testsrc2=s=2048x2048:r=1:d=1,format=yuv420p,scale=8:8:in_chroma_loc=topleft:out_chroma_loc=center:flags=accurate_rnd+bitexact,format=yuv420p -frames:v 1 +FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SETPARAMS SCALE) += fate-filter-scalechroma-setparams +fate-filter-scalechroma-setparams: CMD = framecrc -flags bitexact -lavfi testsrc2=s=64x64:r=1:d=1,format=yuv420p,format=chroma_locations=left,setparams=chroma_location=center,scale=flags=accurate_rnd+bitexact,format=yuv420p -frames:v 1 + +FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SCALE) += fate-filter-scalechroma-ref +fate-filter-scalechroma-ref: CMD = framecrc -flags bitexact -lavfi "testsrc2=s=64x64:r=1:d=1,format=yuv420p,format=chroma_locations=left[m];testsrc2=s=32x48:r=1:d=1,format=yuv420p,format=chroma_locations=center[r];[m][r]scale=w=rw:h=rh:flags=accurate_rnd+bitexact,format=yuv420p" -frames:v 1 + +FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SCALE) += fate-filter-scalechroma-untagged fate-filter-scalechroma-untagged-422 +fate-filter-scalechroma-untagged: CMD = framecrc -flags bitexact -lavfi testsrc2=s=64x64:r=1:d=1,format=yuv420p,scale=96:80:flags=accurate_rnd+bitexact,format=pix_fmts=yuv420p:chroma_locations=left -frames:v 1 +fate-filter-scalechroma-untagged-422: CMD = framecrc -flags bitexact -lavfi testsrc2=s=64x64:r=1:d=1,format=yuv420p,scale=flags=accurate_rnd+bitexact,format=pix_fmts=yuv422p:chroma_locations=topleft -frames:v 1 + +FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SETPARAMS SCALE NOFORMAT) += fate-filter-noformat-chroma +fate-filter-noformat-chroma: CMD = framecrc -flags bitexact -lavfi testsrc2=s=64x64:r=1:d=1,format=yuv420p,setparams=chroma_location=left,scale=flags=accurate_rnd+bitexact,noformat=chroma_locations=left -frames:v 1 + +FATE_FILTER-$(call FILTERFRAMECRC, TESTSRC2 FORMAT SETPARAMS ZSCALE SCALE, LAVFI_INDEV WRAPPED_AVFRAME_DECODER) += fate-filter-zscale-chroma-input-override +fate-filter-zscale-chroma-input-override: CMD = framecrc -flags bitexact -f lavfi -i testsrc2=s=64x64:r=2:d=2,setparams=chroma_location=left -vf zscale=chromalin=center,format=chroma_locations=center,scale=flags=accurate_rnd+bitexact -frames:v 4 + FATE_FILTER-$(call ALLYES, SCALE_FILTER TESTSRC2_FILTER LAVFI_INDEV \ WRAPPED_AVFRAME_DECODER WRAPPED_AVFRAME_ENCODER \ NULL_MUXER) += fate-filter-scale-print-info \ diff --git a/tests/ref/fate/ffmpeg-chroma-location b/tests/ref/fate/ffmpeg-chroma-location new file mode 100644 index 0000000000..2c96964494 --- /dev/null +++ b/tests/ref/fate/ffmpeg-chroma-location @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: mpeg2video +#dimensions 0: 64x64 +#sar 0: 1/1 +0, 0, 0, 1, 2687, 0xf341d96b, S=1, Quality stats, 8, 0x076400ed diff --git a/tests/ref/fate/filter-scalechroma-alphablend b/tests/ref/fate/filter-noformat-chroma similarity index 60% copy from tests/ref/fate/filter-scalechroma-alphablend copy to tests/ref/fate/filter-noformat-chroma index 963090d153..d525d1fa57 100644 --- a/tests/ref/fate/filter-scalechroma-alphablend +++ b/tests/ref/fate/filter-noformat-chroma @@ -3,4 +3,4 @@ #codec_id 0: rawvideo #dimensions 0: 64x64 #sar 0: 1/1 -0, 0, 0, 1, 6144, 0x0fa9d30b +0, 0, 0, 1, 6144, 0x9bc050a5 diff --git a/tests/ref/fate/filter-scalechroma-ref b/tests/ref/fate/filter-scalechroma-ref new file mode 100644 index 0000000000..c934991b40 --- /dev/null +++ b/tests/ref/fate/filter-scalechroma-ref @@ -0,0 +1,6 @@ +#tb 0: 1/1 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 32x48 +#sar 0: 3/2 +0, 0, 0, 1, 2304, 0x29a68068 diff --git a/tests/ref/fate/filter-scalechroma-alphablend b/tests/ref/fate/filter-scalechroma-setparams similarity index 60% copy from tests/ref/fate/filter-scalechroma-alphablend copy to tests/ref/fate/filter-scalechroma-setparams index 963090d153..2d4ee73333 100644 --- a/tests/ref/fate/filter-scalechroma-alphablend +++ b/tests/ref/fate/filter-scalechroma-setparams @@ -3,4 +3,4 @@ #codec_id 0: rawvideo #dimensions 0: 64x64 #sar 0: 1/1 -0, 0, 0, 1, 6144, 0x0fa9d30b +0, 0, 0, 1, 6144, 0x42205435 diff --git a/tests/ref/fate/filter-scalechroma-infer b/tests/ref/fate/filter-scalechroma-untagged similarity index 100% copy from tests/ref/fate/filter-scalechroma-infer copy to tests/ref/fate/filter-scalechroma-untagged diff --git a/tests/ref/fate/filter-scalechroma-alphablend b/tests/ref/fate/filter-scalechroma-untagged-422 similarity index 60% copy from tests/ref/fate/filter-scalechroma-alphablend copy to tests/ref/fate/filter-scalechroma-untagged-422 index 963090d153..2dd464d1b9 100644 --- a/tests/ref/fate/filter-scalechroma-alphablend +++ b/tests/ref/fate/filter-scalechroma-untagged-422 @@ -3,4 +3,4 @@ #codec_id 0: rawvideo #dimensions 0: 64x64 #sar 0: 1/1 -0, 0, 0, 1, 6144, 0x0fa9d30b +0, 0, 0, 1, 8192, 0x490b5f6f diff --git a/tests/ref/fate/filter-zscale-chroma-input-override b/tests/ref/fate/filter-zscale-chroma-input-override new file mode 100644 index 0000000000..c0139fe68a --- /dev/null +++ b/tests/ref/fate/filter-zscale-chroma-input-override @@ -0,0 +1,9 @@ +#tb 0: 1/2 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 64x64 +#sar 0: 1/1 +0, 0, 0, 1, 6144, 0x42205435 +0, 1, 1, 1, 6144, 0x71c74475 +0, 2, 2, 1, 6144, 0x2bcd4c89 +0, 3, 3, 1, 6144, 0xff376234 -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
