From patchwork Fri May 20 09:36:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35845 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp500636pzb; Fri, 20 May 2022 02:37:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgo9jyjfvxGyLwK0J7ZZtNOpfcNbs5Y0sXGruKb7NVSLZt73VBNmafdgjYZqKnn1Y9NOJ6 X-Received: by 2002:a17:907:162a:b0:6f4:c53b:fca7 with SMTP id hb42-20020a170907162a00b006f4c53bfca7mr7952958ejc.723.1653039436870; Fri, 20 May 2022 02:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653039436; cv=none; d=google.com; s=arc-20160816; b=wHx80aFkPZq4cO/yf8tv91nOy3npa1c8gR++EZd8VnKyKZZdQLYE6HrNqLw9wlIqxK +CqvR9eqE6Dl9hgt6AeKdujL371Wj8yYlSEwyWYKIYpeNCbnWvW1iEWtapEF/m1PWMS5 xM3n5toaR61zrRRQ9wAi9RteVBUZ365/YYS4d5ZEC6TppEIAEAxO75T0RqYOe3uEzUob ugG4D94xu3R7NVgJyTI1yiVg2yBf+45OEjsjJExuTjnTNLOkb55nSO7rG2EesSWEeEJ/ hpmJhnGD5M5H0CJyI4N99N8G4F9df9z8POQ2N2T/oOFXVh07fH2XQRwMik17TiHoK4SM VqvA== 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:message-id:date:to:from :delivered-to; bh=BeC6VmkLkDVIyIk6zspuxqiw4EnW/PsZEar6ZJ2s2Sw=; b=naSKQhuBdVdGVe9s5MA+1C4d27jWv34xKWnZJ5t0L+U2hzLZjKuE22T7tJN8YjTNJT 4Oqi3w9P1va06FoyfCcsvx2qR1oaruoTlTmAo1cTEQuvdDyRMWH/t6soOjui/E14Ey4K +NHc7OWwtqjNDzUKYgSRCk94VIPefpZdroBfPcuA+6iNk0WHJFzfEqfrWmN/5D9k31Px FTaXzNcXMcH3pWHC4tt2zViIt+nUTiHlbTq9eucuvXQYmzgZR09VK/XDP8HA6bD1ns3m yPYc0CUsT+MQyM88gF0WbSnR5qM0lx8++em1ac5utbyryayoBxWilGQ8y3daz0zoQKl1 IqtQ== 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 sc26-20020a1709078a1a00b006feb41d8c86si714237ejc.744.2022.05.20.02.37.16; Fri, 20 May 2022 02:37:16 -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 D972768B4AF; Fri, 20 May 2022 12:37:13 +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 CD68F68B476 for ; Fri, 20 May 2022 12:37:07 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id E6A8F2404FE for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 3024AGJsDfEq for ; Fri, 20 May 2022 11:37:06 +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 5DA27240179 for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 61BF13A06CD; Fri, 20 May 2022 11:37:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 May 2022 11:36:50 +0200 Message-Id: <20220520093653.26035-1-anton@khirnov.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/4] tests/fate/vcodec: drop unnecessary options 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: m4b6cMgYFDSl jpeg2000 will be chosen by default, there is no reason to prescribe it explicitly. No other test does so. --- tests/fate/vcodec.mak | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index 3c9b7f1ff7..c19fb8633a 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)" "$(DECINOPTS)" +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%: CMP_UNIT = 1 fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%) @@ -218,9 +218,7 @@ fate-vsynth%-jpegls: DECOPTS = -sws_flags area FATE_VCODEC_SCALE-$(call ENCDEC, JPEG2000, AVI) += jpeg2000 jpeg2000-97 fate-vsynth%-jpeg2000: ENCOPTS = -qscale 7 -strict experimental -pred 1 -pix_fmt rgb24 -fate-vsynth%-jpeg2000: DECINOPTS = -c:v jpeg2000 fate-vsynth%-jpeg2000-97: ENCOPTS = -qscale 7 -strict experimental -pix_fmt rgb24 -fate-vsynth%-jpeg2000-97: DECINOPTS = -c:v jpeg2000 FATE_VCODEC-$(call ENCDEC, LJPEG MJPEG, AVI) += ljpeg fate-vsynth%-ljpeg: ENCOPTS = -strict -1 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 || \ From patchwork Fri May 20 09:36:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35847 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp500742pzb; Fri, 20 May 2022 02:37:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/paUaB7ZvSdJwyT2zSDgrvEWbA9H3zwC5ebA7My+ik6zxhAElc5gZAIrGV+b69JX5zW7E X-Received: by 2002:a05:6402:370c:b0:42a:adfa:9150 with SMTP id ek12-20020a056402370c00b0042aadfa9150mr9860960edb.57.1653039456280; Fri, 20 May 2022 02:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653039456; cv=none; d=google.com; s=arc-20160816; b=dqXf2CJDnNHs7/byCEKIHJ/LMg2KBFHXncQlxQuje/h6XS5a3kW31+sKht75MntY3n 8gOlYw5270+YWghVfMS7lo5I6K3+HaznhGE5ctl0nbHFJrfkOZZINEXk3D7VI2x1egvG K+imZdHDUWQe5Xyve5MRTwgeDzAWKkwAus2UwnK3SOj8SM6YSEGNK4RIiAszgHwLo3fy SIqaMER4ldbGU81uTNEOXs6bsHaS1XAwB37n4HQWwj4mJy4IH+6lH9JRgsGqdi79Y7PO 9ur6gudLE8G4wIsRYcn1VVpMWMgDLx3IBvGxn69gQaMNU+tDHvKpJ7a40YBmGT615K0W CVKQ== 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=rtad+ZiH1SRKYLLwLyS++WKOcCKNJQzN6wGnM6DBVrQ=; b=UPmTpTpito2RlAGTTp6rCzKFNQH9Ozf0Ipi2eqwem89xk1InEYQA1zxKGKchp2jT6t 24Cvr/f7vqbNv9WuV21WQz7qM85WzmWEKPAHjdPpTXFuMpSsV8RwxgNMfdhONMu8frmL CTSiP4wySLtp7qfLJZmPxnOr/DFxSCCfADopT0sUo/fMVz4RLoXM/G+oruhYYc87aKLi aeg2JZ1MfuR+ybe9LNVwE+35qcAti3U9MmttLxXBBe1HAa0NOJHGeZSNB1uZQXZByjzy jILLbKhpfW37C2NSgG3JqFzsYics/T1S1ztXonB0ARDxJ827aBuuq46h+2c0ilWEpz3W iXcw== 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 hr8-20020a1709073f8800b006fe9a52586esi5316373ejc.736.2022.05.20.02.37.35; Fri, 20 May 2022 02:37:36 -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 CD2BB68B499; Fri, 20 May 2022 12:37:16 +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 8431F68B498 for ; Fri, 20 May 2022 12:37:08 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 2FC9924017C for ; Fri, 20 May 2022 11:37:08 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id FduhtHafo4S7 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 6AC8D24017E for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 65C853A06EC; Fri, 20 May 2022 11:37:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 May 2022 11:36:52 +0200 Message-Id: <20220520093653.26035-3-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 3/4] fftools/ffmpeg: fix 2pass log file names 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: l9grxD6urMdE Use the global stream index rather than an unrelated variable in the filename. Broken in 6d5d9246042. --- fftools/ffmpeg_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 47e8b9b7bd..c719bc2d0a 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1867,7 +1867,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in snprintf(logfilename, sizeof(logfilename), "%s-%d.log", ost->logfile_prefix ? ost->logfile_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX, - i); + nb_output_streams - 1); if (!strcmp(ost->enc->name, "libx264")) { av_dict_set(&ost->encoder_opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE); } else { From patchwork Fri May 20 09:36:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 35848 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:9992:b0:82:461d:f3b with SMTP id ve18csp500812pzb; Fri, 20 May 2022 02:37:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1TFasEDiieQ8rZrKvRnBtEzVnm9QDKBiSaFiyKAd5oVWiHeMVEKk7V9ji6K/L54H2/GxH X-Received: by 2002:a05:6402:254f:b0:427:d23c:ac69 with SMTP id l15-20020a056402254f00b00427d23cac69mr10019552edb.314.1653039465870; Fri, 20 May 2022 02:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653039465; cv=none; d=google.com; s=arc-20160816; b=d2ifzxRLJsaaTuUI1gKP97ZIp4/lSj3jLO0MrC06mVwjppvIW20M9WQ3RlGpZdaiPT vahKIjlHR3SGFc1wh0+c7/bLfoxp34uxShvqL0kJCFr8adQl/94mJDY6qkdwIPV5d6mO nTkiI/jez+l7V04D2WLHFMrTn6pxzYlMEP8YTWYk+4qbML2yzGs+38aPS3OPJThi2LVA qhlhEDF9Uzcmgqy9b20eM9l3naXSflaDasaoICd/L4NamnjGu7ytHDy6Wp9G7R1DP1+O 4lL3SlOcqVNp9XesFlhoODSsy9NyEX9EQRmJghllG8CIb1S4TPF6LEIonmkT7pAY1+oW HAcA== 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=3lXs/Kg+pcco1fjGDmr/rVuMDGUjh6j4SUUat/vidYs=; b=yF00AlIb4e8jQB/h65AKBrogFYP04QczcmD9xMpgYieJ5kgiT3bVgURdHjQbbSnT5t a8AwxOomiQbMpoEdJcHDHY9jfnFEML8+E1elm+dvL1bcL2FZOAp0J6psh5b7NwQueDO2 i/qWj6GDXfy4/UsN5n1ey6nuzAVeui+NLQNu34r7ZUzpeKIboXeDjXPUo1mrfbRHyCzI +BzlP26BUJCl53QIisCsdT1deIWHHqbh3VsbNop/gigJFXgPpuONveUNHDA9HI6f73nG V5Q+WkBGho2rB7iQ1vn6EsdV+hzJHFmTeMb16wXniQTxvix4RPI/cQrthMMZrYlYnODh 01jA== 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 y4-20020a50eb04000000b004264948a110si7178953edp.615.2022.05.20.02.37.45; Fri, 20 May 2022 02:37:45 -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 AFCD368B4E1; Fri, 20 May 2022 12:37:17 +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 C073768B4D0 for ; Fri, 20 May 2022 12:37:09 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 68CF424017E for ; Fri, 20 May 2022 11:37:09 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id QmS4Dc0bnxU9 for ; Fri, 20 May 2022 11:37:06 +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 5BE342400F5 for ; Fri, 20 May 2022 11:37:06 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 682B13A073B; Fri, 20 May 2022 11:37:04 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 20 May 2022 11:36:53 +0200 Message-Id: <20220520093653.26035-4-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 4/4] tests/fate/vcodec: add tests for ffv1 2pass mode 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: v9s5AJs+RDgS --- 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