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

📄 cameraprops.h

📁 Microsoft WinCE 6.0 BSP FINAL release source code for use with the i.MX27ADS TO2 WCE600_FINAL_MX27_S
💻 H
📖 第 1 页 / 共 4 页
字号:
        0L,                                 // DWORD dwBitErrorRate;   
        REFTIME_30FPS,                      // REFERENCE_TIME  AvgTimePerFrame; 
        sizeof (CS_BITMAPINFOHEADER),       // DWORD biSize;
        DX,                                 // LONG  biWidth;
        DY,                                 // LONG  biHeight;
        1,                        // WORD  biPlanes;
        YV12DBITCOUNT,            // WORD  biBitCount;
        FOURCC_YV12,              // DWORD biCompression;
        SAMPLESIZE,               // DWORD biSizeImage;
        0,                        // LONG  biXPelsPerMeter;
        0,                        // LONG  biYPelsPerMeter;
        0,                        // DWORD biClrUsed;
        0,                        // DWORD biClrImportant;
        0, 0, 0                   // DWORD dwBitMasks[3]
    }
}; 


#undef DX            
#undef DY            
#undef DBITCOUNT 
#undef FRAMERATE

#define DX          320
#define DY          -240
#define DBITCOUNT    12
#define FRAMERATE    30

// YV12, QVGA, 30FPS
CS_DATARANGE_VIDEO DCAM_StreamMode_YV12_QVGA = 
{
    // CSDATARANGE
    {   
        sizeof (CS_DATARANGE_VIDEO),     // Flags
        0,
        SAMPLESIZE,                      // SampleSize
        0,                               // Reserved
        STATIC_CSDATAFORMAT_TYPE_VIDEO,  
        FOURCC_YV12, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71,
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
    },

    TRUE,                   // BOOL,  bFixedSizeSamples (all samples same size?)
    TRUE,                   // BOOL,  bTemporalCompression (all I frames?)
    CS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags  (CS_VIDEO_DESC_*)
    0,                      // MemoryAllocationFlags   (CS_VIDEO_ALLOC_*)

    // _CS_VIDEO_STREAM_CONFIG_CAPS  
    {
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO, 
        CS_AnalogVideo_None, // AnalogVideoStandard
        DX,DY,    // InputSize, (the inherent size of the incoming signal
                  //             with every digitized pixel unique)
        DX,DY,    // MinCroppingSize, smallest rcSrc cropping rect allowed
        DX,DY,    // MaxCroppingSize, largest  rcSrc cropping rect allowed
        1,        // CropGranularityX, granularity of cropping size
        1,        // CropGranularityY
        1,        // CropAlignX, alignment of cropping rect 
        1,        // CropAlignY;
        DX, DY,   // MinOutputSize, smallest bitmap stream can produce
        DX, DY,   // MaxOutputSize, largest  bitmap stream can produce
        DX,       // OutputGranularityX, granularity of output bitmap size
        DY,       // OutputGranularityY;
        0,        // StretchTapsX  (0 no stretch, 1 pix dup, 2 interp...)
        0,        // StretchTapsY
        0,        // ShrinkTapsX 
        0,        // ShrinkTapsY 
        // Allow 1% difference
        FRAMEINTERVAL_30FPS,    // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
        FRAMEINTERVAL_3_75FPS,  // MaxFrameInterval (10,000,000 /  3.75FPS), 100nS units
        BITRATE / 8,            // (DX * DY * DBITCOUNT) * DFPS_MIN,    // MinBitsPerSecond (3.75 FPS);
        BITRATE,                // (DX * DY * DBITCOUNT) * DFPS_MAX     // MaxBitsPerSecond (30.0 FPS);
    }, 
        
    // CS_VIDEOINFOHEADER (default format)
    {
        0,0,DX,DY,                            // RECT  rcSource; 
        0,0,DX,DY,                            // RECT  rcTarget; 
        BITRATE,                            // DWORD dwBitRate;
        0L,                                 // DWORD dwBitErrorRate;   
        REFTIME_30FPS,                      // REFERENCE_TIME  AvgTimePerFrame; 
        sizeof (CS_BITMAPINFOHEADER),       // DWORD biSize;
        DX,                                 // LONG  biWidth;
        DY,                                 // LONG  biHeight;
        1,                        // WORD  biPlanes;
        YV12DBITCOUNT,            // WORD  biBitCount;
        FOURCC_YV12,              // DWORD biCompression;
        SAMPLESIZE,               // DWORD biSizeImage;
        0,                        // LONG  biXPelsPerMeter;
        0,                        // LONG  biYPelsPerMeter;
        0,                        // DWORD biClrUsed;
        0,                        // DWORD biClrImportant;
        0, 0, 0                   // DWORD dwBitMasks[3]
    }
}; 


