嵌入式开发之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 ...
随机推荐
- 昨晚京东校招笔试,没考一道.net,全考java了
我在大四之前我都觉得跟着微软走是正确的,这条大腿很粗!但是现在我也开始不那么认为了,现在每天在网上找招聘信息,稍微大点的公司都是招java的,很少招.net的!别说什么你学的好不怕没人招之类的话,大公 ...
- ylbtech-LanguageSamples-Events(事件)
ylbtech-Microsoft-CSharpSamples:ylbtech-LanguageSamples-Events(事件) 1.A,示例(Sample) 返回顶部 “事件”示例 本示例演示如 ...
- Solr6 Suggest(智能提示)
1.介绍 Solr从1.4开始便提供了检查建议,检索建议目前是各大搜索的标配应用,主要作用是避免用户输入错误的搜索词,同时将用户引导到相应的关键词搜索上.通常,我们将其称为搜索联想. 其效果如图所示. ...
- WebForms UnobtrusiveValidationMode 须要“jquery”ScriptResourceMapping
问题具体描写叙述信息: 异常具体信息:System.InvalidOperationException: WebForms Unobtrus ...
- NYOJ 1058 部分和问题 【DFS】
部分和问题 时间限制:1000 ms | 内存限制:65535 KB 难度:2 描写叙述 给定整数a1.a2........an,推断能否够从中选出若干数.使它们的和恰好为K. 输入 首先,n和k ...
- Python 自用代码(拆分txt文件)
现有一个28G的txt文件,里面每一行是一个分词过的专利全文文档,一共370多万行.我需要把它按每五万行为单位做成一个json文件,格式大致如下: [{"id":"100 ...
- objc语言的运行时处理
在Objective-C中,消息是通过objc_msgSend()这个runtime方法及相近的方法来实现的.这个方法需要一个target,selector,还有一些参数.理论上来说,编译器只是把消息 ...
- nginx+vue实例纪录
参考:http://www.cnblogs.com/wuac/p/6406843.html 新建工作目录vuepro,命令行之行命令:vue init webpack vue-test (项目默认的名 ...
- jquery 中attr和prop的区别
在jQuery API中也有专门解释: Attributes VS. Properties 在一些特殊的情况下,attributes和properties的区别非常大.在jQuery1.6之前,.at ...
- 输入N,打印如图所看到的的三角形(例:N=3,N=4,N=5)1<=N<=26
package demo; public class PrintDemo { public static void main(String[] args) { print(26); } private ...