]> git.sesse.net Git - vlc/blobdiff - plugins/yuv/transforms_yuv.c
* Beginning of the built-in modules support.
[vlc] / plugins / yuv / transforms_yuv.c
index ff6e35e14959bac597fdf188ebf72e13096f05cd..22e3076ad252f976314f96470bb9e4ea231063af 100644 (file)
@@ -5,7 +5,7 @@
  * certain cases by optimized functions.
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: transforms_yuv.c,v 1.4 2001/03/21 13:42:34 sam Exp $
+ * $Id: transforms_yuv.c,v 1.5 2001/04/15 04:19:58 sam Exp $
  *
  * Authors: Vincent Seguin <ptyx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -27,6 +27,9 @@
  * Boston, MA 02111-1307, USA.
  *****************************************************************************/
 
+#define MODULE_NAME yuv
+#include "modules_inner.h"
+
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
@@ -54,7 +57,7 @@
 /*****************************************************************************
  * ConvertY4Gray8: grayscale YUV 4:x:x to RGB 8 bpp
  *****************************************************************************/
-void ConvertY4Gray8( YUV_ARGS_8BPP )
+void _M( ConvertY4Gray8 )( YUV_ARGS_8BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -75,7 +78,7 @@ void ConvertY4Gray8( YUV_ARGS_8BPP )
     p_gray =            p_vout->yuv.yuv.p_gray8;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -112,7 +115,7 @@ void ConvertY4Gray8( YUV_ARGS_8BPP )
 /*****************************************************************************
  * ConvertYUV420RGB8: color YUV 4:2:0 to RGB 8 bpp
  *****************************************************************************/
-void ConvertYUV420RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV420RGB8 )( YUV_ARGS_8BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -144,7 +147,7 @@ void ConvertYUV420RGB8( YUV_ARGS_8BPP )
     i_chroma_width =    i_width / 2;
     p_offset_start =    p_vout->yuv.p_offset;
     p_lookup =          p_vout->yuv.p_base;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 1 );
 
     /*
@@ -163,7 +166,7 @@ void ConvertYUV420RGB8( YUV_ARGS_8BPP )
 /*****************************************************************************
  * ConvertYUV422RGB8: color YUV 4:2:2 to RGB 8 bpp
  *****************************************************************************/
-void ConvertYUV422RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV422RGB8 )( YUV_ARGS_8BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 8" );
 }
@@ -171,7 +174,7 @@ void ConvertYUV422RGB8( YUV_ARGS_8BPP )
 /*****************************************************************************
  * ConvertYUV444RGB8: color YUV 4:4:4 to RGB 8 bpp
  *****************************************************************************/
-void ConvertYUV444RGB8( YUV_ARGS_8BPP )
+void _M( ConvertYUV444RGB8 )( YUV_ARGS_8BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 8" );
 }
@@ -179,7 +182,7 @@ void ConvertYUV444RGB8( YUV_ARGS_8BPP )
 /*****************************************************************************
  * ConvertY4Gray16: grayscale YUV 4:x:x to RGB 2 Bpp
  *****************************************************************************/
