SDL  2.0
testoverlay2.c
Go to the documentation of this file.
1 /*
2  Copyright (C) 1997-2017 Sam Lantinga <slouken@libsdl.org>
3 
4  This software is provided 'as-is', without any express or implied
5  warranty. In no event will the authors be held liable for any damages
6  arising from the use of this software.
7 
8  Permission is granted to anyone to use this software for any purpose,
9  including commercial applications, and to alter it and redistribute it
10  freely.
11 */
12 /********************************************************************************
13  * *
14  * Test of the overlay used for moved pictures, test more closed to real life. *
15  * Running trojan moose :) Coded by Mike Gorchak. *
16  * *
17  ********************************************************************************/
18 
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <string.h>
22 
23 #ifdef __EMSCRIPTEN__
24 #include <emscripten/emscripten.h>
25 #endif
26 
27 #include "SDL.h"
28 
29 #define MOOSEPIC_W 64
30 #define MOOSEPIC_H 88
31 
32 #define MOOSEFRAME_SIZE (MOOSEPIC_W * MOOSEPIC_H)
33 #define MOOSEFRAMES_COUNT 10
34 
36  {49, 49, 49, SDL_ALPHA_OPAQUE}
37  , {66, 24, 0, SDL_ALPHA_OPAQUE}
38  , {66, 33, 0, SDL_ALPHA_OPAQUE}
39  , {66, 66, 66, SDL_ALPHA_OPAQUE}
40  ,
41  {66, 115, 49, SDL_ALPHA_OPAQUE}
42  , {74, 33, 0, SDL_ALPHA_OPAQUE}
43  , {74, 41, 16, SDL_ALPHA_OPAQUE}
44  , {82, 33, 8, SDL_ALPHA_OPAQUE}
45  ,
46  {82, 41, 8, SDL_ALPHA_OPAQUE}
47  , {82, 49, 16, SDL_ALPHA_OPAQUE}
48  , {82, 82, 82, SDL_ALPHA_OPAQUE}
49  , {90, 41, 8, SDL_ALPHA_OPAQUE}
50  ,
51  {90, 41, 16, SDL_ALPHA_OPAQUE}
52  , {90, 57, 24, SDL_ALPHA_OPAQUE}
53  , {99, 49, 16, SDL_ALPHA_OPAQUE}
54  , {99, 66, 24, SDL_ALPHA_OPAQUE}
55  ,
56  {99, 66, 33, SDL_ALPHA_OPAQUE}
57  , {99, 74, 33, SDL_ALPHA_OPAQUE}
58  , {107, 57, 24, SDL_ALPHA_OPAQUE}
59  , {107, 82, 41, SDL_ALPHA_OPAQUE}
60  ,
61  {115, 57, 33, SDL_ALPHA_OPAQUE}
62  , {115, 66, 33, SDL_ALPHA_OPAQUE}
63  , {115, 66, 41, SDL_ALPHA_OPAQUE}
64  , {115, 74, 0, SDL_ALPHA_OPAQUE}
65  ,
66  {115, 90, 49, SDL_ALPHA_OPAQUE}
67  , {115, 115, 115, SDL_ALPHA_OPAQUE}
68  , {123, 82, 0, SDL_ALPHA_OPAQUE}
69  , {123, 99, 57, SDL_ALPHA_OPAQUE}
70  ,
71  {132, 66, 41, SDL_ALPHA_OPAQUE}
72  , {132, 74, 41, SDL_ALPHA_OPAQUE}
73  , {132, 90, 8, SDL_ALPHA_OPAQUE}
74  , {132, 99, 33, SDL_ALPHA_OPAQUE}
75  ,
76  {132, 99, 66, SDL_ALPHA_OPAQUE}
77  , {132, 107, 66, SDL_ALPHA_OPAQUE}
78  , {140, 74, 49, SDL_ALPHA_OPAQUE}
79  , {140, 99, 16, SDL_ALPHA_OPAQUE}
80  ,
81  {140, 107, 74, SDL_ALPHA_OPAQUE}
82  , {140, 115, 74, SDL_ALPHA_OPAQUE}
83  , {148, 107, 24, SDL_ALPHA_OPAQUE}
84  , {148, 115, 82, SDL_ALPHA_OPAQUE}
85  ,
86  {148, 123, 74, SDL_ALPHA_OPAQUE}
87  , {148, 123, 90, SDL_ALPHA_OPAQUE}
88  , {156, 115, 33, SDL_ALPHA_OPAQUE}
89  , {156, 115, 90, SDL_ALPHA_OPAQUE}
90  ,
91  {156, 123, 82, SDL_ALPHA_OPAQUE}
92  , {156, 132, 82, SDL_ALPHA_OPAQUE}
93  , {156, 132, 99, SDL_ALPHA_OPAQUE}
94  , {156, 156, 156, SDL_ALPHA_OPAQUE}
95  ,
96  {165, 123, 49, SDL_ALPHA_OPAQUE}
97  , {165, 123, 90, SDL_ALPHA_OPAQUE}
98  , {165, 132, 82, SDL_ALPHA_OPAQUE}
99  , {165, 132, 90, SDL_ALPHA_OPAQUE}
100  ,
101  {165, 132, 99, SDL_ALPHA_OPAQUE}
102  , {165, 140, 90, SDL_ALPHA_OPAQUE}
103  , {173, 132, 57, SDL_ALPHA_OPAQUE}
104  , {173, 132, 99, SDL_ALPHA_OPAQUE}
105  ,
106  {173, 140, 107, SDL_ALPHA_OPAQUE}
107  , {173, 140, 115, SDL_ALPHA_OPAQUE}
108  , {173, 148, 99, SDL_ALPHA_OPAQUE}
109  , {173, 173, 173, SDL_ALPHA_OPAQUE}
110  ,
111  {181, 140, 74, SDL_ALPHA_OPAQUE}
112  , {181, 148, 115, SDL_ALPHA_OPAQUE}
113  , {181, 148, 123, SDL_ALPHA_OPAQUE}
114  , {181, 156, 107, SDL_ALPHA_OPAQUE}
115  ,
116  {189, 148, 123, SDL_ALPHA_OPAQUE}
117  , {189, 156, 82, SDL_ALPHA_OPAQUE}
118  , {189, 156, 123, SDL_ALPHA_OPAQUE}
119  , {189, 156, 132, SDL_ALPHA_OPAQUE}
120  ,
121  {189, 189, 189, SDL_ALPHA_OPAQUE}
122  , {198, 156, 123, SDL_ALPHA_OPAQUE}
123  , {198, 165, 132, SDL_ALPHA_OPAQUE}
124  , {206, 165, 99, SDL_ALPHA_OPAQUE}
125  ,
126  {206, 165, 132, SDL_ALPHA_OPAQUE}
127  , {206, 173, 140, SDL_ALPHA_OPAQUE}
128  , {206, 206, 206, SDL_ALPHA_OPAQUE}
129  , {214, 173, 115, SDL_ALPHA_OPAQUE}
130  ,
131  {214, 173, 140, SDL_ALPHA_OPAQUE}
132  , {222, 181, 148, SDL_ALPHA_OPAQUE}
133  , {222, 189, 132, SDL_ALPHA_OPAQUE}
134  , {222, 189, 156, SDL_ALPHA_OPAQUE}
135  ,
136  {222, 222, 222, SDL_ALPHA_OPAQUE}
137  , {231, 198, 165, SDL_ALPHA_OPAQUE}
138  , {231, 231, 231, SDL_ALPHA_OPAQUE}
139  , {239, 206, 173, SDL_ALPHA_OPAQUE}
140 };
141 
149 int paused = 0;
150 int i;
153 static int fpsdelay;
154 
155 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
156 static void
157 quit(int rc)
158 {
159  SDL_Quit();
160  exit(rc);
161 }
162 
163 /* All RGB2YUV conversion code and some other parts of code has been taken from testoverlay.c */
164 
165 /* NOTE: These RGB conversion functions are not intended for speed,
166  only as examples.
167 */
168 
169 void
170 RGBtoYUV(Uint8 * rgb, int *yuv, int monochrome, int luminance)
171 {
172  if (monochrome) {
173 #if 1 /* these are the two formulas that I found on the FourCC site... */
174  yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
175  yuv[1] = 128;
176  yuv[2] = 128;
177 #else
178  yuv[0] = (int)(0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
179  yuv[1] = 128;
180  yuv[2] = 128;
181 #endif
182  } else {
183 #if 1 /* these are the two formulas that I found on the FourCC site... */
184  yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
185  yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
186  yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
187 #else
188  yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
189  yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]);
190  yuv[2] = 128 + (0.439 * rgb[0]) - (0.368 * rgb[1]) - (0.071 * rgb[2]);
191 #endif
192  }
193 
194  if (luminance != 100) {
195  yuv[0] = yuv[0] * luminance / 100;
196  if (yuv[0] > 255)
197  yuv[0] = 255;
198  }
199 }
200 
201 void
202 ConvertRGBtoYV12(Uint8 *rgb, Uint8 *out, int w, int h,
203  int monochrome, int luminance)
204 {
205  int x, y;
206  int yuv[3];
207  Uint8 *op[3];
208 
209  op[0] = out;
210  op[1] = op[0] + w*h;
211  op[2] = op[1] + w*h/4;
212  for (y = 0; y < h; ++y) {
213  for (x = 0; x < w; ++x) {
214  RGBtoYUV(rgb, yuv, monochrome, luminance);
215  *(op[0]++) = yuv[0];
216  if (x % 2 == 0 && y % 2 == 0) {
217  *(op[1]++) = yuv[2];
218  *(op[2]++) = yuv[1];
219  }
220  rgb += 3;
221  }
222  }
223 }
224 
225 void
226 ConvertRGBtoNV12(Uint8 *rgb, Uint8 *out, int w, int h,
227  int monochrome, int luminance)
228 {
229  int x, y;
230  int yuv[3];
231  Uint8 *op[2];
232 
233  op[0] = out;
234  op[1] = op[0] + w*h;
235  for (y = 0; y < h; ++y) {
236  for (x = 0; x < w; ++x) {
237  RGBtoYUV(rgb, yuv, monochrome, luminance);
238  *(op[0]++) = yuv[0];
239  if (x % 2 == 0 && y % 2 == 0) {
240  *(op[1]++) = yuv[1];
241  *(op[1]++) = yuv[2];
242  }
243  rgb += 3;
244  }
245  }
246 }
247 
248 static void
249 PrintUsage(char *argv0)
250 {
251  SDL_Log("Usage: %s [arg] [arg] [arg] ...\n", argv0);
252  SDL_Log("\n");
253  SDL_Log("Where 'arg' is any of the following options:\n");
254  SDL_Log("\n");
255  SDL_Log(" -fps <frames per second>\n");
256  SDL_Log(" -nodelay\n");
257  SDL_Log(" -format <fmt> (one of the: YV12, IYUV, YUY2, UYVY, YVYU)\n");
258  SDL_Log(" -scale <scale factor> (initial scale of the overlay)\n");
259  SDL_Log(" -help (shows this help)\n");
260  SDL_Log("\n");
261  SDL_Log("Press ESC to exit, or SPACE to freeze the movie while application running.\n");
262  SDL_Log("\n");
263 }
264 
265 void
267 {
269 
270  while (SDL_PollEvent(&event)) {
271  switch (event.type) {
272  case SDL_WINDOWEVENT:
273  if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
274  SDL_RenderSetViewport(renderer, NULL);
275  displayrect.w = window_w = event.window.data1;
276  displayrect.h = window_h = event.window.data2;
277  }
278  break;
279  case SDL_MOUSEBUTTONDOWN:
280  displayrect.x = event.button.x - window_w / 2;
281  displayrect.y = event.button.y - window_h / 2;
282  break;
283  case SDL_MOUSEMOTION:
284  if (event.motion.state) {
285  displayrect.x = event.motion.x - window_w / 2;
286  displayrect.y = event.motion.y - window_h / 2;
287  }
288  break;
289  case SDL_KEYDOWN:
290  if (event.key.keysym.sym == SDLK_SPACE) {
291  paused = !paused;
292  break;
293  }
294  if (event.key.keysym.sym != SDLK_ESCAPE) {
295  break;
296  }
297  case SDL_QUIT:
298  done = SDL_TRUE;
299  break;
300  }
301  }
302 
303 #ifndef __EMSCRIPTEN__
305 #endif
306 
307  if (!paused) {
308  i = (i + 1) % MOOSEFRAMES_COUNT;
309 
311  }
312  SDL_RenderClear(renderer);
313  SDL_RenderCopy(renderer, MooseTexture, NULL, &displayrect);
314  SDL_RenderPresent(renderer);
315 
316 #ifdef __EMSCRIPTEN__
317  if (done) {
318  emscripten_cancel_main_loop();
319  }
320 #endif
321 }
322 
323 int
324 main(int argc, char **argv)
325 {
326  Uint8 *RawMooseData;
327  SDL_RWops *handle;
329  int j;
330  int fps = 12;
331  int nodelay = 0;
332 #ifdef TEST_NV12
334 #else
335  Uint32 pixel_format = SDL_PIXELFORMAT_YV12;
336 #endif
337  int scale = 5;
338 
339  /* Enable standard application logging */
341 
342  if (SDL_Init(SDL_INIT_VIDEO) < 0) {
343  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL: %s\n", SDL_GetError());
344  return 3;
345  }
346 
347  while (argc > 1) {
348  if (strcmp(argv[1], "-fps") == 0) {
349  if (argv[2]) {
350  fps = atoi(argv[2]);
351  if (fps == 0) {
353  "The -fps option requires an argument [from 1 to 1000], default is 12.\n");
354  quit(10);
355  }
356  if ((fps < 0) || (fps > 1000)) {
358  "The -fps option must be in range from 1 to 1000, default is 12.\n");
359  quit(10);
360  }
361  argv += 2;
362  argc -= 2;
363  } else {
365  "The -fps option requires an argument [from 1 to 1000], default is 12.\n");
366  quit(10);
367  }
368  } else if (strcmp(argv[1], "-nodelay") == 0) {
369  nodelay = 1;
370  argv += 1;
371  argc -= 1;
372  } else if (strcmp(argv[1], "-scale") == 0) {
373  if (argv[2]) {
374  scale = atoi(argv[2]);
375  if (scale == 0) {
377  "The -scale option requires an argument [from 1 to 50], default is 5.\n");
378  quit(10);
379  }
380  if ((scale < 0) || (scale > 50)) {
382  "The -scale option must be in range from 1 to 50, default is 5.\n");
383  quit(10);
384  }
385  argv += 2;
386  argc -= 2;
387  } else {
389  "The -fps option requires an argument [from 1 to 1000], default is 12.\n");
390  quit(10);
391  }
392  } else if ((strcmp(argv[1], "-help") == 0)
393  || (strcmp(argv[1], "-h") == 0)) {
394  PrintUsage(argv[0]);
395  quit(0);
396  } else {
397  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unrecognized option: %s.\n", argv[1]);
398  quit(10);
399  }
400  break;
401  }
402 
403  RawMooseData = (Uint8 *) malloc(MOOSEFRAME_SIZE * MOOSEFRAMES_COUNT);
404  if (RawMooseData == NULL) {
405  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't allocate memory for movie !\n");
406  quit(1);
407  }
408 
409  /* load the trojan moose images */
410  handle = SDL_RWFromFile("moose.dat", "rb");
411  if (handle == NULL) {
412  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Can't find the file moose.dat !\n");
413  free(RawMooseData);
414  quit(2);
415  }
416 
417  SDL_RWread(handle, RawMooseData, MOOSEFRAME_SIZE, MOOSEFRAMES_COUNT);
418 
419  SDL_RWclose(handle);
420 
421  /* Create the window and renderer */
424  window = SDL_CreateWindow("Happy Moose",
429  if (!window) {
430  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create window: %s\n", SDL_GetError());
431  free(RawMooseData);
432  quit(4);
433  }
434 
435  renderer = SDL_CreateRenderer(window, -1, 0);
436  if (!renderer) {
437  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create renderer: %s\n", SDL_GetError());
438  free(RawMooseData);
439  quit(4);
440  }
441 
442  MooseTexture = SDL_CreateTexture(renderer, pixel_format, SDL_TEXTUREACCESS_STREAMING, MOOSEPIC_W, MOOSEPIC_H);
443  if (!MooseTexture) {
444  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set create texture: %s\n", SDL_GetError());
445  free(RawMooseData);
446  quit(5);
447  }
448  /* Uncomment this to check vertex color with a YUV texture */
449  /* SDL_SetTextureColorMod(MooseTexture, 0xff, 0x80, 0x80); */
450 
451  for (i = 0; i < MOOSEFRAMES_COUNT; i++) {
452  Uint8 MooseFrameRGB[MOOSEFRAME_SIZE*3];
453  Uint8 *rgb;
454  Uint8 *frame;
455 
456  rgb = MooseFrameRGB;
457  frame = RawMooseData + i * MOOSEFRAME_SIZE;
458  for (j = 0; j < MOOSEFRAME_SIZE; ++j) {
459  rgb[0] = MooseColors[frame[j]].r;
460  rgb[1] = MooseColors[frame[j]].g;
461  rgb[2] = MooseColors[frame[j]].b;
462  rgb += 3;
463  }
464  switch (pixel_format) {
466  ConvertRGBtoYV12(MooseFrameRGB, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, 0, 100);
467  break;
469  ConvertRGBtoNV12(MooseFrameRGB, MooseFrame[i], MOOSEPIC_W, MOOSEPIC_H, 0, 100);
470  break;
471  default:
472  SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unsupported pixel format\n");
473  break;
474  }
475  }
476 
477  free(RawMooseData);
478 
479  /* set the start frame */
480  i = 0;
481  if (nodelay) {
482  fpsdelay = 0;
483  } else {
484  fpsdelay = 1000 / fps;
485  }
486 
487  displayrect.x = 0;
488  displayrect.y = 0;
489  displayrect.w = window_w;
490  displayrect.h = window_h;
491 
492  /* Ignore key up events, they don't even get filtered */
494 
495  /* Loop, waiting for QUIT or RESIZE */
496 #ifdef __EMSCRIPTEN__
497  emscripten_set_main_loop(loop, nodelay ? 0 : fps, 1);
498 #else
499  while (!done) {
500  loop();
501  }
502 #endif
503 
504  SDL_DestroyRenderer(renderer);
505  quit(0);
506  return 0;
507 }
508 
509 /* vi: set ts=4 sw=4 expandtab: */
#define SDL_CreateTexture
GLenum GLenum GLenum GLenum GLenum scale
#define SDL_RenderSetViewport
SDL_MouseMotionEvent motion
Definition: SDL_events.h:533
#define MOOSEPIC_W
Definition: testoverlay2.c:29
void loop()
Definition: testoverlay2.c:266
#define SDL_PollEvent
#define SDL_GetError
Uint8 g
Definition: SDL_pixels.h:296
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
void ConvertRGBtoNV12(Uint8 *rgb, Uint8 *out, int w, int h, int monochrome, int luminance)
Definition: testoverlay2.c:226
static void quit(int rc)
Definition: testoverlay2.c:157
GLfloat GLfloat GLfloat GLfloat h
#define MOOSEFRAME_SIZE
Definition: testoverlay2.c:32
SDL_EventEntry * free
Definition: SDL_events.c:83
SDL_Texture * MooseTexture
Definition: testoverlay2.c:143
SDL_bool done
Definition: testoverlay2.c:151
#define SDL_RWread(ctx, ptr, size, n)
Definition: SDL_rwops.h:187
#define SDL_BYTESPERPIXEL(X)
Definition: SDL_pixels.h:128
Uint8 b
Definition: SDL_pixels.h:297
#define SDL_CreateWindow
#define SDL_WINDOWPOS_UNDEFINED
Definition: SDL_video.h:128
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:169
#define SDL_UpdateTexture
#define SDL_LogError
#define MOOSEPIC_H
Definition: testoverlay2.c:30
SDL_WindowEvent window
Definition: SDL_events.h:529
#define SDL_RenderCopy
Uint8 MooseFrame[MOOSEFRAMES_COUNT][MOOSEFRAME_SIZE *2]
Definition: testoverlay2.c:142
#define SDL_Log
#define SDL_RWFromFile
SDL_Renderer * renderer
Definition: testoverlay2.c:148
#define MOOSEFRAMES_COUNT
Definition: testoverlay2.c:33
Uint8 r
Definition: SDL_pixels.h:295
EGLImageKHR EGLint EGLint * handle
Definition: eglext.h:937
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:153
struct _cl_event * event
int frame
Definition: teststreaming.c:60
#define SDL_Quit
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
Definition: SDL_x11sym.h:50
GLubyte GLubyte GLubyte GLubyte w
static int fpsdelay
Definition: testoverlay2.c:153
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
int paused
Definition: testoverlay2.c:149
int x
Definition: SDL_rect.h:66
SDL_Keysym keysym
Definition: SDL_events.h:199
int w
Definition: SDL_rect.h:67
#define SDL_Delay
#define SDL_LogSetPriority
#define NULL
Definition: begin_code.h:164
SDL_bool
Definition: SDL_stdinc.h:139
#define malloc
Definition: SDL_malloc.c:641
#define SDL_RWclose(ctx)
Definition: SDL_rwops.h:189
#define SDL_RenderClear
SDL_KeyboardEvent key
Definition: SDL_events.h:530
int h
Definition: SDL_rect.h:67
The type used to identify a window.
Definition: SDL_sysvideo.h:73
#define SDL_EventState
SDL_Window * window
Definition: testoverlay2.c:147
SDL_Keycode sym
Definition: SDL_keyboard.h:50
int window_h
Definition: testoverlay2.c:146
int i
Definition: testoverlay2.c:150
SDL_Color MooseColors[84]
Definition: testoverlay2.c:35
Uint32 pixel_format
Definition: testoverlay2.c:152
#define SDL_Init
General event structure.
Definition: SDL_events.h:525
SDL_Rect displayrect
Definition: testoverlay2.c:144
#define SDL_DestroyRenderer
int main(int argc, char **argv)
Definition: testoverlay2.c:324
void RGBtoYUV(Uint8 *rgb, int *yuv, int monochrome, int luminance)
Definition: testoverlay2.c:170
static void PrintUsage(char *argv0)
Definition: testoverlay2.c:249
#define SDL_ALPHA_OPAQUE
Definition: SDL_pixels.h:46
int y
Definition: SDL_rect.h:66
int window_w
Definition: testoverlay2.c:145
#define SDL_INIT_VIDEO
Definition: SDL.h:78
#define SDL_CreateRenderer
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
#define SDL_RenderPresent
Uint32 type
Definition: SDL_events.h:527
#define SDL_IGNORE
Definition: SDL_events.h:720
void ConvertRGBtoYV12(Uint8 *rgb, Uint8 *out, int w, int h, int monochrome, int luminance)
Definition: testoverlay2.c:202