#undef DX            
#undef DY            
#undef DBITCOUNT 
#undef FRAMERATE

#define DX          352
#define DY          -288
#define DBITCOUNT    12
#define FRAMERATE    30

// YV12, CIF, 30FPS
CS_DATARANGE_VIDEO DCAM_StreamMode_YV12_CIF = 
{
    // CSDATARANGE
    {   
        sizeof (CS_DATARANGE_VIDEO),     // Flags
        0,
        SAMPLESIZE,                      // SampleSize
        0,                               // Reserved
        STATIC_CSDATAFORMAT_TYPE_VIDEO,  
        FOURCC_YV12, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71,
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
    },

    TRUE,                   // BOOL,  bFixedSizeSamples (all samples same size?)
    TRUE,                   // BOOL,  bTemporalCompression (all I frames?)
    CS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags  (CS_VIDEO_DESC_*)
    0,                      // MemoryAllocationFlags   (CS_VIDEO_ALLOC_*)

    // _CS_VIDEO_STREAM_CONFIG_CAPS  
    {
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO, 
        CS_AnalogVideo_None, // AnalogVideoStandard
        DX,DY,    // InputSize, (the inherent size of the incoming signal
                  //             with every digitized pixel unique)
        DX,DY,    // MinCroppingSize, smallest rcSrc cropping rect allowed
        DX,DY,    // MaxCroppingSize, largest  rcSrc cropping rect allowed
        1,        // CropGranularityX, granularity of cropping size
        1,        // CropGranularityY
        1,        // CropAlignX, alignment of cropping rect 
        1,        // CropAlignY;
        DX, DY,   // MinOutputSize, smallest bitmap stream can produce
        DX, DY,   // MaxOutputSize, largest  bitmap stream can produce
        DX,       // OutputGranularityX, granularity of output bitmap size
        DY,       // OutputGranularityY;
        0,        // StretchTapsX  (0 no stretch, 1 pix dup, 2 interp...)
        0,        // StretchTapsY
        0,        // ShrinkTapsX 
        0,        // ShrinkTapsY 
        // Allow 1% difference
        FRAMEINTERVAL_30FPS,    // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
        FRAMEINTERVAL_3_75FPS,  // MaxFrameInterval (10,000,000 /  3.75FPS), 100nS units
        BITRATE / 8,            // (DX * DY * DBITCOUNT) * DFPS_MIN,    // MinBitsPerSecond (3.75 FPS);
        BITRATE,                // (DX * DY * DBITCOUNT) * DFPS_MAX     // MaxBitsPerSecond (30.0 FPS);
    }, 
        
    // CS_VIDEOINFOHEADER (default format)
    {
        0,0,DX,DY,                            // RECT  rcSource; 
        0,0,DX,DY,                            // RECT  rcTarget; 
        BITRATE,                            // DWORD dwBitRate;
        0L,                                 // DWORD dwBitErrorRate;   
        REFTIME_30FPS,                      // REFERENCE_TIME  AvgTimePerFrame; 
        sizeof (CS_BITMAPINFOHEADER),       // DWORD biSize;
        DX,                                 // LONG  biWidth;
        DY,                                 // LONG  biHeight;
        1,                        // WORD  biPlanes;
        YV12DBITCOUNT,            // WORD  biBitCount;
        FOURCC_YV12,              // DWORD biCompression;
        SAMPLESIZE,               // DWORD biSizeImage;
        0,                        // LONG  biXPelsPerMeter;
        0,                        // LONG  biYPelsPerMeter;
        0,                        // DWORD biClrUsed;
        0,                        // DWORD biClrImportant;
        0, 0, 0                   // DWORD dwBitMasks[3]
    }
}; 


#undef DX            
#undef DY            
#undef DBITCOUNT 
#undef FRAMERATE

#define DX          640
#define DY          -480
#define DBITCOUNT    12
#define FRAMERATE    30

