From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id C981E46348 for ; Mon, 15 May 2023 11:41:01 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A64C68BD40; Mon, 15 May 2023 14:40:57 +0300 (EEST) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1F66668B806 for ; Mon, 15 May 2023 14:40:51 +0300 (EEST) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-96b0235c10bso301676166b.3 for ; Mon, 15 May 2023 04:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684150850; x=1686742850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=05qapLhL+2HH+LT2Z2GKg//wKuUCZpTjc0cvbylwDiY=; b=XiHRGKtBdXFOgIJfEm06LTu0UAE1o30o4Pz1gAPlXaz7e1BjPK+H7atuB43RwKADKV emuo8S7SZ/PlcBfht8mYg9ACq1xsfS8/7BEousfp52zoTTyZ+6dH2LmecFNjKDNujln3 C/amgeO5eZkXLdl1tI0UxfiTXxmuQwIlIswcHEPr8jOLml64cdS+aT4MTtAHg6wH9VhJ jfwHqt5bmaFdx+hc/307xwBEiPhxE7TT+UneEm9OReW2TZ0ykkWGjMTDTIiPcTXkZqZM 0NnxvIh/J3cY4uxgLEXawHBQt7EO2HJQQS706MYcwXe81habfrFpd8QhPL4GqaR8m/4c vZvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684150850; x=1686742850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05qapLhL+2HH+LT2Z2GKg//wKuUCZpTjc0cvbylwDiY=; b=KIKRElMXnl+tk8q2Xz5le1fmA2qn8Ihw/BFkA1mMTi9CBh1LcuAdMYB5ofT9efjasB 4bH7y3/YRAAYCnY98zon1XlfxVlgdoDAEhlgGdk5DyBlCMk8wQ3duus4X78bvn+rdbrG kC1SCskW/5R7tbrWFvPzmBlx9Bf8tL7UTOwSQkDq+9Asz2GhRzr80tBmPtVFgd3+yB+0 49uQDH0KRlCJFK0OffpUFuuAAK1DkN101xI50gMyIvs7eYUcO/I1UgCF/XApdVe8Blfo raPEYO1dNcdz5e5x8eDBkQg+BzbQ7u5EL/wYEfLJTOta9MzHwvIXgS4Mn7eiVp5POGxJ WIHg== X-Gm-Message-State: AC+VfDydh2qvzK+0E7oNCaX3Rns1apZ1WqtzJN5cBNo2aT/Ma2x9fO+U 1G/tGW2Re1MsWsyKqSbL/u4l44nFIX4= X-Google-Smtp-Source: ACHHUZ4Axr4+yGolyAJrOisYPKFLOHUHM79T/qTGH6NZXC/YkSTRK7yxq5myjNHgeLNtMriqY0KNdA== X-Received: by 2002:a17:906:fe04:b0:966:1984:9d21 with SMTP id wy4-20020a170906fe0400b0096619849d21mr25464014ejb.9.1684150849946; Mon, 15 May 2023 04:40:49 -0700 (PDT) Received: from localhost.localdomain (p200300ccf71d220048ad1895e6601426.dip0.t-ipconnect.de. [2003:cc:f71d:2200:48ad:1895:e660:1426]) by smtp.gmail.com with ESMTPSA id gx8-20020a1709068a4800b00965ab02b42csm9332532ejc.102.2023.05.15.04.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 04:40:49 -0700 (PDT) From: Hendrik Leppkes To: ffmpeg-devel@ffmpeg.org Date: Mon, 15 May 2023 13:39:09 +0200 Message-Id: <20230515113911.1232-2-h.leppkes@gmail.com> X-Mailer: git-send-email 2.40.1.windows.1 In-Reply-To: <20230515113911.1232-1-h.leppkes@gmail.com> References: <20230515105104.1162-1-h.leppkes@gmail.com> <20230515113911.1232-1-h.leppkes@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/4] avcodec/nvdec_mpeg4: fix order of quant matrix coefficients 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: Hendrik Leppkes Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: The matrix coefficients are stored permutated for the IDCT, rather then in plain raster order, and need to be un-permutated for the hardware. --- libavcodec/nvdec_mpeg4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/nvdec_mpeg4.c b/libavcodec/nvdec_mpeg4.c index eac138cc38..c193f6b6e4 100644 --- a/libavcodec/nvdec_mpeg4.c +++ b/libavcodec/nvdec_mpeg4.c @@ -88,8 +88,9 @@ static int nvdec_mpeg4_start_frame(AVCodecContext *avctx, const uint8_t *buffer, }; for (i = 0; i < 64; ++i) { - ppc->QuantMatrixIntra[i] = s->intra_matrix[i]; - ppc->QuantMatrixInter[i] = s->inter_matrix[i]; + int n = s->idsp.idct_permutation[i]; + ppc->QuantMatrixIntra[i] = s->intra_matrix[n]; + ppc->QuantMatrixInter[i] = s->inter_matrix[n]; } // We need to pass the full frame buffer and not just the slice -- 2.40.1.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".