 }
 
 // sum of magnitudes of A and B treated as legs of a right triangle
+// should be 2 pixels per thread
 __global__
 void kernelVectorSum(const void* const inputA, const unsigned pitchInputA,
 					 const void* const inputB, const unsigned pitchInputB,

	const unsigned gridYidx = blockIdx.y * blockDim.y + threadIdx.y;

	// kill threads that are out of bounds
	if(gridXidx * 2 >= pixelsWidth || gridYidx >= pixelsHeight)
		return;

	// destinations for packed data

		if(!matchedHeight)
			grid.y++;

		kernelNV12toRGBA<true><<< grid, block >>>(NV12input.data(), NV12input.pitch(),
												  RGBAoutput.data(), RGBAoutput.pitch(),
												  RGBAoutput.width(), RGBAoutput.height());

		// sync and check for errors
		cudaDeviceSynchronize(); cudaErr(cudaGetLastError());
