aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out
diff options
context:
space:
mode:
authorGravatar Niklas Haas <git@nand.wakku.to>2016-06-07 11:05:57 +0200
committerGravatar wm4 <wm4@nowhere>2016-06-07 12:18:05 +0200
commit9bd886f449e24ec8a002271d7e410ef334743966 (patch)
tree7942ba9569ef4906a10b29b7450627948f9a2dc2 /video/out
parent393a06911269b69ed83f1b29bd5e252c07ba59bf (diff)
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.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/video.c4
1 files changed, 4 insertions, 0 deletions
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);