Skip to content

Commit

Permalink
middleware: version release v4.1.5
Browse files Browse the repository at this point in the history
middleware:
[sensor]support sc035hgs_1l
[sample] vo layer framerate
[sensor] Update the SC5336 driver configuration and make compatibility adjustments.
[panel][bt1120] add panel nvp6021
[sensor]add gc2093 60fps
[sensor]support sc3336p
[V410][Phobos] add mipi switch support.
[sensor] add sc2336_slave [sensor] add sc2331_slave
[feat](Sensor): Add support for sensor SC2336P_1L.
[sensor]modify 4336 4336p bayerpattern
[sensor]add new sensor sc223a(linear mode can be used for sc233a)

isp:
[feat](toojson): update tooljson generation way.
[feat] isp add for trinocular camera.
[feat](isp) modify param type of VC module
[awb] refine adjust saturation by CA memory use

drv:
[feature](venc): venc sbm mode suppor multiple chn
[vpss] support multi chn(sbm + frm) online
[V410][PHOBOS] add mipi switch support.
remove useless code

Change-Id: Ieb9e66c5f33e620e615fd752ba7d29229716bf5c
  • Loading branch information
sophgo-forum-service authored and carbonfix committed Dec 22, 2023
1 parent b7e531d commit fce93ce
Show file tree
Hide file tree
Showing 259 changed files with 26,713 additions and 174 deletions.
9 changes: 9 additions & 0 deletions middleware/v2/component/isp/sensor.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sensor-$(CONFIG_SENSOR_SMS_SC850SL) += sms_sc850sl
sensor-$(CONFIG_SENSOR_SMS_SC3335) += sms_sc3335
sensor-$(CONFIG_SENSOR_SMS_SC3335_SLAVE) += sms_sc3335_slave
sensor-$(CONFIG_SENSOR_SMS_SC3336) += sms_sc3336
sensor-$(CONFIG_SENSOR_SMS_SC3336P) += sms_sc3336p
sensor-$(CONFIG_SENSOR_SMS_SC4210) += sms_sc4210
sensor-$(CONFIG_SENSOR_SMS_SC8238) += sms_sc8238
sensor-$(CONFIG_SENSOR_SOI_F23) += soi_f23
Expand Down Expand Up @@ -85,6 +86,7 @@ sensor-$(CONFIG_SENSOR_PIXELPLUS_PR2100) += pixelplus_pr2100
sensor-$(CONFIG_SENSOR_SMS_SC035GS) += sms_sc035gs
sensor-$(CONFIG_SENSOR_SMS_SC035GS_1L) += sms_sc035gs_1L
sensor-$(CONFIG_SENSOR_SMS_SC035HGS) += sms_sc035hgs
sensor-$(CONFIG_SENSOR_SMS_SC035HGS_1L) += sms_sc035hgs_1L
sensor-$(CONFIG_SENSOR_SMS_SC1336_1L) += sms_sc1336_1L
sensor-$(CONFIG_SENSOR_SMS_SC1346_1L) += sms_sc1346_1L
sensor-$(CONFIG_SENSOR_SMS_SC1346_1L_SLAVE) += sms_sc1346_1L_slave
Expand All @@ -97,11 +99,18 @@ sensor-$(CONFIG_SENSOR_SMS_SC531AI_2L) += sms_sc531ai_2L
sensor-$(CONFIG_SENSOR_SMS_SC3332) += sms_sc3332
sensor-$(CONFIG_SENSOR_SMS_SC3335) += sms_sc3335
sensor-$(CONFIG_SENSOR_SMS_SC3336) += sms_sc3336
sensor-$(CONFIG_SENSOR_SMS_SC3336P) += sms_sc3336p
sensor-$(CONFIG_SENSOR_SMS_SC2331_1L) += sms_sc2331_1L
sensor-$(CONFIG_SENSOR_SMS_SC2331_1L_SLAVE) += sms_sc2331_1L_slave
sensor-$(CONFIG_SENSOR_SMS_SC2331_1L_SLAVE1) += sms_sc2331_1L_slave1
sensor-$(CONFIG_SENSOR_SMS_SC2335) += sms_sc2335
sensor-$(CONFIG_SENSOR_SMS_SC2336) += sms_sc2336
sensor-$(CONFIG_SENSOR_SMS_SC2336_SLAVE) += sms_sc2336_slave
sensor-$(CONFIG_SENSOR_SMS_SC2336_SLAVE1) += sms_sc2336_slave1
sensor-$(CONFIG_SENSOR_SMS_SC2336_1L) += sms_sc2336_1L
sensor-$(CONFIG_SENSOR_SMS_SC2336P) += sms_sc2336p
sensor-$(CONFIG_SENSOR_SMS_SC2336P_1L) += sms_sc2336p_1L
sensor-$(CONFIG_SENSOR_SMS_SC223A_1L) += sms_sc223a_1L
sensor-$(CONFIG_SENSOR_SMS_SC4336) += sms_sc4336
sensor-$(CONFIG_SENSOR_SMS_SC4336P) += sms_sc4336p
sensor-$(CONFIG_SENSOR_SMS_SC5336_2L) += sms_sc5336_2L
Expand Down
24 changes: 24 additions & 0 deletions middleware/v2/component/isp/sensor/cv180x/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ sms_sc035gs_1L:
sms_sc035hgs:
$(call MAKE_SENSOR, ${@})

