Increase ParseScript cache from 30 to 90 seconds
[xy_vsfilter.git] / src / subpic / color_conv_table.h
blobf59993d13a866e778787c71a7c3175aabd56a1f2
1 /************************************************************************/
2 /* author: xy */
3 /* date: 20110914 */
4 /* description: color table for yuv rgb convertion, */
5 /* support both bt.601 and bt.709 */
6 /************************************************************************/
7 #ifndef __COLOR_CONV_TABLE_H_53D078BB_BBA1_441B_9728_67E29A1CB521__
8 #define __COLOR_CONV_TABLE_H_53D078BB_BBA1_441B_9728_67E29A1CB521__
10 #include <WTypes.h>
12 struct ColorConvTable
14 enum YuvMatrixType
16 NONE
17 , BT601
18 , BT709
21 enum YuvRangeType
23 RANGE_NONE
24 , RANGE_TV
25 , RANGE_PC
28 static void SetDefaultConvType(YuvMatrixType yuv_type, YuvRangeType range);
30 static YuvMatrixType GetDefaultYUVType();
31 static YuvRangeType GetDefaultRangeType();
33 static DWORD Argb2Ayuv(DWORD argb);
34 static DWORD Argb2Auyv(DWORD argb);
35 static DWORD Ayuv2Auyv(DWORD ayuv);
36 static DWORD Rgb2Y(int r8, int g8, int b8);
37 static DWORD PreMulArgb2Ayuv( int a8, int r8, int g8, int b8 );
39 static DWORD Ayuv2Argb(DWORD ayuv);
40 static DWORD Ayuv2Argb_TV_BT601(DWORD ayuv);
41 static DWORD A8Y8U8V8_To_ARGB_TV_BT601( int a8, int y8, int u8, int v8 );
42 static DWORD A8Y8U8V8_To_ARGB_PC_BT601( int a8, int y8, int u8, int v8 );
43 static DWORD Ayuv2Argb_TV_BT709(DWORD ayuv);
44 static DWORD A8Y8U8V8_To_ARGB_TV_BT709( int a8, int y8, int u8, int v8 );
45 static DWORD A8Y8U8V8_To_ARGB_PC_BT709( int a8, int y8, int u8, int v8 );
47 static DWORD A8Y8U8V8_PC_To_TV( int a8, int y8, int u8, int v8 );
48 static DWORD A8Y8U8V8_TV_To_PC( int a8, int y8, int u8, int v8 );
49 private:
50 ColorConvTable();
53 #endif // end of __COLOR_CONV_TABLE_H_53D078BB_BBA1_441B_9728_67E29A1CB521__