diff options
author | N.N. <sevyves@users.sourceforge.net> | 2009-09-17 17:04:10 +0000 |
---|---|---|
committer | N.N. <sevyves@users.sourceforge.net> | 2009-09-17 17:04:10 +0000 |
commit | c8914c3217d54862370902fd36b1f8496cea7c51 (patch) | |
tree | 733570baf9816d306006b750349e84d9684477cd /modules/pdp_cmap.c | |
parent | 571ab6c2132878c79a00227f81b42c4a48c1d91f (diff) |
P.i.D.i.P. version 0.12.24 (see CHANGES.LOG)
svn path=/trunk/externals/pidip/; revision=12385
Diffstat (limited to 'modules/pdp_cmap.c')
-rw-r--r-- | modules/pdp_cmap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/pdp_cmap.c b/modules/pdp_cmap.c index 994dc24..ec377fc 100644 --- a/modules/pdp_cmap.c +++ b/modules/pdp_cmap.c @@ -282,9 +282,9 @@ static void pdp_cmap_pick(t_pdp_cmap *x) x->x_colorG = yuv_YUVtoG( y, u, v ); x->x_colorB = yuv_YUVtoB( y, u, v ); if (glist_isvisible(x->x_canvas)) pdp_cmap_draw_color( x, x->x_colorR, x->x_colorG, x->x_colorB ); - x->x_colors[x->x_current].y = 255; - x->x_colors[x->x_current].u = 255; - x->x_colors[x->x_current].v = 255; + x->x_colors[x->x_current].y = rand() & 255; + x->x_colors[x->x_current].u = rand() & 255; + x->x_colors[x->x_current].v = rand() & 255; x->x_colors[x->x_current].on = 1; } } @@ -362,8 +362,8 @@ static void pdp_cmap_process_yv12(t_pdp_cmap *x) { // change color not luminosity // *pfY = x->x_colors[ci].y; - *pfV = x->x_colors[ci].v; - *pfU = x->x_colors[ci].u; + *pfV = ( x->x_colors[ci].v - 128 )<<8; + *pfU = ( x->x_colors[ci].u - 128 )<<8; } pfY++;poY++; @@ -533,7 +533,6 @@ void pdp_cmap_setup(void) class_addmethod(pdp_cmap_class, (t_method)pdp_cmap_delete, gensym("delete"), A_DEFFLOAT, A_NULL); class_addmethod(pdp_cmap_class, (t_method)pdp_cmap_resize, gensym("resize"), A_DEFFLOAT, A_NULL); class_addmethod(pdp_cmap_class, (t_method)pdp_cmap_setcur, gensym("setcur"), A_DEFFLOAT, A_DEFFLOAT, A_NULL); - } #ifdef __cplusplus |