summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-18 15:00:36 +0200
committerwm4 <wm4@nowhere>2017-06-18 15:13:45 +0200
commitb6d0b57e8531c2cacb237e2144e858cfdbf1eb32 (patch)
treec339318aa6acb18c841013ce639389d43ca44c66 /video/out
parent32833fa3d14b78cd2a481641cfa174d4bee6533e (diff)
downloadmpv-b6d0b57e8531c2cacb237e2144e858cfdbf1eb32.tar.bz2
mpv-b6d0b57e8531c2cacb237e2144e858cfdbf1eb32.tar.xz
Drop/move img_fourcc.h
This file is an leftover from when img_format.h was changed from using the ancient FourCCs (based on Microsoft multimedia conventions) for pixel formats to a simple enum. The remaining cases still inherently used FourCCs for whatever reasons. Instead of worrying about residual copyrights in this file, just move it into code we don't want to relicense (the ancient Linux TV code). We have to fix some other code depending on it. For the most part, we just replace the MP_FOURCC macro with libavutil's MKTAG (although the macro definition is exactly the same). In demux_raw, we drop some pre-defined FourCCs, but it's not like it matters. (Instead of --demuxer-rawvideo-format use --demuxer-rawvideo-mp-format.)
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/hwdec_vaegl.c10
-rw-r--r--video/out/vo_xv.c9
2 files changed, 13 insertions, 6 deletions
diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c
index 548d3678f3..0d2f1b1a17 100644
--- a/video/out/opengl/hwdec_vaegl.c
+++ b/video/out/opengl/hwdec_vaegl.c
@@ -24,6 +24,7 @@
#include <va/va_drmcommon.h>
+#include <libavutil/common.h>
#include <libavutil/hwcontext.h>
#include <libavutil/hwcontext_vaapi.h>
@@ -31,7 +32,6 @@
#include "hwdec.h"
#include "video/vaapi.h"
-#include "video/img_fourcc.h"
#include "video/mp_image_pool.h"
#include "common.h"
#include "formats.h"
@@ -325,13 +325,13 @@ static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image,
int drm_fmts[8] = {
// 1 bytes per component, 1-4 components
- MP_FOURCC('R', '8', ' ', ' '), // DRM_FORMAT_R8
- MP_FOURCC('G', 'R', '8', '8'), // DRM_FORMAT_GR88
+ MKTAG('R', '8', ' ', ' '), // DRM_FORMAT_R8
+ MKTAG('G', 'R', '8', '8'), // DRM_FORMAT_GR88
0, // untested (DRM_FORMAT_RGB888?)
0, // untested (DRM_FORMAT_RGBA8888?)
// 2 bytes per component, 1-4 components
- MP_FOURCC('R', '1', '6', ' '), // proposed DRM_FORMAT_R16
- MP_FOURCC('G', 'R', '3', '2'), // proposed DRM_FORMAT_GR32
+ MKTAG('R', '1', '6', ' '), // proposed DRM_FORMAT_R16
+ MKTAG('G', 'R', '3', '2'), // proposed DRM_FORMAT_GR32
0, // N/A
0, // N/A
};
diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c
index a866266f89..0af6f436be 100644
--- a/video/out/vo_xv.c
+++ b/video/out/vo_xv.c
@@ -46,7 +46,6 @@
#include "common/msg.h"
#include "vo.h"
#include "video/mp_image.h"
-#include "video/img_fourcc.h"
#include "x11_common.h"
#include "sub/osd.h"
#include "sub/draw_bmp.h"
@@ -99,6 +98,14 @@ struct xvctx {
#endif
};
+#define MP_FOURCC(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((unsigned)(d)<<24))
+
+#define MP_FOURCC_YV12 MP_FOURCC('Y', 'V', '1', '2')
+#define MP_FOURCC_I420 MP_FOURCC('I', '4', '2', '0')
+#define MP_FOURCC_IYUV MP_FOURCC('I', 'Y', 'U', 'V')
+#define MP_FOURCC_UYVY MP_FOURCC('U', 'Y', 'V', 'Y')
+#define MP_FOURCC_YUY2 MP_FOURCC('Y', 'U', 'Y', '2')
+
struct fmt_entry {
int imgfmt;
int fourcc;