summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2007-04-12 23:12:28 +0200
committerReinhard Nißl <rnissl@gmx.de>2007-04-12 23:12:28 +0200
commite8aa9780585fcec85b2a019af6e248687189e97c (patch)
treedc505b4e994c2610aa77e4f0802b250e01619bf6
parentf01ea9ec4d506bf4080a569129cafe4a966b0724 (diff)
downloadxine-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.
-rw-r--r--src/video_out/video_out_xxmc.c16
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;
}