[FFmpeg-devel] fate/hapqa_extract : add test for hapqa_extract bsf
James Almer
jamrial at gmail.com
Sat Mar 17 20:59:04 EET 2018
On 3/17/2018 2:54 PM, Martin Vignali wrote:
> Hello,
>
> Patch in attach add test for the bsf filter
>
> test extract color and alpha
> with the three main kind of hap frame :
> - no snappy compression
> - snappy compression and one chunk
> - snappy compression and several chunks (16 here)
>
> like the bsf filter need to be used with vtag and encoder edition
> also test the information of the target mov for color and alpha
>
>
> Tested on Mac os 10.12 on x86_64 and x86_32
>
>
> Martin
> From fbcb71c562b893650f58730f774f17db5d082dd3 Mon Sep 17 00:00:00 2001
> From: Martin Vignali <martin.vignali at gmail.com>
> Date: Sat, 17 Mar 2018 18:50:17 +0100
> Subject: [PATCH] fate/hapqa_extract : add test for hapqa_extract bsf
>
> test extract color and alpha
> with the three main kind of hap frame :
> - no snappy compression
> - snappy compression and one chunk
> - snappy compression and several chunks (16 here)
>
> like the bsf filter need to be used with vtag and encoder edition
> also test the information of the target mov for color and alpha
> ---
> tests/fate/hap.mak | 43 +++++++++++++
> .../hapqa-extract-nosnappy-to-hapalphaonly-mov | 73 ++++++++++++++++++++++
> tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov | 73 ++++++++++++++++++++++
> .../ref/fate/hapqa-extract-snappy1-to-hapalphaonly | 10 +++
> tests/ref/fate/hapqa-extract-snappy1-to-hapq | 10 +++
> .../fate/hapqa-extract-snappy16-to-hapalphaonly | 10 +++
> tests/ref/fate/hapqa-extract-snappy16-to-hapq | 10 +++
> 7 files changed, 229 insertions(+)
> create mode 100644 tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov
> create mode 100644 tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov
> create mode 100644 tests/ref/fate/hapqa-extract-snappy1-to-hapalphaonly
> create mode 100644 tests/ref/fate/hapqa-extract-snappy1-to-hapq
> create mode 100644 tests/ref/fate/hapqa-extract-snappy16-to-hapalphaonly
> create mode 100644 tests/ref/fate/hapqa-extract-snappy16-to-hapq
>
> diff --git a/tests/fate/hap.mak b/tests/fate/hap.mak
> index 51673366f2..cd2838c7ce 100644
> --- a/tests/fate/hap.mak
> +++ b/tests/fate/hap.mak
> @@ -29,6 +29,49 @@ FATE_SAMPLES_AVCONV-$(call DEMDEC, MOV, HAP) += $(FATE_HAP)
> fate-hap: $(FATE_HAP)
>
>
> +#Test bsf conversion
> +FATE_HAPQA_EXTRACT_BSF += fate-hapqa-extract-snappy1-to-hapq
> +fate-hapqa-extract-snappy1-to-hapq: CMD = framemd5 -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_1chunk_127x1.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder="HAPQ"
> +
> +FATE_HAPQA_EXTRACT_BSF += fate-hapqa-extract-snappy16-to-hapq
> +fate-hapqa-extract-snappy16-to-hapq: CMD = framemd5 -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_16chunk_127x1.mov -c copy -bsf:v hapqa_extract=texture=color -tag:v HapY -metadata:s:v:0 encoder="HAPQ"
> +
> +FATE_HAPQA_EXTRACT_BSF += fate-hapqa-extract-snappy1-to-hapalphaonly
> +fate-hapqa-extract-snappy1-to-hapalphaonly: CMD = framemd5 -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_1chunk_127x1.mov -c copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder="HAPAlphaOnly"
> +
> +FATE_HAPQA_EXTRACT_BSF += fate-hapqa-extract-snappy16-to-hapalphaonly
> +fate-hapqa-extract-snappy16-to-hapalphaonly: CMD = framemd5 -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_16chunk_127x1.mov -c copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder="HAPAlphaOnly"
> +
framecrc instead of framemd5 in all the above. It's faster.
> +
> +#Test bsf conversion and mov
> +tests/data/hapq_nosnappy.mov: TAG = GEN
> +tests/data/hapq_nosnappy.mov: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
> + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
> + -i $(TARGET_SAMPLES)/hap/HAPQA_NoSnappy_127x1.mov -c copy -bsf:v hapqa_extract=texture=color \
-c:v copy
Also add -nostdin
> + -tag:v HapY -metadata:s:v:0 encoder="HAPQ" $(TARGET_PATH)/$@ -y 2>/dev/null
> +
> +tests/data/hapalphaonly_nosnappy.mov: TAG = GEN
> +tests/data/hapalphaonly_nosnappy.mov: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
> + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
> + -i $(TARGET_SAMPLES)/hap/HAPQA_NoSnappy_127x1.mov -c copy -bsf:v hapqa_extract=texture=alpha \
> + -tag:v HapA -metadata:s:v:0 encoder="HAPAlpha Only" $(TARGET_PATH)/$@ -y 2>/dev/null
Same.
> +
> +
> +FATE_HAPQA_EXTRACT_BSF_FFPROBE += fate-hapqa-extract-nosnappy-to-hapq-mov
> +fate-hapqa-extract-nosnappy-to-hapq-mov: tests/data/hapq_nosnappy.mov
> +fate-hapqa-extract-nosnappy-to-hapq-mov: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -show_data_hash md5 -show_streams -select_streams v -v 0 $(TARGET_PATH)/tests/data/hapq_nosnappy.mov
> +
> +FATE_HAPQA_EXTRACT_BSF_FFPROBE += fate-hapqa-extract-nosnappy-to-hapalphaonly-mov
> +fate-hapqa-extract-nosnappy-to-hapalphaonly-mov: tests/data/hapalphaonly_nosnappy.mov
> +fate-hapqa-extract-nosnappy-to-hapalphaonly-mov: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_packets -show_data_hash md5 -show_streams -select_streams v -v 0 $(TARGET_PATH)/tests/data/hapalphaonly_nosnappy.mov
-show_data_hash adler32, also for speed reasons.
> +
> +
> +FATE_SAMPLES_AVCONV-$(call ALLYES, MOV_DEMUXER HAPQA_EXTRACT_BSF MOV_MUXER) += $(FATE_HAPQA_EXTRACT_BSF)
FATE_SAMPLES_FFMPEG
> +FATE_SAMPLES_FFPROBE += $(FATE_HAPQA_EXTRACT_BSF_FFPROBE)
> +
> +fate-hapqa-extract-bsf: $(FATE_HAPQA_EXTRACT_BSF) $(FATE_HAPQA_EXTRACT_BSF_FFPROBE)
> +
> +
More information about the ffmpeg-devel
mailing list