On Wed, Nov 06, 2013 at 02:54:24PM +0100, Peter B. wrote:
> Here's the new, improved version of the patch. YAY!
>
> Changes:
> - Improved the speed by reducing the sample durations to 4 frames
> - Fixed the 2pass dependency (and started learning Makefile basics)
> - Added prerequisites: Decoding requires encoding to be executed first
> - Added check for build-target, so the Makefile works with ffmpeg + avconv.
> - Added prerequisite for vsynth1.yuv being generated
>
> Feedback welcome.
>
> From 9fde43d493e6ce3216dd4ff779a8440fb647d8db Mon Sep 17 00:00:00 2001
> From: Peter B. <[email protected]>
> Date: Wed, 6 Nov 2013 14:50:53 +0100
> Subject: [PATCH] - Improved FFV1 fate test speed. - Added dependencies:
> decoding requires encoding before - Added dependency: pass2
> requires pass1 - Added dependency: vsynth1.yuv must be
> generated - Added conditionals to work with multiple
> targets (ffmpeg,avconv)
This list of changes belongs in an annotation, not in the log message.
I still prefer the original log message I suggested :)
> --- /dev/null
> +++ b/tests/fate/ffv1.mak
> @@ -0,0 +1,313 @@
> +# This Makefile checks for $(CONFIG_...) variables being set, so we can
> +# include/exclude tests accordingly:
> +ifdef CONFIG_AVCONV
> +FLAGS_FFV1_V3 = -strict experimental
> +else
> +FLAGS_FFV1_V3 =
> +endif
trailing whitespace
This ifdef is redundant, avconv is required to run these tests in the
first place.
> +DEC_SRC = $(TARGET_PATH)/tests/data/fate
> +
> +fate-ffv1-enc-%: CODEC = $(word 2, $(subst -, ,$(@)))
> +fate-ffv1-enc-%: FMT = avi
> +fate-ffv1-enc-%: SRC = tests/data/vsynth1.yuv
> +# Limit the duration of test videos to 4 frames at 25fps:
> +fate-ffv1-enc-%: DUR = 0:00:00.160
> +fate-ffv1-enc-%: CMD = enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p
> $(RAWDECOPTS)" $(SRC) $(FMT) "-t $(DUR) -c $(CODEC) $(ENCOPTS)" rawvideo "-s
> 352x288 -pix_fmt yuv420p -vsync 0 $(DECOPTS)" -keep "$(DECINOPTS)"
Just limit the number of frames directly. Ideally by cutting the samples
to 4 frames.
> +FATE_FFV1_LEVEL1 = v1-defaults \
> + v1-gray \
> + v1-rgb32 \
> + v1-yuv410p \
> + v1-yuv411p \
> + v1-yuv420p \
> + v1-yuv422p \
> + v1-yuv444p \
> + v1-bgra \
> + v1-tff \
> + v1-bff
nit: You could align the '\'.
> +# Target-specific tests:
> +ifdef CONFIG_FFMPEG
No such config here.
> +###################################################
> +# Decoding:
> +###################################################
> +# YUV (8bit)
> +fate-ffv1-dec-v1-defaults: ${CMD = framecrc -i
> $(DEC_SRC)/ffv1-enc-v1-defaults.avi} fate-ffv1-enc-v1-defaults
This works as expected?
Also, use $() syntax instead of ${}.
> +###################################################
> +# Encoding:
> +###################################################
> +# - This also iterates through slice variations (4, 12, 24, 30).
> +#
> +fate-ffv1-enc-v3-defaults: ENCOPTS = -level 3 $(FLAGS_FFV1_V3)
> +# YUV (8bit)
> +# - This also iterates through all coder/context combinations.
> +fate-ffv1-enc-v3-yuv410p: ENCOPTS = -level 3 -g 1 -coder 0 -context 0
> -slices 4 -slicecrc 0 -pix_fmt yuv410p $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv420p: ENCOPTS = -level 3 -g 1 -coder 0 -context 1
> -slices 12 -slicecrc 0 -pix_fmt yuv420p $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv422p: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt yuv422p $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv444p: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 30 -slicecrc 0 -pix_fmt yuv444p $(FLAGS_FFV1_V3)
> +# YUV (9bit)
> +fate-ffv1-enc-v3-yuv420p9: ENCOPTS = -level 3 -g 1 -coder -1 -context
> 1 -slices 24 -slicecrc 0 -pix_fmt yuv420p9 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv422p9: ENCOPTS = -level 3 -g 1 -coder 2 -context 0
> -slices 30 -slicecrc 0 -pix_fmt yuv422p9 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv444p9: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 4 -slicecrc 0 -pix_fmt yuv444p9 $(FLAGS_FFV1_V3)
> +# YUV (10bit)
> +fate-ffv1-enc-v3-yuv420p10: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 30 -slicecrc 0 -pix_fmt yuv420p10 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv422p10: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 4 -slicecrc 0 -pix_fmt yuv422p10 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv444p10: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 12 -slicecrc 0 -pix_fmt yuv444p10 $(FLAGS_FFV1_V3)
> +# YUV (16bit)
> +fate-ffv1-enc-v3-yuv420p16: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 4 -slicecrc 0 -pix_fmt yuv420p16 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv422p16: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 12 -slicecrc 0 -pix_fmt yuv422p16 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-yuv444p16: ENCOPTS = -level 3 -g 1 -coder 1 -context 1
> -slices 24 -slicecrc 0 -pix_fmt yuv444p16 $(FLAGS_FFV1_V3)
> +# Gray
> +fate-ffv1-enc-v3-gray: ENCOPTS = -level 3 -g 1 -coder 0 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gray $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-gray16: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gray16 $(FLAGS_FFV1_V3)
> +# RGB
> +fate-ffv1-enc-v3-rgb32: ENCOPTS = -level 3 -g 1 -coder 0 -context 0
> -slices 24 -slicecrc 0 -pix_fmt rgb32 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-bgr0: ENCOPTS = -level 3 -g 1 -coder 0 -context 0
> -slices 24 -slicecrc 0 -pix_fmt bgr0 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-gbrp9: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gbrp9 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-gbrp10: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gbrp10 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-gbrp12: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gbrp12 $(FLAGS_FFV1_V3)
> +fate-ffv1-enc-v3-gbrp14: ENCOPTS = -level 3 -g 1 -coder 1 -context 0
> -slices 24 -slicecrc 0 -pix_fmt gbrp14 $(FLAGS_FFV1_V3)
Some of these options could be factored out into variables.
> +# Requires generating vsynth1.yuv as input source:
> +$(FATE_FFV1-yes): tests/data/vsynth1.yuv
pointless comment
> diff --git a/tests/ref/fate/ffv1-dec-v1-bff b/tests/ref/fate/ffv1-dec-v1-bff
> new file mode 100644
> index 0000000..e69de29
> diff --git a/tests/ref/fate/ffv1-dec-v1-bgra b/tests/ref/fate/ffv1-dec-v1-bgra
> new file mode 100644
> index 0000000..e69de29
> diff --git a/tests/ref/fate/ffv1-dec-v1-defaults
> b/tests/ref/fate/ffv1-dec-v1-defaults
> new file mode 100644
> index 0000000..e69de29
Empty files?
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel