[15/20] tests: Split monolithic lavf-pixfmt test into individual tests

Message ID 20180920084729.4523-16-diego@biurrun.de
State New
Headers show
Series
  • [01/20] tests: Use more consistent names for tests
Related show

Commit Message

Diego Biurrun Sept. 20, 2018, 8:47 a.m.
---
 tests/Makefile                 |  1 +
 tests/fate-run.sh              | 18 +++++++-----------
 tests/fate/avformat.mak        |  4 ----
 tests/fate/pixfmt.mak          | 27 +++++++++++++++++++++++++++
 tests/ref/fate/pixfmt-bgr24    |  2 ++
 tests/ref/fate/pixfmt-gray     |  2 ++
 tests/ref/fate/pixfmt-monob    |  2 ++
 tests/ref/fate/pixfmt-monow    |  2 ++
 tests/ref/fate/pixfmt-rgb24    |  2 ++
 tests/ref/fate/pixfmt-rgb32    |  2 ++
 tests/ref/fate/pixfmt-rgb555   |  2 ++
 tests/ref/fate/pixfmt-rgb565   |  2 ++
 tests/ref/fate/pixfmt-yuv410p  |  2 ++
 tests/ref/fate/pixfmt-yuv411p  |  2 ++
 tests/ref/fate/pixfmt-yuv420p  |  2 ++
 tests/ref/fate/pixfmt-yuv422p  |  2 ++
 tests/ref/fate/pixfmt-yuv440p  |  2 ++
 tests/ref/fate/pixfmt-yuv444p  |  2 ++
 tests/ref/fate/pixfmt-yuvj420p |  2 ++
 tests/ref/fate/pixfmt-yuvj422p |  2 ++
 tests/ref/fate/pixfmt-yuvj440p |  2 ++
 tests/ref/fate/pixfmt-yuvj444p |  2 ++
 tests/ref/fate/pixfmt-yuyv422  |  2 ++
 tests/ref/lavf/pixfmt          | 38 --------------------------------------
 24 files changed, 73 insertions(+), 53 deletions(-)
 create mode 100644 tests/fate/pixfmt.mak
 create mode 100644 tests/ref/fate/pixfmt-bgr24
 create mode 100644 tests/ref/fate/pixfmt-gray
 create mode 100644 tests/ref/fate/pixfmt-monob
 create mode 100644 tests/ref/fate/pixfmt-monow
 create mode 100644 tests/ref/fate/pixfmt-rgb24
 create mode 100644 tests/ref/fate/pixfmt-rgb32
 create mode 100644 tests/ref/fate/pixfmt-rgb555
 create mode 100644 tests/ref/fate/pixfmt-rgb565
 create mode 100644 tests/ref/fate/pixfmt-yuv410p
 create mode 100644 tests/ref/fate/pixfmt-yuv411p
 create mode 100644 tests/ref/fate/pixfmt-yuv420p
 create mode 100644 tests/ref/fate/pixfmt-yuv422p
 create mode 100644 tests/ref/fate/pixfmt-yuv440p
 create mode 100644 tests/ref/fate/pixfmt-yuv444p
 create mode 100644 tests/ref/fate/pixfmt-yuvj420p
 create mode 100644 tests/ref/fate/pixfmt-yuvj422p
 create mode 100644 tests/ref/fate/pixfmt-yuvj440p
 create mode 100644 tests/ref/fate/pixfmt-yuvj444p
 create mode 100644 tests/ref/fate/pixfmt-yuyv422
 delete mode 100644 tests/ref/lavf/pixfmt

Comments

Luca Barbato Sept. 24, 2018, 6:29 a.m. | #1
On 20/09/2018 10:47, Diego Biurrun wrote:
> ---


YES!
Diego Biurrun Sept. 24, 2018, 9:22 a.m. | #2
On Mon, Sep 24, 2018 at 08:29:05AM +0200, Luca Barbato wrote:
> On 20/09/2018 10:47, Diego Biurrun wrote:
> > ---
> 
> YES!

:-)

This had been a thorn in my side for a loooooong time...

Diego
Sean McGovern Sept. 24, 2018, 11:16 a.m. | #3
On Thu, Sep 20, 2018, 10:47 Diego Biurrun <diego@biurrun.de> wrote:

