分享

seed_dec6437的例程videoloop遇到的一些问题

 春华_秋实 2012-02-21

查看完整版本: seed_dec6437的例程videoloop遇到的一些问题

pandora000 2009-11-29 20:09

seed_dec6437的例程videoloop遇到的一些问题

各位高手及合众达的工程师们,我有一下几个问题 敬请您的回答
合众达6437的videoloop例程里
void vpfe_init( Uint32 buffer, Uint32 width, Uint32 height )
{
    VPFE_CCDC_SYN_MODE  = 0x00032F84;   // interlaced, with VD pority as negative
    VPFE_CCDC_HD_VD_WID = 0x0;
    VPFE_CCDC_PIX_LINES = 0x02CF0271;
//VPFE_CCDC_PIX_LINES = 0x02cF047f;
    /*
     *  sph = 1, nph = 1440, according to page 32-33 of the CCDC spec
     *  for BT.656 mode, this setting captures only the 720x480 of the
     *  active NTSV video window
     */
    VPFE_CCDC_HORZ_INFO = width << 1;   // Horizontal lines
    VPFE_CCDC_HSIZE_OFF = width << 1;   // Horizontal line offset
    VPFE_CCDC_VERT_START = 0;           // Vertical start line
    VPFE_CCDC_VERT_LINES = height >> 1; // Vertical lines
    VPFE_CCDC_CULLING   = 0xFFFF00FF;   // Disable cullng
    /*
     *  Interleave the two fields
     */
    VPFE_CCDC_SDOFST    = 0x00000249;
    VPFE_CCDC_SDR_ADDR  = buffer;
    VPFE_CCDC_CLAMP     = 0;
    VPFE_CCDC_DCSUB     = 0;
    VPFE_CCDC_COLPTN    = 0xEE44EE44;
    VPFE_CCDC_BLKCMP    = 0;
    VPFE_CCDC_FPC_ADDR  = 0x86800000;
    VPFE_CCDC_FPC       = 0;
    VPFE_CCDC_VDINT     = 0;
    VPFE_CCDC_ALAW      = 0;
    VPFE_CCDC_REC656IF  = 0x00000003;
    /*
     *  Input format is Cb:Y:Cr:Y, w/ Y in odd-pixel position
     */
VPFE_CCDC_CCDCFG    = 0x00000800;
    //VPFE_CCDC_CCDCFG    = 0x00008800;
    VPFE_CCDC_FMTCFG    = 0;
    VPFE_CCDC_FMT_HORZ  = 0x000002D0;
    VPFE_CCDC_FMT_VERT  = 0x00000272;
//VPFE_CCDC_FMT_VERT  = 0x00000240;
    VPFE_CCDC_FMT_ADDR0 = 0;
    VPFE_CCDC_FMT_ADDR1 = 0;
    VPFE_CCDC_FMT_ADDR2 = 0;
    VPFE_CCDC_FMT_ADDR3 = 0;
    VPFE_CCDC_FMT_ADDR4 = 0;
    VPFE_CCDC_FMT_ADDR5 = 0;
    VPFE_CCDC_FMT_ADDR6 = 0;
    VPFE_CCDC_FMT_ADDR7 = 0;
    VPFE_CCDC_PRGEVEN_0 = 0;
    VPFE_CCDC_PRGEVEN_1 = 0;
    VPFE_CCDC_PRGODD_0  = 0;
    VPFE_CCDC_PRGODD_1  = 0;
    VPFE_CCDC_VP_OUT    = 0x04E22D00;
    VPFE_CCDC_PCR       = 0x0000001;   // Enable CCDC
}
[color=red]各个参数的赋值是什么意思?[/color]
vpfe_init( 0x81000000, 720, 576 ); [color=red]在调用后 0x81000000 buffer里 存放的视频数据格式是什么?[/color]
for(i =0; i< 103680; i++)
  {
   temp2[0] = *((Uint32*)0x81000000+i*2)&0xff000000;   
   temp2[1] = (*((Uint32*)0x81000000+i*2)<<8)&0x00ff0000;        
   temp2[2] = (*((Uint32*)0x81000004+i*2)>>16)&0x0000ff00;  
   temp2[3] = (*((Uint32*)0x81000004+i*2)>>8)&0x000000ff;  
   temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
}
//U
for(i =0; i< 51840; i++)
  {
   temp2[0] = (*((Uint32*)0x81000000+i*4)<<24)&0xff000000;  
   temp2[1] = (*((Uint32*)0x81000004+i*4)<<16)&0x00ff0000;
   temp2[2] = (*((Uint32*)0x81000008+i*4)<<8)&0x0000ff00;  
   temp2[3] = (*((Uint32*)0x8100000C+i*4))&0x000000ff;  
   temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
}
//V
for(i =0; i< 51840; i++)
  {
   temp2[0] = (*((Uint32*)0x81000000+i*4)<<8)&0xff000000;  
   temp2[1] = (*(Uint32*)0x81000004+i*4)&0x00ff0000;
   temp2[2] = (*((Uint32*)0x81000008+i*4)>>8)&0x0000ff00;
   temp2[3] = (*((Uint32*)0x8100000C+i*4)>>16)&0x000000ff;  
   temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
}
[color=red]这三个循环的取值 取的是什么值????[/color]
[color=black]vpbe_init( 0x83000000, 720, 576, 0);[/color][color=red]的buffer地址所存放的视频格式是怎样的??和vpfe输出的buffer地址的视频数据存放方式必须一样吗??[/color]

luckwu 2009-11-30 11:35

你好,关于VPFE和VPBE这两个函数,要详细看光盘资料中的document里“TMS320DM643x DMP Video Processing Front End (VPFE) User's Guide (Rev. A).pdf”和“TMS320DM643x DMP Video Processing Back End (VPBE) User's Guide (Rev. A).pdf”这两个相关的文档,每个参数都做了说明的。关于视频的时序图文档中都有详细的介绍。
        对于各个参数的赋值以及图像的格式,因为图像的输出格式是通过TVP5150的配置决定的,而且格式的确定就会有相关的参数的赋值,所以可以看看TVP5150的芯片资料以及对相关的视频知识有所了解。
        在for循环中0x81000000地址可以从CMD中知道此地址是DDR2的地址,可以根据此Y/U/V的地址可以用CCS上看到一帧的图像。

[[i] 本帖最后由 luckwu 于 2009-11-30 03:36 编辑 [/i]]

宇野 2009-12-15 14:26

start address中R G B分别设成什么值啊?

zhaofuchun 2010-1-15 12:50

vpfe如何与vpbe通信协调?

vpfe处理完成后,如何通知vpbe信息已处理完成?
望版主和各位高手明示。

monster_chp 2010-1-16 23:17

Int16 video_loopback_test( )
{
    Uint32 i;
    tvp5150_init( );
        vpfe_init( 0x81000000, 720, 576 );      // Setup Front-End   
    vpbe_init( 0x81000000, 720, 576, 0);   // Setup Back-End

        for(;;)
        {
                for(i =0; i< 103680; i++)
                {

                        temp2[0] = *((Uint32*)0x81000000+i*2)&0xff000000;                       
                        temp2[1] = (*((Uint32*)0x81000000+i*2)<<8)&0x00ff0000;               
                        temp2[2] = (*((Uint32*)0x81000004+i*2)>>16)&0x0000ff00;               
                        temp2[3] = (*((Uint32*)0x81000004+i*2)>>8)&0x000000ff;               
                        temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
                        *((Uint32*)0x83000000+i) = temp2[4];
                }

                //U
                for(i =0; i< 51840; i++)
                {
                        temp2[0] = (*((Uint32*)0x81000000+i*4)<<24)&0xff000000;               
                        temp2[1] = (*((Uint32*)0x81000004+i*4)<<16)&0x00ff0000;       
                        temp2[2] = (*((Uint32*)0x81000008+i*4)<<8)&0x0000ff00;               
                        temp2[3] = (*((Uint32*)0x8100000C+i*4))&0x000000ff;               
                        temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
                        *((Uint32*)0x83065400+i) = temp2[4];
                }

                //V
                for(i =0; i< 51840; i++)
                {
                        temp2[0] = (*((Uint32*)0x81000000+i*4)<<8)&0xff000000;               
                        temp2[1] = (*(Uint32*)0x81000004+i*4)&0x00ff0000;       
                        temp2[2] = (*((Uint32*)0x81000008+i*4)>>8)&0x0000ff00;       
                        temp2[3] = (*((Uint32*)0x8100000C+i*4)>>16)&0x000000ff;               
                        temp2[4] = temp2[0] | temp2[1] | temp2[2] | temp2[3];
                        *((Uint32*)0x83097e00+i) = temp2[4];
                }
        }


}

我拿到的代码是如上,
为什么        vpfe_init( 0x81000000, 720, 576 );      // Setup Front-End   
    vpbe_init( 0x81000000, 720, 576, 0);   // Setup Back-End
地址一样的呢?

monster_chp 2010-1-21 15:27

地址一样的呢?

为什么        vpfe_init( 0x81000000, 720, 576 );      // Setup Front-End   
    vpbe_init( 0x81000000, 720, 576, 0);   // Setup Back-End
地址一样的呢?
页: [1]

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多