From patchwork Wed Aug 21 23:24:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramiro Polla X-Patchwork-Id: 51112 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:4062:b0:48e:c0f8:d0de with SMTP id kz34csp773469vqb; Wed, 21 Aug 2024 18:51:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVg1f3ARDpVdczF3Kdc5vTK4d9Ylr7Z3/tEE1V7ZHLdM5mrN4ois18A5i5Tw6xbCCVv7WmpE8KN586AFpqdq2gk@gmail.com X-Google-Smtp-Source: AGHT+IFzdOrCxagil+vSzBvzV8JqzjUojDEHfB5E8mxLmhj694Cd7nQI/H1rm9SLwv5hLSQJl8ZO X-Received: by 2002:a05:6402:13c8:b0:5be:dba7:bf27 with SMTP id 4fb4d7f45d1cf-5bf1f2ad14cmr1476285a12.6.1724291482011; Wed, 21 Aug 2024 18:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724291481; cv=none; d=google.com; s=arc-20160816; b=wY4e5JJXBXyzWcvL748co7ApXf4Zd5UWapTzNzcU8JnIM1LJt7afA92vL7dEZE2DSx 02WvTFXL/5grv8BqsKsxqyxyi0eCp3vgA40FFy3y6dNtV0+sI3cP28HEZUMss7495RcO Ju5x2mNoQFTqUspUxTT0Bf5Fi2Od425Xfn97CbpA67NHu7r2lVR3nQFuaiX1vvT1lMaC tOZT/WQkqO+xUds/m0xCqSO6nxkmEFEkPrhyKLbvFXHsv4sOduRTbSD9WQ9BJuxiIqJ6 u6GBpmvIY9o9IteSaJsJDrnB54ViyxGhlyC7L3RKSreXkX9cWY+O+xKl8iFsoLFGZCCK cbjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=P0glGPsiPem+m26/q6gMQT9QzFjmHvdRIEzY6N4WtZE=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=sdsRCkTOZZ91eWrDcJb7kcbVwVIMgSQTNAMbREaBYP2BbXjXVEn1PpkQ7mJ3z0BOJu ywjFZhuRIevHlnnUwug0g9s3c/sTalRLcZOjq6XYdcrKo5JfPa3FEcfrVGRNzBplhla/ jpjRtuYJeScc4+KQiottN46cnLEEfcoNE5bvydzarqRaQAxta22isgFo1Tiv41Onjfvc dUTTI+u2vz6ZOJGY1AS2jZDt1xhCOD7cUnsz+QGfW/38Aya/RbNl0vDC/K7swK3w4BBp bEGe6eLU+32aGg1kXbTSaKMiSPlQeBLILsqn1u81iDWlamZUvzhbvd6/3LeMaDfXKQYz W/qw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=C8uDUUk0; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5c044ddc1edsi348630a12.4.2024.08.21.18.51.20; Wed, 21 Aug 2024 18:51:21 -0700 (PDT) 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=@gmail.com header.s=20230601 header.b=C8uDUUk0; 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=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4660268DDB1; Thu, 22 Aug 2024 02:25:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 965A668DC5F for ; Thu, 22 Aug 2024 02:24:58 +0300 (EEST) Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5bed83488b3so404179a12.0 for ; Wed, 21 Aug 2024 16:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724282697; x=1724887497; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=QT/Y2ddn6Ytc89y6SxEv8FzkSb4RwihC301da1yAA+g=; b=C8uDUUk0GtLopRkH0tPe7ez5DTo/s5xJ9EoaAJOfXV8cQq0nJhBLBxiMN6FPA6fI89 3Krpy5SlNNYW+MB4/4he1o7VzvIn9EfS5pHYjwMycViPvA3RBA4y/BrhMvFXMChL/zTJ xshHXurFpVDsPqDgtKcwVSaWVk5iUiiVhOwjTxP/5iqrs2vOD8HGiFzBS98+P2Xjdhyh e9QnpM0oL1UWaB8ZtuFBrOBbuINPDvrhJlCl/TfXSQtqGe2QVmtBe787LJyYQObhuuET zm7jlZeUgYfBcCrvOCwOuAu+CFxR82s3k2f/Uh4Gyt6OtY19PUzirDwir+BZMi9kgF/U cpug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724282697; x=1724887497; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QT/Y2ddn6Ytc89y6SxEv8FzkSb4RwihC301da1yAA+g=; b=Rh3QQ6uj/sxaVf+2C602mYAF1oiJR/+aP26vTIv3IjC3vLvukIGkORF2+M7++F+DvA 0Ol0OF08hBoHPSkt7Ol/umg1uSUlrzfRUww9+mAkkZ92KuDIEuaeMSTV9tP2dZWNW5QL cuyVXK7MFJnLvAI1nt1lV+0nmUaelykiwM38vEiBJ6W/AhvCzNIP/H8bdRYApadwcsUv omSMlMUhWyyA/hpB0Kklc7jUbzEsSkQIn2QYBskoo1UVvIJOsZkQy+46HS0nxEPTVq0K KG3weX7Wf9uPs9lP3Hvogwx+0pxj421u89yWooeGWaA2qJonDSFnWTaKk8HhijlGNqt8 I1RQ== X-Gm-Message-State: AOJu0Yxw1i4LlFXfWWZKez74z9LP1zSORUbv2PCD442Ivh/gMYaeQ+hy u6usWGQVbtBMvBGeKSpEx532u7JBSLmW2T70WXh+EH09VU7orjLZt6JqauWb X-Received: by 2002:a05:6402:13cf:b0:5be:dbbb:2d41 with SMTP id 4fb4d7f45d1cf-5bf1f0b475fmr3203749a12.6.1724282696856; Wed, 21 Aug 2024 16:24:56 -0700 (PDT) Received: from localhost.localdomain (196.105-180-91.adsl-dyn.isp.belgacom.be. [91.180.105.196]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c044ddc0d0sm164644a12.10.2024.08.21.16.24.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 16:24:56 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Thu, 22 Aug 2024 01:24:53 +0200 Message-Id: <20240821232455.238469-1-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/dnxhdenc: use BlockDSPContext from MpegEncContext 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: +mXyxXd62VBI MpegEncContext already has a BlockDSPContext, so we don't need another one for DNXHDEncContext (which has an MpegEncContext). --- libavcodec/dnxhdenc.c | 10 +++++----- libavcodec/dnxhdenc.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 62612ef6d2..53e3669a30 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -420,7 +420,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx) avctx->bits_per_raw_sample = ctx->bit_depth; - ff_blockdsp_init(&ctx->bdsp); + ff_blockdsp_init(&ctx->m.bdsp); ff_fdctdsp_init(&ctx->m.fdsp, avctx); ff_mpv_idct_init(&ctx->m); ff_mpegvideoencdsp_init(&ctx->m.mpvencdsp, avctx); @@ -768,10 +768,10 @@ void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y) ptr_v + dct_uv_offset, uvlinesize); } else { - ctx->bdsp.clear_block(ctx->blocks[4]); - ctx->bdsp.clear_block(ctx->blocks[5]); - ctx->bdsp.clear_block(ctx->blocks[6]); - ctx->bdsp.clear_block(ctx->blocks[7]); + ctx->m.bdsp.clear_block(ctx->blocks[4]); + ctx->m.bdsp.clear_block(ctx->blocks[5]); + ctx->m.bdsp.clear_block(ctx->blocks[6]); + ctx->m.bdsp.clear_block(ctx->blocks[7]); } } else { pdsp->get_pixels(ctx->blocks[4], diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h index 72077d631d..00d486babd 100644 --- a/libavcodec/dnxhdenc.h +++ b/libavcodec/dnxhdenc.h @@ -43,7 +43,6 @@ typedef struct RCEntry { typedef struct DNXHDEncContext { AVClass *class; - BlockDSPContext bdsp; MpegEncContext m; ///< Used for quantization dsp functions int cid;