> ---
>  tests/Makefile                 |  1 +
>  tests/fate-run.sh              | 18 +++++++-----------
>  tests/fate/avformat.mak        |  4 ----
>  tests/fate/pixfmt.mak          | 27 +++++++++++++++++++++++++++
>  tests/ref/fate/pixfmt-bgr24    |  2 ++
>  tests/ref/fate/pixfmt-gray     |  2 ++
>  tests/ref/fate/pixfmt-monob    |  2 ++
>  tests/ref/fate/pixfmt-monow    |  2 ++
>  tests/ref/fate/pixfmt-rgb24    |  2 ++
>  tests/ref/fate/pixfmt-rgb32    |  2 ++
>  tests/ref/fate/pixfmt-rgb555   |  2 ++
>  tests/ref/fate/pixfmt-rgb565   |  2 ++
>  tests/ref/fate/pixfmt-yuv410p  |  2 ++
>  tests/ref/fate/pixfmt-yuv411p  |  2 ++
>  tests/ref/fate/pixfmt-yuv420p  |  2 ++
>  tests/ref/fate/pixfmt-yuv422p  |  2 ++
>  tests/ref/fate/pixfmt-yuv440p  |  2 ++
>  tests/ref/fate/pixfmt-yuv444p  |  2 ++
>  tests/ref/fate/pixfmt-yuvj420p |  2 ++
>  tests/ref/fate/pixfmt-yuvj422p |  2 ++
>  tests/ref/fate/pixfmt-yuvj440p |  2 ++
>  tests/ref/fate/pixfmt-yuvj444p |  2 ++
>  tests/ref/fate/pixfmt-yuyv422  |  2 ++
>  tests/ref/lavf/pixfmt          | 38 --------------------------------------
>  24 files changed, 73 insertions(+), 53 deletions(-)
>  create mode 100644 tests/fate/pixfmt.mak
>  create mode 100644 tests/ref/fate/pixfmt-bgr24
>  create mode 100644 tests/ref/fate/pixfmt-gray
>  create mode 100644 tests/ref/fate/pixfmt-monob
>  create mode 100644 tests/ref/fate/pixfmt-monow
>  create mode 100644 tests/ref/fate/pixfmt-rgb24
>  create mode 100644 tests/ref/fate/pixfmt-rgb32
>  create mode 100644 tests/ref/fate/pixfmt-rgb555
>  create mode 100644 tests/ref/fate/pixfmt-rgb565
>  create mode 100644 tests/ref/fate/pixfmt-yuv410p
>  create mode 100644 tests/ref/fate/pixfmt-yuv411p
>  create mode 100644 tests/ref/fate/pixfmt-yuv420p
>  create mode 100644 tests/ref/fate/pixfmt-yuv422p
>  create mode 100644 tests/ref/fate/pixfmt-yuv440p
>  create mode 100644 tests/ref/fate/pixfmt-yuv444p
>  create mode 100644 tests/ref/fate/pixfmt-yuvj420p
>  create mode 100644 tests/ref/fate/pixfmt-yuvj422p
>  create mode 100644 tests/ref/fate/pixfmt-yuvj440p
>  create mode 100644 tests/ref/fate/pixfmt-yuvj444p
>  create mode 100644 tests/ref/fate/pixfmt-yuyv422
>  delete mode 100644 tests/ref/lavf/pixfmt
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 9fec13211f..adca8ad172 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -105,6 +105,7 @@ include $(SRC_PATH)/tests/fate/mpc.mak
>  include $(SRC_PATH)/tests/fate/mpeg4.mak
>  include $(SRC_PATH)/tests/fate/opus.mak
>  include $(SRC_PATH)/tests/fate/pcm.mak
> +include $(SRC_PATH)/tests/fate/pixfmt.mak
>  include $(SRC_PATH)/tests/fate/probe.mak
>  include $(SRC_PATH)/tests/fate/prores.mak
>  include $(SRC_PATH)/tests/fate/qt.mak
> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
> index 1da1f599c8..f8c3444e29 100755
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -220,21 +220,17 @@ lavftest(){
>      ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec"
> "$target_path" "$threads" "$thread_type" "$cpuflags"
>  }
>
> -pixfmt(){
> +pixfmt_conversion(){
>      t="${test#lavf-}"
> +    conversion="${t#pixfmt-}"
>      raw_dst="tests/data/$t.lavf.out.yuv"
>      outdir="tests/data/pixfmt"
>      mkdir -p "$outdir"
> -    conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p
> \
> -                 yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray
> monow \
> -                 monob yuv440p yuvj440p"
> -    for pix_fmt in $conversions ; do
> -        file=${outdir}/${pix_fmt}.yuv
> -        run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
> -                   $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt
> $pix_fmt $target_path/$raw_dst
> -        do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt
> $pix_fmt -i $target_path/$raw_dst \
> -                  $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
> -    done
> +    file=${outdir}/${conversion}.yuv
> +    run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
> +               $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion
> $target_path/$raw_dst
> +    do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion
> -i $target_path/$raw_dst \
> +              $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
>  }
>
>  video_filter(){
> diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
> index 59b46be54a..34292cf03c 100644
> --- a/tests/fate/avformat.mak
> +++ b/tests/fate/avformat.mak
> @@ -74,13 +74,9 @@ $(FATE_LAVF_PIPE): REF =
> $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
>  $(FATE_LAVF_PIPE): $(VREF)
>
>  FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)
> -FATE_LAVF += fate-lavf-pixfmt
>
>  $(FATE_LAVF): $(AREF) $(VREF)
>  $(FATE_LAVF): CMD = lavftest
>
> -fate-lavf-pixfmt: REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
> -fate-lavf-pixfmt: CMD = pixfmt
> -
>  FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES)
> $(FATE_LAVF_PIPE)
>  fate-lavf:     $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES)
> $(FATE_LAVF_PIPE)
> diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak
> new file mode 100644
> index 0000000000..eaa4cb01bf
> --- /dev/null
> +++ b/tests/fate/pixfmt.mak
> @@ -0,0 +1,27 @@
> +FATE_PIXFMT =           bgr24           \
> +                        gray            \
> +                        monob           \
> +                        monow           \
> +                        rgb24           \
> +                        rgb32           \
> +                        rgb555          \
> +                        rgb565          \
> +                        yuv410p         \
> +                        yuv411p         \
> +                        yuv420p         \
> +                        yuv422p         \
> +                        yuv440p         \
> +                        yuv444p         \
> +                        yuvj420p        \
> +                        yuvj422p        \
> +                        yuvj440p        \
> +                        yuvj444p        \
> +                        yuyv422         \
> +
> +FATE_PIXFMT := $(FATE_PIXFMT:%=fate-pixfmt-%)
> +
> +$(FATE_PIXFMT): CMD = pixfmt_conversion
> +$(FATE_PIXFMT): $(VREF)
> +
> +FATE_AVCONV += $(FATE_PIXFMT)
> +fate-pixfmt:   $(FATE_PIXFMT)
> diff --git a/tests/ref/fate/pixfmt-bgr24 b/tests/ref/fate/pixfmt-bgr24
> new file mode 100644
> index 0000000000..ac723db7b3
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-bgr24
> @@ -0,0 +1,2 @@
> +c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
> +304128 tests/data/pixfmt/bgr24.yuv
> diff --git a/tests/ref/fate/pixfmt-gray b/tests/ref/fate/pixfmt-gray
> new file mode 100644
> index 0000000000..bc3843897e
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-gray
> @@ -0,0 +1,2 @@
> +6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
> +304128 tests/data/pixfmt/gray.yuv
> diff --git a/tests/ref/fate/pixfmt-monob b/tests/ref/fate/pixfmt-monob
> new file mode 100644
> index 0000000000..010739a5c7
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-monob
> @@ -0,0 +1,2 @@
> +31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
> +304128 tests/data/pixfmt/monob.yuv
> diff --git a/tests/ref/fate/pixfmt-monow b/tests/ref/fate/pixfmt-monow
> new file mode 100644
> index 0000000000..1b5143ab2a
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-monow
> @@ -0,0 +1,2 @@
> +31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
> +304128 tests/data/pixfmt/monow.yuv
> diff --git a/tests/ref/fate/pixfmt-rgb24 b/tests/ref/fate/pixfmt-rgb24
> new file mode 100644
> index 0000000000..c0d0026715
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-rgb24
> @@ -0,0 +1,2 @@
> +c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
> +304128 tests/data/pixfmt/rgb24.yuv
> diff --git a/tests/ref/fate/pixfmt-rgb32 b/tests/ref/fate/pixfmt-rgb32
> new file mode 100644
> index 0000000000..b1a4ab1dd1
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-rgb32
> @@ -0,0 +1,2 @@
> +c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
> +304128 tests/data/pixfmt/rgb32.yuv
> diff --git a/tests/ref/fate/pixfmt-rgb555 b/tests/ref/fate/pixfmt-rgb555
> new file mode 100644
> index 0000000000..a22a271a98
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-rgb555
> @@ -0,0 +1,2 @@
> +c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
> +304128 tests/data/pixfmt/rgb555.yuv
> diff --git a/tests/ref/fate/pixfmt-rgb565 b/tests/ref/fate/pixfmt-rgb565
> new file mode 100644
> index 0000000000..b81bb045f0
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-rgb565
> @@ -0,0 +1,2 @@
> +66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
> +304128 tests/data/pixfmt/rgb565.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv410p b/tests/ref/fate/pixfmt-yuv410p
> new file mode 100644
> index 0000000000..0f1dcfda8c
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv410p
> @@ -0,0 +1,2 @@
> +507c7e9f0c97660385df977469ca9e6d *tests/data/pixfmt/yuv410p.yuv
> +304128 tests/data/pixfmt/yuv410p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv411p b/tests/ref/fate/pixfmt-yuv411p
> new file mode 100644
> index 0000000000..0122b68e4a
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv411p
> @@ -0,0 +1,2 @@
> +8594ea0b8d7c2c964525b0801b5351de *tests/data/pixfmt/yuv411p.yuv
> +304128 tests/data/pixfmt/yuv411p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv420p b/tests/ref/fate/pixfmt-yuv420p
> new file mode 100644
> index 0000000000..9adf81f856
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv420p
> @@ -0,0 +1,2 @@
> +5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv420p.yuv
> +304128 tests/data/pixfmt/yuv420p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv422p b/tests/ref/fate/pixfmt-yuv422p
> new file mode 100644
> index 0000000000..4240ec95a3
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv422p
> @@ -0,0 +1,2 @@
> +ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuv422p.yuv
> +304128 tests/data/pixfmt/yuv422p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv440p b/tests/ref/fate/pixfmt-yuv440p
> new file mode 100644
> index 0000000000..4e6ee4df6b
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv440p
> @@ -0,0 +1,2 @@
> +00b85790df5740bab95e2559d81603a7 *tests/data/pixfmt/yuv440p.yuv
> +304128 tests/data/pixfmt/yuv440p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuv444p b/tests/ref/fate/pixfmt-yuv444p
> new file mode 100644
> index 0000000000..85c871229a
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuv444p
> @@ -0,0 +1,2 @@
> +5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv444p.yuv
> +304128 tests/data/pixfmt/yuv444p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuvj420p
> b/tests/ref/fate/pixfmt-yuvj420p
> new file mode 100644
> index 0000000000..47a729ed45
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuvj420p
> @@ -0,0 +1,2 @@
> +e176bd14185788110e055f945de7f95f *tests/data/pixfmt/yuvj420p.yuv
> +304128 tests/data/pixfmt/yuvj420p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuvj422p
> b/tests/ref/fate/pixfmt-yuvj422p
> new file mode 100644
> index 0000000000..6ab97d59db
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuvj422p
> @@ -0,0 +1,2 @@
> +472028e46a81c98d9b2477507def4723 *tests/data/pixfmt/yuvj422p.yuv
> +304128 tests/data/pixfmt/yuvj422p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuvj440p
> b/tests/ref/fate/pixfmt-yuvj440p
> new file mode 100644
> index 0000000000..2beeae52c1
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuvj440p
> @@ -0,0 +1,2 @@
> +4d8d402c45d913038d4b725396719111 *tests/data/pixfmt/yuvj440p.yuv
> +304128 tests/data/pixfmt/yuvj440p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuvj444p
> b/tests/ref/fate/pixfmt-yuvj444p
> new file mode 100644
> index 0000000000..63fb813d4b
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuvj444p
> @@ -0,0 +1,2 @@
> +c10442da177c9f1d12be3c53be6fa12c *tests/data/pixfmt/yuvj444p.yuv
> +304128 tests/data/pixfmt/yuvj444p.yuv
> diff --git a/tests/ref/fate/pixfmt-yuyv422 b/tests/ref/fate/pixfmt-yuyv422
> new file mode 100644
> index 0000000000..0978690007
> --- /dev/null
> +++ b/tests/ref/fate/pixfmt-yuyv422
> @@ -0,0 +1,2 @@
> +ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuyv422.yuv
> +304128 tests/data/pixfmt/yuyv422.yuv
> diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt
> deleted file mode 100644
> index f13f3dfb23..0000000000
> --- a/tests/ref/lavf/pixfmt
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv420p.yuv
> -304128 tests/data/pixfmt/yuv420p.yuv
> -ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuv422p.yuv
> -304128 tests/data/pixfmt/yuv422p.yuv
> -5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv444p.yuv
> -304128 tests/data/pixfmt/yuv444p.yuv
> -ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuyv422.yuv
> -304128 tests/data/pixfmt/yuyv422.yuv
> -507c7e9f0c97660385df977469ca9e6d *tests/data/pixfmt/yuv410p.yuv
> -304128 tests/data/pixfmt/yuv410p.yuv
> -8594ea0b8d7c2c964525b0801b5351de *tests/data/pixfmt/yuv411p.yuv
> -304128 tests/data/pixfmt/yuv411p.yuv
> -e176bd14185788110e055f945de7f95f *tests/data/pixfmt/yuvj420p.yuv
> -304128 tests/data/pixfmt/yuvj420p.yuv
> -472028e46a81c98d9b2477507def4723 *tests/data/pixfmt/yuvj422p.yuv
> -304128 tests/data/pixfmt/yuvj422p.yuv
> -c10442da177c9f1d12be3c53be6fa12c *tests/data/pixfmt/yuvj444p.yuv
> -304128 tests/data/pixfmt/yuvj444p.yuv
> -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
> -304128 tests/data/pixfmt/rgb24.yuv
> -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
> -304128 tests/data/pixfmt/bgr24.yuv
> -c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
> -304128 tests/data/pixfmt/rgb32.yuv
> -66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
> -304128 tests/data/pixfmt/rgb565.yuv
> -c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
> -304128 tests/data/pixfmt/rgb555.yuv
> -6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
> -304128 tests/data/pixfmt/gray.yuv
> -31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
> -304128 tests/data/pixfmt/monow.yuv
> -31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
> -304128 tests/data/pixfmt/monob.yuv
> -00b85790df5740bab95e2559d81603a7 *tests/data/pixfmt/yuv440p.yuv
> -304128 tests/data/pixfmt/yuv440p.yuv
> -4d8d402c45d913038d4b725396719111 *tests/data/pixfmt/yuvj440p.yuv
> -304128 tests/data/pixfmt/yuvj440p.yuv
> --
> 2.11.0
>
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel



