diff options
author | Austin Yuan <shengquan.yuan@gmail.com> | 2010-03-24 10:43:53 +0800 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@gmail.com> | 2010-03-24 10:43:53 +0800 |
commit | 92e17d62fd6a9249906e284a28926010dc2c1639 (patch) | |
tree | d49e829d721dfe95bd71e446fc7ff93db6c2ccaf | |
parent | 5405c6ed5838af9294a17acc2140bffb2d282beb (diff) | |
parent | 11f69c8407d2d1ee68d9ca12f650a62a3b0bef64 (diff) |
Merge branch 'master' of git+ssh://AustinYuan@git.freedesktop.org/git/libva into sync-fdo-master20100324_5.3.0.0000
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | dummy_drv_video/Makefile.am | 6 | ||||
-rw-r--r-- | dummy_drv_video/dummy_drv_video.c | 3 | ||||
-rw-r--r-- | dummy_drv_video/dummy_drv_video.h | 2 | ||||
-rw-r--r-- | i965_drv_video/Makefile.am | 4 | ||||
-rw-r--r-- | i965_drv_video/i965_drv_video.c | 4 | ||||
-rw-r--r-- | i965_drv_video/i965_drv_video.h | 4 | ||||
-rw-r--r-- | i965_drv_video/i965_media.c | 2 | ||||
-rw-r--r-- | i965_drv_video/i965_media_mpeg2.c | 2 | ||||
-rw-r--r-- | i965_drv_video/i965_render.c | 5 | ||||
-rw-r--r-- | i965_drv_video/intel_batchbuffer.c | 3 | ||||
-rw-r--r-- | i965_drv_video/intel_driver.h | 2 | ||||
-rw-r--r-- | test/Makefile.am | 6 | ||||
-rw-r--r-- | test/basic/Makefile.am | 4 | ||||
-rw-r--r-- | test/basic/test.c | 4 | ||||
-rw-r--r-- | test/basic/test_common.c | 4 | ||||
-rw-r--r-- | test/decode/Makefile.am | 4 | ||||
-rw-r--r-- | test/decode/mpeg2vldemo.c | 4 | ||||
-rw-r--r-- | test/encode/Makefile.am | 4 | ||||
-rw-r--r-- | test/encode/h264encode.c | 40 | ||||
-rw-r--r-- | test/putsurface/Makefile.am | 6 | ||||
-rw-r--r-- | test/putsurface/putsurface.c | 6 | ||||
-rw-r--r-- | test/vainfo.c | 4 | ||||
-rw-r--r-- | va/Makefile.am (renamed from src/Makefile.am) | 5 | ||||
-rw-r--r-- | va/va.c (renamed from src/va.c) | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | va/va.h (renamed from src/va.h) | 20 | ||||
-rw-r--r-- | va/va_backend.h (renamed from src/va_backend.h) | 9 | ||||
-rw-r--r-- | va/va_version.h.in (renamed from src/va_version.h.in) | 0 | ||||
-rw-r--r-- | va/va_x11.h (renamed from src/x11/va_x11.h) | 20 | ||||
-rw-r--r-- | va/x11/Makefile.am (renamed from src/x11/Makefile.am) | 4 | ||||
-rw-r--r-- | va/x11/dri1_util.c (renamed from src/x11/dri1_util.c) | 0 | ||||
-rw-r--r-- | va/x11/dri2_util.c (renamed from src/x11/dri2_util.c) | 0 | ||||
-rw-r--r-- | va/x11/va_dri.c (renamed from src/x11/va_dri.c) | 0 | ||||
-rw-r--r-- | va/x11/va_dri.h (renamed from src/x11/va_dri.h) | 0 | ||||
-rw-r--r-- | va/x11/va_dri2.c (renamed from src/x11/va_dri2.c) | 0 | ||||
-rw-r--r-- | va/x11/va_dri2.h (renamed from src/x11/va_dri2.h) | 0 | ||||
-rw-r--r-- | va/x11/va_dri2str.h (renamed from src/x11/va_dri2str.h) | 0 | ||||
-rw-r--r-- | va/x11/va_dri2tokens.h (renamed from src/x11/va_dri2tokens.h) | 0 | ||||
-rw-r--r-- | va/x11/va_dricommon.c (renamed from src/x11/va_dricommon.c) | 0 | ||||
-rw-r--r-- | va/x11/va_dricommon.h (renamed from src/x11/va_dricommon.h) | 2 | ||||
-rw-r--r-- | va/x11/va_dristr.h (renamed from src/x11/va_dristr.h) | 0 | ||||
-rw-r--r-- | va/x11/va_nvctrl.c (renamed from src/x11/va_nvctrl.c) | 0 | ||||
-rw-r--r-- | va/x11/va_nvctrl.h (renamed from src/x11/va_nvctrl.h) | 0 | ||||
-rw-r--r-- | va/x11/va_x11.c (renamed from src/x11/va_x11.c) | 1 |
45 files changed, 96 insertions, 103 deletions
diff --git a/Makefile.am b/Makefile.am index 07385e6..459660b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = src test +SUBDIRS = va test if BUILD_DUMMY_DRIVER SUBDIRS += dummy_drv_video endif diff --git a/configure.ac b/configure.ac index 088415f..eedfe4c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/dummy_drv_video/Makefile.am b/dummy_drv_video/Makefile.am index 4e75a7b..8c1f40a 100644 --- a/dummy_drv_video/Makefile.am +++ b/dummy_drv_video/Makefile.am @@ -23,10 +23,10 @@ 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 diff --git a/dummy_drv_video/dummy_drv_video.c b/dummy_drv_video/dummy_drv_video.c index f617018..98561a9 100644 --- a/dummy_drv_video/dummy_drv_video.c +++ b/dummy_drv_video/dummy_drv_video.c @@ -22,12 +22,13 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "va_backend.h" +#include <va/va_backend.h> #include "dummy_drv_video.h" #include "assert.h" #include <stdio.h> +#include <stdlib.h> #include <string.h> #include <stdarg.h> diff --git a/dummy_drv_video/dummy_drv_video.h b/dummy_drv_video/dummy_drv_video.h index 3ebd60b..cd849c5 100644 --- a/dummy_drv_video/dummy_drv_video.h +++ b/dummy_drv_video/dummy_drv_video.h @@ -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 diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am index 42dd515..88b5590 100644 --- a/i965_drv_video/Makefile.am +++ b/i965_drv_video/Makefile.am @@ -22,12 +22,12 @@ 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)/va/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 \ diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c index 8f4bfc1..6a60ecc 100644 --- a/i965_drv_video/i965_drv_video.c +++ b/i965_drv_video/i965_drv_video.c @@ -27,11 +27,11 @@ * */ +#include <stdlib.h> #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" diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h index c95c799..fa09869 100644 --- a/i965_drv_video/i965_drv_video.h +++ b/i965_drv_video/i965_drv_video.h @@ -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" diff --git a/i965_drv_video/i965_media.c b/i965_drv_video/i965_media.c index f7d5846..82c5652 100644 --- a/i965_drv_video/i965_media.c +++ b/i965_drv_video/i965_media.c @@ -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" diff --git a/i965_drv_video/i965_media_mpeg2.c b/i965_drv_video/i965_media_mpeg2.c index 6a14e9e..83ee505 100644 --- a/i965_drv_video/i965_media_mpeg2.c +++ b/i965_drv_video/i965_media_mpeg2.c @@ -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" diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c index f3e89c2..4a4f041 100644 --- a/i965_drv_video/i965_render.c +++ b/i965_drv_video/i965_render.c @@ -32,11 +32,12 @@ */ #include <stdio.h> +#include <stdlib.h> #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" diff --git a/i965_drv_video/intel_batchbuffer.c b/i965_drv_video/intel_batchbuffer.c index 46c9496..9fabf6a 100644 --- a/i965_drv_video/intel_batchbuffer.c +++ b/i965_drv_video/intel_batchbuffer.c @@ -25,10 +25,11 @@ * **************************************************************************/ +#include <stdlib.h> #include <string.h> #include <assert.h> -#include "va_backend.h" +#include <va/va_backend.h> #include "intel_batchbuffer.h" diff --git a/i965_drv_video/intel_driver.h b/i965_drv_video/intel_driver.h index 84df0aa..9ab95b7 100644 --- a/i965_drv_video/intel_driver.h +++ b/i965_drv_video/intel_driver.h @@ -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__ diff --git a/test/Makefile.am b/test/Makefile.am index 5734226..d7e1b1f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -23,11 +23,11 @@ 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 diff --git a/test/basic/Makefile.am b/test/basic/Makefile.am index 24de161..49a54a0 100644 --- a/test/basic/Makefile.am +++ b/test/basic/Makefile.am @@ -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 diff --git a/test/basic/test.c b/test/basic/test.c index 2e98b12..a03a8b2 100644 --- a/test/basic/test.c +++ b/test/basic/test.c @@ -22,11 +22,7 @@ * 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> diff --git a/test/basic/test_common.c b/test/basic/test_common.c index 91774da..8287d1e 100644 --- a/test/basic/test_common.c +++ b/test/basic/test_common.c @@ -22,11 +22,7 @@ * 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> diff --git a/test/decode/Makefile.am b/test/decode/Makefile.am index 9283671..b100421 100644 --- a/test/decode/Makefile.am +++ b/test/decode/Makefile.am @@ -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 diff --git a/test/decode/mpeg2vldemo.c b/test/decode/mpeg2vldemo.c index d62f1c2..7057675 100644 --- a/test/decode/mpeg2vldemo.c +++ b/test/decode/mpeg2vldemo.c @@ -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) { \ diff --git a/test/encode/Makefile.am b/test/encode/Makefile.am index 6d2d5a9..5866666 100644 --- a/test/encode/Makefile.am +++ b/test/encode/Makefile.am @@ -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 diff --git a/test/encode/h264encode.c b/test/encode/h264encode.c index 46f1ff6..bb0cce9 100644 --- a/test/encode/h264encode.c +++ b/test/encode/h264encode.c @@ -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) { \ @@ -212,10 +211,11 @@ static int do_h264_encoding(void) VAEncPictureParameterBufferH264 pic_h264; VAEncSliceParameterBuffer slice_h264; VAStatus va_status; - VABufferID coded_buf, seq_param_buf, pic_param_buf, slice_param_buf; + VABufferID seq_param_buf, pic_param_buf, slice_param_buf; int codedbuf_size; VASurfaceStatus surface_status; int src_surface, dst_surface, ref_surface; + int codedbuf_idx = 0; int frame_skipped = 0; int i; @@ -229,12 +229,24 @@ static int do_h264_encoding(void) codedbuf_size = (frame_width * frame_height * 400) / (16*16); + for (i = 0; i < CODEDBUF_NUM; i++) { + /* create coded buffer once for all + * other VA buffers which won't be used again after vaRenderPicture. + * so APP can always vaCreateBuffer for every frame + * but coded buffer need to be mapped and accessed after vaRenderPicture/vaEndPicture + * so VA won't maintain the coded buffer + */ + va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType, + codedbuf_size, 1, NULL, &coded_buf[i]); + CHECK_VASTATUS(va_status,"vaBeginPicture"); + } + src_surface = 0; /* the last two frames are reference/reconstructed frame */ dst_surface = SURFACE_NUM - 1; ref_surface = SURFACE_NUM - 2; - for (i=0; i < frame_count; i++) { + for (i = 0; i < frame_count; i++) { va_status = vaBeginPicture(va_dpy, context_id, surface_id[src_surface]); CHECK_VASTATUS(va_status,"vaBeginPicture"); @@ -249,7 +261,7 @@ static int do_h264_encoding(void) seq_h264.frame_rate = frame_rate; seq_h264.initial_qp = initial_qp; seq_h264.min_qp = minimal_qp; - seq_h264.basic_unit_size = 6; + seq_h264.basic_unit_size = 0; seq_h264.intra_period = intra_count; va_status = vaCreateBuffer(va_dpy, context_id, @@ -261,12 +273,10 @@ static int do_h264_encoding(void) CHECK_VASTATUS(va_status,"vaRenderPicture");; } - va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType, - codedbuf_size, 1, NULL, &coded_buf); pic_h264.reference_picture = surface_id[ref_surface]; pic_h264.reconstructed_picture= surface_id[dst_surface]; - pic_h264.coded_buf = coded_buf; + pic_h264.coded_buf = coded_buf[codedbuf_idx]; pic_h264.picture_width = frame_width; pic_h264.picture_height = frame_height; pic_h264.last_picture = (i==frame_count); @@ -300,7 +310,7 @@ static int do_h264_encoding(void) va_status = vaQuerySurfaceStatus(va_dpy, surface_id[src_surface],&surface_status); frame_skipped = (surface_status & VASurfaceSkipped); - save_coded_buf(coded_buf, i, frame_skipped); + save_coded_buf(coded_buf[codedbuf_idx], i, frame_skipped); /* should display reconstructed frame, but just diplay source frame */ if (frame_display) { @@ -316,6 +326,11 @@ static int do_h264_encoding(void) if (src_surface == (SURFACE_NUM - 2)) src_surface = 0; + /* use next codedbuf */ + codedbuf_idx++; + if (codedbuf_idx == (CODEDBUF_NUM - 1)) + codedbuf_idx = 0; + /* if a frame is skipped, current frame still use last reference frame */ if (frame_skipped == 0) { /* swap ref/dst */ @@ -375,7 +390,8 @@ int main(int argc,char **argv) case '?': printf("./h264encode <options>\n"); printf(" -w -h: resolution\n"); - printf(" -n frame number\n"); + printf(" -n frame number\n"); + printf(" -d display the source frame\n"); printf(" -p P frame count between two I frames\n"); printf(" -f frame rate\n"); printf(" -r bit rate\n"); diff --git a/test/putsurface/Makefile.am b/test/putsurface/Makefile.am index 3e5c864..51edb25 100644 --- a/test/putsurface/Makefile.am +++ b/test/putsurface/Makefile.am @@ -22,13 +22,15 @@ 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) +TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) -lpthread putsurface_LDADD = $(TEST_LIBS) putsurface_SOURCES = putsurface.c +EXTRA_DIST = loadsurface.h + valgrind: $(bin_PROGRAMS) for a in $(bin_PROGRAMS); do \ diff --git a/test/putsurface/putsurface.c b/test/putsurface/putsurface.c index 335368a..0de786c 100644 --- a/test/putsurface/putsurface.c +++ b/test/putsurface/putsurface.c @@ -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> diff --git a/test/vainfo.c b/test/vainfo.c index 79ee055..33d6ea4 100644 --- a/test/vainfo.c +++ b/test/vainfo.c @@ -22,11 +22,7 @@ * 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> diff --git a/src/Makefile.am b/va/Makefile.am index 2f4210a..aeaf82f 100644 --- a/src/Makefile.am +++ b/va/Makefile.am @@ -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 @@ -23,21 +23,18 @@ */ #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" @@ -65,11 +65,7 @@ #ifndef _VA_H_ #define _VA_H_ -#ifdef IN_LIBVA -#include "va_version.h" -#else #include <va/va_version.h> -#endif #ifdef __cplusplus extern "C" { @@ -131,6 +127,22 @@ typedef int VAStatus; /* Return status type from functions */ #define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015 #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF +/* De-interlacing flags for vaPutSurface() */ +#define VA_FRAME_PICTURE 0x00000000 +#define VA_TOP_FIELD 0x00000001 +#define VA_BOTTOM_FIELD 0x00000002 + +/* + * Clears the drawable with background color. + * for hardware overlay based implementation this flag + * can be used to turn off the overlay + */ +#define VA_CLEAR_DRAWABLE 0x00000008 + +/* Color space conversion flags for vaPutSurface() */ +#define VA_SRC_BT601 0x00000010 +#define VA_SRC_BT709 0x00000020 + /* * Returns a short english description of error_status */ diff --git a/src/va_backend.h b/va/va_backend.h index d514ba0..ff86744 100644 --- a/src/va_backend.h +++ b/va/va_backend.h @@ -29,15 +29,8 @@ #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> diff --git a/src/va_version.h.in b/va/va_version.h.in index c9ea97a..c9ea97a 100644 --- a/src/va_version.h.in +++ b/va/va_version.h.in diff --git a/src/x11/va_x11.h b/va/va_x11.h index 2171ac6..c6f9670 100644 --- a/src/x11/va_x11.h +++ b/va/va_x11.h @@ -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 @@ -27,22 +23,6 @@ VADisplay vaGetDisplay ( * color space conversion and scaling to the destination * rectangle */ -/* de-interlacing flags for vaPutSurface */ -#define VA_FRAME_PICTURE 0x00000000 -#define VA_TOP_FIELD 0x00000001 -#define VA_BOTTOM_FIELD 0x00000002 - -/* - * clears the drawable with background color. - * for hardware overlay based implementation this flag - * can be used to turn off the overlay - */ -#define VA_CLEAR_DRAWABLE 0x00000008 - -/* color space conversion flags for vaPutSurface */ -#define VA_SRC_BT601 0x00000010 -#define VA_SRC_BT709 0x00000020 - VAStatus vaPutSurface ( VADisplay dpy, VASurfaceID surface, diff --git a/src/x11/Makefile.am b/va/x11/Makefile.am index c70380d..40346f1 100644 --- a/src/x11/Makefile.am +++ b/va/x11/Makefile.am @@ -18,12 +18,12 @@ # 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 diff --git a/src/x11/dri1_util.c b/va/x11/dri1_util.c index 3e67e2a..3e67e2a 100644 --- a/src/x11/dri1_util.c +++ b/va/x11/dri1_util.c diff --git a/src/x11/dri2_util.c b/va/x11/dri2_util.c index ebe7a2c..ebe7a2c 100644 --- a/src/x11/dri2_util.c +++ b/va/x11/dri2_util.c diff --git a/src/x11/va_dri.c b/va/x11/va_dri.c index ce3b7cd..ce3b7cd 100644 --- a/src/x11/va_dri.c +++ b/va/x11/va_dri.c diff --git a/src/x11/va_dri.h b/va/x11/va_dri.h index 91f87a2..91f87a2 100644 --- a/src/x11/va_dri.h +++ b/va/x11/va_dri.h diff --git a/src/x11/va_dri2.c b/va/x11/va_dri2.c index c602bba..c602bba 100644 --- a/src/x11/va_dri2.c +++ b/va/x11/va_dri2.c diff --git a/src/x11/va_dri2.h b/va/x11/va_dri2.h index a26a839..a26a839 100644 --- a/src/x11/va_dri2.h +++ b/va/x11/va_dri2.h diff --git a/src/x11/va_dri2str.h b/va/x11/va_dri2str.h index dc3f2d1..dc3f2d1 100644 --- a/src/x11/va_dri2str.h +++ b/va/x11/va_dri2str.h diff --git a/src/x11/va_dri2tokens.h b/va/x11/va_dri2tokens.h index 087159f..087159f 100644 --- a/src/x11/va_dri2tokens.h +++ b/va/x11/va_dri2tokens.h diff --git a/src/x11/va_dricommon.c b/va/x11/va_dricommon.c index f9c3dfd..f9c3dfd 100644 --- a/src/x11/va_dricommon.c +++ b/va/x11/va_dricommon.c diff --git a/src/x11/va_dricommon.h b/va/x11/va_dricommon.h index a2a51a6..b762bd0 100644 --- a/src/x11/va_dricommon.h +++ b/va/x11/va_dricommon.h @@ -7,7 +7,7 @@ #include <drm.h> #include <drm_sarea.h> -#include "va_backend.h" +#include <va/va_backend.h> enum { diff --git a/src/x11/va_dristr.h b/va/x11/va_dristr.h index 3e391de..3e391de 100644 --- a/src/x11/va_dristr.h +++ b/va/x11/va_dristr.h diff --git a/src/x11/va_nvctrl.c b/va/x11/va_nvctrl.c index b14db47..b14db47 100644 --- a/src/x11/va_nvctrl.c +++ b/va/x11/va_nvctrl.c diff --git a/src/x11/va_nvctrl.h b/va/x11/va_nvctrl.h index c137b86..c137b86 100644 --- a/src/x11/va_nvctrl.h +++ b/va/x11/va_nvctrl.h diff --git a/src/x11/va_x11.c b/va/x11/va_x11.c index 3e85ba3..29e81c8 100644 --- a/src/x11/va_x11.c +++ b/va/x11/va_x11.c @@ -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> |