We want to be able to Interpolate on RGB pixels, reading from YUV or other types of images, directly.
For that, we will separate the interpolate function into read 2x2 and interpolate functions.
The result of the read, 4 pixels, will be passed to the device function that converst the corresponding YUV to the corresponding RGB. To do so, we need to return an struct with the 4 pixels, and pass them to a DeviceFunction that applies the same operation to each of the pixels, and returns a data type with the 4 converted pixels.
Then we will pass the 4 converted pixels either to the same new DeviceFunction to apply 4 more operations, or to the interpolation operation that will return a single pixel.
We want to be able to Interpolate on RGB pixels, reading from YUV or other types of images, directly.
For that, we will separate the interpolate function into read 2x2 and interpolate functions.
The result of the read, 4 pixels, will be passed to the device function that converst the corresponding YUV to the corresponding RGB. To do so, we need to return an struct with the 4 pixels, and pass them to a DeviceFunction that applies the same operation to each of the pixels, and returns a data type with the 4 converted pixels.
Then we will pass the 4 converted pixels either to the same new DeviceFunction to apply 4 more operations, or to the interpolation operation that will return a single pixel.