From patchwork Fri May 20 09:36:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35846 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp500680pzb; Fri, 20 May 2022 02:37:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAMNte155VIT5WzQWFfKDuNOquA4ykYRApF+RZtC9NxMP26iFfdo3RIsv8rEDw3hNkwlfc X-Received: by 2002:aa7:d710:0:b0:42a:d15c:e5c6 with SMTP id t16-20020aa7d710000000b0042ad15ce5c6mr3396154edq.160.1653039446165; Fri, 20 May 2022 02:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653039446; cv=none; d=google.com; s=arc-20160816; b=lreGk2KRd1VG2xqDkwbBm+UKvUUVQuM91YrLQnwLoL3ftqB0JAATfUY//mIE9w9buG fGdk6ulYuaD9TyAnxcHnO2620i2RFD7MSV7sup7cLkn27/buayPDLWZCzQJ3bfkmFJVT 7x/udniDIEchEuELEvvUnAlgsBUilZHzw+kkYRzMPyxwzSTuJ9x2Q+NMaZd+qpdpsY83 9yE9keS/jU8FKjxbKeh5GkTt3ACQWSYIrKKgO1JrG1I3+yW4pX5sBu31z/w5JkUpOvpN ECwrfoiVg4moOzFzU21+yLmCV7EJjRdN4z9oQx4citzgc7ON5i3W8SgDXhmWYbaiF47G Lclw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=LH3dxJknjTbkL8CflrwOPviTDfuwjt8AOGrcTfBAkSs=; b=CdANZWaXys7L0HiYL95NENsjctga8aopPLeJAKd/xuYKqyxglEQHvwGJAOMaNwz7Pl K7vMUtpcKvg4Ge76xgOgPGvU3I7gOUbECXgeJKNBc0Pgw0qXl6YuLj7kmvmAxUMHqcxy jLVwh8lu1HfmbYJZJct2ZQ2zdv97LeOqt29k7Sq5OL/+56Iv/KJObs59MVcQw/xA7Ug5 YjcKkLDOZaQbsdasfI4tU5oqk73VW+bS/q6URiUUhTIG8RYFpLpFTRyI+zNK8qKGPExW RfIbNFDqwH+Y3Okbr23AeCEx6DutIE8G6lBXH2ID6N8bFYA8v36AytRI+h87swSokvVy 0Ssg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fc18-20020a1709073a5200b006e0f2761f3bsi6451121ejc.840.2022.05.20.02.37.25; Fri, 20 May 2022 02:37:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D0B1D68B4D2; Fri, 20 May 2022 12:37:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E160A68B48F for ; Fri, 20 May 2022 12:37:07 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 8C7B4240179 for ; Fri, 20 May 2022 11:37:07 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id SJ1DGpXHizjX for ; Fri, 20 May 2022 11:37:07 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 68EB924017C for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 636973A0223; Fri, 20 May 2022 11:37:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 May 2022 11:36:51 +0200 Message-Id: <20220520093653.26035-2-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220520093653.26035-1-anton@khirnov.net> References: <20220520093653.26035-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] tests/fate-run: give consistent names to enc_dec() arguments X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GpAelM8+bIWQ 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 || \