# HG changeset patch # User alex # Date 1053449285 0 # Node ID 5e286cc6ad21f9c4fffc13d7cd8375fb8488a9b9 # Parent bf57fe2e77047cdd5888106ff0deff1761391942 Removed YUV (YV12) and BGR support, leaving the native RGB support. Also cleaned some other parts. diff -r bf57fe2e7704 -r 5e286cc6ad21 libvo/vo_gl.c --- a/libvo/vo_gl.c Tue May 20 15:54:48 2003 +0000 +++ b/libvo/vo_gl.c Tue May 20 16:48:05 2003 +0000 @@ -1,8 +1,3 @@ -#define DISP - -// this can be 3 or 4 (regarding 24bpp and 32bpp) -#define BYTES_PP 3 - #define TEXTUREFORMAT_32BPP #include @@ -20,7 +15,6 @@ //#include #include #include -#include "../postproc/rgb2rgb.h" #include @@ -51,8 +45,6 @@ static uint32_t image_width; static uint32_t image_height; -static uint32_t image_format; -static uint32_t image_bpp; static uint32_t image_bytes; static uint32_t texture_width; @@ -80,8 +72,6 @@ { // int screen; unsigned int fg, bg; - char *hello = (title == NULL) ? "OpenGL rulez" : title; -// char *name = ":0.0"; XSizeHints hint; XVisualInfo *vinfo; XEvent xev; @@ -92,7 +82,6 @@ image_height = height; image_width = width; - image_format = format; aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); @@ -140,7 +129,7 @@ // if ( flags&0x01 ) vo_x11_decoration( mDisplay,vo_window,0 ); XSelectInput(mDisplay, vo_window, StructureNotifyMask); /* Tell other applications about this window */ - XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); + XSetStandardProperties(mDisplay, vo_window, title, title, None, NULL, 0, &hint); /* Map window. */ XMapWindow(mDisplay, vo_window); if ( flags&1 ) vo_x11_fullscreen(); @@ -169,45 +158,11 @@ | ButtonPressMask | ButtonReleaseMask ); -#if 0 - // If we have blue in the lowest bit then obviously RGB - mode = ((myximage->blue_mask & 0x01) != 0) ? MODE_RGB : MODE_BGR; -#ifdef WORDS_BIGENDIAN - if (myximage->byte_order != MSBFirst) -#else - if (myximage->byte_order != LSBFirst) -#endif - { - printf("[gl] no support for non-native XImage byte order!\n"); - return -1; - } - - printf("DEPTH=%d BPP=%d\n",depth,bpp); -#endif - - /* - * If depth is 24 then it may either be a 3 or 4 byte per pixel - * format. We can't use bpp because then we would lose the - * distinction between 15/16bit depth (2 byte formate assumed). - * - * FIXME - change yuv2rgb_init to take both depth and bpp - * parameters - */ - texture_width=32; - while(texture_widthRGB...\n"); - yuv2rgb(ImageData, src[0], src[1], src[2], - image_width, image_height, - image_width*BYTES_PP, image_width, image_width/2 ); - for(i=0;i