X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbccolors.C;h=5d181696488497b91c093c29a28f74ffab806dd4;hp=78aaf64f05852adaf999efb5929b90a5844c1f1a;hb=a6369311556cc1e1877142181d8606e4f68aa803;hpb=af44bff549c39ac8bb6e42a791e7a211e1013526 diff --git a/cinelerra-5.1/guicast/bccolors.C b/cinelerra-5.1/guicast/bccolors.C index 78aaf64f..5d181696 100644 --- a/cinelerra-5.1/guicast/bccolors.C +++ b/cinelerra-5.1/guicast/bccolors.C @@ -126,8 +126,9 @@ int HSV::hsv_to_yuv(int &y, int &u, int &v, float h, float s, float va, int max) YUV YUV::yuv; -float YUV::rgb_to_yuv_matrix[10]; -float YUV::yuv_to_rgb_matrix[10]; +float YUV::yuv_to_rgb_matrix[9]; +float YUV::rgb_to_yuv_matrix[9]; +float YUV::rgb_to_y_vector[3]; YUV::YUV() { @@ -232,7 +233,10 @@ void YUV::init(double Kr, double Kb, int mpeg) rgb_to_yuv_matrix[6] = b_to_y; rgb_to_yuv_matrix[7] = b_to_u; rgb_to_yuv_matrix[8] = b_to_v; - rgb_to_yuv_matrix[9] = yminf; + + rgb_to_y_vector[0] = r_to_y; + rgb_to_y_vector[1] = g_to_y; + rgb_to_y_vector[2] = b_to_y; float yscale = 1.f / yrangef; yuv_to_rgb_matrix[0] = yscale; @@ -244,7 +248,6 @@ void YUV::init(double Kr, double Kb, int mpeg) yuv_to_rgb_matrix[6] = v_to_r; yuv_to_rgb_matrix[7] = v_to_g; yuv_to_rgb_matrix[8] = 0; - yuv_to_rgb_matrix[9] = yminf; } void YUV::init_tables(int len,