From patchwork Sun Jan 7 18:16:43 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: 45521 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp614432pzc; Sun, 7 Jan 2024 10:17:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjXespefBX1tdwB8qjcF+CeH0mk1aNGzPdyh+8ygLoZ8x+f4FnXsCoh/JYgvleH9W1DLF6 X-Received: by 2002:aa7:d3c4:0:b0:556:fb11:82bc with SMTP id o4-20020aa7d3c4000000b00556fb1182bcmr1502223edr.51.1704651422247; Sun, 07 Jan 2024 10:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704651422; cv=none; d=google.com; s=arc-20160816; b=ccDOtia4feh+zAWlK/Opa9v+4knRtsvIlfbxZiO0z2L2VJTe0qhdW5bBhMZUhgQ7Gq yPrjVUiQBuXyGqifvNdi+EYeY0Ud30FwYRgRqbZOOnHuvHd0ZPWWgnL2ZplEA1a1Ya30 OxkKz1+6DwCmAfetDvXg+f+zsc0c873q+rtgg6PH/yf31bYkkdYYYef7NCwj6Wtd44Mk PIlhlFcqUeYO3EKF1Iyo2j8EX/0JL4VAqkEPHgrX5nZ9YUZOknD48QwXRDMX6NNiWLX7 i1mtyfny/QYFzkrXhjC8nTcLK/o1DB8To9F5FTK4XUxj1WGchUGsBNXrPw8iZiuiq7vn VLdA== 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=LLtAF5AtP5xyUbCD46BV0eJFG83xN2ITsFE8C9C9W6I=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=C2sv8zThJh3jc3ExI7m5Pw+U4D3HlEACWxWrrn+Lm5P6EniwtukOIjvZvLAL9eIj4f GLTjHXRQyedPd9DGPgiiRNztVPbz63UtRlmsMLDXyw4bH/Tsmrwn7Pfj2Y0L9S1GimnX YunthJy2Ny6tF6+ErnGkUj3RIsn5OcRKdKyCh62hspxV576EkrY+kqv+w0cAuEgl294k 4YbEIgZLOe9kUAM/hpMD1in6ybV2A4f7rlY47rKKrEK7Fv+nj6Vywt1iUO84dDYVKsKq MVtUSQLBiDSd1X7Mvj7TweB2jsByZnu4f04sRw5iS5Sq284EnLVsyW9dZ9kBsIWKc7sa vhRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=n+jZUuiI; 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 p1-20020a50cd81000000b00553bd8ccd7asi2456382edi.241.2024.01.07.10.17.01; Sun, 07 Jan 2024 10:17:02 -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=n+jZUuiI; 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 80EAB68CCB5; Sun, 7 Jan 2024 20:16:57 +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 A455068B70F for ; Sun, 7 Jan 2024 20:16:50 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1704651409; 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=wLtZ+pxzClB06W4/zneNT7EGZAzFGZmavIEvmHKKwS4=; b=n+jZUuiIjPG53ExCHtUkTzs5X6FyaJvo9xn16P6KF6GBEayV7O3JptBNEuVGm5SswCt1ML vXQrJ0QgQJKEENiA+obYtELX1YId48SkzIiZ8pOD828tag4tVqzZ6qZ9yXpIierjSNJeF+ 03gYsl0f+Jiypno8iSlpxPfyIEQzeQI= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id bc8ca273; Sun, 7 Jan 2024 18:16:49 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 7 Jan 2024 19:16:43 +0100 Message-ID: <20240107181647.3049578-1-u@pkh.me> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231211190908.1882569-1-u@pkh.me> References: <20231211190908.1882569-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/proresenc_anatoliy: use a compatible bitstream version 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: 194RD+FHtOFE Quoting SMPTE RDD 36:2015: A decoder shall abort if it encounters a bitstream with an unsupported bitstream_version value. If 0, the value of the chroma_format syntax element shall be 2 (4:2:2 sampling) and the value of the alpha_channel_type element shall be 0 (no encoded alpha); if 1, any permissible value may be used for those syntax elements. So if we're not in 4:2:2 or if there is alpha, we are not allowed to use version 0. --- libavcodec/proresenc_anatoliy.c | 2 +- tests/ref/vsynth/vsynth1-prores_444 | 2 +- tests/ref/vsynth/vsynth1-prores_444_int | 2 +- tests/ref/vsynth/vsynth2-prores_444 | 2 +- tests/ref/vsynth/vsynth2-prores_444_int | 2 +- tests/ref/vsynth/vsynth3-prores_444 | 2 +- tests/ref/vsynth/vsynth3-prores_444_int | 2 +- tests/ref/vsynth/vsynth_lena-prores_444 | 2 +- tests/ref/vsynth/vsynth_lena-prores_444_int | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 9b9ffa03be..2223721aa0 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -765,7 +765,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_buffer(&buf, "icpf", 4); bytestream_put_be16(&buf, header_size); - bytestream_put_be16(&buf, 0); /* version */ + bytestream_put_be16(&buf, avctx->pix_fmt != AV_PIX_FMT_YUV422P10 || ctx->need_alpha ? 1 : 0); /* version */ bytestream_put_buffer(&buf, ctx->vendor, 4); bytestream_put_be16(&buf, avctx->width); bytestream_put_be16(&buf, avctx->height); diff --git a/tests/ref/vsynth/vsynth1-prores_444 b/tests/ref/vsynth/vsynth1-prores_444 index f7f8e9033d..54a63348ad 100644 --- a/tests/ref/vsynth/vsynth1-prores_444 +++ b/tests/ref/vsynth/vsynth1-prores_444 @@ -1,4 +1,4 @@ -509e0407dff118c775dcaa4f509a4aae *tests/data/fate/vsynth1-prores_444.mov +17c5652215ee8213319f58bc6bbcc505 *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 9515887212..9268099c7b 100644 --- a/tests/ref/vsynth/vsynth1-prores_444_int +++ b/tests/ref/vsynth/vsynth1-prores_444_int @@ -1,4 +1,4 @@ -1d5e484fa8ca08781ef2ed8428963d12 *tests/data/fate/vsynth1-prores_444_int.mov +41cc25faabf5545b84983d43cc46aded *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/vsynth2-prores_444 b/tests/ref/vsynth/vsynth2-prores_444 index c6084f5908..c1e8109cc8 100644 --- a/tests/ref/vsynth/vsynth2-prores_444 +++ b/tests/ref/vsynth/vsynth2-prores_444 @@ -1,4 +1,4 @@ -21f973c4c6076ea21f82d5fe486c0c98 *tests/data/fate/vsynth2-prores_444.mov +9b2e73b60b1809754390f3d6bcd65218 *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 a727bb2d23..968a4ed7e1 100644 --- a/tests/ref/vsynth/vsynth2-prores_444_int +++ b/tests/ref/vsynth/vsynth2-prores_444_int @@ -1,4 +1,4 @@ -500a8249bc63ec6bb79f816bce5b6db1 *tests/data/fate/vsynth2-prores_444_int.mov +dbb3038d8fc88d7261a7aad315196600 *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/vsynth3-prores_444 b/tests/ref/vsynth/vsynth3-prores_444 index f05894b33e..5a1614ef5a 100644 --- a/tests/ref/vsynth/vsynth3-prores_444 +++ b/tests/ref/vsynth/vsynth3-prores_444 @@ -1,4 +1,4 @@ -3070da65c30c1a9905ee31c7ede1cf57 *tests/data/fate/vsynth3-prores_444.mov +07d2ba443bd0a2ae090dd85cc8d9423e *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 f6ba6bc282..d9127ffd17 100644 --- a/tests/ref/vsynth/vsynth3-prores_444_int +++ b/tests/ref/vsynth/vsynth3-prores_444_int @@ -1,4 +1,4 @@ -c6279e0584575ffa1e2e13047cc7ecec *tests/data/fate/vsynth3-prores_444_int.mov +a97bdacf54af3f81610861f2ba613bc7 *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/vsynth_lena-prores_444 b/tests/ref/vsynth/vsynth_lena-prores_444 index 29141239c5..0c6323bdb9 100644 --- a/tests/ref/vsynth/vsynth_lena-prores_444 +++ b/tests/ref/vsynth/vsynth_lena-prores_444 @@ -1,4 +1,4 @@ -b8677f9e1da7be861e8b7207028b3a9e *tests/data/fate/vsynth_lena-prores_444.mov +e14c1dbd26cebe70feda70acb18962c0 *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 005ab68ccf..f8840973a0 100644 --- a/tests/ref/vsynth/vsynth_lena-prores_444_int +++ b/tests/ref/vsynth/vsynth_lena-prores_444_int @@ -1,4 +1,4 @@ -38195b0437f6ae1c910ba108e7a799d1 *tests/data/fate/vsynth_lena-prores_444_int.mov +7a1aa9e220dffde91c3a9a0595261461 *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