hardware/intel/common/libva
Revision | 92e17d62fd6a9249906e284a28926010dc2c1639 (tree) |
---|---|
Time | 2010-03-24 11:43:53 |
Author | Austin Yuan <shengquan.yuan@gmai...> |
Commiter | Austin Yuan |
Merge branch 'master' of git+ssh://AustinYuan@git.freedesktop.org/git/libva into sync-fdo-master
@@ -22,7 +22,7 @@ | ||
22 | 22 | |
23 | 23 | AUTOMAKE_OPTIONS = foreign |
24 | 24 | |
25 | -SUBDIRS = src test | |
25 | +SUBDIRS = va test | |
26 | 26 | if BUILD_DUMMY_DRIVER |
27 | 27 | SUBDIRS += dummy_drv_video |
28 | 28 | endif |
@@ -116,9 +116,9 @@ AC_SUBST([libvabackendlib]) | ||
116 | 116 | |
117 | 117 | AC_OUTPUT([ |
118 | 118 | Makefile |
119 | - src/Makefile | |
120 | - src/va_version.h | |
121 | - src/x11/Makefile | |
119 | + va/Makefile | |
120 | + va/va_version.h | |
121 | + va/x11/Makefile | |
122 | 122 | dummy_drv_video/Makefile |
123 | 123 | i965_drv_video/Makefile |
124 | 124 | i965_drv_video/shaders/Makefile |
@@ -23,10 +23,10 @@ | ||
23 | 23 | dummy_drv_video_la_LTLIBRARIES = dummy_drv_video.la |
24 | 24 | dummy_drv_video_ladir = @LIBVA_DRIVERS_PATH@ |
25 | 25 | dummy_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined |
26 | -dummy_drv_video_la_LIBADD = $(top_srcdir)/src/$(libvabackendlib) | |
27 | -dummy_drv_video_la_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib) | |
26 | +dummy_drv_video_la_LIBADD = $(top_srcdir)/va/$(libvabackendlib) | |
27 | +dummy_drv_video_la_DEPENDENCIES = $(top_srcdir)/va/$(libvabackendlib) | |
28 | 28 | |
29 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd -DIN_LIBVA | |
29 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/../../include/kmd | |
30 | 30 | dummy_drv_video_la_SOURCES = dummy_drv_video.c object_heap.c |
31 | 31 | |
32 | 32 | noinst_HEADERS = dummy_drv_video.h object_heap.h |
@@ -22,12 +22,13 @@ | ||
22 | 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 | 23 | */ |
24 | 24 | |
25 | -#include "va_backend.h" | |
25 | +#include <va/va_backend.h> | |
26 | 26 | |
27 | 27 | #include "dummy_drv_video.h" |
28 | 28 | |
29 | 29 | #include "assert.h" |
30 | 30 | #include <stdio.h> |
31 | +#include <stdlib.h> | |
31 | 32 | #include <string.h> |
32 | 33 | #include <stdarg.h> |
33 | 34 |
@@ -25,7 +25,7 @@ | ||
25 | 25 | #ifndef _DUMMY_DRV_VIDEO_H_ |
26 | 26 | #define _DUMMY_DRV_VIDEO_H_ |
27 | 27 | |
28 | -#include "va.h" | |
28 | +#include <va/va.h> | |
29 | 29 | #include "object_heap.h" |
30 | 30 | |
31 | 31 | #define DUMMY_MAX_PROFILES 11 |
@@ -22,12 +22,12 @@ | ||
22 | 22 | |
23 | 23 | SUBDIRS = shaders |
24 | 24 | |
25 | -AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_LIBVA | |
25 | +AM_CFLAGS = -Wall -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@ | |
26 | 26 | |
27 | 27 | i965_drv_video_la_LTLIBRARIES = i965_drv_video.la |
28 | 28 | i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@ |
29 | 29 | i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel |
30 | -i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread | |
30 | +i965_drv_video_la_LIBADD = ../va/libva-x11.la -lpthread | |
31 | 31 | |
32 | 32 | i965_drv_video_la_SOURCES = \ |
33 | 33 | object_heap.c \ |
@@ -27,11 +27,11 @@ | ||
27 | 27 | * |
28 | 28 | */ |
29 | 29 | |
30 | +#include <stdlib.h> | |
30 | 31 | #include <string.h> |
31 | 32 | #include <assert.h> |
32 | 33 | |
33 | -#include "va_backend.h" | |
34 | -#include "va_dricommon.h" | |
34 | +#include "va/x11/va_dricommon.h" | |
35 | 35 | |
36 | 36 | #include "intel_driver.h" |
37 | 37 | #include "intel_memman.h" |
@@ -30,7 +30,9 @@ | ||
30 | 30 | #ifndef _I965_DRV_VIDEO_H_ |
31 | 31 | #define _I965_DRV_VIDEO_H_ |
32 | 32 | |
33 | -#include "va.h" | |
33 | +#include <va/va.h> | |
34 | +#include <va/va_backend.h> | |
35 | + | |
34 | 36 | #include "object_heap.h" |
35 | 37 | |
36 | 38 | #include "intel_driver.h" |
@@ -31,7 +31,7 @@ | ||
31 | 31 | #include <string.h> |
32 | 32 | #include <assert.h> |
33 | 33 | |
34 | -#include "va_backend.h" | |
34 | +#include <va/va_backend.h> | |
35 | 35 | |
36 | 36 | #include "intel_batchbuffer.h" |
37 | 37 | #include "intel_driver.h" |
@@ -31,7 +31,7 @@ | ||
31 | 31 | #include <string.h> |
32 | 32 | #include <assert.h> |
33 | 33 | |
34 | -#include "va_backend.h" | |
34 | +#include <va/va_backend.h> | |
35 | 35 | |
36 | 36 | #include "intel_batchbuffer.h" |
37 | 37 | #include "intel_driver.h" |
@@ -32,11 +32,12 @@ | ||
32 | 32 | */ |
33 | 33 | |
34 | 34 | #include <stdio.h> |
35 | +#include <stdlib.h> | |
35 | 36 | #include <string.h> |
36 | 37 | #include <assert.h> |
37 | 38 | |
38 | -#include "va_backend.h" | |
39 | -#include "va_dricommon.h" | |
39 | +#include <va/va_backend.h> | |
40 | +#include "va/x11/va_dricommon.h" | |
40 | 41 | |
41 | 42 | #include "intel_batchbuffer.h" |
42 | 43 | #include "intel_driver.h" |
@@ -25,10 +25,11 @@ | ||
25 | 25 | * |
26 | 26 | **************************************************************************/ |
27 | 27 | |
28 | +#include <stdlib.h> | |
28 | 29 | #include <string.h> |
29 | 30 | #include <assert.h> |
30 | 31 | |
31 | -#include "va_backend.h" | |
32 | +#include <va/va_backend.h> | |
32 | 33 | |
33 | 34 | #include "intel_batchbuffer.h" |
34 | 35 |
@@ -9,7 +9,7 @@ | ||
9 | 9 | #include <i915_drm.h> |
10 | 10 | #include <intel_bufmgr.h> |
11 | 11 | |
12 | -#include "va_backend.h" | |
12 | +#include <va/va_backend.h> | |
13 | 13 | |
14 | 14 | #if defined(__GNUC__) |
15 | 15 | #define INLINE __inline__ |
@@ -23,11 +23,11 @@ | ||
23 | 23 | |
24 | 24 | bin_PROGRAMS = vainfo |
25 | 25 | |
26 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11 -DIN_LIBVA | |
26 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/test/basic -I$(top_srcdir)/src/x11 | |
27 | 27 | |
28 | 28 | |
29 | -vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib) | |
30 | -vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib) | |
29 | +vainfo_LDADD = $(top_srcdir)/va/$(libvabackendlib) | |
30 | +vainfo_DEPENDENCIES = $(top_srcdir)/va/$(libvabackendlib) | |
31 | 31 | vainfo_SOURCES = vainfo.c |
32 | 32 | |
33 | 33 | SUBDIRS = basic decode encode putsurface |
@@ -23,9 +23,9 @@ | ||
23 | 23 | bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \ |
24 | 24 | test_07 test_08 test_09 test_10 test_11 |
25 | 25 | |
26 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA | |
26 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 | |
27 | 27 | |
28 | -TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) | |
28 | +TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) | |
29 | 29 | |
30 | 30 | test_01_LDADD = $(TEST_LIBS) |
31 | 31 | test_01_SOURCES = test_01.c |
@@ -22,11 +22,7 @@ | ||
22 | 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 | 23 | */ |
24 | 24 | |
25 | -#ifdef IN_LIBVA | |
26 | -#include <va_x11.h> | |
27 | -#else | |
28 | 25 | #include <va/va_x11.h> |
29 | -#endif | |
30 | 26 | |
31 | 27 | #include "assert.h" |
32 | 28 | #include <stdarg.h> |
@@ -22,11 +22,7 @@ | ||
22 | 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 | 23 | */ |
24 | 24 | |
25 | -#ifdef IN_LIBVA | |
26 | -#include <va_x11.h> | |
27 | -#else | |
28 | 25 | #include <va/va_x11.h> |
29 | -#endif | |
30 | 26 | |
31 | 27 | #include "assert.h" |
32 | 28 | #include <stdarg.h> |
@@ -22,9 +22,9 @@ | ||
22 | 22 | |
23 | 23 | bin_PROGRAMS = mpeg2vldemo |
24 | 24 | |
25 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA | |
25 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 | |
26 | 26 | |
27 | -TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) | |
27 | +TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) | |
28 | 28 | |
29 | 29 | mpeg2vldemo_LDADD = $(TEST_LIBS) |
30 | 30 | mpeg2vldemo_SOURCES = mpeg2vldemo.c |
@@ -47,8 +47,8 @@ | ||
47 | 47 | |
48 | 48 | #include <assert.h> |
49 | 49 | |
50 | -#include "va.h" | |
51 | -#include "va_x11.h" | |
50 | +#include <va/va.h> | |
51 | +#include <va/va_x11.h> | |
52 | 52 | |
53 | 53 | #define CHECK_VASTATUS(va_status,func) \ |
54 | 54 | if (va_status != VA_STATUS_SUCCESS) { \ |
@@ -22,9 +22,9 @@ | ||
22 | 22 | |
23 | 23 | bin_PROGRAMS = h264encode |
24 | 24 | |
25 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA | |
25 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 | |
26 | 26 | |
27 | -TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) | |
27 | +TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) | |
28 | 28 | |
29 | 29 | h264encode_LDADD = $(TEST_LIBS) |
30 | 30 | h264encode_SOURCES = h264encode.c |
@@ -26,7 +26,7 @@ | ||
26 | 26 | * it is a real program to show how VAAPI encoding work, |
27 | 27 | * It does H264 element stream level encoding on auto-generated YUV data |
28 | 28 | * |
29 | - * gcc -o h264encode h264encode -lva -lva-x11 -I/usr/include/va | |
29 | + * gcc -o h264encode h264encode -lva -lva-x11 | |
30 | 30 | * ./h264encode -w <width> -h <height> -n <frame_num> |
31 | 31 | * |
32 | 32 | */ |
@@ -44,9 +44,8 @@ | ||
44 | 44 | |
45 | 45 | #include <assert.h> |
46 | 46 | |
47 | -#include "va.h" | |
48 | -#include "va_x11.h" | |
49 | - | |
47 | +#include <va/va.h> | |
48 | +#include <va/va_x11.h> | |
50 | 49 | |
51 | 50 | #define CHECK_VASTATUS(va_status,func) \ |
52 | 51 | if (va_status != VA_STATUS_SUCCESS) { \ |
@@ -212,10 +211,11 @@ static int do_h264_encoding(void) | ||
212 | 211 | VAEncPictureParameterBufferH264 pic_h264; |
213 | 212 | VAEncSliceParameterBuffer slice_h264; |
214 | 213 | VAStatus va_status; |
215 | - VABufferID coded_buf, seq_param_buf, pic_param_buf, slice_param_buf; | |
214 | + VABufferID seq_param_buf, pic_param_buf, slice_param_buf; | |
216 | 215 | int codedbuf_size; |
217 | 216 | VASurfaceStatus surface_status; |
218 | 217 | int src_surface, dst_surface, ref_surface; |
218 | + int codedbuf_idx = 0; | |
219 | 219 | int frame_skipped = 0; |
220 | 220 | int i; |
221 | 221 |
@@ -229,12 +229,24 @@ static int do_h264_encoding(void) | ||
229 | 229 | |
230 | 230 | codedbuf_size = (frame_width * frame_height * 400) / (16*16); |
231 | 231 | |
232 | + for (i = 0; i < CODEDBUF_NUM; i++) { | |
233 | + /* create coded buffer once for all | |
234 | + * other VA buffers which won't be used again after vaRenderPicture. | |
235 | + * so APP can always vaCreateBuffer for every frame | |
236 | + * but coded buffer need to be mapped and accessed after vaRenderPicture/vaEndPicture | |
237 | + * so VA won't maintain the coded buffer | |
238 | + */ | |
239 | + va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType, | |
240 | + codedbuf_size, 1, NULL, &coded_buf[i]); | |
241 | + CHECK_VASTATUS(va_status,"vaBeginPicture"); | |
242 | + } | |
243 | + | |
232 | 244 | src_surface = 0; |
233 | 245 | /* the last two frames are reference/reconstructed frame */ |
234 | 246 | dst_surface = SURFACE_NUM - 1; |
235 | 247 | ref_surface = SURFACE_NUM - 2; |
236 | 248 | |
237 | - for (i=0; i < frame_count; i++) { | |
249 | + for (i = 0; i < frame_count; i++) { | |
238 | 250 | va_status = vaBeginPicture(va_dpy, context_id, surface_id[src_surface]); |
239 | 251 | CHECK_VASTATUS(va_status,"vaBeginPicture"); |
240 | 252 |
@@ -249,7 +261,7 @@ static int do_h264_encoding(void) | ||
249 | 261 | seq_h264.frame_rate = frame_rate; |
250 | 262 | seq_h264.initial_qp = initial_qp; |
251 | 263 | seq_h264.min_qp = minimal_qp; |
252 | - seq_h264.basic_unit_size = 6; | |
264 | + seq_h264.basic_unit_size = 0; | |
253 | 265 | seq_h264.intra_period = intra_count; |
254 | 266 | |
255 | 267 | va_status = vaCreateBuffer(va_dpy, context_id, |
@@ -261,12 +273,10 @@ static int do_h264_encoding(void) | ||
261 | 273 | CHECK_VASTATUS(va_status,"vaRenderPicture");; |
262 | 274 | } |
263 | 275 | |
264 | - va_status = vaCreateBuffer(va_dpy,context_id,VAEncCodedBufferType, | |
265 | - codedbuf_size, 1, NULL, &coded_buf); | |
266 | 276 | |
267 | 277 | pic_h264.reference_picture = surface_id[ref_surface]; |
268 | 278 | pic_h264.reconstructed_picture= surface_id[dst_surface]; |
269 | - pic_h264.coded_buf = coded_buf; | |
279 | + pic_h264.coded_buf = coded_buf[codedbuf_idx]; | |
270 | 280 | pic_h264.picture_width = frame_width; |
271 | 281 | pic_h264.picture_height = frame_height; |
272 | 282 | pic_h264.last_picture = (i==frame_count); |
@@ -300,7 +310,7 @@ static int do_h264_encoding(void) | ||
300 | 310 | va_status = vaQuerySurfaceStatus(va_dpy, surface_id[src_surface],&surface_status); |
301 | 311 | frame_skipped = (surface_status & VASurfaceSkipped); |
302 | 312 | |
303 | - save_coded_buf(coded_buf, i, frame_skipped); | |
313 | + save_coded_buf(coded_buf[codedbuf_idx], i, frame_skipped); | |
304 | 314 | |
305 | 315 | /* should display reconstructed frame, but just diplay source frame */ |
306 | 316 | if (frame_display) { |
@@ -316,6 +326,11 @@ static int do_h264_encoding(void) | ||
316 | 326 | if (src_surface == (SURFACE_NUM - 2)) |
317 | 327 | src_surface = 0; |
318 | 328 | |
329 | + /* use next codedbuf */ | |
330 | + codedbuf_idx++; | |
331 | + if (codedbuf_idx == (CODEDBUF_NUM - 1)) | |
332 | + codedbuf_idx = 0; | |
333 | + | |
319 | 334 | /* if a frame is skipped, current frame still use last reference frame */ |
320 | 335 | if (frame_skipped == 0) { |
321 | 336 | /* swap ref/dst */ |
@@ -375,7 +390,8 @@ int main(int argc,char **argv) | ||
375 | 390 | case '?': |
376 | 391 | printf("./h264encode <options>\n"); |
377 | 392 | printf(" -w -h: resolution\n"); |
378 | - printf(" -n frame number\n"); | |
393 | + printf(" -n frame number\n"); | |
394 | + printf(" -d display the source frame\n"); | |
379 | 395 | printf(" -p P frame count between two I frames\n"); |
380 | 396 | printf(" -f frame rate\n"); |
381 | 397 | printf(" -r bit rate\n"); |
@@ -22,13 +22,15 @@ | ||
22 | 22 | |
23 | 23 | bin_PROGRAMS = putsurface |
24 | 24 | |
25 | -AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 -DIN_LIBVA | |
25 | +AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11 | |
26 | 26 | |
27 | -TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib) | |
27 | +TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib) -lpthread | |
28 | 28 | |
29 | 29 | putsurface_LDADD = $(TEST_LIBS) |
30 | 30 | putsurface_SOURCES = putsurface.c |
31 | 31 | |
32 | +EXTRA_DIST = loadsurface.h | |
33 | + | |
32 | 34 | |
33 | 35 | valgrind: $(bin_PROGRAMS) |
34 | 36 | for a in $(bin_PROGRAMS); do \ |
@@ -23,7 +23,7 @@ | ||
23 | 23 | */ |
24 | 24 | |
25 | 25 | |
26 | -/* gcc -o putsurface putsurface.c -lva -lva-x11 -I/usr/include/va */ | |
26 | +/* gcc -o putsurface putsurface.c -lva -lva-x11 */ | |
27 | 27 | |
28 | 28 | #include <stdio.h> |
29 | 29 | #include <string.h> |
@@ -39,8 +39,8 @@ | ||
39 | 39 | #include <sys/stat.h> |
40 | 40 | #include <fcntl.h> |
41 | 41 | |
42 | -#include "va.h" | |
43 | -#include "va_x11.h" | |
42 | +#include <va/va.h> | |
43 | +#include <va/va_x11.h> | |
44 | 44 | |
45 | 45 | #include <assert.h> |
46 | 46 |
@@ -22,11 +22,7 @@ | ||
22 | 22 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
23 | 23 | */ |
24 | 24 | |
25 | -#ifdef IN_LIBVA | |
26 | -#include <va_x11.h> | |
27 | -#else | |
28 | 25 | #include <va/va_x11.h> |
29 | -#endif | |
30 | 26 | |
31 | 27 | #include <stdarg.h> |
32 | 28 | #include <stdio.h> |
@@ -21,8 +21,7 @@ | ||
21 | 21 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 | 22 | |
23 | 23 | INCLUDES = \ |
24 | - $(LIBVA_CFLAGS) -I$(top_srcdir)/src/x11 \ | |
25 | - -DIN_LIBVA \ | |
24 | + $(LIBVA_CFLAGS) -I$(top_srcdir)/va/x11 \ | |
26 | 25 | -DVA_DRIVERS_PATH="\"$(LIBVA_DRIVERS_PATH)\"" |
27 | 26 | |
28 | 27 | LDADD = \ |
@@ -46,7 +45,7 @@ SUBDIRS = x11 | ||
46 | 45 | libva_la_SOURCES = va.c |
47 | 46 | |
48 | 47 | libvaincludedir = ${includedir}/va |
49 | -libvainclude_HEADERS = va.h va_backend.h va_version.h | |
48 | +libvainclude_HEADERS = va.h va_x11.h va_backend.h va_version.h | |
50 | 49 | |
51 | 50 | DISTCLEANFILES = \ |
52 | 51 | va_version.h |
@@ -23,21 +23,18 @@ | ||
23 | 23 | */ |
24 | 24 | |
25 | 25 | #define _GNU_SOURCE 1 |
26 | + | |
26 | 27 | #include "va.h" |
27 | 28 | #include "va_backend.h" |
28 | 29 | |
29 | 30 | #include <assert.h> |
30 | 31 | #include <stdarg.h> |
31 | 32 | #include <stdio.h> |
33 | +#include <stdlib.h> | |
32 | 34 | #include <string.h> |
33 | 35 | #include <dlfcn.h> |
34 | 36 | #include <unistd.h> |
35 | 37 | |
36 | -#include <linux/videodev2.h> | |
37 | -#include "va_dri.h" | |
38 | -#include "va_dri2.h" | |
39 | -#include "va_dricommon.h" | |
40 | - | |
41 | 38 | |
42 | 39 | #define DRIVER_INIT_FUNC "__vaDriverInit_0_31" |
43 | 40 |
@@ -65,11 +65,7 @@ | ||
65 | 65 | #ifndef _VA_H_ |
66 | 66 | #define _VA_H_ |
67 | 67 | |
68 | -#ifdef IN_LIBVA | |
69 | -#include "va_version.h" | |
70 | -#else | |
71 | 68 | #include <va/va_version.h> |
72 | -#endif | |
73 | 69 | |
74 | 70 | #ifdef __cplusplus |
75 | 71 | extern "C" { |
@@ -131,6 +127,22 @@ typedef int VAStatus; /* Return status type from functions */ | ||
131 | 127 | #define VA_STATUS_ERROR_SURFACE_IN_DISPLAYING 0x00000015 |
132 | 128 | #define VA_STATUS_ERROR_UNKNOWN 0xFFFFFFFF |
133 | 129 | |
130 | +/* De-interlacing flags for vaPutSurface() */ | |
131 | +#define VA_FRAME_PICTURE 0x00000000 | |
132 | +#define VA_TOP_FIELD 0x00000001 | |
133 | +#define VA_BOTTOM_FIELD 0x00000002 | |
134 | + | |
135 | +/* | |
136 | + * Clears the drawable with background color. | |
137 | + * for hardware overlay based implementation this flag | |
138 | + * can be used to turn off the overlay | |
139 | + */ | |
140 | +#define VA_CLEAR_DRAWABLE 0x00000008 | |
141 | + | |
142 | +/* Color space conversion flags for vaPutSurface() */ | |
143 | +#define VA_SRC_BT601 0x00000010 | |
144 | +#define VA_SRC_BT709 0x00000020 | |
145 | + | |
134 | 146 | /* |
135 | 147 | * Returns a short english description of error_status |
136 | 148 | */ |
@@ -29,15 +29,8 @@ | ||
29 | 29 | #ifndef _VA_BACKEND_H_ |
30 | 30 | #define _VA_BACKEND_H_ |
31 | 31 | |
32 | -#ifdef IN_LIBVA | |
33 | -#include "va.h" | |
34 | -#include "x11/va_x11.h" | |
35 | -#else | |
36 | 32 | #include <va/va.h> |
37 | -#include <va/va_x11.h> | |
38 | -#endif | |
39 | - | |
40 | -#include <stdlib.h> | |
33 | +#include <X11/Xlib.h> | |
41 | 34 | #include <linux/videodev2.h> |
42 | 35 | |
43 | 36 |
@@ -1,11 +1,7 @@ | ||
1 | 1 | #ifndef _VA_X11_H_ |
2 | 2 | #define _VA_X11_H_ |
3 | 3 | |
4 | -#ifdef IN_LIBVA | |
5 | -#include "va.h" | |
6 | -#else | |
7 | 4 | #include <va/va.h> |
8 | -#endif | |
9 | 5 | #include <X11/Xlib.h> |
10 | 6 | |
11 | 7 | #ifdef __cplusplus |
@@ -27,22 +23,6 @@ VADisplay vaGetDisplay ( | ||
27 | 23 | * color space conversion and scaling to the destination |
28 | 24 | * rectangle |
29 | 25 | */ |
30 | -/* de-interlacing flags for vaPutSurface */ | |
31 | -#define VA_FRAME_PICTURE 0x00000000 | |
32 | -#define VA_TOP_FIELD 0x00000001 | |
33 | -#define VA_BOTTOM_FIELD 0x00000002 | |
34 | - | |
35 | -/* | |
36 | - * clears the drawable with background color. | |
37 | - * for hardware overlay based implementation this flag | |
38 | - * can be used to turn off the overlay | |
39 | - */ | |
40 | -#define VA_CLEAR_DRAWABLE 0x00000008 | |
41 | - | |
42 | -/* color space conversion flags for vaPutSurface */ | |
43 | -#define VA_SRC_BT601 0x00000010 | |
44 | -#define VA_SRC_BT709 0x00000020 | |
45 | - | |
46 | 26 | VAStatus vaPutSurface ( |
47 | 27 | VADisplay dpy, |
48 | 28 | VASurfaceID surface, |
@@ -18,12 +18,12 @@ | ||
18 | 18 | # otherwise. Any license under such intellectual property rights must be |
19 | 19 | # express and approved by Intel in writing. |
20 | 20 | |
21 | -AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src $(DRM_CFLAGS) | |
21 | +AM_CFLAGS = -DLINUX -I$(top_srcdir)/va $(DRM_CFLAGS) | |
22 | 22 | |
23 | 23 | noinst_LTLIBRARIES = libva_x11.la |
24 | 24 | |
25 | 25 | libva_x11includedir = ${includedir}/va |
26 | -libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h | |
26 | +libva_x11include_HEADERS = va_dri.h va_dri2.h va_dricommon.h | |
27 | 27 | |
28 | 28 | 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 |
29 | 29 |
@@ -7,7 +7,7 @@ | ||
7 | 7 | #include <drm.h> |
8 | 8 | #include <drm_sarea.h> |
9 | 9 | |
10 | -#include "va_backend.h" | |
10 | +#include <va/va_backend.h> | |
11 | 11 | |
12 | 12 | enum |
13 | 13 | { |
@@ -32,6 +32,7 @@ | ||
32 | 32 | #include "va_dricommon.h" |
33 | 33 | #include "va_nvctrl.h" |
34 | 34 | #include <stdio.h> |
35 | +#include <stdlib.h> | |
35 | 36 | #include <stdarg.h> |
36 | 37 | #include <string.h> |
37 | 38 | #include <unistd.h> |