This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Display video on DM365 LCD

HI

        I would like to ask some queries on DM365LCD display. I am trying to display a.yuv output video from my decoder on LCD display . I encountered some problems while doing this.

the resolution of our LCD is 1440x240,the video is also 1440x240.

our code:

void fill_fb(char *dest,int dest_width,int dest_height,char *src,int src_width,int src_height)
{
 int width  = dest_width  > src_width  ? src_width  : dest_width;
 int height = dest_height > src_height ? src_height : dest_height;
 
 printf("width:%d  height:%d\n",width,height);
 int i = 0 ;

 for (i = 0 ; i < height ; i ++)
 {
  memcpy(&dest[2*i*dest_width],&src[2*i*src_width],width*2);

}
}
int main()
{

 int size;
 int fd,i=100;
 char *virtual_ptr;
 char buf[1440*240*3/2];
 short dst[1440*240*3/2];
 FILE *stream;
 stream=fopen("src1.yuv","rb");
 if(stream ==NULL)
 printf("11\n");
 fseek(stream, 0, SEEK_SET);
 printf("buf=%x\n",buf[0]);
 fread(buf,1,1440*240*3/2,stream);
  fd = open("/dev/fb0",O_RDWR);
 if(fd == -1 )
  printf("22\n");
 size = 1440*240*2;
 
 //sleep(2);

 virtual_ptr =  mmap(NULL,size,PROT_READ | PROT_WRITE,MAP_SHARED,fd,0);
 printf("vir=%x\n",virtual_ptr);
 printf("buf=%x\n",buf[0]);


 while(i--)
 {

  //display_handle = read_fb_display();

  //printf("write fb %d!\n",(int)Buffer_getNumBytesUsed(*display_handle));
  fill_fb(virtual_ptr,1440,240,dst,1440,240);
  //fb_pixel(virtual_ptr,);
  //sleep(1);
  memset(buf,0,1440*240*3/2);
  fread(buf,1,1440*240*3/2,stream);
 }
 return 1;
}

but there's nothing on LCD

when  we add some code change yuv format to rgb format,it can display but too slow like cartoon.

Also we test the decode_lcd demo in the DVSDK.But we can't get the right image on LCD.If we do something wrong on it?

I hope someone can help me.