Message ID | 20240523083246.31844-1-llyyr.public@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] lavc/vp9: reset segmentation fields when segmentation isn't enabled | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 6e2d18bf9595..8ede2e2eb358 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -709,6 +709,12 @@ static int decode_frame_header(AVCodecContext *avctx, s->s.h.segmentation.feat[i].skip_enabled = get_bits1(&s->gb); } } + } else { + // Reset fields under segmentation switch if segmentation is disabled. + // This is necessary because some hwaccels don't ignore these fields + // if segmentation is disabled. + s->s.h.segmentation.temporal = 0; + s->s.h.segmentation.update_map = 0; } // set qmul[] based on Y/UV, AC/DC and segmentation Q idx deltas