diff options
author | wm4 <wm4@nowhere> | 2014-04-14 20:19:44 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-04-14 20:51:27 +0200 |
commit | 186fd0311db32a24879669620fd6a2d8e32d2931 (patch) | |
tree | 87e4b2c22619799a231bce07312ce32f14f94658 /video/img_format.h | |
parent | a7c6c4656de1938729d27fb6f02b7e46a71c35fb (diff) | |
download | mpv-186fd0311db32a24879669620fd6a2d8e32d2931.tar.bz2 mpv-186fd0311db32a24879669620fd6a2d8e32d2931.tar.xz |
video: change image format names, prefer mostly FFmpeg names
The most user visible change is that "420p" is now displayed as
"yuv420p". This is what FFmpeg uses (almost), and is also less confusing
since "420p" is often confused with "420 pixels vertical resolution".
In general, we return the FFmpeg pixel format name. We still use our own
old mechanism to keep a list of exceptions to provide compatibility for
a while.
Also, never return NULL for image format names. If the format is unset
(0/IMGFMT_NONE), return "none". If the format has no name (probably
never happens, FFmpeg seems to guarantee that a name is set), return
"unknown".
Diffstat (limited to 'video/img_format.h')
-rw-r--r-- | video/img_format.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/video/img_format.h b/video/img_format.h index 9cf3a60f11..31c72f41be 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -332,17 +332,11 @@ static inline bool IMGFMT_IS_RGB(int fmt) #define IMGFMT_IS_HWACCEL(fmt) \ ((fmt) == IMGFMT_VDPAU || (fmt) == IMGFMT_VAAPI || (fmt) == IMGFMT_VDA) - -struct mp_imgfmt_entry { - const char *name; - int fmt; -}; - -extern struct mp_imgfmt_entry mp_imgfmt_list[]; - int mp_imgfmt_from_name(bstr name, bool allow_hwaccel); const char *mp_imgfmt_to_name(int fmt); +char **mp_imgfmt_name_list(void); + #define vo_format_name mp_imgfmt_to_name int mp_imgfmt_find_yuv_planar(int xs, int ys, int planes, int component_bits); |