📄 vpp.h
字号:
#define DISPLAY_NORMAL (0)
#define DISPLAY_LETTERBOX (0)
#define DISPLAY_PANSCAN (1)
#define DISPLAY_ZOOM_1_2 (2)
#define DISPLAY_ZOOM_1_6 (3)
#define DISPLAY_ZOOM_2_0 (4)
#define DISPLAY_ZOOM_3_0 (5)
#define DISPLAY_ZOOM_4_0 (6)
#define DISPLAY_ZOOM_MAX DISPLAY_ZOOM_4_0
#define PAN_UP (0)
#define PAN_DOWN (1)
#define PAN_RIGHT (2)
#define PAN_LEFT (3)
// Source Aspect Ratio
#define ASPECT_4_3 (0)
#define ASPECT_16_9 (1)
// Source TV system
#define TV_525_60 (0)
#define TV_625_50 (1)
// Field Exchange Configuration
#define VINT_TYPE (0)
#define CHROMA_INTERPOLATE (1)
#define CHROMA_VINT_DISABLE (2)
#define SINGLE_FIELD_MODE (3)
#define VIDEO_DISABLE (4)
#define LINE_BUFFER_DISABLE (5)
#define VINT_INITIAL_VALUE (6)
#define SINGLE_FIELD_ID (15)
#define FIELD_CHROMA_REPOSTION (1<<11)
#define MPEG1_FRAME ((1<<VINT_TYPE)+(1<<CHROMA_INTERPOLATE))
#define NORMAL_FRAME ((1<<VINT_TYPE)+(1<<CHROMA_INTERPOLATE)+(1<<CHROMA_VINT_DISABLE)+(1<<LINE_BUFFER_DISABLE))
#define NORMAL_FIELD ((0<<VINT_TYPE)+(0<<CHROMA_INTERPOLATE)+(1<<CHROMA_VINT_DISABLE)+(1<<LINE_BUFFER_DISABLE))
#define SINGLE_FIELD_TOP_FIELD ((0<<VINT_TYPE)+(0<<CHROMA_INTERPOLATE)+(1<<SINGLE_FIELD_MODE)+(1<<CHROMA_VINT_DISABLE)+(1<<LINE_BUFFER_DISABLE))
#define SINGLE_FIELD_BTM_FIELD ((0<<VINT_TYPE)+(0<<CHROMA_INTERPOLATE)+(1<<SINGLE_FIELD_MODE)+(1<<SINGLE_FIELD_ID)+(1<<CHROMA_VINT_DISABLE)+(1<<LINE_BUFFER_DISABLE))
// Source Resoultion
#define RES_720_480_576 (0)
#define RES_704_480_576 (1)
#define RES_352_480_576 (2)
#define RES_352_240_288 (3)
#define RES_480_480_576 (4)
void setVPP_DoIt(void);
void setVPP_VideoOn(void);
void setVPP_VideoOff(void);
void setVPP_FieldDisplay(void);
void setVPP_FrameDisplay(void);
void setVPP_ParamInit(UINT8 res, UINT8 aspect, UINT8 tv);
void setVPP_Display(int mode);
void setVPP_ZoomIn(void);
void setVPP_ZoomOut(void);
void setVPP_Pan(UINT8, UINT16);
// for vpp.c compatible
void vpp_set_pic(int, int);
#define VPP_AUTOEXP (1<<0) /* expansion or not */
#define VPP_ASPECT_RATIO (1<<1) /* keeping aspect ratio */
#define VPP_CENTERED (1<<2) /* put the picture in center */
#define IsVPPAutoExpansion() (vpp_mode&VPP_AUTOEXP)
#define IsVPPKeepAspectRatio() (vpp_mode&VPP_ASPECT_RATIO)
#define IsVPPKeepCentered() (vpp_mode&VPP_CENTERED)
#define DECODE_TYPE_PAL 0
#define DECODE_TYPE_NTSC 1
#define VINT_ENCODE(factor, offset) \
((UINT16)(factor) | (((INT16) offset) << 10))
//vfactor = 512 * (5 / 6) = 426.6666666 => 427
//offset = 512 * 5 - 427 * 6 = -2
#define VINT_0_625 VINT_ENCODE(819, 1)
#define VINT_0_750 VINT_ENCODE(683, -1)
#define VINT_0_833 VINT_ENCODE(614, 2)
#define VINT_0_900 VINT_ENCODE(569, -1)
#define VINT_1_000 VINT_ENCODE(512, 0)
#define VINT_1_100 VINT_ENCODE(466, -6)
#define VINT_1_200 VINT_ENCODE(427, -2)
#define VINT_1_300 VINT_ENCODE(394, -2)
#define VINT_1_333 VINT_ENCODE(384, 0)
#define VINT_1_400 VINT_ENCODE(366, -2)
#define VINT_1_440 VINT_ENCODE(356, -16)
#define VINT_1_500 VINT_ENCODE(342, -2)
#define VINT_1_600 VINT_ENCODE(320, 0)
#define VINT_1_667 VINT_ENCODE(307, 1)
#define VINT_1_700 VINT_ENCODE(302, -14)
#define VINT_1_800 VINT_ENCODE(285, -5)
#define VINT_1_833 VINT_ENCODE(280, -8)
#define VINT_1_900 VINT_ENCODE(269, 9)
#define VINT_1_920 VINT_ENCODE(267, -16)
#define VINT_2_000 VINT_ENCODE(256, 0)
#define VINT_2_200 VINT_ENCODE(233,-157)
#define VINT_2_400 VINT_ENCODE(213, 4)
#define VINT_2_667 VINT_ENCODE(192, 0)
#define VINT_2_800 VINT_ENCODE(183, -2)
#define VINT_2_880 VINT_ENCODE(178, -16)
#define VINT_3_000 VINT_ENCODE(171, -1)
#define VINT_3_200 VINT_ENCODE(160, 0)
#define VINT_3_333 VINT_ENCODE(154, -4)
#define VINT_3_400 VINT_ENCODE(151, -7)
#define VINT_3_600 VINT_ENCODE(142, 4)
#define VINT_3_840 VINT_ENCODE(133, 32)
#define VINT_4_000 VINT_ENCODE(128, 0)
#define VINT_4_500 VINT_ENCODE(114, -2)
#define VINT_4_800 VINT_ENCODE(107, -8)
#define VINT_5_000 VINT_ENCODE(103, -3)
#define VINT_5_500 VINT_ENCODE(93, 5)
#define VINT_6_000 VINT_ENCODE(86, -4)
#define VINT_6_666 VINT_ENCODE(77, -4)
#define VINT_7_200 VINT_ENCODE(72, -64)
#define VINT_8_000 VINT_ENCODE(64, 0)
#define VINT_9_600 VINT_ENCODE(53, +16)
#define VINT_DISABLE (VINT_1_000)
//#define HEXP_1_200 (RF_H_EXP_enable|53)
//hfactor = 64 * (5 / 6) = 53.33333 ==> 53
#define HEXP_DISABLE (0)
#define HEXP_1_000 HEXP_DISABLE
#define HEXP_1_067 (RF_H_EXP_enable|60)
#define HEXP_1_100 (RF_H_EXP_enable|58)
#define HEXP_1_200 (RF_H_EXP_enable|53)
#define HEXP_1_300 (RF_H_EXP_enable|49)
#define HEXP_1_333 (RF_H_EXP_enable|48)
#define HEXP_1_400 (RF_H_EXP_enable|46)
#define HEXP_1_500 (RF_H_EXP_enable|43)
#define HEXP_1_600 (RF_H_EXP_enable|40)
#define HEXP_1_700 (RF_H_EXP_enable|38)
#define HEXP_1_800 (RF_H_EXP_enable|36)
#define HEXP_1_900 (RF_H_EXP_enable|34)
#define HEXP_1_920 (RF_H_EXP_enable|33)
#define HEXP_2_000 (RF_H_EXP_enable|32)
#define HEXP_2_133 (RF_H_EXP_enable|30)
#define HEXP_2_200 (RF_H_EXP_enable|29)
#define HEXP_2_400 (RF_H_EXP_enable|27)
#define HEXP_2_667 (RF_H_EXP_enable|24)
#define HEXP_2_800 (RF_H_EXP_enable|23)
#define HEXP_3_000 (RF_H_EXP_enable|21)
#define HEXP_3_200 (RF_H_EXP_enable|20)
#define HEXP_3_400 (RF_H_EXP_enable|19)
#define HEXP_3_600 (RF_H_EXP_enable|18)
#define HEXP_3_800 (RF_H_EXP_enable|17)
#define HEXP_4_000 (RF_H_EXP_enable|16)
#define HEXP_4_500 (RF_H_EXP_enable|15)
#define HEXP_6_000 (RF_H_EXP_enable|10)
#define CIF_DISABLE (0<<9)
#define CIF_ENABLE (1<<9)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -