libyami icon indicating copy to clipboard operation
libyami copied to clipboard

Unable to encode JPEG

Open uartie opened this issue 8 years ago • 1 comments

The yami encoder tries to call vaCreateConfig for profile=VAProfileJPEGBaseline and entrypoint=VAEntrypointEncPicture with a VAConfigAttribRateControl=VA_RC_CQP config attribute. VAConfigAttribRateControl is an unsupported config attribute for JPEG encode. Recently, the intel-vaapi-driver (https://github.com/01org/intel-vaapi-driver/commit/336d8913aa30c2e56493187b5cc28626b978d2cc) enforces strict VAConfigAttribRateControl config attributes and will not allow user/app to specify it if it is unsupported for the given profile/entrypoint.

This prevents libyami from creating a jpeg encoder.

The yami encoder should call vaGetConfigAttributes to determine whether VAConfigAttribRateControl is supported or not and avoid sending VAConfigAttribRateControl if it is VA_ATTRIB_NOT_SUPPORTED.

uartie avatar Jan 23 '18 18:01 uartie

https://github.com/intel/intel-vaapi-driver/pull/345 allows VA_RC_CQP for JPEG now...

However, the bigger issue is that libyami should actually query supported/unsupported attributes instead of hard-coding assumptions about the driver. Thus, this bug is still relevant since a simple driver query would have prevented this problem in the first place.

uartie avatar Jan 25 '18 03:01 uartie