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 E399B48D2A for ; Fri, 24 May 2024 11:54:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9EF5168D542; Fri, 24 May 2024 14:54:15 +0300 (EEST) Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4497468D239 for ; Fri, 24 May 2024 14:54:09 +0300 (EEST) Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-3737b3a6e2dso2696635ab.3 for ; Fri, 24 May 2024 04:54:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716551647; x=1717156447; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=aRIa4RI3v4CieVsqAJzdvKYsOx4fQofW1GOAwGUKBg8=; b=nqN72CQ8SbpQ7fiw66MQR8ZOjY1TpkOj4xYqsIuriDfk20NwOn1heHIIKKvL0ZbE+a 4eGn3epjBQwzbt96P3Z2hOaEj3DVvu5AL0NyUnTEl0xZstnRH+HXrSzuGhZzEGfnePZ6 EoK1pDdSuM+/112s34bpsM5azhNlSCC/Es71xLm5hxbObIfLF35ZsqXnjUKOYctbnKtW 1d4EQUj+w3dWUnoJcXYezdSa+Lqsd8c3i1VV0n68fDFMNAIttIwNov/226C5r+jcRU3m 0MKtYSefaOZkmbqfPsJe2UbGy9LOIdCbmUAgG/9rN+wCkk9avhQC/NC8jI2E30+y0tus +GMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716551647; x=1717156447; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aRIa4RI3v4CieVsqAJzdvKYsOx4fQofW1GOAwGUKBg8=; b=vv3oikv9N7d53EE5Y07L01eamVsaqVupfBpeIJ54I6EiVNpuSu+xvcLFTXIfAS36cd B5LdPANuFpwDsNnwiJvSkBXVQ92NpdLZiXhK7fuLT8Pnd/HyxgLGyr6VWHNkz5UowcpF NYivMe7vuVyMNikHhvBXCLbN1nomretBy+ixpl1WTdalHmVYdmdQcJggGGckyGPQwoxn f0JFfWqCK43r/eNmvWnJP+A2RtmzxQp5DRiM6yLSmk4MAueieImzo/p5pirKL7PYbI8r 8PdOk5QqL5kmy/pteYxVt0MeAKKcjn0dlB7iuqraGpKxghjhIMfzlRgnVM+HAIP/I2Bp X6JA== X-Gm-Message-State: AOJu0Yz8NVAlf7zxzD2tux1uIPQ/jFKCR500Cl1ja7Hb/JabxWAvap+G oqpD0u1RuqoSCcVp1bCInrmP7VN4aQ6SlNlDMwB3wv1MPepEp7m0JI9CtA== X-Google-Smtp-Source: AGHT+IF5V7itMz8WO2vUZxvzU0hAGNR2yNjxu10zR3cd7/cDH+vr4TasprbpQZYZ4TBgQyHWQXYjMA== X-Received: by 2002:a05:6e02:1c8c:b0:36c:4bcc:8df6 with SMTP id e9e14a558f8ab-3737b33f2e3mr16902905ab.32.1716551646984; Fri, 24 May 2024 04:54:06 -0700 (PDT) Received: from [192.168.0.10] ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6822198909bsm999131a12.25.2024.05.24.04.54.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 May 2024 04:54:06 -0700 (PDT) Message-ID: <07a4ce06-7959-4316-b84f-b7f159aec098@gmail.com> Date: Fri, 24 May 2024 08:54:10 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: <20240410133118.28144-1-anton@khirnov.net> <20240410133118.28144-9-anton@khirnov.net> <164770af-7349-4ff1-93d3-73f30ac90966@gmail.com> <171654188271.28895.394178040717190209@lain.khirnov.net> Content-Language: en-US From: James Almer In-Reply-To: <171654188271.28895.394178040717190209@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 09/10] lavc/hevc_ps: reduce the size of ShortTermRPS.used 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 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 5/24/2024 6:11 AM, Anton Khirnov wrote: > Quoting James Almer (2024-04-10 15:42:51) >> >> >> On 4/10/2024 10:31 AM, Anton Khirnov wrote: >>> diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c >>> index 5d7c6b1b64..c2b65fc201 100644 >>> --- a/libavcodec/vulkan_hevc.c >>> +++ b/libavcodec/vulkan_hevc.c >>> @@ -374,17 +374,17 @@ static void set_sps(const HEVCSPS *sps, int sps_idx, >>> /* NOTE: This is the predicted, and *reordered* version. >>> * Probably incorrect, but the spec doesn't say which version to use. */ >>> for (int j = 0; j < sps->st_rps[i].num_delta_pocs; j++) >>> - str[i].used_by_curr_pic_flag |= sps->st_rps[i].used[j] << j; >>> + str[i].used_by_curr_pic_flag |= st_rps->used; >>> >>> for (int j = 0; j < str[i].num_negative_pics; j++) { >>> - str[i].delta_poc_s0_minus1[j] = st_rps->delta_poc[j] - (j ? st_rps->delta_poc[j - 1] : 0) - 1; >>> - str[i].used_by_curr_pic_s0_flag |= sps->st_rps[i].used[j] << j; >>> + str[i].delta_poc_s0_minus1[j] = st_rps->delta_poc[j] - (j ? st_rps->delta_poc[j - 1] : 0) - 1; >>> + str[i].used_by_curr_pic_s0_flag |= st_rps->used & ((1 << str[i].num_negative_pics) - 1); >> >> av_mod_uintp2(st_rps->used, str[i].num_negative_pics). > > unrelated change It's a nit, but not unrelated. You're adding a "i & ((1 << j) - 1)" line, which can be simplified (and optimized) by using av_mod_uintp2() instead. _______________________________________________ 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".