]> git.sesse.net Git - vlc/blob - plugins/yuvmmx/video_yuv.h
. rajout de l'option -Winline
[vlc] / plugins / yuvmmx / video_yuv.h
1 /*****************************************************************************
2  * video_yuv.h: MMX YUV transformation functions
3  * Provides functions to perform the YUV conversion. The functions provided here
4  * are a complete and portable C implementation, and may be replaced in certain
5  * case by optimized functions.
6  *****************************************************************************
7  * Copyright (C) 1999, 2000 VideoLAN
8  *
9  * Authors:
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public
22  * License along with this program; if not, write to the
23  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24  * Boston, MA 02111-1307, USA.
25  *****************************************************************************/
26
27 /*****************************************************************************
28  * Constants
29  *****************************************************************************/
30
31 #define GRAY_MARGIN     384
32 #define GRAY_TABLE_SIZE 1024                             /* total table size */
33
34 #define PALETTE_TABLE_SIZE 2176          /* YUV -> 8bpp palette lookup table */
35
36 /* argument lists for YUV functions */
37 #define YUV_ARGS_8BPP p_vout_thread_t p_vout, u8 *p_pic, yuv_data_t *p_y, \
38 yuv_data_t *p_u, yuv_data_t *p_v, int i_width, int i_height, int i_pic_width, \
39 int i_pic_height, int i_pic_line_width, int i_matrix_coefficients
40
41 #define YUV_ARGS_16BPP p_vout_thread_t p_vout, u16 *p_pic, yuv_data_t *p_y, \
42 yuv_data_t *p_u, yuv_data_t *p_v, int i_width, int i_height, int i_pic_width, \
43 int i_pic_height, int i_pic_line_width, int i_matrix_coefficients
44
45 #define YUV_ARGS_24BPP p_vout_thread_t p_vout, u32 *p_pic, yuv_data_t *p_y, \
46 yuv_data_t *p_u, yuv_data_t *p_v, int i_width, int i_height, int i_pic_width, \
47 int i_pic_height, int i_pic_line_width, int i_matrix_coefficients
48
49 #define YUV_ARGS_32BPP p_vout_thread_t p_vout, u32 *p_pic, yuv_data_t *p_y, \
50 yuv_data_t *p_u, yuv_data_t *p_v, int i_width, int i_height, int i_pic_width, \
51 int i_pic_height, int i_pic_line_width, int i_matrix_coefficients
52
53 /*****************************************************************************
54  * Local prototypes
55  *****************************************************************************/
56 void SetGammaTable        ( int *pi_table, double f_gamma );
57 void SetYUV               ( vout_thread_t *p_vout );
58 void SetOffset            ( int i_width, int i_height, int i_pic_width,
59                             int i_pic_height, boolean_t *pb_h_scaling,
60                             int *pi_v_scaling, int *p_offset );
61
62 void ConvertY4Gray8       ( YUV_ARGS_8BPP );
63 void ConvertYUV420RGB8    ( YUV_ARGS_8BPP );
64 void ConvertYUV422RGB8    ( YUV_ARGS_8BPP );
65 void ConvertYUV444RGB8    ( YUV_ARGS_8BPP );
66
67 void ConvertY4Gray16      ( YUV_ARGS_16BPP );
68 void ConvertYUV420RGB16   ( YUV_ARGS_16BPP );
69 void ConvertYUV422RGB16   ( YUV_ARGS_16BPP );
70 void ConvertYUV444RGB16   ( YUV_ARGS_16BPP );
71
72 void ConvertY4Gray24      ( YUV_ARGS_24BPP );
73 void ConvertYUV420RGB24   ( YUV_ARGS_24BPP );
74 void ConvertYUV422RGB24   ( YUV_ARGS_24BPP );
75 void ConvertYUV444RGB24   ( YUV_ARGS_24BPP );
76
77 void ConvertY4Gray32      ( YUV_ARGS_32BPP );
78 void ConvertYUV420RGB32   ( YUV_ARGS_32BPP );
79 void ConvertYUV422RGB32   ( YUV_ARGS_32BPP );
80 void ConvertYUV444RGB32   ( YUV_ARGS_32BPP );
81