* [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field
@ 2023-06-06 11:03 Lynne
2023-06-07 21:26 ` Philip Langdale
[not found] ` <NXFN6wh--B-9@lynne.ee-NXFNAmF----9>
0 siblings, 2 replies; 3+ messages in thread
From: Lynne @ 2023-06-06 11:03 UTC (permalink / raw)
To: Ffmpeg Devel
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
It was introduced for Vulkan, but it is equivalent to
short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag,
and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero
anyway.
3-line patch attached.
[-- Attachment #2: 0001-hevcdec-remove-redundant-bits_used_for_short_term_rp.patch --]
[-- Type: text/x-diff, Size: 2166 bytes --]
From 67a4755b97de8fe0e22e25ff4714c76a5b570b44 Mon Sep 17 00:00:00 2001
From: Lynne <dev@lynne.ee>
Date: Tue, 6 Jun 2023 12:48:11 +0200
Subject: [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field
It was introduced for Vulkan, but it is equivalent to
short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag,
and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero
anyway.
---
libavcodec/hevcdec.c | 1 -
libavcodec/hevcdec.h | 1 -
libavcodec/vulkan_hevc.c | 2 +-
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index eee77ec4db..a4284921cb 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -723,7 +723,6 @@ static int hls_slice_header(HEVCContext *s)
if (ret < 0)
return ret;
- sh->bits_used_for_short_term_rps = pos - get_bits_left(gb);
sh->short_term_rps = &sh->slice_rps;
} else {
int numbits, rps_idx;
diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h
index 04ec25d540..94609e4699 100644
--- a/libavcodec/hevcdec.h
+++ b/libavcodec/hevcdec.h
@@ -268,7 +268,6 @@ typedef struct SliceHeader {
///< RPS coded in the slice header itself is stored here
int short_term_ref_pic_set_sps_flag;
- int bits_used_for_short_term_rps;
int short_term_ref_pic_set_size;
ShortTermRPS slice_rps;
const ShortTermRPS *short_term_rps;
diff --git a/libavcodec/vulkan_hevc.c b/libavcodec/vulkan_hevc.c
index c9b6888410..dcf7e75bc5 100644
--- a/libavcodec/vulkan_hevc.c
+++ b/libavcodec/vulkan_hevc.c
@@ -788,7 +788,7 @@ static int vk_hevc_start_frame(AVCodecContext *avctx,
.NumDeltaPocsOfRefRpsIdx = h->sh.short_term_rps ? h->sh.short_term_rps->rps_idx_num_delta_pocs : 0,
.PicOrderCntVal = h->poc,
.NumBitsForSTRefPicSetInSlice = !h->sh.short_term_ref_pic_set_sps_flag ?
- h->sh.bits_used_for_short_term_rps : 0,
+ h->sh.short_term_ref_pic_set_size : 0,
};
/* Fill in references */
--
2.40.1
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field
2023-06-06 11:03 [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field Lynne
@ 2023-06-07 21:26 ` Philip Langdale
[not found] ` <NXFN6wh--B-9@lynne.ee-NXFNAmF----9>
1 sibling, 0 replies; 3+ messages in thread
From: Philip Langdale @ 2023-06-07 21:26 UTC (permalink / raw)
To: ffmpeg-devel
On Tue, 6 Jun 2023 13:03:43 +0200 (CEST)
Lynne <dev@lynne.ee> wrote:
> It was introduced for Vulkan, but it is equivalent to
> short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag,
> and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero
> anyway.
>
> 3-line patch attached.
>
LGTM
--phil
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field
[not found] ` <NXFN6wh--B-9@lynne.ee-NXFNAmF----9>
@ 2023-06-07 22:05 ` Lynne
0 siblings, 0 replies; 3+ messages in thread
From: Lynne @ 2023-06-07 22:05 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Jun 6, 2023, 13:03 by dev@lynne.ee:
> It was introduced for Vulkan, but it is equivalent to
> short_term_ref_pic_set_size when !short_term_ref_pic_set_sps_flag,
> and when !!short_term_ref_pic_set_sps_flag, Vulkan hardcodes a zero
> anyway.
>
> 3-line patch attached.
>
Pushed.
_______________________________________________
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-07 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 11:03 [FFmpeg-devel] [PATCH] hevcdec: remove redundant bits_used_for_short_term_rps field Lynne
2023-06-07 21:26 ` Philip Langdale
[not found] ` <NXFN6wh--B-9@lynne.ee-NXFNAmF----9>
2023-06-07 22:05 ` Lynne
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