mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 21:20:41 +00:00
Fix TARGET_SAMPLES and TARGET_PATH for some fate tests.
This allows running more fate tests on remote targets without the source tree.
This commit is contained in:
parent
aa1f38015c
commit
bb97bcec6b
@ -177,7 +177,7 @@ fate:: $(FATE)
|
||||
|
||||
$(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
||||
@echo "TEST $(@:fate-%=%)"
|
||||
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)'
|
||||
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)'
|
||||
|
||||
fate-list:
|
||||
@printf '%s\n' $(sort $(FATE))
|
||||
|
@ -8,7 +8,7 @@ base=$(dirname $0)
|
||||
base64=tests/base64
|
||||
|
||||
test="${1#fate-}"
|
||||
samples=$2
|
||||
target_samples=$2
|
||||
target_exec=$3
|
||||
target_path=$4
|
||||
command=$5
|
||||
@ -153,13 +153,13 @@ enc_dec(){
|
||||
lavffatetest(){
|
||||
t="${test#lavf-fate-}"
|
||||
ref=${base}/ref/lavf-fate/$t
|
||||
${base}/lavf-regression.sh $t lavf-fate tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$samples"
|
||||
${base}/lavf-regression.sh $t lavf-fate tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$target_samples"
|
||||
}
|
||||
|
||||
lavftest(){
|
||||
t="${test#lavf-}"
|
||||
ref=${base}/ref/lavf/$t
|
||||
${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$samples"
|
||||
${base}/lavf-regression.sh $t lavf tests/vsynth1 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags" "$target_samples"
|
||||
}
|
||||
|
||||
video_filter(){
|
||||
|
@ -31,18 +31,18 @@ fate-force_key_frames: CMD = enc_dec \
|
||||
FATE_SAMPLES_FFMPEG-$(call ALLYES, VOBSUB_DEMUXER DVDSUB_DECODER AVFILTER OVERLAY_FILTER DVDSUB_ENCODER) += fate-sub2video
|
||||
fate-sub2video: tests/data/vsynth2.yuv
|
||||
fate-sub2video: CMD = framecrc \
|
||||
-f rawvideo -r 5 -s 352x288 -pix_fmt yuv420p -i tests/data/vsynth2.yuv \
|
||||
-ss 132 -i $(SAMPLES)/sub/vobsub.idx \
|
||||
-filter_complex "sws_flags=+accurate_rnd+bitexact;[0:0]scale=720:480[v];[v][1:0]overlay[v2]" \
|
||||
-f rawvideo -r 5 -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth2.yuv \
|
||||
-ss 132 -i $(TARGET_SAMPLES)/sub/vobsub.idx \
|
||||
-filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:0]scale=720:480[v]\;[v][1:0]overlay[v2]" \
|
||||
-map "[v2]" -c:v rawvideo -map 1:s -c:s dvdsub
|
||||
|
||||
FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER PCM_S16LE_MUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER) += fate-unknown_layout-pcm
|
||||
fate-unknown_layout-pcm: $(AREF)
|
||||
fate-unknown_layout-pcm: CMD = md5 \
|
||||
-guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(AREF) -f s16le
|
||||
-guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) -f s16le
|
||||
|
||||
FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER AC3_MUXER PCM_S16LE_DECODER AC3_FIXED_ENCODER) += fate-unknown_layout-ac3
|
||||
fate-unknown_layout-ac3: $(AREF)
|
||||
fate-unknown_layout-ac3: CMD = md5 \
|
||||
-guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(AREF) \
|
||||
-guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) \
|
||||
-f ac3 -flags +bitexact -c ac3_fixed
|
||||
|
@ -31,7 +31,7 @@ fate-filter-asyncts: CMP = oneoff
|
||||
fate-filter-asyncts: REF = $(SAMPLES)/nellymoser/nellymoser-discont-async-v3.pcm
|
||||
|
||||
FATE_FILTER-$(CONFIG_ARESAMPLE_FILTER) += fate-filter-aresample
|
||||
fate-filter-aresample: SRC = $(SAMPLES)/nellymoser/nellymoser-discont.flv
|
||||
fate-filter-aresample: SRC = $(TARGET_SAMPLES)/nellymoser/nellymoser-discont.flv
|
||||
fate-filter-aresample: CMD = pcm -analyzeduration 10000000 -i $(SRC) -af aresample=min_comp=0.001:min_hard_comp=0.1:first_pts=0
|
||||
fate-filter-aresample: CMP = oneoff
|
||||
fate-filter-aresample: REF = $(SAMPLES)/nellymoser/nellymoser-discont.pcm
|
||||
|
@ -336,17 +336,17 @@ FILTER_METADATA_COMMAND = ffprobe$(EXESUF) -of compact=p=0 -show_entries frame=p
|
||||
SCENEDETECT_DEPS = FFPROBE LAVFI_INDEV MOVIE_FILTER SELECT_FILTER SCALE_FILTER \
|
||||
AVCODEC AVDEVICE MOV_DEMUXER SVQ3_DECODER ZLIB
|
||||
FATE_METADATA_FILTER-$(call ALLYES, $(SCENEDETECT_DEPS)) += fate-filter-metadata-scenedetect
|
||||
fate-filter-metadata-scenedetect: SRC = $(SAMPLES)/svq3/Vertical400kbit.sorenson3.mov
|
||||
fate-filter-metadata-scenedetect: SRC = $(TARGET_SAMPLES)/svq3/Vertical400kbit.sorenson3.mov
|
||||
fate-filter-metadata-scenedetect: CMD = run $(FILTER_METADATA_COMMAND) "sws_flags=+accurate_rnd+bitexact;movie='$(SRC)',select=gt(scene\,.4)"
|
||||
|
||||
SILENCEDETECT_DEPS = FFPROBE AVDEVICE LAVFI_INDEV AMOVIE_FILTER AMR_DEMUXER AMRWB_DECODER SILENCEDETECT_FILTER
|
||||
FATE_METADATA_FILTER-$(call ALLYES, $(SILENCEDETECT_DEPS)) += fate-filter-metadata-silencedetect
|
||||
fate-filter-metadata-silencedetect: SRC = $(SAMPLES)/amrwb/seed-12k65.awb
|
||||
fate-filter-metadata-silencedetect: SRC = $(TARGET_SAMPLES)/amrwb/seed-12k65.awb
|
||||
fate-filter-metadata-silencedetect: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',silencedetect=d=-20dB"
|
||||
|
||||
EBUR128_METADATA_DEPS = FFPROBE AVDEVICE LAVFI_INDEV AMOVIE_FILTER FLAC_DEMUXER FLAC_DECODER EBUR128_FILTER
|
||||
FATE_METADATA_FILTER-$(call ALLYES, $(EBUR128_METADATA_DEPS)) += fate-filter-metadata-ebur128
|
||||
fate-filter-metadata-ebur128: SRC = $(SAMPLES)/filter/seq-3341-7_seq-3342-5-24bit.flac
|
||||
fate-filter-metadata-ebur128: SRC = $(TARGET_SAMPLES)/filter/seq-3341-7_seq-3342-5-24bit.flac
|
||||
fate-filter-metadata-ebur128: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',ebur128=metadata=1"
|
||||
|
||||
FATE_SAMPLES_FFPROBE += $(FATE_METADATA_FILTER-yes)
|
||||
|
@ -12,7 +12,7 @@ fate-gif-gray: CMD = framecrc -i $(TARGET_SAMPLES)/gif/Newtons_cradle_animation_
|
||||
|
||||
fate-gifenc%: fate-gif-color
|
||||
fate-gifenc%: PIXFMT = $(word 3, $(subst -, ,$(@)))
|
||||
fate-gifenc%: SRC = $(SAMPLES)/gif/tc217.gif
|
||||
fate-gifenc%: SRC = $(TARGET_SAMPLES)/gif/tc217.gif
|
||||
fate-gifenc%: CMD = framecrc -i $(SRC) -c:v gif -pix_fmt $(PIXFMT)
|
||||
|
||||
FATE_GIF_ENC_PIXFMT = rgb8 bgr8 rgb4_byte bgr4_byte gray pal8
|
||||
|
@ -16,7 +16,7 @@ ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
|
||||
do_lavf_fate()
|
||||
{
|
||||
file=${outfile}lavf.$1
|
||||
input="${samples}/$2"
|
||||
input="${target_samples}/$2"
|
||||
do_avconv $file $DEC_OPTS -i "$input" $ENC_OPTS -vcodec copy -acodec copy
|
||||
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ target_exec=$4
|
||||
target_path=$5
|
||||
threads=${6:-1}
|
||||
cpuflags=${8:-all}
|
||||
samples=$9
|
||||
target_samples=$9
|
||||
|
||||
datadir="./tests/data"
|
||||
target_datadir="${target_path}/${datadir}"
|
||||
|
Loading…
Reference in New Issue
Block a user