From 260e67f83eae47fc874cf66bb25d9749aeec9d18 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Wed, 26 Aug 2020 15:43:41 +0300
Subject: [PATCH] Fix lossy float decode filter bug

---
 components/codecs/src/depth_convert.cu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/codecs/src/depth_convert.cu b/components/codecs/src/depth_convert.cu
index d69ef3348..3b86d6c3d 100644
--- a/components/codecs/src/depth_convert.cu
+++ b/components/codecs/src/depth_convert.cu
@@ -172,7 +172,7 @@ __device__ inline float2 readChroma(const T* __restrict__ chroma, int pitch, uin
 
 template <typename T>
 __device__ inline float2 bilinChroma(const T* __restrict__ chroma, int pitch, uint x, uint y, const float2 &D, int dx, int dy, int width, int height) {
-	if (uint(x+dx) >= width || uint(y+dy) >= height/2) return D;
+	if (uint(x+dx) >= width || uint(y+dy) >= height) return D;
 
 	float2 A = readChroma(chroma, pitch, x+dx, y+dy);
 	float2 B = readChroma(chroma, pitch, x, y+dy);
-- 
GitLab