From 44c7e547378f3742955b7bce33a98be03cb1bdbe Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Thu, 6 Sep 2001 14:09:37 +0000 Subject: SPU profiling CVS patchset: 580 CVS date: 2001/09/06 14:09:37 --- src/xine-engine/video_decoder.c | 20 +++++++++++++++----- src/xine-engine/video_out.c | 11 ++++++++--- src/xine-engine/xine.c | 4 +++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 83e716cae..f3bc6d1c5 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.45 2001/09/01 14:33:00 guenter Exp $ + * $Id: video_decoder.c,v 1.46 2001/09/06 14:09:37 jkeil Exp $ * */ @@ -57,8 +57,6 @@ void *video_decoder_loop (void *this_gen) { spu_decoder_t *spu_decoder; - profiler_start_count (0); - while (running) { /* printf ("video_decoder: getting buffer...\n"); */ @@ -100,20 +98,30 @@ void *video_decoder_loop (void *this_gen) { break; case BUF_SPU_CLUT: + profiler_start_count (3); + spu_decoder = update_spu_decoder(this, buf->type); if (spu_decoder) spu_decoder->decode_data (spu_decoder, buf); + + profiler_stop_count (3); break; case BUF_SPU_PACKAGE: + profiler_start_count (3); + /* now, decode this buffer if it's the right track */ if ( (buf->type & 0xFFFF)== this->spu_channel) { + spu_decoder = update_spu_decoder (this, buf->type); if (spu_decoder) spu_decoder->decode_data (spu_decoder, buf); + } + + profiler_stop_count (3); break; case BUF_CONTROL_END: @@ -159,6 +167,8 @@ void *video_decoder_loop (void *this_gen) { break; default: + profiler_start_count (0); + if ( (buf->type & 0xFF000000) == BUF_VIDEO_BASE ) { /* @@ -190,6 +200,8 @@ void *video_decoder_loop (void *this_gen) { } else printf ("video_decoder: unknown buffer type: %08x\n", buf->type); + profiler_stop_count (0); + break; } @@ -197,8 +209,6 @@ void *video_decoder_loop (void *this_gen) { buf->free_buffer (buf); } - profiler_stop_count (0); - pthread_exit(NULL); } diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 31b96ed8f..7e4ac0038 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.40 2001/08/14 11:57:40 guenter Exp $ + * $Id: video_out.c,v 1.41 2001/09/06 14:09:37 jkeil Exp $ * */ @@ -283,10 +283,15 @@ static void *video_out_loop (void *this_gen) { if (this->overlay_source) { /* This is the only way for the spu decoder to get pts values * for flushing it's buffers. So don't remove it! */ - vo_overlay_t *ovl = - this->overlay_source->get_overlay (this->overlay_source, img->PTS); + vo_overlay_t *ovl; + + profiler_start_count (4); + + ovl = this->overlay_source->get_overlay (this->overlay_source, img->PTS); if (ovl && this->driver->overlay_blend) this->driver->overlay_blend (this->driver, img, ovl); + + profiler_stop_count (4); } this->driver->display_frame (this->driver, img); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 5da36c630..20cc1153f 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.56 2001/09/02 22:26:54 guenter Exp $ + * $Id: xine.c,v 1.57 2001/09/06 14:09:37 jkeil Exp $ * * top-level xine functions * @@ -412,6 +412,8 @@ xine_t *xine_init (vo_driver_t *vo, profiler_set_label (0, "video decoder "); profiler_set_label (1, "audio decoder/output "); profiler_set_label (2, "video output "); + profiler_set_label (3, "spu decoder "); + profiler_set_label (4, "spu blend "); /* * init lock -- cgit v1.2.3