diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-09-08 10:53:59 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-09-08 10:53:59 +0200 |
commit | 21d200b53d25373d96f9399ce25054105b16eb1f (patch) | |
tree | 27e4ce1e36b7feda8f5bfd4b88209f36a53e24ef /src/capture | |
parent | 7d358580a21061136919fec2b980daba3d05d741 (diff) |
Test vaapi plane modifier
Diffstat (limited to 'src/capture')
-rw-r--r-- | src/capture/kms_vaapi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/capture/kms_vaapi.c b/src/capture/kms_vaapi.c index 8e1a693..e5be376 100644 --- a/src/capture/kms_vaapi.c +++ b/src/capture/kms_vaapi.c @@ -255,7 +255,7 @@ static void gsr_capture_kms_vaapi_tick(gsr_capture *cap, AVCodecContext *video_c const int plane = 0; const int div[2] = {1, 2}; // divide UV texture size by 2 because chroma is half size - //const uint64_t modifier = cap_kms->prime.objects[cap_kms->prime.layers[layer].object_index[plane]].drm_format_modifier; + const uint64_t modifier = cap_kms->prime.objects[cap_kms->prime.layers[layer].object_index[plane]].drm_format_modifier; const intptr_t img_attr[] = { EGL_LINUX_DRM_FOURCC_EXT, formats[i], @@ -264,9 +264,8 @@ static void gsr_capture_kms_vaapi_tick(gsr_capture *cap, AVCodecContext *video_c EGL_DMA_BUF_PLANE0_FD_EXT, cap_kms->prime.objects[cap_kms->prime.layers[layer].object_index[plane]].fd, EGL_DMA_BUF_PLANE0_OFFSET_EXT, cap_kms->prime.layers[layer].offset[plane], EGL_DMA_BUF_PLANE0_PITCH_EXT, cap_kms->prime.layers[layer].pitch[plane], - // TODO: - //EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, modifier & 0xFFFFFFFFULL, - //EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, modifier >> 32ULL, + EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, modifier & 0xFFFFFFFFULL, + EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, modifier >> 32ULL, EGL_NONE }; @@ -489,9 +488,8 @@ static int gsr_capture_kms_vaapi_capture(gsr_capture *cap, AVFrame *frame) { EGL_DMA_BUF_PLANE0_FD_EXT, drm_fd->fd, EGL_DMA_BUF_PLANE0_OFFSET_EXT, drm_fd->offset, EGL_DMA_BUF_PLANE0_PITCH_EXT, drm_fd->pitch, - // TODO: - //EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, drm_fd->modifier & 0xFFFFFFFFULL, - //EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, drm_fd->modifier >> 32ULL, + EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, drm_fd->modifier & 0xFFFFFFFFULL, + EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, drm_fd->modifier >> 32ULL, EGL_NONE }; |