From patchwork Tue Sep 10 06:39:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 51485 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:612c:41b1:b0:48e:c0f8:d0de with SMTP id le49csp210229vqb; Mon, 9 Sep 2024 23:40:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNvuBk6naaX611kWK+k8ol16O+5hLJbUTjSBE4MushQXoIOblHIfr7TSupPraV4A1Hv6RKFNhCQZOJipOLHke1@gmail.com X-Google-Smtp-Source: AGHT+IHyBJiEnMjbCc3gBkoEASrMoJ9iZUQ1dWzT2EPV8kaW802DBjRzjJpUWkLQwQmDSBD5E7tw X-Received: by 2002:a17:906:f588:b0:a8d:2624:1a87 with SMTP id a640c23a62f3a-a8d2624259bmr291021166b.14.1725950419149; Mon, 09 Sep 2024 23:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725950419; cv=none; d=google.com; s=arc-20240605; b=SPjeCamoMjQad4uJsp4TaGya7vRukoCWENnOaf2DMrr5YN7QOcco+5oNLMNx+hN41S wy56MsUa6S83whomo66fEhgakeY4drkJBtoEzAwgKeECybMqjS4weny4Ajlw/1c6OWSx PX8/YhFNQk1u0d7tw4JbqfsdSJNSMmCYEPeYLzMTOQz0LYARSk6IObcseZPRhXcz58Dz onFEvjM7+w1DfxwCfuAXjM0IPbXIxeCOiEIyiSvCFSxMmL55BgxGQm5DCUjmVVKXlUTk 8ncIc0onSGhyL/TwxYVe9mkxC/Y3gsVdKfnD0t7spNM0LqAgpLzL1G7LPYw8lzIrm7uw jcjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=tgvSoxeT8gyyHotjuFsVvegABsWPeik9es+pS57DUXg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=ZX2JOL2OJ6Zy357hZo9U/jO07cuzjJY++9xxdJm+VaJZACNLkau48ZPWjIlMiXlG72 tJ/IjU35iepFfSl1wFRDkvE/oovmSRU4BDG18l+AOzkM/9MUmjHOWzILU82Lcc+7J6CL rXZ8HDVmLyTB+bb5yxrDmGofkudcV5bDYapi2DS1NN76Y/Bw2ZJ0hV09DLTG8CoSoaHR Omm2AZEWgHgmWggxiK/a7O+jL+t/SxEJVGI0/AVcta7Q6jXoQUED7tkmVrySY6ZlWb08 9LQKsG0eki7SkBvbCB49h4umhG/XagVmCABw8SVqvM875TG4hUejJnLsFm703UJi9bJh DrYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=hvjWx5YD; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a8d258570c9si495411466b.138.2024.09.09.23.40.18; Mon, 09 Sep 2024 23:40:19 -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=@khirnov.net header.s=mail header.b=hvjWx5YD; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B8FD168DD32; Tue, 10 Sep 2024 09:40:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CD95168DCC5 for ; Tue, 10 Sep 2024 09:40:07 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=hvjWx5YD; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id CB7714DF1 for ; Tue, 10 Sep 2024 08:40:06 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id k30AmtLDga3p for ; Tue, 10 Sep 2024 08:40:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1725950406; bh=05HSEDhSYeJHO4iCpBd1b5Mj0z5gbj1pu+QGoR8wxi4=; h=From:To:Subject:Date:From; b=hvjWx5YDx4M9L6roqJQqN2fQnML3C1inWor+INXPaN2O+NeWU40cnUPkyI97zlqfQ EvHnRO5bLnRcZimWkVswBRi7/j2pe/QOkTgsk2xtAzDZmmom8Dvo/kMyXkMTJCwhAM 1FJnupuwkHbLGLyNW9XNzKrkJkhG5oaBU0pXMFzhBpBo7qKxhm4B9Bl1h/hbMcI0xJ Ak0XGkOsmaH0cPy6LIlKIczvUQHRD9VEo490i2VP2fdk/nG+i6TOX86cG5gotoV4H9 VAhzAi7uzGwkHkrVdEudGzF1Z5+nvEbXMojevEIwiBkr3htN9DJEzju2UBjJQ3Lxw5 0f3avEPJaFrQA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 6908F81C for ; Tue, 10 Sep 2024 08:40:06 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 43EE43A03CA for ; Tue, 10 Sep 2024 08:40:06 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Sep 2024 08:39:41 +0200 Message-ID: <20240910063942.23588-2-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/3] lavc/hevcdec: remove a duplicate variable 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: +XiuR34Hrq37 In hls_decode_entry_wpp(), self_id is always identical to thread. --- libavcodec/hevc/hevcdec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index c8c425fd71..993349b678 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -2587,9 +2587,9 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb) } static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist, - int job, int self_id) + int job, int thread) { - HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[self_id]; + HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[thread]; const HEVCContext *const s = lc->parent; const HEVCLayerContext *const l = &s->layers[s->cur_layer]; const HEVCPPS *const pps = s->pps; @@ -2599,7 +2599,6 @@ static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist, int ctb_row = job; int ctb_addr_rs = s->sh.slice_ctb_addr_rs + ctb_row * ((sps->width + ctb_size - 1) >> sps->log2_ctb_size); int ctb_addr_ts = pps->ctb_addr_rs_to_ts[ctb_addr_rs]; - int thread = ctb_row % avctx->thread_count; const uint8_t *data = s->data + s->sh.offset[ctb_row]; const size_t data_size = s->sh.size[ctb_row];