diff --git a/core/algorithm/el_algorithm_nvidia_det.cpp b/core/algorithm/el_algorithm_nvidia_det.cpp index d5e0bab7..6fe85996 100644 --- a/core/algorithm/el_algorithm_nvidia_det.cpp +++ b/core/algorithm/el_algorithm_nvidia_det.cpp @@ -143,9 +143,12 @@ el_err_code_t AlgorithmNvidiaDet::postprocess() { _results.clear(); el_shape_t __output_shape0; el_shape_t __output_shape1; + + static_assert(sizeof(float) == 4); + // get output - auto* data0{static_cast<_Float32*>(this->__p_engine->get_output(0))}; - auto* data1{static_cast<_Float32*>(this->__p_engine->get_output(1))}; + auto* data0{static_cast(this->__p_engine->get_output(0))}; + auto* data1{static_cast(this->__p_engine->get_output(1))}; __output_shape0 = this->__p_engine->get_output_shape(0); __output_shape1 = this->__p_engine->get_output_shape(1); @@ -155,7 +158,6 @@ el_err_code_t AlgorithmNvidiaDet::postprocess() { this->_conf_shape = __output_shape0.dims[3] > __output_shape1.dims[3] ? __output_shape1 : __output_shape0; this->_bboxes_shape = __output_shape0.dims[3] > __output_shape1.dims[3] ? __output_shape0 : __output_shape1; - auto B = this->_conf_shape.dims[0]; auto H = this->_conf_shape.dims[1]; auto W = this->_conf_shape.dims[2]; auto BboxsCount = this->_conf_shape.dims[3]; diff --git a/core/el_version.h b/core/el_version.h index 1c256501..ff1d0e82 100644 --- a/core/el_version.h +++ b/core/el_version.h @@ -38,7 +38,7 @@ constexpr static uint16_t YEAR = constexpr static uint16_t MONTH = (__DATE__[0] == 'J') ? ((__DATE__[1] == 'a') ? 1 : ((__DATE__[2] == 'n') ? 6 : 7)) : (__DATE__[0] == 'F') ? 2 : (__DATE__[0] == 'M') ? ((__DATE__[2] == 'r') ? 3 : 5) - : (__DATE__[0] == 'A') ? ((__DATE__[2] == 'p') ? 4 : 8) + : (__DATE__[0] == 'A') ? ((__DATE__[1] == 'p') ? 4 : 8) : (__DATE__[0] == 'S') ? 9 : (__DATE__[0] == 'O') ? 10 : (__DATE__[0] == 'N') ? 11 diff --git a/porting/himax/we2/drivers/OV5647_mipi_2lane_1296x972.i b/porting/himax/we2/drivers/OV5647_mipi_2lane_1296x972.i index e87e661d..327ad247 100644 --- a/porting/himax/we2/drivers/OV5647_mipi_2lane_1296x972.i +++ b/porting/himax/we2/drivers/OV5647_mipi_2lane_1296x972.i @@ -93,7 +93,7 @@ {HX_CIS_I2C_Action_W, 0x3503, 0x00}, {HX_CIS_I2C_Action_W, 0x3820, 0x41}, - {HX_CIS_I2C_Action_W, 0x3821, 0x00}, + {HX_CIS_I2C_Action_W, 0x3821, 0x00}, // LR flip {HX_CIS_I2C_Action_W, 0x350a, 0x00}, {HX_CIS_I2C_Action_W, 0x350b, 0x10}, diff --git a/porting/himax/we2/drivers/drv_imx219.c b/porting/himax/we2/drivers/drv_imx219.c index 69bd8255..47fb8c56 100644 --- a/porting/himax/we2/drivers/drv_imx219.c +++ b/porting/himax/we2/drivers/drv_imx219.c @@ -434,8 +434,6 @@ el_err_code_t drv_imx219_init(uint16_t width, uint16_t height) { //JPEG Cfg jpeg_cfg.jpeg_path = JPEG_PATH_ENCODER_EN; - jpeg_cfg.dec_roi_stx = 0; - jpeg_cfg.dec_roi_sty = 0; jpeg_cfg.enc_width = width; jpeg_cfg.enc_height = height; jpeg_cfg.jpeg_enctype = JPEG_ENC_TYPE_YUV422; diff --git a/porting/himax/we2/drivers/drv_imx708.c b/porting/himax/we2/drivers/drv_imx708.c index 6916d518..ae0f4494 100644 --- a/porting/himax/we2/drivers/drv_imx708.c +++ b/porting/himax/we2/drivers/drv_imx708.c @@ -470,12 +470,10 @@ el_err_code_t drv_imx708_init(uint16_t width, uint16_t height) { //JPEG Cfg jpeg_cfg.jpeg_path = JPEG_PATH_ENCODER_EN; - jpeg_cfg.dec_roi_stx = 0; - jpeg_cfg.dec_roi_sty = 0; jpeg_cfg.enc_width = width; jpeg_cfg.enc_height = height; jpeg_cfg.jpeg_enctype = JPEG_ENC_TYPE_YUV422; - jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_4X; + jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_10X; #if defined(CONFIG_EL_BOARD_DEV_BOARD_WE2) if (width > 240 && height > 240) { diff --git a/porting/himax/we2/drivers/drv_ov5647.c b/porting/himax/we2/drivers/drv_ov5647.c index bfc4851e..2f99aa81 100644 --- a/porting/himax/we2/drivers/drv_ov5647.c +++ b/porting/himax/we2/drivers/drv_ov5647.c @@ -29,6 +29,13 @@ static HX_CIS_SensorSetting_t OV5647_stream_off[] = { {HX_CIS_I2C_Action_W, 0x4202, 0x0F}, }; +static HX_CIS_SensorSetting_t OV5647_mirror_setting[] = { + {HX_CIS_I2C_Action_W, 0x0101, 0x00}, +#ifdef CONFIG_EL_BOARD_GROVE_VISION_AI_WE2 + {HX_CIS_I2C_Action_W, 0x3821, 0x07}, +#endif +}; + el_err_code_t drv_ov5647_probe() { hx_drv_cis_init((CIS_XHSHUTDOWN_INDEX_E)DEAULT_XHSUTDOWN_PIN, SENSORCTRL_MCLK_DIV3); @@ -226,13 +233,6 @@ el_err_code_t drv_ov5647_init(uint16_t width, uint16_t height) { goto err; } - HX_CIS_SensorSetting_t OV5647_mirror_setting[] = { - {HX_CIS_I2C_Action_W, 0x0101, 0x00}, -#ifdef CONFIG_EL_BOARD_GROVE_VISION_AI_WE2 - {HX_CIS_I2C_Action_W, 0x3821, 0x07}, -#endif - }; - if (hx_drv_cis_setRegTable(OV5647_mirror_setting, HX_CIS_SIZE_N(OV5647_mirror_setting, HX_CIS_SensorSetting_t)) != HX_CIS_NO_ERROR) { ret = EL_EIO; @@ -346,7 +346,7 @@ el_err_code_t drv_ov5647_init(uint16_t width, uint16_t height) { hw5x5_cfg.hw5x5_path = HW5x5_PATH_THROUGH_DEMOSAIC; hw5x5_cfg.demos_bndmode = DEMOS_BNDODE_REFLECT; hw5x5_cfg.demos_color_mode = DEMOS_COLORMODE_YUV422; - hw5x5_cfg.demos_pattern_mode = DEMOS_PATTENMODE_BGGR; + hw5x5_cfg.demos_pattern_mode = DEMOS_PATTENMODE_GRBG; hw5x5_cfg.demoslpf_roundmode = DEMOSLPF_ROUNDMODE_ROUNDING; hw5x5_cfg.hw55_crop_stx = start_x; hw5x5_cfg.hw55_crop_sty = start_y; @@ -355,16 +355,18 @@ el_err_code_t drv_ov5647_init(uint16_t width, uint16_t height) { //JPEG Cfg jpeg_cfg.jpeg_path = JPEG_PATH_ENCODER_EN; - jpeg_cfg.dec_roi_stx = 0; - jpeg_cfg.dec_roi_sty = 0; jpeg_cfg.enc_width = width; jpeg_cfg.enc_height = height; jpeg_cfg.jpeg_enctype = JPEG_ENC_TYPE_YUV422; - jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_4X; + jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_10X; +#if defined(CONFIG_EL_BOARD_DEV_BOARD_WE2) if (width > 240 && height > 240) { jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_10X; + } else { + jpeg_cfg.jpeg_encqtable = JPEG_ENC_QTABLE_4X; } +#endif // sensordplib_set_int_hw5x5rgb_jpeg_wdma23(hw5x5_cfg, jpeg_cfg, 1, NULL); sensordplib_set_int_hw5x5_jpeg_wdma23(hw5x5_cfg, jpeg_cfg, 1, NULL);