diff mbox series

[FFmpeg-devel,v5,6/9] avcodec/vaapi: increase av1 decode pool size

Message ID 20211012082404.31639-6-fei.w.wang@intel.com
State New
Headers show
Series [FFmpeg-devel,v5,1/9] cbs_av1: fix incorrect data type
Related show


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Wang, Fei W Oct. 12, 2021, 8:24 a.m. UTC
For film grain clip, vaapi_av1 decoder will cache additional 8
surfaces that will be used to store frames which apply film grain.
So increase the pool size by plus 8 to avoid leak of surface.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
 libavcodec/vaapi_decode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 958ddf49da..665af370ed 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -577,10 +577,10 @@  static int vaapi_decode_make_config(AVCodecContext *avctx,
         switch (avctx->codec_id) {
         case AV_CODEC_ID_H264:
         case AV_CODEC_ID_HEVC:
+        case AV_CODEC_ID_AV1:
             frames->initial_pool_size += 16;
         case AV_CODEC_ID_VP9:
-        case AV_CODEC_ID_AV1:
             frames->initial_pool_size += 8;
         case AV_CODEC_ID_VP8: