diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-17 15:54:58 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-17 15:54:58 +0000 |
commit | d36fb9f2e2ce3276655bbb37549b1338b647b25d (patch) | |
tree | d641e332faab8e60deeed8506104d9bf7c240fd8 /dec_video.c | |
parent | 8c2eddc2b93b0cce20ed25cbcd2142da36a8def1 (diff) |
Allow using direct rendering with any HW pitches (even on matrox g400).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4746 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r-- | dec_video.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dec_video.c b/dec_video.c index d15c248a8a..24e040fa95 100644 --- a/dec_video.c +++ b/dec_video.c @@ -783,11 +783,19 @@ static int use_dr=0,use_dr_422=0; 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 |