libva icon indicating copy to clipboard operation
libva copied to clipboard

add interface for modifier query

Open XinfengZhang opened this issue 2 years ago • 3 comments

  1. this interface is for modifier query/negotiation. it could query the modifier list for a given format under a config
  2. it support different modifier list for different format. for example: ARGB maybe just support linear, RGB maybe support linear only, NV12 support tile4 etc.

XinfengZhang avatar Apr 16 '22 10:04 XinfengZhang

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.

HeJunyan avatar Apr 22 '22 07:04 HeJunyan

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.

ceyusa avatar May 18 '22 18:05 ceyusa

any chance to get this mergered? The capability would help us a lot with color accuracy.

alatteri avatar Feb 13 '24 12:02 alatteri