Remove IN_LIBVA defines, Thanks for the patch from Gwenole
authorAustin Yuan <shengquan.yuan@gmail.com>
Mon, 8 Mar 2010 05:36:15 +0000 (13:36 +0800)
committerAustin Yuan <shengquan.yuan@gmail.com>
Mon, 8 Mar 2010 05:36:15 +0000 (13:36 +0800)
Signed-off-by: Austin Yuan <shengquan.yuan@gmail.com>
45 files changed:
Makefile.am
configure.ac
dummy_drv_video/Makefile.am
dummy_drv_video/dummy_drv_video.c
dummy_drv_video/dummy_drv_video.h
i965_drv_video/Makefile.am
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.h
i965_drv_video/i965_media.c
i965_drv_video/i965_media_mpeg2.c
i965_drv_video/i965_render.c
i965_drv_video/intel_batchbuffer.c
i965_drv_video/intel_driver.h
test/Makefile.am
test/basic/Makefile.am
test/basic/test.c
test/basic/test_common.c
test/decode/Makefile.am
test/decode/mpeg2vldemo.c
test/encode/Makefile.am
test/encode/h264encode.c
test/putsurface/Makefile.am
test/putsurface/putsurface.c
test/vainfo.c
va/Makefile.am [moved from src/Makefile.am with 94% similarity]
va/va.c [moved from src/va.c with 99% similarity]
va/va.h [moved from src/va.h with 99% similarity, mode: 0644]
va/va_backend.h [moved from src/va_backend.h with 99% similarity]
va/va_version.h.in [moved from src/va_version.h.in with 100% similarity]
va/va_x11.h [moved from src/x11/va_x11.h with 97% similarity]
va/x11/Makefile.am [moved from src/x11/Makefile.am with 91% similarity]
va/x11/dri1_util.c [moved from src/x11/dri1_util.c with 100% similarity]
va/x11/dri2_util.c [moved from src/x11/dri2_util.c with 100% similarity]
va/x11/va_dri.c [moved from src/x11/va_dri.c with 100% similarity]
va/x11/va_dri.h [moved from src/x11/va_dri.h with 100% similarity]
va/x11/va_dri2.c [moved from src/x11/va_dri2.c with 100% similarity]
va/x11/va_dri2.h [moved from src/x11/va_dri2.h with 100% similarity]
va/x11/va_dri2str.h [moved from src/x11/va_dri2str.h with 100% similarity]
va/x11/va_dri2tokens.h [moved from src/x11/va_dri2tokens.h with 100% similarity]
va/x11/va_dricommon.c [moved from src/x11/va_dricommon.c with 100% similarity]
va/x11/va_dricommon.h [moved from src/x11/va_dricommon.h with 98% similarity]
va/x11/va_dristr.h [moved from src/x11/va_dristr.h with 100% similarity]
va/x11/va_nvctrl.c [moved from src/x11/va_nvctrl.c with 100% similarity]
va/x11/va_nvctrl.h [moved from src/x11/va_nvctrl.h with 100% similarity]
va/x11/va_x11.c [moved from src/x11/va_x11.c with 99% similarity]

index 07385e6..459660b 100644 (file)
@@ -22,7 +22,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = src test
+SUBDIRS = va test
 if BUILD_DUMMY_DRIVER
 SUBDIRS += dummy_drv_video
 endif
