diff options
author | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-04 22:33:08 +0000 |
---|---|---|
committer | ben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-04 22:33:08 +0000 |
commit | e4838f2bbddb7923f48b8e715e126e598c0ce792 (patch) | |
tree | e272a3e0c86ea3a926f7c1d7acfaf4cd6be49b10 /vidix/savage_vid.c | |
parent | b35efc5f05cfc4d958efdbc7b3998036ae361e61 (diff) |
sync with vidix.sf.net r317: fixes colorspace issues for vidix savage driver
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25302 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix/savage_vid.c')
-rw-r--r-- | vidix/savage_vid.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/vidix/savage_vid.c b/vidix/savage_vid.c index 633177df7f..a02921267c 100644 --- a/vidix/savage_vid.c +++ b/vidix/savage_vid.c @@ -277,18 +277,18 @@ static unsigned int GetBlendForFourCC( int id ) { switch( id ) { + case IMGFMT_UYVY: + return 0; case IMGFMT_YUY2: - case IMGFMT_YV12: - case IMGFMT_I420: return 1; case IMGFMT_Y211: return 4; - case IMGFMT_RGB15: + case IMGFMT_BGR15: return 3; - case IMGFMT_RGB16: + case IMGFMT_BGR16: return 5; default: - return 0; + return 1; } } @@ -450,12 +450,6 @@ SavageDisplayVideoOld(void) - /* Set surface format. */ - - OUTREG(SSTREAM_CONTROL_REG,GetBlendForFourCC(info->format) << 24 | info->src_w); - - debugout(SSTREAM_CONTROL_REG,GetBlendForFourCC(info->format) << 24 | info->src_w); - /* Calculate horizontal scale factor. */ //FIXME: enable scaling @@ -491,9 +485,9 @@ SavageDisplayVideoOld(void) OUTREG(SSTREAM_WINDOW_SIZE_REG, OS_WH(info->drw_w, info->drw_h) ); debugout(SSTREAM_WINDOW_SIZE_REG, OS_WH(info->drw_w, info->drw_h) ); + /* Set surface format and adjust scaling */ - - ssControl = 0; + ssControl = GetBlendForFourCC(info->format) << 24 | info->src_w; if( info->src_w > (info->drw_w << 1) ) { @@ -510,10 +504,6 @@ SavageDisplayVideoOld(void) ssControl |= HDSCALE_64; } - ssControl |= info->src_w; - ssControl |= (1 << 24); - - //FIXME: enable scaling OUTREG(SSTREAM_CONTROL_REG, ssControl); debugout(SSTREAM_CONTROL_REG, ssControl); @@ -1063,8 +1053,8 @@ is_supported_fourcc (uint32_t fourcc) // case IMGFMT_YV12: // case IMGFMT_I420: case IMGFMT_UYVY: - case IMGFMT_YVYU: case IMGFMT_YUY2: + case IMGFMT_Y211: case IMGFMT_RGB15: case IMGFMT_RGB16: // case IMGFMT_BGR32: @@ -1229,6 +1219,7 @@ savage_config_playback (vidix_playback_t * vinfo) info->pitch = ((info->src_w << 1) + 15) & ~15; +#if 0 swap_uv = 0; switch (vinfo->fourcc) { @@ -1275,6 +1266,7 @@ savage_config_playback (vidix_playback_t * vinfo) break; } +#endif info->pitch |= ((info->pitch >> 1) << 16); vinfo->frame_size = info->pitch * info->src_h; |