summaryrefslogtreecommitdiff
path: root/src/bin/image_data_ycbcr601pl.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2014-08-22 00:48:19 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-08-22 18:29:02 +0200
commit3ef31223f6bbe9565ba41a857eee7926f931eaa5 (patch)
treeb1350d117930a82af7d93a6398e2ed968511e507 /src/bin/image_data_ycbcr601pl.c
parent281bbd90fdb3942922e931bcd7f364e9204a1488 (diff)
cleanup, remove warning, useless if and tab .
Diffstat (limited to 'src/bin/image_data_ycbcr601pl.c')
-rw-r--r--src/bin/image_data_ycbcr601pl.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/bin/image_data_ycbcr601pl.c b/src/bin/image_data_ycbcr601pl.c
index de5232b..d06689a 100644
--- a/src/bin/image_data_ycbcr601pl.c
+++ b/src/bin/image_data_ycbcr601pl.c
@@ -23,30 +23,29 @@ static void _setup(void)
23{ 23{
24 int i, y; 24 int i, y;
25 FILE *f; 25 FILE *f;
26 size_t r;
27 unsigned char **data, **lp; 26 unsigned char **data, **lp;
28 Evas_Object *o; 27 Evas_Object *o;
29 for (i = 0; i < 1; i++) 28 for (i = 0; i < 1; i++)
30 { 29 {
31 o = eo_add(EVAS_IMAGE_CLASS, evas); 30 o = eo_add(EVAS_IMAGE_CLASS, evas);
32 o_images[i] = o; 31 o_images[i] = o;
33 if (o) 32 eo_do(o,
34 eo_do(o, evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC), 33 evas_obj_image_content_hint_set(EVAS_IMAGE_CONTENT_HINT_DYNAMIC),
35 evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL), 34 evas_obj_image_colorspace_set(EVAS_COLORSPACE_YCBCR422P601_PL),
36 evas_obj_image_size_set(640, 480), 35 evas_obj_image_size_set(640, 480),
37 evas_obj_image_alpha_set(0), 36 evas_obj_image_alpha_set(0),
38 evas_obj_image_fill_set(0, 0, 640, 480), 37 evas_obj_image_fill_set(0, 0, 640, 480),
39 evas_obj_size_set(640, 480), 38 evas_obj_size_set(640, 480),
40 evas_obj_visibility_set(EINA_TRUE)); 39 evas_obj_visibility_set(EINA_TRUE));
41 yp = malloc(640 * 480); 40 yp = malloc(640 * 480);
42 up = malloc(320 * 240); 41 up = malloc(320 * 240);
43 vp = malloc(320 * 240); 42 vp = malloc(320 * 240);
44 f = fopen(build_path("tp.yuv"), "rb"); 43 f = fopen(build_path("tp.yuv"), "rb");
45 if (f) 44 if (f)
46 { 45 {
47 r = fread(yp, 640 * 480, 1, f); 46 fread(yp, 640 * 480, 1, f);
48 r = fread(up, 320 * 240, 1, f); 47 fread(up, 320 * 240, 1, f);
49 r = fread(vp, 320 * 240, 1, f); 48 fread(vp, 320 * 240, 1, f);
50 fclose(f); 49 fclose(f);
51 } 50 }
52 data = evas_object_image_data_get(o_images[i], 1); 51 data = evas_object_image_data_get(o_images[i], 1);
@@ -66,8 +65,7 @@ static void _setup(void)
66 *lp = vp + (y * 320); 65 *lp = vp + (y * 320);
67 lp++; 66 lp++;
68 } 67 }
69 if (o_images[i]) 68 eo_do(o_images[i], evas_obj_image_data_set(data));
70 eo_do(o_images[i], evas_obj_image_data_set(data));
71 } 69 }
72 done = 0; 70 done = 0;
73} 71}
@@ -93,11 +91,11 @@ static void _loop(double t, int f)
93 h = 480; 91 h = 480;
94 x = (win_w / 2) - (w / 2); 92 x = (win_w / 2) - (w / 2);
95 y = (win_h / 2) - (h / 2); 93 y = (win_h / 2) - (h / 2);
96 if (o_images[i]) 94 eo_do(o_images[i],
97 eo_do(o_images[i], evas_obj_position_set(x, y), 95 evas_obj_position_set(x, y),
98 evas_obj_size_set(w, h), 96 evas_obj_size_set(w, h),
99 evas_obj_image_fill_set(0, 0, w, h), 97 evas_obj_image_fill_set(0, 0, w, h),
100 evas_obj_image_data_update_add( 0, 0, 640, 480)); 98 evas_obj_image_data_update_add( 0, 0, 640, 480));
101 } 99 }
102 FPS_STD(NAME); 100 FPS_STD(NAME);
103} 101}