
uclinux_2016


0 访问量
0 原创专栏
1 资料
0 粉丝
个性签名:此E友还没有留下个性签名哦~
加入易百纳时间:2016-06-05
-
Sil9022和9024源代码,请参考.2017-12-178 0 3027
-
本帖最后由 uclinux_2016 于 2017-8-13 20:36 编辑 错误信息: /opt/hisi-linux/x86-arm/arm-hisiv400-linux/bin/../lib/gcc/arm-hisiv400-linux-gnueabi/4.8.3/../../../../arm-hisiv400-linux-gnueabi/bin/ld: cannot find -lGL 已解决2017-07-301 0 2956
-
本帖最后由 uclinux_2016 于 2017-7-30 16:35 编辑 有没有人用过3536的外部音频codec,修改编译选项后发现MCLK时钟频率不正确,看海思的手册说要设置I2S_CRG_CFG0_08 、I2S_CRG_CFG1_08 等一系列寄存器,但也没找到对应的API。 请高手指导一下,多谢了!2017-07-164 0 3461
-
Hi3536的解码显示是4分屏的,项目需求在解码输出的窗口上显示一个OSD菜单, 有没有什么办法能够将OSD菜单以整个画面为基准进行显示,而不是显示在4个屏中的一个? 不知道到底将ragion绑定到VDEC上/VPSS上/还是VO上才能实现这一功能。 请高手不吝赐教,多谢了!2017-05-214 0 3933
-
编译3536的文件系统时,不知道demo下的rootfs_hi3536_2k_4bit_sample.yaffs2是怎么生成的。 哪位兄弟做过啊?能否能指导一下? 多谢啦。2017-03-265 0 2672
-
不知道大家有没有在3531上支持过2G内存,在项目调试时发现demo板上的1G内存在应用中内存不够运行不起来,想升级到2G内存,需要修改哪些地方呢?请高手指导下,多谢了。2017-02-250 0 2182
-
本帖最后由 uclinux_2016 于 2017-7-30 16:36 编辑 3531能实现4路编码其中有些路是1080P有些是720P的么?看代码例程似乎不行啊。 有实现的兄弟帮忙指导下呗,多谢啦!2017-01-014 0 2787
-
本帖最后由 uclinux_2016 于 2016-9-11 16:10 编辑 U-Boot 2010.06 (Mar 23 2015 - 18:05:17) NAND: Check nand flash controller v610. found Special NAND id table Version 1.36 Nand ID: 0x2C 0xDA 0x90 0x95 0x06 0x00 0x00 0x00 Block:128KB Page:2KB Chip:256MB*1 OOB:64B ECC:4bit/512 256 MiB Check spi flash controller v350... Found Spi(cs1) ID: 0xC2 0x20 0x19 0xC2 0x20 0x19 Spi(cs1): Block:64KB Chip:32MB Name:"MX25L 256/257 35 E/F" MMC: EMMC/MMC/SD controller initialization. No EMMC/MMC/SD device found ! *** Warning - bad CRC or NAND, using default environment In: serial Out: serial Err: serial Hit any key to stop autoboot: 0 ## Booting kernel from Legacy Image at 41000000 ... Image Name: Linux-3.10.0_hi3536 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3873880 Bytes = 3.7 MiB Load Address: 40008000 Entry Point: 40008000 Wrong Ramdisk Image Format Ramdisk image is corrupt or invalid hisilicon #2016-09-043 1 4974
-
本帖最后由 uclinux_2016 于 2016-9-11 16:10 编辑 OSD实现时调用HI_MPI_RGN_AttachToChn返回失败,失败返回值是0xa01d8008 (HI_ERR_IVE_NOT_SUPPORT, 不支持的参数或者功能),哪位能指导下,多谢! 下面是实现代码: #define SAMPLE_VENC_OSD_DEV_MAX 4 #define SAMPLE_VENC_OSD_DEV_NAME_MAXLEN 64 typedef struct sample_osd_ctlcb_s { HI_U32 s32DevId; HI_U32 s32ChnId; HI_BOOL bOsdEnable; TTF_Font *pstTtfFont; VIDEO_NORM_E enNorm; PIC_SIZE_E enPicSize; HI_BOOL bUpdateDevName; HI_CHAR aDevName[SAMPLE_VENC_OSD_DEV_NAME_MAXLEN]; }SAMPLE_OSD_CTLCB_S; SAMPLE_OSD_CTLCB_S g_astOsdVencCtl[SAMPLE_VENC_OSD_DEV_MAX]; HI_S32 SAMPLE_OSD_VENC_Init(VOID) { SAMPLE_OSD_CTLCB_S *pstOsdVencCtl; HI_U32 uiDev; if ( TTF_Init() < 0 ) { fprintf(stderr, "Couldn't initialize TTF: %s\n", SDL_GetError()); SDL_Quit(); return HI_FAILURE; } for (uiDev = 0; uiDev < SAMPLE_VENC_OSD_DEV_MAX; uiDev++) { pstOsdVencCtl = &g_astOsdVencCtl[uiDev]; memset(pstOsdVencCtl, sizeof(SAMPLE_OSD_CTLCB_S), 0); snprintf(pstOsdVencCtl->aDevName, SAMPLE_VENC_OSD_DEV_NAME_MAXLEN, "Device%02d", uiDev); } return HI_SUCCESS; } static HI_S32 SAMPLE_RGN_CreateOverlayForVenc(SAMPLE_OSD_CTLCB_S *pstOsdVencCtl) { HI_S32 i; HI_S32 s32Ret; RGN_ATTR_S stRgnAttr; RGN_CHN_ATTR_S stChnAttr; RGN_HANDLE Handle; MPP_CHN_S stChn; HI_S32 w, h; SIZE_S picSize ; s32Ret = SAMPLE_COMM_SYS_GetPicSize(pstOsdVencCtl->enNorm, pstOsdVencCtl->enPicSize, &picSize); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("get picture size failed!\ninit osd mudule failed\n"); return s32Ret; } /* Add cover to vpss group */ stChn.enModId = HI_ID_VENC; stChn.s32DevId = pstOsdVencCtl->s32DevId; stChn.s32ChnId = pstOsdVencCtl->s32ChnId; for (i = 0; i < 2; i++) { Handle = pstOsdVencCtl->s32DevId * 4 + pstOsdVencCtl->s32ChnId * 2+ i; TTF_SizeUTF8(pstOsdVencCtl->pstTtfFont, pstOsdVencCtl->aDevName, &w, &h); stRgnAttr.enType = OVERLAY_RGN; stRgnAttr.unAttr.stOverlay.enPixelFmt = PIXEL_FORMAT_RGB_1555; stRgnAttr.unAttr.stOverlay.stSize.u32Width = w + w%2 + 16; stRgnAttr.unAttr.stOverlay.stSize.u32Height = h + h%2; stRgnAttr.unAttr.stOverlay.u32BgColor = 0x00000000; if (1 == i % 2) { TTF_SizeUTF8(pstOsdVencCtl->pstTtfFont, "2016-07-09 17:23:08", &w, &h); stRgnAttr.unAttr.stOverlay.stSize.u32Width = w + w%2 + 16; stRgnAttr.unAttr.stOverlay.stSize.u32Height = h + h%2; stRgnAttr.unAttr.stOverlay.u32BgColor = 0x00000000; } s32Ret = HI_MPI_RGN_Create(Handle, &stRgnAttr); if (s32Ret != HI_SUCCESS) { SAMPLE_PRT("HI_MPI_RGN_Create failed! s32Ret: 0x%x.\n", s32Ret); return s32Ret; } stChnAttr.bShow = HI_TRUE; stChnAttr.enType = OVERLAY_RGN; stChnAttr.unChnAttr.stOverlayChn.stPoint.s32X = 8; stChnAttr.unChnAttr.stOverlayChn.stPoint.s32Y = 18; stChnAttr.unChnAttr.stOverlayChn.u32BgAlpha = 0;//region bg alpha stChnAttr.unChnAttr.stOverlayChn.u32FgAlpha = 128;//text bg alpha stChnAttr.unChnAttr.stOverlayChn.u32Layer = i; stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bAbsQp = HI_FALSE; stChnAttr.unChnAttr.stOverlayChn.stQpInfo.s32Qp = 0; stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Height = 16; stChnAttr.unChnAttr.stOverlayChn.stInvertColor.stInvColArea.u32Width = 16; stChnAttr.unChnAttr.stOverlayChn.stInvertColor.u32LumThresh = 128; stChnAttr.unChnAttr.stOverlayChn.stInvertColor.enChgMod = LESSTHAN_LUM_THRESH; stChnAttr.unChnAttr.stOverlayChn.stInvertColor.bInvColEn = HI_FALSE; if (1 == i % 2) { stChnAttr.unChnAttr.stOverlayChn.stPoint.s32X = (picSize.u32Width - (w + w%2 +16)); stChnAttr.unChnAttr.stOverlayChn.stPoint.s32Y = 18; stChnAttr.unChnAttr.stOverlayChn.u32BgAlpha = 0;//region bg alpha stChnAttr.unChnAttr.stOverlayChn.u32FgAlpha = 128;//text bg alpha stChnAttr.unChnAttr.stOverlayChn.u32Layer = i; } s32Ret = HI_MPI_RGN_AttachToChn(Handle, &stChn, &stChnAttr); if (s32Ret != HI_SUCCESS) { SAMPLE_PRT("rgn attach err\n"); } } return HI_SUCCESS; } HI_S32 SAMPLE_OSD_VENC_ChanInit(HI_U32 s32DevId, HI_U32 s32ChnId, VIDEO_NORM_E enNorm, PIC_SIZE_E enPicSize) { SAMPLE_OSD_CTLCB_S *pstOsdVencCtl = NULL; HI_S32 s32Ret = HI_SUCCESS; HI_S32 wordSize; HI_BOOL isOSDFlg = HI_TRUE; if (SAMPLE_VENC_OSD_DEV_MAX <= s32DevId) { SAMPLE_PRT("invalid dev ID %d\n", s32DevId); return HI_FAILURE; } pstOsdVencCtl = &g_astOsdVencCtl[s32DevId]; pstOsdVencCtl->s32DevId = s32DevId; pstOsdVencCtl->s32ChnId = s32ChnId; pstOsdVencCtl->enNorm = enNorm; pstOsdVencCtl->enPicSize = enPicSize; pstOsdVencCtl->bOsdEnable = HI_TRUE; pstOsdVencCtl->bUpdateDevName = HI_TRUE; switch(enPicSize) { case PIC_QVGA: wordSize = 12; break; case PIC_D1: case PIC_VGA: wordSize = 16; break; case PIC_XGA: wordSize = 24; break; case PIC_HD720: wordSize = 32; break; case PIC_HD1080: wordSize = 48; break; default: SAMPLE_PRT("video size err,not support osd time\n"); break; } pstOsdVencCtl->pstTtfFont = TTF_OpenFont("word.ttf", wordSize); if (pstOsdVencCtl->pstTtfFont == NULL ) { SAMPLE_PRT("ttf open err\n"); return HI_FAILURE; } s32Ret = SAMPLE_RGN_CreateOverlayForVenc(pstOsdVencCtl); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("SAMPLE_RGN_CreateOverlayForVenc failed! s32Ret: 0x%x.\n", s32Ret); return s32Ret; } return HI_SUCCESS; } /****************************************************************************** * function : 4HD H264 encode ******************************************************************************/ HI_S32 SAMPLE_VENC_4HD_H264(HI_VOID) { SAMPLE_VI_MODE_E enViMode = SAMPLE_VI_MODE_4_1080P; HI_U32 u32ViChnCnt = 4; HI_S32 s32VpssGrpCnt = 4; PAYLOAD_TYPE_E enPayLoad[2]= {PT_H264, PT_H264}; PIC_SIZE_E enSize[2] = {PIC_HD1080, PIC_D1}; VB_CONF_S stVbConf; VPSS_GRP VpssGrp; VPSS_CHN VpssChn; VPSS_GRP_ATTR_S stGrpAttr; VENC_GRP VencGrp; VENC_CHN VencChn; SAMPLE_RC_E enRcMode; HI_S32 i; HI_S32 s32Ret = HI_SUCCESS; HI_U32 u32BlkSize; HI_CHAR ch; SIZE_S stSize; /****************************************** step 1: init variable ******************************************/ memset(&stVbConf,0,sizeof(VB_CONF_S)); u32BlkSize = SAMPLE_COMM_SYS_CalcPicVbBlkSize(gs_enNorm,\ PIC_HD1080, SAMPLE_PIXEL_FORMAT, SAMPLE_SYS_ALIGN_WIDTH); stVbConf.u32MaxPoolCnt = 128; /*ddr0 video buffer*/ stVbConf.astCommPool[0].u32BlkSize = u32BlkSize; stVbConf.astCommPool[0].u32BlkCnt = u32ViChnCnt * 16; memset(stVbConf.astCommPool[0].acMmzName,0, sizeof(stVbConf.astCommPool[0].acMmzName)); /*ddr0 hist buf*/ stVbConf.astCommPool[1].u32BlkSize = (196*4); stVbConf.astCommPool[1].u32BlkCnt = u32ViChnCnt * 16; memset(stVbConf.astCommPool[1].acMmzName,0, sizeof(stVbConf.astCommPool[1].acMmzName)); /*ddr1 video buffer*/ stVbConf.astCommPool[2].u32BlkSize = u32BlkSize; stVbConf.astCommPool[2].u32BlkCnt = u32ViChnCnt * 16; strcpy(stVbConf.astCommPool[2].acMmzName,"ddr1"); /*ddr1 hist buf*/ stVbConf.astCommPool[3].u32BlkSize = (196*4); stVbConf.astCommPool[3].u32BlkCnt = u32ViChnCnt * 16; strcpy(stVbConf.astCommPool[3].acMmzName,"ddr1"); /****************************************** step 2: mpp system init. ******************************************/ s32Ret = SAMPLE_COMM_SYS_Init(&stVbConf); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("system init failed with %d!\n", s32Ret); goto END_VENC_4HD_0; } s32Ret = SAMPLE_COMM_VI_MemConfig(enViMode); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("SAMPLE_COMM_VI_MemConfig failed with %d!\n", s32Ret); goto END_VENC_4HD_0; } s32Ret = SAMPLE_COMM_VPSS_MemConfig(); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("SAMPLE_COMM_VPSS_MemConfig failed with %d!\n", s32Ret); goto END_VENC_4HD_0; } s32Ret = SAMPLE_COMM_VENC_MemConfig(); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("SAMPLE_COMM_VPSS_MemConfig failed with %d!\n", s32Ret); goto END_VENC_4HD_0; } /****************************************** step 3: start vi dev & chn to capture ******************************************/ s32Ret = SAMPLE_COMM_VI_Start(enViMode, gs_enNorm); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("start vi failed!\n"); goto END_VENC_4HD_0; } /****************************************** step 4: start vpss and vi bind vpss ******************************************/ s32Ret = SAMPLE_COMM_SYS_GetPicSize(gs_enNorm, PIC_HD1080, &stSize); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("SAMPLE_COMM_SYS_GetPicSize failed!\n"); goto END_VENC_4HD_0; } stGrpAttr.u32MaxW = stSize.u32Width; stGrpAttr.u32MaxH = stSize.u32Height; stGrpAttr.bDrEn = HI_FALSE; stGrpAttr.bDbEn = HI_FALSE; stGrpAttr.bIeEn = HI_TRUE; stGrpAttr.bNrEn = HI_TRUE; stGrpAttr.bHistEn = HI_TRUE; stGrpAttr.enDieMode = VPSS_DIE_MODE_AUTO; stGrpAttr.enPixFmt = SAMPLE_PIXEL_FORMAT; s32Ret = SAMPLE_COMM_VPSS_Start(s32VpssGrpCnt, &stSize, VPSS_MAX_CHN_NUM,NULL); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Vpss failed!\n"); goto END_VENC_4HD_1; } s32Ret = SAMPLE_COMM_VI_BindVpss(enViMode); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Vi bind Vpss failed!\n"); goto END_VENC_4HD_2; } s32Ret = SAMPLE_OSD_VENC_Init(); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Initialize OSD VENC failed!\n"); goto END_VENC_4HD_2; } /****************************************** step 5: select rc mode ******************************************/ while(1) { printf("please choose rc mode:\n"); printf("\t0) CBR\n"); printf("\t1) VBR\n"); printf("\t2) FIXQP\n"); ch = getchar(); getchar(); if ('0' == ch) { enRcMode = SAMPLE_RC_CBR; break; } else if ('1' == ch) { enRcMode = SAMPLE_RC_VBR; break; } else if ('2' == ch) { enRcMode = SAMPLE_RC_FIXQP; break; } else { printf("rc mode invaild! please try again.\n"); continue; } } /****************************************** step 6: start stream venc (big + little) ******************************************/ for (i=0; i { /*** main frame **/ VencGrp = i*2; VencChn = i*2; VpssGrp = i; s32Ret = SAMPLE_COMM_VENC_Start(VencGrp, VencChn, enPayLoad[0],\ gs_enNorm, enSize[0], enRcMode); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Venc failed!\n"); goto END_VENC_4HD_3; } s32Ret = SAMPLE_COMM_VENC_BindVpss(VencGrp, VpssGrp, VPSS_BSTR_CHN); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Venc failed!\n"); goto END_VENC_4HD_3; } s32Ret = SAMPLE_OSD_VENC_ChanInit(VencGrp, VpssGrp, gs_enNorm, enSize[0]); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Initialize OSD VENC channel failed 0 !\n"); goto END_VENC_4HD_3; } /*** Sub frame **/ VencGrp ++; VencChn ++; s32Ret = SAMPLE_COMM_VENC_Start(VencGrp, VencChn, enPayLoad[1], \ gs_enNorm, enSize[1], enRcMode); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Venc failed!\n"); goto END_VENC_4HD_3; } s32Ret = SAMPLE_COMM_VENC_BindVpss(VencChn, VpssGrp, VPSS_LSTR_CHN); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Venc failed!\n"); goto END_VENC_4HD_3; } s32Ret = SAMPLE_OSD_VENC_ChanInit(VencGrp, VpssGrp, gs_enNorm, enSize[1]); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Initialize OSD VENC channel failed 0 !\n"); goto END_VENC_4HD_3; } } /****************************************** step 7: stream venc process -- get stream, then save it to file. ******************************************/ s32Ret = SAMPLE_COMM_VENC_StartGetStream(u32ViChnCnt*2); if (HI_SUCCESS != s32Ret) { SAMPLE_PRT("Start Venc failed!\n"); goto END_VENC_4HD_3; } printf("please press twice ENTER to exit this sample\n"); getchar(); getchar(); /****************************************** step 8: exit process ******************************************/ SAMPLE_COMM_VENC_StopGetStream(); END_VENC_4HD_3: for (i=0; i { VencGrp = i; VencChn = i; VpssGrp = i/2; VpssChn = (VpssGrp%2)?VPSS_PRE0_CHN:VPSS_BSTR_CHN; SAMPLE_COMM_VENC_UnBindVpss(VencGrp, VpssGrp, VpssChn); SAMPLE_COMM_VENC_Stop(VencGrp,VencChn); } SAMPLE_COMM_VI_UnBindVpss(enViMode); END_VENC_4HD_2: //vpss stop SAMPLE_COMM_VPSS_Stop(s32VpssGrpCnt, VPSS_MAX_CHN_NUM); END_VENC_4HD_1: //vi stop SAMPLE_COMM_VI_Stop(enViMode); END_VENC_4HD_0: //system exit SAMPLE_COMM_SYS_Exit(); return s32Ret; }2016-07-1016 1 8230
-
本帖最后由 uclinux_2016 于 2016-9-11 16:11 编辑 说是找不到lGL,有朋友遇到过么? glfont glfont.o -Wl,-rpath -Wl,/home/user/Workspace/binb ./.libsbSDL2_ttf.so -L/home/user/Workspace/binb -lGL /home/user/Workspace/binbbfreetype.so /home/user/Workspace/binbbSDL2.so -lm -ldl -lpthread -lrt -Wl,-rpath -Wl,/usr/localb -Wl,-rpath -Wl,/home/user/Workspace/binb /opt/hisi-linux/x86-arm/arm-hisiv200-linux/bin/..b/gcc/arm-hisiv200-linux-gnueabi/4.4.1/../../../../arm-hisiv200-linux-gnueabi/bin/ld: cannot find -lGL glfont glfont.o -Wl,-rpath -Wl,/home/user/Workspace/binb ./.libsbSDL2_ttf.so -L/home/user/Workspace/binb -lGL /home/user/Workspace/binbbfreetype.so /home/user/Workspace/binbbSDL2.so -lm -ldl -lpthread -lrt -Wl,-rpath -Wl,/usr/localb -Wl,-rpath -Wl,/home/user/Workspace/binb /opt/hisi-linux/x86-arm/arm-hisiv200-linux/bin/..b/gcc/arm-hisiv200-linux-gnueabi/4.4.1/../../../../arm-hisiv200-linux-gnueabi/bin/ld: cannot find -lGL2016-06-191 0 3074

共10条