Some filters may not need to do linearize/delinearize, thus
will even not define them. Add ifdef check, so they could easily
re-use the .cl file.
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
float3 yuv2lrgb(float3 yuv) {
float3 rgb = yuv2rgb(yuv.x, yuv.y, yuv.z);
float3 yuv2lrgb(float3 yuv) {
float3 rgb = yuv2rgb(yuv.x, yuv.y, yuv.z);
float r = linearize(rgb.x);
float g = linearize(rgb.y);
float b = linearize(rgb.z);
return (float3)(r, g, b);
float r = linearize(rgb.x);
float g = linearize(rgb.y);
float b = linearize(rgb.z);
return (float3)(r, g, b);
+#else
+ return rgb;
+#endif
}
float3 rgb2yuv(float r, float g, float b) {
}
float3 rgb2yuv(float r, float g, float b) {
}
float3 lrgb2yuv(float3 c) {
}
float3 lrgb2yuv(float3 c) {
float r = delinearize(c.x);
float g = delinearize(c.y);
float b = delinearize(c.z);
float r = delinearize(c.x);
float g = delinearize(c.y);
float b = delinearize(c.z);
+#else
+ return rgb2yuv(c.x, c.y, c.z);
+#endif
}
float lrgb2y(float3 c) {
}
float lrgb2y(float3 c) {
float r = delinearize(c.x);
float g = delinearize(c.y);
float b = delinearize(c.z);
float r = delinearize(c.x);
float g = delinearize(c.y);
float b = delinearize(c.z);
+#else
+ return rgb2y(c.x, c.y, c.z);
+#endif
}
float3 lrgb2lrgb(float3 c) {
}
float3 lrgb2lrgb(float3 c) {