sms_sc035hgs_1L:
$(call MAKE_SENSOR, ${@})

sms_sc1336_1L:
$(call MAKE_SENSOR, ${@})

Expand Down Expand Up @@ -158,21 +161,42 @@ sms_sc3335:
sms_sc3336:
$(call MAKE_SENSOR, ${@})

sms_sc3336p:
$(call MAKE_SENSOR, ${@})

sms_sc2331_1L:
$(call MAKE_SENSOR, ${@})

sms_sc2331_1L_slave:
$(call MAKE_SENSOR, ${@})

sms_sc2331_1L_slave1:
$(call MAKE_SENSOR, ${@})

sms_sc2335:
$(call MAKE_SENSOR, ${@})

sms_sc2336:
$(call MAKE_SENSOR, ${@})

sms_sc2336_slave:
$(call MAKE_SENSOR, ${@})

sms_sc2336_slave1:
$(call MAKE_SENSOR, ${@})

sms_sc2336_1L:
$(call MAKE_SENSOR, ${@})

sms_sc2336p:
$(call MAKE_SENSOR, ${@})

sms_sc2336p_1L:
$(call MAKE_SENSOR, ${@})

sms_sc223a_1L:
$(call MAKE_SENSOR, ${@})

sms_sc4336:
$(call MAKE_SENSOR, ${@})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static CVI_S32 cmos_get_ae_default(VI_PIPE ViPipe, AE_SENSOR_DEFAULT_S *pstAeSns
switch (pstSnsState->enWDRMode) {
default:
case WDR_MODE_NONE: /*linear mode*/
pstAeSnsDft->f32Fps = g_astGc2093_mode[GC2093_MODE_1920X1080P30].f32MaxFps;
pstAeSnsDft->f32Fps = g_astGc2093_mode[GC2093_MODE_1920X1080P60].f32MaxFps;
pstAeSnsDft->f32MinFps = g_astGc2093_mode[GC2093_MODE_1920X1080P30].f32MinFps;
pstAeSnsDft->au8HistThresh[0] = 0xd;
pstAeSnsDft->au8HistThresh[1] = 0x28;
Expand Down Expand Up @@ -923,6 +923,17 @@ static CVI_S32 cmos_set_image_mode(VI_PIPE ViPipe, ISP_CMOS_SENSOR_IMAGE_MODE_S
pstSnsState->enWDRMode);
return CVI_FAILURE;
}
} else if (pstSensorImageMode->f32Fps > 30) {
if (GC2093_RES_IS_1080P(pstSensorImageMode->u16Width, pstSensorImageMode->u16Height))
u8SensorImageMode = GC2093_MODE_1920X1080P60;
else {
CVI_TRACE_SNS(CVI_DBG_ERR, "Not support! Width:%d, Height:%d, Fps:%f, WDRMode:%d\n",
pstSensorImageMode->u16Width,
pstSensorImageMode->u16Height,
pstSensorImageMode->f32Fps,
pstSnsState->enWDRMode);
return CVI_FAILURE;
}
} else {
CVI_TRACE_SNS(CVI_DBG_ERR, "Not support this Fps:%f\n", pstSensorImageMode->f32Fps);
return CVI_FAILURE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum gc2093_wdr_regs_e {

typedef enum _GC2093_MODE_E {
GC2093_MODE_1920X1080P30 = 0,
GC2093_MODE_1920X1080P60,
GC2093_MODE_LINEAR_NUM,
GC2093_MODE_1920X1080P30_WDR = GC2093_MODE_LINEAR_NUM,
GC2093_MODE_NUM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,47 @@ static const GC2093_MODE_S g_astGc2093_mode[GC2093_MODE_NUM] = {
.u32Step = 10*16,
},
},
[GC2093_MODE_1920X1080P60] = {
.name = "1920X1080P60",
.astImg[0] = {
.stSnsSize = {
.u32Width = 1920,
.u32Height = 1080,
},
.stWndRect = {
.s32X = 0,
.s32Y = 0,
.u32Width = 1920,
.u32Height = 1080,
},
.stMaxSize = {
.u32Width = 1920,
.u32Height = 1080,
},
},
.f32MaxFps = 60,
.f32MinFps = 2.07, /* 1125 * 30 / 0x3FFF */
.u32HtsDef = 2200,
.u32VtsDef = 1250,
.stExp[0] = {
.u16Min = 1,
.u16Max = 0x3fff,
.u16Def = 0x2000,
.u16Step = 1,
},
.stAgain[0] = {
.u32Min = 64,
.u32Max = 62977,
.u32Def = 64,
.u32Step = 1,
},
.stDgain[0] = {
.u32Min = 64*16,
.u32Max = 7073*16,
.u32Def = 581*16,
.u32Step = 10*16,
},
},
[GC2093_MODE_1920X1080P30_WDR] = {
.name = "1920X1080P30_WDR",
.astImg[0] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "gc2093_cmos_ex.h"

static void gc2093_linear_1080p30_init(VI_PIPE ViPipe);
static void gc2093_linear_1080p60_init(VI_PIPE ViPipe);
static void gc2093_wdr_1080p30_init(VI_PIPE ViPipe);

CVI_U8 gc2093_i2c_addr = 0x37;//0x6e
Expand Down Expand Up @@ -255,8 +256,10 @@ void gc2093_init(VI_PIPE ViPipe)
if (u8ImgMode == GC2093_MODE_1920X1080P30_WDR) {
gc2093_wdr_1080p30_init(ViPipe);
}
} else {
} else if (u8ImgMode == GC2093_MODE_1920X1080P30) {
gc2093_linear_1080p30_init(ViPipe);
} else {
gc2093_linear_1080p60_init(ViPipe);
}


Expand Down Expand Up @@ -427,6 +430,167 @@ static void gc2093_linear_1080p30_init(VI_PIPE ViPipe)
printf("ViPipe:%d,===GC2093 1080P 30fps 10bit LINE Init OK!===\n", ViPipe);
}

static void gc2093_linear_1080p60_init(VI_PIPE ViPipe)
{
delay_ms(10);

/****system****/
gc2093_write_register(ViPipe, 0x03fe, 0xf0);
gc2093_write_register(ViPipe, 0x03fe, 0xf0);
gc2093_write_register(ViPipe, 0x03fe, 0xf0);
gc2093_write_register(ViPipe, 0x03fe, 0x00);
gc2093_write_register(ViPipe, 0x03f2, 0x00);
gc2093_write_register(ViPipe, 0x03f3, 0x00);
gc2093_write_register(ViPipe, 0x03f4, 0x36);
gc2093_write_register(ViPipe, 0x03f5, 0xc0);
gc2093_write_register(ViPipe, 0x03f6, 0x0B);
gc2093_write_register(ViPipe, 0x03f7, 0x01);
gc2093_write_register(ViPipe, 0x03f8, 0x58);
gc2093_write_register(ViPipe, 0x03f9, 0x40);
gc2093_write_register(ViPipe, 0x03fc, 0x8e);
/****CISCTL & ANALOG*/
gc2093_write_register(ViPipe, 0x0087, 0x18);
gc2093_write_register(ViPipe, 0x00ee, 0x30);
gc2093_write_register(ViPipe, 0x00d0, 0xbf);
gc2093_write_register(ViPipe, 0x01a0, 0x00);
gc2093_write_register(ViPipe, 0x01a4, 0x40);
gc2093_write_register(ViPipe, 0x01a5, 0x40);
gc2093_write_register(ViPipe, 0x01a6, 0x40);
gc2093_write_register(ViPipe, 0x01af, 0x09);
gc2093_write_register(ViPipe, 0x0001, 0x00);
gc2093_write_register(ViPipe, 0x0002, 0x02);
gc2093_write_register(ViPipe, 0x0003, 0x04);
gc2093_write_register(ViPipe, 0x0004, 0x02);
gc2093_write_register(ViPipe, 0x0005, 0x02);
gc2093_write_register(ViPipe, 0x0006, 0x94);
gc2093_write_register(ViPipe, 0x0007, 0x00);
gc2093_write_register(ViPipe, 0x0008, 0x11);
gc2093_write_register(ViPipe, 0x0009, 0x00);
gc2093_write_register(ViPipe, 0x000a, 0x02);
gc2093_write_register(ViPipe, 0x000b, 0x00);
gc2093_write_register(ViPipe, 0x000c, 0x04);
gc2093_write_register(ViPipe, 0x000d, 0x04);
gc2093_write_register(ViPipe, 0x000e, 0x40);
gc2093_write_register(ViPipe, 0x000f, 0x07);
gc2093_write_register(ViPipe, 0x0010, 0x8c);
gc2093_write_register(ViPipe, 0x0013, 0x15);
gc2093_write_register(ViPipe, 0x0019, 0x0c);
gc2093_write_register(ViPipe, 0x0041, 0x04);
gc2093_write_register(ViPipe, 0x0042, 0xE2);
gc2093_write_register(ViPipe, 0x0053, 0x60);
gc2093_write_register(ViPipe, 0x008d, 0x92);
gc2093_write_register(ViPipe, 0x0090, 0x00);
gc2093_write_register(ViPipe, 0x00c7, 0xe1);
gc2093_write_register(ViPipe, 0x001b, 0x73);
gc2093_write_register(ViPipe, 0x0028, 0x0d);
gc2093_write_register(ViPipe, 0x0029, 0x24);
gc2093_write_register(ViPipe, 0x002b, 0x04);
gc2093_write_register(ViPipe, 0x002e, 0x23);
gc2093_write_register(ViPipe, 0x0037, 0x03);
gc2093_write_register(ViPipe, 0x0043, 0x04);
gc2093_write_register(ViPipe, 0x0044, 0x28);
gc2093_write_register(ViPipe, 0x004a, 0x01);
gc2093_write_register(ViPipe, 0x004b, 0x20);
gc2093_write_register(ViPipe, 0x0055, 0x28);
gc2093_write_register(ViPipe, 0x0066, 0x3f);
gc2093_write_register(ViPipe, 0x0068, 0x3f);
gc2093_write_register(ViPipe, 0x006b, 0x44);
gc2093_write_register(ViPipe, 0x0077, 0x00);
gc2093_write_register(ViPipe, 0x0078, 0x20);
gc2093_write_register(ViPipe, 0x007c, 0xa1);
gc2093_write_register(ViPipe, 0x00ce, 0x7c);
gc2093_write_register(ViPipe, 0x00d3, 0xd4);
gc2093_write_register(ViPipe, 0x00e6, 0x50);
/*gain*/
gc2093_write_register(ViPipe, 0x00b6, 0xc0);
gc2093_write_register(ViPipe, 0x00b0, 0x68);
/*isp*/
gc2093_write_register(ViPipe, 0x0101, 0x0c);
gc2093_write_register(ViPipe, 0x0102, 0x89);
gc2093_write_register(ViPipe, 0x0104, 0x01);
gc2093_write_register(ViPipe, 0x0107, 0xa6);
gc2093_write_register(ViPipe, 0x0108, 0xa9);
gc2093_write_register(ViPipe, 0x0109, 0xa8);
gc2093_write_register(ViPipe, 0x010a, 0xa7);
gc2093_write_register(ViPipe, 0x010b, 0xff);
gc2093_write_register(ViPipe, 0x010c, 0xff);
gc2093_write_register(ViPipe, 0x010f, 0x00);
gc2093_write_register(ViPipe, 0x0158, 0x00);
gc2093_write_register(ViPipe, 0x0428, 0x86);
gc2093_write_register(ViPipe, 0x0429, 0x86);
gc2093_write_register(ViPipe, 0x042a, 0x86);
gc2093_write_register(ViPipe, 0x042b, 0x68);
gc2093_write_register(ViPipe, 0x042c, 0x68);
gc2093_write_register(ViPipe, 0x042d, 0x68);
gc2093_write_register(ViPipe, 0x042e, 0x68);
gc2093_write_register(ViPipe, 0x042f, 0x68);
gc2093_write_register(ViPipe, 0x0430, 0x4f);
gc2093_write_register(ViPipe, 0x0431, 0x68);
gc2093_write_register(ViPipe, 0x0432, 0x67);
gc2093_write_register(ViPipe, 0x0433, 0x66);
gc2093_write_register(ViPipe, 0x0434, 0x66);
gc2093_write_register(ViPipe, 0x0435, 0x66);
gc2093_write_register(ViPipe, 0x0436, 0x66);
gc2093_write_register(ViPipe, 0x0437, 0x66);
gc2093_write_register(ViPipe, 0x0438, 0x62);
gc2093_write_register(ViPipe, 0x0439, 0x62);
gc2093_write_register(ViPipe, 0x043a, 0x62);
gc2093_write_register(ViPipe, 0x043b, 0x62);
gc2093_write_register(ViPipe, 0x043c, 0x62);
gc2093_write_register(ViPipe, 0x043d, 0x62);
gc2093_write_register(ViPipe, 0x043e, 0x62);
gc2093_write_register(ViPipe, 0x043f, 0x62);
/*dark sun*/
gc2093_write_register(ViPipe, 0x0123, 0x08);
gc2093_write_register(ViPipe, 0x0123, 0x00);
gc2093_write_register(ViPipe, 0x0120, 0x01);
gc2093_write_register(ViPipe, 0x0121, 0x04);
gc2093_write_register(ViPipe, 0x0122, 0xd8);
gc2093_write_register(ViPipe, 0x0124, 0x03);
gc2093_write_register(ViPipe, 0x0125, 0xff);
gc2093_write_register(ViPipe, 0x001a, 0x8c);
gc2093_write_register(ViPipe, 0x00c6, 0xe0);
/*blk*/
gc2093_write_register(ViPipe, 0x0026, 0x30);
gc2093_write_register(ViPipe, 0x0142, 0x00);
gc2093_write_register(ViPipe, 0x0149, 0x1e);
gc2093_write_register(ViPipe, 0x014a, 0x0f);
gc2093_write_register(ViPipe, 0x014b, 0x00);
gc2093_write_register(ViPipe, 0x0155, 0x07);
gc2093_write_register(ViPipe, 0x0414, 0x78);
gc2093_write_register(ViPipe, 0x0415, 0x78);
gc2093_write_register(ViPipe, 0x0416, 0x78);
gc2093_write_register(ViPipe, 0x0417, 0x78);
gc2093_write_register(ViPipe, 0x0454, 0x78);
gc2093_write_register(ViPipe, 0x0455, 0x78);
gc2093_write_register(ViPipe, 0x0456, 0x78);
gc2093_write_register(ViPipe, 0x0457, 0x78);
gc2093_write_register(ViPipe, 0x04e0, 0x18);
/*window*/
gc2093_write_register(ViPipe, 0x0192, 0x02);
gc2093_write_register(ViPipe, 0x0194, 0x03);
gc2093_write_register(ViPipe, 0x0195, 0x04);
gc2093_write_register(ViPipe, 0x0196, 0x38);
gc2093_write_register(ViPipe, 0x0197, 0x07);
gc2093_write_register(ViPipe, 0x0198, 0x80);
/****DVP & MIPI****/
gc2093_write_register(ViPipe, 0x019a, 0x06);
gc2093_write_register(ViPipe, 0x007b, 0x2a);
gc2093_write_register(ViPipe, 0x0023, 0x2d);
gc2093_write_register(ViPipe, 0x0201, 0x27);
gc2093_write_register(ViPipe, 0x0202, 0x56);
gc2093_write_register(ViPipe, 0x0203, 0xb6);
gc2093_write_register(ViPipe, 0x0212, 0x80);
gc2093_write_register(ViPipe, 0x0213, 0x07);
gc2093_write_register(ViPipe, 0x0215, 0x10);
gc2093_write_register(ViPipe, 0x003e, 0x91);

gc2093_default_reg_init(ViPipe);
delay_ms(80);

printf("ViPipe:%d,===GC2093 1080P 60fps 10bit LINE Init OK!===\n", ViPipe);
}

static void gc2093_wdr_1080p30_init(VI_PIPE ViPipe)
{
delay_ms(10);
Expand Down
36 changes: 36 additions & 0 deletions middleware/v2/component/isp/sensor/cv180x/sms_sc035hgs_1L/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
SHELL = /bin/bash
ifeq ($(PARAM_FILE), )
PARAM_FILE=../../../../../../$(shell echo $(MW_VER))/Makefile.param
include $(PARAM_FILE)
endif

SDIR = $(PWD)
SRCS = $(wildcard $(SDIR)/*.c)
INCS = -I$(MW_INC) -I$(ISP_INC) -I$(KERNEL_INC) -I./include
OBJS = $(SRCS:.c=.o)
DEPS = $(SRCS:.c=.d)
TARGET_A = $(MW_LIB)/libsns_sc035hgs_1L.a
TARGET_SO = $(MW_LIB)/libsns_sc035hgs_1L.so

EXTRA_CFLAGS = $(INCS)
EXTRA_LDFLAGS =

.PHONY : clean all
all : $(TARGET_A) $(TARGET_SO)

$(SDIR)/%.o: $(SDIR)/%.c
@$(CC) $(DEPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
@echo [$(notdir $(CC))] $(notdir $@)

$(TARGET_A): $(OBJS)
@$(AR) $(ARFLAGS) $@ $(OBJS)
@echo -e $(YELLOW)[LINK]$(END)[$(notdir $(AR))] $(notdir $(TARGET_A))

$(TARGET_SO): $(OBJS)
@$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ --start-group $(OBJS) --end-group
@echo -e $(GREEN)[LINK]$(END)[$(notdir $(LD))] $(notdir $(TARGET_SO))

clean:
@rm -f $(OBJS) $(DEPS) $(TARGET_A) $(TARGET_SO)

-include $(DEPS)
Loading

0 comments on commit fce93ce

Please sign in to comment.