Skip to content

Commit

Permalink
decoder: Fix file output for DISTINCT DPB case
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Cheng <[email protected]>
  • Loading branch information
lolzballs authored and zlatinski committed Nov 9, 2024
1 parent 41a88df commit 27fc5df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vk_video_decoder/libs/VkVideoDecoder/VkVideoDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 27fc5df

Please sign in to comment.