Add upstreamed NV15 format used by Rockchip devices

This commit is contained in:
Cameron Gutman 2023-03-11 11:44:36 -06:00
parent e1c4a488ed
commit 5baa8c680a

View file

@ -7,8 +7,13 @@ extern "C" {
#include <libdrm/drm_fourcc.h> #include <libdrm/drm_fourcc.h>
// Special Rockchip type // Special Rockchip type
#ifndef DRM_FORMAT_NV12_10 #ifndef DRM_FORMAT_NA12
#define DRM_FORMAT_NV12_10 fourcc_code('N', 'A', '1', '2') #define DRM_FORMAT_NA12 fourcc_code('N', 'A', '1', '2')
#endif
// Same as NA12 but upstreamed
#ifndef DRM_FORMAT_NV15
#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')
#endif #endif
// Special Raspberry Pi type (upstreamed) // Special Raspberry Pi type (upstreamed)
@ -347,7 +352,8 @@ bool DrmRenderer::initialize(PDECODER_PARAMETERS params)
switch (plane->formats[j]) { switch (plane->formats[j]) {
case DRM_FORMAT_P010: case DRM_FORMAT_P010:
case DRM_FORMAT_P030: case DRM_FORMAT_P030:
case DRM_FORMAT_NV12_10: case DRM_FORMAT_NA12:
case DRM_FORMAT_NV15:
matchingFormat = true; matchingFormat = true;
break; break;
} }