index 088415f..eedfe4c 100644 (file)
@@ -116,9 +116,9 @@ AC_SUBST([libvabackendlib])
 
 AC_OUTPUT([
        Makefile
-       src/Makefile
-       src/va_version.h
-       src/x11/Makefile
+       va/Makefile
+       va/va_version.h
+       va/x11/Makefile
        dummy_drv_video/Makefile
        i965_drv_video/Makefile
        i965_drv_video/shaders/Makefile
index 4e75a7b..8c1f40a 100644 (file)
 dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la
 dummy_drv_video_ladir = @LIBVA_DRIVERS_PATH@
 dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined
-dummy_drv_video_la_LIBADD = $(top_srcdir)/src/$(libvabackendlib)
-dummy_drv_video_la_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib)
+dummy_drv_video_la_LIBADD = $(top_srcdir)/va/$(libvabackendlib)
+dummy_drv_video_la_DEPENDENCIES = $(top_srcdir)/va/$(libvabackendlib)
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd
 dummy_drv_video_la_SOURCES = dummy_drv_video.c object_heap.c
 
 noinst_HEADERS = dummy_drv_video.h object_heap.h
index f617018..1957f62 100644 (file)
@@ -22,7 +22,7 @@
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 #include "dummy_drv_video.h"
 
index 3ebd60b..cd849c5 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef _DUMMY_DRV_VIDEO_H_
 #define _DUMMY_DRV_VIDEO_H_
 
-#include "va.h"
+#include <va/va.h>
 #include "object_heap.h"
 
 #define DUMMY_MAX_PROFILES                     11
index 42dd515..0a36fa8 100644 (file)
 
 SUBDIRS = shaders
 
-AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_LIBVA
+AM_CFLAGS = -Wall -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 @DRM_CFLAGS@
 
 i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
 i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
 i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
-i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread
+i965_drv_video_la_LIBADD = ../va/libva-x11.la -lpthread
 
 i965_drv_video_la_SOURCES =    \
        object_heap.c           \
index 8f4bfc1..260a053 100644 (file)
@@ -30,8 +30,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "va_backend.h"
-#include "va_dricommon.h"
+#include "va/x11/va_dricommon.h"
 
 #include "intel_driver.h"
 #include "intel_memman.h"
index c95c799..fa09869 100644 (file)
@@ -30,7 +30,9 @@
 #ifndef _I965_DRV_VIDEO_H_
 #define _I965_DRV_VIDEO_H_
 
-#include "va.h"
+#include <va/va.h>
+#include <va/va_backend.h>
+
 #include "object_heap.h"
 
 #include "intel_driver.h"
index f7d5846..82c5652 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 #include "intel_batchbuffer.h"
 #include "intel_driver.h"
index 6a14e9e..83ee505 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 #include "intel_batchbuffer.h"
 #include "intel_driver.h"
index f3e89c2..6221c52 100644 (file)
@@ -35,8 +35,8 @@
 #include <string.h>
 #include <assert.h>
 
-#include "va_backend.h"
-#include "va_dricommon.h"
+#include <va/va_backend.h>
+#include "va/x11/va_dricommon.h"
 
 #include "intel_batchbuffer.h"
 #include "intel_driver.h"
index 46c9496..21e5719 100644 (file)
@@ -28,7 +28,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 #include "intel_batchbuffer.h"
 
index 84df0aa..9ab95b7 100644 (file)
@@ -9,7 +9,7 @@
 #include <i915_drm.h>
 #include <intel_bufmgr.h>
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 #if defined(__GNUC__)
 #define INLINE __inline__
index 5734226..d7e1b1f 100644 (file)
 
 bin_PROGRAMS = vainfo
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11 -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11
 
 
-vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib)
-vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib)
+vainfo_LDADD = $(top_srcdir)/va/$(libvabackendlib)
+vainfo_DEPENDENCIES = $(top_srcdir)/va/$(libvabackendlib)
 vainfo_SOURCES = vainfo.c
 
 SUBDIRS = basic decode encode putsurface
index 24de161..49a54a0 100644 (file)
@@ -23,9 +23,9 @@
 bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
                test_07 test_08 test_09 test_10 test_11
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
 
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
+TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib)
 
 test_01_LDADD = $(TEST_LIBS)
 test_01_SOURCES = test_01.c
index 2e98b12..a03a8b2 100644 (file)
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef IN_LIBVA
-#include <va_x11.h>
-#else
 #include <va/va_x11.h>
-#endif
 
 #include "assert.h"
 #include <stdarg.h>
index 91774da..8287d1e 100644 (file)
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef IN_LIBVA
-#include <va_x11.h>
-#else
 #include <va/va_x11.h>
-#endif
 
 #include "assert.h"
 #include <stdarg.h>
