From 85488f68928ed40020e545b736118e0273e06cd1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 15 Jul 2016 11:54:44 +0200 Subject: 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.) --- video/mp_image.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/mp_image.h') 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; -- cgit v1.2.3