]> git.sesse.net Git - vlc/blobdiff - plugins/yuv/video_yuvmmx.c
* Ported Glide and MGA plugins to the new module API. MGA never worked,
[vlc] / plugins / yuv / video_yuvmmx.c
index 4f795862b1f0ac766aec7b76dc9b30c2c108e5e9..d34410f3f66b191667e7bdd48d96008cb5f7fb67 100644 (file)
@@ -22,6 +22,9 @@
  * Boston, MA 02111-1307, USA.
  *****************************************************************************/
 
+#define MODULE_NAME yuvmmx
+#include "modules_inner.h"
+
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
@@ -58,7 +61,7 @@ static void    SetYUV         ( vout_thread_t *p_vout );
  * Functions exported as capabilities. They are declared as static so that
  * we don't pollute the namespace too much.
  *****************************************************************************/
-void yuv_getfunctions( function_list_t * p_function_list )
+void _M( yuv_getfunctions )( function_list_t * p_function_list )
 {
     p_function_list->pf_probe = yuv_Probe;
     p_function_list->functions.yuv.pf_init = yuv_Init;
@@ -75,9 +78,16 @@ void yuv_getfunctions( function_list_t * p_function_list )
 static int yuv_Probe( probedata_t *p_data )
 {
     /* Test for MMX support in the CPU */
-    if( TestCPU() & CPU_CAPABILITY_MMX )
+    if( TestCPU( CPU_CAPABILITY_MMX ) )
     {
-        return( 100 );
+        if( TestMethod( YUV_METHOD_VAR, "yuvmmx" ) )
+        {
+            return( 999 );
+        }
+        else
+        {
+            return( 100 );
+        }
     }
     else
     {
@@ -183,7 +193,7 @@ static void SetYUV( vout_thread_t *p_vout )
                 transp[ i_index ] = 0;
             }
             /* the colors have been allocated, we can set the palette */
-            p_vout->p_set_palette( p_vout, bright, bright, bright, transp );
+            p_vout->pf_setpalette( p_vout, bright, bright, bright, transp );
             p_vout->i_white_pixel = 0xff;
             p_vout->i_black_pixel = 0x00;
             p_vout->i_gray_pixel = 0x44;
@@ -256,7 +266,7 @@ static void SetYUV( vout_thread_t *p_vout )
             /* the colors have been allocated, we can set the palette */
             /* there will eventually be a way to know which colors
              * couldn't be allocated and try to find a replacement */
-            p_vout->p_set_palette( p_vout, red, green, blue, transp );
+            p_vout->pf_setpalette( p_vout, red, green, blue, transp );
 
             p_vout->i_white_pixel = 0xff;
             p_vout->i_black_pixel = 0x00;