diff --git a/vk_video_decoder/libs/VkVideoDecoder/VkVideoDecoder.cpp b/vk_video_decoder/libs/VkVideoDecoder/VkVideoDecoder.cpp index b21a056a..335cb9fa 100644 --- a/vk_video_decoder/libs/VkVideoDecoder/VkVideoDecoder.cpp +++ b/vk_video_decoder/libs/VkVideoDecoder/VkVideoDecoder.cpp @@ -352,10 +352,10 @@ int32_t VkVideoDecoder::StartVideoSequence(VkParserDetectedVideoFormat* pVideoFo if ((m_enableDecodeComputeFilter == VK_FALSE) && (m_useLinearOutput == VK_TRUE)) { // If the compute filter is not enabled and we need linear images - // Use a transfer operation to copy the decoder's output to a linear image. - m_useTransferOperation = VK_TRUE; if (m_dpbAndOutputCoincide == VK_TRUE) { + // Use a transfer operation to copy the decoder's output to a linear image. + m_useTransferOperation = VK_TRUE; // We need an extra image for the filter output for coincide - linear or optimal image m_imageSpecsIndex.linearOut = imageSpecsIndex++; diff --git a/vk_video_decoder/libs/VulkanVideoFrameBuffer/VulkanVideoFrameBuffer.cpp b/vk_video_decoder/libs/VulkanVideoFrameBuffer/VulkanVideoFrameBuffer.cpp index 5a8d9dd5..93fc722d 100644 --- a/vk_video_decoder/libs/VulkanVideoFrameBuffer/VulkanVideoFrameBuffer.cpp +++ b/vk_video_decoder/libs/VulkanVideoFrameBuffer/VulkanVideoFrameBuffer.cpp @@ -504,6 +504,10 @@ class VkVideoFrameBuffer : public VulkanVideoFrameBuffer { { uint8_t linearOutImageType = m_perFrameDecodeImageSet[pictureIndex].m_imageSpecsIndex.linearOut; + if (linearOutImageType == InvalidImageTypeIdx) { + linearOutImageType = m_perFrameDecodeImageSet[pictureIndex].m_imageSpecsIndex.decodeOut; + } + if (m_perFrameDecodeImageSet[pictureIndex].ImageExist(linearOutImageType)) { pDecodedFrame->imageViews[VulkanDisplayFrame::IMAGE_VIEW_TYPE_LINEAR].view = m_perFrameDecodeImageSet[pictureIndex].GetImageView(linearOutImageType); pDecodedFrame->imageViews[VulkanDisplayFrame::IMAGE_VIEW_TYPE_LINEAR].singleLevelView = m_perFrameDecodeImageSet[pictureIndex].GetSingleLevelImageView(linearOutImageType);