Skip to content

Commit

Permalink
(Continued)
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Aug 13, 2024
1 parent 26a6a0c commit cdff3e2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/hal/hisi/v1_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ char _v1_aud_chn = 0;
char _v1_aud_dev = 0;
char _v1_isp_chn = 0;
char _v1_isp_dev = 0;
char _v1_venc_dev = 0;
char _v1_venc_grp = 1;
char _v1_venc_grp = 0;
char _v1_vi_chn = 0;
char _v1_vi_dev = 0;
char _v1_vpss_chn = 0;
Expand Down Expand Up @@ -147,7 +146,7 @@ int v1_channel_bind(char index)
v1_sys_bind source = { .module = V1_SYS_MOD_VPSS,
.device = _v1_vpss_grp, .channel = index };
v1_sys_bind dest = { .module = V1_SYS_MOD_VENC,
.device = _v1_venc_dev, .channel = index };
.device = _v1_venc_grp, .channel = index };
if (ret = v1_sys.fnBind(&source, &dest))
return ret;
}
Expand Down Expand Up @@ -208,7 +207,7 @@ int v1_channel_unbind(char index)
v1_sys_bind source = { .module = V1_SYS_MOD_VPSS,
.device = _v1_vpss_grp, .channel = index };
v1_sys_bind dest = { .module = V1_SYS_MOD_VENC,
.device = _v1_venc_dev, .channel = index };
.device = _v1_venc_grp, .channel = index };
if (ret = v1_sys.fnUnbind(&source, &dest))
return ret;
}
Expand Down Expand Up @@ -345,7 +344,7 @@ int v1_region_create(char handle, hal_rect rect, short opacity)
int ret;

v1_sys_bind channel = { .module = V1_SYS_MOD_VENC,
.device = _v1_venc_dev, .channel = 0 };
.device = _v1_venc_grp, .channel = 0 };
v1_rgn_cnf region, regionCurr;
v1_rgn_chn attrib, attribCurr;

Expand Down Expand Up @@ -395,7 +394,7 @@ int v1_region_create(char handle, hal_rect rect, short opacity)
void v1_region_destroy(char handle)
{
v1_sys_bind channel = { .module = V1_SYS_MOD_VENC,
.device = _v1_venc_dev, .channel = 0 };
.device = _v1_venc_grp, .channel = 0 };

v1_rgn.fnDetachChannel(handle, &channel);
v1_rgn.fnDestroyRegion(handle);
Expand Down Expand Up @@ -525,8 +524,6 @@ int v1_video_create(char index, hal_vidconfig *config)
attrib->bFrameNum = 0;
attrib->refNum = 1;
attach:
if (ret = v1_venc.fnDestroyGroup(_v1_venc_grp))
return ret;
if (ret = v1_venc.fnCreateGroup(_v1_venc_grp))
return ret;

Expand Down Expand Up @@ -558,7 +555,7 @@ int v1_video_destroy(char index)
v1_sys_bind source = { .module = V1_SYS_MOD_VPSS,
.device = _v1_vpss_grp, .channel = index };
v1_sys_bind dest = { .module = V1_SYS_MOD_VENC,
.device = _v1_venc_dev, .channel = index };
.device = _v1_venc_grp, .channel = index };
if (ret = v1_sys.fnUnbind(&source, &dest))
return ret;
}
Expand Down Expand Up @@ -834,7 +831,7 @@ int v1_system_init(char *snrConfig)
v1_config.vichn.capt.height ?
v1_config.vichn.capt.height : v1_config.videv.rect.height,
V1_PIXFMT_YUV420SP, alignWidth);
pool.comm[0].blockCnt = 8;
pool.comm[0].blockCnt = 5;

if (ret = v1_vb.fnConfigPool(&pool))
return ret;
Expand Down

0 comments on commit cdff3e2

Please sign in to comment.