From patchwork Sun Jan 7 18:16:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 45525 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp614613pzc; Sun, 7 Jan 2024 10:17:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFz0FgtMbGHFS4KkQME2JXRBIvUlQhRBn15on1EJZkqEMaRD4UsitKNm8F9Cvn7AeqeF+O3 X-Received: by 2002:a17:906:8a63:b0:a27:edcb:b3c4 with SMTP id hy3-20020a1709068a6300b00a27edcbb3c4mr847715ejc.137.1704651458387; Sun, 07 Jan 2024 10:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704651458; cv=none; d=google.com; s=arc-20160816; b=plmzkHJM/i7e9pNFrNWZQuDrRAf+SmhgerkOsdw+exAuHFWdf8hsatRdvNKmnykB5E +rnlhx/XbX6VK5GoSZS2HCE3m6R74DvYMEzSpLG4sQmU7Thi8hVMEFI7T/CWn5dGPjBq GgiL+2UYJc2EcsbL74Zuk9gpTkJc7fY95BI+cCEA0CshD3kFSFDFKcUFqODaDSMtNKt5 zWq/ZPISJ3SV0M7k4sUSPt8Sj5QoyYTe6v9JrChvtuGsLZ+s9iV1OYGkK+6umRbkDsNM Bbyvi2YlMgXbXAlX+9qy2DOSMbA+0IRr1sSfskto+6gviH75AEShkKlWzU4VS3R/mwmq Eczw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=yl5F0eZorBHiGDhWbaGlg24vJL1MdB41TyEdhjlnTb0=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=g7Y4O0I9vdYkmoFcFnQQSX2iSGcevgoAxzoAwCUd08r8u9PtsFhyDAb9mmM+y6m3MH SdEcWERLEGNBItQuCuQiRKaCoPmc4kTmVjrnURmPeoXEAekdzCwMP2v27gFZjavWWooa VjYKMN9HzGRpjVFzedqkWV7Mxa9pi9tKREEsPXNUg5S7bnMjCAjdN8ONRF/455DOc/Em Ul7DtdWYRtfFSLP6Ma8Cyl1/q6ucylknXWVe/Iv2Q3tRl8nWH+Fmg8RFW6Is6qfV5deq rIYKFQZizev83wsFxAcef6gNWKZdRoV31r/cU7hJnVa2eqAJxvfh6vDG6eyoFU+jkLpF 7TSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=RsEMY1hI; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gu20-20020a170906f29400b00a290aa01744si2502478ejb.736.2024.01.07.10.17.37; Sun, 07 Jan 2024 10:17:38 -0800 (PST) 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=@pkh.me header.s=selector1 header.b=RsEMY1hI; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=pkh.me Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AEBD968CDDD; Sun, 7 Jan 2024 20:17:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ssq0.pkh.me (laubervilliers-656-1-228-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 01AB668CD88 for ; Sun, 7 Jan 2024 20:17:00 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1704651410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U+chmddIQmw86kO1Bv52V1lXSW6RzC1D8libcTOs5As=; b=RsEMY1hIG0q24N7QUA/rkwijU5czFiPlFXDZXI+IctnbEPlKyeDfrcxzF+0rYz/XagGcjX L9xGafLvznO3YvbJJdC0rtUEfavmFlZgGXU2iSXyJ8T8SlmzmyTgOBgZ1mQpTWpMPcWw1D 4lnqDXonxrkxPxDjE3Mbn+4etjRBskc= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 3f739576; Sun, 7 Jan 2024 18:16:50 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 19:16:47 +0100 Message-ID: <20240107181647.3049578-5-u@pkh.me> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240107181647.3049578-1-u@pkh.me> References: <20231211190908.1882569-1-u@pkh.me> <20240107181647.3049578-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields 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: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: L+ck4XKozJ7I The layout for the frame flags is as follow: chroma_format u(2) reserved u(2) interlace_mode u(2) reserved u(2) chroma_format has 2 allowed values: 0: reserved 1: reserved 2: 4:2:2 3: 4:4:4 interlace_mode has 3 allowed values: 0: progressive 1: tff 2: bff 3: reserved 0x80 is what we expect for "422 not interlaced", and the extra 0x2 from 0x82 is actually writting into the reserved bits. --- libavcodec/proresenc_anatoliy.c | 2 +- tests/ref/vsynth/vsynth1-prores | 2 +- tests/ref/vsynth/vsynth1-prores_444 | 2 +- tests/ref/vsynth/vsynth1-prores_444_int | 2 +- tests/ref/vsynth/vsynth1-prores_int | 2 +- tests/ref/vsynth/vsynth2-prores | 2 +- tests/ref/vsynth/vsynth2-prores_444 | 2 +- tests/ref/vsynth/vsynth2-prores_444_int | 2 +- tests/ref/vsynth/vsynth2-prores_int | 2 +- tests/ref/vsynth/vsynth3-prores | 2 +- tests/ref/vsynth/vsynth3-prores_444 | 2 +- tests/ref/vsynth/vsynth3-prores_444_int | 2 +- tests/ref/vsynth/vsynth3-prores_int | 2 +- tests/ref/vsynth/vsynth_lena-prores | 2 +- tests/ref/vsynth/vsynth_lena-prores_444 | 2 +- tests/ref/vsynth/vsynth_lena-prores_444_int | 2 +- tests/ref/vsynth/vsynth_lena-prores_int | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 1112cb26f1..bee4a14181 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -769,7 +769,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_buffer(&buf, ctx->vendor, 4); bytestream_put_be16(&buf, avctx->width); bytestream_put_be16(&buf, avctx->height); - frame_flags = 0x82; /* 422 not interlaced */ + frame_flags = 0x80; /* 422 not interlaced */ if (avctx->profile >= AV_PROFILE_PRORES_4444) /* 4444 or 4444 Xq */ frame_flags |= 0x40; /* 444 chroma */ if (ctx->is_interlaced) { diff --git a/tests/ref/vsynth/vsynth1-prores b/tests/ref/vsynth/vsynth1-prores index 52ac4e250a..f143611c35 100644 --- a/tests/ref/vsynth/vsynth1-prores +++ b/tests/ref/vsynth/vsynth1-prores @@ -1,4 +1,4 @@ -816d6e42260509681c49398cd4aa38a4 *tests/data/fate/vsynth1-prores.mov +e7c8db829626fdcf30eb9d78cd26b188 *tests/data/fate/vsynth1-prores.mov 5022821 tests/data/fate/vsynth1-prores.mov fb4a9e025d12afc0dbbca8d82831858f *tests/data/fate/vsynth1-prores.out.rawvideo stddev: 2.47 PSNR: 40.27 MAXDIFF: 31 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-prores_444 b/tests/ref/vsynth/vsynth1-prores_444 index d4a8c4d33d..38ca52b7f7 100644 --- a/tests/ref/vsynth/vsynth1-prores_444 +++ b/tests/ref/vsynth/vsynth1-prores_444 @@ -1,4 +1,4 @@ -722dde50fce82923b81748ad8c64ca8d *tests/data/fate/vsynth1-prores_444.mov +61238212a797d14763431c346e896277 *tests/data/fate/vsynth1-prores_444.mov 7778954 tests/data/fate/vsynth1-prores_444.mov e0da52b5d58171294d1b299539801ae0 *tests/data/fate/vsynth1-prores_444.out.rawvideo stddev: 2.80 PSNR: 39.17 MAXDIFF: 44 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-prores_444_int b/tests/ref/vsynth/vsynth1-prores_444_int index 9443e5e5a7..76db62d4e9 100644 --- a/tests/ref/vsynth/vsynth1-prores_444_int +++ b/tests/ref/vsynth/vsynth1-prores_444_int @@ -1,4 +1,4 @@ -c7e7c65147f68893d735b650efec9ed3 *tests/data/fate/vsynth1-prores_444_int.mov +fd2a2f49c61817c2338f39d5736d5fd2 *tests/data/fate/vsynth1-prores_444_int.mov 9940947 tests/data/fate/vsynth1-prores_444_int.mov 732ceeb6887524e0aee98762fe50578b *tests/data/fate/vsynth1-prores_444_int.out.rawvideo stddev: 2.83 PSNR: 39.08 MAXDIFF: 45 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth1-prores_int b/tests/ref/vsynth/vsynth1-prores_int index 46c9b2ff4e..3e2bbeff2a 100644 --- a/tests/ref/vsynth/vsynth1-prores_int +++ b/tests/ref/vsynth/vsynth1-prores_int @@ -1,4 +1,4 @@ -3ffa73e7ecd5c2f9a2bd2098499e22a5 *tests/data/fate/vsynth1-prores_int.mov +1f1b246dfabe028f04c78887e5da51ed *tests/data/fate/vsynth1-prores_int.mov 6308688 tests/data/fate/vsynth1-prores_int.mov 164a4ca890695cf594293d1acec9463c *tests/data/fate/vsynth1-prores_int.out.rawvideo stddev: 2.66 PSNR: 39.62 MAXDIFF: 34 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-prores b/tests/ref/vsynth/vsynth2-prores index 37d0bd923d..f170d11110 100644 --- a/tests/ref/vsynth/vsynth2-prores +++ b/tests/ref/vsynth/vsynth2-prores @@ -1,4 +1,4 @@ -a3815327670b2c893045d0bf1b1da9b5 *tests/data/fate/vsynth2-prores.mov +eb1e43e2f323ef3577f43d415a7ede28 *tests/data/fate/vsynth2-prores.mov 3260123 tests/data/fate/vsynth2-prores.mov 416fa8773615889c70491452428d6710 *tests/data/fate/vsynth2-prores.out.rawvideo stddev: 1.38 PSNR: 45.29 MAXDIFF: 12 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-prores_444 b/tests/ref/vsynth/vsynth2-prores_444 index d0a033de40..f286fe6701 100644 --- a/tests/ref/vsynth/vsynth2-prores_444 +++ b/tests/ref/vsynth/vsynth2-prores_444 @@ -1,4 +1,4 @@ -ab3646c0599b116b533c5b7f78741cac *tests/data/fate/vsynth2-prores_444.mov +96d4558376927a3dd4eb43e347858fd4 *tests/data/fate/vsynth2-prores_444.mov 5219722 tests/data/fate/vsynth2-prores_444.mov e425b6af7afa51b5e64fc529528b3691 *tests/data/fate/vsynth2-prores_444.out.rawvideo stddev: 0.88 PSNR: 49.18 MAXDIFF: 14 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-prores_444_int b/tests/ref/vsynth/vsynth2-prores_444_int index 4f2dad5b0e..a2ee569c49 100644 --- a/tests/ref/vsynth/vsynth2-prores_444_int +++ b/tests/ref/vsynth/vsynth2-prores_444_int @@ -1,4 +1,4 @@ -e8dc9c3d56af3f382ae2d9de4dad095f *tests/data/fate/vsynth2-prores_444_int.mov +5ac517fc2380a6cf11b7d86d2fafee0a *tests/data/fate/vsynth2-prores_444_int.mov 6420787 tests/data/fate/vsynth2-prores_444_int.mov 33a5db4f0423168d4ae4f1db3610928e *tests/data/fate/vsynth2-prores_444_int.out.rawvideo stddev: 0.93 PSNR: 48.73 MAXDIFF: 14 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-prores_int b/tests/ref/vsynth/vsynth2-prores_int index 1b2786cd58..72139ee6c3 100644 --- a/tests/ref/vsynth/vsynth2-prores_int +++ b/tests/ref/vsynth/vsynth2-prores_int @@ -1,4 +1,4 @@ -2470bebd9dd05dabe02ff4555ed747f8 *tests/data/fate/vsynth2-prores_int.mov +4062c74196d95a64e642bd917377ed93 *tests/data/fate/vsynth2-prores_int.mov 4070996 tests/data/fate/vsynth2-prores_int.mov bef9e38387a1fbb1ce2e4401b6d41674 *tests/data/fate/vsynth2-prores_int.out.rawvideo stddev: 1.54 PSNR: 44.37 MAXDIFF: 13 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth3-prores b/tests/ref/vsynth/vsynth3-prores index 39023d479c..7e6776b701 100644 --- a/tests/ref/vsynth/vsynth3-prores +++ b/tests/ref/vsynth/vsynth3-prores @@ -1,4 +1,4 @@ -a7c499437e66fbfb1fe96f5eba326610 *tests/data/fate/vsynth3-prores.mov +23c5b31aa0dd945da6d1b747024c5392 *tests/data/fate/vsynth3-prores.mov 105367 tests/data/fate/vsynth3-prores.mov fff5e7ad21d78501c8fa4749bf4bf289 *tests/data/fate/vsynth3-prores.out.rawvideo stddev: 2.80 PSNR: 39.17 MAXDIFF: 27 bytes: 86700/ 86700 diff --git a/tests/ref/vsynth/vsynth3-prores_444 b/tests/ref/vsynth/vsynth3-prores_444 index 7427fe9fd6..9e8f5e6bc6 100644 --- a/tests/ref/vsynth/vsynth3-prores_444 +++ b/tests/ref/vsynth/vsynth3-prores_444 @@ -1,4 +1,4 @@ -23f4ad11002ece9b864cfeeb4bff51a7 *tests/data/fate/vsynth3-prores_444.mov +d0a5643716e37ce727b2655bc0c1a497 *tests/data/fate/vsynth3-prores_444.mov 159127 tests/data/fate/vsynth3-prores_444.mov 025b48feb3d9a9652983ef71e6cb7e7c *tests/data/fate/vsynth3-prores_444.out.rawvideo stddev: 3.21 PSNR: 37.98 MAXDIFF: 41 bytes: 86700/ 86700 diff --git a/tests/ref/vsynth/vsynth3-prores_444_int b/tests/ref/vsynth/vsynth3-prores_444_int index e0087510da..ac30691143 100644 --- a/tests/ref/vsynth/vsynth3-prores_444_int +++ b/tests/ref/vsynth/vsynth3-prores_444_int @@ -1,4 +1,4 @@ -fb4f7ddf139f2da095335026e4be9585 *tests/data/fate/vsynth3-prores_444_int.mov +50db4bbc4674de3dfdd41f306af1cb17 *tests/data/fate/vsynth3-prores_444_int.mov 184397 tests/data/fate/vsynth3-prores_444_int.mov a8852aa2841c2ce5f2aa86176ceda4ef *tests/data/fate/vsynth3-prores_444_int.out.rawvideo stddev: 3.24 PSNR: 37.91 MAXDIFF: 41 bytes: 86700/ 86700 diff --git a/tests/ref/vsynth/vsynth3-prores_int b/tests/ref/vsynth/vsynth3-prores_int index 817d19feee..86fc2266b5 100644 --- a/tests/ref/vsynth/vsynth3-prores_int +++ b/tests/ref/vsynth/vsynth3-prores_int @@ -1,4 +1,4 @@ -db1ca2743b60dc1c3c49fab0dfca6145 *tests/data/fate/vsynth3-prores_int.mov +24b765064b4aec754fdd0cc3658bba19 *tests/data/fate/vsynth3-prores_int.mov 120484 tests/data/fate/vsynth3-prores_int.mov e5859ba47a99f9e53c1ddcaa68a8f8f8 *tests/data/fate/vsynth3-prores_int.out.rawvideo stddev: 2.92 PSNR: 38.81 MAXDIFF: 29 bytes: 86700/ 86700 diff --git a/tests/ref/vsynth/vsynth_lena-prores b/tests/ref/vsynth/vsynth_lena-prores index b2df8ab914..5c93e931b3 100644 --- a/tests/ref/vsynth/vsynth_lena-prores +++ b/tests/ref/vsynth/vsynth_lena-prores @@ -1,4 +1,4 @@ -d9cba10c23c0935ae2774bccee273664 *tests/data/fate/vsynth_lena-prores.mov +4a4c62c6c425e31c83b3f90875a28d57 *tests/data/fate/vsynth_lena-prores.mov 2844076 tests/data/fate/vsynth_lena-prores.mov 03fd29e3963716a09d232b6f817ecb57 *tests/data/fate/vsynth_lena-prores.out.rawvideo stddev: 1.31 PSNR: 45.77 MAXDIFF: 11 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth_lena-prores_444 b/tests/ref/vsynth/vsynth_lena-prores_444 index 5df5fab9f6..abbc35ddc3 100644 --- a/tests/ref/vsynth/vsynth_lena-prores_444 +++ b/tests/ref/vsynth/vsynth_lena-prores_444 @@ -1,4 +1,4 @@ -0818f09f8250dc8030ae6ef1dcdba90d *tests/data/fate/vsynth_lena-prores_444.mov +0b306033702448a7b77513f3e31c522a *tests/data/fate/vsynth_lena-prores_444.mov 4734395 tests/data/fate/vsynth_lena-prores_444.mov a704e05e3e0a451edef7515b25a76bb8 *tests/data/fate/vsynth_lena-prores_444.out.rawvideo stddev: 0.81 PSNR: 49.88 MAXDIFF: 8 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth_lena-prores_444_int b/tests/ref/vsynth/vsynth_lena-prores_444_int index df64464439..f05f1fe775 100644 --- a/tests/ref/vsynth/vsynth_lena-prores_444_int +++ b/tests/ref/vsynth/vsynth_lena-prores_444_int @@ -1,4 +1,4 @@ -b8545710824cd87b51ebe223513cc9af *tests/data/fate/vsynth_lena-prores_444_int.mov +09b5dffd1a484e2152a3b5a0bcceed32 *tests/data/fate/vsynth_lena-prores_444_int.mov 5696258 tests/data/fate/vsynth_lena-prores_444_int.mov 466380156e4d2b811f4ffb9c5a8bca72 *tests/data/fate/vsynth_lena-prores_444_int.out.rawvideo stddev: 0.88 PSNR: 49.23 MAXDIFF: 9 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth_lena-prores_int b/tests/ref/vsynth/vsynth_lena-prores_int index 64cc7db314..ea08089745 100644 --- a/tests/ref/vsynth/vsynth_lena-prores_int +++ b/tests/ref/vsynth/vsynth_lena-prores_int @@ -1,4 +1,4 @@ -3d5956899538737305edb383443b8a9a *tests/data/fate/vsynth_lena-prores_int.mov +c7e9a61054f44fe372a3bce619b68ce9 *tests/data/fate/vsynth_lena-prores_int.mov 3532698 tests/data/fate/vsynth_lena-prores_int.mov eb5caa9824ca294f403cd13f33c40f23 *tests/data/fate/vsynth_lena-prores_int.out.rawvideo stddev: 1.47 PSNR: 44.78 MAXDIFF: 12 bytes: 7603200/ 7603200