index 9283671..b100421 100644 (file)
@@ -22,9 +22,9 @@
 
 bin_PROGRAMS = mpeg2vldemo
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
 
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
+TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib)
 
 mpeg2vldemo_LDADD = $(TEST_LIBS)
 mpeg2vldemo_SOURCES = mpeg2vldemo.c
index d62f1c2..7057675 100644 (file)
@@ -47,8 +47,8 @@
 
 #include <assert.h>
 
-#include "va.h"
-#include "va_x11.h"
+#include <va/va.h>
+#include <va/va_x11.h>
 
 #define CHECK_VASTATUS(va_status,func)                                  \
 if (va_status != VA_STATUS_SUCCESS) {                                   \
index 6d2d5a9..5866666 100644 (file)
@@ -22,9 +22,9 @@
 
 bin_PROGRAMS = h264encode
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
 
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
+TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib)
 
 h264encode_LDADD = $(TEST_LIBS)
 h264encode_SOURCES = h264encode.c
index ca9f532..bb0cce9 100644 (file)
@@ -26,7 +26,7 @@
  * it is a real program to show how VAAPI encoding work,
  * It does H264 element stream level encoding on auto-generated YUV data
  *
- * gcc -o  h264encode  h264encode -lva -lva-x11 -I/usr/include/va
+ * gcc -o  h264encode  h264encode -lva -lva-x11
  * ./h264encode -w <width> -h <height> -n <frame_num>
  *
  */  
@@ -44,9 +44,8 @@
 
 #include <assert.h>
 
-#include "va.h"
-#include "va_x11.h"
-
+#include <va/va.h>
+#include <va/va_x11.h>
 
 #define CHECK_VASTATUS(va_status,func)                                  \
 if (va_status != VA_STATUS_SUCCESS) {                                   \
index b0e20ba..51edb25 100644 (file)
@@ -22,9 +22,9 @@
 
 bin_PROGRAMS = putsurface
 
-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA
+AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
 
-TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) -lpthread
+TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) -lpthread
 
 putsurface_LDADD = $(TEST_LIBS)
 putsurface_SOURCES = putsurface.c
index 335368a..0de786c 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 
-/* gcc -o putsurface putsurface.c -lva -lva-x11 -I/usr/include/va */
+/* gcc -o putsurface putsurface.c -lva -lva-x11 */
 
 #include <stdio.h>
 #include <string.h>
@@ -39,8 +39,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#include "va.h"
-#include "va_x11.h"
+#include <va/va.h>
+#include <va/va_x11.h>
 
 #include <assert.h>
 
index 79ee055..33d6ea4 100644 (file)
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-#ifdef IN_LIBVA
-#include <va_x11.h>
-#else
 #include <va/va_x11.h>
-#endif
 
 #include <stdarg.h>
 #include <stdio.h>
similarity index 94%
rename from src/Makefile.am
rename to va/Makefile.am
index 2f4210a..aeaf82f 100644 (file)
@@ -21,8 +21,7 @@
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 INCLUDES = \
-       $(LIBVA_CFLAGS) -I$(top_srcdir)/src/x11 \
-       -DIN_LIBVA \
+       $(LIBVA_CFLAGS) -I$(top_srcdir)/va/x11 \
        -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\""
 
 LDADD = \
@@ -46,7 +45,7 @@ SUBDIRS = x11
 libva_la_SOURCES = va.c
 
 libvaincludedir = ${includedir}/va
-libvainclude_HEADERS = va.h va_backend.h va_version.h
+libvainclude_HEADERS = va.h va_x11.h va_backend.h va_version.h
 
 DISTCLEANFILES = \
        va_version.h
similarity index 99%
rename from src/va.c
rename to va/va.c
index bc469a0..c8e036e 100644 (file)
--- a/src/va.c
+++ b/va/va.c
  */
 
 #define _GNU_SOURCE 1
+
 #include "va.h"
 #include "va_backend.h"
 
 #include <assert.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <dlfcn.h>
 #include <unistd.h>
 
