mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
FATE: pass the decoded output format and audio source file to enc_dec_pcm
This will allow decoding to md5 and doing a diff comparison to a reference checksum instead of a fuzzy stddev or oneoff comparison. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
c755b1fbbc
commit
9cc338b1de
@ -28,6 +28,11 @@ errfile="${outdir}/${test}.err"
|
||||
cmpfile="${outdir}/${test}.diff"
|
||||
repfile="${outdir}/${test}.rep"
|
||||
|
||||
target_path(){
|
||||
test ${1} = ${1#/} && p=${target_path}/
|
||||
echo ${p}${1}
|
||||
}
|
||||
|
||||
# $1=value1, $2=value2, $3=threshold
|
||||
# prints 0 if absolute difference between value1 and value2 is <= threshold
|
||||
compare(){
|
||||
@ -86,12 +91,15 @@ pcm(){
|
||||
|
||||
enc_dec_pcm(){
|
||||
out_fmt=$1
|
||||
pcm_fmt=$2
|
||||
shift 2
|
||||
dec_fmt=$2
|
||||
pcm_fmt=$3
|
||||
src_file=$(target_path $4)
|
||||
shift 4
|
||||
encfile="${outdir}/${test}.${out_fmt}"
|
||||
cleanfiles=$encfile
|
||||
avconv -i $ref "$@" -f $out_fmt -y ${target_path}/${encfile} || return
|
||||
avconv -f $out_fmt -i ${target_path}/${encfile} -c:a pcm_${pcm_fmt} -f wav -
|
||||
encfile=$(target_path ${encfile})
|
||||
avconv -i $src_file "$@" -f $out_fmt -y ${encfile} || return
|
||||
avconv -f $out_fmt -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} -
|
||||
}
|
||||
|
||||
regtest(){
|
||||
|
@ -29,7 +29,7 @@ fate-eac3-4: CMP = oneoff
|
||||
fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm
|
||||
|
||||
FATE_AC3 += fate-ac3-encode
|
||||
fate-ac3-encode: CMD = enc_dec_pcm ac3 s16le -c:a ac3 -b:a 128k
|
||||
fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k
|
||||
fate-ac3-encode: CMP = stddev
|
||||
fate-ac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
|
||||
fate-ac3-encode: CMP_SHIFT = -1024
|
||||
@ -37,7 +37,7 @@ fate-ac3-encode: CMP_TARGET = 399.62
|
||||
fate-ac3-encode: SIZE_TOLERANCE = 488
|
||||
|
||||
FATE_AC3 += fate-eac3-encode
|
||||
fate-eac3-encode: CMD = enc_dec_pcm eac3 s16le -c:a eac3 -b:a 128k
|
||||
fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k
|
||||
fate-eac3-encode: CMP = stddev
|
||||
fate-eac3-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
|
||||
fate-eac3-encode: CMP_SHIFT = -1024
|
||||
|
@ -38,7 +38,7 @@ FATE_TESTS += $(FATE_WMAVOICE)
|
||||
fate-wmavoice: $(FATE_WMAVOICE)
|
||||
|
||||
FATE_WMA_ENCODE += fate-wmav1-encode
|
||||
fate-wmav1-encode: CMD = enc_dec_pcm asf s16le -c:a wmav1 -b:a 128k
|
||||
fate-wmav1-encode: CMD = enc_dec_pcm asf wav s16le $(REF) -c:a wmav1 -b:a 128k
|
||||
fate-wmav1-encode: CMP = stddev
|
||||
fate-wmav1-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
|
||||
fate-wmav1-encode: CMP_SHIFT = -8192
|
||||
@ -46,7 +46,7 @@ fate-wmav1-encode: CMP_TARGET = 291.06
|
||||
fate-wmav1-encode: SIZE_TOLERANCE = 4632
|
||||
|
||||
FATE_WMA_ENCODE += fate-wmav2-encode
|
||||
fate-wmav2-encode: CMD = enc_dec_pcm asf s16le -c:a wmav2 -b:a 128k
|
||||
fate-wmav2-encode: CMD = enc_dec_pcm asf wav s16le $(REF) -c:a wmav2 -b:a 128k
|
||||
fate-wmav2-encode: CMP = stddev
|
||||
fate-wmav2-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
|
||||
fate-wmav2-encode: CMP_SHIFT = -8192
|
||||
|
Loading…
Reference in New Issue
Block a user