mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 09:56:30 +00:00
DR on multibuffering
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4932 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2cfaacd0cd
commit
036e354dd9
12
dec_video.c
12
dec_video.c
@ -787,6 +787,7 @@ extern int vaa_use_dr;
|
||||
|
||||
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 planar=(mpi->flags&MP_IMGFLAG_PLANAR)!=0; //(out_fmt==IMGFMT_YV12||out_fmt==
|
||||
int blit_frame=0;
|
||||
void *vmem;
|
||||
int painted;
|
||||
static int double_buff_num = 0;
|
||||
|
||||
//uint8_t* planes_[3];
|
||||
//uint8_t** planes=planes_;
|
||||
@ -959,9 +959,8 @@ switch(sh_video->codec->driver){
|
||||
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);
|
||||
@ -1078,9 +1077,8 @@ if(verbose>1){
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user