Using VPIF input on hawkboard from Caglar…

I found this discuss and the method useful for all hawkboard users. Just logging here. I am waiting for DSP side code, will update this blog when I upload other sources as well.
> Caglar,

> Can u share the information regarding how to make composite video work in
> hawkboard.

Sure, but it’s a little bit picky though. Here is what I did to make it work:

I downloaded sources for kernel coming with Angstrom [1]. Kernel version
is 2.6.33-rc4, I guess it is the PSP kernel.

This kernel was supporting VPIF input and output out of the box, moreover
associated filesystem was creating /dev/video0 node automatically. However, in
my experience TVP5147 driver was a little bit buggy(due to noise I guess)
so it wasn’t detecting camera standard. Then I patched my kernel with the
attached patch to solve this issue.

Next trouble was color space conversion. VPIF was giving data in NV16
(two plane YUV) format but LCDC was expecting an RGB data. This was a little
bit problematic for generic players; for instance gstreamer v4l2 plugin was not
supporting NV16 and mplayer was unable to detect the format. So I wrote my own
program to do the following:

*  Grab a frame from V4l2 driver
*  Convert color space from NV16 to RGB565
*  Copy buffer to framebuffer memory.

But this was not enough as framerate was not so good. So I modified Codec
Engine video_copy example to utilize DSP and that way I offloaded color space
conversion to the DSP. This gave me a beautiful 25 fps from my camera.

Currently I don’t have any appropriate place to upload my example codes but I
can share them with anyone interested. Actually binaries can serve a good
purpose for anybody want to give it a quick try on their board.

Best Regards,
Caglar

[1] http://www.angstrom-distribution.org/narcissus/

____________________________________________________________________________

— kernel_source_original/drivers/media/video/tvp514x.c        2010-03-18 14:33:44.000000000 +0200
+++ kernel_source/drivers/media/video/tvp514x.c 2010-05-07 00:46:05.284494625 +0300
@@ -741,8 +741,9 @@
break;
}

–       if ((current_std == STD_INVALID) || (try_count < 0))
–               return -EINVAL;
+       if ((current_std == STD_INVALID) || (try_count < 0)) {
+               current_std = STD_PAL_BDGHIN;
+       }

decoder->current_std = current_std;
decoder->input = input;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: