summaryrefslogtreecommitdiffstats
path: root/video/vaapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/vaapi.c')
-rw-r--r--video/vaapi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/video/vaapi.c b/video/vaapi.c
index 9bc5953ad0..7a8210be6a 100644
--- a/video/vaapi.c
+++ b/video/vaapi.c
@@ -210,6 +210,15 @@ int va_surface_rt_format(struct mp_image *mpi)
return surface ? surface->rt_format : 0;
}
+// Return the real size of the underlying surface. (HW decoding might allocate
+// padded surfaces for example.)
+void va_surface_get_uncropped_size(struct mp_image *mpi, int *out_w, int *out_h)
+{
+ struct va_surface *s = va_surface_in_mp_image(mpi);
+ *out_w = s ? s->w : 0;
+ *out_h = s ? s->h : 0;
+}
+
static void release_va_surface(void *arg)
{
struct va_surface *surface = arg;