diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-17 12:22:01 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-17 12:22:01 +0000 |
commit | 0a83c6ec7bfeef0f53c6e891fcb5788d9fe88ed6 (patch) | |
tree | d660ef679ecb4d86ae5d522f3a9069f238774d81 /dec_video.c | |
parent | 68e6328d1436428d0a44082210a505c4476c0d36 (diff) | |
download | mpv-0a83c6ec7bfeef0f53c6e891fcb5788d9fe88ed6.tar.bz2 mpv-0a83c6ec7bfeef0f53c6e891fcb5788d9fe88ed6.tar.xz |
More correct direct rendering usage
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4742 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r-- | dec_video.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dec_video.c b/dec_video.c index 7000286be1..d15c248a8a 100644 --- a/dec_video.c +++ b/dec_video.c @@ -779,14 +779,15 @@ if ((sh_video->codec->driver == VFM_QTRLE) && (sh_video->bih->biBitCount != 24)) extern int vaa_use_dr; -static int use_dr=0; +static int use_dr=0,use_dr_422=0; static bes_da_t bda; -void init_video_vaa( void ) +void init_video_vaa( unsigned width ) { 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; } #ifdef USE_LIBVO2 @@ -939,7 +940,7 @@ switch(sh_video->codec->driver){ { /* FIXME: WILL WORK ONLY FOR PACKED FOURCC. BUT WHAT ABOUT PLANAR? */ vmem = 0; - if(use_dr && bda.dest.pitch.y == 16) + if(use_dr_422) { vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y; if(vo_doublebuffering && bda.num_frames>1) @@ -1054,7 +1055,7 @@ if(verbose>1){ if(!in_size) break; /* FIXME: WILL WORK ONLY FOR PACKED FOURCC. BUT WHAT ABOUT PLANAR? */ vmem = 0; - if(use_dr && bda.dest.pitch.y == 16) + if(use_dr_422) { vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y; if(vo_doublebuffering && bda.num_frames>1) |