[FFmpeg-devel] [PATCH 2/2] lavc/vaapi_encode: fix the mismatched vbvBuf size unit for mpeg2

Mark Thompson sw at jkqxz.net
Thu Jan 24 01:37:48 EET 2019


On 16/01/2019 14:34, Linjie Fu wrote:
> hrd_buffer_size and hrd_initial_buffer_fullness are set in bits, while
> driver takes the vbvBuf size in 16 kbits. The mismatch will cause
> quality issue.
> 
> One way to solve this issue in FFmpeg level is set the bufsize
> specially for mpeg2 as the unit of 16 kbits, and discard the default
> CBR mode in driver.
> 
> Fix the quality issue in #7650.
> 
> Signed-off-by: Linjie Fu <linjie.fu at intel.com>
> ---
>  libavcodec/vaapi_encode.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

The documentation is very clear that these values are all in bits - <https://github.com/intel/libva/blob/master/va/va.h#L2095-L2100>.

Sounds like a driver bug?

- Mark


More information about the ffmpeg-devel mailing list