From 02da07c76121ca7088dac91a2c03037d8d0e9d77 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 9 May 2005 19:29:55 +0000 Subject: *** empty log message *** --- TODO | 55 ++++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) (limited to 'TODO') diff --git a/TODO b/TODO index c006ed2..97a3cb6 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,17 @@ -// This is how it's done! +// libFAME code http://lists.debian.org/debian-user-spanish/2005/01/msg00380.html +// libYUV +http://veejay.dyne.org/trac.cgi/browser/trunk/veejay-current/ + +// YUV conversion code +http://cvlab.epfl.ch/~jpilet/videosource/frame_8cc-source.html + +// libFAME yuv format specification +http://www.linuxmanpages.com/man3/fame_start_frame.3.php + +// YUV420 format specification +http://encyclopedia.laborlawtalk.com/YUV_4:2:0 ========================================================================== TASKS (client) @@ -161,45 +172,3 @@ email. `-----------' -========================================================================== - This code should convert yuv to yuv422 planar -========================================================================== -int Frame::ExtractYUV420( uint8_t *yuv, uint8_t *output[ 3 ] ) -{ - unsigned char *pixels[ 3 ]; - int pitches[ 3 ]; - int width = GetWidth(), height = GetHeight(); - - pixels[ 0 ] = ( unsigned char* ) yuv; - pitches[ 0 ] = decoder->width * 2; - - dv_decode_full_frame( decoder, data, e_dv_color_yuv, pixels, pitches ); - - int w2 = width / 2; - uint8_t *y = output[ 0 ]; - uint8_t *cb = output[ 1 ]; - uint8_t *cr = output[ 2 ]; - uint8_t *p = yuv; - - for ( int i = 0; i < height; i += 2 ) - { - /* process two scanlines (one from each field, interleaved) */ - for ( int j = 0; j < w2; j++ ) - { - /* packed YUV 422 is: Y[i] U[i] Y[i+1] V[i] */ - *( y++ ) = *( p++ ); - *( cb++ ) = *( p++ ); - *( y++ ) = *( p++ ); - *( cr++ ) = *( p++ ); - } - /* process next two scanlines (one from each field, interleaved) */ - for ( int j = 0; j < w2; j++ ) - { - /* skip every second line for U and V */ - *( y++ ) = *( p++ ); - p++; - *( y++ ) = *( p++ ); - p++; - } - } -} \ No newline at end of file -- cgit v1.2.3