X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Fyuvmmx%2Fyuvmmx.c;h=955ef4a91a2b6b77e9c844036f71afc0c9be4b85;hb=e13aed00cf01eefa9285cb030486ee0118ea0425;hp=19fbb21e4278c1d3e81c6df85d19431a98fdbcff;hpb=4af2fd109ed63515a163452f8acdeb9bbe7194ea;p=vlc diff --git a/plugins/yuvmmx/yuvmmx.c b/plugins/yuvmmx/yuvmmx.c index 19fbb21e42..955ef4a91a 100644 --- a/plugins/yuvmmx/yuvmmx.c +++ b/plugins/yuvmmx/yuvmmx.c @@ -31,6 +31,7 @@ #include "common.h" /* boolean_t, byte_t */ #include "threads.h" #include "mtime.h" +#include "tests.h" /* TestMMX() */ #include "plugins.h" #include "interface.h" @@ -38,12 +39,15 @@ #include "video.h" #include "video_output.h" -#include "plugins_export.h" - /***************************************************************************** * Exported prototypes *****************************************************************************/ -void yuv_GetPlugin( p_vout_thread_t p_vout ); +static void yuv_GetPlugin( p_vout_thread_t p_vout ); + +/* YUV transformations */ +int yuv_MMXInit ( p_vout_thread_t p_vout ); +int yuv_MMXReset ( p_vout_thread_t p_vout ); +void yuv_MMXEnd ( p_vout_thread_t p_vout ); /***************************************************************************** * GetConfig: get the plugin structure and configuration @@ -61,25 +65,32 @@ plugin_info_t * GetConfig( void ) p_info->intf_GetPlugin = NULL; p_info->yuv_GetPlugin = yuv_GetPlugin; - return( p_info ); -} + if( TestMMX() ) + { + p_info->i_score = 0x200; + } + else + { + p_info->i_score = 0x0; + } -/***************************************************************************** - * Test: tests if the plugin can be launched - *****************************************************************************/ -int Test( void ) -{ - return( 1 ); + /* If this plugin was requested, score it higher */ + if( TestMethod( YUV_METHOD_VAR, "mmx" ) ) + { + p_info->i_score += 0x200; + } + + return( p_info ); } /***************************************************************************** * Following functions are only called through the p_info structure *****************************************************************************/ -void yuv_GetPlugin( p_vout_thread_t p_vout ) +static void yuv_GetPlugin( p_vout_thread_t p_vout ) { - p_vout->p_yuv_init = yuv_SysInit; - p_vout->p_yuv_reset = yuv_SysReset; - p_vout->p_yuv_end = yuv_SysEnd; + p_vout->p_yuv_init = yuv_MMXInit; + p_vout->p_yuv_reset = yuv_MMXReset; + p_vout->p_yuv_end = yuv_MMXEnd; }