opengl colorspace + BT2020
[goodguy/history.git] / cinelerra-5.1 / plugins / yuv / yuv.C
index 28d9fc2a33c507f5349a3b60c5f6b5a752f0c7c8..83f7f03c2d26cda46deb1d2b5b6804e7092e44fa 100644 (file)
@@ -25,7 +25,7 @@
 #include "filexml.h"
 #include "guicast.h"
 #include "language.h"
-#include "cicolors.h"
+#include "bccolors.h"
 #include "pluginvclient.h"
 #include "vframe.h"
 
@@ -302,6 +302,10 @@ void YUVEffect::read_data(KeyFrame *keyframe)
                                        y = temp_type((float)y * y_scale + round); \
                                        u = temp_type((float)(u - (max / 2 + 1)) * u_scale + round) + (max / 2 + 1); \
                                        v = temp_type((float)(v - (max / 2 + 1)) * v_scale + round) + (max / 2 + 1); \
+ \
+                                       CLAMP(y, 0, max); \
+                                       CLAMP(u, 0, max); \
+                                       CLAMP(v, 0, max); \
                                } \
                                else \
                                { \