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 D4DA747D60 for ; Sun, 24 Dec 2023 10:36:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1299368D11B; Sun, 24 Dec 2023 12:36:46 +0200 (EET) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1695D68C7E6 for ; Sun, 24 Dec 2023 12:36:40 +0200 (EET) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-5534abbc637so3434977a12.0 for ; Sun, 24 Dec 2023 02:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703414198; x=1704018998; darn=ffmpeg.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=016axFjw/EY50rdCJpFgdkKs6c/qoEj2r/68yDVMJe8=; b=JFZDrssdAL1ZmGtjSxlpbj2yenb6rsSxY2EIayrwHX1xYQxXX27F3zGGMGDD5j9Jzy P9I58l5NgnO+KJOcVK7/7fn/0dXD53lbHol9Ev05JTCTXSPgs6gq73tWqzWa6uC6SwyB qtuniks/JbDMZUL3VWhy/VAlN8PmbZrCPga2qDfP0hhinzf/fQHt01uCnq12+E66PmZi paDbxNk8RuJ7kNAtkoo9AIgXdttEd8MQohZhkz5dtuaP8LwLiWqUTqj3mkY/rqknWIcU oxSrqacwvkqcrGl8pbkCLQIqZzBEVP+nuPTMF+WgusJVyvycmJcK0/ahOuYj3BQmwhE4 ybVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703414198; x=1704018998; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=016axFjw/EY50rdCJpFgdkKs6c/qoEj2r/68yDVMJe8=; b=SxhDkNFRq37AcQ1fiHAEQ9OI2jnybTjc/mZSIJyA4vSBW5f6NUpVsQoOvUlNDMCcra nzNS7LiazvIJQHIMpRmPo8tlAB0u/155MPa4y9+mbvGjC+eckRM3iLu7cx4Gxm/oYyfu 8mL+lnN4MEx7WhdJahzraWpW674fgCqL+Gz/cZv6vJiSrkvzFDrUGO8FC9FT/l8Qqo1o L1x02J8u7PgVdluBBKMyZNP4HS43sEiIfFo7X+tHwObM4DdrRSSPa1NLu4l0PEFQwlxC j7+eq31WSaMtc7gVlYfnfE5XjuYDYYm7FyyyL0u+UId5iz1udG+Gcw4qI6k0GgHKphM4 LMZg== X-Gm-Message-State: AOJu0YxbRos9JbdS3mFK4M13lqzrilgVhgLEwC3sCDfTlXtXPOj1bIs/ nOV/EawxuTAxo8tTmJt3QEGZWbr+fDo= X-Google-Smtp-Source: AGHT+IG8IKsZjGTPufcaBCTqXklle7AvX7VTQd5l/NYqsAtKU39KoF4AU/yTdq1GMbF0Lz4gS/816Q== X-Received: by 2002:a50:8a96:0:b0:54c:4837:9a9f with SMTP id j22-20020a508a96000000b0054c48379a9fmr3036887edj.70.1703414198251; Sun, 24 Dec 2023 02:36:38 -0800 (PST) Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it. [84.220.189.10]) by smtp.gmail.com with ESMTPSA id b4-20020aa7dc04000000b0055282cb1033sm4931736edu.3.2023.12.24.02.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Dec 2023 02:36:37 -0800 (PST) Received: by mariano (Postfix, from userid 1000) id F19EABFCDC; Sun, 24 Dec 2023 11:36:36 +0100 (CET) Date: Sun, 24 Dec 2023 11:36:36 +0100 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , =?iso-8859-15?Q?Cl=E9ment_B=BDsch?= References: <20231211014429.1841681-1-u@pkh.me> <20231211014429.1841681-33-u@pkh.me> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231211014429.1841681-33-u@pkh.me> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH 32/35] avcodec/proresenc_anatoliy: rework inner loop in encode_acs() 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: =?iso-8859-15?Q?Cl=E9ment_B=BDsch?= Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On date Monday 2023-12-11 02:35:33 +0100, Cl=E9ment B=BDsch wrote: > This matches the logic from the function of the same name in proresenc_ko= stya. > --- > libavcodec/proresenc_anatoliy.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > = > diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anato= liy.c > index 816c27e481..161a05a6e6 100644 > --- a/libavcodec/proresenc_anatoliy.c > +++ b/libavcodec/proresenc_anatoliy.c > @@ -286,14 +286,17 @@ static void encode_acs(PutBitContext *pb, int16_t *= blocks, > int blocks_per_slice, > int *qmat, const uint8_t *scan) > { > + int idx; > int prev_run =3D 4; > int prev_level =3D 2; > + int max_coeffs; > + int run =3D 0, level, code, i; > + > + max_coeffs =3D blocks_per_slice << 6; > = > - int run =3D 0, level, code, i, j; > for (i =3D 1; i < 64; i++) { > - int indp =3D scan[i]; > - for (j =3D 0; j < blocks_per_slice; j++) { > - int val =3D (blocks[(j << 6) + indp]) / qmat[indp]; > + for (idx =3D scan[i]; idx < max_coeffs; idx +=3D 64) { > + int val =3D blocks[idx] / qmat[scan[i]]; LGTM. _______________________________________________ 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".