diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2007-04-12 23:12:28 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2007-04-12 23:12:28 +0200 |
commit | e8aa9780585fcec85b2a019af6e248687189e97c (patch) | |
tree | dc505b4e994c2610aa77e4f0802b250e01619bf6 /src | |
parent | f01ea9ec4d506bf4080a569129cafe4a966b0724 (diff) | |
download | xine-lib-e8aa9780585fcec85b2a019af6e248687189e97c.tar.gz xine-lib-e8aa9780585fcec85b2a019af6e248687189e97c.tar.bz2 |
Avoid keeping frames referenced which are nolonger used.
The current implementation keeps references to VO_NUM_RECENT_FRAMES
frames (for deinterlacing), but doesn't make any use of them.
As many XXMC capable devices only supply 8 frames at all, keeping
fewer frames referenced makes more available for decoding and thus
avoids frame drops by keeping the number of frames which are ready
for display more often above frame_drop_limit.
Diffstat (limited to 'src')
-rw-r--r-- | src/video_out/video_out_xxmc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c index 498eaab33..53e4b7995 100644 --- a/src/video_out/video_out_xxmc.c +++ b/src/video_out/video_out_xxmc.c @@ -1598,6 +1598,20 @@ static void xxmc_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) xxmc_add_recent_frame (this, frame); /* deinterlacing */ + /* + * the current implementation doesn't need recent frames for deinterlacing, + * but as most of the time we only have a little number of frames available + * per device, we only hold references to the most recent frame by filling + * the whole buffer with the same frame + */ + { + int i; + for (i = 1; i < VO_NUM_RECENT_FRAMES; i++) { + frame->vo_frame.lock(&frame->vo_frame); + xxmc_add_recent_frame (this, frame); /* deinterlacing */ + } + } + if ((frame->format == XINE_IMGFMT_XXMC) && (!xxmc->decoded || !xxmc_xvmc_surface_valid(this, frame->xvmc_surf))) { xvmc_context_reader_unlock( &this->xvmc_lock ); @@ -1943,7 +1957,7 @@ static void xxmc_dispose (vo_driver_t *this_gen) { for( i=0; i < VO_NUM_RECENT_FRAMES; i++ ) { if( this->recent_frames[i] ) - this->recent_frames[i]->vo_frame.dispose + this->recent_frames[i]->vo_frame.free (&this->recent_frames[i]->vo_frame); this->recent_frames[i] = NULL; } |