Thank you very much for completing this, Diego.

Much appreciated,

Sean McG.

>
Diego Biurrun Sept. 24, 2018, 5:18 p.m. | #4
*PLEASE* snip your quotes.

On Mon, Sep 24, 2018 at 01:16:46PM +0200, Sean McGovern wrote:
> On Thu, Sep 20, 2018, 10:47 Diego Biurrun <diego@biurrun.de> wrote:
> > [...]
> 
> Thank you very much for completing this, Diego.
> 
> Much appreciated,

You are welcome :)

Diego

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 9fec13211f..adca8ad172 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -105,6 +105,7 @@  include $(SRC_PATH)/tests/fate/mpc.mak
 include $(SRC_PATH)/tests/fate/mpeg4.mak
 include $(SRC_PATH)/tests/fate/opus.mak
 include $(SRC_PATH)/tests/fate/pcm.mak
+include $(SRC_PATH)/tests/fate/pixfmt.mak
 include $(SRC_PATH)/tests/fate/probe.mak
 include $(SRC_PATH)/tests/fate/prores.mak
 include $(SRC_PATH)/tests/fate/qt.mak
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 1da1f599c8..f8c3444e29 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -220,21 +220,17 @@  lavftest(){
     ${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
 }
 
-pixfmt(){
+pixfmt_conversion(){
     t="${test#lavf-}"
+    conversion="${t#pixfmt-}"
     raw_dst="tests/data/$t.lavf.out.yuv"
     outdir="tests/data/pixfmt"
     mkdir -p "$outdir"
-    conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
-                 yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \
-                 monob yuv440p yuvj440p"
-    for pix_fmt in $conversions ; do
-        file=${outdir}/${pix_fmt}.yuv
-        run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
-                   $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst
-        do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
-                  $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
-    done
+    file=${outdir}/${conversion}.yuv
+    run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
+               $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst
+    do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \
+              $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p
 }
 
 video_filter(){
diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index 59b46be54a..34292cf03c 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -74,13 +74,9 @@  $(FATE_LAVF_PIPE): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
 $(FATE_LAVF_PIPE): $(VREF)
 
 FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)
-FATE_LAVF += fate-lavf-pixfmt
 
 $(FATE_LAVF): $(AREF) $(VREF)
 $(FATE_LAVF): CMD = lavftest
 
-fate-lavf-pixfmt: REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
-fate-lavf-pixfmt: CMD = pixfmt
-
 FATE_AVCONV += $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE)
 fate-lavf:     $(FATE_LAVF) $(FATE_LAVF_AUDIO_ONLY) $(FATE_LAVF_IMAGES) $(FATE_LAVF_PIPE)
diff --git a/tests/fate/pixfmt.mak b/tests/fate/pixfmt.mak
new file mode 100644
index 0000000000..eaa4cb01bf
--- /dev/null
+++ b/tests/fate/pixfmt.mak
@@ -0,0 +1,27 @@ 
+FATE_PIXFMT =           bgr24           \
+                        gray            \
+                        monob           \
+                        monow           \
+                        rgb24           \
+                        rgb32           \
+                        rgb555          \
+                        rgb565          \
+                        yuv410p         \
+                        yuv411p         \
+                        yuv420p         \
+                        yuv422p         \
+                        yuv440p         \
+                        yuv444p         \
+                        yuvj420p        \
+                        yuvj422p        \
+                        yuvj440p        \
+                        yuvj444p        \
+                        yuyv422         \
+
+FATE_PIXFMT := $(FATE_PIXFMT:%=fate-pixfmt-%)
+
+$(FATE_PIXFMT): CMD = pixfmt_conversion
+$(FATE_PIXFMT): $(VREF)
+
+FATE_AVCONV += $(FATE_PIXFMT)
+fate-pixfmt:   $(FATE_PIXFMT)
diff --git a/tests/ref/fate/pixfmt-bgr24 b/tests/ref/fate/pixfmt-bgr24
new file mode 100644
index 0000000000..ac723db7b3
--- /dev/null
+++ b/tests/ref/fate/pixfmt-bgr24
@@ -0,0 +1,2 @@ 
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
+304128 tests/data/pixfmt/bgr24.yuv
diff --git a/tests/ref/fate/pixfmt-gray b/tests/ref/fate/pixfmt-gray
new file mode 100644
index 0000000000..bc3843897e
--- /dev/null
+++ b/tests/ref/fate/pixfmt-gray
@@ -0,0 +1,2 @@ 
+6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
+304128 tests/data/pixfmt/gray.yuv
diff --git a/tests/ref/fate/pixfmt-monob b/tests/ref/fate/pixfmt-monob
new file mode 100644
index 0000000000..010739a5c7
--- /dev/null
+++ b/tests/ref/fate/pixfmt-monob
@@ -0,0 +1,2 @@ 
+31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
+304128 tests/data/pixfmt/monob.yuv
diff --git a/tests/ref/fate/pixfmt-monow b/tests/ref/fate/pixfmt-monow
new file mode 100644
index 0000000000..1b5143ab2a
--- /dev/null
+++ b/tests/ref/fate/pixfmt-monow
@@ -0,0 +1,2 @@ 
+31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
+304128 tests/data/pixfmt/monow.yuv
diff --git a/tests/ref/fate/pixfmt-rgb24 b/tests/ref/fate/pixfmt-rgb24
new file mode 100644
index 0000000000..c0d0026715
--- /dev/null
+++ b/tests/ref/fate/pixfmt-rgb24
@@ -0,0 +1,2 @@ 
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
+304128 tests/data/pixfmt/rgb24.yuv
diff --git a/tests/ref/fate/pixfmt-rgb32 b/tests/ref/fate/pixfmt-rgb32
new file mode 100644
index 0000000000..b1a4ab1dd1
--- /dev/null
+++ b/tests/ref/fate/pixfmt-rgb32
@@ -0,0 +1,2 @@ 
+c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
+304128 tests/data/pixfmt/rgb32.yuv
diff --git a/tests/ref/fate/pixfmt-rgb555 b/tests/ref/fate/pixfmt-rgb555
new file mode 100644
index 0000000000..a22a271a98
--- /dev/null
+++ b/tests/ref/fate/pixfmt-rgb555
@@ -0,0 +1,2 @@ 
+c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
+304128 tests/data/pixfmt/rgb555.yuv
diff --git a/tests/ref/fate/pixfmt-rgb565 b/tests/ref/fate/pixfmt-rgb565
new file mode 100644
index 0000000000..b81bb045f0
--- /dev/null
+++ b/tests/ref/fate/pixfmt-rgb565
@@ -0,0 +1,2 @@ 
+66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
+304128 tests/data/pixfmt/rgb565.yuv
diff --git a/tests/ref/fate/pixfmt-yuv410p b/tests/ref/fate/pixfmt-yuv410p
new file mode 100644
index 0000000000..0f1dcfda8c
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv410p
@@ -0,0 +1,2 @@ 
+507c7e9f0c97660385df977469ca9e6d *tests/data/pixfmt/yuv410p.yuv
+304128 tests/data/pixfmt/yuv410p.yuv
diff --git a/tests/ref/fate/pixfmt-yuv411p b/tests/ref/fate/pixfmt-yuv411p
new file mode 100644
index 0000000000..0122b68e4a
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv411p
@@ -0,0 +1,2 @@ 
+8594ea0b8d7c2c964525b0801b5351de *tests/data/pixfmt/yuv411p.yuv
+304128 tests/data/pixfmt/yuv411p.yuv
diff --git a/tests/ref/fate/pixfmt-yuv420p b/tests/ref/fate/pixfmt-yuv420p
new file mode 100644
index 0000000000..9adf81f856
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv420p
@@ -0,0 +1,2 @@ 
+5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv420p.yuv
+304128 tests/data/pixfmt/yuv420p.yuv
diff --git a/tests/ref/fate/pixfmt-yuv422p b/tests/ref/fate/pixfmt-yuv422p
new file mode 100644
index 0000000000..4240ec95a3
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv422p
@@ -0,0 +1,2 @@ 
+ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuv422p.yuv
+304128 tests/data/pixfmt/yuv422p.yuv
diff --git a/tests/ref/fate/pixfmt-yuv440p b/tests/ref/fate/pixfmt-yuv440p
new file mode 100644
index 0000000000..4e6ee4df6b
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv440p
@@ -0,0 +1,2 @@ 
+00b85790df5740bab95e2559d81603a7 *tests/data/pixfmt/yuv440p.yuv
+304128 tests/data/pixfmt/yuv440p.yuv
diff --git a/tests/ref/fate/pixfmt-yuv444p b/tests/ref/fate/pixfmt-yuv444p
new file mode 100644
index 0000000000..85c871229a
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuv444p
@@ -0,0 +1,2 @@ 
+5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv444p.yuv
+304128 tests/data/pixfmt/yuv444p.yuv
diff --git a/tests/ref/fate/pixfmt-yuvj420p b/tests/ref/fate/pixfmt-yuvj420p
new file mode 100644
index 0000000000..47a729ed45
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuvj420p
@@ -0,0 +1,2 @@ 
+e176bd14185788110e055f945de7f95f *tests/data/pixfmt/yuvj420p.yuv
+304128 tests/data/pixfmt/yuvj420p.yuv
diff --git a/tests/ref/fate/pixfmt-yuvj422p b/tests/ref/fate/pixfmt-yuvj422p
new file mode 100644
index 0000000000..6ab97d59db
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuvj422p
@@ -0,0 +1,2 @@ 
+472028e46a81c98d9b2477507def4723 *tests/data/pixfmt/yuvj422p.yuv
+304128 tests/data/pixfmt/yuvj422p.yuv
diff --git a/tests/ref/fate/pixfmt-yuvj440p b/tests/ref/fate/pixfmt-yuvj440p
new file mode 100644
index 0000000000..2beeae52c1
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuvj440p
@@ -0,0 +1,2 @@ 
+4d8d402c45d913038d4b725396719111 *tests/data/pixfmt/yuvj440p.yuv
+304128 tests/data/pixfmt/yuvj440p.yuv
diff --git a/tests/ref/fate/pixfmt-yuvj444p b/tests/ref/fate/pixfmt-yuvj444p
new file mode 100644
index 0000000000..63fb813d4b
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuvj444p
@@ -0,0 +1,2 @@ 
+c10442da177c9f1d12be3c53be6fa12c *tests/data/pixfmt/yuvj444p.yuv
+304128 tests/data/pixfmt/yuvj444p.yuv
diff --git a/tests/ref/fate/pixfmt-yuyv422 b/tests/ref/fate/pixfmt-yuyv422
new file mode 100644
index 0000000000..0978690007
--- /dev/null
+++ b/tests/ref/fate/pixfmt-yuyv422
@@ -0,0 +1,2 @@ 
+ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuyv422.yuv
+304128 tests/data/pixfmt/yuyv422.yuv
diff --git a/tests/ref/lavf/pixfmt b/tests/ref/lavf/pixfmt
deleted file mode 100644
index f13f3dfb23..0000000000
--- a/tests/ref/lavf/pixfmt
+++ /dev/null
@@ -1,38 +0,0 @@ 
-5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv420p.yuv
-304128 tests/data/pixfmt/yuv420p.yuv
-ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuv422p.yuv
-304128 tests/data/pixfmt/yuv422p.yuv
-5641dba168ff665af1cdb4a91e1afdd6 *tests/data/pixfmt/yuv444p.yuv
-304128 tests/data/pixfmt/yuv444p.yuv
-ac68f9fdd9d55efd0306d9b004038761 *tests/data/pixfmt/yuyv422.yuv
-304128 tests/data/pixfmt/yuyv422.yuv
-507c7e9f0c97660385df977469ca9e6d *tests/data/pixfmt/yuv410p.yuv
-304128 tests/data/pixfmt/yuv410p.yuv
-8594ea0b8d7c2c964525b0801b5351de *tests/data/pixfmt/yuv411p.yuv
-304128 tests/data/pixfmt/yuv411p.yuv
-e176bd14185788110e055f945de7f95f *tests/data/pixfmt/yuvj420p.yuv
-304128 tests/data/pixfmt/yuvj420p.yuv
-472028e46a81c98d9b2477507def4723 *tests/data/pixfmt/yuvj422p.yuv
-304128 tests/data/pixfmt/yuvj422p.yuv
-c10442da177c9f1d12be3c53be6fa12c *tests/data/pixfmt/yuvj444p.yuv
-304128 tests/data/pixfmt/yuvj444p.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb24.yuv
-304128 tests/data/pixfmt/rgb24.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/bgr24.yuv
-304128 tests/data/pixfmt/bgr24.yuv
-c6e0f9b5817f484b175c1ec4ffb4e9c9 *tests/data/pixfmt/rgb32.yuv
-304128 tests/data/pixfmt/rgb32.yuv
-66d39d464bd89ded2a124897f0a75ade *tests/data/pixfmt/rgb565.yuv
-304128 tests/data/pixfmt/rgb565.yuv
-c894c3bd8d2631ed1964500b90a0c350 *tests/data/pixfmt/rgb555.yuv
-304128 tests/data/pixfmt/rgb555.yuv
-6be306b0cce5f8e6c271ea17fef9745b *tests/data/pixfmt/gray.yuv
-304128 tests/data/pixfmt/gray.yuv
-31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monow.yuv
-304128 tests/data/pixfmt/monow.yuv
-31398104d2349dd48328a6862bc6711f *tests/data/pixfmt/monob.yuv
-304128 tests/data/pixfmt/monob.yuv
-00b85790df5740bab95e2559d81603a7 *tests/data/pixfmt/yuv440p.yuv
-304128 tests/data/pixfmt/yuv440p.yuv
-4d8d402c45d913038d4b725396719111 *tests/data/pixfmt/yuvj440p.yuv
-304128 tests/data/pixfmt/yuvj440p.yuv