Mercurial > mplayer.hg
diff dec_video.c @ 4745:398e3663ed71
Allow using direct rendering with any HW pitches (even on matrox g400).
author | nick |
---|---|
date | Sun, 17 Feb 2002 15:54:58 +0000 |
parents | d3a52470594c |
children | 9657a64f2e12 |
line wrap: on
line diff
--- a/dec_video.c Sun Feb 17 15:09:46 2002 +0000 +++ b/dec_video.c Sun Feb 17 15:54:58 2002 +0000 @@ -783,11 +783,19 @@ static bes_da_t bda; void init_video_vaa( unsigned width ) { + unsigned adp; memset(&bda,0,sizeof(bes_da_t)); if(vo_vaa.query_bes_da) use_dr = vo_vaa.query_bes_da(&bda) ? 0 : 1; if(!vaa_use_dr) use_dr = 0; - use_dr_422 = use_dr && bda.dest.pitch.y == 16 && (width*2+15)&~15 == width*2; + if(use_dr) + { + uint32_t sstride,dstride; + sstride=width*2; + adp = bda.dest.pitch.y-1; + dstride=(width*2+adp)&~adp; + if(sstride == dstride) use_dr_422 = 1; + } } #ifdef USE_LIBVO2