(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 模式的更多相关文章

  1. 嵌入式开发之davinci---IPIPE、IPIPEIF and ISIF这三者有什么区别

    (1)缩写概念 (2)各自区别 (3)不同sensor 采集接口 (4)采集后的数据链路link (5)8127 中的iss和ipipe的区别 (1)缩写概念 http://www.ti.com.cn ...

  2. 嵌入式开发之davinci--- 8148/8168/8127 中的High-DefinitionVideo Processing Subsystem (HDVPSS)

    High-DefinitionVideo Processing Subsystem (HDVPSS) 这一章介绍了高清视频处理子系统(HDVPSS). 2.1导论 2.1.1 简介 HDVPSS 使用 ...

  3. 嵌入式开发之davinci--- 8148/8168/8127 中的大屏分布式拼接显示系统

    其实在接触从12年接触8127系列ipnc 时看到200w和500w的高清像素,我就萌生了视频拼接的兴趣,没想到今年的安博会就有公司推出产品了,它就是上海的环视科技,从他的主页可以看到,明显的有个只能 ...

  4. 嵌入式开发之davinci--- 8148/8168/8127 中的xdc 简介

    XDC是TI公司为嵌入式实时系统可重用软件组件(在XDC里被成为packages,以下成为包)制定的一套标准.它包括一些有用的工具,标准的API函数,静态配置文件和打包(packaging)操作.XD ...

  5. 嵌入式开发之davinci--- 8148/8168/8127 中的图像处理vpss link dei、sclr、swms、Mosaic’s

    vpss 中的link (1)dei dei 主要做数据交错处理,带缩放 dei control data flow: (2)sclr 8168中支持缩放按比例的分子和分母,只支持缩小,貌似不支持放大 ...

  6. 嵌入式开发之davinci--- 8148/8168/8127 中的图像处理算法优化库vlib

    The Texas Instruments VLIB is an optimizedImage/Video Processing Functions Library for C programmers ...

  7. 嵌入式开发之davinci--- 8148/8168/8127 中的图像采集格式Sensor信号输出YUV、RGB、RAW DATA、JPEG 4种方式区别

    简单来说,YUV: luma (Y) + chroma (UV) 格式, 一般情况下sensor支持YUV422格式,即数据格式是按Y-U-Y-V次序输出的RGB: 传统的红绿蓝格式,比如RGB565 ...

  8. 嵌入式开发之davinci--- 8148/8168/8127 中的音频alsa 采集

    1.snd_pcm_open,打开句柄. 2.配置参数,可能用到的接口:snd_pcm_hw_params_alloca.snd_pcm_hw_params_any.snd_pcm_hw_params ...

  9. 嵌入式开发之davinci--- 8148/8168/8127 中的添加算饭scd 场景检测 代码实现

    http://blog.csdn.net/mianhuantang848989/article/details/38035731 http://www.61ic.com/Article/DaVinci ...

随机推荐

  1. 【spring data jpa】jpa中使用count计数方法

    spring data jpa中使用count计数方法很简单 直接在dao层写方法即可 int countByUidAndTenementId(String parentUid, String ten ...

  2. lsof/fuser卸载挂载文件

    Linux如何卸载挂载文件   在我们进行远程文件操作的时候,我们经常会出现文件服务出现卸载掉哦情况.例如 umount /mnt/net1umount: /mnt/net1: device is b ...

  3. Dell服务器Raid卡电池策略调整

    DELL服务器的Riad卡都有可充电池的特性,这块可充电电池,在不使用时,也会有微弱的放电现象,当它的电量放电到低到一定程度时,Raid卡控制器就会对电池进行一次“放电”,将剩余的电量放掉,然后再进行 ...

  4. linux sudo使用学习记录

    sudo在linux中非常重要,它能够使普通的用户临时拥有root权限.但是如果让用户滥用sudo命令的话可能会造成严重的影响. 例如:修改root的密码,切换到root用户等等. 所以我们虽然需要赋 ...

  5. 认识多渲染目标(Multiple Render Targets)技术 【转】

    认识多渲染目标(Multiple Render Targets)技术 首先,渲染到纹理是D3D中的一项高级技术.一方面,它很简单,另一方面它很强大并能产生很多特殊效果. 比如说发光效果,环境映射,阴影 ...

  6. Hyper-V Tools for win7

    http://download.microsoft.com/download/C/1/C/C1CA233D-CA1A-4C4D-8240-B4AFC0FD3433/Windows6.1-KB95883 ...

  7. 【C/C++学院】0831-类与对象的异常/面试100题1-100

    类与对象的异常 Cpp异常 #include <iostream> #include <string.h> using namespace std; //标识错误的类型 cla ...

  8. vue - 安装脚手架

    最后不得不屈服与虚拟DOM和框架,太方便了... 1.首先安装node:点击进入官网. 2. 安装后检测 3. 安装yarn(至于为嘛,速度呗) yarn官网,npm转yarn. 3.1 window ...

  9. STM32F103RB, KEIL编译出错:cannot open preprocessing output output file &quot;.\神舟i号\main.d&quot; no such file or

    STM32F103RB,   KEIL编译出错:cannot open preprocessing output output file ".\神舟i号\main.d" no su ...

  10. rac_安装软件时报版本号过高问题

    原创作品,出自 "深蓝的blog" 博客.欢迎转载,转载时请务必注明下面出处,否则追究版权法律责任. 深蓝的blog:http://blog.csdn.net/huangyanlo ...