Skip to content

libs: video-format: Improve the video format mapping.

He Junyan requested to merge He_Junyan/gstreamer-vaapi:color_mapping into master

The format mapping between GstVideoFormat and VAImageFormat have following problems:

  1. Use G_BYTE_ORDER to judge the VA_MSB_FIRST or VA_LSB_FIRST. The G_BYTE_ORDER is defined by glib and is the result of CPU platform. That does not mean all devices using VA interfaces need to be the same byte order.
  2. There are channels reorder between LSB and MSB. Gstreamer always define video format in MSB, need to re-order the channels if VA driver is LSB.

We modify it to generate a dynamically runtime video format map, consider both LSB and MSB drivers. Also consider driver special formats.

Fix #180 (closed) Fix #179 (closed)

Merge request reports

Loading