[FFmpeg-devel] [PATCH] fate: add overlay filter tests with alpha

Marton Balint cus at passwd.hu
Wed Aug 16 22:21:36 EEST 2017


On Wed, 16 Aug 2017, Michael Niedermayer wrote:

> On Wed, Aug 16, 2017 at 01:03:46AM +0200, Marton Balint wrote:
>>
>> On Wed, 16 Aug 2017, Michael Niedermayer wrote:
>>
>>> On Sun, Aug 13, 2017 at 10:00:04PM +0200, Marton Balint wrote:
>>>> Signed-off-by: Marton Balint <cus at passwd.hu>
>>>> ---
>>>> tests/fate/filter-video.mak                   | 19 +++++++++++++++++++
>>>> tests/ref/fate/filter-overlay_gbrap_gbrap     |  6 ++++++
>>>> tests/ref/fate/filter-overlay_gbrp_gbrap      |  6 ++++++
>>>> tests/ref/fate/filter-overlay_rgb_rgba        |  6 ++++++
>>>> tests/ref/fate/filter-overlay_rgba_rgba       |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuv420_yuva420  |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuv422_yuva422  |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuv444_yuva444  |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuva420_yuva420 |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuva422_yuva422 |  6 ++++++
>>>> tests/ref/fate/filter-overlay_yuva444_yuva444 |  6 ++++++
>>>> 11 files changed, 79 insertions(+)
>>>> create mode 100644 tests/ref/fate/filter-overlay_gbrap_gbrap
>>>> create mode 100644 tests/ref/fate/filter-overlay_gbrp_gbrap
>>>> create mode 100644 tests/ref/fate/filter-overlay_rgb_rgba
>>>> create mode 100644 tests/ref/fate/filter-overlay_rgba_rgba
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuv420_yuva420
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuv422_yuva422
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuv444_yuva444
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuva420_yuva420
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuva422_yuva422
>>>> create mode 100644 tests/ref/fate/filter-overlay_yuva444_yuva444
>>>
>>> fails on arm & mips qemu
>>
>> If you add -sws_flags +accurate_rnd+bitexact to the framecrc command
>> does that help?
>
> yes, the following works:

Err, the diff you sent contains hash changes as well, are those needed for 
fate to pass? Because if they do, then adding the flags does not fix 
the problem.

Thanks,
Marton

>
> diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
> index 37d3e25b1d..0d953f25f2 100644
> --- a/tests/fate/filter-video.mak
> +++ b/tests/fate/filter-video.mak
> @@ -207,7 +207,7 @@ fate-filter-overlay_yuv444: CMD = framecrc -c:v pgmyuv -i $(SRC) -filter_complex
> FATE_FILTER_OVERLAY_ALPHA += fate-filter-overlay_yuv420_yuva420  fate-filter-overlay_yuv422_yuva422  fate-filter-overlay_yuv444_yuva444  fate-filter-overlay_rgb_rgba  fate-filter-overlay_gbrp_gbrap
> FATE_FILTER_OVERLAY_ALPHA += fate-filter-overlay_yuva420_yuva420 fate-filter-overlay_yuva422_yuva422 fate-filter-overlay_yuva444_yuva444 fate-filter-overlay_rgba_rgba fate-filter-overlay_gbrap_gbrap
> $(FATE_FILTER_OVERLAY_ALPHA): SRC = $(TARGET_SAMPLES)/png1/lena-rgba.png
> -$(FATE_FILTER_OVERLAY_ALPHA): CMD = framecrc -i $(SRC) -vf $(FILTER) -frames:v 1
> +$(FATE_FILTER_OVERLAY_ALPHA): CMD = framecrc -i $(SRC) -sws_flags +accurate_rnd+bitexact -vf $(FILTER) -frames:v 1
>
> fate-filter-overlay_yuv420_yuva420:  FILTER = "format=yuva420p[over];color=black:128x128,format=yuv420p[main];[main][over]overlay=format=yuv420"
> fate-filter-overlay_yuv422_yuva422:  FILTER = "format=yuva422p[over];color=black:128x128,format=yuv422p[main];[main][over]overlay=format=yuv422"
> diff --git a/tests/ref/fate/filter-overlay_yuv420_yuva420 b/tests/ref/fate/filter-overlay_yuv420_yuva420
> index caa3442de2..ee0c82e062 100644
> --- a/tests/ref/fate/filter-overlay_yuv420_yuva420
> +++ b/tests/ref/fate/filter-overlay_yuv420_yuva420
> @@ -3,4 +3,4 @@
> #codec_id 0: rawvideo
> #dimensions 0: 128x128
> #sar 0: 1/1
> -0,          0,          0,        1,    24576, 0xedb7ef1c
> +0,          0,          0,        1,    24576, 0x1505f000
> diff --git a/tests/ref/fate/filter-overlay_yuva420_yuva420 b/tests/ref/fate/filter-overlay_yuva420_yuva420
> index ef39176b6f..a17cc5c2e5 100644
> --- a/tests/ref/fate/filter-overlay_yuva420_yuva420
> +++ b/tests/ref/fate/filter-overlay_yuva420_yuva420
> @@ -3,4 +3,4 @@
> #codec_id 0: rawvideo
> #dimensions 0: 128x128
> #sar 0: 1/1
> -0,          0,          0,        1,    40960, 0xdf75b2dc
> +0,          0,          0,        1,    40960, 0x0a1ab3c0
>
> [...]
>
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Concerning the gods, I have no means of knowing whether they exist or not
> or of what sort they may be, because of the obscurity of the subject, and
> the brevity of human life -- Protagoras
>


More information about the ffmpeg-devel mailing list