Update AHB default YUV dataspace to YCBCR_601

Eventually, this should probably be fetched from the gralloc buffer metadata using Gralloc4::Get(android::gralloc4::MetadataType_Dataspace) Bug: b/147316305 Bug: b/175132241 Test: launch Cuttlefish w/ SwANGLE Test: cts -m CtsGraphicsTestCases -t MediaVulkanGpuTest#testMediaImportAndRendering Change-Id: Ie991380d2d27e7a540ffe37cfc81109618f2d507 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51688 Presubmit-Ready: Jason Macnak <natsu@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarJason Macnak <natsu@google.com> Commit-Queue: Jason Macnak <natsu@google.com>
parent 1fe25a8a
......@@ -407,7 +407,7 @@ VkResult AHardwareBufferExternalMemory::GetAndroidHardwareBufferFormatProperties
pFormat->externalFormat = ahbDesc.format;
pFormat->formatFeatures = GetVkFormatFeaturesFromAHBFormat(ahbDesc.format);
pFormat->samplerYcbcrConversionComponents = { VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_IDENTITY };
pFormat->suggestedYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709;
pFormat->suggestedYcbcrModel = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_601;
pFormat->suggestedYcbcrRange = VK_SAMPLER_YCBCR_RANGE_ITU_FULL;
pFormat->suggestedXChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
pFormat->suggestedYChromaOffset = VK_CHROMA_LOCATION_COSITED_EVEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment