summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
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.c
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.c')
-rw-r--r--video/mp_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index a4ce6d1cc5..531565f837 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -512,7 +512,7 @@ char *mp_image_params_to_str_buf(char *b, size_t bs,
mp_snprintf_cat(b, bs, " [%d:%d]", p->p_w, p->p_h);
mp_snprintf_cat(b, bs, " %s", mp_imgfmt_to_name(p->imgfmt));
if (p->hw_subfmt)
- mp_snprintf_cat(b, bs, "[%llu]", (unsigned long long)(p->hw_subfmt));
+ mp_snprintf_cat(b, bs, "[%s]", mp_imgfmt_to_name(p->hw_subfmt));
mp_snprintf_cat(b, bs, " %s/%s",
m_opt_choice_str(mp_csp_names, p->color.space),
m_opt_choice_str(mp_csp_levels_names, p->color.levels));