]> git.sesse.net Git - vlc/commitdiff
* Fix the fourcc of OpenGL on Mac Intel. We should check why it's set wrong on PPC.
authorDerk-Jan Hartman <hartman@videolan.org>
Wed, 1 Feb 2006 16:52:42 +0000 (16:52 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Wed, 1 Feb 2006 16:52:42 +0000 (16:52 +0000)
* Revert the Quartz disabling.

modules/gui/macosx/macosx.m
modules/video_output/opengl.c

index 5c459be8ee6bcb505d9e0b954b961df434e54f56..a725696b83c892ab84523230fffb5d9f245a7590 100644 (file)
@@ -83,13 +83,14 @@ vlc_module_begin();
     set_subcategory( SUBCAT_INTERFACE_GENERAL );
     add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
                      VLC_FALSE );
-#if defined( __ppc__ ) || defined (__ppc64__)
+
     add_submodule();
         set_description( _("Quartz video") );
         set_capability( "video output", 100 );
         set_category( CAT_VIDEO);
         set_subcategory( SUBCAT_VIDEO_VOUT );
         set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
+
         add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
                      VLC_FALSE );
         add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
@@ -100,7 +101,6 @@ vlc_module_begin();
                   VLC_TRUE );
         add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
                      VLC_FALSE );
-#endif
     add_submodule();
         set_description( "Mac OS X OpenGL" );
         set_capability( "opengl provider", 100 );
index d896e7ca3e52c75245cddae800f5f448b45ceaaa..51b01e978ce3a554279bf86dd6754759c8c76d10 100644 (file)
@@ -268,10 +268,15 @@ static int Init( vout_thread_t *p_vout )
 
     p_sys->p_vout->pf_init( p_sys->p_vout );
 
-#if defined( __APPLE__ ) || (VLCGL_FORMAT == YCBCR_MESA)
+/* TODO: We use YCbCr on Mac which is Y422, but on OSX it seems to == YUY2. Verify */
+#if defined( __ppc__ ) || defined( __ppc64__ ) || (VLCGL_FORMAT == YCBCR_MESA)
     p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
     i_pixel_pitch = 2;
 
+#elif (VLCGL_FORMAT == GL_YCBCR_422_APPLE)
+    p_vout->output.i_chroma = VLC_FOURCC('Y','4','2','2');
+    i_pixel_pitch = 2;
+
 #elif VLCGL_FORMAT == GL_RGB
 #   if VLCGL_TYPE == GL_UNSIGNED_BYTE
     p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
@@ -737,13 +742,13 @@ static int InitTextures( vout_thread_t *p_vout )
     for( i_index = 0; i_index < 2; i_index++ )
     {
         glBindTexture( VLCGL_TARGET, p_sys->p_textures[i_index] );
-    
+
         /* Set the texture parameters */
         glTexParameterf( VLCGL_TARGET, GL_TEXTURE_PRIORITY, 1.0 );
-    
+
         glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
         glTexParameteri( VLCGL_TARGET, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
-        
+
         glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
         glTexParameteri( VLCGL_TARGET, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
 
@@ -754,7 +759,7 @@ static int InitTextures( vout_thread_t *p_vout )
            our buffer */
         glEnable( GL_UNPACK_CLIENT_STORAGE_APPLE );
         glPixelStorei( GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE );
-    
+
 #if 0
         /* Use VRAM texturing */
         glTexParameteri( VLCGL_TARGET, GL_TEXTURE_STORAGE_HINT_APPLE,