嵌入式开发之davinci--- 8148/8168/8127 中swms、Mosaic’s、display 显示pal 模式
(1)
(2)
(3)
(4)
-------------------------author:pkf
------------------------------time:2-3
-----------------------------------------------qq:1327706646
()
Void VdecVdis_start()
{
VSYS_PARAMS_S vsysParams;
VDEC_PARAMS_S vdecParams;
VDIS_PARAMS_S vdisParams;
VDIS_MOSAIC_S sVdMosaicParam;
UInt32 i,status;
Bool forceLowCostScale = FALSE;
UInt32 startChID;
UInt64 wallTimeBase;
VdecVdis_bitsRdInit();
#ifdef VDEC_VDIS_ENABLE_IPCFRAMESOUT
VdecVdis_ipcFramesCreate();
#endif
/*
gDemo_info.maxVcapChannels = 0;
gDemo_info.maxVdisChannels = gVdecVdis_config.fileNum;
gDemo_info.maxVencChannels = 0;
gDemo_info.maxVdecChannels = gVdecVdis_config.fileNum;
*/
UInt32 type_process = DEMO_TYPE_PROGRESSIVE;
vdecParams.numChn = gVdecVdis_config.fileNum;
vdisParams.numChannels = gVdecVdis_config.fileNum;
Vsys_params_init(&vsysParams);
vsysParams.systemUseCase = VSYS_USECASE_MULTICHN_VDEC_VDIS;
vsysParams.enableCapture = FALSE;
vsysParams.enableNsf = FALSE;
vsysParams.enableEncode = FALSE;
vsysParams.enableDecode = TRUE;
vsysParams.enableNullSrc = FALSE;
vsysParams.enableAVsync = FALSE;//TRUE;
vsysParams.numDeis = 2;//0
vsysParams.enableSecondaryOut = FALSE;//
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
vsysParams.numSwMs = 2;
vsysParams.numDisplays = 2;
#else
vsysParams.numSwMs = 2;
vsysParams.numDisplays = 2;
#endif
printf ("--------------- CHANNEL DETAILS-------------\n");
printf ("Dec Channels => %d\n", vdecParams.numChn);
printf ("Disp Channels => %d\n", vdisParams.numChannels);
printf ("-------------------------------------------\n");
/* Override the context here as needed */
Vsys_init(&vsysParams);
Vdec_params_init(&vdecParams);
/* Override the context here as needed */
vdecParams.numChn = gVdecVdis_config.fileNum;
vdecParams.forceUseDecChannelParams = TRUE;
OSA_assert( vdecParams.numChn <= VDEC_CHN_MAX );
for (i=0; i < vdecParams.numChn; i++) {
vdecParams.decChannelParams[i].dynamicParam.frameRate = 60; // NOT USED
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000; // NOT USED
if (gVdecVdis_config.fileInfo[i].width != 0 && gVdecVdis_config.fileInfo[i].height != 0)
{
vdecParams.decChannelParams[i].maxVideoWidth = gVdecVdis_config.fileInfo[i].width;
vdecParams.decChannelParams[i].maxVideoHeight = gVdecVdis_config.fileInfo[i].height;
}
else
{
printf(" ERROR: Invalid Decoder width x height !!!\n");
OSA_assert(0);
}
/*If the codec type is missing, by default choose h264*/
if(strlen(gVdecVdis_config.fileInfo[i].codec) == 0)
strcpy(gVdecVdis_config.fileInfo[i].codec,"h264");
if(strcmp(gVdecVdis_config.fileInfo[i].codec,"h264") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_H264;
printf("ch[%d], h264\n",i);
}
else if(strcmp(gVdecVdis_config.fileInfo[i].codec,"mpeg4") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_MPEG4;
vdecParams.decChannelParams[i].dynamicParam.frameRate = 30;
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000;
printf("ch[%d], mpeg4\n",i);
}
else if(strcmp(gVdecVdis_config.fileInfo[i].codec,"mjpeg") == 0)
{
vdecParams.decChannelParams[i].isCodec = VDEC_CHN_MJPEG;
vdecParams.decChannelParams[i].dynamicParam.frameRate = 1;
vdecParams.decChannelParams[i].dynamicParam.targetBitRate = 2 * 1000 * 1000;
printf("ch[%d], jpeg\n",i);
}
vdecParams.decChannelParams[i].displayDelay = gVdecVdis_config.fileInfo[i].displaydelay;
vdecParams.decChannelParams[i].numBufPerCh = gVdecVdis_config.fileInfo[i].numbuf;
}
Vdec_init(&vdecParams);
Vdis_params_init(&vdisParams);
/* Override the context here as needed */
vdisParams.numChannels = gVdecVdis_config.fileNum;
vdisParams.deviceParams[VDIS_DEV_HDMI].resolution = VSYS_STD_1080P_60;
/* Since HDCOMP and DVO2 are tied together they must have same resolution */
vdisParams.deviceParams[VDIS_DEV_HDCOMP].resolution = VSYS_STD_1080P_60;
vdisParams.deviceParams[VDIS_DEV_DVO2].resolution =
vdisParams.deviceParams[VDIS_DEV_HDMI].resolution;
vdisParams.deviceParams[VDIS_DEV_SD].resolution = VSYS_STD_PAL;//VSYS_STD_NTSC;
#if defined(TI_814X_BUILD) || defined(TI_8107_BUILD)
/* set for 2 displays */
i = 0;
Demo_swMsGenerateLayout(VDIS_DEV_HDMI, 0, vdecParams.numChn,
DEMO_LAYOUT_MODE_4CH,
&vdisParams.mosaicParams[i], forceLowCostScale, type_process,
vdisParams.deviceParams[VDIS_DEV_HDMI].resolution);
vdisParams.mosaicParams[i].userSetDefaultSWMLayout = TRUE;
VdecVdis_setDefaultSwMs(VDIS_DEV_HDMI, &vdisParams);
if(vdecParams.numChn < 16)
startChID = 0;
else
startChID = 16;
i = 1;
printf("mut_flag =%d \n",decoder_param.p_rtspaddr.mult_flag);
if(decoder_param.p_rtspaddr.mult_flag==1)
{
Demo_swMsGenerateLayout(VDIS_DEV_SD, startChID, vdecParams.numChn,
DEMO_LAYOUT_MODE_1CH/*DEMO_LAYOUT_MODE_1CH*/,
&vdisParams.mosaicParams[i], forceLowCostScale, type_process,
vdisParams.deviceParams[VDIS_DEV_SD].resolution);
}
else
{
Demo_swMsGenerateLayout(VDIS_DEV_SD, startChID, vdecParams.numChn,
DEMO_LAYOUT_MODE_4CH/*DEMO_LAYOUT_MODE_1CH*/,
&vdisParams.mosaicParams[i], forceLowCostScale, type_process,
vdisParams.deviceParams[VDIS_DEV_SD].resolution);
}
vdisParams.mosaicParams[i].userSetDefaultSWMLayout = TRUE;
VdecVdis_setDefaultSwMs(VDIS_DEV_SD, &vdisParams);
#else
/* set for 3 displays */
i = 0;
Demo_swMsGenerateLayout(VDIS_DEV_HDMI, 0, vdecParams.numChn,
DEMO_LAYOUT_MODE_4CH_4CH,
&vdisParams.mosaicParams[i], forceLowCostScale,
type_process,
vdisParams.deviceParams[VDIS_DEV_HDMI].resolution);
vdisParams.mosaicParams[i].userSetDefaultSWMLayout = TRUE;
if(vdecParams.numChn < 16)
startChID = 0;
else
startChID = 16;
i = 1;
Demo_swMsGenerateLayout(VDIS_DEV_HDCOMP, startChID, vdecParams.numChn,
DEMO_LAYOUT_MODE_4CH_4CH,
&vdisParams.mosaicParams[i], forceLowCostScale,
type_process,
vdisParams.deviceParams[VDIS_DEV_HDCOMP].resolution);
vdisParams.mosaicParams[i].userSetDefaultSWMLayout = TRUE;
#endif
Vdis_init(&vdisParams);
wallTimeBase = get_current_time_to_msec();
wallTimeBase = 0;
Vdis_setWallTimeBase(wallTimeBase);
/* Configure display */
Vsys_configureDisplay();
#if USE_FBDEV
grpx_init(GRPX_FORMAT_RGB565);
#endif
/* Create Link instances and connects compoent blocks */
Vsys_create();
/* This is done to re-map ch to window mappping when no. of chan are <16 */
if(vdecParams.numChn < 16)
{
status = Vdis_getMosaicParams(1,&sVdMosaicParam);
status = Vdis_setMosaicParams(1, &sVdMosaicParam);
//status = Vdis_getMosaicParams(VDIS_DEV_SD,&sVdMosaicParam);//1
}
/* Start components in reverse order */
Vdis_start();
Vdec_start();
#ifdef VDEC_VDIS_ENABLE_IPCFRAMESOUT
VdecVdis_ipcFramesStart();
#endif
VdecVdis_bitsRdStart();
}
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/345538
http://bbs.csdn.net/topics/390591462?page=1
http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/t/9577.aspx
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/290242
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/259891
http://www.deyisupport.com/question_answer/dsp_arm/davinci_digital_media_processors/f/39/p/47289/104280.aspx
http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/310208
嵌入式开发之davinci--- 8148/8168/8127 中swms、Mosaic’s、display 显示pal 模式的更多相关文章
- 嵌入式开发之davinci---IPIPE、IPIPEIF and ISIF这三者有什么区别
(1)缩写概念 (2)各自区别 (3)不同sensor 采集接口 (4)采集后的数据链路link (5)8127 中的iss和ipipe的区别 (1)缩写概念 http://www.ti.com.cn ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的High-DefinitionVideo Processing Subsystem (HDVPSS)
High-DefinitionVideo Processing Subsystem (HDVPSS) 这一章介绍了高清视频处理子系统(HDVPSS). 2.1导论 2.1.1 简介 HDVPSS 使用 ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的大屏分布式拼接显示系统
其实在接触从12年接触8127系列ipnc 时看到200w和500w的高清像素,我就萌生了视频拼接的兴趣,没想到今年的安博会就有公司推出产品了,它就是上海的环视科技,从他的主页可以看到,明显的有个只能 ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的xdc 简介
XDC是TI公司为嵌入式实时系统可重用软件组件(在XDC里被成为packages,以下成为包)制定的一套标准.它包括一些有用的工具,标准的API函数,静态配置文件和打包(packaging)操作.XD ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的图像处理vpss link dei、sclr、swms、Mosaic’s
vpss 中的link (1)dei dei 主要做数据交错处理,带缩放 dei control data flow: (2)sclr 8168中支持缩放按比例的分子和分母,只支持缩小,貌似不支持放大 ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的图像处理算法优化库vlib
The Texas Instruments VLIB is an optimizedImage/Video Processing Functions Library for C programmers ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的图像采集格式Sensor信号输出YUV、RGB、RAW DATA、JPEG 4种方式区别
简单来说,YUV: luma (Y) + chroma (UV) 格式, 一般情况下sensor支持YUV422格式,即数据格式是按Y-U-Y-V次序输出的RGB: 传统的红绿蓝格式,比如RGB565 ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的音频alsa 采集
1.snd_pcm_open,打开句柄. 2.配置参数,可能用到的接口:snd_pcm_hw_params_alloca.snd_pcm_hw_params_any.snd_pcm_hw_params ...
- 嵌入式开发之davinci--- 8148/8168/8127 中的添加算饭scd 场景检测 代码实现
http://blog.csdn.net/mianhuantang848989/article/details/38035731 http://www.61ic.com/Article/DaVinci ...
随机推荐
- CMD_命令行
一.bat执行一闪而过 最后一个end下一行,加PAUSE 二.cmd命令:不是内部或外部命令,也不是可运行的程序或批处理文件 解决: 需将路径先切换到system32下 cd c:\WINDO ...
- iOS -- 解决iOS11中navigationBar上使用initWithCustomView按钮图片错位 frame无效
在iOS11上当使用如下代码设置时 UIButton *shareButton = [UIButton buttonWithType:(UIButtonTypeCustom)]; shareButto ...
- [转载]DIY树莓派之随身工具箱
摆弄树莓派有一年多了,在这里把经验分享给大家,少走弯路. 先放图两张. 搭建目的: wifi信号中转站\网站服务器\IC卡渗透测试\中间人\otr… 基于树莓派3 系统为Kali Linux 2017 ...
- 防止木马利用iframe框架来调用外域JS代码
<!--防止木马利用iframe框架来调用外域JS代码,不过滤自己网站的域名的框架网页开始--><SCRIPT LANGUAGE="JavaScript"> ...
- Linux C 面试题总结
1.进程和线程的区别,及优劣性比较 进程和线程的主要差别在于它们是不同的操作系统资源管理方式.进程有独立的地址空间,一个进程崩溃后,在保护模式下不会对其它进程产生影响,而线程只是一个进程中的不同执行路 ...
- Druid和Spark对比
Druid和Spark对比 不是Spark专家, 如果描绘有错误, 请通过邮件列表或者其他方式告知我们 Spark实现弹性的分布式数据集概念的计算集群系统, 可以看做商业分析平台. RDDs能复用持久 ...
- non-compatible bean definition of same name and class
在整合struts2.1.6+spring2.5.6开发中,使用了注解和struts-convention来实现零配置管理.spring也使用注解annotation方式.现在的问题是:我在连个个不同 ...
- Linux学习笔记 (五)关机和重启命令
一.关机命令 1.shutdown命令: shutdown [选项] [时间] 选项: -c:取消前一个关机命令 -h:关机 -r:重启 例:shutdown -r 05:30 & //表 ...
- iOS 带IAP提交注意事项及无法submit for review的解决方案
原地址:http://blog.sina.com.cn/s/blog_71ce775e0101dl4a.html 最近项目接触到了苹果的程序内购(IAP),碰到不少问题,参考了很多帖子才得以解决.在此 ...
- Visual studio C++ MFC之列表控件CListCtrl Control
背景 本篇旨在MSDN帮助文档下总结列表控件CListCtrl Control的使用,并列出碰到的具体问题. 正文 列表型控件List Control的类是ClistCtrl,具体成员对象详见链接,以 ...