-#include <linux/videodev2.h>
-#include "va_dri.h"
-#include "va_dri2.h"
-#include "va_dricommon.h"
-
 
 #define DRIVER_INIT_FUNC       "__vaDriverInit_0_31"
 
old mode 100755 (executable)
new mode 100644 (file)
similarity index 99%
rename from src/va.h
rename to va/va.h
index 0d4c853..02be829
--- a/src/va.h
+++ b/va/va.h
 #ifndef _VA_H_
 #define _VA_H_
 
-#ifdef IN_LIBVA
-#include "va_version.h"
-#else
 #include <va/va_version.h>
-#endif
 
 #ifdef __cplusplus
 extern "C" {
similarity index 99%
rename from src/va_backend.h
rename to va/va_backend.h
index d514ba0..c7ae5a1 100644 (file)
 #ifndef _VA_BACKEND_H_
 #define _VA_BACKEND_H_
 
-#ifdef IN_LIBVA
-#include "va.h"
-#include "x11/va_x11.h"
-#else
 #include <va/va.h>
 #include <va/va_x11.h>
-#endif
 
-#include <stdlib.h>
+#include <X11/Xlib.h>
 #include <linux/videodev2.h>
 
 
similarity index 100%
rename from src/va_version.h.in
rename to va/va_version.h.in
similarity index 97%
rename from src/x11/va_x11.h
rename to va/va_x11.h
index 2171ac6..3f0a1d6 100644 (file)
@@ -1,11 +1,7 @@
 #ifndef _VA_X11_H_
 #define _VA_X11_H_
 
-#ifdef IN_LIBVA
-#include "va.h"
-#else
 #include <va/va.h>
-#endif
 #include <X11/Xlib.h>
 
 #ifdef __cplusplus
similarity index 91%
rename from src/x11/Makefile.am
rename to va/x11/Makefile.am
index c70380d..40346f1 100644 (file)
 # otherwise. Any license under such intellectual property rights must be
 # express and approved by Intel in writing.
 
-AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src $(DRM_CFLAGS)
+AM_CFLAGS = -DLINUX -I$(top_srcdir)/va $(DRM_CFLAGS)
 
 noinst_LTLIBRARIES = libva_x11.la      
 
 libva_x11includedir = ${includedir}/va
-libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h
+libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h
 
 libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c
 
similarity index 100%
rename from src/x11/dri1_util.c
rename to va/x11/dri1_util.c
similarity index 100%
rename from src/x11/dri2_util.c
rename to va/x11/dri2_util.c
similarity index 100%
rename from src/x11/va_dri.c
rename to va/x11/va_dri.c
similarity index 100%
rename from src/x11/va_dri.h
rename to va/x11/va_dri.h
similarity index 100%
rename from src/x11/va_dri2.c
rename to va/x11/va_dri2.c
similarity index 100%
rename from src/x11/va_dri2.h
rename to va/x11/va_dri2.h
similarity index 100%
rename from src/x11/va_dri2str.h
rename to va/x11/va_dri2str.h
similarity index 100%
rename from src/x11/va_dricommon.c
rename to va/x11/va_dricommon.c
similarity index 98%
rename from src/x11/va_dricommon.h
rename to va/x11/va_dricommon.h
index a2a51a6..b762bd0 100644 (file)
@@ -7,7 +7,7 @@
 #include <drm.h>
 #include <drm_sarea.h>
 
-#include "va_backend.h"
+#include <va/va_backend.h>
 
 enum
 {
similarity index 100%
rename from src/x11/va_dristr.h
rename to va/x11/va_dristr.h
similarity index 100%
rename from src/x11/va_nvctrl.c
rename to va/x11/va_nvctrl.c
similarity index 100%
rename from src/x11/va_nvctrl.h
rename to va/x11/va_nvctrl.h
similarity index 99%
rename from src/x11/va_x11.c
rename to va/x11/va_x11.c
index 3e85ba3..29e81c8 100644 (file)
@@ -32,6 +32,7 @@
 #include "va_dricommon.h"
 #include "va_nvctrl.h"
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
 #include <unistd.h>