// YV12, VGA, 30FPS
CS_DATARANGE_VIDEO DCAM_StreamMode_YV12_VGA = 
{
    // CSDATARANGE
    {   
        sizeof (CS_DATARANGE_VIDEO),     // Flags
        0,
        SAMPLESIZE,                      // SampleSize
        0,                               // Reserved
        STATIC_CSDATAFORMAT_TYPE_VIDEO,  
        FOURCC_YV12, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71,
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
    },

    TRUE,                   // BOOL,  bFixedSizeSamples (all samples same size?)
    TRUE,                   // BOOL,  bTemporalCompression (all I frames?)
    CS_VIDEOSTREAM_CAPTURE, // StreamDescriptionFlags  (CS_VIDEO_DESC_*)
    0,                      // MemoryAllocationFlags   (CS_VIDEO_ALLOC_*)

    // _CS_VIDEO_STREAM_CONFIG_CAPS  
    {
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO, 
        CS_AnalogVideo_None, // AnalogVideoStandard
        DX,DY,    // InputSize, (the inherent size of the incoming signal
                  //             with every digitized pixel unique)
        DX,DY,    // MinCroppingSize, smallest rcSrc cropping rect allowed
        DX,DY,    // MaxCroppingSize, largest  rcSrc cropping rect allowed
        1,        // CropGranularityX, granularity of cropping size
        1,        // CropGranularityY
        1,        // CropAlignX, alignment of cropping rect 
        1,        // CropAlignY;
        DX, DY,   // MinOutputSize, smallest bitmap stream can produce
        DX, DY,   // MaxOutputSize, largest  bitmap stream can produce
        DX,       // OutputGranularityX, granularity of output bitmap size
        DY,       // OutputGranularityY;
        0,        // StretchTapsX  (0 no stretch, 1 pix dup, 2 interp...)
        0,        // StretchTapsY
        0,        // ShrinkTapsX 
        0,        // ShrinkTapsY 
        // Allow 1% difference
        FRAMEINTERVAL_30FPS,    // MinFrameInterval (10,000,000 / 30.00FPS), 100nS units
        FRAMEINTERVAL_3_75FPS,  // MaxFrameInterval (10,000,000 /  3.75FPS), 100nS units
        BITRATE / 8,            // (DX * DY * DBITCOUNT) * DFPS_MIN,    // MinBitsPerSecond (3.75 FPS);
        BITRATE,                // (DX * DY * DBITCOUNT) * DFPS_MAX     // MaxBitsPerSecond (30.0 FPS);
    }, 
        
    // CS_VIDEOINFOHEADER (default format)
    {
        0,0,DX,DY,                            // RECT  rcSource; 
        0,0,DX,DY,                            // RECT  rcTarget; 
        BITRATE,                            // DWORD dwBitRate;
        0L,                                 // DWORD dwBitErrorRate;   
        REFTIME_30FPS,                      // REFERENCE_TIME  AvgTimePerFrame; 
        sizeof (CS_BITMAPINFOHEADER),       // DWORD biSize;
        DX,                                 // LONG  biWidth;
        DY,                                 // LONG  biHeight;
        1,                        // WORD  biPlanes;
        YV12DBITCOUNT,            // WORD  biBitCount;
        FOURCC_YV12,              // DWORD biCompression;
        SAMPLESIZE,               // DWORD biSizeImage;
        0,                        // LONG  biXPelsPerMeter;
        0,                        // LONG  biYPelsPerMeter;
        0,                        // DWORD biClrUsed;
        0,                        // DWORD biClrImportant;
        0, 0, 0                   // DWORD dwBitMasks[3]
    }
}; 

#undef DX            
#undef DY            
#undef DBITCOUNT 
#undef FRAMERATE

#define DX          80
#define DY          60
#define DBITCOUNT    16
#define FRAMERATE 	30

//RGB 5:6:5, QQVGA, 30FPS
CS_DATARANGE_VIDEO DCAM_StreamMode_RGB565_QQQVGA = 
{
    // CSDATARANGE
    {   
        sizeof (CS_DATARANGE_VIDEO),     // Flags
        0,
        SAMPLESIZE,                      // SampleSize
        0,                               // Reserved
        STATIC_CSDATAFORMAT_TYPE_VIDEO,  
        0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70, 
        STATIC_CSDATAFORMAT_SPECIFIER_VIDEOINFO
    },

⌨️ 快捷键说明

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