diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-06-05 07:14:06 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-09-06 13:59:29 +0200 |
commit | 4c0d669b20e89ba4e4ac1e05195cf1634c8945cc (patch) | |
tree | 41422fb4c6242c4737a2c1265735dfdcf74d100f /libavcodec/vdpau_hevc.c | |
parent | c35a51f4bb1b143a24d38e09967da0ecb0b58231 (diff) | |
download | ffmpeg-4c0d669b20e89ba4e4ac1e05195cf1634c8945cc.tar.gz |
lavc/hevcdec: add a per-layer context
Start by moving the DPB to it.
Only one context exists for now, so decoder behaviour should not change
with this commit, but that will change in the future.
Diffstat (limited to 'libavcodec/vdpau_hevc.c')
-rw-r--r-- | libavcodec/vdpau_hevc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vdpau_hevc.c b/libavcodec/vdpau_hevc.c index b9e922ecfc..e6232567e0 100644 --- a/libavcodec/vdpau_hevc.c +++ b/libavcodec/vdpau_hevc.c @@ -35,6 +35,7 @@ static int vdpau_hevc_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { HEVCContext *h = avctx->priv_data; + const HEVCLayerContext *l = &h->layers[h->cur_layer]; HEVCFrame *pic = h->cur_frame; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; @@ -236,8 +237,8 @@ static int vdpau_hevc_start_frame(AVCodecContext *avctx, info->PicOrderCntVal[i] = 0; info->IsLongTerm[i] = 0; } - for (size_t i = 0, j = 0; i < FF_ARRAY_ELEMS(h->DPB); i++) { - const HEVCFrame *frame = &h->DPB[i]; + for (size_t i = 0, j = 0; i < FF_ARRAY_ELEMS(l->DPB); i++) { + const HEVCFrame *frame = &l->DPB[i]; if (frame != h->cur_frame && (frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF))) { if (j > 15) { |