aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2011-10-04 16:09:10 -0400
committerCrystalP <CrystalP@xbmc.org>2011-10-04 20:42:53 -0400
commitd53cb41cc207a9f08bfab4a44b1054eaafea7d18 (patch)
tree6319dc1636cec095b5afdcabfb7d955e3255e170
parent55a903c6eac1c97c06153deb34faed47b8c23195 (diff)
Fix zooming with the separated convolution shader
-rw-r--r--xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
index 47912a87b9..0e3df464da 100644
--- a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
+++ b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
@@ -28,7 +28,7 @@
#include <map>
#include "ConvolutionKernels.h"
#include "YUV2RGBShader.h"
-
+#include "../WinRenderer.h"
CYUV2RGBMatrix::CYUV2RGBMatrix()
{
@@ -733,6 +733,11 @@ void CConvolutionShaderSeparable::PrepareParameters(unsigned int sourceWidth, un
CUSTOMVERTEX* v;
CWinShader::LockVertexBuffer((void**)&v);
+ // Alter rectangles the destination rectangle exceeds the intermediate target width when zooming and causes artifacts.
+ // Work on the parameters rather than the members to avoid disturbing the parameter change detection the next time the function is called
+ CRect tgtRect(0, 0, destWidth, destHeight);
+ CWinRenderer::CropSource(sourceRect, destRect, tgtRect);
+
// Manipulate the coordinates to work only on the active parts of the textures,
// and therefore avoid the need to clear surfaces/render targets