Commit 3e40afdf authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Added a hack for positive scales (> 10.0f)

parent 393a5381
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -5053,6 +5053,15 @@ __device__ void convertCorrectTile(
    		clt_src   += DTT_SIZE1;
    		clt_dst   += DTT_SIZE;
    	}
    	// A hack to accumulate with positive scale
    } else if (tscale > 10.0f) { // > 10 - scale by (tscale-10) and add
    	float tscale1 = tscale - 10.0f;
    	for (int j = 0; j < DTT_SIZE * 4; j++){ // all 4 components, 8 rows
    		// shared memory tiles use DTT_SIZE1
    		*clt_dst +=  *clt_src * tscale1;
    		clt_src   += DTT_SIZE1;
    		clt_dst   += DTT_SIZE;
    	}
    } else if (tscale > 0)  { // positive - scale and set. For motion blur positive should be first
#pragma unroll
    	for (int j = 0; j < DTT_SIZE * 4; j++){ // all 4 components, 8 rows