嵌入式开发之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 ...
随机推荐
- SQLSERVER调用DLL程序
在SQL Server中调用dll分为两个步骤 1.创建一个dll文件(dll文件分成3种类型,讲其中一种) 2.把dll文件放进SQL Server的程序集中.然后定义一个Function,就可以通 ...
- Python3环境安装Scrapy爬虫框架过程及常见错误
收录待用,修改转载已取得腾讯云授权 Scrapy安装介绍 Scrapy的安装有多种方式,它支持Python2.7版本及以上或Python3.3版本及以上.下面说明Python3环境下的安装过程. Sc ...
- 为Linux上FireFox安装Flash插件
废话少说,步骤如下: 1.点击网页上插件缺失处,根据提示下载tar.gz版本的插件,我下载的版本是install_flash_player_11_linux.i386.tar.gz,这个文件被下载到了 ...
- ./configure: No such file or directory
原文链接:http://www.cnblogs.com/niocai/archive/2011/07/14/2106088.html 普通情况下,多看看文件夹下的readme和INSTALL文件,里面 ...
- QT调用C#写的Dll
参见: https://blog.csdn.net/weixin_42420155/article/details/81060945 C#写的dll是没有dllMain入口函数的,是一种中间语言,需要 ...
- JDBC数据库常用操作(mysql)
JDBC英文名称:JavaDataBaseConnectivity中文名称:java数据库连接简称:JDBCJDBC是一种用于执行SQL语句的JavaAPI,可以为多种关系数据库提供统一访问,它由一组 ...
- Eclipse3.4以上使用dropins的插件安装方式
Eclipse3.4以上版本支持使用dropins的插件安装方式,使用方便,共有四种使用方法: 1. 最简单的,直接将jar包放到dropins目录下eclipse/ dropins/ 2. 传 ...
- lua类库 middleclass学习笔记
middleclass使在lua中面象对象变的简单 抄了一遍他的示例代码运行着试了试,基本懂了 local class = require 'middleclass' --类的继承 Person = ...
- ConfigurationManager.AppSettings 属性 appSettings
https://msdn.microsoft.com/zh-cn/library/system.configuration.configurationmanager.appsettings(v=vs. ...
- nginx 404重定向到自定义页面
在访问时遇到上面这样的404错误页面,我想99%(未经调查,估计数据)的用户会把页面关掉,用户就这样悄悄的流失了.如果此时能有一个漂亮的页面能够引导用户去他想去的地方必然可以留住用户.因此,每一个网站 ...