libva
libva copied to clipboard
add interface for modifier query
- this interface is for modifier query/negotiation. it could query the modifier list for a given format under a config
- it support different modifier list for different format. for example: ARGB maybe just support linear, RGB maybe support linear only, NV12 support tile4 etc.
Maybe, I think, we just need to extend the "vaQuerySurfaceAttributes" a little.
For example, we define a new type VASurfaceAttribDRMFormatModifiersForFormat after VASurfaceAttribDRMFormatModifiers.
The VASurfaceAttribDRMFormatModifiers return all possible modifiers for a config, while the VASurfaceAttribDRMFormatModifiersForFormat just return the modifiers for some specific format of that config.
And we define a struct, such as: struct { uint32_t format; VADRMFormatModifierList drm_list; }; as the VAGenericValue.p of that VASurfaceAttrib query. The format is input and drm_list is the output?
Then we can avoid define a new API.
Maybe, I think, we just need to extend the "vaQuerySurfaceAttributes" a little.
But that's already in place https://github.com/intel/libva/pull/505
Sadly, media-driver, neither mesa still no have an implementation for vaQuerySurfaceAttributes. Mesa only implemented the vaCreateSurface part.
any chance to get this mergered? The capability would help us a lot with color accuracy.