From patchwork Sun Jan 7 18:16:44 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: 45522 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2449:b0:199:85ec:e0df with SMTP id t9csp614502pzc; Sun, 7 Jan 2024 10:17:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2w493y9V0A+NVIMNGTPc7Beg2DBvuqSiZ7CBErXDo6PsgVK/8vs8P9mCY2+1NB49WSR7S X-Received: by 2002:a17:906:a218:b0:a28:c05d:7760 with SMTP id r24-20020a170906a21800b00a28c05d7760mr1286025ejy.20.1704651433192; Sun, 07 Jan 2024 10:17:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704651433; cv=none; d=google.com; s=arc-20160816; b=oZv/Gk6VynnE8qK79e2Jar50pCfEX/5ZuME+6gFYJ1V3ESp35PBZmUFiNpC/emvFKR cRhkCtvF9AsSMSLEtnyk8UPhHbK23Accdi/YMSKsRsbPf1xaXyeM3NX5tMxAGeDSYr3I bNpQDaKYvuBRqN514GtQHR4ioJscO5amAh0VBvI5mVNGRVCog63GuZ/LMVRbUEJ2IBNK W5rwVcZBCaGrMfukxJ4DtPt4TXhoqHT7gjDoV7ZaHvybHpPdra91hKX4F10aInVcgo5W F0j7e7xhRE2ZQrP9G4UYdT65BRut3LBt9NaSoGotjnIgK7hCBTH+Zd+5Dt6QiGgDKRqk /HRg== 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=hI3yq1ChOvFui0MbtRs5vD5nYUfuiV1/xfp0OGenosE=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=Hjdv4nuG38psybK2mr2zhGd2+P1WjiYHhOIh6qfSsenUo4UOCVgjEHDjBkUo9VwxGc VaaVquuvdtR6macp4DzET7tO7/SL4o5bll9zgQ/VmxeRiW0ETyyaB2Z02x/4xvu21EBK kzIogmJ93i9KQYvyByiJ/zjnc0YBhiqU7IYTsaRbHWC4OkLfQ2e5WkAP6xxzAbcVT0QI c4QA6o19/2EskLVv2eDs6Nm2Jn1e+JPdUR7j7h7iXnz8iMWZvNjZy4Z7ABdTfcKCqxT/ HWFUZ+7FkxSMxjP+8/cbxv2i61cJioVp2/VKTkvhusgQe6NM5P3D8v78fjELg7nCpq3i jyKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=f644qCSM; 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 g12-20020a1709061c8c00b00a28a7f4e172si2444146ejh.985.2024.01.07.10.17.12; Sun, 07 Jan 2024 10:17:13 -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=f644qCSM; 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 9B24D68C66F; Sun, 7 Jan 2024 20:17:01 +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 1F25F68CCFE for ; Sun, 7 Jan 2024 20:16:55 +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=BNNiOQRnLpwutIyCHT3l+1o5cdzhO+afyw4beJ0aa98=; b=f644qCSMRap7u8DgJ3lf35i0RTcBfNwUN0/MECrQB/puwUWJ/K1Dn6B/1DEM7bIAn7EC9o XbIv+LFNhCCUV3H/LBmz/HybpRL89E8nFlVhzBVQvlPQiXONA9fwuIv1ZLs/rC6WAyHyWk AiU5lhrsVKIACgNHYjOp7X8gVmdMGP4= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 7edc4764; 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:44 +0100 Message-ID: <20240107181647.3049578-2-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 2/5] avcodec/proresenc_kostya: 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: 1THVmD4l3EeW 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_kostya.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 8d45e42d1a..de63127192 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1037,7 +1037,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, // frame header tmp = buf; buf += 2; // frame header size will be stored here - bytestream_put_be16 (&buf, 0); // version 1 + bytestream_put_be16 (&buf, ctx->chroma_factor != CFACTOR_Y422 || ctx->alpha_bits ? 1 : 0); bytestream_put_buffer(&buf, ctx->vendor, 4); bytestream_put_be16 (&buf, avctx->width); bytestream_put_be16 (&buf, avctx->height);