const char *file;
const char *key;
int frame;
- int cspace;
+ Evas_Colorspace cspace;
unsigned char smooth_scale : 1;
unsigned char has_alpha :1;
obj);
}
if (!o->engine_data) return NULL;
- if (!o->cur.cspace == to_cspace) return NULL;
+ if (o->cur.cspace == to_cspace) return NULL;
data = NULL;
o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
o->engine_data,
{
void *out = NULL;
+ fprintf(stderr, "data: %p (%i)\n", data, o->cur.cspace);
if (!data)
return NULL;
o->cur.has_alpha,
to_cspace);
break;
+ case EVAS_COLORSPACE_YCBCR422601_PL:
+ fprintf(stderr, "EVAS_COLORSPACE_YCBCR422601_PL:\n");
+ out = evas_common_convert_yuv_422_601_to(data,
+ o->cur.image.w,
+ o->cur.image.h,
+ to_cspace);
+ break;
+ case EVAS_COLORSPACE_YCBCR422P601_PL:
+ out = evas_common_convert_yuv_422P_601_to(data,
+ o->cur.image.w,
+ o->cur.image.h,
+ to_cspace);
+ break;
default:
+ fprintf(stderr, "unknow colorspace: %i\n", o->cur.cspace);
break;
}
return NULL;
}
+EAPI void *
+evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace)
+{
+ switch (cspace)
+ {
+ case EVAS_COLORSPACE_ARGB8888:
+ {
+ void *dst;
+
+ fprintf(stderr, "to argb888\n");
+
+ dst = malloc(sizeof (unsigned int) * w * h);
+ if (!dst) return NULL;
+
+ evas_common_convert_yuv_422_601_rgba(data, dst, w, h);
+ return dst;
+ }
+ default:
+ break;
+ }
+ return NULL;
+}
+
+EAPI void *
+evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace)
+{
+ switch (cspace)
+ {
+ case EVAS_COLORSPACE_ARGB8888:
+ {
+ void *dst;
+
+ dst = malloc(sizeof (unsigned int) * w * h);
+ if (!dst) return NULL;
+
+ evas_common_convert_yuv_420p_601_rgba(data, dst, w, h);
+ break;
+ }
+ default:
+ break;
+ }
+ return NULL;
+}
+
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
-
+EAPI void *evas_common_convert_yuv_422P_601_to (void *data, int w, int h, Evas_Colorspace cspace);
+EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace);
#endif /* _EVAS_CONVERT_COLORSPACE_H */