From patchwork Fri Oct 18 12:03:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Strasser X-Patchwork-Id: 52388 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:143:b0:48e:c0f8:d0de with SMTP id h3csp858967vqi; Fri, 18 Oct 2024 05:03:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUeY8UItH0Sh0qal9MpnVUCXA4Td2NQxgrd3tOsnp7Dn7072/tnhiwHdK92u8sLgyqI3SqfWHVAFoTRP2Sil9T@gmail.com X-Google-Smtp-Source: AGHT+IHwTb5NxzgaNGDkuvToa9eey3B3fbW1OCD1YYHhCPi+H7bqsZQSTrPsBbhVbNW7gPhPGQvj X-Received: by 2002:a05:651c:199e:b0:2fa:fdd1:be23 with SMTP id 38308e7fff4ca-2fb831efb31mr16983921fa.28.1729253009668; Fri, 18 Oct 2024 05:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729253009; cv=none; d=google.com; s=arc-20240605; b=j9vQgm+Ov44bcQflWtgc2i0bKWIvb4UusKHEObU28qrBIc6SWtcx34JaEZJcK9JmQa uMPFsV5aN+5w2aF/xD895KX7JBvLOy9QKHGN2MLw/N4iZ5mLqVH6Y/1kjQ3raj2fUFjg U1EgfqEaoyMXxiJlenPBqMwIreoxI5hZTcd/QcgT1XgX7Lg7cR9ammz9aTrfls4beHWd 5ITZY1Rx9qW4ZAnlLeaovjNVBq04DQQBrFC/GFRM6uFoIDds+zSkVh398dfH7Y0ywy8o zjz/CDnAcA2HcsnIrgR3kxxlBxaQiHDa8ScwDEOJTnHUHdYrYAxu9O2qEGbz9+6trhfO y3Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding:cc:reply-to:from :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:ui-outboundreport:in-reply-to :content-disposition:mime-version:references:message-id:to:date :delivered-to; bh=o3zKH2KBiOaU0sFf3tbzE+Ffz+avfLqvNfDv8UuRwj0=; fh=12mN4pfzDNzdHyzKFbbDbvwqdgi/dxWu8iEqOdEdeaI=; b=A6DrzQkOCpx/r79IRKaUxoWStEciMMN1TLUhBR65G4U1huQyB7JQ2dFN270JjEOBvw Fjj/RWrC5N7Vo6Fxhh3zYPTnNbJsAqP91gsJu4+OKB1AChnT/XVGAzu/oEEk1KxeAa1G ayxNtwvfUAvPvApTGl3iecUiBVY6oHb34NOaRf54SpY9Ezn9kZNME7isQBoIejWRZLnE jwvRRJM6VlGPc76ppu+nOw0/4hG5kgwfOe7vcvGq3PmAehqk+X83tzCM22PHXIxSzFlV Bklmbk9YBE/jGrkNRLNLUXfYqaYfajyM3MKkXJtRQV+7EvH8WhRrILwZnIwKjYAHOSOs ukCw==; dara=google.com 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 a640c23a62f3a-a9a68bc464csi121820466b.436.2024.10.18.05.03.29; Fri, 18 Oct 2024 05:03:29 -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 25C2D68DDE5; Fri, 18 Oct 2024 15:03:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6D8F68DC94 for ; Fri, 18 Oct 2024 15:03:24 +0300 (EEST) X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from metallschleim.local ([91.4.239.114]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJVHe-1tLURP3mdk-00P1KV for ; Fri, 18 Oct 2024 14:03:23 +0200 Date: Fri, 18 Oct 2024 14:03:22 +0200 To: ffmpeg-devel@ffmpeg.org Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:z/9pw1Jy7a2iSmNAODqyPYkYkJ4mWMkakhHq3WXBk0XSjnJMts1 8YOsjZ478ARNx70NJ/DJt7rcqfIYsstbuJ1UeClC1DqMTXPo5/RcfFqEB9pj1q2o6HnJpwj vy/rI7OdRyzIOEXrjnkbtpF/r2rTau76o8/qRE3VKr2Ea/5zXrZZmENhS9jik2NyqR6tU4G d2gXEWBDL+p/C5rg8L+0w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:lpc2vj68EOU=;lsokbqj2/FufIF1IOqW1yUOc1xu DwZlDd8el2Wd+HoTabOA6wsr6Ow0kGAfiJcC1tWBW7u6OBuEiUaATvJRj+QlR1GKErRx7cZK0 cA/qTjvSDO7QMWhfSGMuVK5Xqdug3wjDd7QAxuBOf680nVA8b+TDxtp4YE+1owrcA78XJadzE 2vgqH1sXdagO/OPpHCIdCIG6eVhEie15xu7Nry0mM0RbE90exp3qNLyFP0KjtfwG9LUyWH7eV SV1HtjRYFrqwKzRzCeILscqNn1tJ8YC0BdcBenNVKL5HPnrzYg9pKpdN5HVLpbqxn+SHEdYqw dKTZp6A4BEihM63NU2HLFviw9LY9i+nfs2QF8U7VCBaBf3/9arEdCvO2xHnwPGetP1FQ6a2l/ wrWpPYw+ZSSSQXy8Ii+NM2rA6TYHB/z7ZxdeL7aQHeHYlsi2/sQfSBMF8xKgmWRvvQlGFu/RA boYvCzYNzQ/HXz7DWKQDcPu8c+y70nYgk4z8k57bnvo9kQE41d7sR2bwENZNKOvQW2uqS949+ fgrjPJNHyVtxQIuwbgLLLB0g07yoOYVNjiHYYjRMR+98LDY4FYoYt9b1EYaupcC5LX48lie3o z5K007fhHp4VkFi6nsrpISVrrzE8PsIjIIYZgj99/J5uJramnb/Ui4ikxHVxDA/o9S++Ob1Lo sx1hmq0GjXeljUS7dCZnKFiTJQHtRJT3zYVphnlu+D6Iz5qh8yqqi43aRvvkty7nkYESyJsge aFN548LYgoy3dx9bN2ANW2JBruhLEmeu+7tPQmS+txi2kVKDkOFa1gVjYmSPyxMLAFObsCAVq Dj3G7uWbKRGjkegJ4dphf64Q== Subject: [FFmpeg-devel] [RFC PATCH 2/2] fate: Make it possible to have alternative reference files 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: , X-Patchwork-Original-From: Alexander Strasser via ffmpeg-devel From: Alexander Strasser Reply-To: FFmpeg development discussions and patches Cc: Alexander Strasser Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: GPq28xfvI7Qf Sometimes deps (external from FFmpeg) can cause different results either because of bugs or because of drop in replacements. This feature of alternate reference files should only be used where absolutely necessary because other solutions are not feasible in practice. Maintaining two reference files is a burden and updating one or the other can easily be forgotten. We currently have this problem with zlib-ng. On systems where the zlib-ng is used the results are different. In commit bce5855afb25d318e090c2e6c16117f065458356 we avoided the problem by using compression level 0. That fixed the problem, but introduced a problem with original zlib. This caused differences with 2 fate tests depending on the zlib version used. See zlib commit 8ba393e70d984d902b15b9e6876f4d0d38ae4be8 . After re-applying bce5855afb25d318e090c2e6c16117f065458356 this patch fixes the 2 mentioned cases for older zlib versions by allowing an alternative reference file. The files accommodate for the bug in the older version. --- tests/fate-run.sh | 10 +++++++ tests/ref/fate/mov-cover-image.alt | 42 ++++++++++++++++++++++++++++++ tests/ref/fate/png-mdcv.alt | 22 ++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 tests/ref/fate/mov-cover-image.alt create mode 100644 tests/ref/fate/png-mdcv.alt -- diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 309ab85134..72251ec571 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -652,6 +652,16 @@ if test -e "$ref" || test $cmp = "oneline" || test $cmp = "null" || test $cmp = null) cat "$outfile" >$cmpfile ;; esac cmperr=$? + if test -e "$ref".alt && !(test $cmp = "oneline" || test $cmp = "null" || test $cmp = "grep") ; then + case $cmp in + diff) diff -u -b "$ref".alt "$outfile" >$cmpfile ;; + rawdiff)diff -u "$ref".alt "$outfile" >$cmpfile ;; + oneoff) oneoff "$ref".alt "$outfile" >$cmpfile ;; + stddev) stddev "$ref".alt "$outfile" >$cmpfile ;; + esac + cmperr=$? + fi + test $err = 0 && err=$cmperr if [ "$report_type" = "ignore" ]; then test $err = 0 || echo "IGNORE\t${test}" && err=0 && unset sig diff --git a/tests/ref/fate/mov-cover-image.alt b/tests/ref/fate/mov-cover-image.alt new file mode 100644 index 0000000000..bb94b86939 --- /dev/null +++ b/tests/ref/fate/mov-cover-image.alt @@ -0,0 +1,42 @@ +ad553810e0ce362697a2b21544daebde *tests/data/fate/mov-cover-image.mp4 +2063262 tests/data/fate/mov-cover-image.mp4 +#extradata 0: 2, 0x00340022 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: aac +#sample_rate 0: 44100 +#channel_layout_name 0: stereo +#tb 1: 1/90000 +#media_type 1: video +#codec_id 1: mjpeg +#dimensions 1: 600x600 +#sar 1: 96/96 +#tb 2: 1/90000 +#media_type 2: video +#codec_id 2: png +#dimensions 2: 600x600 +#sar 2: 1/1 +0, -2112, -2112, 1024, 6, 0x027e00e8, F=0x5, S=1, 10 +0, -1088, -1088, 1024, 6, 0x027e00e8, F=0x5 +0, -64, -64, 1024, 6, 0x027e00e8 +1, 0, 0, 0, 25441, 0xe82503b0 +2, 0, 0, 0, 1084000, 0x70fc8139 +0, 960, 960, 1024, 6, 0x027e00e8 +0, 1984, 1984, 1024, 6, 0x027e00e8 +0, 3008, 3008, 1024, 6, 0x027e00e8 +0, 4032, 4032, 1024, 6, 0x027e00e8 +[STREAM] +index=0 +codec_name=aac +DISPOSITION:attached_pic=0 +[/STREAM] +[STREAM] +index=1 +codec_name=mjpeg +DISPOSITION:attached_pic=1 +[/STREAM] +[STREAM] +index=2 +codec_name=png +DISPOSITION:attached_pic=1 +[/STREAM] diff --git a/tests/ref/fate/png-mdcv.alt b/tests/ref/fate/png-mdcv.alt new file mode 100644 index 0000000000..1339fe3a46 --- /dev/null +++ b/tests/ref/fate/png-mdcv.alt @@ -0,0 +1,22 @@ +b674209fd9cd8eff945a6bc1a4b306d3 *tests/data/fate/png-mdcv.image2pipe +2774240 tests/data/fate/png-mdcv.image2pipe +#tb 0: 1/25 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 1280x720 +#sar 0: 0/1 +0, 0, 0, 1, 2764800, 0x2bfc7b42 +frames.frame.0.side_data_list.side_data.0.side_data_type="Content light level metadata" +frames.frame.0.side_data_list.side_data.0.max_content=1000 +frames.frame.0.side_data_list.side_data.0.max_average=200 +frames.frame.0.side_data_list.side_data.1.side_data_type="Mastering display metadata" +frames.frame.0.side_data_list.side_data.1.red_x="13250/50000" +frames.frame.0.side_data_list.side_data.1.red_y="7500/50000" +frames.frame.0.side_data_list.side_data.1.green_x="34000/50000" +frames.frame.0.side_data_list.side_data.1.green_y="16000/50000" +frames.frame.0.side_data_list.side_data.1.blue_x="2/50000" +frames.frame.0.side_data_list.side_data.1.blue_y="0/50000" +frames.frame.0.side_data_list.side_data.1.white_point_x="15635/50000" +frames.frame.0.side_data_list.side_data.1.white_point_y="16450/50000" +frames.frame.0.side_data_list.side_data.1.min_luminance="50/10000" +frames.frame.0.side_data_list.side_data.1.max_luminance="10000000/10000"