forked from enlightenment/efl
evas: forgotten patch for enabling colorspace properly.
SVN revision: 63152
This commit is contained in:
parent
54373b9fbe
commit
f6f2eb77f7
|
@ -21,6 +21,8 @@ evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *imag
|
|||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
|
||||
w &= ~0x1;
|
||||
dst->cache_entry.w = w;
|
||||
dst->cache_entry.h = h;
|
||||
|
@ -45,21 +47,23 @@ evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA3
|
|||
/* FIXME: Is dst->image.data valid. */
|
||||
switch (cspace)
|
||||
{
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
dst->cache_entry.flags.alpha = alpha ? 1 : 0;
|
||||
if (image_data)
|
||||
memcpy(dst->image.data, image_data, w * h * sizeof(DATA32));
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422601_PL:
|
||||
dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2);
|
||||
if (image_data && (dst->cs.data))
|
||||
memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
case EVAS_COLORSPACE_ARGB8888:
|
||||
dst->cache_entry.flags.alpha = alpha ? 1 : 0;
|
||||
if (image_data)
|
||||
memcpy(dst->image.data, image_data, w * h * sizeof(DATA32));
|
||||
break;
|
||||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
|
||||
dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2);
|
||||
if (image_data && (dst->cs.data))
|
||||
memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2);
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
dst->cache_entry.space = cspace;
|
||||
|
@ -76,15 +80,16 @@ evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, u
|
|||
|
||||
if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL))
|
||||
w &= ~0x1;
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL))
|
||||
{
|
||||
w &= ~0x1;
|
||||
dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
|
||||
}
|
||||
|
||||
dst->flags = im->flags;
|
||||
dst->cs.no_free = 0;
|
||||
if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
|
||||
(im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL))
|
||||
dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
|
||||
evas_common_image_colorspace_dirty(dst);
|
||||
|
||||
_evas_common_rgba_image_post_surface(ie_dst);
|
||||
|
@ -109,6 +114,8 @@ evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace)
|
|||
case EVAS_COLORSPACE_YCBCR422P601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422P709_PL:
|
||||
case EVAS_COLORSPACE_YCBCR422601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420TM12601_PL:
|
||||
case EVAS_COLORSPACE_YCBCR420NV12601_PL:
|
||||
if (dst->image.no_free)
|
||||
{
|
||||
ie_dst->allocated.w = 0;
|
||||
|
|
Loading…
Reference in New Issue