TI中文支持网
TI专业的中文技术问题咨询交流网站

DM368 OSDWIN0的尺寸与实际的不一样,要怎样调整呢?

各位大神:

我在用DM368的VPBE调试一款屏的显示。我用的屏幕是240*320的竖屏。,然后窗口的分辨率设置成960*320时刚好占满整个屏幕。

然后VENC_DCLKCTL = 0x0003;   VENC_DCLKPTN0 = 0x0003; 这两句的设定貌似改变了VPBE取数据的方式,然后从系统导入一张RGB888的图片显示时,数据怎么排列都有问题,以下是我的寄存器设定,哪位大神帮忙看一下哪里出了问题。

VPSS_CLKCTL = 0x00000018; // Enable DAC and VENC clock, both at 27 MHz
VPSS_VPBE_CLK_CTRL = 0x00000019; // Select enc_clk*1, turn on VPBE clk
VENC_OSDCLK0 = 0;
VENC_OSDCLK1 = 1;

OSD_MODE = 0x000000fc; // Blackground color blue using clut in ROM0
OSD_EXTMODE = 0;
OSD_OSDWIN0MD = 0; // Disable both osd windows and cursor window
OSD_OSDWIN1MD = 0;
OSD_RECTCUR = 0;
/*liyan's test for bitmap*/
OSD_OSDWIN0OFST= ((video_buffer1>>19)&0x1E00) | (width >> 4); //bit 12~9 store high 4bit 31~28
OSD_OSDWINADH = (video_buffer1 >> 21)&0x7F; //bit 6~0 store hight 7bit 27~21
OSD_OSDWIN0ADL = (video_buffer1 >> 5)&0xFFFF; //bit 15~0 stor 16bit 20~5
OSD_BASEPX =0;//137;// HPulse+91;
OSD_BASEPY =0;//38; //VPulse+36;
OSD_OSDWIN0XP = 8;//55;//一个值动两个像数
OSD_OSDWIN0YP = 8;//35;
OSD_OSDWIN0XL = 960;
OSD_OSDWIN0YL = 320;
// OSD_OSDWIN0MD = 0x000000C1;
OSD_OSDWIN0MD = 0x0000C0C1;

// Frame mode with no up-scaling
/*
* Setup VENC
*/
if ( ntsc_pal_mode == NTSC )
// VENC_VMOD = 0x00000003; // Standard NTSC interlaced output
VENC_VMOD = 0x00002013; // liyan change to No stardar video mode 130203
else
VENC_VMOD = 0x00002043; // Standard PAL interlaced output

VENC_HSPLS = HPulse; //HDW
VENC_VSPLS = VPulse; //VDW
// VENC_HINTVL = width-1; //PPLN
#if 1
VENC_HVALID = width; //LNH
VENC_HSTART = HSTART; //144
VENC_HINTVL = 1099;//4; //PPLN
//SPH
VENC_VVALID = height; //LNV
// VENC_VSTART = VSTART; //SLV
VENC_VSTART = VSTART; //SLV
VENC_VINTVL = 340; //2; //LPFR
#endif
#if 0
VENC_DCLKHSTT = HSTART;
VENC_DCLKHVLD = width;
VENC_DCLKVSTT = VSTART;
VENC_DCLKVVLD = height;
#endif
VENC_HSDLY = 0;//40;
VENC_VSDLY = 0;//40;

// VENC_CMPNT |= 0x8000;
VENC_YCCCTL = 0x10;

// VENC_VDPRO = colorbar_loopback_mode << 8;
VENC_VDPRO |= 0x200; // 100% Color bars
// VENC_VDPRO |= 0x40; // liyan change that YUV change to RGB
// VENC_VIOCTL |= 0x6000; //VCLK output enable
// VPSS_VPBE_CLK_CTRL = 0x00000011; // Select enc_clk*1, turn on VPBE clk
VENC_CLKCTL = 0x11;
VENC_SYNCCTL = 0x0F;

/*
* Choose Output mode
*/
if ( output_mode == COMPOSITE_OUT )
VENC_DACSEL = 0x00000000;
else if ( output_mode == SVIDEO_OUT )
VENC_DACSEL = 0x00004210;

VENC_VIOCTL = 0x2000; // Enable VCLK (VIDCTL)
// VENC_DCLKCTL = 0x0800; // Enable DCLK (DCLKCTL)
VENC_DCLKCTL = 0x0003;
VENC_DCLKPTN0 = 0x0003; // Set DCLK pattern (DCLKPTN0)

Chris Meng:

你好,

请问你使用的RGB888在内存里面是如下格式么?下面的信息可以在DM36x VPBE guide里面找到。

赞(0)
未经允许不得转载:TI中文支持网 » DM368 OSDWIN0的尺寸与实际的不一样,要怎样调整呢?
分享到: 更多 (0)