summaryrefslogtreecommitdiffstats
path: root/fmt-conversion.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-16 02:39:58 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-02-16 02:39:58 +0200
commit0bf2bd91ec69dfd908d78557a17f38e0904a52e7 (patch)
treebf9e5e145ff802e7b5ff7b9ab387bfc3ba0331d7 /fmt-conversion.h
parent738f66b1bc98073d74af7031c4454322157a15ec (diff)
parenteacf4421f4fe16674aefe8b628321188c4912521 (diff)
downloadmpv-0bf2bd91ec69dfd908d78557a17f38e0904a52e7.tar.bz2
mpv-0bf2bd91ec69dfd908d78557a17f38e0904a52e7.tar.xz
Merge svn changes up to r28610
Diffstat (limited to 'fmt-conversion.h')
-rw-r--r--fmt-conversion.h68
1 files changed, 2 insertions, 66 deletions
diff --git a/fmt-conversion.h b/fmt-conversion.h
index 13035cdea7..f1e44ffe2a 100644
--- a/fmt-conversion.h
+++ b/fmt-conversion.h
@@ -1,73 +1,9 @@
#ifndef MPLAYER_FMT_CONVERSION_H
#define MPLAYER_FMT_CONVERSION_H
-#include <stdio.h>
#include "libavutil/avutil.h"
-#include "libmpcodecs/img_format.h"
-enum PixelFormat imgfmt2pixfmt(int fmt)
-{
- switch (fmt) {
- case IMGFMT_BGR32:
- return PIX_FMT_RGB32;
- case IMGFMT_BGR24:
- return PIX_FMT_BGR24;
- case IMGFMT_BGR16:
- return PIX_FMT_RGB565;
- case IMGFMT_BGR15:
- return PIX_FMT_RGB555;
- case IMGFMT_BGR8:
- return PIX_FMT_RGB8;
- case IMGFMT_BGR4:
- return PIX_FMT_RGB4;
- case IMGFMT_BGR1:
- case IMGFMT_RGB1:
- return PIX_FMT_MONOBLACK;
- case IMGFMT_RG4B:
- return PIX_FMT_BGR4_BYTE;
- case IMGFMT_BG4B:
- return PIX_FMT_RGB4_BYTE;
- case IMGFMT_RGB32:
- return PIX_FMT_BGR32;
- case IMGFMT_RGB24:
- return PIX_FMT_RGB24;
- case IMGFMT_RGB16:
- return PIX_FMT_BGR565;
- case IMGFMT_RGB15:
- return PIX_FMT_BGR555;
- case IMGFMT_RGB8:
- return PIX_FMT_BGR8;
- case IMGFMT_RGB4:
- return PIX_FMT_BGR4;
- case IMGFMT_YUY2:
- return PIX_FMT_YUYV422;
- case IMGFMT_UYVY:
- return PIX_FMT_UYVY422;
- case IMGFMT_NV12:
- return PIX_FMT_NV12;
- case IMGFMT_NV21:
- return PIX_FMT_NV21;
- case IMGFMT_Y800:
- case IMGFMT_Y8:
- return PIX_FMT_GRAY8;
- case IMGFMT_IF09:
- case IMGFMT_YVU9:
- return PIX_FMT_YUV410P;
- case IMGFMT_I420:
- case IMGFMT_IYUV:
- case IMGFMT_YV12:
- return PIX_FMT_YUV420P;
- case IMGFMT_411P:
- return PIX_FMT_YUV411P;
- case IMGFMT_422P:
- return PIX_FMT_YUV422P;
- case IMGFMT_444P:
- return PIX_FMT_YUV444P;
- default:
- fprintf(stderr, "Unsupported format %s\n", vo_format_name(fmt));
- }
-
- return PIX_FMT_NONE;
-}
+enum PixelFormat imgfmt2pixfmt(int fmt);
+int pixfmt2imgfmt(enum PixelFormat pix_fmt);
#endif /* MPLAYER_FMT_CONVERSION_H */