forked from FFmpeg/FFmpeg
fate: add fate tests for VBN encoder and decoder
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
ee50cc18b3
commit
7ac559b819
7 changed files with 90 additions and 0 deletions
|
@ -191,6 +191,7 @@ include $(SRC_PATH)/tests/fate/speedhq.mak
|
|||
include $(SRC_PATH)/tests/fate/subtitles.mak
|
||||
include $(SRC_PATH)/tests/fate/truehd.mak
|
||||
include $(SRC_PATH)/tests/fate/utvideo.mak
|
||||
include $(SRC_PATH)/tests/fate/vbn.mak
|
||||
include $(SRC_PATH)/tests/fate/video.mak
|
||||
include $(SRC_PATH)/tests/fate/voice.mak
|
||||
include $(SRC_PATH)/tests/fate/vorbis.mak
|
||||
|
|
|
@ -391,6 +391,17 @@ cmp_metadata(){
|
|||
-f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
|
||||
}
|
||||
|
||||
refcmp_metadata_files(){
|
||||
refcmp=$1
|
||||
pixfmt=$2
|
||||
file1=$3
|
||||
file2=$4
|
||||
fuzz=${5:-0.001}
|
||||
ffmpeg -auto_conversion_filters $FLAGS -i $file1 $FLAGS -i $file2 $ENC_OPTS \
|
||||
-lavfi "[0:v]format=${pixfmt}[v0];[1:v]format=${pixfmt}[v1];[v0][v1]${refcmp},metadata=print:file=-" \
|
||||
-f null /dev/null | awk -v ref=${ref} -v fuzz=${fuzz} -f ${base}/refcmp-metadata.awk -
|
||||
}
|
||||
|
||||
pixfmt_conversion(){
|
||||
conversion="${test#pixfmt-}"
|
||||
outdir="tests/data/pixfmt"
|
||||
|
|
36
tests/fate/vbn.mak
Normal file
36
tests/fate/vbn.mak
Normal file
|
@ -0,0 +1,36 @@
|
|||
fate-vbn-%: VBN_FILE = tests/data/$(subst fate-vbn-,,$(@)).vbn
|
||||
fate-vbn-%: PIX_FMT = rgba
|
||||
fate-vbn-raw-rgb24: PIX_FMT = rgb24
|
||||
fate-vbn-%: SRC = $(TARGET_SAMPLES)/png1/lena-$(PIX_FMT).png
|
||||
fate-vbn-%: CMD = refcmp_metadata_files psnr $(PIX_FMT) $(VBN_FILE) $(SRC)
|
||||
|
||||
fate-vbn-dxt1: tests/data/dxt1.vbn
|
||||
fate-vbn-dxt5: tests/data/dxt5.vbn
|
||||
fate-vbn-raw-rgba: tests/data/raw-rgba.vbn
|
||||
fate-vbn-raw-rgb24: tests/data/raw-rgb24.vbn
|
||||
|
||||
FATE_VBN += fate-vbn-dxt1
|
||||
FATE_VBN += fate-vbn-dxt5
|
||||
FATE_VBN += fate-vbn-raw-rgba
|
||||
FATE_VBN += fate-vbn-raw-rgb24
|
||||
|
||||
tests/data/dxt1.vbn: TAG = GEN
|
||||
tests/data/dxt1.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
|
||||
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format dxt1 $(TARGET_PATH)/$@ -y 2>/dev/null
|
||||
|
||||
tests/data/dxt5.vbn: TAG = GEN
|
||||
tests/data/dxt5.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
|
||||
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format dxt5 $(TARGET_PATH)/$@ -y 2>/dev/null
|
||||
|
||||
tests/data/raw-rgba.vbn: TAG = GEN
|
||||
tests/data/raw-rgba.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
|
||||
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgba.png -nostdin -c:v vbn -format raw $(TARGET_PATH)/$@ -y 2>/dev/null
|
||||
|
||||
tests/data/raw-rgb24.vbn: TAG = GEN
|
||||
tests/data/raw-rgb24.vbn: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
|
||||
$(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -i $(TARGET_SAMPLES)/png1/lena-rgb24.png -nostdin -c:v vbn -format raw $(TARGET_PATH)/$@ -y 2>/dev/null
|
||||
|
||||
VBN_REFCMP_DEPS = PSNR_FILTER METADATA_FILTER VBN_ENCODER VBN_DECODER IMAGE2_MUXER IMAGE2_DEMUXER PNG_DECODER
|
||||
|
||||
FATE_SAMPLES_FFMPEG-$(call ALLYES, $(VBN_REFCMP_DEPS)) += $(FATE_VBN)
|
||||
fate-vbn: $(FATE_VBN)
|
11
tests/ref/fate/vbn-dxt1
Normal file
11
tests/ref/fate/vbn-dxt1
Normal file
|
@ -0,0 +1,11 @@
|
|||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=36.794250
|
||||
lavfi.psnr.psnr.r=32.473003
|
||||
lavfi.psnr.mse.g=33.350525
|
||||
lavfi.psnr.psnr.g=32.899776
|
||||
lavfi.psnr.mse.b=28.317383
|
||||
lavfi.psnr.psnr.b=33.610271
|
||||
lavfi.psnr.mse.a=21186.988281
|
||||
lavfi.psnr.psnr.a=4.870111
|
||||
lavfi.psnr.mse_avg=5321.362793
|
||||
lavfi.psnr.psnr_avg=10.870575
|
11
tests/ref/fate/vbn-dxt5
Normal file
11
tests/ref/fate/vbn-dxt5
Normal file
|
@ -0,0 +1,11 @@
|
|||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=36.794250
|
||||
lavfi.psnr.psnr.r=32.473003
|
||||
lavfi.psnr.mse.g=33.350525
|
||||
lavfi.psnr.psnr.g=32.899776
|
||||
lavfi.psnr.mse.b=28.317383
|
||||
lavfi.psnr.psnr.b=33.610271
|
||||
lavfi.psnr.mse.a=0.000183
|
||||
lavfi.psnr.psnr.a=85.503792
|
||||
lavfi.psnr.mse_avg=24.615585
|
||||
lavfi.psnr.psnr_avg=34.218700
|
9
tests/ref/fate/vbn-raw-rgb24
Normal file
9
tests/ref/fate/vbn-raw-rgb24
Normal file
|
@ -0,0 +1,9 @@
|
|||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=0.000000
|
||||
lavfi.psnr.psnr.r=inf
|
||||
lavfi.psnr.mse.g=0.000000
|
||||
lavfi.psnr.psnr.g=inf
|
||||
lavfi.psnr.mse.b=0.000000
|
||||
lavfi.psnr.psnr.b=inf
|
||||
lavfi.psnr.mse_avg=0.000000
|
||||
lavfi.psnr.psnr_avg=inf
|
11
tests/ref/fate/vbn-raw-rgba
Normal file
11
tests/ref/fate/vbn-raw-rgba
Normal file
|
@ -0,0 +1,11 @@
|
|||
frame:0 pts:0 pts_time:0
|
||||
lavfi.psnr.mse.r=0.000000
|
||||
lavfi.psnr.psnr.r=inf
|
||||
lavfi.psnr.mse.g=0.000000
|
||||
lavfi.psnr.psnr.g=inf
|
||||
lavfi.psnr.mse.b=0.000000
|
||||
lavfi.psnr.psnr.b=inf
|
||||
lavfi.psnr.mse.a=0.000000
|
||||
lavfi.psnr.psnr.a=inf
|
||||
lavfi.psnr.mse_avg=0.000000
|
||||
lavfi.psnr.psnr_avg=inf
|
Loading…
Add table
Reference in a new issue