From patchwork Mon Dec 11 01:35:11 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: 45035 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp2651892pzf; Sun, 10 Dec 2023 17:46:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGsxHPhe/heU4s//+cKL8HrFxNiA0s1Q/UUAroFbiLxUgHTv/kgZOSZAZ9DryISRXT+EuFm X-Received: by 2002:a50:cd56:0:b0:54c:b72b:93 with SMTP id d22-20020a50cd56000000b0054cb72b0093mr4390923edj.25.1702259161498; Sun, 10 Dec 2023 17:46:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702259161; cv=none; d=google.com; s=arc-20160816; b=imqtPIXqWK/jQryhBq7wWWOYySr1UlUFUigsZ4Rlz7OMCVXA43Oq/4b3UEhWs40ins m0UcFXFNTLSpte2Teu8f6yhyVtf0CWruSaOncf8LnfDCDlh7re/TQ0i4L/F0DpMirDL+ ETbphqgCzpYXnO5tvtcNFDL+bDSG4cLg/LP0/FuDA2cyVdO0u0fG2LE5BJTfp5Pb3kUn MLz5L7+hJ5hVKwu6QT+XLBf9H9mLmRjNjZihjXldsy8RuKDkFiqZXr3NyIbgwxbe5XT1 7ySOmAusZ2LNj3wWxmStPS2Sa/bOTf9HM5QKYAI7a4dBeQ3U5uY9HU6HsPEwL69/k3/j 5hCw== 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=AAc/OMVnWXsUPkJUCmhugvPYtYXx7EBWVWVNmomrzRM=; fh=Jgo3TCyoG8OdFLqA8BuM7Wbf1w27210JU6p+E8x39/M=; b=LnsEafRq1dWMg5i2oAz8jtPtejBpc2lgBYq0LGpDlxJYeY+qXS+4ScpiNnmHpgGaXt e1lkeVYa6UnyY4ax0/dMpaJ1id/6UxF1g9LQT7savK1C11cqyl06+p/EISe1divt6o3o hlX+J12N3aj1roWzyRW2WHHyhiSM6XU0c4Uz+Zo0svhKw1HcuyVCxEj1+ilgkEyJj1w7 aZER26fs5evLODlpIT3tsdXw9zp5GHDQCc5r4eTSPcoeapzAG7NmFuV3vzvedneZZejw UTvBQG0hcASul7SkthMi9LLz3MhMtbyNLvXEhW0y4nXYW8TLx4CwV9IQOj2suJaEnU9l M71A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=VMB0l6mE; 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 v29-20020a50d09d000000b0054d06e84f96si3043255edd.426.2023.12.10.17.46.01; Sun, 10 Dec 2023 17:46:01 -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=VMB0l6mE; 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 0BCAC68D16F; Mon, 11 Dec 2023 03:45:00 +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 9E25768D160 for ; Mon, 11 Dec 2023 03:44:55 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pkh.me; s=selector1; t=1702259076; 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=36g6RjC/RtWkzig9xj8iTzkK3fL2xUZEKA7biGZhECo=; b=VMB0l6mEXNXjavz6xQtmrAa22RMN7kRRYmUes19/EkqOHaus4VZyhTLvNKNC1E3vACDEWx hNO9SpizSL2iDSgJVDso5LfO7tsS4YjD3EtBqW/T1OAhV/d5WftoRDYcCbMUox4/FAfjfx ABGZP10nicHSBkyCBp9VOshSY2oDNcg= Received: from localhost (ssq0.pkh.me [local]) by ssq0.pkh.me (OpenSMTPD) with ESMTPA id 05eec223; Mon, 11 Dec 2023 01:44:36 +0000 (UTC) From: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Dec 2023 02:35:11 +0100 Message-ID: <20231211014429.1841681-11-u@pkh.me> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231211014429.1841681-1-u@pkh.me> References: <20231211014429.1841681-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/35] avcodec/proresenc_kostya: simplify quantization matrix bytestream writing 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: EyqMG3l2GA0n --- libavcodec/proresenc_kostya.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c index 103051830a..e0aa7cf47a 100644 --- a/libavcodec/proresenc_kostya.c +++ b/libavcodec/proresenc_kostya.c @@ -1014,12 +1014,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, bytestream_put_byte (&buf, 0); // reserved if (ctx->quant_sel != QUANT_MAT_DEFAULT) { bytestream_put_byte (&buf, 0x03); // matrix flags - both matrices are present - // luma quantisation matrix - for (i = 0; i < 64; i++) - bytestream_put_byte(&buf, ctx->quant_mat[i]); - // chroma quantisation matrix - for (i = 0; i < 64; i++) - bytestream_put_byte(&buf, ctx->quant_chroma_mat[i]); + bytestream_put_buffer(&buf, ctx->quant_mat, 64); // luma quantisation matrix + bytestream_put_buffer(&buf, ctx->quant_chroma_mat, 64); // chroma quantisation matrix } else { bytestream_put_byte (&buf, 0x00); // matrix flags - default matrices are used }