找回密码
 注册
搜索
查看: 1076|回复: 8

[讨论] cstn屏 LCD显示问题(播放MP4全屏就花)

[复制链接]
发表于 2008-1-24 16:03:10 | 显示全部楼层 |阅读模式
现在就是在6600D下,lcd_main.c里面有一些关于播放器全屏的问题,就是正常播放的时候可以,但是当点击全屏的时候画面变花了,看不清楚,不是全屏的样而且屏幕应该变横着的了的,好象是有关的储存器设置有问题,有没有相关的经验人士帮忙解决一下
6600D+ST7669V+cstn的屏
void lcd_main_mpg4_refresh
(
uint16 left,  //the left value of the rectangel
uint16 top,  //top of the rectangle
uint16 right,  //right of the rectangle
uint16 bottom, //bottom of the rectangle
uint16 *buf_ptr,
uint8  is_invert
)
{
uint16 i,j;
uint16 address = 0;

//add by lw 2008-01-07
#ifdef CMI_CSTN_st7669vLCD
st7669lcd_main_region(left,top,right,bottom);
#else

/*set Address Direction*/
if (is_invert)
{
  lcd_main_reg_write(0x0005,0x0028);
}
else
{
  lcd_main_reg_write(0x0005,0x0030);
}
/*1:set horizon address and vertical address*/
address = (uint16) (((right & 0xFF) << 8) | (left & 0xFF ));
lcd_main_reg_write(g_lcd_main_region_table[0].addr, address);  // set horizon address
address = (uint16) (((bottom & 0xFF) << 8) | (top & 0xFF));
   lcd_main_reg_write(g_lcd_main_region_table[1].addr, address);  //  set vertical  address position
/*set ram address*/
if (is_invert)
{
  address = (uint16) (((top & 0xFF) << 8) | (right & 0xFF));
  lcd_main_reg_write(g_lcd_main_region_table[2].addr, address); // Set start RAM address (AC register)
}
else
{
  address = (uint16) (((top & 0xFF) << 8) | (left & 0xFF));
  lcd_main_reg_write(g_lcd_main_region_table[2].addr, address); // Set start RAM address (AC register)
}
/*write data*/
lcd_main_reg_cmd_write(g_lcd_main_region_table[3].addr);
#endif
if (is_invert)
{
  /*write data*/
  for (i= left;  i<= right; i++)
  {   
   for (j = top; j <= bottom; j++) // real write
   {
    lcd_main_reg_data_write( *(buf_ptr + i * LCD_MAIN_MP4_WIDTH + j) );
   }
  }

}
else
{
  /*write data*/
  uint rTmp = LCD_MAIN_WIDTH;//((right - left + 1) * (bottom - top + 1)) / LCD_MAIN_MP4_WIDTH + 1;
  //SCI_TRACE_LOW(" lcd_main_mpg4_refresh(): left= %d,right = %d,top= %d,bottom = %d\n",left,right,top,bottom);
  if (bottom > rTmp)
  {
   bottom = rTmp;
  }
  
  for (i= top;  i<= bottom; i++)
  {   
   for (j = left; j <= right; j++) // real write
   {
    lcd_main_reg_data_write( *(buf_ptr + i * LCD_MAIN_MP4_WIDTH + j) );
   }
  }
  lcd_main_mpg4_icon_refresh(0,
   0,
   (LCD_MAIN_WIDTH - 1),
   (LCD_MAIN_HEIGHT -LCD_MAIN_WIDTH - 2),
   (uint16*)g_mpg4_bmp[g_mpg4_bmp_index].map->bitmap);
}
#ifndef CMI_CSTN_st7669vLCD
lcd_main_reg_write(0x0005,0x0030);
#endif
return;
}
帮忙看一下,什么地方要改的,谢谢了
 楼主| 发表于 2008-1-25 14:50:29 | 显示全部楼层
怎么就没人看一下呢,那位大侠能给解决一下啊
点评回复

使用道具 举报

发表于 2008-1-25 18:30:55 | 显示全部楼层
去检查一下你上层传到st7669lcd_main_region(left,top,right,bottom);这个函数里面的几个数值,可能在全屏的时候,这几个数值越界了,也就是超过了7669这颗IC的最大窗口。
点评回复

使用道具 举报

 楼主| 发表于 2008-2-2 08:37:23 | 显示全部楼层
那是个画面区域的设置,可我的连画面都看不清楚,是那种花屏的,而且到全屏的时候想要横向的画面也不行,调了很久有时候是两个画面叠在一起的,全屏的横向画面是花的;有时候你点全屏和退出时,顺序都是反的;有时候不知道怎么的一调画面的颜色变成单色的了,反之很多毛病,是不是有其他的关联影响的???动了这个接口就可以影响到其他的地方?
点评回复

使用道具 举报

发表于 2008-2-25 21:17:09 | 显示全部楼层
buffer开得不够吧?
点评回复

使用道具 举报

发表于 2008-3-7 17:35:07 | 显示全部楼层
有意思,学习一下
点评回复

使用道具 举报

发表于 2008-3-9 11:07:41 | 显示全部楼层
不存在buffer的问题.只是LCD没有转屏的原理.即通过设置AC和StartAddress实现转屏.
点评回复

使用道具 举报

发表于 2008-3-25 10:37:34 | 显示全部楼层
cstn因为一些硬件指标使得每秒刷新的桢数不能很高,你可以试一下在drawimage的地方每画一个画面然后sleep或delay个100ms,这样每s刷新都不会超过10桢。

方向不对,应该像楼上说的原因一样。
点评回复

使用道具 举报

发表于 2008-12-18 20:24:17 | 显示全部楼层
较深,关注学习
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-6 06:40 , Processed in 0.055474 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表