From: Anton Khirnov <anton@khirnov.net> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 2/4] tests/fate-run: give consistent names to enc_dec() arguments Date: Fri, 20 May 2022 11:36:51 +0200 Message-ID: <20220520093653.26035-2-anton@khirnov.net> (raw) In-Reply-To: <20220520093653.26035-1-anton@khirnov.net> enc_dec() performs two ffmpeg runs - the first one encoding a source file into a specified output format, the second one decoding previously encoded file. The arguments to this function currently have confusing names - e.g. dec_opt contains _output_ (i.e. encoding) options for the second (decoding) ffmpeg invocation. It is also possible to supply _input_ (i.e. decoding) options for the second ffmpeg run, but the argument is currently unnamed and referred to by number. Add an _in/_out suffix to argument names to make it clear what they are used for. Give a name to input options for the decoding ffmpeg run. --- tests/fate-run.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 7e3457b3ba..6501dea8f8 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -199,26 +199,27 @@ DEC_OPTS="-threads $threads -thread_type $thread_type -idct simple $FLAGS" ENC_OPTS="-threads 1 -idct simple -dct fastint" enc_dec(){ - src_fmt=$1 + enc_fmt_in=$1 srcfile=$2 - enc_fmt=$3 - enc_opt=$4 - dec_fmt=$5 - dec_opt=$6 + enc_fmt_out=$3 + enc_opt_out=$4 + dec_fmt_out=$5 + dec_opt_out=$6 + dec_opt_in=$7 ffprobe_opts=$8 - encfile="${outdir}/${test}.${enc_fmt}" - decfile="${outdir}/${test}.out.${dec_fmt}" + encfile="${outdir}/${test}.${enc_fmt_out}" + decfile="${outdir}/${test}.out.${dec_fmt_out}" cleanfiles="$cleanfiles $decfile" test "$keep" -ge 1 || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) tencfile=$(target_path $encfile) tdecfile=$(target_path $decfile) - ffmpeg -auto_conversion_filters -f $src_fmt $DEC_OPTS -i $tsrcfile $ENC_OPTS $enc_opt $FLAGS \ - -f $enc_fmt -y $tencfile || return + 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 echo $(wc -c $encfile) - ffmpeg -auto_conversion_filters $7 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ - -f $dec_fmt -y $tdecfile || return + ffmpeg -auto_conversion_filters $dec_opt_in $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt_out $FLAGS \ + -f $dec_fmt_out -y $tdecfile || return do_md5sum $decfile tests/tiny_psnr${HOSTEXECSUF} $srcfile $decfile $cmp_unit $cmp_shift test -z $ffprobe_opts || \ -- 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 ` Anton Khirnov [this message] 2022-05-20 9:36 ` [FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg: fix 2pass log file names Anton Khirnov 2022-05-20 9:36 ` [FFmpeg-devel] [PATCH 4/4] tests/fate/vcodec: add tests for ffv1 2pass mode Anton Khirnov 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-2-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