Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 5/5] tests: add coverage for libavfilter's format negotiation
Date: Thu, 3 Mar 2022 19:22:50 +0100
Message-ID: <CAPYw7P5dEbwFEBFmzJmzR-pe9EXnNOOWK97Ky4WfsAYb_WW1eA@mail.gmail.com> (raw)
In-Reply-To: <20220302184023.285022-5-george@nsup.org>

On 3/2/22, Nicolas George <george@nsup.org> wrote:
> Signed-off-by: Nicolas George <george@nsup.org>
> ---
>  tests/Makefile                               |  1 +
>  tests/fate-run.sh                            |  4 ++++
>  tests/fate/libavfilter.mak                   |  9 +++++++++
>  tests/ref/fate/libavfilter-negotiation-alpha | 20 ++++++++++++++++++++
>  4 files changed, 34 insertions(+)
>  create mode 100644 tests/fate/libavfilter.mak
>  create mode 100644 tests/ref/fate/libavfilter-negotiation-alpha
>
>
> This is not to be the only test, I intend to cover all the logic in
> pick_format() and the logic in swap_*().
>
> But I would rather have you have a quick look at the makefile hackery
> before writing too many tests that would need changing.
>
>
> diff --git a/tests/Makefile b/tests/Makefile
> index c4c31ae871..2bff4b339d 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -157,6 +157,7 @@ include $(SRC_PATH)/tests/fate/imf.mak
>  include $(SRC_PATH)/tests/fate/indeo.mak
>  include $(SRC_PATH)/tests/fate/libavcodec.mak
>  include $(SRC_PATH)/tests/fate/libavdevice.mak
> +include $(SRC_PATH)/tests/fate/libavfilter.mak
>  include $(SRC_PATH)/tests/fate/libavformat.mak
>  include $(SRC_PATH)/tests/fate/libavutil.mak
>  include $(SRC_PATH)/tests/fate/libswresample.mak
> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
> index fbfc0a925d..82d40f5ebc 100755
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -509,6 +509,10 @@ venc_data(){
>      run tools/venc_data_dump${EXECSUF} ${file} ${stream} ${frames}
> ${threads} ${thread_type}
>  }
>
> +lavfi_dump(){
> +    run ffmpeg${PROGSUF}${EXECSUF} -lavfi_dump -lavfi "$@" -f null -
> +}
> +
>  null(){
>      :
>  }
> diff --git a/tests/fate/libavfilter.mak b/tests/fate/libavfilter.mak
> new file mode 100644
> index 0000000000..692f1d4960
> --- /dev/null
> +++ b/tests/fate/libavfilter.mak
> @@ -0,0 +1,9 @@
> +# avfiltergraph.c : pick_format() : video / don't lose alpha
> +FATE_LIBAVFILTER_NEGOTIATION_VIDEO += fate-libavfilter-negotiation-alpha
> +fate-libavfilter-negotiation-alpha: CMD = lavfi_dump
> testsrc2=d=0,format=rgba,scale,format=yuv444p/yuva444p
> +
> +FATE_LIBAVFILTER-$(call ALLYES, TESTSRC2_FILTER FORMAT_FILTER SCALE_FILTER)
> += $(FATE_LIBAVFILTER_NEGOTIATION_VIDEO)
> +
> +fate-libavfilter: $(FATE_LIBAVFILTER) $(FATE_LIBAVFILTER-yes)
> +fate-libavfilter-negotiation: $(FATE_LIBAVFILTER_NEGOTIATION)
> $(FATE_LIBAVFILTER_NEGOTIATION-yes)
> +FATE_FFMPEG += $(FATE_LIBAVFILTER-yes)
> diff --git a/tests/ref/fate/libavfilter-negotiation-alpha
> b/tests/ref/fate/libavfilter-negotiation-alpha
> new file mode 100644
> index 0000000000..00175f65cb
> --- /dev/null
> +++ b/tests/ref/fate/libavfilter-negotiation-alpha
> @@ -0,0 +1,20 @@
> +Dump of complex filter graph #0:
> +
> +Filter: Parsed_testsrc2_0 (testsrc2)
> +  out 0: default → Parsed_format_1.0:default [320x240 1:1 rgba]
> +
> +Filter: Parsed_format_1 (format)
> +  in 0: default ← Parsed_testsrc2_0.0:default [320x240 1:1 rgba]
> +  out 0: default → Parsed_scale_2.0:default [320x240 1:1 rgba]
> +
> +Filter: Parsed_scale_2 (scale)
> +  in 0: default ← Parsed_format_1.0:default [320x240 1:1 rgba]
> +  out 0: default → Parsed_format_3.0:default [320x240 1:1 yuva444p]
> +
> +Filter: Parsed_format_3 (format)
> +  in 0: default ← Parsed_scale_2.0:default [320x240 1:1 yuva444p]
> +  out 0: default → out_0_0.0:default [320x240 1:1 yuva444p]
> +
> +Filter: out_0_0 (buffersink)
> +  in 0: default ← Parsed_format_3.0:default [320x240 1:1 yuva444p]
> +
> --
> 2.34.1
>


Changes in this set seems logical and useful.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2022-03-03 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 18:40 [FFmpeg-devel] [PATCH 1/5] lavfi/graphdump: add plain listing output Nicolas George
2022-03-02 18:40 ` [FFmpeg-devel] [PATCH 2/5] fftools: add -lavfi_dump option Nicolas George
2022-03-02 18:40 ` [FFmpeg-devel] [PATCH 3/5] lavfi/(a)format: factor finding the delimiter Nicolas George
2022-03-02 18:40 ` [FFmpeg-devel] [PATCH 4/5] lavfi/(a)format: support slash as a delimiter Nicolas George
2022-03-02 18:40 ` [FFmpeg-devel] [PATCH 5/5] tests: add coverage for libavfilter's format negotiation Nicolas George
2022-03-03 18:22   ` Paul B Mahol [this message]
2022-03-03 18:31   ` James Almer
2022-03-03 18:37     ` Nicolas George
2022-03-04  1:45 ` [FFmpeg-devel] [PATCH 1/5] lavfi/graphdump: add plain listing output Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPYw7P5dEbwFEBFmzJmzR-pe9EXnNOOWK97Ky4WfsAYb_WW1eA@mail.gmail.com \
    --to=onemda@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git