summaryrefslogtreecommitdiffstats
path: root/video/fmt-conversion.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-06 23:20:41 +0100
committerwm4 <wm4@nowhere>2015-02-06 23:22:16 +0100
commitbe5994a7818a63e16d78ed4817eb1ac490869bfe (patch)
treea6322d3e942bd945b32a1310aaa35a7fa2c0c116 /video/fmt-conversion.c
parent5de29b860b25bb4ba8b1e02d9b3aee7a81009be0 (diff)
downloadmpv-be5994a7818a63e16d78ed4817eb1ac490869bfe.tar.bz2
mpv-be5994a7818a63e16d78ed4817eb1ac490869bfe.tar.xz
video: work around libswscale for PNG pixel formats
The intention is that we can test vo_opengl with high bit depth PNGs better. This throws libswscale completely out of the loop, which before was needed in order to convert from big endian to little endian. Also apply a minimal cleanup to fmt-conversion.c (unrelated).
Diffstat (limited to 'video/fmt-conversion.c')
-rw-r--r--video/fmt-conversion.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c
index dc278054f3..9ed9777736 100644
--- a/video/fmt-conversion.c
+++ b/video/fmt-conversion.c
@@ -88,29 +88,30 @@ static const struct {
{IMGFMT_XYZ12, AV_PIX_FMT_XYZ12},
- // ffmpeg only
-#if LIBAVUTIL_VERSION_MICRO >= 100
+#ifdef AV_PIX_FMT_YUV420P12
{IMGFMT_420P12, AV_PIX_FMT_YUV420P12},
{IMGFMT_420P14, AV_PIX_FMT_YUV420P14},
{IMGFMT_422P12, AV_PIX_FMT_YUV422P12},
{IMGFMT_422P14, AV_PIX_FMT_YUV422P14},
{IMGFMT_444P12, AV_PIX_FMT_YUV444P12},
{IMGFMT_444P14, AV_PIX_FMT_YUV444P14},
+#endif
+#ifdef AV_PIX_FMT_RGBA64
{IMGFMT_RGBA64, AV_PIX_FMT_RGBA64},
{IMGFMT_BGRA64, AV_PIX_FMT_BGRA64},
+#endif
+#if LIBAVUTIL_VERSION_MICRO >= 100
{IMGFMT_BGR0, AV_PIX_FMT_BGR0},
{IMGFMT_0RGB, AV_PIX_FMT_0RGB},
{IMGFMT_RGB0, AV_PIX_FMT_RGB0},
{IMGFMT_0BGR, AV_PIX_FMT_0BGR},
- {IMGFMT_BGR0, AV_PIX_FMT_BGR0},
#else
{IMGFMT_BGR0, AV_PIX_FMT_BGRA},
{IMGFMT_0RGB, AV_PIX_FMT_ARGB},
{IMGFMT_RGB0, AV_PIX_FMT_RGBA},
{IMGFMT_0BGR, AV_PIX_FMT_ABGR},
- {IMGFMT_BGR0, AV_PIX_FMT_BGRA},
#endif
#ifdef AV_PIX_FMT_YA16