Add support for 4-plane frames
This commit is contained in:
parent
0c6c882f50
commit
4a8c9ad17f
2 changed files with 20 additions and 0 deletions
|
|
@ -495,6 +495,21 @@ ssize_t DrmRenderer::exportEGLImages(AVFrame *frame, EGLDisplay dpy,
|
|||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_FD_EXT;
|
||||
attribs[attribIndex++] = object.fd;
|
||||
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_OFFSET_EXT;
|
||||
attribs[attribIndex++] = plane.offset;
|
||||
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_PITCH_EXT;
|
||||
attribs[attribIndex++] = plane.pitch;
|
||||
if (m_EGLExtDmaBuf && object.format_modifier != DRM_FORMAT_MOD_INVALID) {
|
||||
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT;
|
||||
attribs[attribIndex++] = (EGLint)(object.format_modifier & 0xFFFFFFFF);
|
||||
attribs[attribIndex++] = EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT;
|
||||
attribs[attribIndex++] = (EGLint)(object.format_modifier >> 32);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
Q_UNREACHABLE();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,12 +51,17 @@ typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platf
|
|||
#endif
|
||||
|
||||
#ifndef EGL_EXT_image_dma_buf_import_modifiers
|
||||
#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440
|
||||
#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441
|
||||
#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443
|
||||
#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444
|
||||
#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445
|
||||
#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446
|
||||
#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447
|
||||
#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448
|
||||
#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449
|
||||
#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A
|
||||
#endif
|
||||
|
||||
#define EGL_MAX_PLANES 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue