From 9bd886f449e24ec8a002271d7e410ef334743966 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 7 Jun 2016 11:05:57 +0200 Subject: vo_opengl: also collect upload perfdata for hwdec Instead of measuring the actual upload time, this instead measures the time needed to render + map the texture via vdpau. These numbers are still useful, since they're part of the critical path. --- video/out/opengl/video.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'video/out/opengl/video.c') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index ea24f6e9a1..0b04e1e20f 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2991,8 +2991,11 @@ static bool gl_video_upload_image(struct gl_video *p, struct mp_image *mpi) p->frames_uploaded++; if (p->hwdec_active) { + // Hardware decoding struct gl_hwdec_frame gl_frame = {0}; + gl_timer_start(p->upload_timer); bool ok = p->hwdec->driver->map_frame(p->hwdec, vimg->mpi, &gl_frame) >= 0; + gl_timer_stop(p->upload_timer); vimg->hwdec_mapped = true; if (ok) { struct mp_image layout = {0}; @@ -3017,6 +3020,7 @@ static bool gl_video_upload_image(struct gl_video *p, struct mp_image *mpi) return true; } + // Software decoding assert(mpi->num_planes == p->plane_count); gl_timer_start(p->upload_timer); -- cgit v1.2.3