* i420_ymga.c : YUV to YUV conversion module for vlc
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: i420_ymga.c,v 1.1 2002/01/07 02:12:29 sam Exp $
+ * $Id: i420_ymga.c,v 1.4 2002/04/02 10:17:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <math.h> /* exp(), pow() */
#include <errno.h> /* ENOMEM */
#include <string.h> /* strerror() */
#include <stdlib.h> /* malloc(), free() */
#include "video.h"
#include "video_output.h"
-#define SRC_FOURCC "I420/IYUV/YV12"
+#define SRC_FOURCC "I420,IYUV,YV12"
#define DEST_FOURCC "YMGA"
/*****************************************************************************
*****************************************************************************/
static void chroma_getfunctions ( function_list_t * p_function_list );
-static int chroma_Probe ( probedata_t *p_data );
static int chroma_Init ( vout_thread_t *p_vout );
static void chroma_End ( vout_thread_t *p_vout );
*****************************************************************************/
static void chroma_getfunctions( function_list_t * p_function_list )
{
- p_function_list->pf_probe = chroma_Probe;
p_function_list->functions.chroma.pf_init = chroma_Init;
p_function_list->functions.chroma.pf_end = chroma_End;
}
-/*****************************************************************************
- * chroma_Probe: return a score
- *****************************************************************************
- * This function checks that we can handle the required data
- *****************************************************************************/
-static int chroma_Probe( probedata_t *p_data )
-{
- if( p_data->chroma.p_render->i_width & 1
- || p_data->chroma.p_render->i_height & 1 )
- {
- return 0;
- }
-
- switch( p_data->chroma.p_render->i_chroma )
- {
- case FOURCC_YV12:
- case FOURCC_I420:
- case FOURCC_IYUV:
- switch( p_data->chroma.p_output->i_chroma )
- {
- case FOURCC_YMGA:
- break;
-
- default:
- return 0;
- }
- break;
-
- default:
- return 0;
- }
-
- return 100;
-}
-
/*****************************************************************************
* chroma_Init: allocate a chroma function
*****************************************************************************