From b2bb1cb68be2627f4873ae1203197e1fca768650 Mon Sep 17 00:00:00 2001 From: Martin Vignali Date: Sat, 17 Mar 2018 21:07: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 +++++++++++++++++++ .../fate/hapqa-extract-nosnappy-to-hapq-mov | 73 +++++++++++++++++++ .../hapqa-extract-snappy1-to-hapalphaonly | 6 ++ tests/ref/fate/hapqa-extract-snappy1-to-hapq | 6 ++ .../hapqa-extract-snappy16-to-hapalphaonly | 6 ++ tests/ref/fate/hapqa-extract-snappy16-to-hapq | 6 ++ 7 files changed, 213 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..075a602e45 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 = framecrc -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_1chunk_127x1.mov -c:v 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 = framecrc -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_16chunk_127x1.mov -c:v 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 = framecrc -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_1chunk_127x1.mov -c:v 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 = framecrc -i $(TARGET_SAMPLES)/hap/HAPQA_Snappy_16chunk_127x1.mov -c:v copy -bsf:v hapqa_extract=texture=alpha -tag:v HapA -metadata:s:v:0 encoder="HAPAlphaOnly" + + +#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 -nostdin -c:v copy -bsf:v hapqa_extract=texture=color \ + -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 -nostdin -c:v copy -bsf:v hapqa_extract=texture=alpha \ + -tag:v HapA -metadata:s:v:0 encoder="HAPAlpha Only" $(TARGET_PATH)/$@ -y 2>/dev/null + + +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 adler32 -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 adler32 -show_streams -select_streams v -v 0 $(TARGET_PATH)/tests/data/hapalphaonly_nosnappy.mov + + +FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER HAPQA_EXTRACT_BSF MOV_MUXER) += $(FATE_HAPQA_EXTRACT_BSF) +FATE_SAMPLES_FFPROBE += $(FATE_HAPQA_EXTRACT_BSF_FFPROBE) + +fate-hapqa-extract-bsf: $(FATE_HAPQA_EXTRACT_BSF) $(FATE_HAPQA_EXTRACT_BSF_FFPROBE) + + fate-hapenc%: CMD = framemd5 -f image2 -c:v pgmyuv -i $(TARGET_PATH)/tests/vsynth1/%02d.pgm -sws_flags +accurate_rnd+bitexact -vframes 5 -c:v hap ${OPTS} FATE_HAPENC += fate-hapenc-hap-none diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov new file mode 100644 index 0000000000..f5ecdd4311 --- /dev/null +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapalphaonly-mov @@ -0,0 +1,73 @@ +[PACKET] +codec_type=video +stream_index=0 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 +duration=512 +duration_time=0.040000 +convergence_duration=N/A +convergence_duration_time=N/A +size=4612 +pos=36 +flags=K_ +data_hash=adler32:ed83c166 +[/PACKET] +[STREAM] +index=0 +codec_name=hap +codec_long_name=Vidvox Hap +profile=unknown +codec_type=video +codec_time_base=1/25 +codec_tag_string=HapA +codec_tag=0x41706148 +width=127 +height=71 +coded_width=128 +coded_height=72 +has_b_frames=0 +sample_aspect_ratio=1:1 +display_aspect_ratio=127:71 +pix_fmt=gray +level=-99 +color_range=unknown +color_space=unknown +color_transfer=unknown +color_primaries=unknown +chroma_location=unspecified +field_order=unknown +timecode=N/A +refs=1 +id=N/A +r_frame_rate=25/1 +avg_frame_rate=25/1 +time_base=1/12800 +start_pts=0 +start_time=0.000000 +duration_ts=512 +duration=0.040000 +bit_rate=922400 +max_bit_rate=N/A +bits_per_raw_sample=N/A +nb_frames=1 +nb_read_frames=N/A +nb_read_packets=1 +extradata_hash=adler32:00000001 +DISPOSITION:default=1 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +TAG:language=eng +TAG:handler_name=DataHandler +TAG:encoder=HAPAlpha Only +[/STREAM] diff --git a/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov new file mode 100644 index 0000000000..c3a0a599fd --- /dev/null +++ b/tests/ref/fate/hapqa-extract-nosnappy-to-hapq-mov @@ -0,0 +1,73 @@ +[PACKET] +codec_type=video +stream_index=0 +pts=0 +pts_time=0.000000 +dts=0 +dts_time=0.000000 +duration=512 +duration_time=0.040000 +convergence_duration=N/A +convergence_duration_time=N/A +size=9220 +pos=36 +flags=K_ +data_hash=adler32:b3ccc147 +[/PACKET] +[STREAM] +index=0 +codec_name=hap +codec_long_name=Vidvox Hap +profile=unknown +codec_type=video +codec_time_base=1/25 +codec_tag_string=HapY +codec_tag=0x59706148 +width=127 +height=71 +coded_width=128 +coded_height=72 +has_b_frames=0 +sample_aspect_ratio=1:1 +display_aspect_ratio=127:71 +pix_fmt=rgb0 +level=-99 +color_range=unknown +color_space=unknown +color_transfer=unknown +color_primaries=unknown +chroma_location=unspecified +field_order=unknown +timecode=N/A +refs=1 +id=N/A +r_frame_rate=25/1 +avg_frame_rate=25/1 +time_base=1/12800 +start_pts=0 +start_time=0.000000 +duration_ts=512 +duration=0.040000 +bit_rate=1844000 +max_bit_rate=N/A +bits_per_raw_sample=N/A +nb_frames=1 +nb_read_frames=N/A +nb_read_packets=1 +extradata_hash=adler32:00000001 +DISPOSITION:default=1 +DISPOSITION:dub=0 +DISPOSITION:original=0 +DISPOSITION:comment=0 +DISPOSITION:lyrics=0 +DISPOSITION:karaoke=0 +DISPOSITION:forced=0 +DISPOSITION:hearing_impaired=0 +DISPOSITION:visual_impaired=0 +DISPOSITION:clean_effects=0 +DISPOSITION:attached_pic=0 +DISPOSITION:timed_thumbnails=0 +TAG:language=eng +TAG:handler_name=DataHandler +TAG:encoder=HAPQ +[/STREAM] diff --git a/tests/ref/fate/hapqa-extract-snappy1-to-hapalphaonly b/tests/ref/fate/hapqa-extract-snappy1-to-hapalphaonly new file mode 100644 index 0000000000..9ab123f09d --- /dev/null +++ b/tests/ref/fate/hapqa-extract-snappy1-to-hapalphaonly @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: hap +#dimensions 0: 127x71 +#sar 0: 1/1 +0, 0, 0, 1, 3044, 0xcaf6ddd0 diff --git a/tests/ref/fate/hapqa-extract-snappy1-to-hapq b/tests/ref/fate/hapqa-extract-snappy1-to-hapq new file mode 100644 index 0000000000..f658b1c0b4 --- /dev/null +++ b/tests/ref/fate/hapqa-extract-snappy1-to-hapq @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: hap +#dimensions 0: 127x71 +#sar 0: 1/1 +0, 0, 0, 1, 8217, 0x04271f0f diff --git a/tests/ref/fate/hapqa-extract-snappy16-to-hapalphaonly b/tests/ref/fate/hapqa-extract-snappy16-to-hapalphaonly new file mode 100644 index 0000000000..1bd920699a --- /dev/null +++ b/tests/ref/fate/hapqa-extract-snappy16-to-hapalphaonly @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: hap +#dimensions 0: 127x71 +#sar 0: 1/1 +0, 0, 0, 1, 3513, 0x69c7014f diff --git a/tests/ref/fate/hapqa-extract-snappy16-to-hapq b/tests/ref/fate/hapqa-extract-snappy16-to-hapq new file mode 100644 index 0000000000..8334d53d61 --- /dev/null +++ b/tests/ref/fate/hapqa-extract-snappy16-to-hapq @@ -0,0 +1,6 @@ +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: hap +#dimensions 0: 127x71 +#sar 0: 1/1 +0, 0, 0, 1, 8726, 0xf889691c