[FFmpeg-cvslog] fftools/qsv: add extra_hw_frames support

Zhong Li git at videolan.org
Tue Aug 7 06:29:49 EEST 2018


ffmpeg | branch: master | Zhong Li <zhong.li at intel.com> | Wed Jul 25 16:05:38 2018 +0800| [6434b84460bb8b996bc52b33b2012e6b05d3a459] | committer: Zhong Li

fftools/qsv: add extra_hw_frames support

Currently extra_hw_frames can't be applied to qsv since it
doesn't call function avcodec_get_hw_frames_parameters().

Give an option to fix ticket #7261 though it is not a perfect soultion
(allocate the minimum pool size internally and automatically).

Signed-off-by: Zhong Li <zhong.li at intel.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6434b84460bb8b996bc52b33b2012e6b05d3a459
---

 fftools/ffmpeg_qsv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_qsv.c b/fftools/ffmpeg_qsv.c
index 7442750029..9c4285b6c7 100644
--- a/fftools/ffmpeg_qsv.c
+++ b/fftools/ffmpeg_qsv.c
@@ -93,7 +93,7 @@ int qsv_init(AVCodecContext *s)
     frames_ctx->height            = FFALIGN(s->coded_height, 32);
     frames_ctx->format            = AV_PIX_FMT_QSV;
     frames_ctx->sw_format         = s->sw_pix_fmt;
-    frames_ctx->initial_pool_size = 64;
+    frames_ctx->initial_pool_size = 64 + s->extra_hw_frames;
     frames_hwctx->frame_type      = MFX_MEMTYPE_VIDEO_MEMORY_DECODER_TARGET;
 
     ret = av_hwframe_ctx_init(ist->hw_frames_ctx);



More information about the ffmpeg-cvslog mailing list