2010-12-12 07:34:58     adv7179 driver rgb2yuv

Document created by Aaronwu Employee on Aug 25, 2013
Version 1Show Document
  • View in full screen mode

2010-12-12 07:34:58     adv7179 driver rgb2yuv

haiqing cao (CHINA)

Message: 96651   

 

I download the adv7179 driver for blackfin561-ezkit but It has a problem when I compile it.

 

rgb2yuv(rgb_l1,yuv_l1,RGB_WIDTH) can not find where it is defined.

 

void bfin_framebuffer_update(unsigned char *ycrcb_buffer1, unsigned char *ycrcb_buffer2)

{

 

// unsigned char *rgb_base   = (unsigned char *)rgb_buffer;

//spa unsigned char *rgb_base   = (unsigned char *) ycrcb_buffer1;

 

unsigned char *rgb_base   = (unsigned char *) ycrcb_buffer1;

unsigned char *ycrcb_base = (unsigned char *) ycrcb_buffer2;

unsigned char *odd_yuv;

unsigned char *even_yuv;

unsigned char *rgb_ptr;

int oddline, evenline,rgbline;

 

for (oddline = FIELD1_AV_START, evenline = FIELD2_AV_START , rgbline = 0;

      oddline <= FIELD1_AV_END; oddline ++, evenline ++) {

  odd_yuv= (unsigned char *)((ycrcb_base + (oddline * YCBCR_WIDTH))+HB_LENGTH+8);

  rgb_ptr = (unsigned char *)(rgb_base + (rgbline++)*RGB_WIDTH*3);

  fb_memcpy((u32 *)rgb_l1,(u32 *)rgb_ptr,RGB_WIDTH* 3/4);

  rgb2yuv(rgb_l1,yuv_l1,RGB_WIDTH);

  fb_memcpy((u32 *)odd_yuv, (u32 *)yuv_l1, RGB_WIDTH/2);

 

  even_yuv = (unsigned char *)((ycrcb_base + (evenline * YCBCR_WIDTH))+HB_LENGTH+8);

  rgb_ptr = (unsigned char *)(rgb_base + (rgbline++)*RGB_WIDTH*3);

  fb_memcpy((u32 *)rgb_l1,(u32 *)rgb_ptr,RGB_WIDTH* 3/4);

  rgb2yuv(rgb_l1,yuv_l1,RGB_WIDTH);

  fb_memcpy((u32 *)even_yuv, (u32 *)yuv_l1, RGB_WIDTH/2);

}

  descriptor.start_addr = (unsigned int *) ycrcb_buffer2;

  return 0;

//SPA...

/*

printk ("%s: %d (%s) bf1=(%x) bf2=(%x)\n",__FILE__,__LINE__, __FUNCTION__, ycrcb_buffer1, ycrcb_buffer2 );

if (*(ycrcb_buffer1+900902))

{

  *(ycrcb_buffer1+900902) = 0;

  if (*(ycrcb_buffer1+900901) == 1)

   descriptor.start_addr = (unsigned int *) ycrcb_buffer1;

  else

   descriptor.start_addr = (unsigned int *) ycrcb_buffer2;

}

*/

}

QuoteReplyEditDelete

 

 

2010-12-12 23:17:51     Re: adv7179 driver rgb2yuv

Aaron Wu (CHINA)

Message: 96653   

 

I don't see there is official support at this point for ADV7179 in blackfin uclinux distribution, ADV7183b is supported. If you are working based on some user-provided drivers on the forum you may need some effort to make it work on your platform. If you would like to take ADV7183b as reference here are some information:   docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:v4l_blackfin_camera&s[]=adv7183b

QuoteReplyEditDelete

Attachments

    Outcomes