From patchwork Tue Sep 10 13:18:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Haas X-Patchwork-Id: 51493 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:41b1:b0:48e:c0f8:d0de with SMTP id le49csp409506vqb; Tue, 10 Sep 2024 06:29:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4GdK7Eior/Q8cqTWdKzdUg4OVN9I1HsRLX9ne7YXp5cqq0UQdMF/O7Rsl2rQuRCyThTzZYrGQts+y3ZNDbvwK@gmail.com X-Google-Smtp-Source: AGHT+IHIzG/hbV4NbCET/6wL87PIYx3nPyhw2udIQgKjLFutOMsMlZWfOobRHXOhHtmuawkwNqvg X-Received: by 2002:a05:6402:388d:b0:5c3:d8fd:9a3b with SMTP id 4fb4d7f45d1cf-5c3e964cae0mr9570426a12.28.1725974950079; Tue, 10 Sep 2024 06:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725974950; cv=none; d=google.com; s=arc-20240605; b=QfiunEd6PgBz/QucwhLWukEn77fQ1+SpwMyVvcNpVMu4cTpfnaSlBjMAHQ9TF0Iti6 7r1Iro8H7NSx5z63W//O+h4fmkYsuT3aIfW3VKGFPXyXWOsV38gmk5pWAsU5TB+5Sm7c n7SG4QIUEyyHxqZ5bvfq1oundZJKapvohXxXmMxNH2js/2v4AX+Z5/g/3zLStAxMYqi7 7gj20HH+Fg9togaMnTguJi3KfRmG2PtLWwdG5R9ukTPgNh1BDC2l2+18jCayn1gfjY1E stmq1ENnfJPUiMndOUrh+rNNuq6CxI87ovahzH2B0TQcUF55jY0f6VviTv3wtHo0WLZg YOvQ== 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 :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=PyHBumMPRATpHt6qOCNozvSMJ02Q/S5TZvRSk/zgmeE=; fh=xmAeKtysnShNOmkhiJmYkS30uw4Fu2hvBJ7qlIwukxQ=; b=Hf0VCkX5mUVx0rnRBlUEueiApp+DoeQMqICal9L5xQbV34wnxEDtqDOJc4QXx4wuz/ FOJrbQLRrGPvo6YcMSOTsboRDvDkFWL4fvxo4YN+S+azJdDXD/N44++0GIYblyoeqfvF YLWCFR5/StIoyTQtRPv3J25QAOBKib4xVCmEp4CRXKRNMMVBscPlVfeQtviGR5EkN9Yx 5S/6ubYFQyQE8QfmSOUPM3CS0rxpSBz9tFlvCPE4Hy1enYQ2y5CjdvRLG5HC6erIaGgQ at9MfZpXXIGw6wr0LPkpHbLEPjMxStgqoXfYU6PsyFpB8Mh7a0TfxHrRoD78GT6jMb/K cyqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=flJEuKrT; 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 4fb4d7f45d1cf-5c3ebd43084si5450665a12.86.2024.09.10.06.29.09; Tue, 10 Sep 2024 06:29:10 -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; dkim=neutral (body hash did not verify) header.i=@haasn.xyz header.s=mail header.b=flJEuKrT; 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 5779468E12B; Tue, 10 Sep 2024 16:18:29 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C1D868E117 for ; Tue, 10 Sep 2024 16:18:21 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1725974300; bh=RQHO7oschk/YKxnNC0Jmv2Sk/xzYIFh2+eSJ4mK+EIo=; h=From:To:Cc:Subject:Date:From; b=flJEuKrTzhAT5MwwmjJIcCithoBd41JKQNasBhv74PDrxfTenOcB2jAYXMcROykaE vZ3UGf8caZIhxw2PXWKDHi2g44QyAI0NO3GPGFMvFvd5HApLaL4fQjxuBqO2uCbo6N BXEmEvVCSdwQTA4GIEXLx6I8/c7htT8gIIsAAV1c= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 943AE4076C; Tue, 10 Sep 2024 15:18:20 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Sep 2024 15:18:15 +0200 Message-ID: <20240910131816.1482534-1-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/2] tests/fate: force MPEG range for rawvideo tests 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 Cc: Niklas Haas Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: y9LOmyNk22aU From: Niklas Haas The input file is MPEG range, so we should also encode to MPEG range before comparing against it. This bug was avoided in the past because YUVJ inputs were automatically converted back to limited range when converting to a different pixfmt (in the absence of tagging). However, with proper YUV negotiation in place, the default behavior is to preserve the YUV range wherever possible. Since `rawvideo` does not signal or care about the YUV range, we need to explicitly request the desired output range to force a conversion. Affects all rawvideo tests, in particular vsynth and owdenoise. --- tests/fate-run.sh | 2 +- tests/fate/filter-video.mak | 2 +- tests/fate/vcodec.mak | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 6ae0320c60..309ab85134 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -500,7 +500,7 @@ pixfmt_conversion(){ run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \ $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $conversion $target_path/$raw_dst || return do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $conversion -i $target_path/$raw_dst \ - $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p + $ENC_OPTS -f rawvideo -s 352x288 -pix_fmt yuv444p -color_range mpeg } video_filter(){ diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index aa125b5e65..5b8a294afd 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -2,7 +2,7 @@ VIDEO_FILTER = $(call ALLYES, $(1:%=%_FILTER) $(2) FILE_PROTOCOL IMAGE2_DEMUXER PGMYUV_DECODER RAWVIDEO_ENCODER NUT_MUXER MD5_PROTOCOL) FATE_FILTER_SAMPLES-$(call FILTERDEMDECENCMUX, PERMS OWDENOISE TRIM SCALE, SMJPEG, MJPEG, RAWVIDEO, RAWVIDEO, PIPE_PROTOCOL) += fate-filter-owdenoise-sample -fate-filter-owdenoise-sample: CMD = ffmpeg -auto_conversion_filters -idct simple -i $(TARGET_SAMPLES)/smjpeg/scenwin.mjpg -vf "trim=duration=0.5,perms=random,owdenoise=10:20:20:enable=not(between(t\,0.2\,1.2))" -an -f rawvideo - +fate-filter-owdenoise-sample: CMD = ffmpeg -auto_conversion_filters -idct simple -i $(TARGET_SAMPLES)/smjpeg/scenwin.mjpg -vf "trim=duration=0.5,perms=random,owdenoise=10:20:20:enable=not(between(t\,0.2\,1.2))" -an -f rawvideo -color_range mpeg - fate-filter-owdenoise-sample: REF = $(SAMPLES)/filter-reference/owdenoise-scenwin.raw fate-filter-owdenoise-sample: CMP_TARGET = 1 fate-filter-owdenoise-sample: FUZZ = 3539 diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index b9829be027..463e9e34e7 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 -fps_mode passthrough $(DECOPTS)" "" "" ${TWOPASS} +fate-vsynth%: CMD = enc_dec "rawvideo $(DEFAULT_SIZE) -color_range mpeg -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-pix_fmt yuv420p -color_range mpeg -fps_mode passthrough $(DECOPTS)" "" "" ${TWOPASS} fate-vsynth%: CMP_UNIT = 1 fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%)