diff options
author | Shaofei Wang <shaofei.wang@intel.com> | 2019-06-11 02:52:29 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2020-09-23 13:47:36 -0400 |
commit | eb6bb8f32fdc9be89cce65869dce9dd950e91be2 (patch) | |
tree | 5c01a0ee19dc2c3c7b4c86a6581a166817430d9e /libpostproc | |
parent | d8ce8e8ed37e05136c96ac61f7aee83638d0600a (diff) | |
download | ffmpeg-eb6bb8f32fdc9be89cce65869dce9dd950e91be2.tar.gz |
libavcodec/vp8dec: fix the multi-thread HWAccel decode error
Fix the issue: https://github.com/intel/media-driver/issues/317
the root cause is update_dimensions will be called multple times
when decoder thread number is not only 1, but update_dimensions
call get_pixel_format in each decode thread will trigger the
hwaccel_uninit/hwaccel_init more than once. But only one hwaccel
should be shared with all decode threads.
in current context,
there are 3 situations in the update_dimensions():
1. First time calling. No matter single thread or multithread,
get_pixel_format() should be called after dimensions were
set;
2. Dimention changed at the runtime. Dimention need to be
updated when macroblocks_base is already allocated,
get_pixel_format() should be called to recreate new frames
according to updated dimension;
3. Multithread first time calling. After decoder init, the
other threads will call update_dimensions() at first time
to allocate macroblocks_base and set dimensions.
But get_pixel_format() is shouldn't be called due to low
level frames and context are already created.
In this fix, we only call update_dimensions as need.
Signed-off-by: Wang, Shaofei <shaofei.wang@intel.com>
Reviewed-by: Jun, Zhao <jun.zhao@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libpostproc')
0 files changed, 0 insertions, 0 deletions