Opened 2 years ago

Closed 2 years ago

Last modified 18 months ago

#9421 closed enhancement (fixed)

Add support for X2BGR10LE pixel format

Reported by: mstoeckl Owned by:
Priority: wish Component: swscale
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Adding X2BGR10LE to the list of pixel formats would make it possible
to represent data copied from a buffer which has format
DRM_FORMAT_XBGR2101010 = GL_RGB10. Support in swscale(?) may also
be necessary to make it possible to encode buffers in this format.

Such data can for example be created when recording the screen or the
output of an OpenGL game directly. On Wayland, some compositors may
support 10 bit color depth in the near future, and Mesa sometimes
picks EGL configs with 10 bit depth for OpenGL programs. The natural
OpenGL internal format here is GL_RGB10, which when exported to a
DMABUF has format DRM_FORMAT_XBGR2101010.

For specific motivation, see:
https://github.com/ammen99/wf-recorder/issues/155

Attachments (1)

0001-avutil-swscale-kmsgrab-add-AV_PIX_FMT_X2BGR10-LE-BE.patch (9.3 KB ) - added by mstoeckl 2 years ago.
A patch which worksforme; will send to ffmpeg-devel after cleanup

Download all attachments as: .zip

Change History (3)

by mstoeckl, 2 years ago

A patch which worksforme; will send to ffmpeg-devel after cleanup

comment:1 by mstoeckl, 2 years ago

Resolution: fixed
Status: newclosed

comment:2 by Carl Eugen Hoyos, 18 months ago

Component: undeterminedswscale
Keywords: format removed
Priority: normalwish
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.