From: Anton Khirnov <anton@khirnov.net>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH 4/4] tests/fate/vcodec: add tests for ffv1 2pass mode
Date: Fri, 20 May 2022 11:36:53 +0200
Message-ID: <20220520093653.26035-4-anton@khirnov.net> (raw)
In-Reply-To: <20220520093653.26035-1-anton@khirnov.net>
---
tests/fate-run.sh | 12 ++++++++++++
tests/fate/vcodec.mak | 7 +++++--
tests/ref/vsynth/vsynth1-ffv1-2pass | 4 ++++
tests/ref/vsynth/vsynth2-ffv1-2pass | 4 ++++
tests/ref/vsynth/vsynth3-ffv1-2pass | 4 ++++
tests/ref/vsynth/vsynth_lena-ffv1-2pass | 4 ++++
6 files changed, 33 insertions(+), 2 deletions(-)
create mode 100644 tests/ref/vsynth/vsynth1-ffv1-2pass
create mode 100644 tests/ref/vsynth/vsynth2-ffv1-2pass
create mode 100644 tests/ref/vsynth/vsynth3-ffv1-2pass
create mode 100644 tests/ref/vsynth/vsynth_lena-ffv1-2pass
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 6501dea8f8..525e8e5499 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -207,6 +207,7 @@ enc_dec(){
dec_opt_out=$6
dec_opt_in=$7
ffprobe_opts=$8
+ twopass=$9
encfile="${outdir}/${test}.${enc_fmt_out}"
decfile="${outdir}/${test}.out.${dec_fmt_out}"
cleanfiles="$cleanfiles $decfile"
@@ -214,6 +215,17 @@ enc_dec(){
tsrcfile=$(target_path $srcfile)
tencfile=$(target_path $encfile)
tdecfile=$(target_path $decfile)
+
+ if [ -n "$twopass" ]; then
+ logfile_prefix="${outdir}/${test}.pass1"
+ cleanfiles="$cleanfiles ${logfile_prefix}-0.log"
+ tlogfile_prefix=$(target_path $logfile_prefix)
+ ffmpeg -auto_conversion_filters -f $enc_fmt_in $DEC_OPTS -i $tsrcfile \
+ $ENC_OPTS $enc_opt_out $FLAGS -pass 1 -passlogfile $tlogfile_prefix \
+ -f $enc_fmt_out -y $tencfile || return
+ enc_opt_out="$enc_opt_out -pass 2 -passlogfile $tlogfile_prefix"
+ fi
+
ffmpeg -auto_conversion_filters -f $enc_fmt_in $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt_out $FLAGS \
-f $enc_fmt_out -y $tencfile || return
do_md5sum $encfile
diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
index c19fb8633a..8ca17950ea 100644
--- a/tests/fate/vcodec.mak
+++ b/tests/fate/vcodec.mak
@@ -6,7 +6,7 @@ fate-vsynth%: CODEC = $(word 3, $(subst -, ,$(@)))
fate-vsynth%: FMT = avi
fate-vsynth%: DEFAULT_SIZE = -s 352x288
fate-vsynth3-%: DEFAULT_SIZE = -s $(FATEW)x$(FATEH)
-fate-vsynth%: CMD = enc_dec "rawvideo $(DEFAULT_SIZE) -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-pix_fmt yuv420p -vsync passthrough $(DECOPTS)"
+fate-vsynth%: CMD = enc_dec "rawvideo $(DEFAULT_SIZE) -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-pix_fmt yuv420p -vsync passthrough $(DECOPTS)" "" "" ${TWOPASS}
fate-vsynth%: CMP_UNIT = 1
fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%)
@@ -155,7 +155,8 @@ $(FATE_VCODEC_DV:%=fate-vsynth\%-%): FMT = dv
$(FATE_VCODEC_DV:%=fate-vsynth\%-%): DECOPTS += $(DEFAULT_SIZE)
FATE_VCODEC-$(call ENCDEC, FFV1, AVI) += ffv1 ffv1-v0 \
- ffv1-v3-yuv420p
+ ffv1-v3-yuv420p \
+ ffv1-2pass
FATE_VCODEC_SCALE-$(call ENCDEC, FFV1, AVI) += ffv1-v3-yuv422p10 ffv1-v3-yuv444p16 \
ffv1-v3-bgr0 ffv1-v3-rgb48
fate-vsynth%-ffv1: ENCOPTS = -slices 4
@@ -173,6 +174,8 @@ fate-vsynth%-ffv1-v3-bgr0: DECOPTS = -sws_flags neighbor+bitexact
fate-vsynth%-ffv1-v3-rgb48: ENCOPTS = -level 3 -pix_fmt rgb48 -strict -2 \
-sws_flags neighbor+bitexact
fate-vsynth%-ffv1-v3-rgb48: DECOPTS = -sws_flags neighbor+bitexact
+fate-vsynth%-ffv1-2pass: TWOPASS = 1
+fate-vsynth%-ffv1-2pass: ENCOPTS = -coder range_tab -context 1
FATE_VCODEC-$(call ENCDEC, FFVHUFF, AVI) += ffvhuff
FATE_VCODEC_SCALE-$(call ENCDEC, FFVHUFF, AVI) += ffvhuff444 ffvhuff420p12 ffvhuff422p10left ffvhuff444p16
diff --git a/tests/ref/vsynth/vsynth1-ffv1-2pass b/tests/ref/vsynth/vsynth1-ffv1-2pass
new file mode 100644
index 0000000000..c27c9691d2
--- /dev/null
+++ b/tests/ref/vsynth/vsynth1-ffv1-2pass
@@ -0,0 +1,4 @@
+7332cfda96233acc7178b09868c07ad7 *tests/data/fate/vsynth1-ffv1-2pass.avi
+2382244 tests/data/fate/vsynth1-ffv1-2pass.avi
+c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-ffv1-2pass.out.rawvideo
+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth2-ffv1-2pass b/tests/ref/vsynth/vsynth2-ffv1-2pass
new file mode 100644
index 0000000000..26c20db24d
--- /dev/null
+++ b/tests/ref/vsynth/vsynth2-ffv1-2pass
@@ -0,0 +1,4 @@
+2f5af924c6f7de1d4c34ec2dc9fca4ac *tests/data/fate/vsynth2-ffv1-2pass.avi
+3530664 tests/data/fate/vsynth2-ffv1-2pass.avi
+36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-ffv1-2pass.out.rawvideo
+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
diff --git a/tests/ref/vsynth/vsynth3-ffv1-2pass b/tests/ref/vsynth/vsynth3-ffv1-2pass
new file mode 100644
index 0000000000..dd0fd615f4
--- /dev/null
+++ b/tests/ref/vsynth/vsynth3-ffv1-2pass
@@ -0,0 +1,4 @@
+5b658e65541539248035c17da5eada3a *tests/data/fate/vsynth3-ffv1-2pass.avi
+53522 tests/data/fate/vsynth3-ffv1-2pass.avi
+a038ad7c3c09f776304ef7accdea9c74 *tests/data/fate/vsynth3-ffv1-2pass.out.rawvideo
+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 86700/ 86700
diff --git a/tests/ref/vsynth/vsynth_lena-ffv1-2pass b/tests/ref/vsynth/vsynth_lena-ffv1-2pass
new file mode 100644
index 0000000000..9ece86aaa3
--- /dev/null
+++ b/tests/ref/vsynth/vsynth_lena-ffv1-2pass
@@ -0,0 +1,4 @@
+2e1833cf75da113a6fabbaae07ddd455 *tests/data/fate/vsynth_lena-ffv1-2pass.avi
+3490450 tests/data/fate/vsynth_lena-ffv1-2pass.avi
+dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-ffv1-2pass.out.rawvideo
+stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 7603200/ 7603200
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-05-20 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-20 9:36 [FFmpeg-devel] [PATCH 1/4] tests/fate/vcodec: drop unnecessary options Anton Khirnov
2022-05-20 9:36 ` [FFmpeg-devel] [PATCH 2/4] tests/fate-run: give consistent names to enc_dec() arguments Anton Khirnov
2022-05-20 9:36 ` [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: fix 2pass log file names Anton Khirnov
2022-05-20 9:36 ` Anton Khirnov [this message]
2022-05-20 10:17 ` [FFmpeg-devel] [PATCH 1/4] tests/fate/vcodec: drop unnecessary options Andreas Rheinhardt
2022-05-24 11:58 ` Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220520093653.26035-4-anton@khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git