[Mplayer-cvslog] CVS: main dec_video.c,1.114,1.115
Nick Kurshev
nick at mplayer.dev.hu
Sun Mar 3 19:29:16 CET 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv8450/main
Modified Files:
dec_video.c
Log Message:
DR on multibuffering
Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -r1.114 -r1.115
--- dec_video.c 2 Mar 2002 23:43:23 -0000 1.114
+++ dec_video.c 3 Mar 2002 18:29:05 -0000 1.115
@@ -787,6 +787,7 @@
static int use_dr=0,use_dr_422=0;
static bes_da_t bda;
+static int multi_buff_num = 0;
void init_video_vaa( unsigned width )
{
unsigned adp;
@@ -816,7 +817,6 @@
int blit_frame=0;
void *vmem;
int painted;
-static int double_buff_num = 0;
//uint8_t* planes_[3];
//uint8_t** planes=planes_;
@@ -959,13 +959,12 @@
vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
if(vo_doublebuffering && bda.num_frames>1)
{
- if(double_buff_num) vmem = bda.dga_addr + bda.offsets[1] + bda.offset.y;
- else vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
- double_buff_num = double_buff_num ? 0 : 1;
+ vmem = bda.dga_addr + bda.offsets[multi_buff_num] + bda.offset.y;
+ multi_buff_num=(multi_buff_num+1)%bda.num_frames;
}
}
DS_VideoDecoder_DecodeInternal(ds_vdec, start, in_size, 0, drop_frame ? 0 : vmem ? vmem : sh_video->our_out_buffer);
- if(vmem) painted = 1;
+ if(vmem) painted = 1;
}
if(!drop_frame && sh_video->our_out_buffer) blit_frame=3;
break;
@@ -1078,9 +1077,8 @@
vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
if(vo_doublebuffering && bda.num_frames>1)
{
- if(double_buff_num) vmem = bda.dga_addr + bda.offsets[1] + bda.offset.y;
- else vmem = bda.dga_addr + bda.offsets[0] + bda.offset.y;
- double_buff_num = double_buff_num ? 0 : 1;
+ vmem = bda.dga_addr + bda.offsets[multi_buff_num] + bda.offset.y;
+ multi_buff_num=(multi_buff_num+1)%bda.num_frames;
}
sh_video->our_out_buffer = vmem;
}
More information about the MPlayer-cvslog
mailing list