* [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice
@ 2024-06-19 2:27 fei.w.wang-at-intel.com
2024-06-19 2:27 ` [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL fei.w.wang-at-intel.com
2024-06-21 5:11 ` [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice Wang, Fei W
0 siblings, 2 replies; 5+ messages in thread
From: fei.w.wang-at-intel.com @ 2024-06-19 2:27 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: fei.w.wang
From: Fei Wang <fei.w.wang@intel.com>
Slice address tab only been updated in software decode slice data.
Fixes hwaccel decoding after d725c737fe2a19091b481d4d115fd939e0a674b2.
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
libavcodec/hevc/hevcdec.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 1d2e53afc3..39beb7e4dc 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -2770,15 +2770,6 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext
const HEVCPPS *pps = s->pps;
int ret;
- if (s->sh.dependent_slice_segment_flag) {
- int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs];
- int prev_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];
- if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {
- av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n");
- return AVERROR_INVALIDDATA;
- }
- }
-
if (!s->sh.dependent_slice_segment_flag && s->sh.slice_type != HEVC_SLICE_I) {
ret = ff_hevc_slice_rpl(s);
if (ret < 0) {
@@ -2799,6 +2790,15 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext
return AVERROR_PATCHWELCOME;
}
+ if (s->sh.dependent_slice_segment_flag) {
+ int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs];
+ int prev_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];
+ if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {
+ av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment missing\n");
+ return AVERROR_INVALIDDATA;
+ }
+ }
+
s->local_ctx[0].first_qp_group = !s->sh.dependent_slice_segment_flag;
if (!pps->cu_qp_delta_enabled_flag)
--
2.25.1
_______________________________________________
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] 5+ messages in thread
* [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL
2024-06-19 2:27 [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice fei.w.wang-at-intel.com
@ 2024-06-19 2:27 ` fei.w.wang-at-intel.com
2024-06-21 8:48 ` Anton Khirnov
2024-06-21 5:11 ` [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice Wang, Fei W
1 sibling, 1 reply; 5+ messages in thread
From: fei.w.wang-at-intel.com @ 2024-06-19 2:27 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: fei.w.wang
From: Fei Wang <fei.w.wang@intel.com>
Fixes regression from 47d34ba7fbb81
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
libavcodec/hevc/hevcdec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index 39beb7e4dc..8bb564f1b3 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -2770,6 +2770,9 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext
const HEVCPPS *pps = s->pps;
int ret;
+ if (!s->sh.first_slice_in_pic_flag)
+ s->slice_idx += !s->sh.dependent_slice_segment_flag;
+
if (!s->sh.dependent_slice_segment_flag && s->sh.slice_type != HEVC_SLICE_I) {
ret = ff_hevc_slice_rpl(s);
if (ret < 0) {
@@ -2807,8 +2810,6 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext
s->local_ctx[0].tu.cu_qp_offset_cb = 0;
s->local_ctx[0].tu.cu_qp_offset_cr = 0;
- s->slice_idx += !s->sh.dependent_slice_segment_flag;
-
if (s->avctx->active_thread_type == FF_THREAD_SLICE &&
s->sh.num_entry_point_offsets > 0 &&
pps->num_tile_rows == 1 && pps->num_tile_columns == 1)
--
2.25.1
_______________________________________________
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] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice
2024-06-19 2:27 [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice fei.w.wang-at-intel.com
2024-06-19 2:27 ` [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL fei.w.wang-at-intel.com
@ 2024-06-21 5:11 ` Wang, Fei W
1 sibling, 0 replies; 5+ messages in thread
From: Wang, Fei W @ 2024-06-21 5:11 UTC (permalink / raw)
To: ffmpeg-devel
On Wed, 2024-06-19 at 10:27 +0800, fei.w.wang@intel.com wrote:
> From: Fei Wang <fei.w.wang@intel.com>
>
> Slice address tab only been updated in software decode slice data.
>
> Fixes hwaccel decoding after
> d725c737fe2a19091b481d4d115fd939e0a674b2.
>
> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
> ---
> libavcodec/hevc/hevcdec.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
> index 1d2e53afc3..39beb7e4dc 100644
> --- a/libavcodec/hevc/hevcdec.c
> +++ b/libavcodec/hevc/hevcdec.c
> @@ -2770,15 +2770,6 @@ static int decode_slice_data(HEVCContext *s,
> const H2645NAL *nal, GetBitContext
> const HEVCPPS *pps = s->pps;
> int ret;
>
> - if (s->sh.dependent_slice_segment_flag) {
> - int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s-
> >sh.slice_ctb_addr_rs];
> - int prev_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];
> - if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {
> - av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment
> missing\n");
> - return AVERROR_INVALIDDATA;
> - }
> - }
> -
> if (!s->sh.dependent_slice_segment_flag && s->sh.slice_type !=
> HEVC_SLICE_I) {
> ret = ff_hevc_slice_rpl(s);
> if (ret < 0) {
> @@ -2799,6 +2790,15 @@ static int decode_slice_data(HEVCContext *s,
> const H2645NAL *nal, GetBitContext
> return AVERROR_PATCHWELCOME;
> }
>
> + if (s->sh.dependent_slice_segment_flag) {
> + int ctb_addr_ts = pps->ctb_addr_rs_to_ts[s-
> >sh.slice_ctb_addr_rs];
> + int prev_rs = pps->ctb_addr_ts_to_rs[ctb_addr_ts - 1];
> + if (s->tab_slice_address[prev_rs] != s->sh.slice_addr) {
> + av_log(s->avctx, AV_LOG_ERROR, "Previous slice segment
> missing\n");
> + return AVERROR_INVALIDDATA;
> + }
> + }
> +
Ping for review/merge.
Thanks
Fei
> s->local_ctx[0].first_qp_group = !s-
> >sh.dependent_slice_segment_flag;
>
> if (!pps->cu_qp_delta_enabled_flag)
_______________________________________________
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] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL
2024-06-19 2:27 ` [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL fei.w.wang-at-intel.com
@ 2024-06-21 8:48 ` Anton Khirnov
2024-06-24 6:28 ` Wang, Fei W
0 siblings, 1 reply; 5+ messages in thread
From: Anton Khirnov @ 2024-06-21 8:48 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: fei.w.wang
Quoting fei.w.wang-at-intel.com@ffmpeg.org (2024-06-19 04:27:22)
> From: Fei Wang <fei.w.wang@intel.com>
>
> Fixes regression from 47d34ba7fbb81
"fix bug" is not a meaningful description of the problem
--
Anton Khirnov
_______________________________________________
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] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL
2024-06-21 8:48 ` Anton Khirnov
@ 2024-06-24 6:28 ` Wang, Fei W
0 siblings, 0 replies; 5+ messages in thread
From: Wang, Fei W @ 2024-06-24 6:28 UTC (permalink / raw)
To: anton, ffmpeg-devel
On Fri, 2024-06-21 at 10:48 +0200, Anton Khirnov wrote:
> Quoting fei.w.wang-at-intel.com@ffmpeg.org (2024-06-19 04:27:22)
> > From: Fei Wang <fei.w.wang@intel.com>
> >
> > Fixes regression from 47d34ba7fbb81
>
> "fix bug" is not a meaningful description of the problem
Added more explanation in V3. Thanks.
Fei
>
_______________________________________________
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] 5+ messages in thread
end of thread, other threads:[~2024-06-24 6:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 2:27 [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice fei.w.wang-at-intel.com
2024-06-19 2:27 ` [FFmpeg-devel] [PATCH v2 2/2] lavc/hevcdec: Update slice index before use it to construct slice RPL fei.w.wang-at-intel.com
2024-06-21 8:48 ` Anton Khirnov
2024-06-24 6:28 ` Wang, Fei W
2024-06-21 5:11 ` [FFmpeg-devel] [PATCH v2 1/2] lavc/hevcdec: Put slice address checking after hwaccel decode slice Wang, Fei W
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