diff options
author | Zhong Li <zhong.li@intel.com> | 2019-06-05 16:56:27 +0800 |
---|---|---|
committer | Zhong Li <zhong.li@intel.com> | 2019-06-10 13:48:06 +0800 |
commit | ef56c28b2596eea233860d8c90f054e76da44758 (patch) | |
tree | 83f4387ec30a08c227373fd65a53f099c79fe727 /libavfilter/qsvvpp.c | |
parent | b12432721611ea7a0936645dcbd57b3b8f7d56e6 (diff) | |
download | ffmpeg-ef56c28b2596eea233860d8c90f054e76da44758.tar.gz |
lavf/qsvvpp: add extra_hw_frames support
extra_hw_frames is needed for some cases.
(eg: qsv decoding + qsv vpp + qsv look_ahead encoding, transcoding
failed if no extra_hw_frames supported:
ffmpeg -hwaccel qsv -c:v h264_qsv -i bbb_sunflower_1080p_30fps_normal_2000frames.mp4 \
-vf vpp_qsv=w=1280:h=720:extra_hw_frames=100 -v verbose -c:v h264_qsv \
-look_ahead 1 -look_ahead_depth 100 out1.mp4
)
Signed-off-by: Zhong Li <zhong.li@intel.com>
Diffstat (limited to 'libavfilter/qsvvpp.c')
-rw-r--r-- | libavfilter/qsvvpp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 5cd1d5d345..b5ef74efa4 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -460,6 +460,8 @@ static int init_vpp_session(AVFilterContext *avctx, QSVVPPContext *s) out_frames_ctx->height = FFALIGN(outlink->h, 32); out_frames_ctx->sw_format = s->out_sw_format; out_frames_ctx->initial_pool_size = 64; + if (avctx->extra_hw_frames > 0) + out_frames_ctx->initial_pool_size += avctx->extra_hw_frames; out_frames_hwctx->frame_type = s->out_mem_mode; ret = av_hwframe_ctx_init(out_frames_ref); |