summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-07 18:46:43 +0200
committerwm4 <wm4@nowhere>2016-04-07 18:47:32 +0200
commitf34d086cb9e0930c734254e19b41d2964d9d113e (patch)
tree5bb40e694e2a7c7444790b4e5d1415c07485e268 /video/mp_image.h
parent8a67606c20958fa21db0b5ba9a17f379bc01786c (diff)
downloadmpv-f34d086cb9e0930c734254e19b41d2964d9d113e.tar.bz2
mpv-f34d086cb9e0930c734254e19b41d2964d9d113e.tar.xz
mp_image: introduce a hw_subfmt field
For hwaccel formats, mp_image will merely point to a hardware surface handle. In these cases, the mp_image_params.imgfmt field describes the format insufficiently, because it mostly only describes the type of the hardware format, not its underlying format. Introduce hw_subfmt to describe the underlying format. It makes sense to use it with most hwaccels, though for now it will be used with the following commit only.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index af602721f3..c00c78a459 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -39,6 +39,8 @@
// usually copy the whole struct, so that fields added later will be preserved.
struct mp_image_params {
enum mp_imgfmt imgfmt; // pixel format
+ uint64_t hw_subfmt; // underlying format for some hwaccel pixfmts
+ // (will use the HW API's format identifiers)
int w, h; // image dimensions
int p_w, p_h; // define pixel aspect ratio (never 0/0)
enum mp_csp colorspace;