From 67aa6108c2625ba03b2f240d0ffbe8cb9149e59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Tue, 16 Apr 2024 18:03:33 +0200 Subject: [PATCH] VideoFilters: Fix Blend and Discard deint on Vulkan --- src/modules/VideoFilters/BlendDeint.cpp | 8 ++++++++ src/modules/VideoFilters/DiscardDeint.cpp | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/modules/VideoFilters/BlendDeint.cpp b/src/modules/VideoFilters/BlendDeint.cpp index 44d55f2c6..b1cf49ad5 100644 --- a/src/modules/VideoFilters/BlendDeint.cpp +++ b/src/modules/VideoFilters/BlendDeint.cpp @@ -34,6 +34,14 @@ bool BlendDeint::filter(QQueue &framesQueue) { Frame videoFrame = m_internalQueue.dequeue(); videoFrame.setNoInterlaced(); +#ifdef USE_VULKAN + if (videoFrame.vulkanImage()) + { + auto newFrame = getNewFrame(videoFrame); + videoFrame.copyData(newFrame.dataArr(), newFrame.linesize()); + videoFrame = std::move(newFrame); + } +#endif for (int p = 0; p < 3; ++p) { const int linesize = videoFrame.linesize(p); diff --git a/src/modules/VideoFilters/DiscardDeint.cpp b/src/modules/VideoFilters/DiscardDeint.cpp index 4b1082f09..ba723f6f7 100644 --- a/src/modules/VideoFilters/DiscardDeint.cpp +++ b/src/modules/VideoFilters/DiscardDeint.cpp @@ -35,6 +35,14 @@ bool DiscardDeint::filter(QQueue &framesQueue) Frame videoFrame = m_internalQueue.dequeue(); const bool TFF = isTopFieldFirst(videoFrame); videoFrame.setNoInterlaced(); +#ifdef USE_VULKAN + if (videoFrame.vulkanImage()) + { + auto newFrame = getNewFrame(videoFrame); + videoFrame.copyData(newFrame.dataArr(), newFrame.linesize()); + videoFrame = std::move(newFrame); + } +#endif for (int p = 0; p < 3; ++p) { const int linesize = videoFrame.linesize(p);