Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 09/10] lavc/hevc_ps: reduce the size of ShortTermRPS.used
Date: Fri, 24 May 2024 08:54:10 -0300
Message-ID: <07a4ce06-7959-4316-b84f-b7f159aec098@gmail.com> (raw)
In-Reply-To: <171654188271.28895.394178040717190209@lain.khirnov.net>

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".

  reply	other threads:[~2024-05-24 11:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 13:31 [FFmpeg-devel] [PATCH 01/10] lavc/hevcdec: rename HEVCContext.HEVClcList to local_ctx Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 02/10] lavc/hevcdec: track local context count separately from WPP thread count Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 03/10] lavc/hevcdec: allocate local_ctx as array of structs rather than pointers Anton Khirnov
2024-04-17  9:29   ` Andreas Rheinhardt
2024-05-24  9:03     ` Anton Khirnov
2024-05-27 13:10       ` Andreas Rheinhardt
2024-05-28 13:54         ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 04/10] lavc/hevcdec: drop a useless execute() call with 1 job Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 05/10] lavc/hevc_ps: reduce the size of used_by_curr_pic_lt_sps_flag Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 06/10] lavc/hevc_ps/HEVCSPS: change flags into size-1 bitfields Anton Khirnov
2024-04-11 11:55   ` Andreas Rheinhardt
2024-05-24  9:07     ` Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 07/10] lavc/hevc_ps: fix variable signedness in ff_hevc_decode_short_term_rps() Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 08/10] lavc/hevc_ps: do not store delta_poc_s[01] in ShortTermRPS Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 09/10] lavc/hevc_ps: reduce the size of ShortTermRPS.used Anton Khirnov
2024-04-10 13:42   ` James Almer
2024-05-24  9:11     ` Anton Khirnov
2024-05-24 11:54       ` James Almer [this message]
2024-05-29  8:05         ` [FFmpeg-devel] [PATCH v2 09-10] " Anton Khirnov
2024-04-10 13:31 ` [FFmpeg-devel] [PATCH 10/10] lavc/hevc_ps: compactify ShortTermRPS Anton Khirnov
2024-04-11 12:35   ` James Almer
2024-05-24  9:19     ` Anton Khirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07a4ce06-7959-4316-b84f-b7f159aec098@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git