Search
lxdream.org :: lxdream/src/pvr2/yuv.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/yuv.c
changeset 284:808617ee7135
prev282:01e53698ff38
next293:fe191b6381b5
author nkeynes
date Mon Jan 15 08:32:09 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Break vram routines out into pvr2mem.c
Initial (untested) implementation of stride textures
Hookup YUV converter code in pvr2.c
file annotate diff log raw
1.1 --- a/src/pvr2/yuv.c Sun Jan 14 11:43:00 2007 +0000
1.2 +++ b/src/pvr2/yuv.c Mon Jan 15 08:32:09 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: yuv.c,v 1.2 2007-01-14 11:43:00 nkeynes Exp $
1.6 + * $Id: yuv.c,v 1.3 2007-01-15 08:32:09 nkeynes Exp $
1.7 *
1.8 * YUV420 and YUV422 decoding
1.9 *
1.10 @@ -101,6 +101,7 @@
1.11 pvr2_yuv_state.y++;
1.12 if( pvr2_yuv_state.y >= pvr2_yuv_state.height ) {
1.13 asic_event( EVENT_PVR_YUV_DONE );
1.14 + pvr2_yuv_state.y = 0;
1.15 }
1.16 }
1.17
1.18 @@ -140,18 +141,22 @@
1.19 }
1.20 }
1.21
1.22 -void pvr2_yuv_init( uint32_t target, uint32_t config )
1.23 +void pvr2_yuv_init( uint32_t target )
1.24 {
1.25 pvr2_yuv_state.target = target;
1.26 - pvr2_yuv_state.width = (config & 0x3f) + 1;
1.27 - pvr2_yuv_state.height = ((config>>8) & 0x3f) +1;
1.28 pvr2_yuv_state.x = 0;
1.29 pvr2_yuv_state.y = 0;
1.30 pvr2_yuv_state.data_length = 0;
1.31 - pvr2_yuv_state.input_format = (config & 0x01000000) ? FORMAT_YUV420 : FORMAT_YUV422;
1.32 + MMIO_WRITE( PVR2, YUV_COUNT, 0 );
1.33 +}
1.34 +
1.35 +void pvr2_yuv_set_config( uint32_t config )
1.36 +{
1.37 + pvr2_yuv_state.width = (config & 0x3f) + 1;
1.38 + pvr2_yuv_state.height = ((config>>8) & 0x3f) +1;
1.39 + pvr2_yuv_state.input_format = (config & 0x01000000) ? FORMAT_YUV422 : FORMAT_YUV420;
1.40 if( config & 0x00010000 ) {
1.41 pvr2_yuv_state.height *= pvr2_yuv_state.width;
1.42 pvr2_yuv_state.width = 1;
1.43 }
1.44 - MMIO_WRITE( PVR2, YUV_COUNT, 0 );
1.45 }
.