From add3df2001a2eadc41c47683f50fdc0fd8b14964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 15 Sep 2020 11:43:16 +0200 Subject: [PATCH] Consolidate fourcc.h Move the copy in hw/xfree86/common to include/, and remove the one in hw/kdrive/src/. Fixes DIX glamor code including an xfree86 DDX header. --- glamor/glamor_xv.c | 2 +- hw/kdrive/src/Makefile.am | 1 - hw/kdrive/src/fourcc.h | 132 ------------------------ hw/xfree86/common/Makefile.am | 3 +- hw/xfree86/common/meson.build | 1 - hw/xfree86/sdksyms.sh | 2 +- include/Makefile.am | 1 + {hw/xfree86/common => include}/fourcc.h | 0 include/meson.build | 1 + 9 files changed, 5 insertions(+), 138 deletions(-) delete mode 100644 hw/kdrive/src/fourcc.h rename {hw/xfree86/common => include}/fourcc.h (100%) diff --git a/glamor/glamor_xv.c b/glamor/glamor_xv.c index 6fef6ed0d..dbb490599 100644 --- a/glamor/glamor_xv.c +++ b/glamor/glamor_xv.c @@ -41,7 +41,7 @@ #include "glamor_transfer.h" #include -#include "../hw/xfree86/common/fourcc.h" +#include /* Reference color space transform data */ typedef struct tagREF_TRANSFORM { float RefLuma; diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am index 08331502f..13ab6847a 100644 --- a/hw/kdrive/src/Makefile.am +++ b/hw/kdrive/src/Makefile.am @@ -13,7 +13,6 @@ KDRIVE_XV_SOURCES = \ endif libkdrive_la_SOURCES = \ - fourcc.h \ kcmap.c \ kdrive.c \ kdrive.h \ diff --git a/hw/kdrive/src/fourcc.h b/hw/kdrive/src/fourcc.h deleted file mode 100644 index 534ec452f..000000000 --- a/hw/kdrive/src/fourcc.h +++ /dev/null @@ -1,132 +0,0 @@ - -/* - This header file contains listings of STANDARD guids for video formats. - Please do not place non-registered, or incomplete entries in this file. - A list of some popular fourcc's are at: http://www.webartz.com/fourcc/ - For an explanation of fourcc <-> guid mappings see RFC2361. -*/ - -#ifndef _XF86_FOURCC_H_ -#define _XF86_FOURCC_H_ 1 - -#define FOURCC_YUY2 0x32595559 -#define XVIMAGE_YUY2 \ - { \ - FOURCC_YUY2, \ - XvYUV, \ - LSBFirst, \ - {'Y','U','Y','2', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 16, \ - XvPacked, \ - 1, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 2, 2, \ - 1, 1, 1, \ - {'Y','U','Y','V', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#define FOURCC_YV12 0x32315659 -#define XVIMAGE_YV12 \ - { \ - FOURCC_YV12, \ - XvYUV, \ - LSBFirst, \ - {'Y','V','1','2', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 12, \ - XvPlanar, \ - 3, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 2, 2, \ - 1, 2, 2, \ - {'Y','V','U', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#define FOURCC_I420 0x30323449 -#define XVIMAGE_I420 \ - { \ - FOURCC_I420, \ - XvYUV, \ - LSBFirst, \ - {'I','4','2','0', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 12, \ - XvPlanar, \ - 3, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 2, 2, \ - 1, 2, 2, \ - {'Y','U','V', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#define FOURCC_UYVY 0x59565955 -#define XVIMAGE_UYVY \ - { \ - FOURCC_UYVY, \ - XvYUV, \ - LSBFirst, \ - {'U','Y','V','Y', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 16, \ - XvPacked, \ - 1, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 2, 2, \ - 1, 1, 1, \ - {'U','Y','V','Y', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#define FOURCC_IA44 0x34344149 -#define XVIMAGE_IA44 \ - { \ - FOURCC_IA44, \ - XvYUV, \ - LSBFirst, \ - {'I','A','4','4', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 8, \ - XvPacked, \ - 1, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 1, 1, \ - 1, 1, 1, \ - {'A','I', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#define FOURCC_AI44 0x34344941 -#define XVIMAGE_AI44 \ - { \ - FOURCC_AI44, \ - XvYUV, \ - LSBFirst, \ - {'A','I','4','4', \ - 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ - 8, \ - XvPacked, \ - 1, \ - 0, 0, 0, 0, \ - 8, 8, 8, \ - 1, 1, 1, \ - 1, 1, 1, \ - {'I','A', \ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ - XvTopToBottom \ - } - -#endif /* _XF86_FOURCC_H_ */ diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am index 5d344584d..39c1e90f0 100644 --- a/hw/xfree86/common/Makefile.am +++ b/hw/xfree86/common/Makefile.am @@ -55,7 +55,7 @@ AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \ -I$(top_builddir) -sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ +sdk_HEADERS = compiler.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h \ xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ $(XVSDKINCS) $(XF86VMODE_SDK) $(DGA_SDK) xorgVersion.h \ @@ -67,7 +67,6 @@ CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ compiler.h \ - fourcc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ diff --git a/hw/xfree86/common/meson.build b/hw/xfree86/common/meson.build index a59aeb98f..8f68556d8 100644 --- a/hw/xfree86/common/meson.build +++ b/hw/xfree86/common/meson.build @@ -26,7 +26,6 @@ srcs_xorg_common = [ xorg_sdk_headers = [ 'compiler.h', - 'fourcc.h', 'xf86.h', 'xf86Module.h', 'xf86Opt.h', diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh index 4a13ca28d..5fd5b5c2f 100755 --- a/hw/xfree86/sdksyms.sh +++ b/hw/xfree86/sdksyms.sh @@ -123,7 +123,6 @@ cat > sdksyms.c << EOF /* hw/xfree86/common/Makefile.am */ #include "compiler.h" -#include "fourcc.h" #include "xf86.h" #include "xf86Module.h" #include "xf86Opt.h" @@ -251,6 +250,7 @@ cat > sdksyms.c << EOF #include "exevents.h" #include "extension.h" #include "extnsionst.h" +#include "fourcc.h" #include "gc.h" #include "gcstruct.h" #include "globals.h" diff --git a/include/Makefile.am b/include/Makefile.am index bf066a61a..a1f241263 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -23,6 +23,7 @@ sdk_HEADERS = \ extension.h \ extinit.h \ extnsionst.h \ + fourcc.h \ gc.h \ gcstruct.h \ globals.h \ diff --git a/hw/xfree86/common/fourcc.h b/include/fourcc.h similarity index 100% rename from hw/xfree86/common/fourcc.h rename to include/fourcc.h diff --git a/include/meson.build b/include/meson.build index 0b89499c0..14f2be777 100644 --- a/include/meson.build +++ b/include/meson.build @@ -445,6 +445,7 @@ if build_xorg 'extension.h', 'extinit.h', 'extnsionst.h', + 'fourcc.h', 'gc.h', 'gcstruct.h', 'globals.h',