From patchwork Mon Dec 11 19:06:51 2023 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: 45071 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp3137038pzf; Mon, 11 Dec 2023 11:09:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFw0l5eHMaZOuY+Sqp5EDHCxvb5M9NzjWPYOC308g8Tof4Ssq7sAtQdQUctxq8cJK7N+Lh9 X-Received: by 2002:a17:907:d384:b0:a1c:897e:fd9b with SMTP id vh4-20020a170907d38400b00a1c897efd9bmr5808378ejc.6.1702321774599; Mon, 11 Dec 2023 11:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702321774; cv=none; d=google.com; s=arc-20160816; b=GMDg9Scmp1YFb0sEFxt/ygY0z7YHliX17h2iam8tZAvHtIWlVF6kLOFQCPyJZkMBx7 PeE7P6lTSqBw96GUlFeiV3bXb8HaYQItFexUo7upRm1baDms9fFzlGNUTtJeWVcqLDZ+ akjVNUe67xd6DCXP8m6pvVD/PxdqPqOAwZDFmG9WuNcqI+I/AthqLmGfv9a08ibzBxrH /BpHHhPJpLMgyxKfAdwzf8zV2qPqoJoRZC9Mj95BX1FD7Du7R2BGv5qWms+TxykVZA+Z UyYq6kQyhfGHqtOg26Ne5tDQBkJ0Hg7Wul6M+TDBneBXmJhdelG1NfbMbJTboYFjn9eg Xhaw== 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=iU21ZHr0yb3Mg6pPa60O/gvaEspiJ6/HlUUIqOa3N84=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=SCifKxKu/6KHu5h96N4fQJnQbukon1SQltuCIUVAoUBK/hpna+ptD/g3PgMqdcP5Mw jaAFv9JqugS1WtLdvvijGeqk3GLAP5/yb7V8CrUhiypy5OPeDMwBKnzikCSnQLVCaETG 4eAMztgVsV+qo+OP2HBZlUpmqhYWvg820WucbdfeCvS+VM+ovuQC09+M6RTYcfyubYaS 4T8vjmksA5caHnAePFGQZXq5eqFymg9VSL4yi2M//AlGQVda3FOFaen2VTN8RsN+Qycy L6XPMMBQFbdXjbdAiEuXsI3oKBhSw8GRdcNgYxS0BxD/Wjeh9zE9+Q4SWwrsLUftxuOn CLIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=CyPcEX5n; 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 lg9-20020a170906f88900b00a1ccba33273si3725729ejb.19.2023.12.11.11.09.33; Mon, 11 Dec 2023 11:09:34 -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=CyPcEX5n; 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 2656168D1DC; Mon, 11 Dec 2023 21:09:24 +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 E0A2C68D1DD for ; Mon, 11 Dec 2023 21:09:17 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1702321752; 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=KNV1qAezY5bboCw9dicHJUbzkjT23PC3DB9HjKwAMTo=; b=CyPcEX5nsA2nzhBqb3rWkMFeNACkxmeIWCzLi5Mrq7surTndMLsECPWNjvV1zNdEFhoQJA ivcMvw7jKTyX19z971MZ6Q5kQn+re2Ehwi6P/QiRLlDWLYC0WvKvtsmVj+bhRD6N4ac+p/ 6OjkSXbqlhIgCIFt+dCpNyr1If/MaJE= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 43ff3777; Mon, 11 Dec 2023 19:09:12 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Dec 2023 20:06:51 +0100 Message-ID: <20231211190908.1882569-2-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: LX8RxSwWx9cw 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 414f52d396..6925dfe4bc 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -747,7 +747,7 @@ static int prores_encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_be32(&buf, FRAME_ID); 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);