Open uartie opened 6 years ago
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.
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.