summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYounes Manton <[email protected]>2008-10-17 17:20:03 -0400
committerYounes Manton <[email protected]>2008-10-17 17:31:26 -0400
commit3354e668f0d4eb7ad1d92607031c1fc2e785e8d1 (patch)
tree579df8d23ce673396a98c81abdf5ecd1352e254e
parente52630e296807282592a50a3a4c7a9b50a56adb0 (diff)
g3dvl: Get rid of state tracker unit tests, stale and not useful atm.
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/.gitignore6
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/Makefile45
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_b_rendering.c226
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_context.c22
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_i_rendering.c137
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_p_rendering.c214
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_pf_rendering.c214
-rw-r--r--src/gallium/state_trackers/g3dvl/tests/test_surface.c26
8 files changed, 0 insertions, 890 deletions
diff --git a/src/gallium/state_trackers/g3dvl/tests/.gitignore b/src/gallium/state_trackers/g3dvl/tests/.gitignore
deleted file mode 100644
index 9b1ec4e2122..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-test_context
-test_surface
-test_i_rendering
-test_p_rendering
-test_pf_rendering
-test_b_rendering
diff --git a/src/gallium/state_trackers/g3dvl/tests/Makefile b/src/gallium/state_trackers/g3dvl/tests/Makefile
deleted file mode 100644
index 45cefa2e570..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-GALLIUMDIR = ../../..
-
-CFLAGS += -g -Wall -Werror \
- -I${GALLIUMDIR}/state_trackers/g3dvl \
- -I${GALLIUMDIR}/winsys/g3dvl \
- -I${GALLIUMDIR}/include \
- -I${GALLIUMDIR}/auxiliary \
- -I${GALLIUMDIR}/drivers
-LDFLAGS += -L${GALLIUMDIR}/state_trackers/g3dvl \
- -L${GALLIUMDIR}/drivers/softpipe \
- -L${GALLIUMDIR}/auxiliary/tgsi \
- -L${GALLIUMDIR}/auxiliary/draw \
- -L${GALLIUMDIR}/auxiliary/util \
- -L${GALLIUMDIR}/auxiliary/translate \
- -L${GALLIUMDIR}/auxiliary/cso_cache \
- -L${GALLIUMDIR}/auxiliary/rtasm
-LIBS += -lg3dvl -lsoftpipe -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lutil -lX11 -lm
-
-#############################################
-
-.PHONY = all clean
-
-all: test_context test_surface test_i_rendering test_p_rendering test_pf_rendering test_b_rendering
-
-test_context: test_context.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-test_surface: test_surface.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-test_i_rendering: test_i_rendering.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-test_p_rendering: test_p_rendering.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-test_pf_rendering: test_pf_rendering.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-test_b_rendering: test_b_rendering.o ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
- $(CC) ${LDFLAGS} -o $@ $^ ${LIBS}
-
-clean:
- rm -rf *.o test_context test_surface test_i_rendering test_p_rendering test_pf_rendering test_b_rendering
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_b_rendering.c b/src/gallium/state_trackers/g3dvl/tests/test_b_rendering.c
deleted file mode 100644
index b78cc851ae4..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_b_rendering.c
+++ /dev/null
@@ -1,226 +0,0 @@
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <vl_context.h>
-#include <vl_surface.h>
-#include <xsp_winsys.h>
-
-static const unsigned short ycbcr16x16_420[8*8*6] =
-{
- 0x00A5,0x00A5,0x00A5,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x00A5,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,0x00A5,
-
- 0x004F,0x004F,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,0x004F,
-
- 0x003E,0x003E,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,0x003E
-};
-
-static const signed short ycbcr16x16_420_2[8*8*6] =
-{
- -0x00A5,-0x00A5,-0x00A5,-0x0072,-0x00A5,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x00A5,-0x0072,-0x0072,-0x00A5,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x00A5,-0x0072,-0x0072,-0x00A5,-0x00A5,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
-
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
-
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
-
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x00A5,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x00A5,-0x00A5,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x0072,-0x00A5,-0x00A5,-0x00A5,
- -0x0072,-0x0072,-0x0072,-0x0072,-0x00A5,-0x00A5,-0x00A5,-0x00A5,
-
- -0x004F,-0x004F,-0x004F,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x004F,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x004F,
- -0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x00B2,-0x004F,-0x004F,
-
- -0x003E,-0x003E,-0x003E,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x003E,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x003E,
- -0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x0060,-0x003E,-0x003E
-};
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
- const unsigned int window_width = video_width * 2, window_height = video_height * 2;
- int quit = 0;
- Display *display;
- Window root, window;
- Pixmap framebuffer;
- XEvent event;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
- struct VL_SURFACE *sfc, *past_sfc, *future_sfc;
- struct VL_MOTION_VECTOR motion_vector[2] =
- {
- {
- {0, 0}, {0, 0}
- },
- {
- {0, 0}, {0, 0}
- }
- };
-
- display = XOpenDisplay(NULL);
- root = XDefaultRootWindow(display);
- window = XCreateSimpleWindow(display, root, 0, 0, window_width, window_height, 0, 0, 0);
- framebuffer = XCreatePixmap(display, root, window_width, window_height, 24);
-
- XSelectInput(display, window, ExposureMask | KeyPressMask);
- XMapWindow(display, window);
- XSync(display, 0);
-
- pipe = create_pipe_context(display);
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlCreateSurface(ctx, &sfc);
- vlCreateSurface(ctx, &past_sfc);
- vlCreateSurface(ctx, &future_sfc);
-
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, past_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, past_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, past_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, past_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, future_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, future_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, future_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, future_sfc);
- vlRenderBMacroBlock
- (
- VL_FRAME_PICTURE,
- VL_FIELD_FIRST,
- 0,
- 0,
- VL_FRAME_MC,
- motion_vector,
- 0x3F,
- VL_DCT_FRAME_CODED,
- (short*)ycbcr16x16_420_2,
- past_sfc,
- future_sfc,
- sfc
- );
- vlPutSurface(sfc, framebuffer, 0, 0, video_width, video_height, 0, 0, window_width, window_height, VL_FRAME_PICTURE);
-
- puts("Press any key to continue...");
-
- while (!quit)
- {
- XNextEvent(display, &event);
- switch (event.type)
- {
- case Expose:
- {
- XCopyArea
- (
- display,
- framebuffer,
- window,
- XDefaultGC(display, XDefaultScreen(display)),
- 0,
- 0,
- window_width,
- window_height,
- 0,
- 0
- );
- break;
- }
- case KeyPress:
- {
- quit = 1;
- break;
- }
- }
- }
-
- vlDestroySurface(sfc);
- vlDestroySurface(past_sfc);
- vlDestroySurface(future_sfc);
- vlDestroyContext(ctx);
-
- XFreePixmap(display, framebuffer);
- XDestroyWindow(display, window);
- XCloseDisplay(display);
-
- return 0;
-}
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_context.c b/src/gallium/state_trackers/g3dvl/tests/test_context.c
deleted file mode 100644
index 2002977ee24..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_context.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <vl_context.h>
-#include <xsp_winsys.h>
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
-
- Display *display;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
-
- display = XOpenDisplay(NULL);
- pipe = create_pipe_context(display);
-
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlDestroyContext(ctx);
-
- XCloseDisplay(display);
-
- return 0;
-}
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_i_rendering.c b/src/gallium/state_trackers/g3dvl/tests/test_i_rendering.c
deleted file mode 100644
index 1f964711308..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_i_rendering.c
+++ /dev/null
@@ -1,137 +0,0 @@
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <vl_context.h>
-#include <vl_surface.h>
-#include <xsp_winsys.h>
-
-static const unsigned short ycbcr16x16_420[8*8*6] =
-{
- 0x00A5,0x00A5,0x00A5,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x00A5,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,0x00A5,
-
- 0x004F,0x004F,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,0x004F,
-
- 0x003E,0x003E,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,0x003E
-};
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
- const unsigned int window_width = video_width * 2, window_height = video_height * 2;
- int quit = 0;
- Display *display;
- Window root, window;
- Pixmap framebuffer;
- XEvent event;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
- struct VL_SURFACE *sfc;
-
- display = XOpenDisplay(NULL);
- root = XDefaultRootWindow(display);
- window = XCreateSimpleWindow(display, root, 0, 0, window_width, window_height, 0, 0, 0);
- framebuffer = XCreatePixmap(display, root, window_width, window_height, 24);
-
- XSelectInput(display, window, ExposureMask | KeyPressMask);
- XMapWindow(display, window);
- XSync(display, 0);
-
- pipe = create_pipe_context(display);
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlCreateSurface(ctx, &sfc);
-
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, sfc);
- vlPutSurface(sfc, framebuffer, 0, 0, video_width, video_height, 0, 0, window_width, window_height, VL_FRAME_PICTURE);
-
- puts("Press any key to continue...");
-
- while (!quit)
- {
- XNextEvent(display, &event);
- switch (event.type)
- {
- case Expose:
- {
- XCopyArea
- (
- display,
- framebuffer,
- window,
- XDefaultGC(display, XDefaultScreen(display)),
- 0,
- 0,
- window_width,
- window_height,
- 0,
- 0
- );
- break;
- }
- case KeyPress:
- {
- quit = 1;
- break;
- }
- }
- }
-
- vlDestroySurface(sfc);
- vlDestroyContext(ctx);
-
- XFreePixmap(display, framebuffer);
- XDestroyWindow(display, window);
- XCloseDisplay(display);
-
- return 0;
-}
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_p_rendering.c b/src/gallium/state_trackers/g3dvl/tests/test_p_rendering.c
deleted file mode 100644
index 2203349784f..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_p_rendering.c
+++ /dev/null
@@ -1,214 +0,0 @@
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <vl_context.h>
-#include <vl_surface.h>
-#include <xsp_winsys.h>
-
-static const unsigned short ycbcr16x16_420[8*8*6] =
-{
- 0x00A5,0x00A5,0x00A5,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x00A5,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,0x00A5,
-
- 0x004F,0x004F,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,0x004F,
-
- 0x003E,0x003E,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,0x003E
-};
-
-static const signed short ycbcr16x16_420_2[8*8*6] =
-{
- -51,-51,-51, 0,-51, 0, 0, 0,
- 0,-51, 0, 0,-51, 0, 0, 0,
- 0,-51, 0, 0,-51,-51, 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, 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, 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,
- 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, 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, 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, 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,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-
- 99, 99, 99, 0, 0, 0, 0, 0,
- 0, 0, 99, 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, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
-
- 33, 33, 33, 0, 0, 0, 0, 0,
- 0, 0, 33, 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, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
- const unsigned int window_width = video_width * 2, window_height = video_height * 2;
- int quit = 0;
- Display *display;
- Window root, window;
- Pixmap framebuffer;
- XEvent event;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
- struct VL_SURFACE *sfc, *ref_sfc;
- struct VL_MOTION_VECTOR motion_vector =
- {
- {0, 0}, {0, 0}
- };
-
- display = XOpenDisplay(NULL);
- root = XDefaultRootWindow(display);
- window = XCreateSimpleWindow(display, root, 0, 0, window_width, window_height, 0, 0, 0);
- framebuffer = XCreatePixmap(display, root, window_width, window_height, 24);
-
- XSelectInput(display, window, ExposureMask | KeyPressMask);
- XMapWindow(display, window);
- XSync(display, 0);
-
- pipe = create_pipe_context(display);
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlCreateSurface(ctx, &sfc);
- vlCreateSurface(ctx, &ref_sfc);
-
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderPMacroBlock
- (
- VL_FRAME_PICTURE,
- VL_FIELD_FIRST,
- 0,
- 0,
- VL_FRAME_MC,
- &motion_vector,
- 0x3F,
- VL_DCT_FRAME_CODED,
- (short*)ycbcr16x16_420_2,
- ref_sfc,
- sfc
- );
- vlPutSurface(sfc, framebuffer, 0, 0, video_width, video_height, 0, 0, window_width, window_height, VL_FRAME_PICTURE);
-
- puts("Press any key to continue...");
-
- while (!quit)
- {
- XNextEvent(display, &event);
- switch (event.type)
- {
- case Expose:
- {
- XCopyArea
- (
- display,
- framebuffer,
- window,
- XDefaultGC(display, XDefaultScreen(display)),
- 0,
- 0,
- window_width,
- window_height,
- 0,
- 0
- );
- break;
- }
- case KeyPress:
- {
- quit = 1;
- break;
- }
- }
- }
-
- vlDestroySurface(sfc);
- vlDestroySurface(ref_sfc);
- vlDestroyContext(ctx);
-
- XFreePixmap(display, framebuffer);
- XDestroyWindow(display, window);
- XCloseDisplay(display);
-
- return 0;
-}
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_pf_rendering.c b/src/gallium/state_trackers/g3dvl/tests/test_pf_rendering.c
deleted file mode 100644
index 43586fc553c..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_pf_rendering.c
+++ /dev/null
@@ -1,214 +0,0 @@
-#include <stdio.h>
-#include <X11/Xlib.h>
-#include <vl_context.h>
-#include <vl_surface.h>
-#include <xsp_winsys.h>
-
-static const unsigned short ycbcr16x16_420[8*8*6] =
-{
- 0x00A5,0x00A5,0x00A5,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x0072,0x0072,0x0072,
- 0x0072,0x00A5,0x0072,0x0072,0x00A5,0x00A5,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
-
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,
- 0x0072,0x0072,0x0072,0x0072,0x00A5,0x00A5,0x00A5,0x00A5,
-
- 0x004F,0x004F,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x004F,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,
- 0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x00B2,0x004F,0x004F,
-
- 0x003E,0x003E,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x003E,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,
- 0x0060,0x0060,0x0060,0x0060,0x0060,0x0060,0x003E,0x003E
-};
-
-static const signed short ycbcr16x16_420_2[8*8*6] =
-{
- 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, 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, 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, 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,
- 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, 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, 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, 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,
- 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, 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, 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, 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,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
- const unsigned int window_width = video_width * 2, window_height = video_height * 2;
- int quit = 0;
- Display *display;
- Window root, window;
- Pixmap framebuffer;
- XEvent event;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
- struct VL_SURFACE *sfc, *ref_sfc;
- struct VL_MOTION_VECTOR motion_vector =
- {
- {0, 0}, {32, 32}
- };
-
- display = XOpenDisplay(NULL);
- root = XDefaultRootWindow(display);
- window = XCreateSimpleWindow(display, root, 0, 0, window_width, window_height, 0, 0, 0);
- framebuffer = XCreatePixmap(display, root, window_width, window_height, 24);
-
- XSelectInput(display, window, ExposureMask | KeyPressMask);
- XMapWindow(display, window);
- XSync(display, 0);
-
- pipe = create_pipe_context(display);
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlCreateSurface(ctx, &sfc);
- vlCreateSurface(ctx, &ref_sfc);
-
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 0, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 0, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderIMacroBlock(VL_FRAME_PICTURE, VL_FIELD_FIRST, 1, 1, 0x3F, VL_DCT_FRAME_CODED, (short*)ycbcr16x16_420, ref_sfc);
- vlRenderPMacroBlock
- (
- VL_FRAME_PICTURE,
- VL_FIELD_FIRST,
- 0,
- 0,
- VL_FIELD_MC,
- &motion_vector,
- 0x3F,
- VL_DCT_FRAME_CODED,
- (short*)ycbcr16x16_420_2,
- ref_sfc,
- sfc
- );
- vlPutSurface(sfc, framebuffer, 0, 0, video_width, video_height, 0, 0, window_width, window_height, VL_FRAME_PICTURE);
-
- puts("Press any key to continue...");
-
- while (!quit)
- {
- XNextEvent(display, &event);
- switch (event.type)
- {
- case Expose:
- {
- XCopyArea
- (
- display,
- framebuffer,
- window,
- XDefaultGC(display, XDefaultScreen(display)),
- 0,
- 0,
- window_width,
- window_height,
- 0,
- 0
- );
- break;
- }
- case KeyPress:
- {
- quit = 1;
- break;
- }
- }
- }
-
- vlDestroySurface(sfc);
- vlDestroySurface(ref_sfc);
- vlDestroyContext(ctx);
-
- XFreePixmap(display, framebuffer);
- XDestroyWindow(display, window);
- XCloseDisplay(display);
-
- return 0;
-}
-
diff --git a/src/gallium/state_trackers/g3dvl/tests/test_surface.c b/src/gallium/state_trackers/g3dvl/tests/test_surface.c
deleted file mode 100644
index 4d1946396af..00000000000
--- a/src/gallium/state_trackers/g3dvl/tests/test_surface.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <vl_context.h>
-#include <vl_surface.h>
-#include <xsp_winsys.h>
-
-int main(int argc, char **argv)
-{
- const unsigned int video_width = 32, video_height = 32;
-
- Display *display;
- struct pipe_context *pipe;
- struct VL_CONTEXT *ctx;
- struct VL_SURFACE *sfc;
-
- display = XOpenDisplay(NULL);
- pipe = create_pipe_context(display);
-
- vlCreateContext(display, pipe, video_width, video_height, VL_FORMAT_YCBCR_420, &ctx);
- vlCreateSurface(ctx, &sfc);
- vlDestroySurface(sfc);
- vlDestroyContext(ctx);
-
- XCloseDisplay(display);
-
- return 0;
-}
-