summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-07-15 11:54:44 +0200
committerwm4 <wm4@nowhere>2016-07-15 13:04:17 +0200
commit85488f68928ed40020e545b736118e0273e06cd1 (patch)
treee9e6344f5eff9206a08bc2732dd411fe56269ae7 /video/mp_image.h
parent4a4a9f330281ad11eb39a013bf7308063767bab8 (diff)
downloadmpv-85488f68928ed40020e545b736118e0273e06cd1.tar.bz2
mpv-85488f68928ed40020e545b736118e0273e06cd1.tar.xz
video: change hw_subfmt meaning
The hw_subfmt field roughly corresponds to the field AVHWFramesContext.sw_format in ffmpeg. The ffmpeg one is of the type AVPixelFormat (instead of the underlying hardware format), so it's a good idea to switch to this too for preparation. Now the hw_subfmt field is an mp_imgfmt instead of an opaque/API- specific number. VDPAU and Direct3D11 already used mp_imgfmt, but Videotoolbox and VAAPI had to be switched. One somewhat user-visible change is that the verbose log will now always show the hw_subfmt as image format, instead of as nonsensical number. (In the end it would be good if we could switch to AVHWFramesContext completely, but the upstream API is incomplete and doesn't cover Direct3D11 and Videotoolbox.)
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index dfbe4ee0ba..13e364ae24 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -39,8 +39,7 @@
// 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)
+ enum mp_imgfmt hw_subfmt; // underlying format for some hwaccel pixfmts
int w, h; // image dimensions
int p_w, p_h; // define pixel aspect ratio (undefined: 0/0)
struct mp_colorspace color;