Failed combinations (FAILED)

*  forceExplicitReconstruction = VK_TRUE
* BT.709 + Full range
This commit is contained in:
2025-11-20 20:57:33 +09:00
parent d2220b3241
commit fc35c6becd
3 changed files with 15 additions and 2 deletions

View File

@@ -1324,8 +1324,11 @@ bool VulkanVideoRenderer::CreateDescriptorSets() {
bool VulkanVideoRenderer::CreateTextureSampler() {
LOGI("Creating texture sampler...");
// CRITICAL: For NV12/YCbCr textures, we need to attach VkSamplerYcbcrConversionInfo
// This will be set later when we get the YCbCr conversion from VavCore
VkSamplerCreateInfo samplerInfo = {};
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = nullptr; // YCbCr conversion will be added here when frame is decoded
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
@@ -1342,13 +1345,15 @@ bool VulkanVideoRenderer::CreateTextureSampler() {
samplerInfo.minLod = 0.0f;
samplerInfo.maxLod = 0.0f;
// NOTE: This creates a basic sampler without YCbCr conversion
// We'll need to recreate it with YCbCr conversion after first frame decode
VkResult result = vkCreateSampler(m_device, &samplerInfo, nullptr, &m_textureSampler);
if (result != VK_SUCCESS) {
LOGE("Failed to create texture sampler: %d", result);
return false;
}
LOGI("Texture sampler created successfully");
LOGI("Texture sampler created successfully (will be recreated with YCbCr conversion)");
return true;
}

View File

@@ -146,6 +146,7 @@ private:
// Samplers and texture resources
VkSampler m_textureSampler = VK_NULL_HANDLE;
// NOTE: YCbCr conversion is passed per-frame from VavCore, not stored here
// YUV texture resources
VkImage m_yTexture = VK_NULL_HANDLE;

View File

@@ -434,7 +434,14 @@ bool MediaCodecSurfaceManager::CreateVulkanImage(void* vk_device, void* vk_insta
LogInfo(" MediaCodec suggested yChromaOffset: " + std::to_string(ahb_format_props.suggestedYChromaOffset));
LogInfo(" Using MediaCodec suggested chroma offset");
ycbcrConversionCreateInfo.chromaFilter = VK_FILTER_LINEAR;
ycbcrConversionCreateInfo.forceExplicitReconstruction = VK_FALSE;
// Option 7: Force explicit reconstruction for Qualcomm (disable implicit chroma reconstruction)
if (is_qualcomm_gpu) {
ycbcrConversionCreateInfo.forceExplicitReconstruction = VK_TRUE;
LogInfo(" FORCED explicit reconstruction (Qualcomm workaround - Option 7)");
} else {
ycbcrConversionCreateInfo.forceExplicitReconstruction = VK_FALSE;
}
result = vkCreateSamplerYcbcrConversion(device, &ycbcrConversionCreateInfo, nullptr, &m_ycbcr_conversion);
if (result != VK_SUCCESS) {