6 #define FNAME image_data_ycbcr601pl_map_nearest_solid_rotate_start
7 #define NAME "Image Data YCbCr 601 Pointer List Map Nearest Solid Rotate"
8 #define ICON "data.png"
18 static Evas_Object *o_images[1];
19 static unsigned char *yp = NULL, *up = NULL, *vp = NULL;
22 static void _setup(void)
26 unsigned char **data, **lp;
28 for (i = 0; i < 1; i++)
30 o = evas_object_image_add(evas);
32 evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
33 evas_object_image_colorspace_set(o, EVAS_COLORSPACE_YCBCR422P601_PL);
34 evas_object_image_size_set(o, 640, 480);
35 evas_object_image_alpha_set(o, 0);
36 evas_object_image_fill_set(o, 0, 0, 640, 480);
37 evas_object_resize(o, 640, 480);
38 evas_object_image_smooth_scale_set(o, 0);
40 yp = malloc(640 * 480);
41 up = malloc(320 * 240);
42 vp = malloc(320 * 240);
43 f = fopen(build_path("tp.yuv"), "rb");
46 fread(yp, 640 * 480, 1, f);
47 fread(up, 320 * 240, 1, f);
48 fread(vp, 320 * 240, 1, f);
51 data = evas_object_image_data_get(o_images[i], 1);
53 for (y = 0; y < 480; y++)
58 for (y = 0; y < 240; y++)
63 for (y = 0; y < 240; y++)
68 evas_object_image_data_set(o_images[i], data);
74 static void _cleanup(void)
77 for (i = 0; i < 1; i++) evas_object_del(o_images[i]);
83 /* loop - do things */
84 static void _loop(double t, int f)
88 Evas_Coord x, y, w, h;
90 evas_map_smooth_set(m, 0);
91 for (i = 0; i < 1; i++)
95 x = (win_w / 2) - (w / 2);
96 y = (win_h / 2) - (h / 2);
98 evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
100 evas_map_util_rotate(m, f, x + (w / 2), y + (h / 2));
102 evas_object_map_enable_set(o_images[i], 1);
103 evas_object_map_set(o_images[i], m);
109 /* prepend special key handlers if interactive (before STD) */
110 static void _key(char *key)
126 /* template stuff - ignore */
131 _ui_menu_item_add(ICON, NAME, FNAME);
142 ui_func_set(_key, _loop);