⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 videowindow.h

📁 direct show
💻 H
字号:
#if !defined VIDEO_WINDOW_H
#define VIDEO_WINDOW_H

#define FULL_CCIR601 0 //ODD + EVEN field
#define HALF_CCIR601 1 //ODD field

//Video Window Max size define
#define MAX_NTSC_V_LINE  480
#define MAX_PAL_V_LINE   570 //576 //570
#define MAX_NTSC_SUB_V_LINE  480
#define MAX_PAL_SUB_V_LINE   576 //576 //570
#define MAX_H_PIX        704


//#define MAXACTIVEWINDOW_W 710
//#define MAXACTIVEWINDOW_PAL_ONEFIELD_H  284
//#define MAXACTIVEWINDOW_NTSC_ONEFIELD_H 234
#define NO_HWCOMPRESS 0
#define HWCOMPRESS    1

//extract from video.h
#define VIDEO_MODE_NTSC 0
#define VIDEO_MODE_PAL  1
enum PixelFormat {   // Video Pixel formats
    PF_YUV422		=0,   // 4 bytes per 2 pixels, Y1, V0, Y0, U0
    PF_RGB16_565	=1,   // 2 bytes per pixel, R5, G6, B5 
    PF_YUV444		=2,   // 3 bytes per pixel, Y, V, U
    PF_RGB24_888	=3,   // 3 bytes per pixel, R8, G8, B8
    PF_RGB32_A888	=4 ,  // 4 bytes per pixel, Alpha, R8, G8, B8
    PF_YUV411		=5,   // 12 bytes per 8 pixels
    PF_RGB15_A555	=6,   // 2 bytes per pixel, Alpha, R5, G5, B5
    PF_YUV2		    =7,   // 4 bytes per 8 pixels, 2 bits Y,U,V
    PF_RGB15_55A5	=8,   // 2 bytes per pixel, R5, G5, Alpha, B5
    PF_YUV8_GRAY	=9,   // 1 byte per pixels, Y8
    PF_YUV8		    =10,  // 1 byte per pixels, Y4, U2, V2
    PF_RGB8_332		=11,  // 1 byte per pixel, R3, G3, B2

    PF_YUV444_PLANAR	=12,  // YUV 444 planar
    PF_YUV422_PLANAR	=13,  // YUV 422 planar
    PF_MPEG420_PLANAR	=14,  // MPEG 422 planar
    PF_YUV9_PLANAR	    =15,  // YUV 9 indeo planar

    PF_Y1		        =16,  // 4 bytes per 32 pixels, 1 bit of Y
    PF_Y2		        =17,  // 4 bytes per 16 pixels, 2 bits of Y
    PF_YUV1		        =18   // 4 bytes per 16 pixels, 1 bit Y,U,V
//    PF_RGB16_DITHER,   // 2 bytes per pixel, R5, G6, B5 dithered  
//    PF_RGB15_DITHER,   // 2 bytes per pixel, Alpha, R5, G5, B5 dithered
//    PF_RGB15_DITHER_1, // 2 bytes per pixel, R5, G5, Alpha, B5 dithered
//    PF_RGB8_DITHER,    // 1 byte per pixel, R3, G3, B2 dithered
//    PF_YUV8_DITHER     // 1 byte per pixels, Y4, U2, V2 dithered
  };
//******end video.h********

typedef struct
{
  int    iTop;
  int    iLeft;
  int    iBottom;
  int    iRight;
  int    iPitch;       //bytes
  int    iPixelDepth;  //bytes
  UINT   uiStartAddress;
  UINT   uiSystemOverlayAddress; 
  UINT   uiPixFormat; //PF_YUV422,... 
  UINT   uiVideoMode; //VIDEO_MODE_NTSC,VIDEO_MODE_PAL
  UINT   uiWindowMode;//FULL_CCIR601(two field),HALF_CCIR601(one field)
  UINT   uiHWCompress;//Using Hardware Compress function;
  BOOL   mirror;      //display mirror
  int    HOffset; //Video Horizontal offset 0-20
  int    VOffset; //Video Vertical offset   0-20
}VIDEOWINDOW;

typedef enum {
H_FULL_1=1,// 704, 
H_FULL_2=2,// 704/2,
H_FULL_4=4,// 704/4,
H_FULL_8=8 // 704/8,
} SIZEH;

typedef enum {
V_FULL_1=1,//1,
V_FULL_2=2,//1/2,
V_FULL_4=4 //1/4,
} SIZEV;

//define the sub_video window binary scaler ration: 
enum RATIOMOD
{
    H1_V1=0,//DEFINE H_V RATION FOR 1:1;
	H1_V2,  //DEFINE H_V RATION FOR 1:1/2;
	H1_V4, //DEFINE H_V RATION FOR 1:1/4;
    H1_V8, //DEFINE H_V RATION FOR 1:1/8;
 	H2_V1, //DEFINE H_V RATION FOR 1/2:1;
	H2_V2, //DEFINE H_V RATION FOR 1/2:1/2;
	H2_V4, //DEFINE H_V RATION FOR 1/2:1/4;
    H2_V8, //DEFINE H_V RATION FOR 1/2:1/8; 
	H4_V1, //DEFINE H_V RATION FOR 1/4:1;
	H4_V2, //DEFINE H_V RATION FOR 1/4:1/2;
	H4_V4, //DEFINE H_V RATION FOR 1/4:1/4;
	H4_V8, //DEFINE H_V RATION FOR 1/4:1/8;
	H8_V1, //DEFINE H_V RATION FOR 1/8:1;
	H8_V2, //DEFINE H_V RATION FOR 1/8:1/2;
	H8_V4, //DEFINE H_V RATION FOR 1/8:1/4;
	H8_V8=15,//DEFINE H_V RATION FOR 1/8:1/8;
};

typedef struct
{
  int    iTop;
  int    iLeft;
  int    SizeW; //sub region width,not the real s1000 operate width
  int    SizeH; //sub region height,not the real s1000 operate hegiht
  int    iPitch;  //bytes
  UINT   uiSystemOverlayAddress; 
  UINT   iRatioMode;
  UINT   uiPixFormat;  //fix to PF_YUV422 
  UINT   iPixelDepth;  //2 bytes
  UINT   uiVideoMode; //VIDEO_MODE_NTSC,VIDEO_MODE_PAL
  UINT   uiWindowMode;//FULL_CCIR601(two field),HALF_CCIR601(one field)
  int    HOffset; //Video Horizontal offset 0-20
  int    VOffset; //Video Vertical offset   0-20
} SVIDEOWINDOW;

typedef struct 
{
 int hr;
 int vr;
} RATIO_HV;

#endif //VIDEO_WINDOW_H




⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -