Skip to content

Commit

Permalink
Use the correct colorspace for YUV capture
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken authored and misyltoad committed Oct 11, 2024
1 parent 751b97c commit 3fad657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3822,7 +3822,7 @@ std::optional<uint64_t> vulkan_screenshot( const struct FrameInfo_t *frameInfo,
{
float scale = (float)pScreenshotTexture->width() / pYUVOutTexture->width();

CaptureConvertBlitData_t constants( scale, colorspace_to_conversion_from_srgb_matrix( pScreenshotTexture->streamColorspace() ) );
CaptureConvertBlitData_t constants( scale, colorspace_to_conversion_from_srgb_matrix( pYUVOutTexture->streamColorspace() ) );
constants.halfExtent[0] = pYUVOutTexture->width() / 2.0f;
constants.halfExtent[1] = pYUVOutTexture->height() / 2.0f;
cmdBuffer->uploadConstants<CaptureConvertBlitData_t>(constants);
Expand Down Expand Up @@ -4042,7 +4042,7 @@ std::optional<uint64_t> vulkan_composite( struct FrameInfo_t *frameInfo, gamesco
float scale = (float)compositeImage->width() / pPipewireTexture->width();
if ( ycbcr )
{
CaptureConvertBlitData_t constants( scale, colorspace_to_conversion_from_srgb_matrix( compositeImage->streamColorspace() ) );
CaptureConvertBlitData_t constants( scale, colorspace_to_conversion_from_srgb_matrix( pPipewireTexture->streamColorspace() ) );
constants.halfExtent[0] = pPipewireTexture->width() / 2.0f;
constants.halfExtent[1] = pPipewireTexture->height() / 2.0f;
cmdBuffer->uploadConstants<CaptureConvertBlitData_t>(constants);
Expand Down

0 comments on commit 3fad657

Please sign in to comment.