From f34d086cb9e0930c734254e19b41d2964d9d113e Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 Apr 2016 18:46:43 +0200 Subject: 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. --- video/mp_image.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'video/mp_image.h') 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; -- cgit v1.2.3