From 6a8d08a063ded30ca08840c9aabc50b87ef0bfc3 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 20 May 2003 16:48:05 +0000 Subject: Removed YUV (YV12) and BGR support, leaving the native RGB support. Also cleaned some other parts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10139 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl.c | 160 ++++++---------------------------------------------------- 1 file changed, 15 insertions(+), 145 deletions(-) (limited to 'libvo') diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 965fe9017a..6b3d86e33a 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -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 int wsGLXAttrib[] = { GLX_RGBA, 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin { // 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin // 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 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin | 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