From be5994a7818a63e16d78ed4817eb1ac490869bfe Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 6 Feb 2015 23:20:41 +0100 Subject: 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). --- video/fmt-conversion.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'video/fmt-conversion.c') 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 -- cgit v1.2.3