[Mplayer-cvslog] CVS: main/vidix/drivers radeon_vid.c,1.31,1.32
Nick Kurshev
nick at mplayer.dev.hu
Fri Feb 1 10:32:22 CET 2002
Update of /cvsroot/mplayer/main/vidix/drivers
In directory mplayer:/var/tmp.root/cvs-serv8642/main/vidix/drivers
Modified Files:
radeon_vid.c
Log Message:
Using new tune info
Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- radeon_vid.c 1 Feb 2002 08:53:08 -0000 1.31
+++ radeon_vid.c 1 Feb 2002 09:32:20 -0000 1.32
@@ -870,16 +870,50 @@
if(__verbose > 1) radeon_vid_dump_regs();
}
-static unsigned radeon_query_pitch(unsigned fourcc)
+static unsigned radeon_query_pitch(unsigned fourcc,const vidix_yuv_t *spitch)
{
- unsigned pitch;
+ unsigned pitch,spy,spv,spu;
+ spy = spv = spu = 0;
+ switch(spitch->y)
+ {
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: spy = spitch->y; break;
+ default: break;
+ }
+ switch(spitch->u)
+ {
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: spu = spitch->u; break;
+ default: break;
+ }
+ switch(spitch->v)
+ {
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256: spv = spitch->v; break;
+ default: break;
+ }
switch(fourcc)
{
/* 4:2:0 */
case IMGFMT_IYUV:
case IMGFMT_YV12:
- case IMGFMT_I420: pitch = 32; break;
- default: pitch = 16; break;
+ case IMGFMT_I420:
+ if(spy > 16 && spu == spy/2 && spv == spy/2) pitch = spy;
+ else pitch = 32;
+ break;
+ default:
+ if(spy >= 16) pitch = spy;
+ else pitch = 16;
+ break;
}
return pitch;
}
@@ -899,7 +933,7 @@
config->fourcc == IMGFMT_IYUV) is_420 = 1;
if(config->fourcc == IMGFMT_RGB32 ||
config->fourcc == IMGFMT_BGR32) is_rgb32 = 1;
- best_pitch = radeon_query_pitch(config->fourcc);
+ best_pitch = radeon_query_pitch(config->fourcc,&config->src.pitch);
mpitch = best_pitch-1;
switch(config->fourcc)
{
@@ -1032,7 +1066,7 @@
static void radeon_compute_framesize(vidix_playback_t *info)
{
unsigned pitch,awidth;
- pitch = radeon_query_pitch(info->fourcc);
+ pitch = radeon_query_pitch(info->fourcc,&info->src.pitch);
awidth = (info->src.w + (pitch-1)) & ~(pitch-1);
switch(info->fourcc)
{
More information about the MPlayer-cvslog
mailing list