May require exporting in the shell var PROGSUF when invoking a shell script. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>tags/n3.0
@@ -7,9 +7,12 @@ AREF = tests/data/asynth1.sw | |||
FATEW = 34 | |||
FATEH = 34 | |||
FFMPEG=ffmpeg$(PROGSSUF)$(EXESUF) | |||
$(AREF): CMP= | |||
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw | |||
ffservertest: export PROGSUF = $(PROGSSUF) | |||
ffservertest: ffserver$(PROGSSUF)$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw | |||
@echo | |||
@echo "Unfortunately ffserver is broken and therefore its regression" | |||
@echo "test fails randomly. Treat the results accordingly." | |||
@@ -44,7 +47,7 @@ tests/test_copy.ffmeta: TAG = COPY | |||
tests/test_copy.ffmeta: tests/data | |||
$(M)cp -f $(SRC_PATH)/tests/test.ffmeta tests/test_copy.ffmeta | |||
tests/data/ffprobe-test.nut: ffmpeg$(EXESUF) tests/test_copy.ffmeta | |||
tests/data/ffprobe-test.nut: ffmpeg$(PROGSSUF)$(EXESUF) tests/test_copy.ffmeta | |||
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ | |||
-f lavfi -i "aevalsrc=sin(400*PI*2*t):d=0.125[out0]; testsrc=d=0.125[out1]; testsrc=s=100x100:d=0.125[out2]" \ | |||
-f ffmetadata -i $(TARGET_PATH)/tests/test_copy.ffmeta \ | |||
@@ -177,9 +180,9 @@ FATE += $(FATE-yes) | |||
RSYNC_OPTIONS-$(HAVE_RSYNC_CONTIMEOUT) += --contimeout=60 | |||
RSYNC_OPTIONS = -vrltLW --timeout=60 $(RSYNC_OPTIONS-yes) | |||
$(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF) | |||
$(FATE_FFMPEG) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(PROGSSUF)$(EXESUF) | |||
$(FATE_FFPROBE) $(FATE_SAMPLES_FFPROBE): ffprobe$(EXESUF) | |||
$(FATE_FFPROBE) $(FATE_SAMPLES_FFPROBE): ffprobe$(PROGSSUF)$(EXESUF) | |||
ifdef SAMPLES | |||
FATE += $(FATE_FULL) $(FATE_FULL-yes) | |||
@@ -201,6 +204,7 @@ TOOL = ffmpeg | |||
fate:: $(FATE) | |||
$(FATE) $(FATE_TESTS-no): export PROGSUF = $(PROGSSUF) | |||
$(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | |||
@echo "TEST $(@:fate-%=%)" | |||
$(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)' '$(HWACCEL)' | |||
@@ -226,7 +230,7 @@ lcov-reset: | |||
clean:: testclean | |||
testclean:: | |||
$(RM) -r tests/vsynth1 tests/data tools/lavfi-showfiltfmts$(EXESUF) | |||
$(RM) -r tests/vsynth1 tests/data tools/lavfi-showfiltfmts$(PROGSSUF)$(EXESUF) | |||
$(RM) $(CLEANSUFFIXES:%=tests/%) | |||
$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF)) | |||
$(RM) tests/pixfmts.mak tests/test_copy.ffmeta | |||
@@ -84,7 +84,7 @@ runecho(){ | |||
} | |||
probefmt(){ | |||
run ffprobe -show_entries format=format_name -print_format default=nw=1:nk=1 -v 0 "$@" | |||
run ffprobe${PROGSUF} -show_entries format=format_name -print_format default=nw=1:nk=1 -v 0 "$@" | |||
} | |||
runlocal(){ | |||
@@ -93,7 +93,7 @@ runlocal(){ | |||
} | |||
probeframes(){ | |||
run ffprobe -show_frames -v 0 "$@" | |||
run ffprobe${PROGSUF} -show_frames -v 0 "$@" | |||
} | |||
ffmpeg(){ | |||
@@ -103,33 +103,33 @@ ffmpeg(){ | |||
[ x${arg} = x-i ] && ffmpeg_args="${ffmpeg_args} ${dec_opts}" | |||
ffmpeg_args="${ffmpeg_args} ${arg}" | |||
done | |||
run ffmpeg ${ffmpeg_args} | |||
run ./ffmpeg${PROGSUF} ${ffmpeg_args} | |||
} | |||
framecrc(){ | |||
ffmpeg "$@" -flags +bitexact -fflags +bitexact -f framecrc - | |||
./ffmpeg${PROGSUF} "$@" -flags +bitexact -fflags +bitexact -f framecrc - | |||
} | |||
framemd5(){ | |||
ffmpeg "$@" -flags +bitexact -fflags +bitexact -f framemd5 - | |||
./ffmpeg${PROGSUF} "$@" -flags +bitexact -fflags +bitexact -f framemd5 - | |||
} | |||
crc(){ | |||
ffmpeg "$@" -f crc - | |||
./ffmpeg${PROGSUF} "$@" -f crc - | |||
} | |||
md5(){ | |||
ffmpeg "$@" md5: | |||
./ffmpeg${PROGSUF} "$@" md5: | |||
} | |||
pcm(){ | |||
ffmpeg "$@" -vn -f s16le - | |||
./ffmpeg${PROGSUF} "$@" -vn -f s16le - | |||
} | |||
fmtstdout(){ | |||
fmt=$1 | |||
shift 1 | |||
ffmpeg -flags +bitexact -fflags +bitexact "$@" -f $fmt - | |||
./ffmpeg${PROGSUF} -flags +bitexact -fflags +bitexact "$@" -f $fmt - | |||
} | |||
enc_dec_pcm(){ | |||
@@ -141,8 +141,8 @@ enc_dec_pcm(){ | |||
encfile="${outdir}/${test}.${out_fmt}" | |||
cleanfiles=$encfile | |||
encfile=$(target_path ${encfile}) | |||
ffmpeg -i $src_file "$@" -f $out_fmt -y ${encfile} || return | |||
ffmpeg -flags +bitexact -fflags +bitexact -i ${encfile} -c:a pcm_${pcm_fmt} -fflags +bitexact -f ${dec_fmt} - | |||
./ffmpeg${PROGSUF} -i $src_file "$@" -f $out_fmt -y ${encfile} || return | |||
./ffmpeg${PROGSUF} -flags +bitexact -fflags +bitexact -i ${encfile} -c:a pcm_${pcm_fmt} -fflags +bitexact -f ${dec_fmt} - | |||
} | |||
FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact" | |||
@@ -163,11 +163,11 @@ enc_dec(){ | |||
tsrcfile=$(target_path $srcfile) | |||
tencfile=$(target_path $encfile) | |||
tdecfile=$(target_path $decfile) | |||
ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \ | |||
./ffmpeg${PROGSUF} -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \ | |||
-f $enc_fmt -y $tencfile || return | |||
do_md5sum $encfile | |||
echo $(wc -c $encfile) | |||
ffmpeg $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ | |||
./ffmpeg${PROGSUF} $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ | |||
-f $dec_fmt -y $tdecfile || return | |||
do_md5sum $decfile | |||
tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift | |||
@@ -191,7 +191,7 @@ video_filter(){ | |||
label=${test#filter-} | |||
raw_src="${target_path}/tests/vsynth1/%02d.pgm" | |||
printf '%-20s' $label | |||
ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ | |||
./ffmpeg${PROGSUF} $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ | |||
$FLAGS $ENC_OPTS -vf "$filters" -vcodec rawvideo -frames:v 5 $* -f nut md5: | |||
} | |||
@@ -236,16 +236,16 @@ gapless(){ | |||
cleanfiles="$cleanfiles $decfile1 $decfile2 $decfile3" | |||
# test packet data | |||
ffmpeg $extra_args -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile1 | |||
./ffmpeg${PROGSUF} $extra_args -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile1 | |||
do_md5sum $decfile1 | |||
# test decoded (and cut) data | |||
ffmpeg $extra_args -i "$sample" -flags +bitexact -fflags +bitexact -f wav md5: | |||
./ffmpeg${PROGSUF} $extra_args -i "$sample" -flags +bitexact -fflags +bitexact -f wav md5: | |||
# the same as above again, with seeking to the start | |||
ffmpeg $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile2 | |||
./ffmpeg${PROGSUF} $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile2 | |||
do_md5sum $decfile2 | |||
ffmpeg $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -f wav md5: | |||
./ffmpeg${PROGSUF} $extra_args -ss 0 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -f wav md5: | |||
# test packet data, with seeking to a specific position | |||
ffmpeg $extra_args -ss 5 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile3 | |||
./ffmpeg${PROGSUF} $extra_args -ss 5 -seek_timestamp 1 -i "$sample" -flags +bitexact -fflags +bitexact -c:a copy -f framecrc -y $decfile3 | |||
do_md5sum $decfile3 | |||
} | |||
@@ -1,5 +1,5 @@ | |||
FFPROBE_TEST_FILE=tests/data/ffprobe-test.nut | |||
FFPROBE_COMMAND=ffprobe$(EXESUF) -show_streams -show_packets -show_format -show_frames -bitexact $(FFPROBE_TEST_FILE) | |||
FFPROBE_COMMAND=ffprobe$(PROGSSUF)$(EXESUF) -show_streams -show_packets -show_format -show_frames -bitexact $(FFPROBE_TEST_FILE) | |||
FATE_FFPROBE-$(CONFIG_AVDEVICE) += fate-ffprobe_compact | |||
fate-ffprobe_compact: $(FFPROBE_TEST_FILE) | |||
@@ -484,7 +484,7 @@ fate-filter-tile: CMD = video_filter "tile=3x3:nb_frames=5:padding=7:margin=2" | |||
tests/pixfmts.mak: TAG = GEN | |||
tests/pixfmts.mak: ffmpeg$(EXESUF) | |||
tests/pixfmts.mak: ffmpeg$(PROGSSUF)$(EXESUF) | |||
$(M)printf "PIXFMTS = " > $@ | |||
$(Q)$(TARGET_EXEC) $(TARGET_PATH)/$< -pix_fmts list 2> /dev/null | awk 'NR > 8 && /^IO/ { printf $$2 " " }' >> $@ | |||
$(Q)printf "\n" >> $@ | |||
@@ -579,7 +579,7 @@ FATE_AVCONV-$(call DEMDEC, IMAGE2, PGMYUV) += $(FATE_FILTER_VSYNTH-yes) | |||
# | |||
# Metadata tests | |||
# | |||
FILTER_METADATA_COMMAND = ffprobe$(EXESUF) -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi | |||
FILTER_METADATA_COMMAND = ffprobe$(PROGSSUF)$(EXESUF) -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi | |||
SCENEDETECT_DEPS = FFPROBE LAVFI_INDEV MOVIE_FILTER SELECT_FILTER SCALE_FILTER \ | |||
AVCODEC AVDEVICE MOV_DEMUXER SVQ3_DECODER ZLIB | |||
@@ -15,6 +15,6 @@ FATE_PROBE_FORMAT = $(FATE_PROBE_FORMAT-yes) | |||
FATE_EXTERN-$(CONFIG_FFPROBE) += $(FATE_PROBE_FORMAT) | |||
fate-probe-format: $(FATE_PROBE_FORMAT) | |||
$(FATE_PROBE_FORMAT): ffprobe$(EXESUF) | |||
$(FATE_PROBE_FORMAT): ffprobe$(PROGSSUF)$(EXESUF) | |||
$(FATE_PROBE_FORMAT): CMP = oneline | |||
fate-probe-format-%: CMD = probefmt $(TARGET_SAMPLES)/probe-format/$(@:fate-probe-format-%=%) |
@@ -32,19 +32,19 @@ FATE_VP8-$(call DEMDEC, FLV, VP8) += fate-vp8-alpha | |||
fate-vp8-alpha: CMD = framecrc -i $(TARGET_SAMPLES)/vp8_alpha/vp8_video_with_alpha.webm -vcodec copy | |||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest | |||
fate-webm-dash-manifest: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video2.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio2.webm -c copy -map 0 -map 1 -map 2 -map 3 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" - | |||
fate-webm-dash-manifest: CMD = run $(FFMPEG) -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video2.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio2.webm -c copy -map 0 -map 1 -map 2 -map 3 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1 id=1,streams=2,3" - | |||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-unaligned-video-streams | |||
fate-webm-dash-manifest-unaligned-video-streams: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video3.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
fate-webm-dash-manifest-unaligned-video-streams: CMD = run $(FFMPEG) -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video3.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-unaligned-audio-streams | |||
fate-webm-dash-manifest-unaligned-audio-streams: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio3.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
fate-webm-dash-manifest-unaligned-audio-streams: CMD = run $(FFMPEG) -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_audio3.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-representations | |||
fate-webm-dash-manifest-representations: CMD = run ffmpeg -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video4.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
fate-webm-dash-manifest-representations: CMD = run $(FFMPEG) -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video1.webm -f webm_dash_manifest -i $(TARGET_SAMPLES)/vp8/dash_video4.webm -c copy -map 0 -map 1 -f webm_dash_manifest -adaptation_sets "id=0,streams=0,1" - | |||
FATE_VP8-$(call DEMDEC, WEBM_DASH_MANIFEST, VP8) += fate-webm-dash-manifest-live | |||
fate-webm-dash-manifest-live: CMD = run ffmpeg -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 -debug_mode 1 - | |||
fate-webm-dash-manifest-live: CMD = run $(FFMPEG) -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_video_360.hdr -f webm_dash_manifest -live 1 -i $(TARGET_SAMPLES)/vp8/dash_live_audio_171.hdr -c copy -map 0 -map 1 -f webm_dash_manifest -live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" -chunk_start_index 1 -chunk_duration_ms 5000 -time_shift_buffer_depth 7200 -minimum_update_period 60 -debug_mode 1 - | |||
FATE_SAMPLES_AVCONV += $(FATE_VP6-yes) | |||
fate-vp6: $(FATE_VP6-yes) | |||
@@ -8,7 +8,7 @@ | |||
FILES=$(sed -n 's/^[^#]*<Stream \(.*\)>.*/\1/p' $2 | grep -v html) | |||
rm -f tests/feed1.ffm | |||
./ffserver -d -f "$2" 2> /dev/null & | |||
./ffserver${PROGSUF} -d -f "$2" 2> /dev/null & | |||
FFSERVER_PID=$! | |||
echo "Waiting for feeds to startup..." | |||
sleep 2 | |||
@@ -19,8 +19,8 @@ target_datadir="${target_path}/${datadir}" | |||
this="$test.$test_ref" | |||
outfile="$datadir/$test_ref/" | |||
# various files | |||
ffmpeg="$target_exec ${target_path}/ffmpeg" | |||
# various files | |||
ffmpeg="$target_exec ${target_path}/ffmpeg${PROGSUF}" | |||
raw_src="${target_path}/$raw_src_dir/%02d.pgm" | |||
raw_dst="$datadir/$this.out.yuv" | |||
pcm_src="$target_datadir/asynth1.sw" | |||