-void ConvertY4Gray16( YUV_ARGS_16BPP )
+void _M( ConvertY4Gray16 )( YUV_ARGS_16BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -200,7 +203,7 @@ void ConvertY4Gray16( YUV_ARGS_16BPP )
     p_gray =            p_vout->yuv.yuv.p_gray16;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -237,7 +240,7 @@ void ConvertY4Gray16( YUV_ARGS_16BPP )
 /*****************************************************************************
  * ConvertYUV420RGB16: color YUV 4:2:0 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV420RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV420RGB16 )( YUV_ARGS_16BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -262,7 +265,7 @@ void ConvertYUV420RGB16( YUV_ARGS_16BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb16;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -299,7 +302,7 @@ void ConvertYUV420RGB16( YUV_ARGS_16BPP )
 /*****************************************************************************
  * ConvertYUV422RGB16: color YUV 4:2:2 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV422RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV422RGB16 )( YUV_ARGS_16BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -324,7 +327,7 @@ void ConvertYUV422RGB16( YUV_ARGS_16BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb16;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -361,7 +364,7 @@ void ConvertYUV422RGB16( YUV_ARGS_16BPP )
 /*****************************************************************************
  * ConvertYUV444RGB16: color YUV 4:4:4 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV444RGB16( YUV_ARGS_16BPP )
+void _M( ConvertYUV444RGB16 )( YUV_ARGS_16BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -385,7 +388,7 @@ void ConvertYUV444RGB16( YUV_ARGS_16BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb16;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -422,7 +425,7 @@ void ConvertYUV444RGB16( YUV_ARGS_16BPP )
 /*****************************************************************************
  * ConvertY4Gray24: grayscale YUV 4:x:x to RGB 2 Bpp
  *****************************************************************************/
-void ConvertY4Gray24( YUV_ARGS_24BPP )
+void _M( ConvertY4Gray24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, grayscale, bpp = 24" );
 }
@@ -430,7 +433,7 @@ void ConvertY4Gray24( YUV_ARGS_24BPP )
 /*****************************************************************************
  * ConvertYUV420RGB24: color YUV 4:2:0 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV420RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV420RGB24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 420, bpp = 24" );
 }
@@ -438,7 +441,7 @@ void ConvertYUV420RGB24( YUV_ARGS_24BPP )
 /*****************************************************************************
  * ConvertYUV422RGB24: color YUV 4:2:2 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV422RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV422RGB24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, bpp = 24" );
 }
@@ -446,7 +449,7 @@ void ConvertYUV422RGB24( YUV_ARGS_24BPP )
 /*****************************************************************************
  * ConvertYUV444RGB24: color YUV 4:4:4 to RGB 2 Bpp
  *****************************************************************************/
-void ConvertYUV444RGB24( YUV_ARGS_24BPP )
+void _M( ConvertYUV444RGB24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, bpp = 24" );
 }
@@ -454,7 +457,7 @@ void ConvertYUV444RGB24( YUV_ARGS_24BPP )
 /*****************************************************************************
  * ConvertY4Gray32: grayscale YUV 4:x:x to RGB 4 Bpp
  *****************************************************************************/
-void ConvertY4Gray32( YUV_ARGS_32BPP )
+void _M( ConvertY4Gray32 )( YUV_ARGS_32BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -475,7 +478,7 @@ void ConvertY4Gray32( YUV_ARGS_32BPP )
     p_gray =            p_vout->yuv.yuv.p_gray32;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -512,7 +515,7 @@ void ConvertY4Gray32( YUV_ARGS_32BPP )
 /*****************************************************************************
  * ConvertYUV420RGB32: color YUV 4:2:0 to RGB 4 Bpp
  *****************************************************************************/
-void ConvertYUV420RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV420RGB32 )( YUV_ARGS_32BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -537,7 +540,7 @@ void ConvertYUV420RGB32( YUV_ARGS_32BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb32;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -574,7 +577,7 @@ void ConvertYUV420RGB32( YUV_ARGS_32BPP )
 /*****************************************************************************
  * ConvertYUV422RGB32: color YUV 4:2:2 to RGB 4 Bpp
  *****************************************************************************/
-void ConvertYUV422RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV422RGB32 )( YUV_ARGS_32BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -599,7 +602,7 @@ void ConvertYUV422RGB32( YUV_ARGS_32BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb32;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -636,7 +639,7 @@ void ConvertYUV422RGB32( YUV_ARGS_32BPP )
 /*****************************************************************************
  * ConvertYUV444RGB32: color YUV 4:4:4 to RGB 4 Bpp
  *****************************************************************************/
-void ConvertYUV444RGB32( YUV_ARGS_32BPP )
+void _M( ConvertYUV444RGB32 )( YUV_ARGS_32BPP )
 {
     boolean_t   b_horizontal_scaling;             /* horizontal scaling type */
     int         i_vertical_scaling;                 /* vertical scaling type */
@@ -660,7 +663,7 @@ void ConvertYUV444RGB32( YUV_ARGS_32BPP )
     p_yuv =             p_vout->yuv.yuv.p_rgb32;
     p_buffer_start =    p_vout->yuv.p_buffer;
     p_offset_start =    p_vout->yuv.p_offset;
-    SetOffset( i_width, i_height, i_pic_width, i_pic_height,
+    _M( SetOffset )( i_width, i_height, i_pic_width, i_pic_height,
                &b_horizontal_scaling, &i_vertical_scaling, p_offset_start, 0 );
 
     /*
@@ -708,17 +711,18 @@ static __inline__ void yuv2YCbCr422_inner( u8 *p_y, u8 *p_u, u8 *p_v,
     }
 }
 
-void ConvertYUV420YCbr8    ( YUV_ARGS_8BPP )
+void _M( ConvertYUV420YCbr8 )( YUV_ARGS_8BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 8" );
 }
 
-void ConvertYUV422YCbr8    ( YUV_ARGS_8BPP )
+void _M( ConvertYUV422YCbr8 )( YUV_ARGS_8BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 8" );
 
 }
-void ConvertYUV444YCbr8    ( YUV_ARGS_8BPP )
+
+void _M( ConvertYUV444YCbr8 )( YUV_ARGS_8BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 8" );
 
@@ -727,7 +731,7 @@ void ConvertYUV444YCbr8    ( YUV_ARGS_8BPP )
 /*****************************************************************************
  * yuv2YCbCr422: color YUV 4:2:0 to color YCbCr 16bpp
  *****************************************************************************/
-void ConvertYUV420YCbr16    ( YUV_ARGS_16BPP )
+void _M( ConvertYUV420YCbr16 )( YUV_ARGS_16BPP )
 {
     int i_y;
 
@@ -747,47 +751,47 @@ void ConvertYUV420YCbr16    ( YUV_ARGS_16BPP )
     }
 }
 
-void ConvertYUV422YCbr16    ( YUV_ARGS_16BPP )
+void _M( ConvertYUV422YCbr16 )( YUV_ARGS_16BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 16" );
 
 }
-void ConvertYUV444YCbr16    ( YUV_ARGS_16BPP )
+void _M( ConvertYUV444YCbr16 )( YUV_ARGS_16BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 16" );
 
 }
 
-void ConvertYUV420YCbr24    ( YUV_ARGS_24BPP )
+void _M( ConvertYUV420YCbr24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 24" );
 
 }
 
-void ConvertYUV422YCbr24    ( YUV_ARGS_24BPP )
+void _M( ConvertYUV422YCbr24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 24" );
 
 }
 
-void ConvertYUV444YCbr24    ( YUV_ARGS_24BPP )
+void _M( ConvertYUV444YCbr24 )( YUV_ARGS_24BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 24" );
 
 }
 
-void ConvertYUV420YCbr32    ( YUV_ARGS_32BPP )
+void _M( ConvertYUV420YCbr32 )( YUV_ARGS_32BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 420, YCbr = 32" );
 
 }
 
-void ConvertYUV422YCbr32    ( YUV_ARGS_32BPP )
+void _M( ConvertYUV422YCbr32 )( YUV_ARGS_32BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 422, YCbr = 32" );
 
 }
-void ConvertYUV444YCbr32    ( YUV_ARGS_32BPP )
+void _M( ConvertYUV444YCbr32 )( YUV_ARGS_32BPP )
 {
     intf_ErrMsg( "yuv error: unhandled function, chroma = 444, YCbr = 32" );