Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common Modified Files: evas_image_main.c Log Message: not complete yet - actually i need help with the fragment shader. in evas_gl_texture.c i have a frag shader, and it tries to use a set of 3 textures that act as the yuv planes, BUT the u and v textures (Utex and Vtex) are simply getting values from the Ytex - regardless of what i try. grrr. what's up with that? =================================================================== RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- evas_image_main.c 13 Nov 2006 23:23:43 -0000 1.39 +++ evas_image_main.c 17 Dec 2006 15:48:50 -0000 1.40 @@ -258,6 +258,7 @@ if (!im) return NULL; im->flags = RGBA_IMAGE_NOTHING; im->ref = 1; + im->cs.space = EVAS_COLORSPACE_ARGB8888; return im; } @@ -266,6 +267,11 @@ { im->ref--; if (im->ref > 0) return; + if (im->cs.data != im->image->data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = NULL; evas_common_pipe_free(im); if (im->image) evas_common_image_surface_free(im->image); if (im->info.file) evas_stringshare_del(im->info.file); @@ -305,6 +311,39 @@ evas_common_image_free(im); } } +} + +EAPI void +evas_common_image_colorspace_normalize(RGBA_Image *im) +{ + if ((!im->cs.data) || (!im->cs.dirty)) return; + switch (im->cs.space) + { + case EVAS_COLORSPACE_ARGB8888: + if (im->image->data != im->cs.data) + { + if (!im->image->no_free) free(im->image->data); + im->image->data = im->cs.data; + im->cs.no_free = im->image->no_free; + } + break; + case EVAS_COLORSPACE_YCBCR422P601_PL: + if ((im->image->data) && (*((unsigned char **)im->cs.data))) + evas_common_convert_yuv_420p_601_rgba(im->cs.data, im->image->data, + im->image->w, im->image->h); + break; + case EVAS_COLORSPACE_YCBCR422P709_PL: + break; + default: + break; + } + im->cs.dirty = 0; +} + +EAPI void +evas_common_image_colorspace_dirty(RGBA_Image *im) +{ + im->cs.dirty = 1; } EAPI void ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs