diff --git a/buildroot-overlay/package/audio_demo/Makefile b/buildroot-overlay/package/audio_demo/Makefile index b3631c5..84e176b 100644 --- a/buildroot-overlay/package/audio_demo/Makefile +++ b/buildroot-overlay/package/audio_demo/Makefile @@ -3,8 +3,16 @@ # AUDIO_DEMO_DIR_NAME ?= audio_demo AUDIO_DEMO_DIR ?= ${shell pwd} -CFLAGS := -mcpu=c908v -O2 -LDFLAGS := -mcpu=c908v -O2 +# CFLAGS := -mcpu=c908v -O2 +# LDFLAGS := -mcpu=c908v -O2 + +ifeq ($(BR2_RISCV_32), y) +CFLAGS += -march=rv32gcv_xtheadc +LDFLAGS += -march=rv32gcv_xtheadc +else +CFLAGS += -mcpu=c908v -O2 +LDFLAGS += -mcpu=c908v -O2 +endif BIN = audio_demo diff --git a/buildroot-overlay/package/face_detect/main_cv.cpp b/buildroot-overlay/package/face_detect/main_cv.cpp index 4fbeb0d..ecc3715 100644 --- a/buildroot-overlay/package/face_detect/main_cv.cpp +++ b/buildroot-overlay/package/face_detect/main_cv.cpp @@ -266,6 +266,7 @@ static void display_proc(int video_device) { context.video_format = V4L2_PIX_FMT_NV12; context.display_format = 0; // auto context.drm_rotation = rotation_0; + // context.buffer_num = 5; } else { diff --git a/buildroot-overlay/package/vvcam/configs/ov5647.auto.json b/buildroot-overlay/package/vvcam/configs/ov5647.auto.json index 618d95b..85d2f76 100644 --- a/buildroot-overlay/package/vvcam/configs/ov5647.auto.json +++ b/buildroot-overlay/package/vvcam/configs/ov5647.auto.json @@ -487,7 +487,7 @@ }, { "classname": "ADmscv2", - "enable": true, + "enable": false, "tables": [ { "dmsc_denoise_strength": [0, 16, 31, 31, 31, 31], @@ -587,7 +587,7 @@ }, { "classname": "A3dnrv3_1", - "enable": true, + "enable": false, "tables": [ { "blend_motion": [95, 95, 95, 90, 85, 80], diff --git a/buildroot-overlay/package/vvcam/configs/ov5647.manual.json b/buildroot-overlay/package/vvcam/configs/ov5647.manual.json index 7a2360e..d901fa5 100644 --- a/buildroot-overlay/package/vvcam/configs/ov5647.manual.json +++ b/buildroot-overlay/package/vvcam/configs/ov5647.manual.json @@ -386,8 +386,8 @@ "range_v": 7, "sadweight": 8, "sigma": 5, - "strength": 32, - "thr_motion_slope": 8, + "strength": 48, + "thr_motion_slope": 12, "tnr_en": true }, { diff --git a/buildroot-overlay/package/vvcam/isp/vvcam_isp_hal.c b/buildroot-overlay/package/vvcam/isp/vvcam_isp_hal.c index a1f37ab..d53d7d6 100644 --- a/buildroot-overlay/package/vvcam/isp/vvcam_isp_hal.c +++ b/buildroot-overlay/package/vvcam/isp/vvcam_isp_hal.c @@ -55,7 +55,8 @@ #include #include #include "vvcam_isp_driver.h" -#include "vvcam_isp_hal.h" +#include "vvcam_isp_hal.h"' +#include extern void vvcam_isp_proc_stat(unsigned long pde, const uint32_t *irq_mis, const int len); @@ -151,6 +152,9 @@ irqreturn_t vvcam_isp_irq_process(struct vvcam_isp_dev *isp_dev) return IRQ_HANDLED; } +uint32_t cut = 0; +uint64_t frame_timer = 0; +uint32_t flag = 0; irqreturn_t vvcam_isp_mi_irq_process(struct vvcam_isp_dev *isp_dev) { uint32_t miv1_mis = 0; @@ -221,6 +225,21 @@ irqreturn_t vvcam_isp_mi_irq_process(struct vvcam_isp_dev *isp_dev) miv2_mis &= ~MIV2_MIS_MCM_RAW_RADY_MASK; vvcam_event_queue(&isp_dev->event_dev, &event); isp_dev->irq_mis[VVCAM_EID_RDMA_MIS] = event.irqevent.irq_value; + + // if (miv2_mis & MIV2_MIS_MP_FRAME_END_MASK) { + // if(flag == 0) + // { + // flag = 1; + // frame_timer = ktime_get(); + // cut = 0; + // } + // cut = cut + 1; + // if(cut == 100) + // { + // printk("timer is %lld \n", (ktime_to_ns(ktime_sub(ktime_get(),frame_timer))) / 100); + // flag = 0; + // } + // } } if (miv2_mis & MIV2_MIS_JPD_FRAME_END_MASK) { diff --git a/buildroot-overlay/package/vvcam/isp_media_server b/buildroot-overlay/package/vvcam/isp_media_server index 282d28e..baec321 100755 Binary files a/buildroot-overlay/package/vvcam/isp_media_server and b/buildroot-overlay/package/vvcam/isp_media_server differ diff --git a/buildroot-overlay/package/vvcam/src/gc2093.c b/buildroot-overlay/package/vvcam/src/gc2093.c index 00d0883..dd1db95 100644 --- a/buildroot-overlay/package/vvcam/src/gc2093.c +++ b/buildroot-overlay/package/vvcam/src/gc2093.c @@ -145,7 +145,7 @@ static void deinit(void* ctx) { static struct reg_list gc2093_1920x1080_30fps[] = { - {0x03fe,0xf0}, + {0x03fe,0xf0}, {0x03fe,0xf0}, {0x03fe,0xf0}, {0x03fe,0x00}, @@ -172,7 +172,7 @@ static struct reg_list gc2093_1920x1080_30fps[] = { {0x0005, 0x05}, //line width = 0x522 = 1314 x 2 = 2628 {0x0006, 0x22}, {0x0007, 0x00}, //Vblank = 17 - {0x0008, 0x62}, + {0x0008, 0x6e}, {0x0009, 0x00}, {0x000a, 0x02}, {0x000b, 0x00}, @@ -183,8 +183,8 @@ static struct reg_list gc2093_1920x1080_30fps[] = { {0x0010, 0x8c}, {0x0013, 0x15}, {0x0019, 0x0c}, - {0x0041, 0x04}, // frame length = 0x04b6 = 1206 - {0x0042, 0xb6}, + {0x0041, 0x06}, // frame length = 0x04c2 = 1218 + {0x0042, 0x3a}, {0x0053, 0x60}, {0x008d, 0x92}, {0x0090, 0x00}, @@ -534,7 +534,7 @@ static int set_analog_gain(void* ctx, float gain) { sensor->sensor_again = again; } - sensor->mode.ae_info.cur_again = (float)sensor->sensor_again/64.0f; + sensor->mode.ae_info.cur_gain = (float)sensor->sensor_again/64.0f; return 0; } diff --git a/buildroot-overlay/package/vvcam/src/ov5647.c b/buildroot-overlay/package/vvcam/src/ov5647.c index 0ea1778..111dce5 100644 --- a/buildroot-overlay/package/vvcam/src/ov5647.c +++ b/buildroot-overlay/package/vvcam/src/ov5647.c @@ -311,6 +311,8 @@ static int get_mode(void* ctx, struct vvcam_sensor_mode* mode) { memcpy(mode, &sensor->mode, sizeof(struct vvcam_sensor_mode)); + // printf(" %s sensor->mode.ae_info.cur_again is %f \n", __func__, sensor->mode.ae_info.cur_again); + return 0; } @@ -395,8 +397,6 @@ static int set_analog_gain(void* ctx, float gain) { struct ov5647_ctx* sensor = ctx; uint32_t again; - // printf("ov5647 %s %f\n", __func__, gain); - again = (uint32_t)(gain * 16 + 0.5); if(sensor->sensor_again !=again) @@ -406,8 +406,9 @@ static int set_analog_gain(void* ctx, float gain) { sensor->sensor_again = again; } - sensor->mode.ae_info.cur_again = (float)sensor->sensor_again/16.0f; + sensor->mode.ae_info.cur_gain = (float)sensor->sensor_again/16.0f; + // printf("ov5647 %s %f sensor->mode.ae_info.cur_again is %f \n", __func__, gain, sensor->mode.ae_info.cur_again); return 0; } @@ -421,7 +422,7 @@ static int set_int_time(void* ctx, float time) { uint16_t exp_line = 0; float integraion_time = 0; - // printf("ov5647 %s %f\n", __func__, time); + printf("ov5647 %s %f\n", __func__, time); integraion_time = time; diff --git a/buildroot-overlay/package/vvcam/v4l2-drm/src/lib.c b/buildroot-overlay/package/vvcam/v4l2-drm/src/lib.c index aecd088..36dd103 100644 --- a/buildroot-overlay/package/vvcam/v4l2-drm/src/lib.c +++ b/buildroot-overlay/package/vvcam/v4l2-drm/src/lib.c @@ -25,7 +25,7 @@ void v4l2_drm_default_context(struct v4l2_drm_context* ctx) { ctx->video_format = V4L2_PIX_FMT_NV12; ctx->display_format = DRM_FORMAT_NV12; ctx->display = true; - ctx->buffer_num = DRM_BUFFERING + 2; + ctx->buffer_num = DRM_BUFFERING + 3; ctx->plane = NULL; ctx->flag_dqbuf = true; ctx->offset_x = 0;