修改sample 模块 下面的Makefile.param 进行修改
SENSOR_TYPE ?= SONY_IMX178_LVDS_1080P_30FPS
改为
#SENSOR_TYPE ?= SONY_IMX178_LVDS_1080P_30FPS
#SENSOR_TYPE ?= OMNIVISION_OV4689_MIPI_1080P_30FPS
改为:
SENSOR_TYPE ?= OMNIVISION_OV4689_MIPI_1080P_30FPS
..\mpp\sample\common\sample_comm_vi.c 修改如下:
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{1, 0, 2, 3, -1, -1, -1, -1}
}
}
};
改为
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{0, 1, 2, 3, -1, -1, -1, -1}
}
}
};
解释,就是把 img_size 变成了1 而wdr_mode 设置为0 禁用。
typedef struct
{
img_size_t img_size; /* oringnal sensor input image size */
wdr_mode_e wdr_mode; /* WDR mode */
lvds_sync_mode_e sync_mode; /* sync mode: SOL, SAV */
raw_data_type_e raw_data_type; /* raw data type: 8/10/12/14 bit */
lvds_bit_endian data_endian; /* data endian: little/big */
lvds_bit_endian sync_code_endian; /* sync code endian: little/big */
short lane_id[LVDS_LANE_NUM]; /* lane_id: -1 - disable */
/* each vc has 4 params, sync_code[i]:
sync_mode is SYNC_MODE_SOL: SOF, EOF, SOL, EOL
sync_mode is SYNC_MODE_SAV: invalid sav, invalid eav, valid sav, valid eav */
unsigned short sync_code[LVDS_LANE_NUM][WDR_VC_NUM][SYNC_CODE_NUM];
} lvds_dev_attr_t;
重新运行,成功出现图像。
---------------------------------------------------------------------------------------------------------------
二。 调试bv_test 模块
1.
修改sensor Type, 打开bv_test 上一级目录中的Makefile.param:
SENSOR_TYPE ?= SONY_IMX178_LVDS_1080P_30FPS
改为
#SENSOR_TYPE ?= SONY_IMX178_LVDS_1080P_30FPS
#SENSOR_TYPE ?= OMNIVISION_OV4689_MIPI_1080P_30FPS
改为:
SENSOR_TYPE ?= OMNIVISION_OV4689_MIPI_1080P_30FPS
2.
修改W:\mpp\project\bv_test\bv_hal.c
PIC_SIZE_E enPicSize = PIC_HD1080;
HI_MPI_VB_Init 初始化失败:
修改:缓存池个数,修改为4个
stVbConf.astCommPool[0].u32BlkCnt = u32ViChnCnt * 4;
[SAMPLE_COMM_VPSS_StartGroup]-88: HI_MPI_VPSS_CreateGrp failed with 0xa0078010!
[bv_hal_start]-107: start VPSS GROUP failed!
3.
Error:
mmz_userdev:ioctl_mmb_alloc: hil_mmb_alloc(, 921600, 0x00000000, 0, ) failed!
System alloc mmz memory failed!
[SAMPLE_COMM_IVE_CreateImage]-894: Mmz Alloc fail,Error(0xffffffff)
Index: bv_core.c
===================================================================
-#define MAX_GRAY_IMG 64
+#define MAX_GRAY_IMG 10
4 .
W:\mpp\project\common\sample_comm_vi.c 修改如下:
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{1, 0, 2, 3, -1, -1, -1, -1}
}
}
};
改为
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{0, 1, 2, 3, -1, -1, -1, -1}
}
}
};
============================================================================
如果修改为 ov4689 4M
打开 SENSOR_TYPE ?= OMNIVISION_OV4689_MIPI_4M_30FPS
修改W:\mpp\project\bv_test\bv_hal.c
PIC_SIZE_E enPicSize = PIC_2592x1520;
stVbConf.astCommPool[0].u32BlkCnt = u32ViChnCnt * 2;
bv_core.c
#define MAX_GRAY_IMG 4
W:\mpp\project\common\sample_comm_vi.c 修改如下:
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{1, 0, 2, 3, -1, -1, -1, -1}
}
}
};
改为
combo_dev_attr_t MIPI_4lane_SENSOR_OV4689_12BIT_ATTR =
{
.input_mode = INPUT_MODE_MIPI,
{
.mipi_attr =
{
RAW_DATA_12BIT,
{0, 1, 2, 3, -1, -1, -1, -1}
}
}
};
===================================5658 ERRoR ===================================================
sion
=============SAMPLE_COMM_VI_SetMipiAttr enWDRMode: 0
linear mode
-------OV ov5658 Sensor 5M30fps Initial OK!-------
u32Width:720, u32Square:1
[hal_init_fb]-103: Put variable screen info failed!
process_list_init
MMB LEAK(pid=1128): 0x841FE000, 3686400 bytes, ''
mmz_userdev_release: mmb<0x841FE000> mapped to userspace 0xb699e000 will be force unmaped!
MMB LEAK(pid=1128): 0x84582000, 4915200 bytes, ''
mmz_userdev_release: mmb<0x84582000> mapped to userspace 0xb64ee000 will be force unmaped!
MMB LEAK(pid=1128): 0x84A32000, 1228800 bytes, ''
mmz_userdev_release: mmb<0x84A32000> mapped to userspace 0xb63c2000 will be force unmaped!
MMB LEAK(pid=1128): 0x84B5E000, 3686400 bytes, ''
mmz_userdev_release: mmb<0x84B5E000> mapped to userspace 0xb603e000 will be force unmaped!
MMB LEAK(pid=1128): 0x84EE2000, 4915200 bytes, ''
mmz_userdev_release: mmb<0x84EE2000> mapped to userspace 0xb5b8e000 will be force unmaped!
Segmentation fault
————————————————
原文链接:https://blog.csdn.net/luxgang/article/details/99723626