annotate drivers/mga_vid_test.c @ 10976:da5149d755c3

sync
author gabucino
date Thu, 02 Oct 2003 09:41:14 +0000
parents aee789fa2d07
children 6635801bbf1b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 * mga_vid_test.c
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 * Sept 1999
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * This software has been released under the terms of the GNU Public
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * license. See http://www.gnu.org/copyleft/gpl.html for details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 //#include <stddef.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 #include <sys/ioctl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #include <unistd.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 #include <fcntl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #include <sys/mman.h>
854
76ca00724e12 gcc warnings fixed - patch by Aelius aelius@wish.net
arpi_esp
parents: 76
diff changeset
19 #include <inttypes.h>
6245
aee789fa2d07 When compiling mga_vid_test.c, memcpy() is subject to an implicit
jaf
parents: 854
diff changeset
20 #include <string.h>
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 #include "mga_vid.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 mga_vid_config_t config;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 uint8_t *mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 uint32_t is_g400;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define SRC_IMAGE_WIDTH 256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 #define SRC_IMAGE_HEIGHT 256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 uint8_t y_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 uint8_t cr_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32 uint8_t cb_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 write_frame_g200(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 uint8_t *dest;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 uint32_t bespitch,h,w;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 dest = mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 bespitch = (config.src_width + 31) & ~31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 for(h=0; h < config.src_height; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 memcpy(dest, y, config.src_width);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 y += config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 dest += bespitch;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 for(w=0; w < config.src_width/2; w++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 *dest++ = *cb++;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 *dest++ = *cr++;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 dest += bespitch - config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 write_frame_g400(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 uint8_t *dest;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 uint32_t bespitch,h;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 dest = mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 bespitch = (config.src_width + 31) & ~31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 for(h=0; h < config.src_height; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 memcpy(dest, y, config.src_width);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 y += config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 dest += bespitch;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 memcpy(dest, cb, config.src_width/2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 cb += config.src_width/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 dest += bespitch/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 memcpy(dest, cr, config.src_width/2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 cr += config.src_width/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 dest += bespitch/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 void write_frame(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 if(is_g400)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 write_frame_g400(y,cr,cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 write_frame_g200(y,cr,cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 draw_cool_pattern(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104 int i,x,y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 for (y=0; y<config.src_height; y++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 for (x=0; x<config.src_width; x++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 y_image[i++] = x*x/2 + y*y/2 - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 cr_image[i++] = x - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124 cb_image[i++] = y - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 draw_color_blend(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 int i,x,y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134 for (y=0; y<config.src_height; y++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 for (x=0; x<config.src_width; x++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 y_image[i++] = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 cr_image[i++] = x - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 cb_image[i++] = y - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 int
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 main(int argc, char *argv[])
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 int f;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161 f = open("/dev/mga_vid",O_RDWR);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 if(f == -1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 fprintf(stderr,"Couldn't open driver\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 exit(1);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168
76
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
169 config.version = MGA_VID_VERSION;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 config.src_width = SRC_IMAGE_WIDTH;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 config.src_height= SRC_IMAGE_HEIGHT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 config.dest_width = SRC_IMAGE_WIDTH;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 config.dest_height = SRC_IMAGE_HEIGHT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 config.x_org= 10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 config.y_org= 10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 config.colkey_on = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 config.format = MGA_VID_FORMAT_YV12;
76
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
178 config.frame_size=SRC_IMAGE_WIDTH*SRC_IMAGE_HEIGHT*2;
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
179 config.num_frames=1;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 if (ioctl(f,MGA_VID_CONFIG,&config))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 perror("Error in config ioctl");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 if (config.card_type == MGA_G200)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 printf("Testing MGA G200 Backend Scaler with %d MB of RAM\n", config.ram_size);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 is_g400 = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 printf("Testing MGA G400 Backend Scaler with %d MB of RAM\n", config.ram_size);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 is_g400 = 1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 ioctl(f,MGA_VID_ON,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 mga_vid_base = (uint8_t*)mmap(0,256 * 4096,PROT_WRITE,MAP_SHARED,f,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199 printf("mga_vid_base = %8p\n",mga_vid_base);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 //memset(y_image,80,256 * 128);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 //memset(cr_image,80,256/2 * 20);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 //memset(cb_image,80,256/2 * 20);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 printf("(1) There should be a green square, offset by 10 pixels from\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 " the upper left corner displayed\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 draw_cool_pattern();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 printf("(2) There should be a cool mosaic like pattern now.\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 draw_color_blend();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 printf("(3) There should be a color blend with black, red, purple, blue\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 " corners (starting top left going CW)\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 ioctl(f,MGA_VID_OFF,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224 close(f);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225 return 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226 }