mirror of https://github.com/mpv-player/mpv
use 4 buffers, fallback to fewer buffers if the video ram isnt large enough
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4895 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
57ef06bcf8
commit
e863c304f9
|
@ -843,12 +843,18 @@ int vixQueryFourcc(vidix_fourcc_t *to)
|
||||||
int vixConfigPlayback(vidix_playback_t *info)
|
int vixConfigPlayback(vidix_playback_t *info)
|
||||||
{
|
{
|
||||||
if(!is_supported_fourcc(info->fourcc)) return ENOSYS;
|
if(!is_supported_fourcc(info->fourcc)) return ENOSYS;
|
||||||
if(info->num_frames>3) info->num_frames=3; //more than 3 make no sense at the moment but they do work
|
|
||||||
|
|
||||||
mach64_compute_framesize(info);
|
mach64_compute_framesize(info);
|
||||||
mach64_overlay_offset = mach64_ram_size - info->frame_size*info->num_frames;
|
|
||||||
mach64_overlay_offset &= 0xffff0000;
|
if(info->num_frames>4) info->num_frames=4;
|
||||||
if(mach64_overlay_offset < 0) return EINVAL;
|
for(;info->num_frames>0; info->num_frames--)
|
||||||
|
{
|
||||||
|
mach64_overlay_offset = mach64_ram_size - info->frame_size*info->num_frames;
|
||||||
|
mach64_overlay_offset &= 0xffff0000;
|
||||||
|
if(mach64_overlay_offset>0) break;
|
||||||
|
}
|
||||||
|
if(info->num_frames <= 0) return EINVAL;
|
||||||
|
|
||||||
info->dga_addr = (char *)mach64_mem_base + mach64_overlay_offset;
|
info->dga_addr = (char *)mach64_mem_base + mach64_overlay_offset;
|
||||||
mach64_vid_init_video(info);
|
mach64_vid_init_video(info);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue