macrovision.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:5k
- #include "Config.h" // Global Configuration - do not remove!
- #include "Includesysdefs.h"
- #include "Decoderlow_levelDEC_LL_EnCoderAPI.h"
- #include "Decoderlow_levelcve4.h"
- #if( NUMBER_OF_MACROVISION_ADDRESS != 27 )
- #error "number of macrovision parameters has changed but the table hasn't be updated"
- #elif (NUMBER_OF_MACROVISION_MODES != 12)
- #error "number of macrovision modes has changed but the table hasn't be updated"
- #else
- //#define MACROVISION_PAL_TABLE_OFFSET 3
- CONST UINT8 MacrovisionTable[NUMBER_OF_MACROVISION_ADDRESS][NUMBER_OF_MACROVISION_MODES+1] = {
- /* { ADDR ---------- NTSC ----------------------------- ----------- PAL -------- }*/
- /* { -------- INTERLACE ----------- -PROGRESSIVE- -INTERLACE - ---------------- -PROGRESSIVE- }*/
- /* { off type_1 type_2 type_3 off on off on PAL60 PALM on off }*/
- { 0x12, 0x00, 0x00, 0x1d, 0x17, 0x00, 0x17, 0x00, 0x1a, 0x00, 0x00, 0x17, 0x00, },
- { 0x13, 0x00, 0x00, 0x25, 0x21, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x00, 0x21, 0x00, },
- { 0x14, 0x00, 0x1b, 0x1b, 0x1b, 0x00, 0x1b, 0x00, 0x1c, 0x1b, 0x1b, 0x1b, 0x00, },
- { 0x15, 0x00, 0x1b, 0x1b, 0x1b, 0x00, 0x1b, 0x00, 0x3d, 0x1b, 0x1b, 0x1b, 0x00, },
- { 0x16, 0x00, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x14, 0x24, 0x24, 0x00, 0x00, },
- { 0x19, 0x00, 0x36, 0x3e, 0x3e, 0x00, 0x24, 0x00, 0x36, 0x36, 0x36, 0x24, 0x00, },
- { 0x1a, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x0f, 0x00, 0xfe, 0x1e, 0x0f, 0x0f, 0x00, },
- { 0x1b, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x0f, 0x00, 0x7e, 0x1e, 0x0f, 0x0f, 0x00, },
- { 0x1c, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x00, 0x00, },
- { 0x1d, 0x00, 0x00, 0x01, 0x05, 0x00, 0x05, 0x00, 0x05, 0x00, 0x00, 0x05, 0x00, },
- { 0x21, 0x00, 0x04, 0x04, 0x04, 0x00, 0x04, 0x00, 0x07, 0x04, 0x04, 0x04, 0x00, },
- { 0x23, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, },
- { 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
- { 0x26, 0x00, 0x0a, 0x0a, 0x0a, 0x00, 0x0a, 0x00, 0x08, 0x0a, 0x0a, 0x0a, 0x00, },
- { 0x27, 0x00, 0x05, 0x05, 0x05, 0x00, 0x05, 0x00, 0x04, 0x05, 0x05, 0x05, 0x00, },
- { 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
- { 0x29, 0x12, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, }, //Breezeway width, PAL60 has same value as NTSC, PALM as PAL
- { 0x2a, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0x55, 0xff, 0xff, 0xff, 0x00, },
- { 0x2b, 0x00, 0x03, 0x03, 0x03, 0x00, 0x03, 0x00, 0x01, 0x03, 0x03, 0x03, 0x00, },
- { 0x2d, 0x00, 0x0f, 0x0f, 0x0f, 0x00, 0x7f, 0x00, 0x07, 0x0f, 0x0f, 0x07, 0x00, }, // SHO012804:Added PAL PSO column to update AGC Pulse line location
- { 0x2e, 0x00, 0x78, 0x78, 0x78, 0x00, 0x40, 0x00, 0x7e, 0x78, 0x78, 0x7c, 0x00, }, // SHO012804:Added PAL PSO column to update AGC Pulse line location
- { 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, },
- { 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, },
- { 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, },
- { 0x39, 0x00, 0x00, 0x11, 0x15, 0x00, 0x15, 0x00, 0x22, 0x00, 0x00, 0x15, 0x00, },
- { 0x3a, 0x00, 0x00, 0x07, 0x05, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x05, 0x00, },
- { 0x3b, 0x00, 0x00, 0x11, 0x15, 0x00, 0x15, 0x00, 0x22, 0x00, 0x00, 0x15, 0x00, },
- };
- #endif
- #if( NUMBER_OF_MACROVISION_LUMA_ADDRESS != 14 )
- #error "number of macrovision parameters has changed but the table hasn't be updated"
- #elif (NUMBER_OF_MACROVISION_LUMA_MODES != 8 )
- #error "number of macrovision modes has changed but the table hasn't be updated"
- #else
- CONST UINT8 MacrovisionLumaTable[NUMBER_OF_MACROVISION_LUMA_ADDRESS][NUMBER_OF_MACROVISION_LUMA_MODES+1] = {
- /*{ ADDR -----------10:4 ------------ -----7:3----- -10:4- -7:3- }*/
- /*{ blacklevel ---w/ setup-- --w/o setup-- --w/o setup-- -setup- no setup}*/
- /*{ scan mode --------------interlace--------------------- -progressive- }*/
- /*{ MV off on off on off on off off }*/
- { 0x0e, 0x4c, 0x3d, 0x41, 0x32, 0x44, 0x37, 0x4c, 0x44, },//BlackLevel
- { 0x0f, 0x01, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, },//
- { 0x10, 0x41, 0x32, 0x41, 0x32, 0x44, 0x37, 0x41, 0x44, },//AblankLevel
- { 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, },//
- { 0x1e, 0xd5, 0xc8, 0xd5, 0xc8, 0xd5, 0xca, 0xd5, 0xd5, },//WhiteLevel
- { 0x1f, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x03, },//
- { 0x20, 0x94, 0x94, 0xa0, 0xa0, 0x9d, 0x9d, 0xa7, 0xb1, },//Cb_gain
- { 0x22, 0x94, 0x94, 0xa0, 0xa0, 0x9d, 0x9d, 0xa7, 0xb1, },//Cr_gain
- { 0x37, 0xa9, 0xa9, 0xa9, 0xa9, 0xa4, 0xa4, 0x9f, 0x9c, },//AGCPulseLevel
- { 0x38, 0xc6, 0xc6, 0xc6, 0xc6, 0xc9, 0xc9, 0xc6, 0xc9, },//BackPorchPulseLevel
- { 0x3c, 0x41, 0x41, 0x41, 0x41, 0x44, 0x44, 0x41, 0x44, },//VblankLevel
- { 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },//
- { 0x4b, 0xa9, 0xa9, 0xa9, 0xa9, 0xac, 0xa0, 0xa9, 0xac, },//WSS/CGMSLevel
- { 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
- // EXCEPTION: YUV in NTSC when MV on should take 7:3 on, except for WSS/CGMSLevel, which should follow 7:3 off.
- }; // MilesD0530_2005A: Added luma array for progressive mode (525p&625p).Changed AGC pulse for 525p&625p.
- #endif