On 28/08/17 18:08, Mark Thompson wrote:
> Use the appropriate metadata filter for each codec - in the absence of any
> options to modify the stream, the output bitstream should be identical to
> the input (though the output file may differ in padding).
> 
> H.264 and H.265 tests use conformance bitstreams to attempt to cover all
> header features.  MPEG-2 just tests some synthetic bitstreams.
> ---
>  tests/Makefile                                |  1 +
>  tests/fate/cbs.mak                            | 76 
> +++++++++++++++++++++++++++
>  ...
>  tests/ref/fate/cbs-mpeg2-interlaced           |  1 +
>  tests/ref/fate/cbs-mpeg2-progressive          |  1 +
>  tests/ref/fate/cbs-mpeg2-yuv422               |  1 +
>  38 files changed, 113 insertions(+)
>  create mode 100644 tests/fate/cbs.mak
>  ...
>  create mode 100644 tests/ref/fate/cbs-mpeg2-interlaced
>  create mode 100644 tests/ref/fate/cbs-mpeg2-progressive
>  create mode 100644 tests/ref/fate/cbs-mpeg2-yuv422
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index d3f11efaa..9fec13211 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -74,6 +74,7 @@ include $(SRC_PATH)/tests/fate/audio.mak
>  include $(SRC_PATH)/tests/fate/bmp.mak
>  include $(SRC_PATH)/tests/fate/build.mak
>  include $(SRC_PATH)/tests/fate/canopus.mak
> +include $(SRC_PATH)/tests/fate/cbs.mak
>  include $(SRC_PATH)/tests/fate/cdxl.mak
>  include $(SRC_PATH)/tests/fate/checkasm.mak
>  include $(SRC_PATH)/tests/fate/cover-art.mak
> diff --git a/tests/fate/cbs.mak b/tests/fate/cbs.mak
> new file mode 100644
> index 000000000..5cd27639f
> --- /dev/null
> +++ b/tests/fate/cbs.mak
> @@ -0,0 +1,76 @@
> +# Read/write tests: this uses the codec metadata filter - with no
> +# arguments, it decomposes the stream fully and then recomposes it
> +# without making any changes.
> +
> +fate-cbs: fate-cbs-h264 fate-cbs-hevc fate-cbs-mpeg2
> +
> +define FATE_CBS_SAMPLE_TEST
> +FATE_CBS_$(1) += fate-cbs-$(1)-$(2)
> +fate-cbs-$(1)-$(2): CMD = md5 -i $(TARGET_SAMPLES)/$(3) -c:v copy -bsf:v 
> $(1)_metadata -f $(1)
> +endef
> +
> +define FATE_CBS_ENCODE_TEST
> +FATE_CBS_$(1) += fate-cbs-$(1)-$(2)
> +fate-cbs-$(1)-$(2): $(3)
> +fate-cbs-$(1)-$(2): CMD = md5 $(4) -i $(3) $(5) -c:v $(subst 
> mpeg2,mpeg2video,$(1)) -bsf:v $(1)_metadata -f $(subst mpeg2,mpeg2video,$(1))
> +endef
> +
> ...
> +
> +# MPEG-2 read/write
> +
> +$(eval $(call 
> FATE_CBS_ENCODE_TEST,mpeg2,progressive,tests/data/vsynth1.yuv,-f rawvideo -s 
> 352x288 -pix_fmt yuv420p,-qscale 10))
> +$(eval $(call 
> FATE_CBS_ENCODE_TEST,mpeg2,interlaced,tests/data/vsynth1.yuv,-f rawvideo -s 
> 352x288 -pix_fmt yuv420p,-qscale 10 -idct int -dct int -flags +ildct+ilme))
> +$(eval $(call FATE_CBS_ENCODE_TEST,mpeg2,yuv422,tests/data/vsynth1.yuv,-f 
> rawvideo -s 352x288 -pix_fmt yuv420p,-pix_fmt yuv422p -qscale 10))
> +
> +FATE_SAMPLES_AVCONV += $(FATE_CBS_mpeg2)
> +fate-cbs-mpeg2: $(FATE_CBS_mpeg2)

Oracle suggests that I need some bitexact flags for the synthetic MPEG-2 tests. 
 I think just for the encoder, but will investigate further.

- Mark
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to