ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Sun Jun 2 13:47:13 2024 +0200| [3bbb5d78c74ab24cc5ea30120ebae454a875a454] | committer: Anton Khirnov
lavc/hevcdec: move per-slice local_ctx setup out of hls_slice_header() Into decode_slice_data(). This is a step towards constifying HEVCContext in hls_slice_header(). > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3bbb5d78c74ab24cc5ea30120ebae454a875a454 --- libavcodec/hevc/hevcdec.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index bbcaa350c7..cda52e05ef 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -1014,14 +1014,7 @@ static int hls_slice_header(HEVCContext *s, GetBitContext *gb) return AVERROR_INVALIDDATA; } - s->local_ctx[0].first_qp_group = !s->sh.dependent_slice_segment_flag; - - if (!pps->cu_qp_delta_enabled_flag) - s->local_ctx[0].qp_y = s->sh.slice_qp; - s->slice_initialized = 1; - s->local_ctx[0].tu.cu_qp_offset_cb = 0; - s->local_ctx[0].tu.cu_qp_offset_cr = 0; return 0; } @@ -2818,6 +2811,14 @@ static int decode_slice_data(HEVCContext *s, const H2645NAL *nal, GetBitContext } } + s->local_ctx[0].first_qp_group = !s->sh.dependent_slice_segment_flag; + + if (!pps->cu_qp_delta_enabled_flag) + s->local_ctx[0].qp_y = s->sh.slice_qp; + + s->local_ctx[0].tu.cu_qp_offset_cb = 0; + s->local_ctx[0].tu.cu_qp_offset_cr = 0; + 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) _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".