|
|
@ -84,7 +84,7 @@ runecho(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
probefmt(){ |
|
|
|
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(){ |
|
|
|
runlocal(){ |
|
|
@ -93,7 +93,7 @@ runlocal(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
probeframes(){ |
|
|
|
probeframes(){ |
|
|
|
run ffprobe -show_frames -v 0 "$@" |
|
|
|
run ffprobe${PROGSUF} -show_frames -v 0 "$@" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ffmpeg(){ |
|
|
|
ffmpeg(){ |
|
|
@ -103,33 +103,33 @@ ffmpeg(){ |
|
|
|
[ x${arg} = x-i ] && ffmpeg_args="${ffmpeg_args} ${dec_opts}" |
|
|
|
[ x${arg} = x-i ] && ffmpeg_args="${ffmpeg_args} ${dec_opts}" |
|
|
|
ffmpeg_args="${ffmpeg_args} ${arg}" |
|
|
|
ffmpeg_args="${ffmpeg_args} ${arg}" |
|
|
|
done |
|
|
|
done |
|
|
|
run ffmpeg ${ffmpeg_args} |
|
|
|
run ./ffmpeg${PROGSUF} ${ffmpeg_args} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
framecrc(){ |
|
|
|
framecrc(){ |
|
|
|
ffmpeg "$@" -flags +bitexact -fflags +bitexact -f framecrc - |
|
|
|
./ffmpeg${PROGSUF} "$@" -flags +bitexact -fflags +bitexact -f framecrc - |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
framemd5(){ |
|
|
|
framemd5(){ |
|
|
|
ffmpeg "$@" -flags +bitexact -fflags +bitexact -f framemd5 - |
|
|
|
./ffmpeg${PROGSUF} "$@" -flags +bitexact -fflags +bitexact -f framemd5 - |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
crc(){ |
|
|
|
crc(){ |
|
|
|
ffmpeg "$@" -f crc - |
|
|
|
./ffmpeg${PROGSUF} "$@" -f crc - |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
md5(){ |
|
|
|
md5(){ |
|
|
|
ffmpeg "$@" md5: |
|
|
|
./ffmpeg${PROGSUF} "$@" md5: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pcm(){ |
|
|
|
pcm(){ |
|
|
|
ffmpeg "$@" -vn -f s16le - |
|
|
|
./ffmpeg${PROGSUF} "$@" -vn -f s16le - |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fmtstdout(){ |
|
|
|
fmtstdout(){ |
|
|
|
fmt=$1 |
|
|
|
fmt=$1 |
|
|
|
shift 1 |
|
|
|
shift 1 |
|
|
|
ffmpeg -flags +bitexact -fflags +bitexact "$@" -f $fmt - |
|
|
|
./ffmpeg${PROGSUF} -flags +bitexact -fflags +bitexact "$@" -f $fmt - |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enc_dec_pcm(){ |
|
|
|
enc_dec_pcm(){ |
|
|
@ -141,8 +141,8 @@ enc_dec_pcm(){ |
|
|
|
encfile="${outdir}/${test}.${out_fmt}" |
|
|
|
encfile="${outdir}/${test}.${out_fmt}" |
|
|
|
cleanfiles=$encfile |
|
|
|
cleanfiles=$encfile |
|
|
|
encfile=$(target_path ${encfile}) |
|
|
|
encfile=$(target_path ${encfile}) |
|
|
|
ffmpeg -i $src_file "$@" -f $out_fmt -y ${encfile} || return |
|
|
|
./ffmpeg${PROGSUF} -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} -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" |
|
|
|
FLAGS="-flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact" |
|
|
@ -163,11 +163,11 @@ enc_dec(){ |
|
|
|
tsrcfile=$(target_path $srcfile) |
|
|
|
tsrcfile=$(target_path $srcfile) |
|
|
|
tencfile=$(target_path $encfile) |
|
|
|
tencfile=$(target_path $encfile) |
|
|
|
tdecfile=$(target_path $decfile) |
|
|
|
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 |
|
|
|
-f $enc_fmt -y $tencfile || return |
|
|
|
do_md5sum $encfile |
|
|
|
do_md5sum $encfile |
|
|
|
echo $(wc -c $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 |
|
|
|
-f $dec_fmt -y $tdecfile || return |
|
|
|
do_md5sum $decfile |
|
|
|
do_md5sum $decfile |
|
|
|
tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift |
|
|
|
tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift |
|
|
@ -191,7 +191,7 @@ video_filter(){ |
|
|
|
label=${test#filter-} |
|
|
|
label=${test#filter-} |
|
|
|
raw_src="${target_path}/tests/vsynth1/%02d.pgm" |
|
|
|
raw_src="${target_path}/tests/vsynth1/%02d.pgm" |
|
|
|
printf '%-20s' $label |
|
|
|
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: |
|
|
|
$FLAGS $ENC_OPTS -vf "$filters" -vcodec rawvideo -frames:v 5 $* -f nut md5: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -236,16 +236,16 @@ gapless(){ |
|
|
|
cleanfiles="$cleanfiles $decfile1 $decfile2 $decfile3" |
|
|
|
cleanfiles="$cleanfiles $decfile1 $decfile2 $decfile3" |
|
|
|
|
|
|
|
|
|
|
|
# test packet data |
|
|
|
# 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 |
|
|
|
do_md5sum $decfile1 |
|
|
|
# test decoded (and cut) data |
|
|
|
# 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 |
|
|
|
# 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 |
|
|
|
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 |
|
|
|
# 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 |
|
|
|
do_md5sum $decfile3 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|