aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/hwcontext_opencl.c
diff options
context:
space:
mode:
authorWenbin Chen <wenbin.chen-at-intel.com@ffmpeg.org>2022-01-11 14:55:37 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2022-01-29 12:02:52 +0800
commita5b1e632c96727e485419748b4bd2241b5b22fe3 (patch)
tree297e3224063b5c12e536f230224975e88fa25830 /libavutil/hwcontext_opencl.c
parent35080149ef5044694109037f6c6ee176382f357a (diff)
downloadffmpeg-a5b1e632c96727e485419748b4bd2241b5b22fe3.tar.gz
libavcodec/vaapi_decode: fix the problem that init_pool_size < nb_surface
For vaapi if the init_pool_size is not zero, the pool size is fixed. This means max surfaces is init_pool_size, but when mapping vaapi frame to qsv frame, the init_pool_size < nb_surface. The cause is that vaapi_decode_make_config() config the init_pool_size and it is called twice. The first time is to init frame_context and the second time is to init codec. On the second time the init_pool_size is changed to original value so the init_pool_size is lower than the reall size because pool_size used to initialize frame_context need to plus thread_count and 3 (guarantee 4 base work surfaces). Now add code to make sure init_pool_size is only set once. Now the following commandline works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 \ -hwaccel_output_format vaapi -i input.264 \ -vf "hwmap=derive_device=qsv,format=qsv" \ -c:v h264_qsv output.264 Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Diffstat (limited to 'libavutil/hwcontext_opencl.c')
0 files changed, 0 insertions, 0 deletions