现在,我们在用正点原子的开发板进行摄像头的测试工作,遇到一个问题,想请教大家一下。 这是正点原子CSI部分的代码: camera_config.pixelFormat=kVIDEO_PixelFormatRGB565; camera_config.bytesPerPixel=APP_BPP; camera_config.resolution=FSL_VIDEO_RESOLUTION(lcddev.width,lcddev.height); camera_config.frameBufferLinePitch_Bytes=lcddev.width*APP_BPP; camera_config.interface=kCAMERA_InterfaceGatedClock; camera_config.controlFlags=APP_CAMERA_CONTROL_FLAGS; //初始化CSI CAMERA_RECEIVER_Init(&cameraReceiver,&camera_config,NULL,NULL); 其中,APP_CAMERA_CONTROL_FLAGS定义为: #define APP_CAMERA_CONTROL_FLAGS (kCAMERA_HrefActiveHigh | kCAMERA_VsyncActiveLow | kCAMERA_DataLatchOnRisingEdge) 程序中,有如下定义: enum _camera_flags { kCAMERA_HrefActiveLow = 0U, /*!< HREF is active low. */ kCAMERA_HrefActiveHigh = (1U << 0U), /*!< HREF is active high. */ kCAMERA_DataLatchOnFallingEdge = 0U, /*!< Pixel data latched at falling edge of pixel clock. */ kCAMERA_DataLatchOnRisingEdge = (1U << 1U), /*!< Pixel data latched at rising edge of pixel clock. */ kCAMERA_VsyncActiveLow = 0U, /*!< VSYNC is active low. */ kCAMERA_VsyncActiveHigh = (1U << 2U), /*!< VSYNC is active high. */ }; 正点原子原来用的是OV5640摄像头,输出是RGB565格式的信号,所以需要用到H、S硬件同步信号。现在,我们采用模拟摄像头,程序修改成: camera_config.pixelFormat=kCAMERA_InterfaceCCIR656;//ADV7280A转换而来的BT.656 Signal camera_config.bytesPerPixel=APP_BPP;//APP_BPP=2 camera_config.resolution=FSL_VIDEO_RESOLUTION(lcddev.width,lcddev.height); camera_config.frameBufferLinePitch_Bytes=lcddev.width*APP_BPP; camera_config.interface=kVIDEO_PixelFormatYUYV ; // YUV422 camera_config.controlFlags=APP_CAMERA_CONTROL_FLAGS; //初始化CSI CAMERA_RECEIVER_Init(&cameraReceiver,&camera_config,NULL,NULL); 我的问题是:当采用CCIR656格式(BT.656)的时候,APP_CAMERA_CONTROL_FLAGS怎么定义(设置)?
|