summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Yuan <shengquan.yuan@intel.com>2009-07-02 17:02:12 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2009-07-02 17:02:12 +0800
commit9ac07d29e230c34d678126dec84550d5a31104d8 (patch)
tree1cd045fb13b0ba337bcc46d8cf800376f9689194
parent8de7d122563a41a6dec8329b67d62d078201f0bc (diff)
Apply the patch from Nanhai to support MPEG2 VLD on Intel integrated G45 graphics
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac11
-rw-r--r--i965_drv_video/Makefile.am40
-rw-r--r--i965_drv_video/i965_defines.h325
-rw-r--r--i965_drv_video/i965_drv_video.c1446
-rw-r--r--i965_drv_video/i965_drv_video.h170
-rw-r--r--i965_drv_video/i965_drv_video.la42
-rw-r--r--i965_drv_video/i965_media.c268
-rw-r--r--i965_drv_video/i965_media.h105
-rw-r--r--i965_drv_video/i965_media_mpeg2.c778
-rw-r--r--i965_drv_video/i965_media_mpeg2.h46
-rw-r--r--i965_drv_video/i965_render.c1330
-rw-r--r--i965_drv_video/i965_render.h91
-rw-r--r--i965_drv_video/i965_structs.h623
-rw-r--r--i965_drv_video/intel_batchbuffer.c204
-rw-r--r--i965_drv_video/intel_batchbuffer.h51
-rw-r--r--i965_drv_video/intel_driver.c135
-rw-r--r--i965_drv_video/intel_driver.h117
-rw-r--r--i965_drv_video/intel_memman.c48
-rw-r--r--i965_drv_video/intel_memman.h7
-rw-r--r--i965_drv_video/object_heap.c194
-rw-r--r--i965_drv_video/object_heap.h89
-rw-r--r--i965_drv_video/shaders/Makefile.am1
-rw-r--r--i965_drv_video/shaders/mpeg2/Makefile.am1
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/Makefile.am72
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/addidct.g4i152
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/do_iq_intra.g4i64
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/do_iq_non_intra.g4i59
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_addidct.g4i153
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_backward.g4a99
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_backward.g4b757
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4a30
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4b15
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4a141
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4b797
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4a31
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4b15
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_forward.g4a116
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_forward.g4b768
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4a31
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4b15
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_intra.g4a209
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_intra.g4b313
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_motion_uv.g4i47
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_motion_y.g4i45
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_uv.g4i65
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_y.g4i62
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_uv.g4i45
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_y.g4i68
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_uv.g4i37
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_y.g4i62
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_uv.g4i91
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_y.g4i123
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4a126
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4b553
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a213
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b1007
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4a130
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4b555
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4a61
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4b369
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a120
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b675
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_forward.g4a61
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_forward.g4b369
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_intra.g4a211
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/frame_intra.g4b313
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/idct.g4i147
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/iq_intra.g4i131
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/iq_non_intra.g4i150
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/lib.g4a190
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/lib.g4b307
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/motion_field_uv.g4i46
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/motion_field_y.g4i45
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/motion_frame_uv.g4i45
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/motion_frame_y.g4i57
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/null.g4a51
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x0y0_uv.g4i50
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x0y0_y.g4i57
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x0y1_uv.g4i28
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x0y1_y.g4i60
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x1y0_uv.g4i24
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x1y0_y.g4i57
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x1y1_uv.g4i53
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_field_x1y1_y.g4i87
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x0y0_uv.g4i49
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x0y0_y.g4i58
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x0y1_uv.g4i56
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x0y1_y.g4i61
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x1y0_uv.g4i42
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x1y0_y.g4i58
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x1y1_uv.g4i74
-rw-r--r--i965_drv_video/shaders/mpeg2/vld/read_frame_x1y1_y.g4i112
-rw-r--r--i965_drv_video/shaders/render/Makefile375
-rw-r--r--i965_drv_video/shaders/render/Makefile.am40
-rw-r--r--i965_drv_video/shaders/render/Makefile.in375
-rw-r--r--i965_drv_video/shaders/render/exa_sf.g4a107
-rw-r--r--i965_drv_video/shaders/render/exa_sf.g4b15
-rw-r--r--i965_drv_video/shaders/render/exa_wm.g4i156
-rw-r--r--i965_drv_video/shaders/render/exa_wm_affine.g4i44
-rw-r--r--i965_drv_video/shaders/render/exa_wm_blend_subpicture.g4a83
-rw-r--r--i965_drv_video/shaders/render/exa_wm_blend_subpicture.g4b15
-rw-r--r--i965_drv_video/shaders/render/exa_wm_src_affine.g4a45
-rw-r--r--i965_drv_video/shaders/render/exa_wm_src_affine.g4b8
-rw-r--r--i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4a65
-rw-r--r--i965_drv_video/shaders/render/exa_wm_src_sample_planar.g4b4
-rw-r--r--i965_drv_video/shaders/render/exa_wm_write.g4a85
-rw-r--r--i965_drv_video/shaders/render/exa_wm_write.g4b26
-rw-r--r--i965_drv_video/shaders/render/exa_wm_xy.g4a52
-rw-r--r--i965_drv_video/shaders/render/exa_wm_xy.g4b4
-rw-r--r--i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4a98
-rw-r--r--i965_drv_video/shaders/render/exa_wm_yuv_rgb.g4b11
-rw-r--r--i965_drv_video/shaders/vld/Makefile384
-rw-r--r--src/Makefile.am4
-rw-r--r--src/X11/va_x11.c2
-rw-r--r--src/dri1_util.c158
-rw-r--r--src/dri2_util.c198
-rw-r--r--src/va.c24
-rwxr-xr-xsrc/va_backend.h9
-rw-r--r--src/va_dricommon.c62
-rw-r--r--src/va_dricommon.h68
-rw-r--r--test/Makefile.am2
122 files changed, 19974 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 5470b69..87fee6b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
AUTOMAKE_OPTIONS = foreign
-SUBDIRS = src dummy_drv_video test
+SUBDIRS = src dummy_drv_video test i965_drv_video
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libva.pc
diff --git a/configure.ac b/configure.ac
index 8f7ec59..243ccf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_INIT([libva], 0.30.4, [waldo.bastian@intel.com], libva)
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2])
-AM_CONFIG_HEADER([src/config.h])
+AM_CONFIG_HEADER([config.h])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
@@ -39,6 +39,9 @@ PKG_CHECK_MODULES([XEXT],[xext])
PKG_CHECK_MODULES([DRM], [libdrm])
PKG_CHECK_MODULES(LIBDRM_DEPS, [libdrm])
+AC_CHECK_PROG(gen4asm, [intel-gen4asm], yes, no)
+AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
+
# We only need the headers, we don't link against the DRM libraries
LIBVA_CFLAGS="$LIBDRM_DEPS_CFLAGS"
AC_SUBST(LIBVA_CFLAGS)
@@ -53,5 +56,11 @@ AC_OUTPUT([
src/X11/Makefile
dummy_drv_video/Makefile
test/Makefile
+ i965_drv_video/Makefile
+ i965_drv_video/shaders/Makefile
+ i965_drv_video/shaders/mpeg2/Makefile
+ i965_drv_video/shaders/mpeg2/vld/Makefile
+ i965_drv_video/shaders/render/Makefile
libva.pc
])
+
diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am
new file mode 100644
index 0000000..f01f4ef
--- /dev/null
+++ b/i965_drv_video/Makefile.am
@@ -0,0 +1,40 @@
+# Copyright (c) 2007 Intel Corporation. All Rights Reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sub license, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice (including the
+# next paragraph) shall be included in all copies or substantial portions
+# of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+SUBDIRS = shaders
+
+AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/common -I$(top_srcdir)/intel @DRM_CFLAGS@ -DIN_LIBVA
+
+i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
+i965_drv_video_ladir = $(libdir)/dri
+i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
+i965_drv_video_la_LIBADD = ../src/libva.la -lpthread
+
+i965_drv_video_la_SOURCES = \
+ object_heap.c \
+ intel_batchbuffer.c \
+ intel_memman.c \
+ intel_driver.c \
+ i965_media.c \
+ i965_media_mpeg2.c \
+ i965_render.c \
+ i965_drv_video.c
diff --git a/i965_drv_video/i965_defines.h b/i965_drv_video/i965_defines.h
new file mode 100644
index 0000000..e0f38b2
--- /dev/null
+++ b/i965_drv_video/i965_defines.h
@@ -0,0 +1,325 @@
+#ifndef _I965_DEFINES_H_
+#define _I965_DEFINES_H_
+
+#define CMD(pipeline,op,sub_op) ((3 << 29) | \
+ ((pipeline) << 27) | \
+ ((op) << 24) | \
+ ((sub_op) << 16))
+
+#define CMD_URB_FENCE CMD(0, 0, 0)
+#define CMD_CS_URB_STATE CMD(0, 0, 1)
+#define CMD_CONSTANT_BUFFER CMD(0, 0, 2)
+#define CMD_STATE_PREFETCH CMD(0, 0, 3)
+
+#define CMD_STATE_BASE_ADDRESS CMD(0, 1, 1)
+#define CMD_STATE_SIP CMD(0, 1, 2)
+#define CMD_PIPELINE_SELECT CMD(1, 1, 4)
+#define CMD_SAMPLER_PALETTE_LOAD CMD(3, 3, 2)
+
+#define CMD_MEDIA_STATE_POINTERS CMD(2, 0, 0)
+#define CMD_MEDIA_OBJECT CMD(2, 1, 0)
+#define CMD_MEDIA_OBJECT_EX CMD(2, 1, 1)
+
+#define CMD_PIPELINED_POINTERS CMD(3, 0, 0)
+#define CMD_BINDING_TABLE_POINTERS CMD(3, 0, 1)
+#define CMD_VERTEX_BUFFERS CMD(3, 0, 8)
+#define CMD_VERTEX_ELEMENTS CMD(3, 0, 9)
+#define CMD_DRAWING_RECTANGLE CMD(3, 1, 0)
+#define CMD_CONSTANT_COLOR CMD(3, 1, 1)
+#define CMD_3DPRIMITIVE CMD(3, 3, 0)
+
+#define BASE_ADDRESS_MODIFY (1 << 0)
+
+#define PIPELINE_SELECT_3D 0
+#define PIPELINE_SELECT_MEDIA 1
+
+
+#define UF0_CS_REALLOC (1 << 13)
+#define UF0_VFE_REALLOC (1 << 12)
+#define UF0_SF_REALLOC (1 << 11)
+#define UF0_CLIP_REALLOC (1 << 10)
+#define UF0_GS_REALLOC (1 << 9)
+#define UF0_VS_REALLOC (1 << 8)
+#define UF1_CLIP_FENCE_SHIFT 20
+#define UF1_GS_FENCE_SHIFT 10
+#define UF1_VS_FENCE_SHIFT 0
+#define UF2_CS_FENCE_SHIFT 20
+#define UF2_VFE_FENCE_SHIFT 10
+#define UF2_SF_FENCE_SHIFT 0
+
+#define VFE_GENERIC_MODE 0x0
+#define VFE_VLD_MODE 0x1
+#define VFE_IS_MODE 0x2
+#define VFE_AVC_MC_MODE 0x4
+#define VFE_AVC_IT_MODE 0x7
+
+#define FLOATING_POINT_IEEE_754 0
+#define FLOATING_POINT_NON_IEEE_754 1
+
+
+#define I965_SURFACE_1D 0
+#define I965_SURFACE_2D 1
+#define I965_SURFACE_3D 2
+#define I965_SURFACE_CUBE 3
+#define I965_SURFACE_BUFFER 4
+#define I965_SURFACE_NULL 7
+
+#define I965_SURFACEFORMAT_R32G32B32A32_FLOAT 0x000
+#define I965_SURFACEFORMAT_R32G32B32A32_SINT 0x001
+#define I965_SURFACEFORMAT_R32G32B32A32_UINT 0x002
+#define I965_SURFACEFORMAT_R32G32B32A32_UNORM 0x003
+#define I965_SURFACEFORMAT_R32G32B32A32_SNORM 0x004
+#define I965_SURFACEFORMAT_R64G64_FLOAT 0x005
+#define I965_SURFACEFORMAT_R32G32B32X32_FLOAT 0x006
+#define I965_SURFACEFORMAT_R32G32B32A32_SSCALED 0x007
+#define I965_SURFACEFORMAT_R32G32B32A32_USCALED 0x008
+#define I965_SURFACEFORMAT_R32G32B32_FLOAT 0x040
+#define I965_SURFACEFORMAT_R32G32B32_SINT 0x041
+#define I965_SURFACEFORMAT_R32G32B32_UINT 0x042
+#define I965_SURFACEFORMAT_R32G32B32_UNORM 0x043
+#define I965_SURFACEFORMAT_R32G32B32_SNORM 0x044
+#define I965_SURFACEFORMAT_R32G32B32_SSCALED 0x045
+#define I965_SURFACEFORMAT_R32G32B32_USCALED 0x046
+#define I965_SURFACEFORMAT_R16G16B16A16_UNORM 0x080
+#define I965_SURFACEFORMAT_R16G16B16A16_SNORM 0x081
+#define I965_SURFACEFORMAT_R16G16B16A16_SINT 0x082
+#define I965_SURFACEFORMAT_R16G16B16A16_UINT 0x083
+#define I965_SURFACEFORMAT_R16G16B16A16_FLOAT 0x084
+#define I965_SURFACEFORMAT_R32G32_FLOAT 0x085
+#define I965_SURFACEFORMAT_R32G32_SINT 0x086
+#define I965_SURFACEFORMAT_R32G32_UINT 0x087
+#define I965_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS 0x088
+#define I965_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT 0x089
+#define I965_SURFACEFORMAT_L32A32_FLOAT 0x08A
+#define I965_SURFACEFORMAT_R32G32_UNORM 0x08B
+#define I965_SURFACEFORMAT_R32G32_SNORM 0x08C
+#define I965_SURFACEFORMAT_R64_FLOAT 0x08D
+#define I965_SURFACEFORMAT_R16G16B16X16_UNORM 0x08E
+#define I965_SURFACEFORMAT_R16G16B16X16_FLOAT 0x08F
+#define I965_SURFACEFORMAT_A32X32_FLOAT 0x090
+#define I965_SURFACEFORMAT_L32X32_FLOAT 0x091
+#define I965_SURFACEFORMAT_I32X32_FLOAT 0x092
+#define I965_SURFACEFORMAT_R16G16B16A16_SSCALED 0x093
+#define I965_SURFACEFORMAT_R16G16B16A16_USCALED 0x094
+#define I965_SURFACEFORMAT_R32G32_SSCALED 0x095
+#define I965_SURFACEFORMAT_R32G32_USCALED 0x096
+#define I965_SURFACEFORMAT_B8G8R8A8_UNORM 0x0C0
+#define I965_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB 0x0C1
+#define I965_SURFACEFORMAT_R10G10B10A2_UNORM 0x0C2
+#define I965_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB 0x0C3
+#define I965_SURFACEFORMAT_R10G10B10A2_UINT 0x0C4
+#define I965_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM 0x0C5
+#define I965_SURFACEFORMAT_R8G8B8A8_UNORM 0x0C7
+#define I965_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB 0x0C8
+#define I965_SURFACEFORMAT_R8G8B8A8_SNORM 0x0C9
+#define I965_SURFACEFORMAT_R8G8B8A8_SINT 0x0CA
+#define I965_SURFACEFORMAT_R8G8B8A8_UINT 0x0CB
+#define I965_SURFACEFORMAT_R16G16_UNORM 0x0CC
+#define I965_SURFACEFORMAT_R16G16_SNORM 0x0CD
+#define I965_SURFACEFORMAT_R16G16_SINT 0x0CE
+#define I965_SURFACEFORMAT_R16G16_UINT 0x0CF
+#define I965_SURFACEFORMAT_R16G16_FLOAT 0x0D0
+#define I965_SURFACEFORMAT_B10G10R10A2_UNORM 0x0D1
+#define I965_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB 0x0D2
+#define I965_SURFACEFORMAT_R11G11B10_FLOAT 0x0D3
+#define I965_SURFACEFORMAT_R32_SINT 0x0D6
+#define I965_SURFACEFORMAT_R32_UINT 0x0D7
+#define I965_SURFACEFORMAT_R32_FLOAT 0x0D8
+#define I965_SURFACEFORMAT_R24_UNORM_X8_TYPELESS 0x0D9
+#define I965_SURFACEFORMAT_X24_TYPELESS_G8_UINT 0x0DA
+#define I965_SURFACEFORMAT_L16A16_UNORM 0x0DF
+#define I965_SURFACEFORMAT_I24X8_UNORM 0x0E0
+#define I965_SURFACEFORMAT_L24X8_UNORM 0x0E1
+#define I965_SURFACEFORMAT_A24X8_UNORM 0x0E2
+#define I965_SURFACEFORMAT_I32_FLOAT 0x0E3
+#define I965_SURFACEFORMAT_L32_FLOAT 0x0E4
+#define I965_SURFACEFORMAT_A32_FLOAT 0x0E5
+#define I965_SURFACEFORMAT_B8G8R8X8_UNORM 0x0E9
+#define I965_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB 0x0EA
+#define I965_SURFACEFORMAT_R8G8B8X8_UNORM 0x0EB
+#define I965_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB 0x0EC
+#define I965_SURFACEFORMAT_R9G9B9E5_SHAREDEXP 0x0ED
+#define I965_SURFACEFORMAT_B10G10R10X2_UNORM 0x0EE
+#define I965_SURFACEFORMAT_L16A16_FLOAT 0x0F0
+#define I965_SURFACEFORMAT_R32_UNORM 0x0F1
+#define I965_SURFACEFORMAT_R32_SNORM 0x0F2
+#define I965_SURFACEFORMAT_R10G10B10X2_USCALED 0x0F3
+#define I965_SURFACEFORMAT_R8G8B8A8_SSCALED 0x0F4
+#define I965_SURFACEFORMAT_R8G8B8A8_USCALED 0x0F5
+#define I965_SURFACEFORMAT_R16G16_SSCALED 0x0F6
+#define I965_SURFACEFORMAT_R16G16_USCALED 0x0F7
+#define I965_SURFACEFORMAT_R32_SSCALED 0x0F8
+#define I965_SURFACEFORMAT_R32_USCALED 0x0F9
+#define I965_SURFACEFORMAT_B5G6R5_UNORM 0x100
+#define I965_SURFACEFORMAT_B5G6R5_UNORM_SRGB 0x101
+#define I965_SURFACEFORMAT_B5G5R5A1_UNORM 0x102
+#define I965_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB 0x103
+#define I965_SURFACEFORMAT_B4G4R4A4_UNORM 0x104
+#define I965_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB 0x105
+#define I965_SURFACEFORMAT_R8G8_UNORM 0x106
+#define I965_SURFACEFORMAT_R8G8_SNORM 0x107
+#define I965_SURFACEFORMAT_R8G8_SINT 0x108
+#define I965_SURFACEFORMAT_R8G8_UINT 0x109
+#define I965_SURFACEFORMAT_R16_UNORM 0x10A
+#define I965_SURFACEFORMAT_R16_SNORM 0x10B
+#define I965_SURFACEFORMAT_R16_SINT 0x10C
+#define I965_SURFACEFORMAT_R16_UINT 0x10D
+#define I965_SURFACEFORMAT_R16_FLOAT 0x10E
+#define I965_SURFACEFORMAT_I16_UNORM 0x111
+#define I965_SURFACEFORMAT_L16_UNORM 0x112
+#define I965_SURFACEFORMAT_A16_UNORM 0x113
+#define I965_SURFACEFORMAT_L8A8_UNORM 0x114
+#define I965_SURFACEFORMAT_I16_FLOAT 0x115
+#define I965_SURFACEFORMAT_L16_FLOAT 0x116
+#define I965_SURFACEFORMAT_A16_FLOAT 0x117
+#define I965_SURFACEFORMAT_R5G5_SNORM_B6_UNORM 0x119
+#define I965_SURFACEFORMAT_B5G5R5X1_UNORM 0x11A
+#define I965_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB 0x11B
+#define I965_SURFACEFORMAT_R8G8_SSCALED 0x11C
+#define I965_SURFACEFORMAT_R8G8_USCALED 0x11D
+#define I965_SURFACEFORMAT_R16_SSCALED 0x11E
+#define I965_SURFACEFORMAT_R16_USCALED 0x11F
+#define I965_SURFACEFORMAT_R8_UNORM 0x140
+#define I965_SURFACEFORMAT_R8_SNORM 0x141
+#define I965_SURFACEFORMAT_R8_SINT 0x142
+#define I965_SURFACEFORMAT_R8_UINT 0x143
+#define I965_SURFACEFORMAT_A8_UNORM 0x144
+#define I965_SURFACEFORMAT_I8_UNORM 0x145
+#define I965_SURFACEFORMAT_L8_UNORM 0x146
+#define I965_SURFACEFORMAT_P4A4_UNORM 0x147
+#define I965_SURFACEFORMAT_A4P4_UNORM 0x148
+#define I965_SURFACEFORMAT_R8_SSCALED 0x149
+#define I965_SURFACEFORMAT_R8_USCALED 0x14A
+#define I965_SURFACEFORMAT_R1_UINT 0x181
+#define I965_SURFACEFORMAT_YCRCB_NORMAL 0x182
+#define I965_SURFACEFORMAT_YCRCB_SWAPUVY 0x183
+#define I965_SURFACEFORMAT_BC1_UNORM 0x186
+#define I965_SURFACEFORMAT_BC2_UNORM 0x187
+#define I965_SURFACEFORMAT_BC3_UNORM 0x188
+#define I965_SURFACEFORMAT_BC4_UNORM 0x189
+#define I965_SURFACEFORMAT_BC5_UNORM 0x18A
+#define I965_SURFACEFORMAT_BC1_UNORM_SRGB 0x18B
+#define I965_SURFACEFORMAT_BC2_UNORM_SRGB 0x18C
+#define I965_SURFACEFORMAT_BC3_UNORM_SRGB 0x18D
+#define I965_SURFACEFORMAT_MONO8 0x18E
+#define I965_SURFACEFORMAT_YCRCB_SWAPUV 0x18F
+#define I965_SURFACEFORMAT_YCRCB_SWAPY 0x190
+#define I965_SURFACEFORMAT_DXT1_RGB 0x191
+#define I965_SURFACEFORMAT_FXT1 0x192
+#define I965_SURFACEFORMAT_R8G8B8_UNORM 0x193
+#define I965_SURFACEFORMAT_R8G8B8_SNORM 0x194
+#define I965_SURFACEFORMAT_R8G8B8_SSCALED 0x195
+#define I965_SURFACEFORMAT_R8G8B8_USCALED 0x196
+#define I965_SURFACEFORMAT_R64G64B64A64_FLOAT 0x197
+#define I965_SURFACEFORMAT_R64G64B64_FLOAT 0x198
+#define I965_SURFACEFORMAT_BC4_SNORM 0x199
+#define I965_SURFACEFORMAT_BC5_SNORM 0x19A
+#define I965_SURFACEFORMAT_R16G16B16_UNORM 0x19C
+#define I965_SURFACEFORMAT_R16G16B16_SNORM 0x19D
+#define I965_SURFACEFORMAT_R16G16B16_SSCALED 0x19E
+#define I965_SURFACEFORMAT_R16G16B16_USCALED 0x19F
+
+#define I965_CULLMODE_BOTH 0
+#define I965_CULLMODE_NONE 1
+#define I965_CULLMODE_FRONT 2
+#define I965_CULLMODE_BACK 3
+
+#define I965_MAPFILTER_NEAREST 0x0
+#define I965_MAPFILTER_LINEAR 0x1
+#define I965_MAPFILTER_ANISOTROPIC 0x2
+
+#define I965_MIPFILTER_NONE 0
+#define I965_MIPFILTER_NEAREST 1
+#define I965_MIPFILTER_LINEAR 3
+
+#define I965_TEXCOORDMODE_WRAP 0
+#define I965_TEXCOORDMODE_MIRROR 1
+#define I965_TEXCOORDMODE_CLAMP 2
+#define I965_TEXCOORDMODE_CUBE 3
+#define I965_TEXCOORDMODE_CLAMP_BORDER 4
+#define I965_TEXCOORDMODE_MIRROR_ONCE 5
+
+#define I965_BLENDFACTOR_ONE 0x1
+#define I965_BLENDFACTOR_SRC_COLOR 0x2
+#define I965_BLENDFACTOR_SRC_ALPHA 0x3
+#define I965_BLENDFACTOR_DST_ALPHA 0x4
+#define I965_BLENDFACTOR_DST_COLOR 0x5
+#define I965_BLENDFACTOR_SRC_ALPHA_SATURATE 0x6
+#define I965_BLENDFACTOR_CONST_COLOR 0x7
+#define I965_BLENDFACTOR_CONST_ALPHA 0x8
+#define I965_BLENDFACTOR_SRC1_COLOR 0x9
+#define I965_BLENDFACTOR_SRC1_ALPHA 0x0A
+#define I965_BLENDFACTOR_ZERO 0x11
+#define I965_BLENDFACTOR_INV_SRC_COLOR 0x12
+#define I965_BLENDFACTOR_INV_SRC_ALPHA 0x13
+#define I965_BLENDFACTOR_INV_DST_ALPHA 0x14
+#define I965_BLENDFACTOR_INV_DST_COLOR 0x15
+#define I965_BLENDFACTOR_INV_CONST_COLOR 0x17
+#define I965_BLENDFACTOR_INV_CONST_ALPHA 0x18
+#define I965_BLENDFACTOR_INV_SRC1_COLOR 0x19
+#define I965_BLENDFACTOR_INV_SRC1_ALPHA 0x1A
+
+#define I965_BLENDFUNCTION_ADD 0
+#define I965_BLENDFUNCTION_SUBTRACT 1
+#define I965_BLENDFUNCTION_REVERSE_SUBTRACT 2
+#define I965_BLENDFUNCTION_MIN 3
+#define I965_BLENDFUNCTION_MAX 4
+
+#define I965_SURFACERETURNFORMAT_FLOAT32 0
+#define I965_SURFACERETURNFORMAT_S1 1
+
+#define I965_VFCOMPONENT_NOSTORE 0
+#define I965_VFCOMPONENT_STORE_SRC 1
+#define I965_VFCOMPONENT_STORE_0 2
+#define I965_VFCOMPONENT_STORE_1_FLT 3
+#define I965_VFCOMPONENT_STORE_1_INT 4
+#define I965_VFCOMPONENT_STORE_VID 5
+#define I965_VFCOMPONENT_STORE_IID 6
+#define I965_VFCOMPONENT_STORE_PID 7
+
+#define VE0_VERTEX_BUFFER_INDEX_SHIFT 27
+#define VE0_VALID (1 << 26)
+#define VE0_FORMAT_SHIFT 16
+#define VE0_OFFSET_SHIFT 0
+#define VE1_VFCOMPONENT_0_SHIFT 28
+#define VE1_VFCOMPONENT_1_SHIFT 24
+#define VE1_VFCOMPONENT_2_SHIFT 20
+#define VE1_VFCOMPONENT_3_SHIFT 16
+#define VE1_DESTINATION_ELEMENT_OFFSET_SHIFT 0
+
+#define VB0_BUFFER_INDEX_SHIFT 27
+#define VB0_VERTEXDATA (0 << 26)
+#define VB0_INSTANCEDATA (1 << 26)
+#define VB0_BUFFER_PITCH_SHIFT 0
+
+#define _3DPRIMITIVE_VERTEX_SEQUENTIAL (0 << 15)
+#define _3DPRIMITIVE_VERTEX_RANDOM (1 << 15)
+#define _3DPRIMITIVE_TOPOLOGY_SHIFT 10
+
+#define _3DPRIM_POINTLIST 0x01
+#define _3DPRIM_LINELIST 0x02
+#define _3DPRIM_LINESTRIP 0x03
+#define _3DPRIM_TRILIST 0x04
+#define _3DPRIM_TRISTRIP 0x05
+#define _3DPRIM_TRIFAN 0x06
+#define _3DPRIM_QUADLIST 0x07
+#define _3DPRIM_QUADSTRIP 0x08
+#define _3DPRIM_LINELIST_ADJ 0x09
+#define _3DPRIM_LINESTRIP_ADJ 0x0A
+#define _3DPRIM_TRILIST_ADJ 0x0B
+#define _3DPRIM_TRISTRIP_ADJ 0x0C
+#define _3DPRIM_TRISTRIP_REVERSE 0x0D
+#define _3DPRIM_POLYGON 0x0E
+#define _3DPRIM_RECTLIST 0x0F
+#define _3DPRIM_LINELOOP 0x10
+#define _3DPRIM_POINTLIST_BF 0x11
+#define _3DPRIM_LINESTRIP_CONT 0x12
+#define _3DPRIM_LINESTRIP_BF 0x13
+#define _3DPRIM_LINESTRIP_CONT_BF 0x14
+#define _3DPRIM_TRIFAN_NOSTIPPLE 0x15
+
+#define I965_TILEWALK_XMAJOR 0
+#define I965_TILEWALK_YMAJOR 1
+
+#define URB_SIZE(intel) (IS_G4X(intel->device_id) ? 384 : 256)
+#endif /* _I965_DEFINES_H_ */
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
new file mode 100644
index 0000000..0b3f6c1
--- /dev/null
+++ b/i965_drv_video/i965_drv_video.c
@@ -0,0 +1,1446 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#include <string.h>
+#include <assert.h>
+
+#include "va_backend.h"
+#include "va_dricommon.h"
+
+#include "intel_driver.h"
+#include "intel_memman.h"
+#include "intel_batchbuffer.h"
+
+#include "i965_media.h"
+#include "i965_drv_video.h"
+
+#define CONFIG_ID_OFFSET 0x01000000
+#define CONTEXT_ID_OFFSET 0x02000000
+#define SURFACE_ID_OFFSET 0x04000000
+#define BUFFER_ID_OFFSET 0x08000000
+#define IMAGE_ID_OFFSET 0x0a000000
+#define SUBPIC_ID_OFFSET 0x10000000
+
+VAStatus
+i965_QueryConfigProfiles(VADriverContextP ctx,
+ VAProfile *profile_list, /* out */
+ int *num_profiles) /* out */
+{
+ int i = 0;
+
+ profile_list[i++] = VAProfileMPEG2Simple;
+ profile_list[i++] = VAProfileMPEG2Main;
+
+ /* If the assert fails then I965_MAX_PROFILES needs to be bigger */
+ assert(i <= I965_MAX_PROFILES);
+ *num_profiles = i;
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_QueryConfigEntrypoints(VADriverContextP ctx,
+ VAProfile profile,
+ VAEntrypoint *entrypoint_list, /* out */
+ int *num_entrypoints) /* out */
+{
+ switch (profile) {
+ case VAProfileMPEG2Simple:
+ case VAProfileMPEG2Main:
+ *num_entrypoints = 1;
+ entrypoint_list[0] = VAEntrypointVLD;
+ break;
+
+ default:
+ assert(0);
+ *num_entrypoints = 0;
+ break;
+ }
+
+ /* If the assert fails then I965_MAX_ENTRYPOINTS needs to be bigger */
+ assert(*num_entrypoints <= I965_MAX_ENTRYPOINTS);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_GetConfigAttributes(VADriverContextP ctx,
+ VAProfile profile,
+ VAEntrypoint entrypoint,
+ VAConfigAttrib *attrib_list, /* in/out */
+ int num_attribs)
+{
+ int i;
+
+ /* Other attributes don't seem to be defined */
+ /* What to do if we don't know the attribute? */
+ for (i = 0; i < num_attribs; i++) {
+ switch (attrib_list[i].type) {
+ case VAConfigAttribRTFormat:
+ attrib_list[i].value = VA_RT_FORMAT_YUV420;
+ break;
+
+ default:
+ /* Do nothing */
+ attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
+ break;
+ }
+ }
+
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_destroy_config(struct object_heap *heap, struct object_base *obj)
+{
+ object_heap_free(heap, obj);
+}
+
+static VAStatus
+i965_update_attribute(struct object_config *obj_config, VAConfigAttrib *attrib)
+{
+ int i;
+
+ /* Check existing attrbiutes */
+ for (i = 0; obj_config->num_attribs < i; i++) {
+ if (obj_config->attrib_list[i].type == attrib->type) {
+ /* Update existing attribute */
+ obj_config->attrib_list[i].value = attrib->value;
+ return VA_STATUS_SUCCESS;
+ }
+ }
+
+ if (obj_config->num_attribs < I965_MAX_CONFIG_ATTRIBUTES) {
+ i = obj_config->num_attribs;
+ obj_config->attrib_list[i].type = attrib->type;
+ obj_config->attrib_list[i].value = attrib->value;
+ obj_config->num_attribs++;
+ return VA_STATUS_SUCCESS;
+ }
+
+ return VA_STATUS_ERROR_MAX_NUM_EXCEEDED;
+}
+
+VAStatus
+i965_CreateConfig(VADriverContextP ctx,
+ VAProfile profile,
+ VAEntrypoint entrypoint,
+ VAConfigAttrib *attrib_list,
+ int num_attribs,
+ VAConfigID *config_id) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_config *obj_config;
+ int configID;
+ int i;
+ VAStatus vaStatus;
+
+ /* Validate profile & entrypoint */
+ switch (profile) {
+ case VAProfileMPEG2Simple:
+ case VAProfileMPEG2Main:
+ if (VAEntrypointVLD == entrypoint) {
+ vaStatus = VA_STATUS_SUCCESS;
+ } else {
+ vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+ }
+ break;
+
+ default:
+ assert(0);
+ vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ break;
+ }
+
+ if (VA_STATUS_SUCCESS != vaStatus) {
+ return vaStatus;
+ }
+
+ configID = NEW_CONFIG_ID();
+ obj_config = CONFIG(configID);
+
+ if (NULL == obj_config) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ return vaStatus;
+ }
+
+ obj_config->profile = profile;
+ obj_config->entrypoint = entrypoint;
+ obj_config->attrib_list[0].type = VAConfigAttribRTFormat;
+ obj_config->attrib_list[0].value = VA_RT_FORMAT_YUV420;
+ obj_config->num_attribs = 1;
+
+ for(i = 0; i < num_attribs; i++) {
+ vaStatus = i965_update_attribute(obj_config, &(attrib_list[i]));
+
+ if (VA_STATUS_SUCCESS != vaStatus) {
+ break;
+ }
+ }
+
+ /* Error recovery */
+ if (VA_STATUS_SUCCESS != vaStatus) {
+ i965_destroy_config(&i965->config_heap, (struct object_base *)obj_config);
+ } else {
+ *config_id = configID;
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_DestroyConfig(VADriverContextP ctx, VAConfigID config_id)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_config *obj_config = CONFIG(config_id);
+ VAStatus vaStatus;
+
+ if (NULL == obj_config) {
+ vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
+ return vaStatus;
+ }
+
+ i965_destroy_config(&i965->config_heap, (struct object_base *)obj_config);
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus i965_QueryConfigAttributes(VADriverContextP ctx,
+ VAConfigID config_id,
+ VAProfile *profile, /* out */
+ VAEntrypoint *entrypoint, /* out */
+ VAConfigAttrib *attrib_list, /* out */
+ int *num_attribs) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_config *obj_config = CONFIG(config_id);
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+ int i;
+
+ assert(obj_config);
+ *profile = obj_config->profile;
+ *entrypoint = obj_config->entrypoint;
+ *num_attribs = obj_config->num_attribs;
+
+ for(i = 0; i < obj_config->num_attribs; i++) {
+ attrib_list[i] = obj_config->attrib_list[i];
+ }
+
+ return vaStatus;
+}
+
+static void
+i965_destroy_surface(struct object_heap *heap, struct object_base *obj)
+{
+ struct object_surface *obj_surface = (struct object_surface *)obj;
+
+ dri_bo_unreference(obj_surface->bo);
+ obj_surface->bo = NULL;
+ object_heap_free(heap, obj);
+}
+
+VAStatus
+i965_CreateSurfaces(VADriverContextP ctx,
+ int width,
+ int height,
+ int format,
+ int num_surfaces,
+ VASurfaceID *surfaces) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ int i;
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+
+ /* We only support one format */
+ if (VA_RT_FORMAT_YUV420 != format) {
+ return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
+ }
+
+ for (i = 0; i < num_surfaces; i++) {
+ int surfaceID = NEW_SURFACE_ID();
+ struct object_surface *obj_surface = SURFACE(surfaceID);
+
+ if (NULL == obj_surface) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ break;
+ }
+
+ surfaces[i] = surfaceID;
+ obj_surface->status = VASurfaceReady;
+ obj_surface->width = width;
+ obj_surface->height = height;
+ obj_surface->size = SIZE_YUV420(width, height);
+ obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr,
+ "vaapi surface",
+ obj_surface->size,
+ 64);
+
+ assert(obj_surface->bo);
+ if (NULL == obj_surface->bo) {
+ vaStatus = VA_STATUS_ERROR_UNKNOWN;
+ break;
+ }
+ }
+
+ /* Error recovery */
+ if (VA_STATUS_SUCCESS != vaStatus) {
+ /* surfaces[i-1] was the last successful allocation */
+ for (; i--; ) {
+ struct object_surface *obj_surface = SURFACE(surfaces[i]);
+
+ surfaces[i] = VA_INVALID_SURFACE;
+ assert(obj_surface);
+ i965_destroy_surface(&i965->surface_heap, (struct object_base *)obj_surface);
+ }
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_DestroySurfaces(VADriverContextP ctx,
+ VASurfaceID *surface_list,
+ int num_surfaces)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ int i;
+
+ for (i = num_surfaces; i--; ) {
+ struct object_surface *obj_surface = SURFACE(surface_list[i]);
+
+ assert(obj_surface);
+ i965_destroy_surface(&i965->surface_heap, (struct object_base *)obj_surface);
+ }
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_QueryImageFormats(VADriverContextP ctx,
+ VAImageFormat *format_list, /* out */
+ int *num_formats) /* out */
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_PutImage2(VADriverContextP ctx,
+ VASurfaceID surface,
+ VAImageID image,
+ int src_x,
+ int src_y,
+ unsigned int src_width,
+ unsigned int src_height,
+ int dest_x,
+ int dest_y,
+ unsigned int dest_width,
+ unsigned int dest_height)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_QuerySubpictureFormats(VADriverContextP ctx,
+ VAImageFormat *format_list, /* out */
+ unsigned int *flags, /* out */
+ unsigned int *num_formats) /* out */
+{
+ /*support 2 subpicture formats*/
+ *num_formats = 2;
+ format_list[0].fourcc=FOURCC_IA44;
+ format_list[0].byte_order=VA_LSB_FIRST;
+ format_list[1].fourcc=FOURCC_AI44;
+ format_list[1].byte_order=VA_LSB_FIRST;
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_destroy_subpic(struct object_heap *heap, struct object_base *obj)
+{
+// struct object_subpic *obj_subpic = (struct object_subpic *)obj;
+
+ object_heap_free(heap, obj);
+}
+
+VAStatus
+i965_CreateSubpicture(VADriverContextP ctx,
+ VAImageID image,
+ VASubpictureID *subpicture) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+ VASubpictureID subpicID = NEW_SUBPIC_ID()
+
+ struct object_subpic *obj_subpic = SUBPIC(subpicID);
+ struct object_image *obj_image = IMAGE(image);
+
+ if (NULL == obj_subpic) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+ if (NULL == obj_image) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+ *subpicture = subpicID;
+ obj_subpic->image = image;
+ obj_subpic->width = obj_image->width;
+ obj_subpic->height = obj_image->height;
+ obj_subpic->bo = obj_image->bo;
+
+ return vaStatus;
+}
+
+VAStatus
+i965_DestroySubpicture(VADriverContextP ctx,
+ VASubpictureID subpicture)
+{
+
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_subpic *obj_subpic = SUBPIC(subpicture);
+ i965_destroy_subpic(&i965->subpic_heap, (struct object_base *)obj_subpic);
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_SetSubpictureImage(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ VAImageID image)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+/*
+ * pointer to an array holding the palette data. The size of the array is
+ * num_palette_entries * entry_bytes in size. The order of the components
+ * in the palette is described by the component_order in VASubpicture struct
+ */
+VAStatus
+i965_SetSubpicturePalette(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ unsigned char *palette)
+{
+ /*set palette in shader,so the following code is unused*/
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+ struct object_subpic *obj_subpic = SUBPIC(subpicture);
+ if (NULL == obj_subpic) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+ memcpy(obj_subpic->palette, palette, 3*16);
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_SetSubpictureChromakey(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ unsigned int chromakey_min,
+ unsigned int chromakey_max,
+ unsigned int chromakey_mask)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_SetSubpictureGlobalAlpha(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ float global_alpha)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_AssociateSubpicture(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ VASurfaceID *target_surfaces,
+ int num_surfaces,
+ short src_x, /* upper left offset in subpicture */
+ short src_y,
+ short dest_x, /* upper left offset in surface */
+ short dest_y,
+ unsigned short width,
+ unsigned short height,
+ /*
+ * whether to enable chroma-keying or global-alpha
+ * see VA_SUBPICTURE_XXX values
+ */
+ unsigned int flags)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+ /*only ipicture*/
+
+ struct object_surface *obj_surface = SURFACE(*target_surfaces);
+ struct object_subpic *obj_subpic = SUBPIC(subpicture);
+
+ if (NULL == obj_surface) {
+ vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
+ return vaStatus;
+ }
+
+ obj_subpic->dstx = dest_x;
+ obj_subpic->dsty = dest_y;
+
+ obj_surface->subpic = subpicture;
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_AssociateSubpicture2(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ VASurfaceID *target_surfaces,
+ int num_surfaces,
+ short src_x, /* upper left offset in subpicture */
+ short src_y,
+ unsigned short src_width,
+ unsigned short src_height,
+ short dest_x, /* upper left offset in surface */
+ short dest_y,
+ unsigned short dest_width,
+ unsigned short dest_height,
+ /*
+ * whether to enable chroma-keying or global-alpha
+ * see VA_SUBPICTURE_XXX values
+ */
+ unsigned int flags)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_DeassociateSubpicture(VADriverContextP ctx,
+ VASubpictureID subpicture,
+ VASurfaceID *target_surfaces,
+ int num_surfaces)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_reference_buffer_store(struct buffer_store **ptr,
+ struct buffer_store *buffer_store)
+{
+ assert(*ptr == NULL);
+
+ if (buffer_store) {
+ buffer_store->ref_count++;
+ *ptr = buffer_store;
+ }
+}
+
+static void
+i965_release_buffer_store(struct buffer_store **ptr)
+{
+ struct buffer_store *buffer_store = *ptr;
+
+ if (buffer_store == NULL)
+ return;
+
+ assert(buffer_store->bo || buffer_store->buffer);
+ assert(!(buffer_store->bo && buffer_store->buffer));
+ buffer_store->ref_count--;
+
+ if (buffer_store->ref_count == 0) {
+ dri_bo_unreference(buffer_store->bo);
+ free(buffer_store->buffer);
+ buffer_store->bo = NULL;
+ buffer_store->buffer = NULL;
+ free(buffer_store);
+ }
+
+ *ptr = NULL;
+}
+
+static void
+i965_destroy_context(struct object_heap *heap, struct object_base *obj)
+{
+ struct object_context *obj_context = (struct object_context *)obj;
+
+ i965_release_buffer_store(&obj_context->decode_state.pic_param);
+ i965_release_buffer_store(&obj_context->decode_state.slice_param);
+ i965_release_buffer_store(&obj_context->decode_state.iq_matrix);
+ i965_release_buffer_store(&obj_context->decode_state.bit_plane);
+ i965_release_buffer_store(&obj_context->decode_state.slice_data);
+ free(obj_context->render_targets);
+ object_heap_free(heap, obj);
+}
+
+VAStatus
+i965_CreateContext(VADriverContextP ctx,
+ VAConfigID config_id,
+ int picture_width,
+ int picture_height,
+ int flag,
+ VASurfaceID *render_targets,
+ int num_render_targets,
+ VAContextID *context) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_config *obj_config = CONFIG(config_id);
+ struct object_context *obj_context = NULL;
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+ int contextID;
+ int i;
+
+ if (NULL == obj_config) {
+ vaStatus = VA_STATUS_ERROR_INVALID_CONFIG;
+ return vaStatus;
+ }
+
+ /* Validate flag */
+ /* Validate picture dimensions */
+ contextID = NEW_CONTEXT_ID();
+ obj_context = CONTEXT(contextID);
+
+ if (NULL == obj_context) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ return vaStatus;
+ }
+
+ obj_context->context_id = contextID;
+ *context = contextID;
+ memset(&obj_context->decode_state, 0, sizeof(obj_context->decode_state));
+ obj_context->decode_state.current_render_target = -1;
+ obj_context->config_id = config_id;
+ obj_context->picture_width = picture_width;
+ obj_context->picture_height = picture_height;
+ obj_context->num_render_targets = num_render_targets;
+ obj_context->render_targets =
+ (VASurfaceID *)calloc(num_render_targets, sizeof(VASurfaceID));
+
+ for(i = 0; i < num_render_targets; i++) {
+ if (NULL == SURFACE(render_targets[i])) {
+ vaStatus = VA_STATUS_ERROR_INVALID_SURFACE;
+ break;
+ }
+
+ obj_context->render_targets[i] = render_targets[i];
+ }
+
+ obj_context->flags = flag;
+
+ /* Error recovery */
+ if (VA_STATUS_SUCCESS != vaStatus) {
+ i965_destroy_context(&i965->context_heap, (struct object_base *)obj_context);
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_DestroyContext(VADriverContextP ctx, VAContextID context)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context = CONTEXT(context);
+
+ assert(obj_context);
+ i965_destroy_context(&i965->context_heap, (struct object_base *)obj_context);
+
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_destroy_buffer(struct object_heap *heap, struct object_base *obj)
+{
+ struct object_buffer *obj_buffer = (struct object_buffer *)obj;
+
+ assert(obj_buffer->buffer_store);
+ i965_release_buffer_store(&obj_buffer->buffer_store);
+ object_heap_free(heap, obj);
+}
+
+VAStatus
+i965_CreateBuffer(VADriverContextP ctx,
+ VAContextID context, /* in */
+ VABufferType type, /* in */
+ unsigned int size, /* in */
+ unsigned int num_elements, /* in */
+ void *data, /* in */
+ VABufferID *buf_id) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_buffer *obj_buffer = NULL;
+ struct buffer_store *buffer_store = NULL;
+ int bufferID;
+
+ /* Validate type */
+ switch (type) {
+ case VAPictureParameterBufferType:
+ case VAIQMatrixBufferType:
+ case VABitPlaneBufferType:
+ case VASliceGroupMapBufferType:
+ case VASliceParameterBufferType:
+ case VASliceDataBufferType:
+ case VAMacroblockParameterBufferType:
+ case VAResidualDataBufferType:
+ case VADeblockingParameterBufferType:
+ case VAImageBufferType:
+ /* Ok */
+ break;
+
+ default:
+ return VA_STATUS_ERROR_UNSUPPORTED_BUFFERTYPE;
+ }
+
+ bufferID = NEW_BUFFER_ID();
+ obj_buffer = BUFFER(bufferID);
+
+ if (NULL == obj_buffer) {
+ return VA_STATUS_ERROR_ALLOCATION_FAILED;
+ }
+
+ obj_buffer->max_num_elements = num_elements;
+ obj_buffer->num_elements = num_elements;
+ obj_buffer->size_element = size;
+ obj_buffer->type = type;
+ obj_buffer->buffer_store = NULL;
+ buffer_store = calloc(1, sizeof(struct buffer_store));
+ assert(buffer_store);
+ buffer_store->ref_count = 1;
+
+ if (type == VASliceDataBufferType || type == VAImageBufferType) {
+ buffer_store->bo = dri_bo_alloc(i965->intel.bufmgr,
+ "Buffer",
+ size * num_elements, 64);
+ assert(buffer_store->bo);
+
+ if (data)
+ dri_bo_subdata(buffer_store->bo, 0, size * num_elements, data);
+ } else {
+ buffer_store->buffer = malloc(size * num_elements);
+ assert(buffer_store->buffer);
+
+ if (data)
+ memcpy(buffer_store->buffer, data, size * num_elements);
+ }
+
+ i965_reference_buffer_store(&obj_buffer->buffer_store, buffer_store);
+ i965_release_buffer_store(&buffer_store);
+ *buf_id = bufferID;
+
+ return VA_STATUS_SUCCESS;
+}
+
+
+VAStatus
+i965_BufferSetNumElements(VADriverContextP ctx,
+ VABufferID buf_id, /* in */
+ unsigned int num_elements) /* in */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_buffer *obj_buffer = BUFFER(buf_id);
+ VAStatus vaStatus = VA_STATUS_SUCCESS;
+
+ assert(obj_buffer);
+
+ if ((num_elements < 0) ||
+ (num_elements > obj_buffer->max_num_elements)) {
+ vaStatus = VA_STATUS_ERROR_UNKNOWN;
+ } else {
+ obj_buffer->num_elements = num_elements;
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_MapBuffer(VADriverContextP ctx,
+ VABufferID buf_id, /* in */
+ void **pbuf) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_buffer *obj_buffer = BUFFER(buf_id);
+ VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
+
+ assert(obj_buffer && obj_buffer->buffer_store);
+ assert(obj_buffer->buffer_store->bo || obj_buffer->buffer_store->buffer);
+ assert(!(obj_buffer->buffer_store->bo && obj_buffer->buffer_store->buffer));
+
+ if (NULL != obj_buffer->buffer_store->bo) {
+ dri_bo_map(obj_buffer->buffer_store->bo, 1);
+ assert(obj_buffer->buffer_store->bo->virtual);
+ *pbuf = obj_buffer->buffer_store->bo->virtual;
+ vaStatus = VA_STATUS_SUCCESS;
+ } else if (NULL != obj_buffer->buffer_store->buffer) {
+ *pbuf = obj_buffer->buffer_store->buffer;
+ vaStatus = VA_STATUS_SUCCESS;
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_UnmapBuffer(VADriverContextP ctx, VABufferID buf_id)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_buffer *obj_buffer = BUFFER(buf_id);
+ VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
+
+ assert(obj_buffer && obj_buffer->buffer_store);
+ assert(obj_buffer->buffer_store->bo || obj_buffer->buffer_store->buffer);
+ assert(!(obj_buffer->buffer_store->bo && obj_buffer->buffer_store->buffer));
+
+ if (NULL != obj_buffer->buffer_store->bo) {
+ dri_bo_unmap(obj_buffer->buffer_store->bo);
+ vaStatus = VA_STATUS_SUCCESS;
+ } else if (NULL != obj_buffer->buffer_store->buffer) {
+ /* Do nothing */
+ vaStatus = VA_STATUS_SUCCESS;
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_DestroyBuffer(VADriverContextP ctx, VABufferID buffer_id)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_buffer *obj_buffer = BUFFER(buffer_id);
+
+ assert(obj_buffer);
+ i965_destroy_buffer(&i965->buffer_heap, (struct object_base *)obj_buffer);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_BeginPicture(VADriverContextP ctx,
+ VAContextID context,
+ VASurfaceID render_target)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context = CONTEXT(context);
+ struct object_surface *obj_surface = SURFACE(render_target);
+ struct object_config *obj_config;
+ VAContextID config;
+ VAStatus vaStatus;
+
+ assert(obj_context);
+ assert(obj_surface);
+
+ config = obj_context->config_id;
+ obj_config = CONFIG(config);
+ assert(obj_config);
+
+ switch (obj_config->profile) {
+ case VAProfileMPEG2Simple:
+ case VAProfileMPEG2Main:
+ vaStatus = VA_STATUS_SUCCESS;
+ break;
+
+ default:
+ assert(0);
+ vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
+ break;
+ }
+
+ obj_context->decode_state.current_render_target = render_target;
+
+ return vaStatus;
+}
+
+static VAStatus
+i965_render_picture_parameter_buffer(VADriverContextP ctx,
+ struct object_context *obj_context,
+ struct object_buffer *obj_buffer)
+{
+ assert(obj_buffer->buffer_store->bo == NULL);
+ assert(obj_buffer->buffer_store->buffer);
+ i965_release_buffer_store(&obj_context->decode_state.pic_param);
+ i965_reference_buffer_store(&obj_context->decode_state.pic_param,
+ obj_buffer->buffer_store);
+
+ return VA_STATUS_SUCCESS;
+}
+
+static VAStatus
+i965_render_iq_matrix_buffer(VADriverContextP ctx,
+ struct object_context *obj_context,
+ struct object_buffer *obj_buffer)
+{
+ assert(obj_buffer->buffer_store->bo == NULL);
+ assert(obj_buffer->buffer_store->buffer);
+ i965_release_buffer_store(&obj_context->decode_state.iq_matrix);
+ i965_reference_buffer_store(&obj_context->decode_state.iq_matrix,
+ obj_buffer->buffer_store);
+
+ return VA_STATUS_SUCCESS;
+}
+
+static VAStatus
+i965_render_bit_plane_buffer(VADriverContextP ctx,
+ struct object_context *obj_context,
+ struct object_buffer *obj_buffer)
+{
+ assert(obj_buffer->buffer_store->bo == NULL);
+ assert(obj_buffer->buffer_store->buffer);
+ i965_release_buffer_store(&obj_context->decode_state.bit_plane);
+ i965_reference_buffer_store(&obj_context->decode_state.bit_plane,
+ obj_buffer->buffer_store);
+
+ return VA_STATUS_SUCCESS;
+}
+
+static VAStatus
+i965_render_slice_parameter_buffer(VADriverContextP ctx,
+ struct object_context *obj_context,
+ struct object_buffer *obj_buffer)
+{
+ assert(obj_buffer->buffer_store->bo == NULL);
+ assert(obj_buffer->buffer_store->buffer);
+ i965_release_buffer_store(&obj_context->decode_state.slice_param);
+ i965_reference_buffer_store(&obj_context->decode_state.slice_param,
+ obj_buffer->buffer_store);
+ obj_context->decode_state.num_slices = obj_buffer->num_elements;
+
+ return VA_STATUS_SUCCESS;
+}
+
+static VAStatus
+i965_render_slice_data_buffer(VADriverContextP ctx,
+ struct object_context *obj_context,
+ struct object_buffer *obj_buffer)
+{
+ assert(obj_buffer->buffer_store->buffer == NULL);
+ assert(obj_buffer->buffer_store->bo);
+ i965_release_buffer_store(&obj_context->decode_state.slice_data);
+ i965_reference_buffer_store(&obj_context->decode_state.slice_data,
+ obj_buffer->buffer_store);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_RenderPicture(VADriverContextP ctx,
+ VAContextID context,
+ VABufferID *buffers,
+ int num_buffers)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context;
+ int i;
+ VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
+
+ obj_context = CONTEXT(context);
+ assert(obj_context);
+
+ for (i = 0; i < num_buffers; i++) {
+ struct object_buffer *obj_buffer = BUFFER(buffers[i]);
+ assert(obj_buffer);
+
+ switch (obj_buffer->type) {
+ case VAPictureParameterBufferType:
+ vaStatus = i965_render_picture_parameter_buffer(ctx, obj_context, obj_buffer);
+ break;
+
+ case VAIQMatrixBufferType:
+ vaStatus = i965_render_iq_matrix_buffer(ctx, obj_context, obj_buffer);
+ break;
+
+ case VABitPlaneBufferType:
+ vaStatus = i965_render_bit_plane_buffer(ctx, obj_context, obj_buffer);
+ break;
+
+ case VASliceParameterBufferType:
+ vaStatus = i965_render_slice_parameter_buffer(ctx, obj_context, obj_buffer);
+ break;
+
+ case VASliceDataBufferType:
+ vaStatus = i965_render_slice_data_buffer(ctx, obj_context, obj_buffer);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return vaStatus;
+}
+
+VAStatus
+i965_EndPicture(VADriverContextP ctx, VAContextID context)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context = CONTEXT(context);
+ struct object_config *obj_config;
+ VAContextID config;
+
+ assert(obj_context);
+ assert(obj_context->decode_state.pic_param);
+ assert(obj_context->decode_state.slice_param);
+ assert(obj_context->decode_state.slice_data);
+
+ config = obj_context->config_id;
+ obj_config = CONFIG(config);
+ assert(obj_config);
+ i965_media_decode_picture(ctx, obj_config->profile, &obj_context->decode_state);
+ obj_context->decode_state.current_render_target = -1;
+ obj_context->decode_state.num_slices = 0;
+ i965_release_buffer_store(&obj_context->decode_state.pic_param);
+ i965_release_buffer_store(&obj_context->decode_state.slice_param);
+ i965_release_buffer_store(&obj_context->decode_state.iq_matrix);
+ i965_release_buffer_store(&obj_context->decode_state.bit_plane);
+ i965_release_buffer_store(&obj_context->decode_state.slice_data);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_SyncSurface(VADriverContextP ctx,
+ VAContextID context,
+ VASurfaceID render_target)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_context *obj_context = CONTEXT(context);
+ struct object_surface *obj_surface = SURFACE(render_target);
+
+ assert(obj_context);
+ assert(obj_surface);
+
+ /* Assume that this shouldn't be called before vaEndPicture() */
+ assert(obj_context->decode_state.current_render_target != render_target);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_QuerySurfaceStatus(VADriverContextP ctx,
+ VASurfaceID render_target,
+ VASurfaceStatus *status) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_surface *obj_surface = SURFACE(render_target);
+
+ assert(obj_surface);
+ *status = obj_surface->status;
+
+ return VA_STATUS_SUCCESS;
+}
+
+
+/*
+ * Query display attributes
+ * The caller must provide a "attr_list" array that can hold at
+ * least vaMaxNumDisplayAttributes() entries. The actual number of attributes
+ * returned in "attr_list" is returned in "num_attributes".
+ */
+VAStatus
+i965_QueryDisplayAttributes(VADriverContextP ctx,
+ VADisplayAttribute *attr_list, /* out */
+ int *num_attributes) /* out */
+{
+ /* TODO */
+ return VA_STATUS_ERROR_UNKNOWN;
+}
+
+/*
+ * Get display attributes
+ * This function returns the current attribute values in "attr_list".
+ * Only attributes returned with VA_DISPLAY_ATTRIB_GETTABLE set in the "flags" field
+ * from vaQueryDisplayAttributes() can have their values retrieved.
+ */
+VAStatus
+i965_GetDisplayAttributes(VADriverContextP ctx,
+ VADisplayAttribute *attr_list, /* in/out */
+ int num_attributes)
+{
+ /* TODO */
+ return VA_STATUS_ERROR_UNKNOWN;
+}
+
+/*
+ * Set display attributes
+ * Only attributes returned with VA_DISPLAY_ATTRIB_SETTABLE set in the "flags" field
+ * from vaQueryDisplayAttributes() can be set. If the attribute is not settable or
+ * the value is out of range, the function returns VA_STATUS_ERROR_ATTR_NOT_SUPPORTED
+ */
+VAStatus
+i965_SetDisplayAttributes(VADriverContextP ctx,
+ VADisplayAttribute *attr_list,
+ int num_attributes)
+{
+ /* TODO */
+ return VA_STATUS_ERROR_UNKNOWN;
+}
+
+VAStatus
+i965_DbgCopySurfaceToBuffer(VADriverContextP ctx,
+ VASurfaceID surface,
+ void **buffer, /* out */
+ unsigned int *stride) /* out */
+{
+ /* TODO */
+ return VA_STATUS_ERROR_UNKNOWN;
+}
+
+static VAStatus
+i965_Init(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+
+ if (intel_driver_init(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ if (!IS_G4X(i965->intel.device_id))
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ if (i965_media_init(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ if (i965_render_init(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_destroy_heap(struct object_heap *heap,
+ void (*func)(struct object_heap *heap, struct object_base *object))
+{
+ struct object_base *object;
+ object_heap_iterator iter;
+
+ object = object_heap_first(heap, &iter);
+
+ while (object) {
+ if (func)
+ func(heap, object);
+
+ object = object_heap_next(heap, &iter);
+ }
+
+ object_heap_destroy(heap);
+}
+
+
+
+VAStatus
+i965_CreateImage(VADriverContextP ctx,
+ VAImageFormat *format,
+ int width,
+ int height,
+ VAImage *image) /* out */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ VAStatus va_status;
+ /*we will receive the actual subpicture size from the player,now we assume it is 720*32*/
+ char subpic_buf[width*height];
+ int subpic_size = 720*32;
+ unsigned int img_buf_id;
+
+ image->image_id = NEW_IMAGE_ID();
+ struct object_image *obj_image = IMAGE(image->image_id);
+
+ /*assume we got IA44 in format[0]*/
+ image->format = *format;
+
+ /*create empty buffer*/
+ va_status = i965_CreateBuffer(ctx, 0, VAImageBufferType,
+ subpic_size, 1, subpic_buf, &img_buf_id);
+ assert( VA_STATUS_SUCCESS == va_status );
+ struct object_buffer *obj_buf = BUFFER(img_buf_id);
+
+ image->buf = img_buf_id;
+ image->width = width;
+ image->height = height;
+
+ obj_image->width = width;
+ obj_image->height = height;
+ obj_image->size = subpic_size;
+ obj_image->bo = obj_buf->buffer_store->bo;
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus i965_DeriveImage(VADriverContextP ctx,
+ VASurfaceID surface,
+ VAImage *image) /* out */
+{
+ return VA_STATUS_SUCCESS;
+}
+
+static void
+i965_destroy_image(struct object_heap *heap, struct object_base *obj)
+{
+ object_heap_free(heap, obj);
+}
+
+
+VAStatus
+i965_DestroyImage(VADriverContextP ctx, VAImageID image)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_image *obj_image = IMAGE(image);
+
+ i965_DestroyBuffer(ctx, image);
+
+ i965_destroy_image(&i965->image_heap, (struct object_base *)obj_image);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_SetImagePalette(VADriverContextP ctx,
+ VAImageID image,
+ unsigned char *palette)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_GetImage(VADriverContextP ctx,
+ VASurfaceID surface,
+ int x, /* coordinates of the upper left source pixel */
+ int y,
+ unsigned int width, /* width and height of the region */
+ unsigned int height,
+ VAImageID image)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_PutImage(VADriverContextP ctx,
+ VASurfaceID surface,
+ VAImageID image,
+ int src_x,
+ int src_y,
+ unsigned int width,
+ unsigned int height,
+ int dest_x,
+ int dest_y)
+{
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_PutSurface(VADriverContextP ctx,
+ VASurfaceID surface,
+ Drawable draw, /* X Drawable */
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth,
+ VARectangle *cliprects, /* client supplied clip list */
+ unsigned int number_cliprects, /* number of clip rects in the clip list */
+ unsigned int flags) /* de-interlacing flags */
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+ struct i965_render_state *render_state = &i965->render_state;
+ struct dri_drawable *dri_drawable;
+ union dri_buffer *buffer;
+ struct intel_region *dest_region;
+ struct object_surface *obj_surface;
+ int ret;
+ uint32_t name;
+ Bool new_region = False;
+ /* Currently don't support DRI1 */
+ if (dri_state->driConnectedFlag != VA_DRI2)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ dri_drawable = dri_get_drawable(ctx, draw);
+ assert(dri_drawable);
+
+ buffer = dri_get_rendering_buffer(ctx, dri_drawable);
+ assert(buffer);
+
+ dest_region = render_state->draw_region;
+
+ if (dest_region) {
+ assert(dest_region->bo);
+ dri_bo_flink(dest_region->bo, &name);
+
+ if (buffer->dri2.name != name) {
+ new_region = True;
+ dri_bo_unreference(dest_region->bo);
+ }
+ } else {
+ dest_region = (struct intel_region *)calloc(1, sizeof(*dest_region));
+ assert(dest_region);
+ render_state->draw_region = dest_region;
+ new_region = True;
+ }
+
+ if (new_region) {
+ dest_region->x = dri_drawable->x;
+ dest_region->y = dri_drawable->y;
+ dest_region->width = dri_drawable->width;
+ dest_region->height = dri_drawable->height;
+ dest_region->cpp = buffer->dri2.cpp;
+ dest_region->pitch = buffer->dri2.pitch;
+
+ dest_region->bo = intel_bo_gem_create_from_name(i965->intel.bufmgr, "rendering buffer", buffer->dri2.name);
+ assert(dest_region->bo);
+
+ ret = dri_bo_get_tiling(dest_region->bo, &(dest_region->tiling), &(dest_region->swizzle));
+ assert(ret == 0);
+ }
+
+ i965_render_put_surface(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+ obj_surface = SURFACE(surface);
+ if(obj_surface->subpic != 0) {
+ i965_render_put_subpic(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+ }
+ dri_swap_buffer(ctx, dri_drawable);
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+i965_Terminate(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+
+ if (i965_render_terminate(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ if (i965_media_terminate(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ if (intel_driver_terminate(ctx) == False)
+ return VA_STATUS_ERROR_UNKNOWN;
+
+ i965_destroy_heap(&i965->buffer_heap, i965_destroy_buffer);
+ i965_destroy_heap(&i965->image_heap, i965_destroy_image);
+ i965_destroy_heap(&i965->subpic_heap, i965_destroy_subpic);
+ i965_destroy_heap(&i965->surface_heap, i965_destroy_surface);
+ i965_destroy_heap(&i965->context_heap, i965_destroy_context);
+ i965_destroy_heap(&i965->config_heap, i965_destroy_config);
+
+ free(ctx->pDriverData);
+ ctx->pDriverData = NULL;
+
+ return VA_STATUS_SUCCESS;
+}
+
+VAStatus
+__vaDriverInit_0_30( VADriverContextP ctx )
+{
+ struct i965_driver_data *i965;
+ int result;
+
+ ctx->version_major = 0;
+ ctx->version_minor = 29;
+ ctx->max_profiles = I965_MAX_PROFILES;
+ ctx->max_entrypoints = I965_MAX_ENTRYPOINTS;
+ ctx->max_attributes = I965_MAX_CONFIG_ATTRIBUTES;
+ ctx->max_image_formats = I965_MAX_IMAGE_FORMATS;
+ ctx->max_subpic_formats = I965_MAX_SUBPIC_FORMATS;
+ ctx->max_display_attributes = I965_MAX_DISPLAY_ATTRIBUTES;
+ ctx->str_vendor = I965_STR_VENDOR;
+
+ ctx->vtable.vaTerminate = i965_Terminate;
+ ctx->vtable.vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints;
+ ctx->vtable.vaQueryConfigProfiles = i965_QueryConfigProfiles;
+ ctx->vtable.vaQueryConfigEntrypoints = i965_QueryConfigEntrypoints;
+ ctx->vtable.vaQueryConfigAttributes = i965_QueryConfigAttributes;
+ ctx->vtable.vaCreateConfig = i965_CreateConfig;
+ ctx->vtable.vaDestroyConfig = i965_DestroyConfig;
+ ctx->vtable.vaGetConfigAttributes = i965_GetConfigAttributes;
+ ctx->vtable.vaCreateSurfaces = i965_CreateSurfaces;
+ ctx->vtable.vaDestroySurfaces = i965_DestroySurfaces;
+ ctx->vtable.vaCreateContext = i965_CreateContext;
+ ctx->vtable.vaDestroyContext = i965_DestroyContext;
+ ctx->vtable.vaCreateBuffer = i965_CreateBuffer;
+ ctx->vtable.vaBufferSetNumElements = i965_BufferSetNumElements;
+ ctx->vtable.vaMapBuffer = i965_MapBuffer;
+ ctx->vtable.vaUnmapBuffer = i965_UnmapBuffer;
+ ctx->vtable.vaDestroyBuffer = i965_DestroyBuffer;
+ ctx->vtable.vaBeginPicture = i965_BeginPicture;
+ ctx->vtable.vaRenderPicture = i965_RenderPicture;
+ ctx->vtable.vaEndPicture = i965_EndPicture;
+ ctx->vtable.vaSyncSurface = i965_SyncSurface;
+ ctx->vtable.vaQuerySurfaceStatus = i965_QuerySurfaceStatus;
+ ctx->vtable.vaPutSurface = i965_PutSurface;
+ ctx->vtable.vaQueryImageFormats = i965_QueryImageFormats;
+ ctx->vtable.vaCreateImage = i965_CreateImage;
+ ctx->vtable.vaDeriveImage = i965_DeriveImage;
+ ctx->vtable.vaDestroyImage = i965_DestroyImage;
+ ctx->vtable.vaSetImagePalette = i965_SetImagePalette;
+ ctx->vtable.vaGetImage = i965_GetImage;
+ ctx->vtable.vaPutImage = i965_PutImage;
+ ctx->vtable.vaPutImage2 = i965_PutImage2;
+ ctx->vtable.vaQuerySubpictureFormats = i965_QuerySubpictureFormats;
+ ctx->vtable.vaCreateSubpicture = i965_CreateSubpicture;
+ ctx->vtable.vaDestroySubpicture = i965_DestroySubpicture;
+ ctx->vtable.vaSetSubpictureImage = i965_SetSubpictureImage;
+ ctx->vtable.vaSetSubpicturePalette = i965_SetSubpicturePalette;
+ ctx->vtable.vaSetSubpictureChromakey = i965_SetSubpictureChromakey;
+ ctx->vtable.vaSetSubpictureGlobalAlpha = i965_SetSubpictureGlobalAlpha;
+ ctx->vtable.vaAssociateSubpicture = i965_AssociateSubpicture;
+ ctx->vtable.vaAssociateSubpicture2 = i965_AssociateSubpicture2;
+ ctx->vtable.vaDeassociateSubpicture = i965_DeassociateSubpicture;
+ ctx->vtable.vaQueryDisplayAttributes = i965_QueryDisplayAttributes;
+ ctx->vtable.vaGetDisplayAttributes = i965_GetDisplayAttributes;
+ ctx->vtable.vaSetDisplayAttributes = i965_SetDisplayAttributes;
+// ctx->vtable.vaDbgCopySurfaceToBuffer = i965_DbgCopySurfaceToBuffer;
+
+ i965 = (struct i965_driver_data *)calloc(1, sizeof(*i965));
+ assert(i965);
+ ctx->pDriverData = (void *)i965;
+
+ result = object_heap_init(&i965->config_heap,
+ sizeof(struct object_config),
+ CONFIG_ID_OFFSET);
+ assert(result == 0);
+
+ result = object_heap_init(&i965->context_heap,
+ sizeof(struct object_context),
+ CONTEXT_ID_OFFSET);
+ assert(result == 0);
+
+ result = object_heap_init(&i965->surface_heap,
+ sizeof(struct object_surface),
+ SURFACE_ID_OFFSET);
+ assert(result == 0);
+
+ result = object_heap_init(&i965->buffer_heap,
+ sizeof(struct object_buffer),
+ BUFFER_ID_OFFSET);
+ assert(result == 0);
+
+ result = object_heap_init(&i965->image_heap,
+ sizeof(struct object_image),
+ IMAGE_ID_OFFSET);
+ assert(result == 0);
+
+ result = object_heap_init(&i965->subpic_heap,
+ sizeof(struct object_subpic),
+ SUBPIC_ID_OFFSET);
+ assert(result == 0);
+
+ return i965_Init(ctx);
+}
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
new file mode 100644
index 0000000..1771b0d
--- /dev/null
+++ b/i965_drv_video/i965_drv_video.h
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#ifndef _I965_DRV_VIDEO_H_
+#define _I965_DRV_VIDEO_H_
+
+#include "va.h"
+#include "object_heap.h"
+
+#include "intel_driver.h"
+
+#include "i965_media.h"
+#include "i965_render.h"
+
+#define I965_MAX_PROFILES 11
+#define I965_MAX_ENTRYPOINTS 5
+#define I965_MAX_CONFIG_ATTRIBUTES 10
+#define I965_MAX_IMAGE_FORMATS 10
+#define I965_MAX_SUBPIC_FORMATS 4
+#define I965_MAX_DISPLAY_ATTRIBUTES 4
+#define I965_STR_VENDOR "i965 Driver 0.1"
+
+struct buffer_store
+{
+ unsigned char *buffer;
+ dri_bo *bo;
+ int ref_count;
+};
+
+struct object_config
+{
+ struct object_base base;
+ VAProfile profile;
+ VAEntrypoint entrypoint;
+ VAConfigAttrib attrib_list[I965_MAX_CONFIG_ATTRIBUTES];
+ int num_attribs;
+};
+
+struct decode_state
+{
+ struct buffer_store *pic_param;
+ struct buffer_store *slice_param;
+ struct buffer_store *iq_matrix;
+ struct buffer_store *bit_plane;
+ struct buffer_store *slice_data;
+ VASurfaceID current_render_target;
+ int num_slices;
+};
+
+struct object_context
+{
+ struct object_base base;
+ VAContextID context_id;
+ VAConfigID config_id;
+ VASurfaceID *render_targets;
+ int num_render_targets;
+ int picture_width;
+ int picture_height;
+ int flags;
+ struct decode_state decode_state;
+};
+
+struct object_surface
+{
+ struct object_base base;
+ VASurfaceStatus status;
+ VASubpictureID subpic;
+ int width;
+ int height;
+ int size;
+ dri_bo *bo;
+};
+
+struct object_buffer
+{
+ struct object_base base;
+ struct buffer_store *buffer_store;
+ int max_num_elements;
+ int num_elements;
+ int size_element;
+ VABufferType type;
+};
+struct object_image
+{
+ struct object_base base;
+ int width;
+ int height;
+ int size;
+ dri_bo *bo;
+};
+struct object_subpic
+{
+ struct object_base base;
+ VAImageID image;
+ int dstx;
+ int dsty;
+ int width;
+ int height;
+ unsigned char palette[3][16];
+ dri_bo *bo;
+};
+
+
+
+struct i965_driver_data
+{
+ struct intel_driver_data intel;
+ struct object_heap config_heap;
+ struct object_heap context_heap;
+ struct object_heap surface_heap;
+ struct object_heap buffer_heap;
+ struct object_heap image_heap;
+ struct object_heap subpic_heap;
+ struct i965_media_state media_state;
+ struct i965_render_state render_state;
+};
+
+#define NEW_CONFIG_ID() object_heap_allocate(&i965->config_heap);
+#define NEW_CONTEXT_ID() object_heap_allocate(&i965->context_heap);
+#define NEW_SURFACE_ID() object_heap_allocate(&i965->surface_heap);
+#define NEW_BUFFER_ID() object_heap_allocate(&i965->buffer_heap);
+#define NEW_IMAGE_ID() object_heap_allocate(&i965->image_heap);
+#define NEW_SUBPIC_ID() object_heap_allocate(&i965->subpic_heap);
+
+#define CONFIG(id) ((struct object_config *)object_heap_lookup(&i965->config_heap, id))
+#define CONTEXT(id) ((struct object_context *)object_heap_lookup(&i965->context_heap, id))
+#define SURFACE(id) ((struct object_surface *)object_heap_lookup(&i965->surface_heap, id))
+#define BUFFER(id) ((struct object_buffer *)object_heap_lookup(&i965->buffer_heap, id))
+#define IMAGE(id) ((struct object_image *)object_heap_lookup(&i965->image_heap, id))
+#define SUBPIC(id) ((struct object_subpic *)object_heap_lookup(&i965->subpic_heap, id))
+
+#define FOURCC_IA44 0x34344149
+#define FOURCC_AI44 0x34344941
+
+#define STRIDE(w) (((w) + 0xf) & ~0xf)
+#define SIZE_YUV420(w, h) (h * (STRIDE(w) + STRIDE(w >> 1)))
+
+static INLINE struct i965_driver_data *
+i965_driver_data(VADriverContextP ctx)
+{
+ return (struct i965_driver_data *)(ctx->pDriverData);
+}
+
+#endif /* _I965_DRV_VIDEO_H_ */
diff --git a/i965_drv_video/i965_drv_video.la b/i965_drv_video/i965_drv_video.la
new file mode 100644
index 0000000..1fc7278
--- /dev/null
+++ b/i965_drv_video/i965_drv_video.la
@@ -0,0 +1,42 @@
+# i965_drv_video.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.2 Debian-2.2.2-1
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='i965_drv_video.so'
+
+# Names of this library.
+library_names='i965_drv_video.so i965_drv_video.so i965_drv_video.so'
+
+# The name of the static archive.
+old_library=''
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -L/opt/X11R7/lib /opt/X11R7/lib/libdrm_intel.la /opt/X11R7/lib/libdrm.la -lrt /home/znh/libva.old/src/libva.la -lX11 -lXext /opt/X11R7/lib/libXext.la /opt/X11R7/lib/libX11.la /opt/X11R7/lib/libXdmcp.la -ldl /opt/X11R7/lib/libXau.la -lpthread'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for i965_drv_video.
+current=0
+age=0
+revision=0
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=yes
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/opt/X11R7/lib/dri'
+relink_command="(cd /home/znh/libva.old/i965_drv_video; /bin/sh /home/znh/libva.old/libtool --tag CC --mode=relink gcc -Wall -I../src -I../common -I../intel -I/opt/X11R7/include -I/opt/X11R7/include/drm -DIN_LIBVA -g -O2 -module -avoid-version -no-undefined -Wl,--no-undefined -L/opt/X11R7/lib -ldrm -ldrm_intel -o i965_drv_video.la -rpath /opt/X11R7/lib/dri object_heap.lo intel_batchbuffer.lo intel_memman.lo intel_driver.lo i965_media.lo i965_media_mpeg2.lo i965_render.lo i965_drv_video.lo ../src/libva.la -lpthread @inst_prefix_dir@)"
diff --git a/i965_drv_video/i965_media.c b/i965_drv_video/i965_media.c
new file mode 100644
index 0000000..bc51e8e
--- /dev/null
+++ b/i965_drv_video/i965_media.c
@@ -0,0 +1,268 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "va_backend.h"
+
+#include "intel_batchbuffer.h"
+#include "intel_driver.h"
+
+#include "i965_defines.h"
+#include "i965_media_mpeg2.h"
+#include "i965_media.h"
+#include "i965_drv_video.h"
+
+static void
+i965_media_pipeline_select(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 1);
+ OUT_BATCH(ctx, CMD_PIPELINE_SELECT | PIPELINE_SELECT_MEDIA);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_urb_layout(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ unsigned int vfe_fence, cs_fence;
+
+ vfe_fence = media_state->urb.cs_start;
+ cs_fence = URB_SIZE((&i965->intel));
+
+ BEGIN_BATCH(ctx, 3);
+ OUT_BATCH(ctx, CMD_URB_FENCE | UF0_VFE_REALLOC | UF0_CS_REALLOC | 1);
+ OUT_BATCH(ctx, 0);
+ OUT_BATCH(ctx,
+ (vfe_fence << UF2_VFE_FENCE_SHIFT) | /* VFE_SIZE */
+ (cs_fence << UF2_CS_FENCE_SHIFT)); /* CS_SIZE */
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_state_base_address(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 6);
+ OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 4);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_state_pointers(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+
+ BEGIN_BATCH(ctx, 3);
+ OUT_BATCH(ctx, CMD_MEDIA_STATE_POINTERS | 1);
+
+ if (media_state->extended_state.enabled)
+ OUT_RELOC(ctx, media_state->extended_state.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 1);
+ else
+ OUT_BATCH(ctx, 0);
+
+ OUT_RELOC(ctx, media_state->vfe_state.bo, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_cs_urb_layout(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+
+ BEGIN_BATCH(ctx, 2);
+ OUT_BATCH(ctx, CMD_CS_URB_STATE | 0);
+ OUT_BATCH(ctx,
+ ((media_state->urb.size_cs_entry - 1) << 4) | /* URB Entry Allocation Size */
+ (media_state->urb.num_cs_entries << 0)); /* Number of URB Entries */
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_pipeline_state(VADriverContextP ctx)
+{
+ i965_media_state_base_address(ctx);
+ i965_media_state_pointers(ctx);
+ i965_media_cs_urb_layout(ctx);
+}
+
+static void
+i965_media_constant_buffer(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+
+ BEGIN_BATCH(ctx, 2);
+ OUT_BATCH(ctx, CMD_CONSTANT_BUFFER | (1 << 8) | (2 - 2));
+ OUT_RELOC(ctx, media_state->curbe.bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ media_state->urb.size_cs_entry - 1);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_media_pipeline_setup(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+
+ intel_batchbuffer_start_atomic(ctx, 0x1000);
+ intel_batchbuffer_emit_mi_flush(ctx); /* step 1 */
+ i965_media_pipeline_select(ctx); /* step 2 */
+ i965_media_urb_layout(ctx); /* step 3 */
+ i965_media_pipeline_state(ctx); /* step 4 */
+ i965_media_constant_buffer(ctx, decode_state); /* step 5 */
+ assert(media_state->media_objects);
+ media_state->media_objects(ctx, decode_state); /* step 6 */
+ intel_batchbuffer_end_atomic(ctx);
+}
+
+static void
+i965_media_decode_init(VADriverContextP ctx, VAProfile profile)
+{
+ int i;
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ dri_bo *bo;
+
+ /* constant buffer */
+ dri_bo_unreference(media_state->curbe.bo);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "constant buffer",
+ 4096, 64);
+ assert(bo);
+ media_state->curbe.bo = bo;
+
+ /* surface state */
+ for (i = 0; i < MAX_MEDIA_SURFACES; i++) {
+ dri_bo_unreference(media_state->surface_state[i].bo);
+ media_state->surface_state[i].bo = NULL;
+ }
+
+ /* binding table */
+ dri_bo_unreference(media_state->binding_table.bo);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "binding table",
+ MAX_MEDIA_SURFACES * sizeof(unsigned int), 32);
+ assert(bo);
+ media_state->binding_table.bo = bo;
+
+ /* interface descriptor remapping table */
+ dri_bo_unreference(media_state->idrt.bo);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "interface discriptor",
+ MAX_INTERFACE_DESC * sizeof(struct i965_interface_descriptor), 16);
+ assert(bo);
+ media_state->idrt.bo = bo;
+
+ /* vfe state */
+ dri_bo_unreference(media_state->vfe_state.bo);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "vfe state",
+ sizeof(struct i965_vfe_state), 32);
+ assert(bo);
+ media_state->vfe_state.bo = bo;
+
+ /* extended state */
+ media_state->extended_state.enabled = 0;
+
+ switch (profile) {
+ case VAProfileMPEG2Simple:
+ case VAProfileMPEG2Main:
+ i965_media_mpeg2_decode_init(ctx);
+ break;
+
+ default:
+ assert(0);
+ break;
+ }
+}
+
+void
+i965_media_decode_picture(VADriverContextP ctx,
+ VAProfile profile,
+ struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+
+ i965_media_decode_init(ctx, profile);
+ assert(media_state->states_setup);
+ media_state->states_setup(ctx, decode_state);
+ i965_media_pipeline_setup(ctx, decode_state);
+ intel_batchbuffer_flush(ctx);
+}
+
+Bool
+i965_media_init(VADriverContextP ctx)
+{
+ i965_media_mpeg2_init(ctx);
+ return True;
+}
+
+Bool
+i965_media_terminate(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ int i;
+
+ for (i = 0; i < MAX_MEDIA_SURFACES; i++) {
+ dri_bo_unreference(media_state->surface_state[i].bo);
+ media_state->surface_state[i].bo = NULL;
+ }
+
+ dri_bo_unreference(media_state->extended_state.bo);
+ media_state->extended_state.bo = NULL;
+
+ dri_bo_unreference(media_state->vfe_state.bo);
+ media_state->vfe_state.bo = NULL;
+
+ dri_bo_unreference(media_state->idrt.bo);
+ media_state->idrt.bo = NULL;
+
+ dri_bo_unreference(media_state->binding_table.bo);
+ media_state->binding_table.bo = NULL;
+
+ dri_bo_unreference(media_state->curbe.bo);
+ media_state->curbe.bo = NULL;
+
+ i965_media_mpeg2_ternimate(ctx);
+ return True;
+}
+
diff --git a/i965_drv_video/i965_media.h b/i965_drv_video/i965_media.h
new file mode 100644
index 0000000..e207f4e
--- /dev/null
+++ b/i965_drv_video/i965_media.h
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#ifndef _I965_MEDIA_H_
+#define _I965_MEDIA_H_
+
+#include <xf86drm.h>
+#include <drm.h>
+#include <i915_drm.h>
+#include <intel_bufmgr.h>
+
+#include "i965_structs.h"
+
+#define MAX_INTERFACE_DESC 16
+#define MAX_MEDIA_SURFACES 32
+
+#define MPEG_TOP_FIELD 1
+#define MPEG_BOTTOM_FIELD 2
+#define MPEG_FRAME 3
+
+struct decode_state;
+
+struct media_kernel
+{
+ char *name;
+ int interface;
+ unsigned int (*bin)[4];
+ int size;
+ dri_bo *bo;
+};
+
+struct i965_media_state
+{
+ struct {
+ dri_bo *bo;
+ } surface_state[MAX_MEDIA_SURFACES];
+
+ struct {
+ dri_bo *bo;
+ } binding_table;
+
+ struct {
+ dri_bo *bo;
+ } idrt; /* interface descriptor remap table */
+
+ struct {
+ dri_bo *bo;
+ int enabled;
+ } extended_state;
+
+ struct {
+ dri_bo *bo;
+ } vfe_state;
+
+ struct {
+ dri_bo *bo;
+ } curbe;
+
+ struct {
+ unsigned int vfe_start;
+ unsigned int cs_start;
+
+ unsigned int num_vfe_entries;
+ unsigned int num_cs_entries;
+
+ unsigned int size_vfe_entry;
+ unsigned int size_cs_entry;
+ } urb;
+
+ void (*states_setup)(VADriverContextP ctx, struct decode_state *decode_state);
+ void (*media_objects)(VADriverContextP ctx, struct decode_state *decode_state);
+};
+
+Bool i965_media_init(VADriverContextP ctx);
+Bool i965_media_terminate(VADriverContextP ctx);
+void i965_media_decode_picture(VADriverContextP ctx,
+ VAProfile profile,
+ struct decode_state *decode_state);
+#endif /* _I965_MEDIA_H_ */
diff --git a/i965_drv_video/i965_media_mpeg2.c b/i965_drv_video/i965_media_mpeg2.c
new file mode 100644
index 0000000..0069301
--- /dev/null
+++ b/i965_drv_video/i965_media_mpeg2.c
@@ -0,0 +1,778 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "va_backend.h"
+
+#include "intel_batchbuffer.h"
+#include "intel_driver.h"
+
+#include "i965_defines.h"
+#include "i965_media.h"
+#include "i965_media_mpeg2.h"
+#include "i965_drv_video.h"
+
+#define SURFACE_TARGET 0
+#define SURFACE_FORWARD 1
+#define SURFACE_BACKWARD 2
+#define SURFACE_BIDIRECT 3
+
+enum interface {
+ FRAME_INTRA = 0,
+ FRAME_FRAME_PRED_FORWARD,
+ FRAME_FRAME_PRED_BACKWARD,
+ FRAME_FRAME_PRED_BIDIRECT,
+ FRAME_FIELD_PRED_FORWARD,
+ FRAME_FIELD_PRED_BACKWARD,
+ FRAME_FIELD_PRED_BIDIRECT,
+ LIB_INTERFACE,
+ FIELD_INTRA,
+ FIELD_FORWARD,
+ FIELD_FORWARD_16X8,
+ FIELD_BACKWARD,
+ FIELD_BACKWARD_16X8,
+ FIELD_BIDIRECT,
+ FIELD_BIDIRECT_16X8
+};
+
+/* idct table */
+#define C0 23170
+#define C1 22725
+#define C2 21407
+#define C3 19266
+#define C4 16383
+#define C5 12873
+#define C6 8867
+#define C7 4520
+const uint32_t idct_table[] = {
+ C4, C1, C2, C3, C4, C5, C6, C7, //g5
+ C4, C1, C2, C3, C4, C5, C6, C7,
+ C4, C3, C6,-C7,-C4,-C1,-C2,-C5,
+ C4, C3, C6,-C7,-C4,-C1,-C2,-C5,
+ C4, C5,-C6,-C1,-C4, C7, C2, C3,
+ C4, C5,-C6,-C1,-C4, C7, C2, C3,
+ C4, C7,-C2,-C5, C4, C3,-C6,-C1,
+ C4, C7,-C2,-C5, C4, C3,-C6,-C1,
+ C4,-C7,-C2, C5, C4,-C3,-C6, C1,
+ C4,-C7,-C2, C5, C4,-C3,-C6, C1,
+ C4,-C5,-C6, C1,-C4,-C7, C2,-C3,
+ C4,-C5,-C6, C1,-C4,-C7, C2,-C3,
+ C4,-C3, C6, C7,-C4, C1,-C2, C5,
+ C4,-C3, C6, C7,-C4, C1,-C2, C5,
+ C4,-C1, C2,-C3, C4,-C5, C6,-C7,
+ C4,-C1, C2,-C3, C4,-C5, C6,-C7 //g20
+};
+#undef C0
+#undef C1
+#undef C2
+#undef C3
+#undef C4
+#undef C5
+#undef C6
+#undef C7
+
+const uint32_t zigzag_direct[64] = {
+ 0, 1, 8, 16, 9, 2, 3, 10,
+ 17, 24, 32, 25, 18, 11, 4, 5,
+ 12, 19, 26, 33, 40, 48, 41, 34,
+ 27, 20, 13, 6, 7, 14, 21, 28,
+ 35, 42, 49, 56, 57, 50, 43, 36,
+ 29, 22, 15, 23, 30, 37, 44, 51,
+ 58, 59, 52, 45, 38, 31, 39, 46,
+ 53, 60, 61, 54, 47, 55, 62, 63
+};
+
+static uint32_t frame_intra_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_intra.g4b"
+};
+static uint32_t frame_frame_pred_forward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_frame_pred_forward.g4b"
+};
+static uint32_t frame_frame_pred_backward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_frame_pred_backward.g4b"
+};
+static uint32_t frame_frame_pred_bidirect_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b"
+};
+static uint32_t frame_field_pred_forward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_field_pred_forward.g4b"
+};
+static uint32_t frame_field_pred_backward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_field_pred_backward.g4b"
+};
+static uint32_t frame_field_pred_bidirect_kernel[][4] = {
+ #include "shaders/mpeg2/vld/frame_field_pred_bidirect.g4b"
+};
+static uint32_t lib_kernel[][4] = {
+ #include "shaders/mpeg2/vld/lib.g4b"
+};
+/*field picture*/
+static uint32_t field_intra_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_intra.g4b"
+};
+static uint32_t field_forward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_forward.g4b"
+};
+static uint32_t field_forward_16x8_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_forward_16x8.g4b"
+};
+static uint32_t field_backward_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_backward.g4b"
+};
+static uint32_t field_backward_16x8_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_backward_16x8.g4b"
+};
+static uint32_t field_bidirect_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_bidirect.g4b"
+};
+static uint32_t field_bidirect_16x8_kernel[][4] = {
+ #include "shaders/mpeg2/vld/field_bidirect_16x8.g4b"
+};
+
+static struct media_kernel mpeg2_vld_kernels[] = {
+ {
+ "FRAME_INTRA",
+ FRAME_INTRA,
+ frame_intra_kernel,
+ sizeof(frame_intra_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FRAME_PRED_FORWARD",
+ FRAME_FRAME_PRED_FORWARD,
+ frame_frame_pred_forward_kernel,
+ sizeof(frame_frame_pred_forward_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FRAME_PRED_BACKWARD",
+ FRAME_FRAME_PRED_BACKWARD,
+ frame_frame_pred_backward_kernel,
+ sizeof(frame_frame_pred_backward_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FRAME_PRED_BIDIRECT",
+ FRAME_FRAME_PRED_BIDIRECT,
+ frame_frame_pred_bidirect_kernel,
+ sizeof(frame_frame_pred_bidirect_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FIELD_PRED_FORWARD",
+ FRAME_FIELD_PRED_FORWARD,
+ frame_field_pred_forward_kernel,
+ sizeof(frame_field_pred_forward_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FIELD_PRED_BACKWARD",
+ FRAME_FIELD_PRED_BACKWARD,
+ frame_field_pred_backward_kernel,
+ sizeof(frame_field_pred_backward_kernel),
+ NULL
+ },
+
+ {
+ "FRAME_FIELD_PRED_BIDIRECT",
+ FRAME_FIELD_PRED_BIDIRECT,
+ frame_field_pred_bidirect_kernel,
+ sizeof(frame_field_pred_bidirect_kernel),
+ NULL
+ },
+
+ {
+ "LIB",
+ LIB_INTERFACE,
+ lib_kernel,
+ sizeof(lib_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_INTRA",
+ FIELD_INTRA,
+ field_intra_kernel,
+ sizeof(field_intra_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_FORWARD",
+ FIELD_FORWARD,
+ field_forward_kernel,
+ sizeof(field_forward_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_FORWARD_16X8",
+ FIELD_FORWARD_16X8,
+ field_forward_16x8_kernel,
+ sizeof(field_forward_16x8_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_BACKWARD",
+ FIELD_BACKWARD,
+ field_backward_kernel,
+ sizeof(field_backward_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_BACKWARD_16X8",
+ FIELD_BACKWARD_16X8,
+ field_backward_16x8_kernel,
+ sizeof(field_backward_16x8_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_BIDIRECT",
+ FIELD_BIDIRECT,
+ field_bidirect_kernel,
+ sizeof(field_bidirect_kernel),
+ NULL
+ },
+
+ {
+ "FIELD_BIDIRECT_16X8",
+ FIELD_BIDIRECT_16X8,
+ field_bidirect_16x8_kernel,
+ sizeof(field_bidirect_16x8_kernel),
+ NULL
+ }
+};
+
+#define NUM_MPEG2_VLD_KERNELS (sizeof(mpeg2_vld_kernels)/sizeof(mpeg2_vld_kernels[0]))
+
+static void
+i965_media_mpeg2_surface_state(VADriverContextP ctx,
+ int index,
+ struct object_surface *obj_surface,
+ unsigned long offset,
+ int w, int h,
+ Bool is_dst,
+ int vert_line_stride,
+ int vert_line_stride_ofs)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ struct i965_surface_state *ss;
+ dri_bo *bo;
+ uint32_t write_domain, read_domain;
+
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "surface state",
+ sizeof(struct i965_surface_state), 32);
+ assert(bo);
+ dri_bo_map(bo, 1);
+ assert(bo->virtual);
+ ss = bo->virtual;
+ memset(ss, 0, sizeof(*ss));
+ ss->ss0.surface_type = I965_SURFACE_2D;
+ ss->ss0.surface_format = I965_SURFACEFORMAT_R8_SINT;
+ ss->ss0.vert_line_stride = vert_line_stride;
+ ss->ss0.vert_line_stride_ofs = vert_line_stride_ofs;
+ ss->ss1.base_addr = obj_surface->bo->offset + offset;
+ ss->ss2.width = w - 1;
+ ss->ss2.height = h - 1;
+ ss->ss3.pitch = w - 1;
+
+ if (is_dst) {
+ write_domain = I915_GEM_DOMAIN_RENDER;
+ read_domain = I915_GEM_DOMAIN_RENDER;
+ } else {
+ write_domain = 0;
+ read_domain = I915_GEM_DOMAIN_SAMPLER;
+ }
+
+ dri_bo_emit_reloc(bo,
+ read_domain, write_domain,
+ offset,
+ offsetof(struct i965_surface_state, ss1),
+ obj_surface->bo);
+ dri_bo_unmap(bo);
+
+ assert(index < MAX_MEDIA_SURFACES);
+// assert(media_state->surface_state[index].bo == NULL);
+ media_state->surface_state[index].bo = bo;
+}
+
+static void
+i965_media_mpeg2_surface_setup(VADriverContextP ctx,
+ int base_index,
+ struct object_surface *obj_surface,
+ Bool is_dst,
+ int picture_structure,
+ int surface)
+{
+ int w = obj_surface->width;
+ int h = obj_surface->height;
+
+ if (picture_structure == MPEG_FRAME) {
+ i965_media_mpeg2_surface_state(ctx, base_index + 0, obj_surface,
+ 0, w, h,
+ is_dst, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 1, obj_surface,
+ w * h, w / 2, h / 2,
+ is_dst, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 2, obj_surface,
+ w * h + w * h / 4, w / 2, h / 2,
+ is_dst, 0, 0);
+ } else {
+ if (surface == SURFACE_TARGET) {
+ i965_media_mpeg2_surface_state(ctx, 3, obj_surface,
+ 0, w, h,
+ False, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, 10, obj_surface,
+ w * h, w / 2, h / 2,
+ False, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, 11, obj_surface,
+ w * h + w * h / 4, w / 2, h / 2,
+ False, 0, 0);
+ if (picture_structure == MPEG_TOP_FIELD) {
+ i965_media_mpeg2_surface_state(ctx, base_index + 0, obj_surface,
+ 0, w, h,
+ True, 1, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 1, obj_surface,
+ w * h, w / 2, h / 2,
+ True, 1, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 2, obj_surface,
+ w * h + w * h / 4, w / 2, h / 2,
+ True, 1, 0);
+ } else {
+ assert(picture_structure == MPEG_BOTTOM_FIELD);
+ i965_media_mpeg2_surface_state(ctx, base_index + 0, obj_surface,
+ 0, w, h,
+ True, 1, 1);
+ i965_media_mpeg2_surface_state(ctx, base_index + 1, obj_surface,
+ w * h, w / 2, h / 2,
+ True, 1, 1);
+ i965_media_mpeg2_surface_state(ctx, base_index + 2, obj_surface,
+ w * h + w * h / 4, w / 2, h / 2,
+ True, 1, 1);
+ }
+ } else {
+ i965_media_mpeg2_surface_state(ctx, base_index + 0, obj_surface,
+ 0, w, h,
+ is_dst, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 1, obj_surface,
+ w * h, w / 2, h / 2,
+ is_dst, 0, 0);
+ i965_media_mpeg2_surface_state(ctx, base_index + 2, obj_surface,
+ w * h + w * h / 4, w / 2, h / 2,
+ is_dst, 0, 0);
+ }
+ }
+}
+
+void
+i965_media_mpeg2_surfaces_setup(VADriverContextP ctx,
+ struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_surface *obj_surface;
+ VAPictureParameterBufferMPEG2 *param;
+
+ assert(decode_state->pic_param && decode_state->pic_param->buffer);
+ param = (VAPictureParameterBufferMPEG2 *)decode_state->pic_param->buffer;
+
+ obj_surface = SURFACE(decode_state->current_render_target);
+ assert(obj_surface);
+ i965_media_mpeg2_surface_setup(ctx, 0, obj_surface, True,
+ param->picture_coding_extension.bits.picture_structure, SURFACE_TARGET);
+
+ obj_surface = SURFACE(param->forward_reference_picture);
+ if (!obj_surface) {
+// assert(param->picture_coding_type == 1); /* I-picture */
+ } else {
+ i965_media_mpeg2_surface_setup(ctx, 4, obj_surface, False,
+ param->picture_coding_extension.bits.picture_structure, SURFACE_FORWARD);
+ obj_surface = SURFACE(param->backward_reference_picture);
+ if (!obj_surface) {
+ assert(param->picture_coding_type == 2); /* P-picture */
+
+ obj_surface = SURFACE(param->forward_reference_picture);
+ i965_media_mpeg2_surface_setup(ctx, 7, obj_surface, False,
+ param->picture_coding_extension.bits.picture_structure, SURFACE_BACKWARD);
+ } else {
+ assert(param->picture_coding_type == 3); /* B-picture */
+ i965_media_mpeg2_surface_setup(ctx, 7, obj_surface, False,
+ param->picture_coding_extension.bits.picture_structure, SURFACE_BIDIRECT);
+ }
+ }
+}
+
+static void
+i965_media_mpeg2_binding_table(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ int i;
+ unsigned int *binding_table;
+ dri_bo *bo = media_state->binding_table.bo;
+
+ dri_bo_map(bo, 1);
+ assert(bo->virtual);
+ binding_table = bo->virtual;
+ memset(binding_table, 0, bo->size);
+
+ for (i = 0; i < MAX_MEDIA_SURFACES; i++) {
+ if (media_state->surface_state[i].bo) {
+ binding_table[i] = media_state->surface_state[i].bo->offset;
+ dri_bo_emit_reloc(bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ i * sizeof(*binding_table),
+ media_state->surface_state[i].bo);
+ }
+ }
+
+ dri_bo_unmap(media_state->binding_table.bo);
+}
+
+static void
+i965_media_mpeg2_vfe_state(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ struct i965_vfe_state *vfe_state;
+ dri_bo *bo;
+
+ bo = media_state->vfe_state.bo;
+ dri_bo_map(bo, 1);
+ assert(bo->virtual);
+ vfe_state = bo->virtual;
+ memset(vfe_state, 0, sizeof(*vfe_state));
+ vfe_state->vfe0.extend_vfe_state_present = 1;
+ vfe_state->vfe1.vfe_mode = VFE_VLD_MODE;
+ vfe_state->vfe1.num_urb_entries = media_state->urb.num_vfe_entries;
+ vfe_state->vfe1.children_present = 0;
+ vfe_state->vfe1.urb_entry_alloc_size = media_state->urb.size_vfe_entry - 1;
+ vfe_state->vfe1.max_threads = media_state->urb.num_vfe_entries - 1;
+ vfe_state->vfe2.interface_descriptor_base =
+ media_state->idrt.bo->offset >> 4; /* reloc */
+ dri_bo_emit_reloc(bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ offsetof(struct i965_vfe_state, vfe2),
+ media_state->idrt.bo);
+ dri_bo_unmap(bo);
+}
+
+static void
+i965_media_mpeg2_interface_descriptor_remap_table(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ struct i965_interface_descriptor *desc;
+ int i;
+ dri_bo *bo;
+
+ bo = media_state->idrt.bo;
+ dri_bo_map(bo, 1);
+ assert(bo->virtual);
+ desc = bo->virtual;
+
+ for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) {
+ memset(desc, 0, sizeof(*desc));
+ desc->desc0.grf_reg_blocks = 15;
+ desc->desc0.kernel_start_pointer = mpeg2_vld_kernels[i].bo->offset >> 6; /* reloc */
+ desc->desc1.const_urb_entry_read_offset = 0;
+ desc->desc1.const_urb_entry_read_len = 30;
+ desc->desc3.binding_table_entry_count = 0;
+ desc->desc3.binding_table_pointer =
+ media_state->binding_table.bo->offset >> 5; /*reloc */
+
+ dri_bo_emit_reloc(bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ desc->desc0.grf_reg_blocks,
+ i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc0),
+ mpeg2_vld_kernels[i].bo);
+
+ dri_bo_emit_reloc(bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ desc->desc3.binding_table_entry_count,
+ i * sizeof(*desc) + offsetof(struct i965_interface_descriptor, desc3),
+ media_state->binding_table.bo);
+ desc++;
+ }
+
+ dri_bo_unmap(bo);
+}
+
+void
+i965_media_mpeg2_vld_state(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ struct i965_vld_state *vld_state;
+ VAPictureParameterBufferMPEG2 *param;
+
+ assert(decode_state->pic_param && decode_state->pic_param->buffer);
+ param = (VAPictureParameterBufferMPEG2 *)decode_state->pic_param->buffer;
+
+ assert(media_state->extended_state.bo);
+ dri_bo_map(media_state->extended_state.bo, 1);
+ assert(media_state->extended_state.bo->virtual);
+ vld_state = media_state->extended_state.bo->virtual;
+ memset(vld_state, 0, sizeof(*vld_state));
+
+ vld_state->vld0.f_code_0_0 = ((param->f_code >> 12) & 0xf);
+ vld_state->vld0.f_code_0_1 = ((param->f_code >> 8) & 0xf);
+ vld_state->vld0.f_code_1_0 = ((param->f_code >> 4) & 0xf);
+ vld_state->vld0.f_code_1_1 = (param->f_code & 0xf);
+ vld_state->vld0.intra_dc_precision = param->picture_coding_extension.bits.intra_dc_precision;
+ vld_state->vld0.picture_structure = param->picture_coding_extension.bits.picture_structure;
+ vld_state->vld0.top_field_first = param->picture_coding_extension.bits.top_field_first;
+ vld_state->vld0.frame_predict_frame_dct = param->picture_coding_extension.bits.frame_pred_frame_dct;
+ vld_state->vld0.concealment_motion_vector = param->picture_coding_extension.bits.concealment_motion_vectors;
+ vld_state->vld0.quantizer_scale_type = param->picture_coding_extension.bits.q_scale_type;
+ vld_state->vld0.intra_vlc_format = param->picture_coding_extension.bits.intra_vlc_format;
+ vld_state->vld0.scan_order = param->picture_coding_extension.bits.alternate_scan;
+
+ vld_state->vld1.picture_coding_type = param->picture_coding_type;
+
+ if (vld_state->vld0.picture_structure == MPEG_FRAME) {
+ /*frame picture*/
+ vld_state->desc_remap_table0.index_0 = FRAME_INTRA;
+ vld_state->desc_remap_table0.index_1 = FRAME_FRAME_PRED_FORWARD;
+ vld_state->desc_remap_table0.index_2 = FRAME_FIELD_PRED_FORWARD;
+ vld_state->desc_remap_table0.index_3 = FRAME_FIELD_PRED_BIDIRECT; /* dual prime */
+ vld_state->desc_remap_table0.index_4 = FRAME_FRAME_PRED_BACKWARD;
+ vld_state->desc_remap_table0.index_5 = FRAME_FIELD_PRED_BACKWARD;
+ vld_state->desc_remap_table0.index_6 = FRAME_FRAME_PRED_BIDIRECT;
+ vld_state->desc_remap_table0.index_7 = FRAME_FIELD_PRED_BIDIRECT;
+
+ vld_state->desc_remap_table1.index_8 = FRAME_INTRA;
+ vld_state->desc_remap_table1.index_9 = FRAME_FRAME_PRED_FORWARD;
+ vld_state->desc_remap_table1.index_10 = FRAME_FIELD_PRED_FORWARD;
+ vld_state->desc_remap_table1.index_11 = FRAME_FIELD_PRED_BIDIRECT;
+ vld_state->desc_remap_table1.index_12 = FRAME_FRAME_PRED_BACKWARD;
+ vld_state->desc_remap_table1.index_13 = FRAME_FIELD_PRED_BACKWARD;
+ vld_state->desc_remap_table1.index_14 = FRAME_FRAME_PRED_BIDIRECT;
+ vld_state->desc_remap_table1.index_15 = FRAME_FIELD_PRED_BIDIRECT;
+ } else {
+ /*field picture*/
+ vld_state->desc_remap_table0.index_0 = FIELD_INTRA;
+ vld_state->desc_remap_table0.index_1 = FIELD_FORWARD;
+ vld_state->desc_remap_table0.index_2 = FIELD_FORWARD_16X8;
+ vld_state->desc_remap_table0.index_3 = FIELD_BIDIRECT; /* dual prime */
+ vld_state->desc_remap_table0.index_4 = FIELD_BACKWARD;
+ vld_state->desc_remap_table0.index_5 = FIELD_BACKWARD_16X8;
+ vld_state->desc_remap_table0.index_6 = FIELD_BIDIRECT;
+ vld_state->desc_remap_table0.index_7 = FIELD_BIDIRECT_16X8;
+ }
+
+ dri_bo_unmap(media_state->extended_state.bo);
+}
+
+static void
+i965_media_mpeg2_upload_constants(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ int i, j;
+ unsigned char *constant_buffer;
+ unsigned char *qmx;
+ unsigned int *lib_reloc;
+ int lib_reloc_offset = 0;
+
+ dri_bo_map(media_state->curbe.bo, 1);
+ assert(media_state->curbe.bo->virtual);
+ constant_buffer = media_state->curbe.bo->virtual;
+
+ /* iq_matrix */
+ if (decode_state->iq_matrix && decode_state->iq_matrix->buffer) {
+ VAIQMatrixBufferMPEG2 *iq_matrix = (VAIQMatrixBufferMPEG2 *)decode_state->iq_matrix->buffer;
+
+ /* Upload quantisation matrix in row-major order. The mplayer vaapi
+ * patch passes quantisation matrix in zig-zag order to va library.
+ * Do we need a flag in VAIQMatrixBufferMPEG2 to specify the order
+ * of the quantisation matrix?
+ */
+ qmx = constant_buffer;
+ if (iq_matrix->load_intra_quantiser_matrix) {
+ for (i = 0; i < 64; i++) {
+ j = zigzag_direct[i];
+ qmx[j] = iq_matrix->intra_quantiser_matrix[i];
+ }
+ }
+
+ qmx = constant_buffer + 64;
+ if (iq_matrix->load_non_intra_quantiser_matrix) {
+ for (i = 0; i < 64; i++) {
+ j = zigzag_direct[i];
+ qmx[j] = iq_matrix->non_intra_quantiser_matrix[i];
+ }
+ }
+
+ /* no chroma quantisation matrices for 4:2:0 data */
+ }
+
+ /* idct table */
+ memcpy(constant_buffer + 128, idct_table, sizeof(idct_table));
+
+ /* idct lib reloc */
+ lib_reloc_offset = 128 + sizeof(idct_table);
+ lib_reloc = (unsigned int *)(constant_buffer + lib_reloc_offset);
+ for (i = 0; i < 8; i++) {
+ lib_reloc[i] = mpeg2_vld_kernels[LIB_INTERFACE].bo->offset;
+ dri_bo_emit_reloc(media_state->curbe.bo,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ lib_reloc_offset + i * sizeof(unsigned int),
+ mpeg2_vld_kernels[LIB_INTERFACE].bo);
+ }
+
+ dri_bo_unmap(media_state->curbe.bo);
+}
+
+static void
+i965_media_mpeg2_states_setup(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ i965_media_mpeg2_surfaces_setup(ctx, decode_state);
+ i965_media_mpeg2_binding_table(ctx);
+ i965_media_mpeg2_interface_descriptor_remap_table(ctx);
+ i965_media_mpeg2_vld_state(ctx, decode_state);
+ i965_media_mpeg2_vfe_state(ctx);
+ i965_media_mpeg2_upload_constants(ctx, decode_state);
+}
+
+static void
+i965_media_mpeg2_objects(VADriverContextP ctx, struct decode_state *decode_state)
+{
+ int i;
+ VASliceParameterBufferMPEG2 *slice_param;
+
+ assert(decode_state->slice_param && decode_state->slice_param->buffer);
+ slice_param = (VASliceParameterBufferMPEG2 *)decode_state->slice_param->buffer;
+
+ for (i = 0; i < decode_state->num_slices; i++) {
+ assert(slice_param->slice_data_flag == VA_SLICE_DATA_FLAG_ALL);
+
+ BEGIN_BATCH(ctx, 6);
+ OUT_BATCH(ctx, CMD_MEDIA_OBJECT | 4);
+ OUT_BATCH(ctx, 0);
+ OUT_BATCH(ctx, slice_param->slice_data_size - (slice_param->macroblock_offset >> 3));
+ OUT_RELOC(ctx, decode_state->slice_data->bo,
+ I915_GEM_DOMAIN_SAMPLER, 0,
+ slice_param->slice_data_offset + (slice_param->macroblock_offset >> 3));
+ OUT_BATCH(ctx,
+ ((0 << 24) |
+ (slice_param->slice_vertical_position << 16) |
+ (127 << 8) |
+ (slice_param->macroblock_offset & 0x7)));
+ OUT_BATCH(ctx, slice_param->quantiser_scale_code << 24);
+ ADVANCE_BATCH(ctx);
+ slice_param++;
+ }
+}
+
+void
+i965_media_mpeg2_decode_init(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_media_state *media_state = &i965->media_state;
+ dri_bo *bo;
+
+ media_state->extended_state.enabled = 1;
+ dri_bo_unreference(media_state->extended_state.bo);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "vld state",
+ sizeof(struct i965_vld_state), 32);
+ assert(bo);
+ media_state->extended_state.bo = bo;
+
+ /* URB */
+ media_state->urb.num_vfe_entries = 28;
+ media_state->urb.size_vfe_entry = 13;
+
+ media_state->urb.num_cs_entries = 1;
+ media_state->urb.size_cs_entry = 16;
+
+ media_state->urb.vfe_start = 0;
+ media_state->urb.cs_start = media_state->urb.vfe_start +
+ media_state->urb.num_vfe_entries * media_state->urb.size_vfe_entry;
+ assert(media_state->urb.cs_start +
+ media_state->urb.num_cs_entries * media_state->urb.size_cs_entry <= URB_SIZE((&i965->intel)));
+
+ /* hook functions */
+ media_state->states_setup = i965_media_mpeg2_states_setup;
+ media_state->media_objects = i965_media_mpeg2_objects;
+
+}
+
+Bool
+i965_media_mpeg2_init(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ int i;
+
+ /* kernel */
+ assert(NUM_MPEG2_VLD_KERNELS <= MAX_INTERFACE_DESC);
+
+ for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) {
+ struct media_kernel *kernel = &mpeg2_vld_kernels[i];
+ kernel->bo = dri_bo_alloc(i965->intel.bufmgr,
+ kernel->name,
+ kernel->size, 64);
+ assert(kernel->bo);
+ dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin);
+ }
+
+ return True;
+}
+
+Bool
+i965_media_mpeg2_ternimate(VADriverContextP ctx)
+{
+ int i;
+
+ for (i = 0; i < NUM_MPEG2_VLD_KERNELS; i++) {
+ struct media_kernel *kernel = &mpeg2_vld_kernels[i];
+
+ dri_bo_unreference(kernel->bo);
+ kernel->bo = NULL;
+ }
+
+ return True;
+}
+
diff --git a/i965_drv_video/i965_media_mpeg2.h b/i965_drv_video/i965_media_mpeg2.h
new file mode 100644
index 0000000..bfeda13
--- /dev/null
+++ b/i965_drv_video/i965_media_mpeg2.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#ifndef _I965_MEDIA_MPEG2_H_
+#define _I965_MEDIA_MPEG2_H_
+
+#include <xf86drm.h>
+#include <drm.h>
+#include <i915_drm.h>
+#include <intel_bufmgr.h>
+
+#include "i965_structs.h"
+
+struct decode_state;
+
+Bool i965_media_mpeg2_init(VADriverContextP ctx);
+Bool i965_media_mpeg2_ternimate(VADriverContextP ctx);
+void i965_media_mpeg2_decode_init(VADriverContextP ctx);
+
+#endif /* _I965_MEDIA_MPEG2_H_ */
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
new file mode 100644
index 0000000..c232191
--- /dev/null
+++ b/i965_drv_video/i965_render.c
@@ -0,0 +1,1330 @@
+/*
+ * Copyright 2006 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Eric Anholt <eric@anholt.net>
+ * Keith Packard <keithp@keithp.com>
+ * Xiang Haihao <haihao.xiang@intel.com>
+ *
+ */
+
+/*
+ * Most of rendering codes are ported from xf86-video-intel/src/i965_video.c
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "va_backend.h"
+#include "va_dricommon.h"
+
+#include "intel_batchbuffer.h"
+#include "intel_driver.h"
+
+#include "i965_defines.h"
+#include "i965_render.h"
+#include "i965_drv_video.h"
+
+#define SF_KERNEL_NUM_GRF 16
+#define SF_MAX_THREADS 1
+
+static const unsigned int sf_kernel_static[][4] =
+{
+#include "shaders/render/exa_sf.g4b"
+};
+
+#define PS_KERNEL_NUM_GRF 32
+#define PS_MAX_THREADS 32
+
+#define I965_GRF_BLOCKS(nreg) ((nreg + 15) / 16 - 1)
+
+static const unsigned int ps_kernel_static[][4] =
+{
+#include "shaders/render/exa_wm_xy.g4b"
+#include "shaders/render/exa_wm_src_affine.g4b"
+#include "shaders/render/exa_wm_src_sample_planar.g4b"
+#include "shaders/render/exa_wm_yuv_rgb.g4b"
+#include "shaders/render/exa_wm_write.g4b"
+};
+static const unsigned int ps_subpic_kernel_static[][4] =
+{
+#include "shaders/render/exa_wm_xy.g4b"
+#include "shaders/render/exa_wm_src_affine.g4b"
+#include "shaders/render/exa_wm_blend_subpicture.g4b"
+#include "shaders/render/exa_wm_write.g4b"
+};
+
+
+static uint32_t float_to_uint (float f)
+{
+ union {
+ uint32_t i;
+ float f;
+ } x;
+
+ x.f = f;
+ return x.i;
+}
+
+enum
+{
+ SF_KERNEL = 0,
+ PS_KERNEL,
+ PS_SUBPIC_KERNEL
+};
+
+struct render_kernel
+{
+ char *name;
+ const unsigned int (*bin)[4];
+ int size;
+ dri_bo *bo;
+} render_kernels[] = {
+ {
+ "SF",
+ sf_kernel_static,
+ sizeof(sf_kernel_static),
+ NULL
+ },
+ {
+ "PS",
+ ps_kernel_static,
+ sizeof(ps_kernel_static),
+ NULL
+ },
+
+ {
+ "PS_SUBPIC",
+ ps_subpic_kernel_static,
+ sizeof(ps_subpic_kernel_static),
+ NULL
+ }
+};
+
+#define NUM_RENDER_KERNEL (sizeof(render_kernels)/sizeof(render_kernels[0]))
+
+#define URB_VS_ENTRIES 8
+#define URB_VS_ENTRY_SIZE 1
+
+#define URB_GS_ENTRIES 0
+#define URB_GS_ENTRY_SIZE 0
+
+#define URB_CLIP_ENTRIES 0
+#define URB_CLIP_ENTRY_SIZE 0
+
+#define URB_SF_ENTRIES 1
+#define URB_SF_ENTRY_SIZE 2
+
+#define URB_CS_ENTRIES 0
+#define URB_CS_ENTRY_SIZE 0
+
+static void
+i965_render_vs_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_vs_unit_state *vs_state;
+
+ dri_bo_map(render_state->vs.state, 1);
+ assert(render_state->vs.state->virtual);
+ vs_state = render_state->vs.state->virtual;
+ memset(vs_state, 0, sizeof(*vs_state));
+
+ vs_state->thread4.nr_urb_entries = URB_VS_ENTRIES;
+ vs_state->thread4.urb_entry_allocation_size = URB_VS_ENTRY_SIZE - 1;
+ vs_state->vs6.vs_enable = 0;
+ vs_state->vs6.vert_cache_disable = 1;
+
+ dri_bo_unmap(render_state->vs.state);
+}
+
+static void
+i965_render_sf_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_sf_unit_state *sf_state;
+
+ dri_bo_map(render_state->sf.state, 1);
+ assert(render_state->sf.state->virtual);
+ sf_state = render_state->sf.state->virtual;
+ memset(sf_state, 0, sizeof(*sf_state));
+
+ sf_state->thread0.grf_reg_count = I965_GRF_BLOCKS(SF_KERNEL_NUM_GRF);
+ sf_state->thread0.kernel_start_pointer = render_kernels[SF_KERNEL].bo->offset >> 6;
+
+ sf_state->sf1.single_program_flow = 1; /* XXX */
+ sf_state->sf1.binding_table_entry_count = 0;
+ sf_state->sf1.thread_priority = 0;
+ sf_state->sf1.floating_point_mode = 0; /* Mesa does this */
+ sf_state->sf1.illegal_op_exception_enable = 1;
+ sf_state->sf1.mask_stack_exception_enable = 1;
+ sf_state->sf1.sw_exception_enable = 1;
+
+ /* scratch space is not used in our kernel */
+ sf_state->thread2.per_thread_scratch_space = 0;
+ sf_state->thread2.scratch_space_base_pointer = 0;
+
+ sf_state->thread3.const_urb_entry_read_length = 0; /* no const URBs */
+ sf_state->thread3.const_urb_entry_read_offset = 0; /* no const URBs */
+ sf_state->thread3.urb_entry_read_length = 1; /* 1 URB per vertex */
+ sf_state->thread3.urb_entry_read_offset = 0;
+ sf_state->thread3.dispatch_grf_start_reg = 3;
+
+ sf_state->thread4.max_threads = SF_MAX_THREADS - 1;
+ sf_state->thread4.urb_entry_allocation_size = URB_SF_ENTRY_SIZE - 1;
+ sf_state->thread4.nr_urb_entries = URB_SF_ENTRIES;
+ sf_state->thread4.stats_enable = 1;
+
+ sf_state->sf5.viewport_transform = 0; /* skip viewport */
+
+ sf_state->sf6.cull_mode = I965_CULLMODE_NONE;
+ sf_state->sf6.scissor = 0;
+
+ sf_state->sf7.trifan_pv = 2;
+
+ sf_state->sf6.dest_org_vbias = 0x8;
+ sf_state->sf6.dest_org_hbias = 0x8;
+
+ dri_bo_emit_reloc(render_state->sf.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ sf_state->thread0.grf_reg_count << 1,
+ offsetof(struct i965_sf_unit_state, thread0),
+ render_kernels[SF_KERNEL].bo);
+
+ dri_bo_unmap(render_state->sf.state);
+}
+
+static void
+i965_render_sampler(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_sampler_state *sampler_state;
+ int i;
+
+ assert(render_state->wm.sampler_count > 0);
+ assert(render_state->wm.sampler_count <= MAX_SAMPLERS);
+
+ dri_bo_map(render_state->wm.sampler, 1);
+ assert(render_state->wm.sampler->virtual);
+ sampler_state = render_state->wm.sampler->virtual;
+ for (i = 0; i < render_state->wm.sampler_count; i++) {
+ memset(sampler_state, 0, sizeof(*sampler_state));
+ sampler_state->ss0.min_filter = I965_MAPFILTER_LINEAR;
+ sampler_state->ss0.mag_filter = I965_MAPFILTER_LINEAR;
+ sampler_state->ss1.r_wrap_mode = I965_TEXCOORDMODE_CLAMP;
+ sampler_state->ss1.s_wrap_mode = I965_TEXCOORDMODE_CLAMP;
+ sampler_state->ss1.t_wrap_mode = I965_TEXCOORDMODE_CLAMP;
+ sampler_state++;
+ }
+
+ dri_bo_unmap(render_state->wm.sampler);
+}
+static void
+i965_subpic_render_wm_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_wm_unit_state *wm_state;
+
+ assert(render_state->wm.sampler);
+
+ dri_bo_map(render_state->wm.state, 1);
+ assert(render_state->wm.state->virtual);
+ wm_state = render_state->wm.state->virtual;
+ memset(wm_state, 0, sizeof(*wm_state));
+
+ wm_state->thread0.grf_reg_count = I965_GRF_BLOCKS(PS_KERNEL_NUM_GRF);
+ wm_state->thread0.kernel_start_pointer = render_kernels[PS_SUBPIC_KERNEL].bo->offset >> 6;
+
+ wm_state->thread1.single_program_flow = 1; /* XXX */
+ wm_state->thread1.binding_table_entry_count = 7;
+
+ wm_state->thread2.scratch_space_base_pointer = 0;
+ wm_state->thread2.per_thread_scratch_space = 0; /* 1024 bytes */
+
+ wm_state->thread3.dispatch_grf_start_reg = 3; /* XXX */
+ wm_state->thread3.const_urb_entry_read_length = 0;
+ wm_state->thread3.const_urb_entry_read_offset = 0;
+ wm_state->thread3.urb_entry_read_length = 1; /* XXX */
+ wm_state->thread3.urb_entry_read_offset = 0; /* XXX */
+
+ wm_state->wm4.stats_enable = 0;
+ wm_state->wm4.sampler_state_pointer = render_state->wm.sampler->offset >> 5;
+ wm_state->wm4.sampler_count = (render_state->wm.sampler_count + 3) / 4;
+
+ wm_state->wm5.max_threads = PS_MAX_THREADS - 1;
+ wm_state->wm5.thread_dispatch_enable = 1;
+ wm_state->wm5.enable_16_pix = 1;
+ wm_state->wm5.enable_8_pix = 0;
+ wm_state->wm5.early_depth_test = 1;
+
+ dri_bo_emit_reloc(render_state->wm.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ wm_state->thread0.grf_reg_count << 1,
+ offsetof(struct i965_wm_unit_state, thread0),
+ render_kernels[PS_SUBPIC_KERNEL].bo);
+
+ dri_bo_emit_reloc(render_state->wm.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ wm_state->wm4.sampler_count << 2,
+ offsetof(struct i965_wm_unit_state, wm4),
+ render_state->wm.sampler);
+
+ dri_bo_unmap(render_state->wm.state);
+}
+
+
+static void
+i965_render_wm_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_wm_unit_state *wm_state;
+
+ assert(render_state->wm.sampler);
+
+ dri_bo_map(render_state->wm.state, 1);
+ assert(render_state->wm.state->virtual);
+ wm_state = render_state->wm.state->virtual;
+ memset(wm_state, 0, sizeof(*wm_state));
+
+ wm_state->thread0.grf_reg_count = I965_GRF_BLOCKS(PS_KERNEL_NUM_GRF);
+ wm_state->thread0.kernel_start_pointer = render_kernels[PS_KERNEL].bo->offset >> 6;
+
+ wm_state->thread1.single_program_flow = 1; /* XXX */
+ wm_state->thread1.binding_table_entry_count = 7;
+
+ wm_state->thread2.scratch_space_base_pointer = 0;
+ wm_state->thread2.per_thread_scratch_space = 0; /* 1024 bytes */
+
+ wm_state->thread3.dispatch_grf_start_reg = 3; /* XXX */
+ wm_state->thread3.const_urb_entry_read_length = 0;
+ wm_state->thread3.const_urb_entry_read_offset = 0;
+ wm_state->thread3.urb_entry_read_length = 1; /* XXX */
+ wm_state->thread3.urb_entry_read_offset = 0; /* XXX */
+
+ wm_state->wm4.stats_enable = 0;
+ wm_state->wm4.sampler_state_pointer = render_state->wm.sampler->offset >> 5;
+ wm_state->wm4.sampler_count = (render_state->wm.sampler_count + 3) / 4;
+
+ wm_state->wm5.max_threads = PS_MAX_THREADS - 1;
+ wm_state->wm5.thread_dispatch_enable = 1;
+ wm_state->wm5.enable_16_pix = 1;
+ wm_state->wm5.enable_8_pix = 0;
+ wm_state->wm5.early_depth_test = 1;
+
+ dri_bo_emit_reloc(render_state->wm.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ wm_state->thread0.grf_reg_count << 1,
+ offsetof(struct i965_wm_unit_state, thread0),
+ render_kernels[PS_KERNEL].bo);
+
+ dri_bo_emit_reloc(render_state->wm.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ wm_state->wm4.sampler_count << 2,
+ offsetof(struct i965_wm_unit_state, wm4),
+ render_state->wm.sampler);
+
+ dri_bo_unmap(render_state->wm.state);
+}
+
+static void
+i965_render_cc_viewport(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_cc_viewport *cc_viewport;
+
+ dri_bo_map(render_state->cc.viewport, 1);
+ assert(render_state->cc.viewport->virtual);
+ cc_viewport = render_state->cc.viewport->virtual;
+ memset(cc_viewport, 0, sizeof(*cc_viewport));
+
+ cc_viewport->min_depth = -1.e35;
+ cc_viewport->max_depth = 1.e35;
+
+ dri_bo_unmap(render_state->cc.viewport);
+}
+
+static void
+i965_subpic_render_cc_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_cc_unit_state *cc_state;
+
+ assert(render_state->cc.viewport);
+
+ dri_bo_map(render_state->cc.state, 1);
+ assert(render_state->cc.state->virtual);
+ cc_state = render_state->cc.state->virtual;
+ memset(cc_state, 0, sizeof(*cc_state));
+
+ cc_state->cc0.stencil_enable = 0; /* disable stencil */
+ cc_state->cc2.depth_test = 0; /* disable depth test */
+ cc_state->cc2.logicop_enable = 0; /* disable logic op */
+ cc_state->cc3.ia_blend_enable = 0 ; /* blend alpha just like colors */
+ cc_state->cc3.blend_enable = 1; /* enable color blend */
+ cc_state->cc3.alpha_test = 0; /* disable alpha test */
+ cc_state->cc3.alpha_test_format = 0;//0:ALPHATEST_UNORM8; /*store alpha value with UNORM8 */
+ cc_state->cc3.alpha_test_func = 5;//COMPAREFUNCTION_LESS; /*pass if less than the reference */
+ cc_state->cc4.cc_viewport_state_offset = render_state->cc.viewport->offset >> 5;
+
+ cc_state->cc5.dither_enable = 0; /* disable dither */
+ cc_state->cc5.logicop_func = 0xc; /* WHITE */
+ cc_state->cc5.statistics_enable = 1;
+ cc_state->cc5.ia_blend_function = I965_BLENDFUNCTION_ADD;
+ cc_state->cc5.ia_src_blend_factor = I965_BLENDFACTOR_DST_ALPHA;
+ cc_state->cc5.ia_dest_blend_factor = I965_BLENDFACTOR_DST_ALPHA;
+
+ cc_state->cc6.clamp_post_alpha_blend = 0;
+ cc_state->cc6.clamp_pre_alpha_blend =0;
+
+ /*final color = src_color*src_blend_factor +/- dst_color*dest_color_blend_factor*/
+ cc_state->cc6.blend_function = I965_BLENDFUNCTION_ADD;
+ cc_state->cc6.src_blend_factor = I965_BLENDFACTOR_SRC_ALPHA;
+ cc_state->cc6.dest_blend_factor = I965_BLENDFACTOR_INV_SRC_ALPHA;
+
+ /*alpha test reference*/
+ cc_state->cc7.alpha_ref.f =0.0 ;
+
+
+ dri_bo_emit_reloc(render_state->cc.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ offsetof(struct i965_cc_unit_state, cc4),
+ render_state->cc.viewport);
+
+ dri_bo_unmap(render_state->cc.state);
+}
+
+
+static void
+i965_render_cc_unit(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_cc_unit_state *cc_state;
+
+ assert(render_state->cc.viewport);
+
+ dri_bo_map(render_state->cc.state, 1);
+ assert(render_state->cc.state->virtual);
+ cc_state = render_state->cc.state->virtual;
+ memset(cc_state, 0, sizeof(*cc_state));
+
+ cc_state->cc0.stencil_enable = 0; /* disable stencil */
+ cc_state->cc2.depth_test = 0; /* disable depth test */
+ cc_state->cc2.logicop_enable = 1; /* enable logic op */
+ cc_state->cc3.ia_blend_enable = 0; /* blend alpha just like colors */
+ cc_state->cc3.blend_enable = 0; /* disable color blend */
+ cc_state->cc3.alpha_test = 0; /* disable alpha test */
+ cc_state->cc4.cc_viewport_state_offset = render_state->cc.viewport->offset >> 5;
+
+ cc_state->cc5.dither_enable = 0; /* disable dither */
+ cc_state->cc5.logicop_func = 0xc; /* WHITE */
+ cc_state->cc5.statistics_enable = 1;
+ cc_state->cc5.ia_blend_function = I965_BLENDFUNCTION_ADD;
+ cc_state->cc5.ia_src_blend_factor = I965_BLENDFACTOR_ONE;
+ cc_state->cc5.ia_dest_blend_factor = I965_BLENDFACTOR_ONE;
+
+ dri_bo_emit_reloc(render_state->cc.state,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ offsetof(struct i965_cc_unit_state, cc4),
+ render_state->cc.viewport);
+
+ dri_bo_unmap(render_state->cc.state);
+}
+
+static void
+i965_render_src_surface_state(VADriverContextP ctx,
+ int index,
+ dri_bo *region,
+ unsigned long offset,
+ int w, int h)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_surface_state *ss;
+ dri_bo *ss_bo;
+
+ ss_bo = dri_bo_alloc(i965->intel.bufmgr,
+ "surface state",
+ sizeof(struct i965_surface_state), 32);
+ assert(ss_bo);
+ dri_bo_map(ss_bo, 1);
+ assert(ss_bo->virtual);
+ ss = ss_bo->virtual;
+ memset(ss, 0, sizeof(*ss));
+ ss->ss0.surface_type = I965_SURFACE_2D;
+ ss->ss0.surface_format = I965_SURFACEFORMAT_R8_UNORM;
+ ss->ss0.writedisable_alpha = 0;
+ ss->ss0.writedisable_red = 0;
+ ss->ss0.writedisable_green = 0;
+ ss->ss0.writedisable_blue = 0;
+ ss->ss0.color_blend = 1;
+ ss->ss0.vert_line_stride = 0;
+ ss->ss0.vert_line_stride_ofs = 0;
+ ss->ss0.mipmap_layout_mode = 0;
+ ss->ss0.render_cache_read_mode = 0;
+
+ ss->ss1.base_addr = region->offset + offset;
+
+ ss->ss2.width = w - 1;
+ ss->ss2.height = h - 1;
+ ss->ss2.mip_count = 0;
+ ss->ss2.render_target_rotation = 0;
+
+ ss->ss3.pitch = w - 1;
+
+ dri_bo_emit_reloc(ss_bo,
+ I915_GEM_DOMAIN_SAMPLER, 0,
+ offset,
+ offsetof(struct i965_surface_state, ss1),
+ region);
+
+ dri_bo_unmap(ss_bo);
+
+ assert(index < MAX_RENDER_SURFACES);
+ assert(render_state->wm.surface[index] == NULL);
+ render_state->wm.surface[index] = ss_bo;
+ render_state->wm.sampler_count++;
+}
+static void
+i965_subpic_render_src_surface_state(VADriverContextP ctx,
+ int index,
+ dri_bo *region,
+ unsigned long offset,
+ int w, int h)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct i965_surface_state *ss;
+ dri_bo *ss_bo;
+
+ ss_bo = dri_bo_alloc(i965->intel.bufmgr,
+ "surface state",
+ sizeof(struct i965_surface_state), 32);
+ assert(ss_bo);
+ dri_bo_map(ss_bo, 1);
+ assert(ss_bo->virtual);
+ ss = ss_bo->virtual;
+ memset(ss, 0, sizeof(*ss));
+ ss->ss0.surface_type = I965_SURFACE_2D;
+ ss->ss0.surface_format = I965_SURFACEFORMAT_R8_UNORM;
+ ss->ss0.writedisable_alpha = 0;
+ ss->ss0.writedisable_red = 0;
+ ss->ss0.writedisable_green = 0;
+ ss->ss0.writedisable_blue = 0;
+ ss->ss0.color_blend = 1;
+ ss->ss0.vert_line_stride = 0;
+ ss->ss0.vert_line_stride_ofs = 0;
+ ss->ss0.mipmap_layout_mode = 0;
+ ss->ss0.render_cache_read_mode = 0;
+
+ ss->ss1.base_addr = region->offset + offset;
+
+ ss->ss2.width = w - 1;
+ ss->ss2.height = h - 1;
+ ss->ss2.mip_count = 0;
+ ss->ss2.render_target_rotation = 0;
+
+ ss->ss3.pitch = w - 1;
+
+ dri_bo_emit_reloc(ss_bo,
+ I915_GEM_DOMAIN_SAMPLER, 0,
+ offset,
+ offsetof(struct i965_surface_state, ss1),
+ region);
+
+ dri_bo_unmap(ss_bo);
+
+ assert(index < MAX_RENDER_SURFACES);
+ assert(render_state->wm.surface[index] == NULL);
+ render_state->wm.surface[index] = ss_bo;
+ render_state->wm.sampler_count++;
+}
+
+static void
+i965_render_src_surfaces_state(VADriverContextP ctx,
+ VASurfaceID surface)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_surface *obj_surface;
+ int w, h;
+ dri_bo *region;
+
+ obj_surface = SURFACE(surface);
+ assert(obj_surface);
+ assert(obj_surface->bo);
+ w = obj_surface->width;
+ h = obj_surface->height;
+ region = obj_surface->bo;
+
+ i965_render_src_surface_state(ctx, 1, region, 0, w, h); /* Y */
+ i965_render_src_surface_state(ctx, 2, region, 0, w, h);
+ i965_render_src_surface_state(ctx, 3, region, w * h + w * h / 4, w / 2, h / 2); /* V */
+ i965_render_src_surface_state(ctx, 4, region, w * h + w * h / 4, w / 2, h / 2);
+ i965_render_src_surface_state(ctx, 5, region, w * h, w / 2, h / 2); /* U */
+ i965_render_src_surface_state(ctx, 6, region, w * h, w / 2, h / 2);
+}
+
+static void
+i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
+ VASurfaceID surface)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_surface *obj_surface = SURFACE(surface);
+ int w, h;
+ dri_bo *region;
+ dri_bo *subpic_region;
+ struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
+ struct object_image *obj_image = IMAGE(obj_subpic->image);
+ assert(obj_surface);
+ assert(obj_surface->bo);
+ w = obj_surface->width;
+ h = obj_surface->height;
+ region = obj_surface->bo;
+ subpic_region = obj_image->bo;
+ /*subpicture surface*/
+ i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_image->width, obj_image->height);
+ i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_image->width, obj_image->height);
+}
+
+static void
+i965_render_set_surface_tiling(struct i965_surface_state *ss, unsigned int tiling)
+{
+ switch (tiling) {
+ case I915_TILING_NONE:
+ ss->ss3.tiled_surface = 0;
+ ss->ss3.tile_walk = 0;
+ break;
+ case I915_TILING_X:
+ ss->ss3.tiled_surface = 1;
+ ss->ss3.tile_walk = I965_TILEWALK_XMAJOR;
+ break;
+ case I915_TILING_Y:
+ ss->ss3.tiled_surface = 1;
+ ss->ss3.tile_walk = I965_TILEWALK_YMAJOR;
+ break;
+ }
+}
+
+static void
+i965_render_dest_surface_state(VADriverContextP ctx, int index)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct intel_region *dest_region = render_state->draw_region;
+ struct i965_surface_state *ss;
+ dri_bo *ss_bo;
+
+ ss_bo = dri_bo_alloc(i965->intel.bufmgr,
+ "surface state",
+ sizeof(struct i965_surface_state), 32);
+ assert(ss_bo);
+ dri_bo_map(ss_bo, 1);
+ assert(ss_bo->virtual);
+ ss = ss_bo->virtual;
+ memset(ss, 0, sizeof(*ss));
+
+ ss->ss0.surface_type = I965_SURFACE_2D;
+ ss->ss0.data_return_format = I965_SURFACERETURNFORMAT_FLOAT32;
+
+ if (dest_region->cpp == 2) {
+ ss->ss0.surface_format = I965_SURFACEFORMAT_B5G6R5_UNORM;
+ } else {
+ ss->ss0.surface_format = I965_SURFACEFORMAT_B8G8R8A8_UNORM;
+ }
+
+ ss->ss0.writedisable_alpha = 0;
+ ss->ss0.writedisable_red = 0;
+ ss->ss0.writedisable_green = 0;
+ ss->ss0.writedisable_blue = 0;
+ ss->ss0.color_blend = 1;
+ ss->ss0.vert_line_stride = 0;
+ ss->ss0.vert_line_stride_ofs = 0;
+ ss->ss0.mipmap_layout_mode = 0;
+ ss->ss0.render_cache_read_mode = 0;
+
+ ss->ss1.base_addr = dest_region->bo->offset;
+
+ ss->ss2.width = dest_region->width - 1;
+ ss->ss2.height = dest_region->height - 1;
+ ss->ss2.mip_count = 0;
+ ss->ss2.render_target_rotation = 0;
+ ss->ss3.pitch = dest_region->pitch - 1;
+ i965_render_set_surface_tiling(ss, dest_region->tiling);
+
+ dri_bo_emit_reloc(ss_bo,
+ I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+ 0,
+ offsetof(struct i965_surface_state, ss1),
+ dest_region->bo);
+
+ dri_bo_unmap(ss_bo);
+
+ assert(index < MAX_RENDER_SURFACES);
+ assert(render_state->wm.surface[index] == NULL);
+ render_state->wm.surface[index] = ss_bo;
+}
+
+static void
+i965_render_binding_table(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ int i;
+ unsigned int *binding_table;
+
+ dri_bo_map(render_state->wm.binding_table, 1);
+ assert(render_state->wm.binding_table->virtual);
+ binding_table = render_state->wm.binding_table->virtual;
+ memset(binding_table, 0, render_state->wm.binding_table->size);
+
+ for (i = 0; i < MAX_RENDER_SURFACES; i++) {
+ if (render_state->wm.surface[i]) {
+ binding_table[i] = render_state->wm.surface[i]->offset;
+ dri_bo_emit_reloc(render_state->wm.binding_table,
+ I915_GEM_DOMAIN_INSTRUCTION, 0,
+ 0,
+ i * sizeof(*binding_table),
+ render_state->wm.surface[i]);
+ }
+ }
+
+ dri_bo_unmap(render_state->wm.binding_table);
+}
+
+static void
+i965_subpic_render_upload_vertex(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct intel_region *dest_region = render_state->draw_region;
+ struct object_surface *obj_surface;
+ struct object_subpic *obj_subpic;
+ float *vb;
+ float src_scale_x, src_scale_y;
+ int i, width, height;
+ obj_surface = SURFACE(surface);
+ obj_subpic = SUBPIC(obj_surface->subpic);
+ assert(obj_surface);
+ assert(obj_subpic);
+
+ int box_x1 = dest_region->x + obj_subpic->dstx;
+ int box_y1 = dest_region->y + obj_subpic->dsty;
+ int box_x2 = box_x1 + obj_subpic->width;
+ int box_y2 = box_y1 + obj_subpic->height;
+
+ width = obj_surface->width;
+ height = obj_surface->height;
+ src_scale_x = ((float)srcw / width) / (float)destw;
+ src_scale_y = ((float)srch / height) / (float)desth;
+
+ dri_bo_map(render_state->vb.vertex_buffer, 1);
+ assert(render_state->vb.vertex_buffer->virtual);
+ vb = render_state->vb.vertex_buffer->virtual;
+ /*vertex covers the full subpicture*/
+ i = 0;
+ vb[i++] = 1;
+ vb[i++] = 1;
+ vb[i++] = (float)box_x2;
+ vb[i++] = (float)box_y2;
+
+ vb[i++] = 0.0;
+ vb[i++] = 1;
+ vb[i++] = (float)box_x1;
+ vb[i++] = (float)box_y2;
+
+ vb[i++] = 0.0;
+ vb[i++] = 0.0;
+ vb[i++] = (float)box_x1;
+ vb[i++] = (float)box_y1;
+ dri_bo_unmap(render_state->vb.vertex_buffer);
+}
+
+static void
+i965_render_upload_vertex(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct intel_region *dest_region = render_state->draw_region;
+ struct object_surface *obj_surface;
+ float *vb;
+ float src_scale_x, src_scale_y;
+ int i, width, height;
+ int box_x1 = dest_region->x + destx;
+ int box_y1 = dest_region->y + desty;
+ int box_x2 = box_x1 + destw;
+ int box_y2 = box_y1 + desth;
+
+ obj_surface = SURFACE(surface);
+ assert(surface);
+ width = obj_surface->width;
+ height = obj_surface->height;
+
+ src_scale_x = ((float)srcw / width) / (float)destw;
+ src_scale_y = ((float)srch / height) / (float)desth;
+
+ dri_bo_map(render_state->vb.vertex_buffer, 1);
+ assert(render_state->vb.vertex_buffer->virtual);
+ vb = render_state->vb.vertex_buffer->virtual;
+
+ i = 0;
+ vb[i++] = (destx + destw) * src_scale_x;
+ vb[i++] = (desty + desth) * src_scale_y;
+ vb[i++] = (float)box_x2;
+ vb[i++] = (float)box_y2;
+
+ vb[i++] = destx * src_scale_x;
+ vb[i++] = (desty + desth) * src_scale_y;
+ vb[i++] = (float)box_x1;
+ vb[i++] = (float)box_y2;
+
+ vb[i++] = destx * src_scale_x;
+ vb[i++] = desty * src_scale_y;
+ vb[i++] = (float)box_x1;
+ vb[i++] = (float)box_y1;
+
+ dri_bo_unmap(render_state->vb.vertex_buffer);
+}
+
+static void
+i965_surface_render_state_setup(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ i965_render_vs_unit(ctx);
+ i965_render_sf_unit(ctx);
+ i965_render_dest_surface_state(ctx, 0);
+ i965_render_src_surfaces_state(ctx, surface);
+ i965_render_sampler(ctx);
+ i965_render_wm_unit(ctx);
+ i965_render_cc_viewport(ctx);
+ i965_render_cc_unit(ctx);
+ i965_render_binding_table(ctx);
+ i965_render_upload_vertex(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+}
+static void
+i965_subpic_render_state_setup(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ i965_render_vs_unit(ctx);
+ i965_render_sf_unit(ctx);
+ i965_render_dest_surface_state(ctx, 0);
+ i965_subpic_render_src_surfaces_state(ctx, surface);
+ i965_render_sampler(ctx);
+ i965_subpic_render_wm_unit(ctx);
+ i965_render_cc_viewport(ctx);
+ i965_subpic_render_cc_unit(ctx);
+ i965_render_binding_table(ctx);
+ i965_subpic_render_upload_vertex(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+}
+
+
+static void
+i965_render_pipeline_select(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 1);
+ OUT_BATCH(ctx, CMD_PIPELINE_SELECT | PIPELINE_SELECT_3D);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_state_sip(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 2);
+ OUT_BATCH(ctx, CMD_STATE_SIP | 0);
+ OUT_BATCH(ctx, 0);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_state_base_address(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 6);
+ OUT_BATCH(ctx, CMD_STATE_BASE_ADDRESS | 4);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ OUT_BATCH(ctx, 0 | BASE_ADDRESS_MODIFY);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_binding_table_pointers(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ BEGIN_BATCH(ctx, 6);
+ OUT_BATCH(ctx, CMD_BINDING_TABLE_POINTERS | 4);
+ OUT_BATCH(ctx, 0); /* vs */
+ OUT_BATCH(ctx, 0); /* gs */
+ OUT_BATCH(ctx, 0); /* clip */
+ OUT_BATCH(ctx, 0); /* sf */
+ OUT_RELOC(ctx, render_state->wm.binding_table, I915_GEM_DOMAIN_INSTRUCTION, 0, 0); /* wm */
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_constant_color(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 5);
+ OUT_BATCH(ctx, CMD_CONSTANT_COLOR | 3);
+ OUT_BATCH(ctx, float_to_uint(1.0));
+ OUT_BATCH(ctx, float_to_uint(0.0));
+ OUT_BATCH(ctx, float_to_uint(1.0));
+ OUT_BATCH(ctx, float_to_uint(1.0));
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_pipelined_pointers(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ BEGIN_BATCH(ctx, 7);
+ OUT_BATCH(ctx, CMD_PIPELINED_POINTERS | 5);
+ OUT_RELOC(ctx, render_state->vs.state, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ OUT_BATCH(ctx, 0); /* disable GS */
+ OUT_BATCH(ctx, 0); /* disable CLIP */
+ OUT_RELOC(ctx, render_state->sf.state, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ OUT_RELOC(ctx, render_state->wm.state, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ OUT_RELOC(ctx, render_state->cc.state, I915_GEM_DOMAIN_INSTRUCTION, 0, 0);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_urb_layout(VADriverContextP ctx)
+{
+ int urb_vs_start, urb_vs_size;
+ int urb_gs_start, urb_gs_size;
+ int urb_clip_start, urb_clip_size;
+ int urb_sf_start, urb_sf_size;
+ int urb_cs_start, urb_cs_size;
+
+ urb_vs_start = 0;
+ urb_vs_size = URB_VS_ENTRIES * URB_VS_ENTRY_SIZE;
+ urb_gs_start = urb_vs_start + urb_vs_size;
+ urb_gs_size = URB_GS_ENTRIES * URB_GS_ENTRY_SIZE;
+ urb_clip_start = urb_gs_start + urb_gs_size;
+ urb_clip_size = URB_CLIP_ENTRIES * URB_CLIP_ENTRY_SIZE;
+ urb_sf_start = urb_clip_start + urb_clip_size;
+ urb_sf_size = URB_SF_ENTRIES * URB_SF_ENTRY_SIZE;
+ urb_cs_start = urb_sf_start + urb_sf_size;
+ urb_cs_size = URB_CS_ENTRIES * URB_CS_ENTRY_SIZE;
+
+ BEGIN_BATCH(ctx, 3);
+ OUT_BATCH(ctx,
+ CMD_URB_FENCE |
+ UF0_CS_REALLOC |
+ UF0_SF_REALLOC |
+ UF0_CLIP_REALLOC |
+ UF0_GS_REALLOC |
+ UF0_VS_REALLOC |
+ 1);
+ OUT_BATCH(ctx,
+ ((urb_clip_start + urb_clip_size) << UF1_CLIP_FENCE_SHIFT) |
+ ((urb_gs_start + urb_gs_size) << UF1_GS_FENCE_SHIFT) |
+ ((urb_vs_start + urb_vs_size) << UF1_VS_FENCE_SHIFT));
+ OUT_BATCH(ctx,
+ ((urb_cs_start + urb_cs_size) << UF2_CS_FENCE_SHIFT) |
+ ((urb_sf_start + urb_sf_size) << UF2_SF_FENCE_SHIFT));
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_cs_urb_layout(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 2);
+ OUT_BATCH(ctx, CMD_CS_URB_STATE | 0);
+ OUT_BATCH(ctx,
+ ((URB_CS_ENTRY_SIZE - 1) << 4) | /* URB Entry Allocation Size */
+ (URB_CS_ENTRIES << 0)); /* Number of URB Entries */
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_drawing_rectangle(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ struct intel_region *dest_region = render_state->draw_region;
+
+ BEGIN_BATCH(ctx, 4);
+ OUT_BATCH(ctx, CMD_DRAWING_RECTANGLE | 2);
+ OUT_BATCH(ctx, 0x00000000);
+ OUT_BATCH(ctx, (dest_region->width - 1) | (dest_region->height - 1) << 16);
+ OUT_BATCH(ctx, 0x00000000);
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_render_vertex_elements(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 5);
+ OUT_BATCH(ctx, CMD_VERTEX_ELEMENTS | 3);
+ /* offset 0: X,Y -> {X, Y, 1.0, 1.0} */
+ OUT_BATCH(ctx, (0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
+ VE0_VALID |
+ (I965_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
+ (0 << VE0_OFFSET_SHIFT));
+ OUT_BATCH(ctx, (I965_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
+ (I965_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
+ (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
+ (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
+ (0 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
+ /* offset 8: S0, T0 -> {S0, T0, 1.0, 1.0} */
+ OUT_BATCH(ctx, (0 << VE0_VERTEX_BUFFER_INDEX_SHIFT) |
+ VE0_VALID |
+ (I965_SURFACEFORMAT_R32G32_FLOAT << VE0_FORMAT_SHIFT) |
+ (8 << VE0_OFFSET_SHIFT));
+ OUT_BATCH(ctx, (I965_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_0_SHIFT) |
+ (I965_VFCOMPONENT_STORE_SRC << VE1_VFCOMPONENT_1_SHIFT) |
+ (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_2_SHIFT) |
+ (I965_VFCOMPONENT_STORE_1_FLT << VE1_VFCOMPONENT_3_SHIFT) |
+ (4 << VE1_DESTINATION_ELEMENT_OFFSET_SHIFT));
+ ADVANCE_BATCH(ctx);
+}
+
+void
+i965_render_upload_palette(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 17);
+ OUT_BATCH(ctx, CMD_SAMPLER_PALETTE_LOAD | 15);
+ /*fill palette*/
+ //int32_t out[16]; //0-23:color 23-31:alpha
+ int32_t i,c;
+ for(i = 0; i < 16; i ++){
+ c = i*16; //16 colors
+ OUT_BATCH(ctx,c<<24/*alpha*/|c<<16/*R*/|c<<8/*G*/|c/*B*/);//c<<24/*alpha*/|c<<16/*R*/|c<<8/*G*/|c/*B*/);
+ }
+
+ ADVANCE_BATCH(ctx);
+}
+static void
+i965_render_startup(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ BEGIN_BATCH(ctx, 11);
+ OUT_BATCH(ctx, CMD_VERTEX_BUFFERS | 3);
+ OUT_BATCH(ctx,
+ (0 << VB0_BUFFER_INDEX_SHIFT) |
+ VB0_VERTEXDATA |
+ ((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
+ OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0);
+ OUT_BATCH(ctx, 3);
+ OUT_BATCH(ctx, 0);
+
+ OUT_BATCH(ctx,
+ CMD_3DPRIMITIVE |
+ _3DPRIMITIVE_VERTEX_SEQUENTIAL |
+ (_3DPRIM_RECTLIST << _3DPRIMITIVE_TOPOLOGY_SHIFT) |
+ (0 << 9) |
+ 4);
+ OUT_BATCH(ctx, 3); /* vertex count per instance */
+ OUT_BATCH(ctx, 0); /* start vertex offset */
+ OUT_BATCH(ctx, 1); /* single instance */
+ OUT_BATCH(ctx, 0); /* start instance location */
+ OUT_BATCH(ctx, 0); /* index buffer offset, ignored */
+ ADVANCE_BATCH(ctx);
+}
+
+static void
+i965_surface_render_pipeline_setup(VADriverContextP ctx)
+{
+ intel_batchbuffer_start_atomic(ctx, 0x1000);
+ intel_batchbuffer_emit_mi_flush(ctx);
+ i965_render_pipeline_select(ctx);
+ i965_render_state_sip(ctx);
+ i965_render_state_base_address(ctx);
+ i965_render_binding_table_pointers(ctx);
+ i965_render_constant_color(ctx);
+ i965_render_pipelined_pointers(ctx);
+ i965_render_urb_layout(ctx);
+ i965_render_cs_urb_layout(ctx);
+ i965_render_drawing_rectangle(ctx);
+ i965_render_vertex_elements(ctx);
+ i965_render_startup(ctx);
+ intel_batchbuffer_end_atomic(ctx);
+}
+
+static void
+i965_subpic_render_pipeline_setup(VADriverContextP ctx)
+{
+ intel_batchbuffer_start_atomic(ctx, 0x1000);
+ intel_batchbuffer_emit_mi_flush(ctx);
+ i965_render_pipeline_select(ctx);
+ i965_render_state_sip(ctx);
+ i965_render_state_base_address(ctx);
+ i965_render_binding_table_pointers(ctx);
+ i965_render_constant_color(ctx);
+ i965_render_pipelined_pointers(ctx);
+ //i965_render_upload_palette(ctx);
+ i965_render_urb_layout(ctx);
+ i965_render_cs_urb_layout(ctx);
+ i965_render_drawing_rectangle(ctx);
+ i965_render_vertex_elements(ctx);
+ i965_render_startup(ctx);
+ intel_batchbuffer_end_atomic(ctx);
+}
+
+
+static void
+i965_render_initialize(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+ int i;
+ dri_bo *bo;
+
+ /* VERTEX BUFFER */
+ dri_bo_unreference(render_state->vb.vertex_buffer);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "vertex buffer",
+ 4096,
+ 4096);
+ assert(bo);
+ render_state->vb.vertex_buffer = bo;
+
+ /* VS */
+ dri_bo_unreference(render_state->vs.state);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "vs state",
+ sizeof(struct i965_vs_unit_state),
+ 64);
+ assert(bo);
+ render_state->vs.state = bo;
+
+ /* GS */
+ /* CLIP */
+ /* SF */
+ dri_bo_unreference(render_state->sf.state);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "sf state",
+ sizeof(struct i965_sf_unit_state),
+ 64);
+ assert(bo);
+ render_state->sf.state = bo;
+
+ /* WM */
+ for (i = 0; i < MAX_RENDER_SURFACES; i++) {
+ dri_bo_unreference(render_state->wm.surface[i]);
+ render_state->wm.surface[i] = NULL;
+ }
+
+ dri_bo_unreference(render_state->wm.binding_table);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "binding table",
+ MAX_RENDER_SURFACES * sizeof(unsigned int),
+ 64);
+ assert(bo);
+ render_state->wm.binding_table = bo;
+
+ dri_bo_unreference(render_state->wm.sampler);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "sampler state",
+ MAX_SAMPLERS * sizeof(struct i965_sampler_state),
+ 64);
+ assert(bo);
+ render_state->wm.sampler = bo;
+ render_state->wm.sampler_count = 0;
+
+ dri_bo_unreference(render_state->wm.state);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "wm state",
+ sizeof(struct i965_wm_unit_state),
+ 64);
+ assert(bo);
+ render_state->wm.state = bo;
+
+ /* COLOR CALCULATOR */
+ dri_bo_unreference(render_state->cc.state);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "color calc state",
+ sizeof(struct i965_cc_unit_state),
+ 64);
+ assert(bo);
+ render_state->cc.state = bo;
+
+ dri_bo_unreference(render_state->cc.viewport);
+ bo = dri_bo_alloc(i965->intel.bufmgr,
+ "cc viewport",
+ sizeof(struct i965_cc_viewport),
+ 64);
+ assert(bo);
+ render_state->cc.viewport = bo;
+}
+
+void
+i965_render_put_surface(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ i965_render_initialize(ctx);
+ i965_surface_render_state_setup(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+ i965_surface_render_pipeline_setup(ctx);
+ intel_batchbuffer_flush(ctx);
+}
+
+void
+i965_render_put_subpic(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth)
+{
+ i965_render_initialize(ctx);
+ i965_subpic_render_state_setup(ctx, surface,
+ srcx, srcy, srcw, srch,
+ destx, desty, destw, desth);
+ i965_subpic_render_pipeline_setup(ctx);
+ intel_batchbuffer_flush(ctx);
+}
+
+
+Bool
+i965_render_init(VADriverContextP ctx)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ int i;
+
+ /* kernel */
+ for (i = 0; i < NUM_RENDER_KERNEL; i++) {
+ struct render_kernel *kernel = &render_kernels[i];
+ kernel->bo = dri_bo_alloc(i965->intel.bufmgr,
+ kernel->name,
+ kernel->size, 64);
+ assert(kernel->bo);
+ dri_bo_subdata(kernel->bo, 0, kernel->size, kernel->bin);
+ }
+
+ return True;
+}
+
+Bool
+i965_render_terminate(VADriverContextP ctx)
+{
+ int i;
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ for (i = 0; i < NUM_RENDER_KERNEL; i++) {
+ struct render_kernel *kernel = &render_kernels[i];
+
+ dri_bo_unreference(kernel->bo);
+ kernel->bo = NULL;
+ }
+
+ dri_bo_unreference(render_state->vb.vertex_buffer);
+ render_state->vb.vertex_buffer = NULL;
+ dri_bo_unreference(render_state->vs.state);
+ render_state->vs.state = NULL;
+ dri_bo_unreference(render_state->sf.state);
+ render_state->sf.state = NULL;
+ dri_bo_unreference(render_state->wm.binding_table);
+ render_state->wm.binding_table = NULL;
+ dri_bo_unreference(render_state->wm.sampler);
+ render_state->wm.sampler = NULL;
+ dri_bo_unreference(render_state->wm.state);
+ render_state->wm.state = NULL;
+
+ for (i = 0; i < MAX_RENDER_SURFACES; i++) {
+ dri_bo_unreference(render_state->wm.surface[i]);
+ render_state->wm.surface[i] = NULL;
+ }
+
+ dri_bo_unreference(render_state->cc.viewport);
+ render_state->cc.viewport = NULL;
+ dri_bo_unreference(render_state->cc.state);
+ render_state->cc.state = NULL;
+
+ if (render_state->draw_region) {
+ dri_bo_unreference(render_state->draw_region->bo);
+ free(render_state->draw_region);
+ render_state->draw_region = NULL;
+ }
+
+ return True;
+}
+
diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h
new file mode 100644
index 0000000..e3dce02
--- /dev/null
+++ b/i965_drv_video/i965_render.h
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2006 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ *
+ */
+
+#ifndef _I965_RENDER_H_
+#define _I965_RENDER_H_
+
+#define MAX_RENDER_SURFACES 16
+#define MAX_SAMPLERS 16
+
+struct i965_render_state
+{
+ struct {
+ dri_bo *vertex_buffer;
+ } vb;
+
+ struct {
+ dri_bo *state;
+ } vs;
+
+ struct {
+ dri_bo *state;
+ dri_bo *prog;
+ } sf;
+
+ struct {
+ int sampler_count;
+ dri_bo *sampler;
+ dri_bo *surface[MAX_RENDER_SURFACES];
+ dri_bo *binding_table;
+ dri_bo *state;
+ dri_bo *prog;
+ } wm;
+
+ struct {
+ dri_bo *state;
+ dri_bo *viewport;
+ } cc;
+
+ struct intel_region *draw_region;
+};
+
+Bool i965_render_init(VADriverContextP ctx);
+Bool i965_render_terminate(VADriverContextP ctx);
+void i965_render_put_surface(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth);
+
+
+void
+i965_render_put_subpic(VADriverContextP ctx,
+ VASurfaceID surface,
+ short srcx,
+ short srcy,
+ unsigned short srcw,
+ unsigned short srch,
+ short destx,
+ short desty,
+ unsigned short destw,
+ unsigned short desth);
+#endif /* _I965_RENDER_H_ */
diff --git a/i965_drv_video/i965_structs.h b/i965_drv_video/i965_structs.h
new file mode 100644
index 0000000..93fa2f0
--- /dev/null
+++ b/i965_drv_video/i965_structs.h
@@ -0,0 +1,623 @@
+#ifndef _I965_STRUCTS_H_
+#define _I965_STRUCTS_H_
+
+struct i965_vfe_state
+{
+ struct {
+ unsigned int per_thread_scratch_space:4;
+ unsigned int pad3:3;
+ unsigned int extend_vfe_state_present:1;
+ unsigned int pad2:2;
+ unsigned int scratch_base:22;
+ } vfe0;
+
+ struct {
+ unsigned int debug_counter_control:2;
+ unsigned int children_present:1;
+ unsigned int vfe_mode:4;
+ unsigned int pad2:2;
+ unsigned int num_urb_entries:7;
+ unsigned int urb_entry_alloc_size:9;
+ unsigned int max_threads:7;
+ } vfe1;
+
+ struct {
+ unsigned int pad4:4;
+ unsigned int interface_descriptor_base:28;
+ } vfe2;
+};
+
+struct i965_vfe_state_ex
+{
+ struct {
+ unsigned int pad:8;
+ unsigned int obj_id:24;
+ } vfex0;
+
+ struct {
+ unsigned int residual_grf_offset:5;
+ unsigned int pad0:3;
+ unsigned int weight_grf_offset:5;
+ unsigned int pad1:3;
+ unsigned int residual_data_offset:8;
+ unsigned int sub_field_present_flag:2;
+ unsigned int residual_data_fix_offset:1;
+ unsigned int pad2:5;
+ }vfex1;
+
+ struct {
+ unsigned int remap_index_0:4;
+ unsigned int remap_index_1:4;
+ unsigned int remap_index_2:4;
+ unsigned int remap_index_3:4;
+ unsigned int remap_index_4:4;
+ unsigned int remap_index_5:4;
+ unsigned int remap_index_6:4;
+ unsigned int remap_index_7:4;
+ }remap_table0;
+
+ struct {
+ unsigned int remap_index_8:4;
+ unsigned int remap_index_9:4;
+ unsigned int remap_index_10:4;
+ unsigned int remap_index_11:4;
+ unsigned int remap_index_12:4;
+ unsigned int remap_index_13:4;
+ unsigned int remap_index_14:4;
+ unsigned int remap_index_15:4;
+ } remap_table1;
+
+ struct {
+ unsigned int scoreboard_mask:8;
+ unsigned int pad:22;
+ unsigned int type:1;
+ unsigned int enable:1;
+ } scoreboard0;
+
+ struct {
+ unsigned int ignore;
+ } scoreboard1;
+
+ struct {
+ unsigned int ignore;
+ } scoreboard2;
+
+ unsigned int pad;
+};
+
+struct i965_vld_state
+{
+ struct {
+ unsigned int pad6:6;
+ unsigned int scan_order:1;
+ unsigned int intra_vlc_format:1;
+ unsigned int quantizer_scale_type:1;
+ unsigned int concealment_motion_vector:1;
+ unsigned int frame_predict_frame_dct:1;
+ unsigned int top_field_first:1;
+ unsigned int picture_structure:2;
+ unsigned int intra_dc_precision:2;
+ unsigned int f_code_0_0:4;
+ unsigned int f_code_0_1:4;
+ unsigned int f_code_1_0:4;
+ unsigned int f_code_1_1:4;
+ } vld0;
+
+ struct {
+ unsigned int pad2:9;
+ unsigned int picture_coding_type:2;
+ unsigned int pad:21;
+ } vld1;
+
+ struct {
+ unsigned int index_0:4;
+ unsigned int index_1:4;
+ unsigned int index_2:4;
+ unsigned int index_3:4;
+ unsigned int index_4:4;
+ unsigned int index_5:4;
+ unsigned int index_6:4;
+ unsigned int index_7:4;
+ } desc_remap_table0;
+
+ struct {
+ unsigned int index_8:4;
+ unsigned int index_9:4;
+ unsigned int index_10:4;
+ unsigned int index_11:4;
+ unsigned int index_12:4;
+ unsigned int index_13:4;
+ unsigned int index_14:4;
+ unsigned int index_15:4;
+ } desc_remap_table1;
+};
+
+struct i965_interface_descriptor
+{
+ struct {
+ unsigned int grf_reg_blocks:4;
+ unsigned int pad:2;
+ unsigned int kernel_start_pointer:26;
+ } desc0;
+
+ struct {
+ unsigned int pad:7;
+ unsigned int software_exception:1;
+ unsigned int pad2:3;
+ unsigned int maskstack_exception:1;
+ unsigned int pad3:1;
+ unsigned int illegal_opcode_exception:1;
+ unsigned int pad4:2;
+ unsigned int floating_point_mode:1;
+ unsigned int thread_priority:1;
+ unsigned int single_program_flow:1;
+ unsigned int pad5:1;
+ unsigned int const_urb_entry_read_offset:6;
+ unsigned int const_urb_entry_read_len:6;
+ } desc1;
+
+ struct {
+ unsigned int pad:2;
+ unsigned int sampler_count:3;
+ unsigned int sampler_state_pointer:27;
+ } desc2;
+
+ struct {
+ unsigned int binding_table_entry_count:5;
+ unsigned int binding_table_pointer:27;
+ } desc3;
+};
+
+struct i965_surface_state
+{
+ struct {
+ unsigned int cube_pos_z:1;
+ unsigned int cube_neg_z:1;
+ unsigned int cube_pos_y:1;
+ unsigned int cube_neg_y:1;
+ unsigned int cube_pos_x:1;
+ unsigned int cube_neg_x:1;
+ unsigned int pad:3;
+ unsigned int render_cache_read_mode:1;
+ unsigned int mipmap_layout_mode:1;
+ unsigned int vert_line_stride_ofs:1;
+ unsigned int vert_line_stride:1;
+ unsigned int color_blend:1;
+ unsigned int writedisable_blue:1;
+ unsigned int writedisable_green:1;
+ unsigned int writedisable_red:1;
+ unsigned int writedisable_alpha:1;
+ unsigned int surface_format:9;
+ unsigned int data_return_format:1;
+ unsigned int pad0:1;
+ unsigned int surface_type:3;
+ } ss0;
+
+ struct {
+ unsigned int base_addr;
+ } ss1;
+
+ struct {
+ unsigned int render_target_rotation:2;
+ unsigned int mip_count:4;
+ unsigned int width:13;
+ unsigned int height:13;
+ } ss2;
+
+ struct {
+ unsigned int tile_walk:1;
+ unsigned int tiled_surface:1;
+ unsigned int pad:1;
+ unsigned int pitch:18;
+ unsigned int depth:11;
+ } ss3;
+
+ struct {
+ unsigned int pad:19;
+ unsigned int min_array_elt:9;
+ unsigned int min_lod:4;
+ } ss4;
+
+ struct {
+ unsigned int pad:20;
+ unsigned int y_offset:4;
+ unsigned int pad2:1;
+ unsigned int x_offset:7;
+ } ss5;
+};
+
+struct thread0
+{
+ unsigned int pad0:1;
+ unsigned int grf_reg_count:3;
+ unsigned int pad1:2;
+ unsigned int kernel_start_pointer:26;
+};
+
+struct thread1
+{
+ unsigned int ext_halt_exception_enable:1;
+ unsigned int sw_exception_enable:1;
+ unsigned int mask_stack_exception_enable:1;
+ unsigned int timeout_exception_enable:1;
+ unsigned int illegal_op_exception_enable:1;
+ unsigned int pad0:3;
+ unsigned int depth_coef_urb_read_offset:6; /* WM only */
+ unsigned int pad1:2;
+ unsigned int floating_point_mode:1;
+ unsigned int thread_priority:1;
+ unsigned int binding_table_entry_count:8;
+ unsigned int pad3:5;
+ unsigned int single_program_flow:1;
+};
+
+struct thread2
+{
+ unsigned int per_thread_scratch_space:4;
+ unsigned int pad0:6;
+ unsigned int scratch_space_base_pointer:22;
+};
+
+
+struct thread3
+{
+ unsigned int dispatch_grf_start_reg:4;
+ unsigned int urb_entry_read_offset:6;
+ unsigned int pad0:1;
+ unsigned int urb_entry_read_length:6;
+ unsigned int pad1:1;
+ unsigned int const_urb_entry_read_offset:6;
+ unsigned int pad2:1;
+ unsigned int const_urb_entry_read_length:6;
+ unsigned int pad3:1;
+};
+
+struct i965_vs_unit_state
+{
+ struct thread0 thread0;
+ struct thread1 thread1;
+ struct thread2 thread2;
+ struct thread3 thread3;
+
+ struct {
+ unsigned int pad0:10;
+ unsigned int stats_enable:1;
+ unsigned int nr_urb_entries:7;
+ unsigned int pad1:1;
+ unsigned int urb_entry_allocation_size:5;
+ unsigned int pad2:1;
+ unsigned int max_threads:4;
+ unsigned int pad3:3;
+ } thread4;
+
+ struct {
+ unsigned int sampler_count:3;
+ unsigned int pad0:2;
+ unsigned int sampler_state_pointer:27;
+ } vs5;
+
+ struct {
+ unsigned int vs_enable:1;
+ unsigned int vert_cache_disable:1;
+ unsigned int pad0:30;
+ } vs6;
+};
+
+struct i965_gs_unit_state
+{
+ struct thread0 thread0;
+ struct thread1 thread1;
+ struct thread2 thread2;
+ struct thread3 thread3;
+
+ struct {
+ unsigned int pad0:10;
+ unsigned int stats_enable:1;
+ unsigned int nr_urb_entries:7;
+ unsigned int pad1:1;
+ unsigned int urb_entry_allocation_size:5;
+ unsigned int pad2:1;
+ unsigned int max_threads:1;
+ unsigned int pad3:6;
+ } thread4;
+
+ struct {
+ unsigned int sampler_count:3;
+ unsigned int pad0:2;
+ unsigned int sampler_state_pointer:27;
+ } gs5;
+
+
+ struct {
+ unsigned int max_vp_index:4;
+ unsigned int pad0:26;
+ unsigned int reorder_enable:1;
+ unsigned int pad1:1;
+ } gs6;
+};
+
+struct i965_clip_unit_state
+{
+ struct thread0 thread0;
+ struct thread1 thread1;
+ struct thread2 thread2;
+ struct thread3 thread3;
+
+ struct {
+ unsigned int pad0:9;
+ unsigned int gs_output_stats:1; /* not always */
+ unsigned int stats_enable:1;
+ unsigned int nr_urb_entries:7;
+ unsigned int pad1:1;
+ unsigned int urb_entry_allocation_size:5;
+ unsigned int pad2:1;
+ unsigned int max_threads:6; /* may be less */
+ unsigned int pad3:1;
+ } thread4;
+
+ struct {
+ unsigned int pad0:13;
+ unsigned int clip_mode:3;
+ unsigned int userclip_enable_flags:8;
+ unsigned int userclip_must_clip:1;
+ unsigned int pad1:1;
+ unsigned int guard_band_enable:1;
+ unsigned int viewport_z_clip_enable:1;
+ unsigned int viewport_xy_clip_enable:1;
+ unsigned int vertex_position_space:1;
+ unsigned int api_mode:1;
+ unsigned int pad2:1;
+ } clip5;
+
+ struct {
+ unsigned int pad0:5;
+ unsigned int clipper_viewport_state_ptr:27;
+ } clip6;
+
+
+ float viewport_xmin;
+ float viewport_xmax;
+ float viewport_ymin;
+ float viewport_ymax;
+};
+
+struct i965_sf_unit_state
+{
+ struct thread0 thread0;
+ struct {
+ unsigned int pad0:7;
+ unsigned int sw_exception_enable:1;
+ unsigned int pad1:3;
+ unsigned int mask_stack_exception_enable:1;
+ unsigned int pad2:1;
+ unsigned int illegal_op_exception_enable:1;
+ unsigned int pad3:2;
+ unsigned int floating_point_mode:1;
+ unsigned int thread_priority:1;
+ unsigned int binding_table_entry_count:8;
+ unsigned int pad4:5;
+ unsigned int single_program_flow:1;
+ } sf1;
+
+ struct thread2 thread2;
+ struct thread3 thread3;
+
+ struct {
+ unsigned int pad0:10;
+ unsigned int stats_enable:1;
+ unsigned int nr_urb_entries:7;
+ unsigned int pad1:1;
+ unsigned int urb_entry_allocation_size:5;
+ unsigned int pad2:1;
+ unsigned int max_threads:6;
+ unsigned int pad3:1;
+ } thread4;
+
+ struct {
+ unsigned int front_winding:1;
+ unsigned int viewport_transform:1;
+ unsigned int pad0:3;
+ unsigned int sf_viewport_state_offset:27;
+ } sf5;
+
+ struct {
+ unsigned int pad0:9;
+ unsigned int dest_org_vbias:4;
+ unsigned int dest_org_hbias:4;
+ unsigned int scissor:1;
+ unsigned int disable_2x2_trifilter:1;
+ unsigned int disable_zero_pix_trifilter:1;
+ unsigned int point_rast_rule:2;
+ unsigned int line_endcap_aa_region_width:2;
+ unsigned int line_width:4;
+ unsigned int fast_scissor_disable:1;
+ unsigned int cull_mode:2;
+ unsigned int aa_enable:1;
+ } sf6;
+
+ struct {
+ unsigned int point_size:11;
+ unsigned int use_point_size_state:1;
+ unsigned int subpixel_precision:1;
+ unsigned int sprite_point:1;
+ unsigned int pad0:11;
+ unsigned int trifan_pv:2;
+ unsigned int linestrip_pv:2;
+ unsigned int tristrip_pv:2;
+ unsigned int line_last_pixel_enable:1;
+ } sf7;
+};
+
+struct i965_sampler_state
+{
+ struct {
+ unsigned int shadow_function:3;
+ unsigned int lod_bias:11;
+ unsigned int min_filter:3;
+ unsigned int mag_filter:3;
+ unsigned int mip_filter:2;
+ unsigned int base_level:5;
+ unsigned int pad:1;
+ unsigned int lod_preclamp:1;
+ unsigned int border_color_mode:1;
+ unsigned int pad0:1;
+ unsigned int disable:1;
+ } ss0;
+
+ struct {
+ unsigned int r_wrap_mode:3;
+ unsigned int t_wrap_mode:3;
+ unsigned int s_wrap_mode:3;
+ unsigned int pad:3;
+ unsigned int max_lod:10;
+ unsigned int min_lod:10;
+ } ss1;
+
+
+ struct {
+ unsigned int pad:5;
+ unsigned int border_color_pointer:27;
+ } ss2;
+
+ struct {
+ unsigned int pad:19;
+ unsigned int max_aniso:3;
+ unsigned int chroma_key_mode:1;
+ unsigned int chroma_key_index:2;
+ unsigned int chroma_key_enable:1;
+ unsigned int monochrome_filter_width:3;
+ unsigned int monochrome_filter_height:3;
+ } ss3;
+};
+
+struct i965_wm_unit_state
+{
+ struct thread0 thread0;
+ struct thread1 thread1;
+ struct thread2 thread2;
+ struct thread3 thread3;
+
+ struct {
+ unsigned int stats_enable:1;
+ unsigned int pad0:1;
+ unsigned int sampler_count:3;
+ unsigned int sampler_state_pointer:27;
+ } wm4;
+
+ struct {
+ unsigned int enable_8_pix:1;
+ unsigned int enable_16_pix:1;
+ unsigned int enable_32_pix:1;
+ unsigned int pad0:7;
+ unsigned int legacy_global_depth_bias:1;
+ unsigned int line_stipple:1;
+ unsigned int depth_offset:1;
+ unsigned int polygon_stipple:1;
+ unsigned int line_aa_region_width:2;
+ unsigned int line_endcap_aa_region_width:2;
+ unsigned int early_depth_test:1;
+ unsigned int thread_dispatch_enable:1;
+ unsigned int program_uses_depth:1;
+ unsigned int program_computes_depth:1;
+ unsigned int program_uses_killpixel:1;
+ unsigned int legacy_line_rast: 1;
+ unsigned int transposed_urb_read:1;
+ unsigned int max_threads:7;
+ } wm5;
+
+ float global_depth_offset_constant;
+ float global_depth_offset_scale;
+};
+
+struct i965_cc_viewport
+{
+ float min_depth;
+ float max_depth;
+};
+
+struct i965_cc_unit_state
+{
+ struct {
+ unsigned int pad0:3;
+ unsigned int bf_stencil_pass_depth_pass_op:3;
+ unsigned int bf_stencil_pass_depth_fail_op:3;
+ unsigned int bf_stencil_fail_op:3;
+ unsigned int bf_stencil_func:3;
+ unsigned int bf_stencil_enable:1;
+ unsigned int pad1:2;
+ unsigned int stencil_write_enable:1;
+ unsigned int stencil_pass_depth_pass_op:3;
+ unsigned int stencil_pass_depth_fail_op:3;
+ unsigned int stencil_fail_op:3;
+ unsigned int stencil_func:3;
+ unsigned int stencil_enable:1;
+ } cc0;
+
+
+ struct {
+ unsigned int bf_stencil_ref:8;
+ unsigned int stencil_write_mask:8;
+ unsigned int stencil_test_mask:8;
+ unsigned int stencil_ref:8;
+ } cc1;
+
+
+ struct {
+ unsigned int logicop_enable:1;
+ unsigned int pad0:10;
+ unsigned int depth_write_enable:1;
+ unsigned int depth_test_function:3;
+ unsigned int depth_test:1;
+ unsigned int bf_stencil_write_mask:8;
+ unsigned int bf_stencil_test_mask:8;
+ } cc2;
+
+
+ struct {
+ unsigned int pad0:8;
+ unsigned int alpha_test_func:3;
+ unsigned int alpha_test:1;
+ unsigned int blend_enable:1;
+ unsigned int ia_blend_enable:1;
+ unsigned int pad1:1;
+ unsigned int alpha_test_format:1;
+ unsigned int pad2:16;
+ } cc3;
+
+ struct {
+ unsigned int pad0:5;
+ unsigned int cc_viewport_state_offset:27;
+ } cc4;
+
+ struct {
+ unsigned int pad0:2;
+ unsigned int ia_dest_blend_factor:5;
+ unsigned int ia_src_blend_factor:5;
+ unsigned int ia_blend_function:3;
+ unsigned int statistics_enable:1;
+ unsigned int logicop_func:4;
+ unsigned int pad1:11;
+ unsigned int dither_enable:1;
+ } cc5;
+
+ struct {
+ unsigned int clamp_post_alpha_blend:1;
+ unsigned int clamp_pre_alpha_blend:1;
+ unsigned int clamp_range:2;
+ unsigned int pad0:11;
+ unsigned int y_dither_offset:2;
+ unsigned int x_dither_offset:2;
+ unsigned int dest_blend_factor:5;
+ unsigned int src_blend_factor:5;
+ unsigned int blend_function:3;
+ } cc6;
+
+ struct {
+ union {
+ float f;
+ unsigned char ub[4];
+ } alpha_ref;
+ } cc7;
+};
+
+#endif /* _I965_STRUCTS_H_ */
diff --git a/i965_drv_video/intel_batchbuffer.c b/i965_drv_video/intel_batchbuffer.c
new file mode 100644
index 0000000..46c9496
--- /dev/null
+++ b/i965_drv_video/intel_batchbuffer.c
@@ -0,0 +1,204 @@
+/**************************************************************************
+ *
+ * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <string.h>
+#include <assert.h>
+
+#include "va_backend.h"
+
+#include "intel_batchbuffer.h"
+
+static void
+intel_batchbuffer_reset(struct intel_batchbuffer *batch)
+{
+ struct intel_driver_data *intel = batch->intel;
+
+ if (batch->buffer != NULL) {
+ dri_bo_unreference(batch->buffer);
+ batch->buffer = NULL;
+ }
+
+ batch->buffer = dri_bo_alloc(intel->bufmgr, "batch buffer",
+ BATCH_SIZE, 0x1000);
+
+ assert(batch->buffer);
+ dri_bo_map(batch->buffer, 1);
+ batch->map = batch->buffer->virtual;
+ batch->size = BATCH_SIZE;
+ batch->ptr = batch->map;
+ batch->atomic = 0;
+}
+
+Bool
+intel_batchbuffer_init(struct intel_driver_data *intel)
+{
+ intel->batch = calloc(1, sizeof(*(intel->batch)));
+
+ assert(intel->batch);
+ intel->batch->intel = intel;
+ intel_batchbuffer_reset(intel->batch);
+
+ return True;
+}
+
+Bool
+intel_batchbuffer_terminate(struct intel_driver_data *intel)
+{
+ if (intel->batch) {
+ if (intel->batch->map) {
+ dri_bo_unmap(intel->batch->buffer);
+ intel->batch->map = NULL;
+ }
+
+ dri_bo_unreference(intel->batch->buffer);
+ free(intel->batch);
+ intel->batch = NULL;
+ }
+
+ return True;
+}
+
+Bool
+intel_batchbuffer_flush(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+ unsigned int used = batch->ptr - batch->map;
+ int is_locked = intel->locked;
+
+ if (used == 0) {
+ return True;
+ }
+
+ if ((used & 4) == 0) {
+ *(unsigned int*)batch->ptr = 0;
+ batch->ptr += 4;
+ }
+
+ *(unsigned int*)batch->ptr = MI_BATCH_BUFFER_END;
+ batch->ptr += 4;
+ dri_bo_unmap(batch->buffer);
+ used = batch->ptr - batch->map;
+
+ if (!is_locked)
+ intel_lock_hardware(ctx);
+
+ dri_bo_exec(batch->buffer, used, 0, 0, 0);
+
+ if (!is_locked)
+ intel_unlock_hardware(ctx);
+
+ intel_batchbuffer_reset(intel->batch);
+
+ return True;
+}
+
+static unsigned int
+intel_batchbuffer_space(struct intel_batchbuffer *batch)
+{
+ return (batch->size - BATCH_RESERVED) - (batch->ptr - batch->map);
+}
+
+void
+intel_batchbuffer_emit_dword(VADriverContextP ctx, unsigned int x)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert(intel_batchbuffer_space(batch) >= 4);
+ *(unsigned int*)batch->ptr = x;
+ batch->ptr += 4;
+}
+
+void
+intel_batchbuffer_emit_reloc(VADriverContextP ctx, dri_bo *bo,
+ uint32_t read_domains, uint32_t write_domains,
+ uint32_t delta)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert(batch->ptr - batch->map < batch->size);
+ dri_bo_emit_reloc(batch->buffer, read_domains, write_domains,
+ delta, batch->ptr - batch->map, bo);
+ intel_batchbuffer_emit_dword(ctx, bo->offset + delta);
+}
+
+void
+intel_batchbuffer_require_space(VADriverContextP ctx, unsigned int size)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert(size < batch->size - 8);
+
+ if (intel_batchbuffer_space(batch) < size) {
+ intel_batchbuffer_flush(ctx);
+ }
+}
+
+void
+intel_batchbuffer_data(VADriverContextP ctx, void *data, unsigned int size)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert((size & 3) == 0);
+ intel_batchbuffer_require_space(ctx, size);
+
+ assert(batch->ptr);
+ memcpy(batch->ptr, data, size);
+ batch->ptr += size;
+}
+
+void
+intel_batchbuffer_emit_mi_flush(VADriverContextP ctx)
+{
+ intel_batchbuffer_require_space(ctx, 4);
+ intel_batchbuffer_emit_dword(ctx, MI_FLUSH | STATE_INSTRUCTION_CACHE_INVALIDATE);
+}
+
+void
+intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert(!batch->atomic);
+ intel_batchbuffer_require_space(ctx, size);
+ batch->atomic = 1;
+}
+
+void
+intel_batchbuffer_end_atomic(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct intel_batchbuffer *batch = intel->batch;
+
+ assert(batch->atomic);
+ batch->atomic = 0;
+}
diff --git a/i965_drv_video/intel_batchbuffer.h b/i965_drv_video/intel_batchbuffer.h
new file mode 100644
index 0000000..c3a2457
--- /dev/null
+++ b/i965_drv_video/intel_batchbuffer.h
@@ -0,0 +1,51 @@
+#ifndef _INTEL_BATCHBUFFER_H_
+#define _INTEL_BATCHBUFFER_H_
+
+#include <xf86drm.h>
+#include <drm.h>
+#include <i915_drm.h>
+#include <intel_bufmgr.h>
+
+#include "intel_driver.h"
+
+struct intel_batchbuffer
+{
+ struct intel_driver_data *intel;
+ dri_bo *buffer;
+ unsigned int size;
+ unsigned char *map;
+ unsigned char *ptr;
+ int atomic;
+};
+
+Bool intel_batchbuffer_init(struct intel_driver_data *intel);
+Bool intel_batchbuffer_terminate(struct intel_driver_data *intel);
+void intel_batchbuffer_emit_dword(VADriverContextP ctx, unsigned int x);
+void intel_batchbuffer_emit_reloc(VADriverContextP ctx, dri_bo *bo,
+ uint32_t read_domains, uint32_t write_domains,
+ uint32_t delta);
+void intel_batchbuffer_require_space(VADriverContextP ctx, unsigned int size);
+void intel_batchbuffer_data(VADriverContextP ctx, void *data, unsigned int size);
+void intel_batchbuffer_emit_mi_flush(VADriverContextP ctx);
+void intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size);
+void intel_batchbuffer_end_atomic(VADriverContextP ctx);
+Bool intel_batchbuffer_flush(VADriverContextP ctx);
+
+#define BEGIN_BATCH(ctx, n) do { \
+ intel_batchbuffer_require_space(ctx, (n) * 4); \
+} while (0)
+
+#define OUT_BATCH(ctx, d) do { \
+ intel_batchbuffer_emit_dword(ctx, d); \
+} while (0)
+
+#define OUT_RELOC(ctx, bo, read_domains, write_domain, delta) do { \
+ assert((delta) >= 0); \
+ intel_batchbuffer_emit_reloc(ctx, bo, \
+ read_domains, write_domain, delta); \
+} while (0)
+
+#define ADVANCE_BATCH(ctx) do { \
+} while (0)
+
+#endif /* _INTEL_BATCHBUFFER_H_ */
diff --git a/i965_drv_video/intel_driver.c b/i965_drv_video/intel_driver.c
new file mode 100644
index 0000000..6ab915c
--- /dev/null
+++ b/i965_drv_video/intel_driver.c
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#include <assert.h>
+
+#include "va_dricommon.h"
+
+#include "intel_batchbuffer.h"
+#include "intel_memman.h"
+#include "intel_driver.h"
+
+static Bool
+intel_driver_get_param(struct intel_driver_data *intel, int param, int *value)
+{
+ int ret;
+ struct drm_i915_getparam gp;
+
+ gp.param = param;
+ gp.value = value;
+
+ ret = drmCommandWriteRead(intel->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
+ assert(ret == 0);
+
+ return True;
+}
+
+Bool
+intel_driver_init(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+
+ assert(dri_state);
+ assert(dri_state->driConnectedFlag == VA_DRI2 ||
+ dri_state->driConnectedFlag == VA_DRI1);
+
+ intel->fd = dri_state->fd;
+ intel->dri2Enabled = (dri_state->driConnectedFlag == VA_DRI2);
+
+ if (!intel->dri2Enabled) {
+ drm_sarea_t *pSAREA;
+
+ pSAREA = (drm_sarea_t *)dri_state->pSAREA;
+ intel->hHWContext = dri_state->hwContext;
+ intel->driHwLock = (drmLock *)(&pSAREA->lock);
+ intel->pPrivSarea = (void *)pSAREA + sizeof(drm_sarea_t);
+ }
+
+ intel->locked = 0;
+ pthread_mutex_init(&intel->ctxmutex, NULL);
+
+ intel_driver_get_param(intel, I915_PARAM_CHIPSET_ID, &intel->device_id);
+ intel_memman_init(intel);
+ intel_batchbuffer_init(intel);
+
+ return True;
+}
+
+Bool
+intel_driver_terminate(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+
+ intel_memman_terminate(intel);
+ intel_batchbuffer_terminate(intel);
+
+ pthread_mutex_destroy(&intel->ctxmutex);
+
+ return True;
+}
+
+void
+intel_lock_hardware(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+ char __ret = 0;
+
+ PPTHREAD_MUTEX_LOCK();
+
+ assert(!intel->locked);
+
+ if (!intel->dri2Enabled) {
+ DRM_CAS(intel->driHwLock,
+ intel->hHWContext,
+ (DRM_LOCK_HELD|intel->hHWContext),
+ __ret);
+
+ if (__ret) {
+ drmGetLock(intel->fd, intel->hHWContext, 0);
+ }
+ }
+
+ intel->locked = 1;
+}
+
+void
+intel_unlock_hardware(VADriverContextP ctx)
+{
+ struct intel_driver_data *intel = intel_driver_data(ctx);
+
+ if (!intel->dri2Enabled) {
+ DRM_UNLOCK(intel->fd,
+ intel->driHwLock,
+ intel->hHWContext);
+ }
+
+ intel->locked = 0;
+ PPTHREAD_MUTEX_UNLOCK();
+}
diff --git a/i965_drv_video/intel_driver.h b/i965_drv_video/intel_driver.h
new file mode 100644
index 0000000..e0271eb
--- /dev/null
+++ b/i965_drv_video/intel_driver.h
@@ -0,0 +1,117 @@
+#ifndef _INTEL_DRIVER_H_
+#define _INTEL_DRIVER_H_
+
+#include <pthread.h>
+#include <signal.h>
+
+#include <xf86drm.h>
+#include <drm.h>
+#include <i915_drm.h>
+#include <intel_bufmgr.h>
+
+#include "va_backend.h"
+
+#if defined(__GNUC__)
+#define INLINE __inline__
+#else
+#define INLINE
+#endif
+
+#define BATCH_SIZE 0x10000
+#define BATCH_RESERVED 0x10
+
+#define CMD_MI (0x0 << 29)
+
+#define MI_NOOP (CMD_MI | 0)
+
+#define MI_BATCH_BUFFER_END (CMD_MI | (0xA << 23))
+
+#define MI_FLUSH (CMD_MI | (0x4 << 23))
+#define STATE_INSTRUCTION_CACHE_INVALIDATE (0x1 << 0)
+
+struct intel_batchbuffer;
+
+#define ALIGN(i, n) (((i) + (n) - 1) & ~((n) - 1))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#define SET_BLOCKED_SIGSET() do { \
+ sigset_t bl_mask; \
+ sigfillset(&bl_mask); \
+ sigdelset(&bl_mask, SIGFPE); \
+ sigdelset(&bl_mask, SIGILL); \
+ sigdelset(&bl_mask, SIGSEGV); \
+ sigdelset(&bl_mask, SIGBUS); \
+ sigdelset(&bl_mask, SIGKILL); \
+ pthread_sigmask(SIG_SETMASK, &bl_mask, &intel->sa_mask); \
+ } while (0)
+
+#define RESTORE_BLOCKED_SIGSET() do { \
+ pthread_sigmask(SIG_SETMASK, &intel->sa_mask, NULL); \
+ } while (0)
+
+#define PPTHREAD_MUTEX_LOCK() do { \
+ SET_BLOCKED_SIGSET(); \
+ pthread_mutex_lock(&intel->ctxmutex); \
+ } while (0)
+
+#define PPTHREAD_MUTEX_UNLOCK() do { \
+ pthread_mutex_unlock(&intel->ctxmutex); \
+ RESTORE_BLOCKED_SIGSET(); \
+ } while (0)
+
+struct intel_driver_data
+{
+ int fd;
+ int device_id;
+
+ int dri2Enabled;
+ drm_context_t hHWContext;
+ drm_i915_sarea_t *pPrivSarea;
+ drmLock *driHwLock;
+
+ sigset_t sa_mask;
+ pthread_mutex_t ctxmutex;
+ int locked;
+
+ struct intel_batchbuffer *batch;
+ dri_bufmgr *bufmgr;
+};
+
+Bool intel_driver_init(VADriverContextP ctx);
+Bool intel_driver_terminate(VADriverContextP ctx);
+void intel_lock_hardware(VADriverContextP ctx);
+void intel_unlock_hardware(VADriverContextP ctx);
+
+static INLINE struct intel_driver_data *
+intel_driver_data(VADriverContextP ctx)
+{
+ return (struct intel_driver_data *)ctx->pDriverData;
+}
+
+struct intel_region
+{
+ int x;
+ int y;
+ unsigned int width;
+ unsigned int height;
+ unsigned int cpp;
+ unsigned int pitch;
+ unsigned int tiling;
+ unsigned int swizzle;
+ dri_bo *bo;
+};
+
+#define PCI_CHIP_GM45_GM 0x2A42
+#define PCI_CHIP_IGD_E_G 0x2E02
+#define PCI_CHIP_Q45_G 0x2E12
+#define PCI_CHIP_G45_G 0x2E22
+#define PCI_CHIP_G41_G 0x2E32
+
+#define IS_G45(devid) (devid == PCI_CHIP_IGD_E_G || \
+ devid == PCI_CHIP_Q45_G || \
+ devid == PCI_CHIP_G45_G || \
+ devid == PCI_CHIP_G41_G)
+#define IS_GM45(devid) (devid == PCI_CHIP_GM45_GM)
+#define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid))
+
+#endif /* _INTEL_DRIVER_H_ */
diff --git a/i965_drv_video/intel_memman.c b/i965_drv_video/intel_memman.c
new file mode 100644
index 0000000..aeb4186
--- /dev/null
+++ b/i965_drv_video/intel_memman.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Xiang Haihao <haihao.xiang@intel.com>
+ * Zou Nan hai <nanhai.zou@intel.com>
+ *
+ */
+
+#include <assert.h>
+
+#include "intel_driver.h"
+
+Bool
+intel_memman_init(struct intel_driver_data *intel)
+{
+ intel->bufmgr = intel_bufmgr_gem_init(intel->fd, BATCH_SIZE);
+ assert(intel->bufmgr);
+ intel_bufmgr_gem_enable_reuse(intel->bufmgr);
+
+ return True;
+}
+
+Bool
+intel_memman_terminate(struct intel_driver_data *intel)
+{
+ return True;
+}
diff --git a/i965_drv_video/intel_memman.h b/i965_drv_video/intel_memman.h
new file mode 100644
index 0000000..4e516e5
--- /dev/null
+++ b/i965_drv_video/intel_memman.h
@@ -0,0 +1,7 @@
+#ifndef _INTEL_MEMMAN_H_
+#define _INTEL_MEMMAN_H_
+
+Bool intel_memman_init(struct intel_driver_data *intel);
+Bool intel_memman_terminate(struct intel_driver_data *intel);
+
+#endif /* _INTEL_MEMMAN_H_ */
diff --git a/i965_drv_video/object_heap.c b/i965_drv_video/object_heap.c
new file mode 100644
index 0000000..1900f8c
--- /dev/null
+++ b/i965_drv_video/object_heap.c
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2007 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "object_heap.h"
+
+#include "assert.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define ASSERT assert
+
+#define LAST_FREE -1
+#define ALLOCATED -2
+
+/*
+ * Expands the heap
+ * Return 0 on success, -1 on error
+ */
+static int object_heap_expand( object_heap_p heap )
+{
+ int i;
+ void *new_heap_index;
+ int next_free;
+ int new_heap_size = heap->heap_size + heap->heap_increment;
+
+ new_heap_index = (void *) realloc( heap->heap_index, new_heap_size * heap->object_size );
+ if ( NULL == new_heap_index )
+ {
+ return -1; /* Out of memory */
+ }
+ memset(new_heap_index + heap->heap_size*heap->object_size, 0, heap->heap_increment * new_heap_size);
+ heap->heap_index = new_heap_index;
+ next_free = heap->next_free;
+ for(i = new_heap_size; i-- > heap->heap_size; )
+ {
+ object_base_p obj = (object_base_p) (heap->heap_index + i * heap->object_size);
+ obj->id = i + heap->id_offset;
+ obj->next_free = next_free;
+ next_free = i;
+ }
+ heap->next_free = next_free;
+ heap->heap_size = new_heap_size;
+ return 0; /* Success */
+}
+
+/*
+ * Return 0 on success, -1 on error
+ */
+int object_heap_init( object_heap_p heap, int object_size, int id_offset)
+{
+ heap->object_size = object_size;
+ heap->id_offset = id_offset & OBJECT_HEAP_OFFSET_MASK;
+ heap->heap_size = 0;
+ heap->heap_increment = 16;
+ heap->heap_index = NULL;
+ heap->next_free = LAST_FREE;
+ return object_heap_expand(heap);
+}
+
+/*
+ * Allocates an object
+ * Returns the object ID on success, returns -1 on error
+ */
+int object_heap_allocate( object_heap_p heap )
+{
+ object_base_p obj;
+ if ( LAST_FREE == heap->next_free )
+ {
+ if( -1 == object_heap_expand( heap ) )
+ {
+ return -1; /* Out of memory */
+ }
+ }
+ ASSERT( heap->next_free >= 0 );
+
+ obj = (object_base_p) (heap->heap_index + heap->next_free * heap->object_size);
+ heap->next_free = obj->next_free;
+ obj->next_free = ALLOCATED;
+ return obj->id;
+}
+
+/*
+ * Lookup an object by object ID
+ * Returns a pointer to the object on success, returns NULL on error
+ */
+object_base_p object_heap_lookup( object_heap_p heap, int id )
+{
+ object_base_p obj;
+ if ( (id < heap->id_offset) || (id > (heap->heap_size+heap->id_offset)) )
+ {
+ return NULL;
+ }
+ id &= OBJECT_HEAP_ID_MASK;
+ obj = (object_base_p) (heap->heap_index + id * heap->object_size);
+
+ /* Check if the object has in fact been allocated */
+ if ( obj->next_free != ALLOCATED )
+ {
+ return NULL;
+ }
+ return obj;
+}
+
+/*
+ * Iterate over all objects in the heap.
+ * Returns a pointer to the first object on the heap, returns NULL if heap is empty.
+ */
+object_base_p object_heap_first( object_heap_p heap, object_heap_iterator *iter )
+{
+ *iter = -1;
+ return object_heap_next( heap, iter );
+}
+
+/*
+ * Iterate over all objects in the heap.
+ * Returns a pointer to the next object on the heap, returns NULL if heap is empty.
+ */
+object_base_p object_heap_next( object_heap_p heap, object_heap_iterator *iter )
+{
+ object_base_p obj;
+ int i = *iter + 1;
+ while ( i < heap->heap_size)
+ {
+ obj = (object_base_p) (heap->heap_index + i * heap->object_size);
+ if (obj->next_free == ALLOCATED)
+ {
+ *iter = i;
+ return obj;
+ }
+ i++;
+ }
+ *iter = i;
+ return NULL;
+}
+
+
+
+/*
+ * Frees an object
+ */
+void object_heap_free( object_heap_p heap, object_base_p obj )
+{
+ /* Don't complain about NULL pointers */
+ if (NULL != obj)
+ {
+ /* Check if the object has in fact been allocated */
+ ASSERT( obj->next_free == ALLOCATED );
+
+ obj->next_free = heap->next_free;
+ heap->next_free = obj->id & OBJECT_HEAP_ID_MASK;
+ }
+}
+
+/*
+ * Destroys a heap, the heap must be empty.
+ */
+void object_heap_destroy( object_heap_p heap )
+{
+ object_base_p obj;
+ int i;
+ /* Check if heap is empty */
+ for (i = 0; i < heap->heap_size; i++)
+ {
+ /* Check if object is not still allocated */
+ obj = (object_base_p) (heap->heap_index + i * heap->object_size);
+ ASSERT( obj->next_free != ALLOCATED );
+ }
+ free(heap->heap_index);
+ heap->heap_size = 0;
+ heap->heap_index = NULL;
+ heap->next_free = LAST_FREE;
+}
diff --git a/i965_drv_video/object_heap.h b/i965_drv_video/object_heap.h
new file mode 100644
index 0000000..154fddb
--- /dev/null
+++ b/i965_drv_video/object_heap.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2007 Intel Corporation. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef _OBJECT_HEAP_H_
+#define _OBJECT_HEAP_H_
+
+#define OBJECT_HEAP_OFFSET_MASK 0x7F000000
+#define OBJECT_HEAP_ID_MASK 0x00FFFFFF
+
+typedef struct object_base *object_base_p;
+typedef struct object_heap *object_heap_p;
+
+struct object_base {
+ int id;
+ int next_free;
+};
+
+struct object_heap {
+ int object_size;
+ int id_offset;
+ void *heap_index;
+ int next_free;
+ int heap_size;
+ int heap_increment;
+};
+
+typedef int object_heap_iterator;
+
+/*
+ * Return 0 on success, -1 on error
+ */
+int object_heap_init( object_heap_p heap, int object_size, int id_offset);
+
+/*
+ * Allocates an object
+ * Returns the object ID on success, returns -1 on error
+ */
+int object_heap_allocate( object_heap_p heap );
+
+/*
+ * Lookup an allocated object by object ID
+ * Returns a pointer to the object on success, returns NULL on error
+ */
+object_base_p object_heap_lookup( object_heap_p heap, int id );
+
+/*
+ * Iterate over all objects in the heap.
+ * Returns a pointer to the first object on the heap, returns NULL if heap is empty.
+ */
+object_base_p object_heap_first( object_heap_p heap, object_heap_iterator *iter );
+
+/*
+ * Iterate over all objects in the heap.
+ * Returns a pointer to the next object on the heap, returns NULL if heap is empty.
+ */
+object_base_p object_heap_next( object_heap_p heap, object_heap_iterator *iter );
+
+/*
+ * Frees an object
+ */
+void object_heap_free( object_heap_p heap, object_base_p obj );
+
+/*
+ * Destroys a heap, the heap must be empty.
+ */
+void object_heap_destroy( object_heap_p heap );
+
+#endif /* _OBJECT_HEAP_H_ */
diff --git a/i965_drv_video/shaders/Makefile.am b/i965_drv_video/shaders/Makefile.am
new file mode 100644
index 0000000..24f1aa8
--- /dev/null
+++ b/i965_drv_video/shaders/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = mpeg2 render
diff --git a/i965_drv_video/shaders/mpeg2/Makefile.am b/i965_drv_video/shaders/mpeg2/Makefile.am
new file mode 100644
index 0000000..e5c6e7f
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = vld
diff --git a/i965_drv_video/shaders/mpeg2/vld/Makefile.am b/i965_drv_video/shaders/mpeg2/vld/Makefile.am
new file mode 100644
index 0000000..463dc16
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/Makefile.am
@@ -0,0 +1,72 @@
+
+INTEL_G4I = addidct.g4i \
+ do_iq_intra.g4i \
+ do_iq_non_intra.g4i \
+ idct.g4i \
+ iq_intra.g4i \
+ iq_non_intra.g4i \
+ motion_field_uv.g4i \
+ motion_field_y.g4i \
+ motion_frame_uv.g4i \
+ motion_frame_y.g4i \
+ read_field_x0y0_uv.g4i \
+ read_field_x0y0_y.g4i \
+ read_field_x0y1_y.g4i \
+ read_field_x1y0_y.g4i \
+ read_field_x1y1_y.g4i \
+ read_frame_x0y0_uv.g4i \
+ read_frame_x0y0_y.g4i \
+ read_frame_x0y1_y.g4i \
+ read_frame_x1y0_y.g4i \
+ read_frame_x1y1_y.g4i
+
+INTEL_G4A = frame_intra.g4a \
+ frame_frame_pred_forward.g4a \
+ frame_frame_pred_backward.g4a \
+ frame_frame_pred_bidirect.g4a \
+ frame_field_pred_forward.g4a \
+ frame_field_pred_backward.g4a \
+ frame_field_pred_bidirect.g4a \
+ lib.g4a \
+ field_intra.g4a \
+ field_forward.g4a \
+ field_forward_16x8.g4a \
+ field_backward.g4a \
+ field_backward_16x8.g4a \
+ field_bidirect.g4a \
+ field_bidirect_16x8.g4a \
+ null.g4a
+
+INTEL_G4B = frame_intra.g4b \
+ frame_frame_pred_forward.g4b \
+ frame_frame_pred_backward.g4b \
+ frame_frame_pred_bidirect.g4b \
+ frame_field_pred_forward.g4b \
+ frame_field_pred_backward.g4b \
+ frame_field_pred_bidirect.g4b \
+ lib.g4b \
+ field_intra.g4b \
+ field_forward.g4b \
+ field_forward_16x8.g4b \
+ field_backward.g4b \
+ field_backward_16x8.g4b \
+ field_bidirect.g4b \
+ field_bidirect_16x8.g4b
+
+EXTRA_DIST = $(INTEL_G4I) \
+ $(INTEL_G4A) \
+ $(INTEL_G4B)
+
+if HAVE_GEN4ASM
+
+SUFFIXES = .g4a .g4b
+.g4a.g4b:
+ m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && rm $*.g4m
+
+$(INTEL_G4B): $(INTEL_G4I)
+
+BUILT_SOURCES= $(INTEL_G4B)
+
+clean-local:
+ -rm -f $(INTEL_G4B)
+endif
diff --git a/i965_drv_video/shaders/mpeg2/vld/addidct.g4i b/i965_drv_video/shaders/mpeg2/vld/addidct.g4i
new file mode 100644
index 0000000..b57548d
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/addidct.g4i
@@ -0,0 +1,152 @@
+/*
+ * Copyright © 2008 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g32: message descriptor for reading reference data
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data */
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1}; //restore x and y
+
+and.nz (1) null g82.2<1,1,1>UW 0x20UW {align1}; //dct_type
+(f0) jmpi field_dct;
+
+add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
+add (16) g59.0<1>W g84.0<16,16,1>W g59.0<16,16,2>UB {align1};
+add (16) g60.0<1>W g85.0<16,16,1>W g60.0<16,16,2>UB {align1};
+add (16) g61.0<1>W g86.0<16,16,1>W g61.0<16,16,2>UB {align1};
+add (16) g62.0<1>W g87.0<16,16,1>W g62.0<16,16,2>UB {align1};
+add (16) g63.0<1>W g88.0<16,16,1>W g63.0<16,16,2>UB {align1};
+add (16) g64.0<1>W g89.0<16,16,1>W g64.0<16,16,2>UB {align1};
+add (16) g65.0<1>W g90.0<16,16,1>W g65.0<16,16,2>UB {align1};
+add (16) g66.0<1>W g91.0<16,16,1>W g66.0<16,16,2>UB {align1};
+add (16) g67.0<1>W g92.0<16,16,1>W g67.0<16,16,2>UB {align1};
+add (16) g68.0<1>W g93.0<16,16,1>W g68.0<16,16,2>UB {align1};
+add (16) g69.0<1>W g94.0<16,16,1>W g69.0<16,16,2>UB {align1};
+add (16) g70.0<1>W g95.0<16,16,1>W g70.0<16,16,2>UB {align1};
+add (16) g71.0<1>W g96.0<16,16,1>W g71.0<16,16,2>UB {align1};
+add (16) g72.0<1>W g97.0<16,16,1>W g72.0<16,16,2>UB {align1};
+add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
+jmpi write_back;
+
+field_dct:
+add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
+add (16) g59.0<1>W g91.0<16,16,1>W g59.0<16,16,2>UB {align1};
+add (16) g60.0<1>W g84.0<16,16,1>W g60.0<16,16,2>UB {align1};
+add (16) g61.0<1>W g92.0<16,16,1>W g61.0<16,16,2>UB {align1};
+add (16) g62.0<1>W g85.0<16,16,1>W g62.0<16,16,2>UB {align1};
+add (16) g63.0<1>W g93.0<16,16,1>W g63.0<16,16,2>UB {align1};
+add (16) g64.0<1>W g86.0<16,16,1>W g64.0<16,16,2>UB {align1};
+add (16) g65.0<1>W g94.0<16,16,1>W g65.0<16,16,2>UB {align1};
+add (16) g66.0<1>W g87.0<16,16,1>W g66.0<16,16,2>UB {align1};
+add (16) g67.0<1>W g95.0<16,16,1>W g67.0<16,16,2>UB {align1};
+add (16) g68.0<1>W g88.0<16,16,1>W g68.0<16,16,2>UB {align1};
+add (16) g69.0<1>W g96.0<16,16,1>W g69.0<16,16,2>UB {align1};
+add (16) g70.0<1>W g89.0<16,16,1>W g70.0<16,16,2>UB {align1};
+add (16) g71.0<1>W g97.0<16,16,1>W g71.0<16,16,2>UB {align1};
+add (16) g72.0<1>W g90.0<16,16,1>W g72.0<16,16,2>UB {align1};
+add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
+
+write_back:
+mov (1) g31.8<1>UD 0x00F000FUD {align1};
+mov.sat (16) g58.0<2>UB g58.0<16,16,1>W {align1};
+mov.sat (16) g59.0<2>UB g59.0<16,16,1>W {align1};
+mov.sat (16) g60.0<2>UB g60.0<16,16,1>W {align1};
+mov.sat (16) g61.0<2>UB g61.0<16,16,1>W {align1};
+mov.sat (16) g62.0<2>UB g62.0<16,16,1>W {align1};
+mov.sat (16) g63.0<2>UB g63.0<16,16,1>W {align1};
+mov.sat (16) g64.0<2>UB g64.0<16,16,1>W {align1};
+mov.sat (16) g65.0<2>UB g65.0<16,16,1>W {align1};
+mov.sat (16) g66.0<2>UB g66.0<16,16,1>W {align1};
+mov.sat (16) g67.0<2>UB g67.0<16,16,1>W {align1};
+mov.sat (16) g68.0<2>UB g68.0<16,16,1>W {align1};
+mov.sat (16) g69.0<2>UB g69.0<16,16,1>W {align1};
+mov.sat (16) g70.0<2>UB g70.0<16,16,1>W {align1};
+mov.sat (16) g71.0<2>UB g71.0<16,16,1>W {align1};
+mov.sat (16) g72.0<2>UB g72.0<16,16,1>W {align1};
+mov.sat (16) g73.0<2>UB g73.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g58.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g59.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g60.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g61.0<16,16,2>UB {align1};
+mov (16) m3.0<1>UB g62.0<16,16,2>UB {align1};
+mov (16) m3.16<1>UB g63.0<16,16,2>UB {align1};
+mov (16) m4.0<1>UB g64.0<16,16,2>UB {align1};
+mov (16) m4.16<1>UB g65.0<16,16,2>UB {align1};
+mov (16) m5.0<1>UB g66.0<16,16,2>UB {align1};
+mov (16) m5.16<1>UB g67.0<16,16,2>UB {align1};
+mov (16) m6.0<1>UB g68.0<16,16,2>UB {align1};
+mov (16) m6.16<1>UB g69.0<16,16,2>UB {align1};
+mov (16) m7.0<1>UB g70.0<16,16,2>UB {align1};
+mov (16) m7.16<1>UB g71.0<16,16,2>UB {align1};
+mov (16) m8.0<1>UB g72.0<16,16,2>UB {align1};
+mov (16) m8.16<1>UB g73.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(0,0,2,0) mlen 9 rlen 0 {align1};
+
+//U
+mov (1) g31.8<1>UD 0x0070007UD { align1 };
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1D {align1};
+add (16) g74.0<1>W g99.0<16,16,1>W g74.0<16,16,1>UW {align1};
+add (16) g75.0<1>W g100.0<16,16,1>W g75.0<16,16,1>UW {align1};
+add (16) g76.0<1>W g101.0<16,16,1>W g76.0<16,16,1>UW {align1};
+add (16) g77.0<1>W g102.0<16,16,1>W g77.0<16,16,1>UW {align1};
+mov.sat (16) g74.0<2>UB g74.0<16,16,1>W {align1};
+mov.sat (16) g75.0<2>UB g75.0<16,16,1>W {align1};
+mov.sat (16) g76.0<2>UB g76.0<16,16,1>W {align1};
+mov.sat (16) g77.0<2>UB g77.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g74.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g75.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g76.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g77.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+//V
+add (16) g78.0<1>UW g103.0<16,16,1>W g78.0<16,16,1>UW {align1};
+add (16) g79.0<1>UW g104.0<16,16,1>W g79.0<16,16,1>UW {align1};
+add (16) g80.0<1>UW g105.0<16,16,1>W g80.0<16,16,1>UW {align1};
+add (16) g81.0<1>UW g106.0<16,16,1>W g81.0<16,16,1>UW {align1};
+mov.sat (16) g78.0<2>UB g78.0<16,16,1>W {align1};
+mov.sat (16) g79.0<2>UB g79.0<16,16,1>W {align1};
+mov.sat (16) g80.0<2>UB g80.0<16,16,1>W {align1};
+mov.sat (16) g81.0<2>UB g81.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g78.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g79.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g80.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g81.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
+
diff --git a/i965_drv_video/shaders/mpeg2/vld/do_iq_intra.g4i b/i965_drv_video/shaders/mpeg2/vld/do_iq_intra.g4i
new file mode 100644
index 0000000..29bd020
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/do_iq_intra.g4i
@@ -0,0 +1,64 @@
+/*
+ * Copyright © 2008 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g112~g115: intra IQ matrix in UW format (in order to use instruction compress), copys from g1~g2
+ g[a0.0]:DCT data of a block
+ g125: ip before jump
+ if(v==0 && u==0 && intra_mb)
+ F''[v][u] = QF[v][u] * intra_dc_mult
+ else
+ F''[v][u] = (QF[v][u]*W[w][v][u]*quantiser_scale*2)/32
+*/
+DO_IQ_INTRA:
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mov (1) g111.0<1>W g[a0.0]<1,1,1>W {align1};
+mul (16) g116.0<1>D g[a0.0]<8,8,1>W g112.0<8,8,1>UW {align1 compr};
+mul (16) g116.0<1>D g116.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g116.0<1>D g116.0<8,8,1>D 4UW {align1 compr};
+mul (1) g116.0<1>D g111<1,1,1>W g109.4<1,1,1>UW {align1}; //intra_dc_mult
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g118.0<1>D g[a0.0]<8,8,1>W g113.0<8,8,1>UW {align1 compr};
+mul (16) g118.0<1>D g118.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g118.0<1>D g118.0<8,8,1>D 4UW {align1 compr};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g120.0<1>D g[a0.0]<8,8,1>W g114.0<8,8,1>UW {align1 compr};
+mul (16) g120.0<1>D g120.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g120.0<1>D g120.0<8,8,1>D 4UW {align1 compr};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g122.0<1>D g[a0.0]<8,8,1>W g115.0<8,8,1>UW {align1 compr};
+mul (16) g122.0<1>D g122.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g122.0<1>D g122.0<8,8,1>D 4UW {align1 compr};
+
+add (1) ip g125.0<1,1,1>UD 0x20UD {align1}; //jump back
diff --git a/i965_drv_video/shaders/mpeg2/vld/do_iq_non_intra.g4i b/i965_drv_video/shaders/mpeg2/vld/do_iq_non_intra.g4i
new file mode 100644
index 0000000..da85e84
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/do_iq_non_intra.g4i
@@ -0,0 +1,59 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g112~g115: intra IQ matrix in UW format (in order to use instruction compress), copys from g1~g2
+ g[a0.0]:DCT data of a block
+ g125: ip before jump
+ F''[v][u]=(((QF[v][u]*2)+Sign(QF[v][u])) * W[w][v][u] * quantiser_scale)/32;
+*/
+DO_IQ_NON_INTRA:
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g116.0<1>D g[a0.0]<8,8,1>W g112.0<8,8,1>UW {align1 compr};
+mul (16) g116.0<1>D g116.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g116.0<1>D g116.0<8,8,1>D 4UW {align1 compr};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g118.0<1>D g[a0.0]<8,8,1>W g113.0<8,8,1>UW {align1 compr};
+mul (16) g118.0<1>D g118.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g118.0<1>D g118.0<8,8,1>D 4UW {align1 compr};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g120.0<1>D g[a0.0]<8,8,1>W g114.0<8,8,1>UW {align1 compr};
+mul (16) g120.0<1>D g120.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g120.0<1>D g120.0<8,8,1>D 4UW {align1 compr};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+mul (16) g122.0<1>D g[a0.0]<8,8,1>W g115.0<8,8,1>UW {align1 compr};
+mul (16) g122.0<1>D g122.0<8,8,1>D g109.0<8,8,0>UW {align1 compr};
+asr (16) g122.0<1>D g122.0<8,8,1>D 4UW {align1 compr};
+
+add (1) ip g125.0<1,1,1>UD 0x20UD {align1}; //jump back
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_addidct.g4i b/i965_drv_video/shaders/mpeg2/vld/field_addidct.g4i
new file mode 100644
index 0000000..05d0f95
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_addidct.g4i
@@ -0,0 +1,153 @@
+/*
+ * Copyright © 2008 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g32: message descriptor for reading reference data
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data */
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1}; //restore x and y
+
+and.nz (1) null g82.2<1,1,1>UW 0x20UW {align1}; //dct_type
+(f0) jmpi field_dct;
+
+add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
+add (16) g59.0<1>W g84.0<16,16,1>W g59.0<16,16,2>UB {align1};
+add (16) g60.0<1>W g85.0<16,16,1>W g60.0<16,16,2>UB {align1};
+add (16) g61.0<1>W g86.0<16,16,1>W g61.0<16,16,2>UB {align1};
+add (16) g62.0<1>W g87.0<16,16,1>W g62.0<16,16,2>UB {align1};
+add (16) g63.0<1>W g88.0<16,16,1>W g63.0<16,16,2>UB {align1};
+add (16) g64.0<1>W g89.0<16,16,1>W g64.0<16,16,2>UB {align1};
+add (16) g65.0<1>W g90.0<16,16,1>W g65.0<16,16,2>UB {align1};
+add (16) g66.0<1>W g91.0<16,16,1>W g66.0<16,16,2>UB {align1};
+add (16) g67.0<1>W g92.0<16,16,1>W g67.0<16,16,2>UB {align1};
+add (16) g68.0<1>W g93.0<16,16,1>W g68.0<16,16,2>UB {align1};
+add (16) g69.0<1>W g94.0<16,16,1>W g69.0<16,16,2>UB {align1};
+add (16) g70.0<1>W g95.0<16,16,1>W g70.0<16,16,2>UB {align1};
+add (16) g71.0<1>W g96.0<16,16,1>W g71.0<16,16,2>UB {align1};
+add (16) g72.0<1>W g97.0<16,16,1>W g72.0<16,16,2>UB {align1};
+add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
+
+jmpi write_back;
+
+field_dct:
+add (16) g58.0<1>W g83.0<16,16,1>W g58.0<16,16,2>UB {align1};
+add (16) g59.0<1>W g91.0<16,16,1>W g59.0<16,16,2>UB {align1};
+add (16) g60.0<1>W g84.0<16,16,1>W g60.0<16,16,2>UB {align1};
+add (16) g61.0<1>W g92.0<16,16,1>W g61.0<16,16,2>UB {align1};
+add (16) g62.0<1>W g85.0<16,16,1>W g62.0<16,16,2>UB {align1};
+add (16) g63.0<1>W g93.0<16,16,1>W g63.0<16,16,2>UB {align1};
+add (16) g64.0<1>W g86.0<16,16,1>W g64.0<16,16,2>UB {align1};
+add (16) g65.0<1>W g94.0<16,16,1>W g65.0<16,16,2>UB {align1};
+add (16) g66.0<1>W g87.0<16,16,1>W g66.0<16,16,2>UB {align1};
+add (16) g67.0<1>W g95.0<16,16,1>W g67.0<16,16,2>UB {align1};
+add (16) g68.0<1>W g88.0<16,16,1>W g68.0<16,16,2>UB {align1};
+add (16) g69.0<1>W g96.0<16,16,1>W g69.0<16,16,2>UB {align1};
+add (16) g70.0<1>W g89.0<16,16,1>W g70.0<16,16,2>UB {align1};
+add (16) g71.0<1>W g97.0<16,16,1>W g71.0<16,16,2>UB {align1};
+add (16) g72.0<1>W g90.0<16,16,1>W g72.0<16,16,2>UB {align1};
+add (16) g73.0<1>W g98.0<16,16,1>W g73.0<16,16,2>UB {align1};
+
+write_back:
+mov (1) g31.8<1>UD 0x00F000FUD {align1};
+mov.sat (16) g58.0<2>UB g58.0<16,16,1>W {align1};
+mov.sat (16) g59.0<2>UB g59.0<16,16,1>W {align1};
+mov.sat (16) g60.0<2>UB g60.0<16,16,1>W {align1};
+mov.sat (16) g61.0<2>UB g61.0<16,16,1>W {align1};
+mov.sat (16) g62.0<2>UB g62.0<16,16,1>W {align1};
+mov.sat (16) g63.0<2>UB g63.0<16,16,1>W {align1};
+mov.sat (16) g64.0<2>UB g64.0<16,16,1>W {align1};
+mov.sat (16) g65.0<2>UB g65.0<16,16,1>W {align1};
+mov.sat (16) g66.0<2>UB g66.0<16,16,1>W {align1};
+mov.sat (16) g67.0<2>UB g67.0<16,16,1>W {align1};
+mov.sat (16) g68.0<2>UB g68.0<16,16,1>W {align1};
+mov.sat (16) g69.0<2>UB g69.0<16,16,1>W {align1};
+mov.sat (16) g70.0<2>UB g70.0<16,16,1>W {align1};
+mov.sat (16) g71.0<2>UB g71.0<16,16,1>W {align1};
+mov.sat (16) g72.0<2>UB g72.0<16,16,1>W {align1};
+mov.sat (16) g73.0<2>UB g73.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g58.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g59.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g60.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g61.0<16,16,2>UB {align1};
+mov (16) m3.0<1>UB g62.0<16,16,2>UB {align1};
+mov (16) m3.16<1>UB g63.0<16,16,2>UB {align1};
+mov (16) m4.0<1>UB g64.0<16,16,2>UB {align1};
+mov (16) m4.16<1>UB g65.0<16,16,2>UB {align1};
+mov (16) m5.0<1>UB g66.0<16,16,2>UB {align1};
+mov (16) m5.16<1>UB g67.0<16,16,2>UB {align1};
+mov (16) m6.0<1>UB g68.0<16,16,2>UB {align1};
+mov (16) m6.16<1>UB g69.0<16,16,2>UB {align1};
+mov (16) m7.0<1>UB g70.0<16,16,2>UB {align1};
+mov (16) m7.16<1>UB g71.0<16,16,2>UB {align1};
+mov (16) m8.0<1>UB g72.0<16,16,2>UB {align1};
+mov (16) m8.16<1>UB g73.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(0,0,2,0) mlen 9 rlen 0 {align1};
+
+//U
+mov (1) g31.8<1>UD 0x0070007UD { align1 };
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1D {align1};
+add (16) g74.0<1>W g99.0<16,16,1>W g74.0<16,16,1>UW {align1};
+add (16) g75.0<1>W g100.0<16,16,1>W g75.0<16,16,1>UW {align1};
+add (16) g76.0<1>W g101.0<16,16,1>W g76.0<16,16,1>UW {align1};
+add (16) g77.0<1>W g102.0<16,16,1>W g77.0<16,16,1>UW {align1};
+mov.sat (16) g74.0<2>UB g74.0<16,16,1>W {align1};
+mov.sat (16) g75.0<2>UB g75.0<16,16,1>W {align1};
+mov.sat (16) g76.0<2>UB g76.0<16,16,1>W {align1};
+mov.sat (16) g77.0<2>UB g77.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g74.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g75.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g76.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g77.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+//V
+add (16) g78.0<1>UW g103.0<16,16,1>W g78.0<16,16,1>UW {align1};
+add (16) g79.0<1>UW g104.0<16,16,1>W g79.0<16,16,1>UW {align1};
+add (16) g80.0<1>UW g105.0<16,16,1>W g80.0<16,16,1>UW {align1};
+add (16) g81.0<1>UW g106.0<16,16,1>W g81.0<16,16,1>UW {align1};
+mov.sat (16) g78.0<2>UB g78.0<16,16,1>W {align1};
+mov.sat (16) g79.0<2>UB g79.0<16,16,1>W {align1};
+mov.sat (16) g80.0<2>UB g80.0<16,16,1>W {align1};
+mov.sat (16) g81.0<2>UB g81.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g78.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g79.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g80.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g81.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
+
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_backward.g4a b/i965_drv_video/shaders/mpeg2/vld/field_backward.g4a
new file mode 100644
index 0000000..1696ff3
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_backward.g4a
@@ -0,0 +1,99 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+//Y of top field
+first_field_picture:
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1}; //motion vertical field select forward
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_y.g4i')
+//UV of top field
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.20<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1}; //motion vertical field select forward
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface_u', `8')
+define(`surface_v', `9')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_uv.g4i')
+jmpi field_addidct;
+
+second_field_picture:
+//Y of bottom field
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface',`3')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_y.g4i')
+//UV of bottom field
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.20<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface_u', `10')
+define(`surface_v', `11')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_uv.g4i')
+
+field_addidct:
+include(`field_addidct.g4i')
+out:
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_backward.g4b b/i965_drv_video/shaders/mpeg2/vld/field_backward.g4b
new file mode 100644
index 0000000..f00d8e5
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_backward.g4b
@@ -0,0 +1,757 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20002dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20003dbc, 0x00210a54, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000143 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20002dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20003dbc, 0x00210a54, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4a b/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4a
new file mode 100644
index 0000000..89b8368
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4a
@@ -0,0 +1,30 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+define(`UV_red',`0xffffffffUD')
+define(`UV_white',`0x7f7f7f7fUD')
+define(`UV_green',`0x00000000UD')
+mov(2) g6.0<1>UD g82.12<2,2,1>UW {align1};
+mov(1) g6.8<1>UD 0x000f000fUD { align1 };
+mov(16) m1<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m3<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m5<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m7<1>UD 0xFFFFFFFFUD {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(0, 0, 2, 0) mlen 9 rlen 0 { align1 };
+/*Fill U buffer & V buffer with 0x7F*/
+shr (2) g6.0<1>UD g82.12<2,2,1>UW 1UW {align1};
+mov(1) g6.8<1>UD 0x00070007UD { align1 };
+mov (16) m1<1>UD UV_white {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4b b/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4b
new file mode 100644
index 0000000..9d95f70
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_backward_16x8.g4b
@@ -0,0 +1,15 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00200001, 0x20c00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x000f000f },
+ { 0x00802001, 0x20200062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20600062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20a00062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20e00062, 0x00000000, 0xffffffff },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05902000 },
+ { 0x00200008, 0x20c02d21, 0x00450a4c, 0x00010001 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x00070007 },
+ { 0x00802001, 0x20200062, 0x00000000, 0x7f7f7f7f },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302001 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4a b/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4a
new file mode 100644
index 0000000..ad6d302
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4a
@@ -0,0 +1,141 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+//Y of forward
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_y.g4i')
+mov (16) g108.0<1>UD g58.0<16,16,1>UD {align1 compr};
+mov (16) g110.0<1>UD g60.0<16,16,1>UD {align1 compr};
+mov (16) g112.0<1>UD g62.0<16,16,1>UD {align1 compr};
+mov (16) g114.0<1>UD g64.0<16,16,1>UD {align1 compr};
+mov (16) g116.0<1>UD g66.0<16,16,1>UD {align1 compr};
+mov (16) g118.0<1>UD g68.0<16,16,1>UD {align1 compr};
+mov (16) g120.0<1>UD g70.0<16,16,1>UD {align1 compr};
+mov (16) g122.0<1>UD g72.0<16,16,1>UD {align1 compr};
+
+//Y of backward
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1}; //motion vertical field select
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_y.g4i')
+avg (16) g58.0<1>UW g58.0<16,16,1>UW g108.0<16,16,1>UW {align1};
+avg (16) g59.0<1>UW g59.0<16,16,1>UW g109.0<16,16,1>UW {align1};
+avg (16) g60.0<1>UW g60.0<16,16,1>UW g110.0<16,16,1>UW {align1};
+avg (16) g61.0<1>UW g61.0<16,16,1>UW g111.0<16,16,1>UW {align1};
+avg (16) g62.0<1>UW g62.0<16,16,1>UW g112.0<16,16,1>UW {align1};
+avg (16) g63.0<1>UW g63.0<16,16,1>UW g113.0<16,16,1>UW {align1};
+avg (16) g64.0<1>UW g64.0<16,16,1>UW g114.0<16,16,1>UW {align1};
+avg (16) g65.0<1>UW g65.0<16,16,1>UW g115.0<16,16,1>UW {align1};
+avg (16) g66.0<1>UW g66.0<16,16,1>UW g116.0<16,16,1>UW {align1};
+avg (16) g67.0<1>UW g67.0<16,16,1>UW g117.0<16,16,1>UW {align1};
+avg (16) g68.0<1>UW g68.0<16,16,1>UW g118.0<16,16,1>UW {align1};
+avg (16) g69.0<1>UW g69.0<16,16,1>UW g119.0<16,16,1>UW {align1};
+avg (16) g70.0<1>UW g70.0<16,16,1>UW g120.0<16,16,1>UW {align1};
+avg (16) g71.0<1>UW g71.0<16,16,1>UW g121.0<16,16,1>UW {align1};
+avg (16) g72.0<1>UW g72.0<16,16,1>UW g122.0<16,16,1>UW {align1};
+avg (16) g73.0<1>UW g73.0<16,16,1>UW g123.0<16,16,1>UW {align1};
+
+//UV, Forward
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface_u', `5')
+define(`surface_v', `6')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_uv.g4i')
+//Save UV Forward
+mov (16) g108.0<1>UD g74.0<16,16,1>UD {align1 compr};
+mov (16) g110.0<1>UD g76.0<16,16,1>UD {align1 compr};
+mov (16) g112.0<1>UD g78.0<16,16,1>UD {align1 compr};
+mov (16) g114.0<1>UD g80.0<16,16,1>UD {align1 compr};
+
+//UV, Backward
+asr (2) g31.14<1>W g82.20<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1}; //motion vertical field select
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface_u', `8')
+define(`surface_v', `9')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`field_motion_uv.g4i')
+//Average Forward and Backward
+avg (16) g74.0<1>UW g74.0<16,16,1>UW g108.0<16,16,1>UW {align1};
+avg (16) g75.0<1>UW g75.0<16,16,1>UW g109.0<16,16,1>UW {align1};
+avg (16) g76.0<1>UW g76.0<16,16,1>UW g110.0<16,16,1>UW {align1};
+avg (16) g77.0<1>UW g77.0<16,16,1>UW g111.0<16,16,1>UW {align1};
+avg (16) g78.0<1>UW g78.0<16,16,1>UW g112.0<16,16,1>UW {align1};
+avg (16) g79.0<1>UW g79.0<16,16,1>UW g113.0<16,16,1>UW {align1};
+avg (16) g80.0<1>UW g80.0<16,16,1>UW g114.0<16,16,1>UW {align1};
+avg (16) g81.0<1>UW g81.0<16,16,1>UW g115.0<16,16,1>UW {align1};
+
+field_addidct:
+include(`field_addidct.g4i')
+out:
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4b b/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4b
new file mode 100644
index 0000000..181e776
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_bidirect.g4b
@@ -0,0 +1,797 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20002dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00802001, 0x2d800021, 0x00b10740, 0x00000000 },
+ { 0x00802001, 0x2dc00021, 0x00b10780, 0x00000000 },
+ { 0x00802001, 0x2e000021, 0x00b107c0, 0x00000000 },
+ { 0x00802001, 0x2e400021, 0x00b10800, 0x00000000 },
+ { 0x00802001, 0x2e800021, 0x00b10840, 0x00000000 },
+ { 0x00802001, 0x2ec00021, 0x00b10880, 0x00000000 },
+ { 0x00802001, 0x2f000021, 0x00b108c0, 0x00000000 },
+ { 0x00802001, 0x2f400021, 0x00b10900, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20002dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00800042, 0x27402529, 0x00b10740, 0x00b10d80 },
+ { 0x00800042, 0x27602529, 0x00b10760, 0x00b10da0 },
+ { 0x00800042, 0x27802529, 0x00b10780, 0x00b10dc0 },
+ { 0x00800042, 0x27a02529, 0x00b107a0, 0x00b10de0 },
+ { 0x00800042, 0x27c02529, 0x00b107c0, 0x00b10e00 },
+ { 0x00800042, 0x27e02529, 0x00b107e0, 0x00b10e20 },
+ { 0x00800042, 0x28002529, 0x00b10800, 0x00b10e40 },
+ { 0x00800042, 0x28202529, 0x00b10820, 0x00b10e60 },
+ { 0x00800042, 0x28402529, 0x00b10840, 0x00b10e80 },
+ { 0x00800042, 0x28602529, 0x00b10860, 0x00b10ea0 },
+ { 0x00800042, 0x28802529, 0x00b10880, 0x00b10ec0 },
+ { 0x00800042, 0x28a02529, 0x00b108a0, 0x00b10ee0 },
+ { 0x00800042, 0x28c02529, 0x00b108c0, 0x00b10f00 },
+ { 0x00800042, 0x28e02529, 0x00b108e0, 0x00b10f20 },
+ { 0x00800042, 0x29002529, 0x00b10900, 0x00b10f40 },
+ { 0x00800042, 0x29202529, 0x00b10920, 0x00b10f60 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20003dbc, 0x00210a50, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00802001, 0x2d800021, 0x00b10940, 0x00000000 },
+ { 0x00802001, 0x2dc00021, 0x00b10980, 0x00000000 },
+ { 0x00802001, 0x2e000021, 0x00b109c0, 0x00000000 },
+ { 0x00802001, 0x2e400021, 0x00b10a00, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20003dbc, 0x00210a54, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a009 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00800042, 0x29402529, 0x00b10940, 0x00b10d80 },
+ { 0x00800042, 0x29602529, 0x00b10960, 0x00b10da0 },
+ { 0x00800042, 0x29802529, 0x00b10980, 0x00b10dc0 },
+ { 0x00800042, 0x29a02529, 0x00b109a0, 0x00b10de0 },
+ { 0x00800042, 0x29c02529, 0x00b109c0, 0x00b10e00 },
+ { 0x00800042, 0x29e02529, 0x00b109e0, 0x00b10e20 },
+ { 0x00800042, 0x2a002529, 0x00b10a00, 0x00b10e40 },
+ { 0x00800042, 0x2a202529, 0x00b10a20, 0x00b10e60 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4a b/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4a
new file mode 100644
index 0000000..e4fc178
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4a
@@ -0,0 +1,31 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+define(`UV_red',`0xffffffffUD')
+define(`UV_white',`0x7f7f7f7fUD')
+define(`UV_green',`0x00000000UD')
+mov(2) g6.0<1>UD g82.12<2,2,1>UW {align1};
+mov(1) g6.8<1>UD 0x000f000fUD { align1 };
+mov(16) m1<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m3<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m5<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m7<1>UD 0xFFFFFFFFUD {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(0, 0, 2, 0) mlen 9 rlen 0 { align1 };
+/*Fill U buffer & V buffer with 0x7F*/
+shr (2) g6.0<1>UD g82.12<2,2,1>UW 1UW {align1};
+mov(1) g6.8<1>UD 0x00070007UD { align1 };
+mov (16) m1<1>UD UV_white {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4b b/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4b
new file mode 100644
index 0000000..9d95f70
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_bidirect_16x8.g4b
@@ -0,0 +1,15 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00200001, 0x20c00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x000f000f },
+ { 0x00802001, 0x20200062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20600062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20a00062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20e00062, 0x00000000, 0xffffffff },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05902000 },
+ { 0x00200008, 0x20c02d21, 0x00450a4c, 0x00010001 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x00070007 },
+ { 0x00802001, 0x20200062, 0x00000000, 0x7f7f7f7f },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302001 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_forward.g4a b/i965_drv_video/shaders/mpeg2/vld/field_forward.g4a
new file mode 100644
index 0000000..611cf0c
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_forward.g4a
@@ -0,0 +1,116 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+and.nz (1) null g82.2<1,1,1>UW 0x0800UW {align1}; //second field-picture?
+(f0) jmpi first_field_picture;
+
+and (1) g32.0<1>UW g82.10<1,1,1>UW 0x0003UW {align1};
+cmp.e (1) null g32.0<1,1,1>UW 0x0002UW {align1}; //bottom field?
+(f0) jmpi bottom_field;
+
+top_field:
+and.z (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select forward
+(f0) jmpi first_field_picture; //second field-picture top field from top
+mov (1) g32.28<1>UD 1UD {align1};
+jmpi first_field_picture; //second field-picture top field from bottom
+
+bottom_field:
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select forward
+(f0) jmpi first_field_picture; //second field-picture bottom field from bottom
+mov (1) g32.28<1>UD 0UD {align1};
+jmpi second_field_picture; //second field-picture bottom field from top
+
+//Y of top field
+first_field_picture:
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select forward
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_y.g4i')
+//UV of top field
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+mov (1) g32.28<1>UD 0UD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select forward
+(f0) mov (1) g32.28<1>UD 1UD {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD g32.28<1,1,1>UD {align1};
+define(`surface_u', `5')
+define(`surface_v', `6')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_uv.g4i')
+jmpi field_addidct;
+
+second_field_picture:
+//Y of bottom field
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+define(`surface',`3')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_y.g4i')
+//UV of bottom field
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+shl (1) g32.4<1>UD g32.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `10')
+define(`surface_v', `11')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`field_motion_uv.g4i')
+
+field_addidct:
+include(`field_addidct.g4i')
+out:
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_forward.g4b b/i965_drv_video/shaders/mpeg2/vld/field_forward.g4b
new file mode 100644
index 0000000..aa059f1
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_forward.g4b
@@ -0,0 +1,768 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x08000800 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000005, 0x24002d29, 0x00210a4a, 0x00030003 },
+ { 0x01000010, 0x20002d3c, 0x00210400, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+ { 0x01000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000004 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000002 },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000014a },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20002dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x241c0061, 0x00000000, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010001, 0x241c0061, 0x00000000, 0x00000001 },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x00000040, 0x24040421, 0x00210404, 0x0021041c },
+ { 0x01000005, 0x20003dbc, 0x00210a50, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a006 },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000141 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000006a },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10500 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10540 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10580 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c0 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10600 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10640 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10680 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b10501 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10541 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10581 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b105c1 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10601 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10641 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b10681 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b106c1 },
+ { 0x00800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x00800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x00800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x00800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x00800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x00800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x00800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x00800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800040, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10500 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10540 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10580 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c0 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10600 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10640 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10680 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b10501 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10541 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10581 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b105c1 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10601 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10641 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b10681 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x00800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x00800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x00800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x00800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x00800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x00800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x00800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x00800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b10681 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10501 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10541 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b10581 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10601 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10641 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b10681 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000039 },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800042, 0x27404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x27604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x27804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x27a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x27c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x27e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x28004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x28204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a003 },
+ { 0x00800042, 0x28404629, 0x00b104c0, 0x00b10500 },
+ { 0x00800042, 0x28604629, 0x00b10500, 0x00b10540 },
+ { 0x00800042, 0x28804629, 0x00b10540, 0x00b10580 },
+ { 0x00800042, 0x28a04629, 0x00b10580, 0x00b105c0 },
+ { 0x00800042, 0x28c04629, 0x00b105c0, 0x00b10600 },
+ { 0x00800042, 0x28e04629, 0x00b10600, 0x00b10640 },
+ { 0x00800042, 0x29004629, 0x00b10640, 0x00b10680 },
+ { 0x00800042, 0x29204629, 0x00b10680, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b10680, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a003 },
+ { 0x00800001, 0x28400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b10680, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000009, 0x24040c21, 0x00210404, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a50, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005c },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600040, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0520 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0540 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0560 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0580 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0521 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0541 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d0561 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d0581 },
+ { 0x00600040, 0x29c04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29d04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x29e04629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x29f04629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0600 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0620 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0640 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05e1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d0601 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d0621 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0641 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600040, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600040, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0520 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0540 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0560 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0580 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d0521 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0541 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0561 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0581 },
+ { 0x00600040, 0x2a004629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x2a104629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a204629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a304629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e0 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0600 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0620 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0640 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d05e1 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0601 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0621 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0641 },
+ { 0x00a02008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00a02008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00a02008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00a02008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0501 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0521 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0541 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0561 },
+ { 0x00600042, 0x2a004629, 0x008d0580, 0x008d0581 },
+ { 0x00600042, 0x2a104629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600042, 0x2a204629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600042, 0x2a304629, 0x008d05e0, 0x008d05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000037 },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00020002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001f },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600042, 0x29404629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29504629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29604629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29704629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x29c04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29d04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x29e04629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x29f04629, 0x008d0620, 0x008d0640 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0414a00b },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000000f },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0411a00a },
+ { 0x00800031, 0x26401d29, 0x008d0400, 0x0411a00b },
+ { 0x00600042, 0x29804629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29904629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29a04629, 0x008d0540, 0x008d0560 },
+ { 0x00600042, 0x29b04629, 0x008d0560, 0x008d0580 },
+ { 0x00600042, 0x2a004629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x2a104629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a204629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a304629, 0x008d0620, 0x008d0640 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600001, 0x29400229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29500229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29600229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29700229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x29c00229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x29d00229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x29e00229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x29f00229, 0x008d05e0, 0x00000000 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a00a },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a00b },
+ { 0x00600001, 0x29800229, 0x008d0500, 0x00000000 },
+ { 0x00600001, 0x29900229, 0x008d0520, 0x00000000 },
+ { 0x00600001, 0x29a00229, 0x008d0540, 0x00000000 },
+ { 0x00600001, 0x29b00229, 0x008d0560, 0x00000000 },
+ { 0x00600001, 0x2a000229, 0x008d0580, 0x00000000 },
+ { 0x00600001, 0x2a100229, 0x008d05a0, 0x00000000 },
+ { 0x00600001, 0x2a200229, 0x008d05c0, 0x00000000 },
+ { 0x00600001, 0x2a300229, 0x008d05e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4a b/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4a
new file mode 100644
index 0000000..2052481
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4a
@@ -0,0 +1,31 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+define(`UV_red',`0xffffffffUD')
+define(`UV_white',`0x7f7f7f7fUD')
+define(`UV_green',`0x00000000UD')
+mov(2) g6.0<1>UD g82.12<2,2,1>UW {align1};
+mov(1) g6.8<1>UD 0x000f000fUD { align1 };
+mov(16) m1<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m3<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m5<1>UD 0xFFFFFFFFUD {align1 compr};
+mov(16) m7<1>UD 0xFFFFFFFFUD {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(0, 0, 2, 0) mlen 9 rlen 0 { align1 };
+/*Fill U buffer & V buffer with 0x7F*/
+shr (2) g6.0<1>UD g82.12<2,2,1>UW 1UW {align1};
+mov(1) g6.8<1>UD 0x00070007UD { align1 };
+mov (16) m1<1>UD UV_white {align1 compr};
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+send (16) 0 acc0<1>UW g6<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4b b/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4b
new file mode 100644
index 0000000..9d95f70
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_forward_16x8.g4b
@@ -0,0 +1,15 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00200001, 0x20c00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x000f000f },
+ { 0x00802001, 0x20200062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20600062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20a00062, 0x00000000, 0xffffffff },
+ { 0x00802001, 0x20e00062, 0x00000000, 0xffffffff },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05902000 },
+ { 0x00200008, 0x20c02d21, 0x00450a4c, 0x00010001 },
+ { 0x00000001, 0x20c80061, 0x00000000, 0x00070007 },
+ { 0x00802001, 0x20200062, 0x00000000, 0x7f7f7f7f },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d00c0, 0x05302001 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_intra.g4a b/i965_drv_video/shaders/mpeg2/vld/field_intra.g4a
new file mode 100644
index 0000000..e85ec85
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_intra.g4a
@@ -0,0 +1,209 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/*
+ GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT tab
+ g31: read and write message descriptor
+ g32~g55:DCT data
+ g58~g81:reference data
+ g82: thread payload
+ g83~g106:IDCT data
+*/
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+
+include(`iq_intra.g4i')
+
+//defined for idct
+define(`ROW_SHIFT', `11UD')
+define(`ROW_ADD', `0x400UD')
+define(`COL_SHIFT', `20UD')
+define(`COL_ADD', `0x80000UD')
+
+mov (1) a0.0<1>UD 0x06F006E0UD {align1}; //0x06F006E0UD+0x00200020UD=0x07100700UD (g56.0 and g56.16)
+
+//Y0
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (8) g83.0<1>W g32.0<16,8,2>W 128UW {align1};
+add (8) g84.0<1>W g33.0<16,8,2>W 128UW {align1};
+add (8) g85.0<1>W g34.0<16,8,2>W 128UW {align1};
+add (8) g86.0<1>W g35.0<16,8,2>W 128UW {align1};
+add (8) g87.0<1>W g36.0<16,8,2>W 128UW {align1};
+add (8) g88.0<1>W g37.0<16,8,2>W 128UW {align1};
+add (8) g89.0<1>W g38.0<16,8,2>W 128UW {align1};
+add (8) g90.0<1>W g39.0<16,8,2>W 128UW {align1};
+
+//Y1
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (8) g83.16<1>W g32.0<16,8,2>W 128UW {align1};
+add (8) g84.16<1>W g33.0<16,8,2>W 128UW {align1};
+add (8) g85.16<1>W g34.0<16,8,2>W 128UW {align1};
+add (8) g86.16<1>W g35.0<16,8,2>W 128UW {align1};
+add (8) g87.16<1>W g36.0<16,8,2>W 128UW {align1};
+add (8) g88.16<1>W g37.0<16,8,2>W 128UW {align1};
+add (8) g89.16<1>W g38.0<16,8,2>W 128UW {align1};
+add (8) g90.16<1>W g39.0<16,8,2>W 128UW {align1};
+
+//Y2
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (8) g91.0<1>W g32.0<16,8,2>W 128UW {align1};
+add (8) g92.0<1>W g33.0<16,8,2>W 128UW {align1};
+add (8) g93.0<1>W g34.0<16,8,2>W 128UW {align1};
+add (8) g94.0<1>W g35.0<16,8,2>W 128UW {align1};
+add (8) g95.0<1>W g36.0<16,8,2>W 128UW {align1};
+add (8) g96.0<1>W g37.0<16,8,2>W 128UW {align1};
+add (8) g97.0<1>W g38.0<16,8,2>W 128UW {align1};
+add (8) g98.0<1>W g39.0<16,8,2>W 128UW {align1};
+
+//Y3
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (8) g91.16<1>W g32.0<16,8,2>W 128UW {align1};
+add (8) g92.16<1>W g33.0<16,8,2>W 128UW {align1};
+add (8) g93.16<1>W g34.0<16,8,2>W 128UW {align1};
+add (8) g94.16<1>W g35.0<16,8,2>W 128UW {align1};
+add (8) g95.16<1>W g36.0<16,8,2>W 128UW {align1};
+add (8) g96.16<1>W g37.0<16,8,2>W 128UW {align1};
+add (8) g97.16<1>W g38.0<16,8,2>W 128UW {align1};
+add (8) g98.16<1>W g39.0<16,8,2>W 128UW {align1};
+
+//U
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (16) g99.0<1>W g32.0<16,8,2>W 128UW {align1};
+add (16) g100.0<1>W g34.0<16,8,2>W 128UW {align1};
+add (16) g101.0<1>W g36.0<16,8,2>W 128UW {align1};
+add (16) g102.0<1>W g38.0<16,8,2>W 128UW {align1};
+
+//V
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+add (16) g103.0<1>W g32.0<16,8,2>W 128UW {align1};
+add (16) g104.0<1>W g34.0<16,8,2>W 128UW {align1};
+add (16) g105.0<1>W g36.0<16,8,2>W 128UW {align1};
+add (16) g106.0<1>W g38.0<16,8,2>W 128UW {align1};
+
+//send msg
+mov (1) g31.8<1>UD 0x00F000FUD {align1};
+mov.sat (16) g83.0<2>UB g83.0<16,16,1>W {align1};
+mov.sat (16) g84.0<2>UB g84.0<16,16,1>W {align1};
+mov.sat (16) g85.0<2>UB g85.0<16,16,1>W {align1};
+mov.sat (16) g86.0<2>UB g86.0<16,16,1>W {align1};
+mov.sat (16) g87.0<2>UB g87.0<16,16,1>W {align1};
+mov.sat (16) g88.0<2>UB g88.0<16,16,1>W {align1};
+mov.sat (16) g89.0<2>UB g89.0<16,16,1>W {align1};
+mov.sat (16) g90.0<2>UB g90.0<16,16,1>W {align1};
+mov.sat (16) g91.0<2>UB g91.0<16,16,1>W {align1};
+mov.sat (16) g92.0<2>UB g92.0<16,16,1>W {align1};
+mov.sat (16) g93.0<2>UB g93.0<16,16,1>W {align1};
+mov.sat (16) g94.0<2>UB g94.0<16,16,1>W {align1};
+mov.sat (16) g95.0<2>UB g95.0<16,16,1>W {align1};
+mov.sat (16) g96.0<2>UB g96.0<16,16,1>W {align1};
+mov.sat (16) g97.0<2>UB g97.0<16,16,1>W {align1};
+mov.sat (16) g98.0<2>UB g98.0<16,16,1>W {align1};
+
+and.nz (1) null g82.2<1,1,1>UW 0x20UW{align1};
+(f0) jmpi field_dct;
+
+mov (16) m1.0<1>UB g83.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g84.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g85.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g86.0<16,16,2>UB {align1};
+mov (16) m3.0<1>UB g87.0<16,16,2>UB {align1};
+mov (16) m3.16<1>UB g88.0<16,16,2>UB {align1};
+mov (16) m4.0<1>UB g89.0<16,16,2>UB {align1};
+mov (16) m4.16<1>UB g90.0<16,16,2>UB {align1};
+mov (16) m5.0<1>UB g91.0<16,16,2>UB {align1};
+mov (16) m5.16<1>UB g92.0<16,16,2>UB {align1};
+mov (16) m6.0<1>UB g93.0<16,16,2>UB {align1};
+mov (16) m6.16<1>UB g94.0<16,16,2>UB {align1};
+mov (16) m7.0<1>UB g95.0<16,16,2>UB {align1};
+mov (16) m7.16<1>UB g96.0<16,16,2>UB {align1};
+mov (16) m8.0<1>UB g97.0<16,16,2>UB {align1};
+mov (16) m8.16<1>UB g98.0<16,16,2>UB {align1};
+jmpi write_back;
+
+field_dct:
+mov (16) m1.0<1>UB g83.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g91.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g84.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g92.0<16,16,2>UB {align1};
+mov (16) m3.0<1>UB g85.0<16,16,2>UB {align1};
+mov (16) m3.16<1>UB g93.0<16,16,2>UB {align1};
+mov (16) m4.0<1>UB g86.0<16,16,2>UB {align1};
+mov (16) m4.16<1>UB g94.0<16,16,2>UB {align1};
+mov (16) m5.0<1>UB g87.0<16,16,2>UB {align1};
+mov (16) m5.16<1>UB g95.0<16,16,2>UB {align1};
+mov (16) m6.0<1>UB g88.0<16,16,2>UB {align1};
+mov (16) m6.16<1>UB g96.0<16,16,2>UB {align1};
+mov (16) m7.0<1>UB g89.0<16,16,2>UB {align1};
+mov (16) m7.16<1>UB g97.0<16,16,2>UB {align1};
+mov (16) m8.0<1>UB g90.0<16,16,2>UB {align1};
+mov (16) m8.16<1>UB g98.0<16,16,2>UB {align1};
+
+write_back:
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(0,0,2,0) mlen 9 rlen 0 {align1};
+
+//U
+mov (1) g31.8<1>UD 0x0070007UD { align1 };
+shr (2) g31.0<1>UD g82.12<2,2,1>UW 1D {align1};
+mov.sat (16) g99.0<2>UB g99.0<16,16,1>W {align1};
+mov.sat (16) g100.0<2>UB g100.0<16,16,1>W {align1};
+mov.sat (16) g101.0<2>UB g101.0<16,16,1>W {align1};
+mov.sat (16) g102.0<2>UB g102.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g99.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g100.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g101.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g102.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+//V
+mov.sat (16) g103.0<2>UB g103.0<16,16,1>W {align1};
+mov.sat (16) g104.0<2>UB g104.0<16,16,1>W {align1};
+mov.sat (16) g105.0<2>UB g105.0<16,16,1>W {align1};
+mov.sat (16) g106.0<2>UB g106.0<16,16,1>W {align1};
+
+mov (16) m1.0<1>UB g103.0<16,16,2>UB {align1};
+mov (16) m1.16<1>UB g104.0<16,16,2>UB {align1};
+mov (16) m2.0<1>UB g105.0<16,16,2>UB {align1};
+mov (16) m2.16<1>UB g106.0<16,16,2>UB {align1};
+send (16) 0 acc0<1>UW g31<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 };
+
+OUT:
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
+
+include(`do_iq_intra.g4i')
+include(`idct.g4i')
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_intra.g4b b/i965_drv_video/shaders/mpeg2/vld/field_intra.g4b
new file mode 100644
index 0000000..4c1c8c4
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_intra.g4b
@@ -0,0 +1,313 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000005, 0x2da02d29, 0x00210a48, 0x001f001f },
+ { 0x00000005, 0x2da42d29, 0x00210a48, 0x60006000 },
+ { 0x00000008, 0x2da42d29, 0x00210da4, 0x000d000d },
+ { 0x00000001, 0x2da60169, 0x00000000, 0x00080008 },
+ { 0x00000008, 0x2da42529, 0x00210da6, 0x00210da4 },
+ { 0x01000005, 0x20002d3c, 0x00210a48, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000012 },
+ { 0x05000010, 0x20002d3c, 0x00210da0, 0x00090009 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x05000010, 0x20002d3c, 0x00210da0, 0x00110011 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+ { 0x05000010, 0x20002d3c, 0x00210da0, 0x00190019 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000008 },
+ { 0x00000040, 0x2da03d29, 0x00210da0, 0xffe7ffe7 },
+ { 0x00000009, 0x2da02d29, 0x00210da0, 0x00030003 },
+ { 0x00000040, 0x2da02d29, 0x00210da0, 0x00400040 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000009 },
+ { 0x00000040, 0x2da03d29, 0x00210da0, 0xfff7fff7 },
+ { 0x00000009, 0x2da02d29, 0x00210da0, 0x00010001 },
+ { 0x00000040, 0x2da02d29, 0x00210da0, 0x000a000a },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000005 },
+ { 0x00000040, 0x2da03d29, 0x00210da0, 0xffefffef },
+ { 0x00000009, 0x2da02d29, 0x00210da0, 0x00020002 },
+ { 0x00000040, 0x2da02d29, 0x00210da0, 0x001c001c },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000001 },
+ { 0x00000009, 0x2da00d29, 0x00210da0, 0x00000001 },
+ { 0x00000001, 0x2dc00129, 0x00210da0, 0x00000000 },
+ { 0x00800001, 0x2e000229, 0x00b10020, 0x00000000 },
+ { 0x00800001, 0x2e200229, 0x00b10030, 0x00000000 },
+ { 0x00800001, 0x2e400229, 0x00b10040, 0x00000000 },
+ { 0x00800001, 0x2e600229, 0x00b10050, 0x00000000 },
+ { 0x00000001, 0x22000060, 0x00000000, 0x03f003e0 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000000a1 },
+ { 0x00800001, 0x270001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x272001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x274001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x276001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000009b },
+ { 0x00800001, 0x278001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x27a001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x27c001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x27e001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000095 },
+ { 0x00800001, 0x280001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x282001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x284001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x286001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000008f },
+ { 0x00800001, 0x288001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x28a001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x28c001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x28e001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000089 },
+ { 0x00800001, 0x290001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x292001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x294001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x296001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000083 },
+ { 0x00800001, 0x298001ad, 0x00ae0e80, 0x00000000 },
+ { 0x00800001, 0x29a001ad, 0x00ae0ec0, 0x00000000 },
+ { 0x00800001, 0x29c001ad, 0x00ae0f00, 0x00000000 },
+ { 0x00800001, 0x29e001ad, 0x00ae0f40, 0x00000000 },
+ { 0x00000001, 0x22000060, 0x00000000, 0x06f006e0 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000008f },
+ { 0x00600040, 0x2a602dad, 0x00ae0400, 0x00800080 },
+ { 0x00600040, 0x2a802dad, 0x00ae0420, 0x00800080 },
+ { 0x00600040, 0x2aa02dad, 0x00ae0440, 0x00800080 },
+ { 0x00600040, 0x2ac02dad, 0x00ae0460, 0x00800080 },
+ { 0x00600040, 0x2ae02dad, 0x00ae0480, 0x00800080 },
+ { 0x00600040, 0x2b002dad, 0x00ae04a0, 0x00800080 },
+ { 0x00600040, 0x2b202dad, 0x00ae04c0, 0x00800080 },
+ { 0x00600040, 0x2b402dad, 0x00ae04e0, 0x00800080 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000085 },
+ { 0x00600040, 0x2a702dad, 0x00ae0400, 0x00800080 },
+ { 0x00600040, 0x2a902dad, 0x00ae0420, 0x00800080 },
+ { 0x00600040, 0x2ab02dad, 0x00ae0440, 0x00800080 },
+ { 0x00600040, 0x2ad02dad, 0x00ae0460, 0x00800080 },
+ { 0x00600040, 0x2af02dad, 0x00ae0480, 0x00800080 },
+ { 0x00600040, 0x2b102dad, 0x00ae04a0, 0x00800080 },
+ { 0x00600040, 0x2b302dad, 0x00ae04c0, 0x00800080 },
+ { 0x00600040, 0x2b502dad, 0x00ae04e0, 0x00800080 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000007b },
+ { 0x00600040, 0x2b602dad, 0x00ae0400, 0x00800080 },
+ { 0x00600040, 0x2b802dad, 0x00ae0420, 0x00800080 },
+ { 0x00600040, 0x2ba02dad, 0x00ae0440, 0x00800080 },
+ { 0x00600040, 0x2bc02dad, 0x00ae0460, 0x00800080 },
+ { 0x00600040, 0x2be02dad, 0x00ae0480, 0x00800080 },
+ { 0x00600040, 0x2c002dad, 0x00ae04a0, 0x00800080 },
+ { 0x00600040, 0x2c202dad, 0x00ae04c0, 0x00800080 },
+ { 0x00600040, 0x2c402dad, 0x00ae04e0, 0x00800080 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000071 },
+ { 0x00600040, 0x2b702dad, 0x00ae0400, 0x00800080 },
+ { 0x00600040, 0x2b902dad, 0x00ae0420, 0x00800080 },
+ { 0x00600040, 0x2bb02dad, 0x00ae0440, 0x00800080 },
+ { 0x00600040, 0x2bd02dad, 0x00ae0460, 0x00800080 },
+ { 0x00600040, 0x2bf02dad, 0x00ae0480, 0x00800080 },
+ { 0x00600040, 0x2c102dad, 0x00ae04a0, 0x00800080 },
+ { 0x00600040, 0x2c302dad, 0x00ae04c0, 0x00800080 },
+ { 0x00600040, 0x2c502dad, 0x00ae04e0, 0x00800080 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000067 },
+ { 0x00800040, 0x2c602dad, 0x00ae0400, 0x00800080 },
+ { 0x00800040, 0x2c802dad, 0x00ae0440, 0x00800080 },
+ { 0x00800040, 0x2ca02dad, 0x00ae0480, 0x00800080 },
+ { 0x00800040, 0x2cc02dad, 0x00ae04c0, 0x00800080 },
+ { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
+ { 0x00800040, 0x2ce02dad, 0x00ae0400, 0x00800080 },
+ { 0x00800040, 0x2d002dad, 0x00ae0440, 0x00800080 },
+ { 0x00800040, 0x2d202dad, 0x00ae0480, 0x00800080 },
+ { 0x00800040, 0x2d402dad, 0x00ae04c0, 0x00800080 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x4a6001b1, 0x00b10a60, 0x00000000 },
+ { 0x80800001, 0x4a8001b1, 0x00b10a80, 0x00000000 },
+ { 0x80800001, 0x4aa001b1, 0x00b10aa0, 0x00000000 },
+ { 0x80800001, 0x4ac001b1, 0x00b10ac0, 0x00000000 },
+ { 0x80800001, 0x4ae001b1, 0x00b10ae0, 0x00000000 },
+ { 0x80800001, 0x4b0001b1, 0x00b10b00, 0x00000000 },
+ { 0x80800001, 0x4b2001b1, 0x00b10b20, 0x00000000 },
+ { 0x80800001, 0x4b4001b1, 0x00b10b40, 0x00000000 },
+ { 0x80800001, 0x4b6001b1, 0x00b10b60, 0x00000000 },
+ { 0x80800001, 0x4b8001b1, 0x00b10b80, 0x00000000 },
+ { 0x80800001, 0x4ba001b1, 0x00b10ba0, 0x00000000 },
+ { 0x80800001, 0x4bc001b1, 0x00b10bc0, 0x00000000 },
+ { 0x80800001, 0x4be001b1, 0x00b10be0, 0x00000000 },
+ { 0x80800001, 0x4c0001b1, 0x00b10c00, 0x00000000 },
+ { 0x80800001, 0x4c2001b1, 0x00b10c20, 0x00000000 },
+ { 0x80800001, 0x4c4001b1, 0x00b10c40, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800001, 0x20200232, 0x00b20a60, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20a80, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20aa0, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20ac0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b20ae0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b20b00, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20b20, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20b40, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20b60, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20b80, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20ba0, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b20bc0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b20be0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b20c00, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20c20, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20c40, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800001, 0x20200232, 0x00b20a60, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20b60, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a80, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20b80, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b20aa0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b20ba0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20ac0, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20bc0, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20ae0, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20be0, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20b00, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b20c00, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b20b20, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b20c20, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20b40, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20c40, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01d21, 0x00450a4c, 0x00000001 },
+ { 0x80800001, 0x4c6001b1, 0x00b10c60, 0x00000000 },
+ { 0x80800001, 0x4c8001b1, 0x00b10c80, 0x00000000 },
+ { 0x80800001, 0x4ca001b1, 0x00b10ca0, 0x00000000 },
+ { 0x80800001, 0x4cc001b1, 0x00b10cc0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20c60, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20c80, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20ca0, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20cc0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x80800001, 0x4ce001b1, 0x00b10ce0, 0x00000000 },
+ { 0x80800001, 0x4d0001b1, 0x00b10d00, 0x00000000 },
+ { 0x80800001, 0x4d2001b1, 0x00b10d20, 0x00000000 },
+ { 0x80800001, 0x4d4001b1, 0x00b10d40, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20ce0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20d00, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20d20, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20d40, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00000001, 0x2de001ad, 0x00218000, 0x00000000 },
+ { 0x00802041, 0x2e8025a5, 0x008d8000, 0x008d0e00 },
+ { 0x00802041, 0x2e8024a5, 0x008d0e80, 0x008c0da0 },
+ { 0x0080200c, 0x2e802ca5, 0x008d0e80, 0x00040004 },
+ { 0x00000041, 0x2e8025a5, 0x00210de0, 0x00210da4 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802041, 0x2ec025a5, 0x008d8000, 0x008d0e20 },
+ { 0x00802041, 0x2ec024a5, 0x008d0ec0, 0x008c0da0 },
+ { 0x0080200c, 0x2ec02ca5, 0x008d0ec0, 0x00040004 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802041, 0x2f0025a5, 0x008d8000, 0x008d0e40 },
+ { 0x00802041, 0x2f0024a5, 0x008d0f00, 0x008c0da0 },
+ { 0x0080200c, 0x2f002ca5, 0x008d0f00, 0x00040004 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802041, 0x2f4025a5, 0x008d8000, 0x008d0e60 },
+ { 0x00802041, 0x2f4024a5, 0x008d0f40, 0x008c0da0 },
+ { 0x0080200c, 0x2f402ca5, 0x008d0f40, 0x00040004 },
+ { 0x00000040, 0x34000c20, 0x00210fa0, 0x00000020 },
+ { 0x00000001, 0x2fc00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001a },
+ { 0x00802040, 0x24000ca5, 0x008d0400, 0x00000400 },
+ { 0x00802040, 0x24400ca5, 0x008d0440, 0x00000400 },
+ { 0x00802040, 0x24800ca5, 0x008d0480, 0x00000400 },
+ { 0x00802040, 0x24c00ca5, 0x008d04c0, 0x00000400 },
+ { 0x00802008, 0x24000ca5, 0x008d0400, 0x0000000b },
+ { 0x00802008, 0x24400ca5, 0x008d0440, 0x0000000b },
+ { 0x00802008, 0x24800ca5, 0x008d0480, 0x0000000b },
+ { 0x00802008, 0x24c00ca5, 0x008d04c0, 0x0000000b },
+ { 0x00800001, 0x2dc001ad, 0x00ae0400, 0x00000000 },
+ { 0x00800001, 0x2de001ad, 0x00ae0440, 0x00000000 },
+ { 0x00800001, 0x2e0001ad, 0x00ae0480, 0x00000000 },
+ { 0x00800001, 0x2e2001ad, 0x00ae04c0, 0x00000000 },
+ { 0x00000001, 0x2a000001, 0x00210200, 0x00000000 },
+ { 0x00000001, 0x22000060, 0x00000000, 0x0db00da0 },
+ { 0x00000001, 0x2fc00001, 0x00001400, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+ { 0x00802040, 0x24000ca5, 0x008d0400, 0x00080000 },
+ { 0x00802040, 0x24400ca5, 0x008d0440, 0x00080000 },
+ { 0x00802040, 0x24800ca5, 0x008d0480, 0x00080000 },
+ { 0x00802040, 0x24c00ca5, 0x008d04c0, 0x00080000 },
+ { 0x00802008, 0x24000ca5, 0x008d0400, 0x00000014 },
+ { 0x00802008, 0x24400ca5, 0x008d0440, 0x00000014 },
+ { 0x00802008, 0x24800ca5, 0x008d0480, 0x00000014 },
+ { 0x00802008, 0x24c00ca5, 0x008d04c0, 0x00000014 },
+ { 0x00000001, 0x22000020, 0x00210a00, 0x00000000 },
+ { 0x00000040, 0x34000c20, 0x00210fa0, 0x00000020 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802054, 0x250015a5, 0x008d8000, 0x008d00a0 },
+ { 0x00802054, 0x254015a5, 0x008d8000, 0x008d00e0 },
+ { 0x00802054, 0x258015a5, 0x008d8000, 0x008d0120 },
+ { 0x00802054, 0x25c015a5, 0x008d8000, 0x008d0160 },
+ { 0x00802054, 0x260015a5, 0x008d8000, 0x008d01a0 },
+ { 0x00802054, 0x264015a5, 0x008d8000, 0x008d01e0 },
+ { 0x00802054, 0x268015a5, 0x008d8000, 0x008d0220 },
+ { 0x00802054, 0x26c015a5, 0x008d8000, 0x008d0260 },
+ { 0x00200040, 0x240014a5, 0x00800500, 0x00800510 },
+ { 0x00200040, 0x242014a5, 0x00800540, 0x00800550 },
+ { 0x00200040, 0x244014a5, 0x00800580, 0x00800590 },
+ { 0x00200040, 0x246014a5, 0x008005c0, 0x008005d0 },
+ { 0x00200040, 0x248014a5, 0x00800600, 0x00800610 },
+ { 0x00200040, 0x24a014a5, 0x00800640, 0x00800650 },
+ { 0x00200040, 0x24c014a5, 0x00800680, 0x00800690 },
+ { 0x00200040, 0x24e014a5, 0x008006c0, 0x008006d0 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802054, 0x250015a5, 0x008d8000, 0x008d00a0 },
+ { 0x00802054, 0x254015a5, 0x008d8000, 0x008d00e0 },
+ { 0x00802054, 0x258015a5, 0x008d8000, 0x008d0120 },
+ { 0x00802054, 0x25c015a5, 0x008d8000, 0x008d0160 },
+ { 0x00802054, 0x260015a5, 0x008d8000, 0x008d01a0 },
+ { 0x00802054, 0x264015a5, 0x008d8000, 0x008d01e0 },
+ { 0x00802054, 0x268015a5, 0x008d8000, 0x008d0220 },
+ { 0x00802054, 0x26c015a5, 0x008d8000, 0x008d0260 },
+ { 0x00200040, 0x240814a5, 0x00800500, 0x00800510 },
+ { 0x00200040, 0x242814a5, 0x00800540, 0x00800550 },
+ { 0x00200040, 0x244814a5, 0x00800580, 0x00800590 },
+ { 0x00200040, 0x246814a5, 0x008005c0, 0x008005d0 },
+ { 0x00200040, 0x248814a5, 0x00800600, 0x00800610 },
+ { 0x00200040, 0x24a814a5, 0x00800640, 0x00800650 },
+ { 0x00200040, 0x24c814a5, 0x00800680, 0x00800690 },
+ { 0x00200040, 0x24e814a5, 0x008006c0, 0x008006d0 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802054, 0x250015a5, 0x008d8000, 0x008d00a0 },
+ { 0x00802054, 0x254015a5, 0x008d8000, 0x008d00e0 },
+ { 0x00802054, 0x258015a5, 0x008d8000, 0x008d0120 },
+ { 0x00802054, 0x25c015a5, 0x008d8000, 0x008d0160 },
+ { 0x00802054, 0x260015a5, 0x008d8000, 0x008d01a0 },
+ { 0x00802054, 0x264015a5, 0x008d8000, 0x008d01e0 },
+ { 0x00802054, 0x268015a5, 0x008d8000, 0x008d0220 },
+ { 0x00802054, 0x26c015a5, 0x008d8000, 0x008d0260 },
+ { 0x00200040, 0x241014a5, 0x00800500, 0x00800510 },
+ { 0x00200040, 0x243014a5, 0x00800540, 0x00800550 },
+ { 0x00200040, 0x245014a5, 0x00800580, 0x00800590 },
+ { 0x00200040, 0x247014a5, 0x008005c0, 0x008005d0 },
+ { 0x00200040, 0x249014a5, 0x00800600, 0x00800610 },
+ { 0x00200040, 0x24b014a5, 0x00800640, 0x00800650 },
+ { 0x00200040, 0x24d014a5, 0x00800680, 0x00800690 },
+ { 0x00200040, 0x24f014a5, 0x008006c0, 0x008006d0 },
+ { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+ { 0x00802054, 0x250015a5, 0x008d8000, 0x008d00a0 },
+ { 0x00802054, 0x254015a5, 0x008d8000, 0x008d00e0 },
+ { 0x00802054, 0x258015a5, 0x008d8000, 0x008d0120 },
+ { 0x00802054, 0x25c015a5, 0x008d8000, 0x008d0160 },
+ { 0x00802054, 0x260015a5, 0x008d8000, 0x008d01a0 },
+ { 0x00802054, 0x264015a5, 0x008d8000, 0x008d01e0 },
+ { 0x00802054, 0x268015a5, 0x008d8000, 0x008d0220 },
+ { 0x00802054, 0x26c015a5, 0x008d8000, 0x008d0260 },
+ { 0x00200040, 0x241814a5, 0x00800500, 0x00800510 },
+ { 0x00200040, 0x243814a5, 0x00800540, 0x00800550 },
+ { 0x00200040, 0x245814a5, 0x00800580, 0x00800590 },
+ { 0x00200040, 0x247814a5, 0x008005c0, 0x008005d0 },
+ { 0x00200040, 0x249814a5, 0x00800600, 0x00800610 },
+ { 0x00200040, 0x24b814a5, 0x00800640, 0x00800650 },
+ { 0x00200040, 0x24d814a5, 0x00800680, 0x00800690 },
+ { 0x00200040, 0x24f814a5, 0x008006c0, 0x008006d0 },
+ { 0x00000040, 0x34000c20, 0x00210fc0, 0x00000020 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_motion_uv.g4i b/i965_drv_video/shaders/mpeg2/vld/field_motion_uv.g4i
new file mode 100644
index 0000000..201ee51
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_motion_uv.g4i
@@ -0,0 +1,47 @@
+/*
+ * Copyright © 2008 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Zhang Hua jun <huajun.zhang@intel.com>
+ * Xing Dong sheng <dongsheng.xing@intel.com>
+ *
+ */
+
+ and.z (1) null mv1<1,1,1>W 2W {align1};
+ (f0) jmpi L1;
+ and.z (1) null mv2<1,1,1>W 2W {align1};
+ (f0) jmpi L2;
+ include(`field_read_x1y1_uv.g4i')
+ jmpi L5;
+L2:
+ include(`field_read_x1y0_uv.g4i')
+ jmpi L5;
+L1:
+ and.z (1) null mv2<1,1,1>W 2W {align1};
+ (f0) jmpi L4;
+ include(`field_read_x0y1_uv.g4i')
+ jmpi L5;
+L4:
+ include(`field_read_x0y0_uv.g4i')
+L5:
+
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_motion_y.g4i b/i965_drv_video/shaders/mpeg2/vld/field_motion_y.g4i
new file mode 100644
index 0000000..20adb31
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_motion_y.g4i
@@ -0,0 +1,45 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Zhang Hua jun <huajun.zhang@intel.com>
+ * Xing Dong sheng <dongsheng.xing@intel.com>
+ *
+ */
+ and.z (1) null mv1<1,1,1>W 1UW {align1};
+ (f0) jmpi L1;
+ and.z (1) null mv2<1,1,1>W 1UW {align1};
+ (f0) jmpi L2;
+ include(`field_read_x1y1_y.g4i')
+ jmpi L5;
+L2:
+ include(`field_read_x1y0_y.g4i')
+ jmpi L5;
+L1:
+ and.z (1) null mv2<1,1,1>W 1UW {align1};
+ (f0) jmpi L4;
+ include(`field_read_x0y1_y.g4i')
+ jmpi L5;
+L4:
+ include(`field_read_x0y0_y.g4i')
+L5:
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_uv.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_uv.g4i
new file mode 100644
index 0000000..ff439e5
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_uv.g4i
@@ -0,0 +1,65 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+//U
+mov (8) g74.0<1>UW g40.0<8,8,1>UB {align1};
+mov (8) g74.16<1>UW g41.0<8,8,1>UB {align1};
+mov (8) g75.0<1>UW g42.0<8,8,1>UB {align1};
+mov (8) g75.16<1>UW g43.0<8,8,1>UB {align1};
+//V
+mov (8) g78.0<1>UW g44.0<8,8,1>UB {align1};
+mov (8) g78.16<1>UW g45.0<8,8,1>UB {align1};
+mov (8) g79.0<1>UW g46.0<8,8,1>UB {align1};
+mov (8) g79.16<1>UW g47.0<8,8,1>UB {align1};
+
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+//U
+mov (8) g76.0<1>UW g40.0<8,8,1>UB {align1};
+mov (8) g76.16<1>UW g41.0<8,8,1>UB {align1};
+mov (8) g77.0<1>UW g42.0<8,8,1>UB {align1};
+mov (8) g77.16<1>UW g43.0<8,8,1>UB {align1};
+//V
+mov (8) g80.0<1>UW g44.0<8,8,1>UB {align1};
+mov (8) g80.16<1>UW g45.0<8,8,1>UB {align1};
+mov (8) g81.0<1>UW g46.0<8,8,1>UB {align1};
+mov (8) g81.16<1>UW g47.0<8,8,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_y.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_y.g4i
new file mode 100644
index 0000000..3b0da9c
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y0_y.g4i
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g32: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+mov (16) g58.0<1>UW g38.0<16,16,1>UB {align1};
+mov (16) g59.0<1>UW g40.0<16,16,1>UB {align1};
+mov (16) g60.0<1>UW g42.0<16,16,1>UB {align1};
+mov (16) g61.0<1>UW g44.0<16,16,1>UB {align1};
+mov (16) g62.0<1>UW g46.0<16,16,1>UB {align1};
+mov (16) g63.0<1>UW g48.0<16,16,1>UB {align1};
+mov (16) g64.0<1>UW g50.0<16,16,1>UB {align1};
+mov (16) g65.0<1>UW g52.0<16,16,1>UB {align1};
+
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+mov (16) g66.0<1>UW g38.0<16,16,1>UB {align1};
+mov (16) g67.0<1>UW g40.0<16,16,1>UB {align1};
+mov (16) g68.0<1>UW g42.0<16,16,1>UB {align1};
+mov (16) g69.0<1>UW g44.0<16,16,1>UB {align1};
+mov (16) g70.0<1>UW g46.0<16,16,1>UB {align1};
+mov (16) g71.0<1>UW g48.0<16,16,1>UB {align1};
+mov (16) g72.0<1>UW g50.0<16,16,1>UB {align1};
+mov (16) g73.0<1>UW g52.0<16,16,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_uv.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_uv.g4i
new file mode 100644
index 0000000..b72507a
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_uv.g4i
@@ -0,0 +1,45 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x0FUD {align1};
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g50.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+//U
+avg (8) g74.0<1>UW g40.0<8,8,1>UB g41.0<8,8,1>UB {align1};
+avg (8) g74.16<1>UW g41.0<8,8,1>UB g42.0<8,8,1>UB {align1};
+avg (8) g75.0<1>UW g42.0<8,8,1>UB g43.0<8,8,1>UB {align1};
+avg (8) g75.16<1>UW g43.0<8,8,1>UB g44.0<8,8,1>UB {align1};
+//V
+avg (8) g78.0<1>UW g46.0<8,8,1>UB g47.0<8,8,1>UB {align1};
+avg (8) g78.16<1>UW g47.0<8,8,1>UB g48.0<8,8,1>UB {align1};
+avg (8) g79.0<1>UW g48.0<8,8,1>UB g49.0<8,8,1>UB {align1};
+avg (8) g79.16<1>UW g49.0<8,8,1>UB g50.0<8,8,1>UB {align1};
+
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x0FUD {align1};
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g50.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+//U
+avg (8) g76.0<1>UW g40.0<8,8,1>UB g41.0<8,8,1>UB {align1};
+avg (8) g76.16<1>UW g41.0<8,8,1>UB g42.0<8,8,1>UB {align1};
+avg (8) g77.0<1>UW g42.0<8,8,1>UB g43.0<8,8,1>UB {align1};
+avg (8) g77.16<1>UW g43.0<8,8,1>UB g44.0<8,8,1>UB {align1};
+//V
+avg (8) g80.0<1>UW g46.0<8,8,1>UB g47.0<8,8,1>UB {align1};
+avg (8) g80.16<1>UW g47.0<8,8,1>UB g48.0<8,8,1>UB {align1};
+avg (8) g81.0<1>UW g48.0<8,8,1>UB g49.0<8,8,1>UB {align1};
+avg (8) g81.16<1>UW g49.0<8,8,1>UB g50.0<8,8,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_y.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_y.g4i
new file mode 100644
index 0000000..98a09ed
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x0y1_y.g4i
@@ -0,0 +1,68 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x1FUD {align1};
+send (16) 0 g54.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+avg (16) g58.0<1>UW g38.0<16,16,1>UB g40.0<16,16,1>UB {align1};
+avg (16) g59.0<1>UW g40.0<16,16,1>UB g42.0<16,16,1>UB {align1};
+avg (16) g60.0<1>UW g42.0<16,16,1>UB g44.0<16,16,1>UB {align1};
+avg (16) g61.0<1>UW g44.0<16,16,1>UB g46.0<16,16,1>UB {align1};
+avg (16) g62.0<1>UW g46.0<16,16,1>UB g48.0<16,16,1>UB {align1};
+avg (16) g63.0<1>UW g48.0<16,16,1>UB g50.0<16,16,1>UB {align1};
+avg (16) g64.0<1>UW g50.0<16,16,1>UB g52.0<16,16,1>UB {align1};
+avg (16) g65.0<1>UW g52.0<16,16,1>UB g54.0<16,16,1>UB {align1};
+
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x1FUD {align1};
+send (16) 0 g54.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+avg (16) g66.0<1>UW g38.0<16,16,1>UB g40.0<16,16,1>UB {align1};
+avg (16) g67.0<1>UW g40.0<16,16,1>UB g42.0<16,16,1>UB {align1};
+avg (16) g68.0<1>UW g42.0<16,16,1>UB g44.0<16,16,1>UB {align1};
+avg (16) g69.0<1>UW g44.0<16,16,1>UB g46.0<16,16,1>UB {align1};
+avg (16) g70.0<1>UW g46.0<16,16,1>UB g48.0<16,16,1>UB {align1};
+avg (16) g71.0<1>UW g48.0<16,16,1>UB g50.0<16,16,1>UB {align1};
+avg (16) g72.0<1>UW g50.0<16,16,1>UB g52.0<16,16,1>UB {align1};
+avg (16) g73.0<1>UW g52.0<16,16,1>UB g54.0<16,16,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_uv.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_uv.g4i
new file mode 100644
index 0000000..8e318d7
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_uv.g4i
@@ -0,0 +1,37 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+//U
+avg (8) g74.0<1>UW g40.0<8,8,1>UB g40.1<8,8,1>UB {align1};
+avg (8) g74.16<1>UW g41.0<8,8,1>UB g41.1<8,8,1>UB {align1};
+avg (8) g75.0<1>UW g42.0<8,8,1>UB g42.1<8,8,1>UB {align1};
+avg (8) g75.16<1>UW g43.0<8,8,1>UB g43.1<8,8,1>UB {align1};
+//V
+avg (8) g78.0<1>UW g44.0<8,8,1>UB g44.1<8,8,1>UB {align1};
+avg (8) g78.16<1>UW g45.0<8,8,1>UB g45.1<8,8,1>UB {align1};
+avg (8) g79.0<1>UW g46.0<8,8,1>UB g46.1<8,8,1>UB {align1};
+avg (8) g79.16<1>UW g47.0<8,8,1>UB g47.1<8,8,1>UB {align1};
+
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+//U
+avg (8) g76.0<1>UW g40.0<8,8,1>UB g40.1<8,8,1>UB {align1};
+avg (8) g76.16<1>UW g41.0<8,8,1>UB g41.1<8,8,1>UB {align1};
+avg (8) g77.0<1>UW g42.0<8,8,1>UB g42.1<8,8,1>UB {align1};
+avg (8) g77.16<1>UW g43.0<8,8,1>UB g43.1<8,8,1>UB {align1};
+//V
+avg (8) g80.0<1>UW g44.0<8,8,1>UB g44.1<8,8,1>UB {align1};
+avg (8) g80.16<1>UW g45.0<8,8,1>UB g45.1<8,8,1>UB {align1};
+avg (8) g81.0<1>UW g46.0<8,8,1>UB g46.1<8,8,1>UB {align1};
+avg (8) g81.16<1>UW g47.0<8,8,1>UB g47.1<8,8,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_y.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_y.g4i
new file mode 100644
index 0000000..0d2fbb1
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y0_y.g4i
@@ -0,0 +1,62 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+avg (16) g58.0<1>UW g38.0<16,16,1>UB g38.1<16,16,1>UB {align1};
+avg (16) g59.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+avg (16) g60.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+avg (16) g61.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+avg (16) g62.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+avg (16) g63.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+avg (16) g64.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+avg (16) g65.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+avg (16) g66.0<1>UW g38.0<16,16,1>UB g38.1<16,16,1>UB {align1};
+avg (16) g67.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+avg (16) g68.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+avg (16) g69.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+avg (16) g70.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+avg (16) g71.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+avg (16) g72.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+avg (16) g73.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_uv.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_uv.g4i
new file mode 100644
index 0000000..dd8877a
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_uv.g4i
@@ -0,0 +1,91 @@
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x0FUD {align1};
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g50.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+//U
+add (8) g74.0<1>UW g40.0<8,8,1>UB g40.1<8,8,1>UB {align1};
+add (8) g74.16<1>UW g41.0<8,8,1>UB g41.1<8,8,1>UB {align1};
+add (8) g75.0<1>UW g42.0<8,8,1>UB g42.1<8,8,1>UB {align1};
+add (8) g75.16<1>UW g43.0<8,8,1>UB g43.1<8,8,1>UB {align1};
+
+add (8) g74.0<1>UW g74.0<8,8,1>UW g41.0<8,8,1>UB {align1};
+add (8) g74.16<1>UW g74.16<8,8,1>UW g42.0<8,8,1>UB {align1};
+add (8) g75.0<1>UW g75.0<8,8,1>UW g43.0<8,8,1>UB {align1};
+add (8) g75.16<1>UW g75.16<8,8,1>UW g44.0<8,8,1>UB {align1};
+
+add (8) g74.0<1>UW g74.0<8,8,1>UW g41.1<8,8,1>UB {align1};
+add (8) g74.16<1>UW g74.16<8,8,1>UW g42.1<8,8,1>UB {align1};
+add (8) g75.0<1>UW g75.0<8,8,1>UW g43.1<8,8,1>UB {align1};
+add (8) g75.16<1>UW g75.16<8,8,1>UW g44.1<8,8,1>UB {align1};
+//V
+add (8) g78.0<1>UW g46.0<8,8,1>UB g46.1<8,8,1>UB {align1};
+add (8) g78.16<1>UW g47.0<8,8,1>UB g47.1<8,8,1>UB {align1};
+add (8) g79.0<1>UW g48.0<8,8,1>UB g48.1<8,8,1>UB {align1};
+add (8) g79.16<1>UW g49.0<8,8,1>UB g49.1<8,8,1>UB {align1};
+
+add (8) g78.0<1>UW g78.0<8,8,1>UW g47.0<8,8,1>UB {align1};
+add (8) g78.16<1>UW g78.16<8,8,1>UW g48.0<8,8,1>UB {align1};
+add (8) g79.0<1>UW g79.0<8,8,1>UW g49.0<8,8,1>UB {align1};
+add (8) g79.16<1>UW g79.16<8,8,1>UW g50.0<8,8,1>UB {align1};
+
+add (8) g78.0<1>UW g78.0<8,8,1>UW g47.1<8,8,1>UB {align1};
+add (8) g78.16<1>UW g78.16<8,8,1>UW g48.1<8,8,1>UB {align1};
+add (8) g79.0<1>UW g79.0<8,8,1>UW g49.1<8,8,1>UB {align1};
+add (8) g79.16<1>UW g79.16<8,8,1>UW g50.1<8,8,1>UB {align1};
+
+mov (1) g32.8<1>UD 0x7000FUD {align1}; //8*16
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x0FUD {align1};
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g50.0<1>UW g32<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+//U
+add (8) g76.0<1>UW g40.0<8,8,1>UB g40.1<8,8,1>UB {align1};
+add (8) g76.16<1>UW g41.0<8,8,1>UB g41.1<8,8,1>UB {align1};
+add (8) g77.0<1>UW g42.0<8,8,1>UB g42.1<8,8,1>UB {align1};
+add (8) g77.16<1>UW g43.0<8,8,1>UB g43.1<8,8,1>UB {align1};
+
+add (8) g76.0<1>UW g76.0<8,8,1>UW g41.0<8,8,1>UB {align1};
+add (8) g76.16<1>UW g76.16<8,8,1>UW g42.0<8,8,1>UB {align1};
+add (8) g77.0<1>UW g77.0<8,8,1>UW g43.0<8,8,1>UB {align1};
+add (8) g77.16<1>UW g77.16<8,8,1>UW g44.0<8,8,1>UB {align1};
+
+add (8) g76.0<1>UW g76.0<8,8,1>UW g41.1<8,8,1>UB {align1};
+add (8) g76.16<1>UW g76.16<8,8,1>UW g42.1<8,8,1>UB {align1};
+add (8) g77.0<1>UW g77.0<8,8,1>UW g43.1<8,8,1>UB {align1};
+add (8) g77.16<1>UW g77.16<8,8,1>UW g44.1<8,8,1>UB {align1};
+//V
+add (8) g80.0<1>UW g46.0<8,8,1>UB g46.1<8,8,1>UB {align1};
+add (8) g80.16<1>UW g47.0<8,8,1>UB g47.1<8,8,1>UB {align1};
+add (8) g81.0<1>UW g48.0<8,8,1>UB g48.1<8,8,1>UB {align1};
+add (8) g81.16<1>UW g49.0<8,8,1>UB g49.1<8,8,1>UB {align1};
+
+add (8) g80.0<1>UW g80.0<8,8,1>UW g47.0<8,8,1>UB {align1};
+add (8) g80.16<1>UW g80.16<8,8,1>UW g48.0<8,8,1>UB {align1};
+add (8) g81.0<1>UW g81.0<8,8,1>UW g49.0<8,8,1>UB {align1};
+add (8) g81.16<1>UW g81.16<8,8,1>UW g50.0<8,8,1>UB {align1};
+
+add (8) g80.0<1>UW g80.0<8,8,1>UW g47.1<8,8,1>UB {align1};
+add (8) g80.16<1>UW g80.16<8,8,1>UW g48.1<8,8,1>UB {align1};
+add (8) g81.0<1>UW g81.0<8,8,1>UW g49.1<8,8,1>UB {align1};
+add (8) g81.16<1>UW g81.16<8,8,1>UW g50.1<8,8,1>UB {align1};
+
+shr (32) g74.0<1>UW g74.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g76.0<1>UW g76.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g78.0<1>UW g78.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g80.0<1>UW g80.0<16,16,1>UW 2UW {align1 compr};
+
diff --git a/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_y.g4i b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_y.g4i
new file mode 100644
index 0000000..7c28b86
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/field_read_x1y1_y.g4i
@@ -0,0 +1,123 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x1FUD {align1};
+send (16) 0 g54.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (16) g58.0<1>UW g38.0<16,16,1>UB g38.1<16,16,1>UB {align1};
+add (16) g59.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+add (16) g60.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+add (16) g61.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+add (16) g62.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+add (16) g63.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+add (16) g64.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+add (16) g65.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+
+add (16) g58.0<1>UW g58.0<16,16,1>UW g40.0<16,16,1>UB {align1};
+add (16) g59.0<1>UW g59.0<16,16,1>UW g42.0<16,16,1>UB {align1};
+add (16) g60.0<1>UW g60.0<16,16,1>UW g44.0<16,16,1>UB {align1};
+add (16) g61.0<1>UW g61.0<16,16,1>UW g46.0<16,16,1>UB {align1};
+add (16) g62.0<1>UW g62.0<16,16,1>UW g48.0<16,16,1>UB {align1};
+add (16) g63.0<1>UW g63.0<16,16,1>UW g50.0<16,16,1>UB {align1};
+add (16) g64.0<1>UW g64.0<16,16,1>UW g52.0<16,16,1>UB {align1};
+add (16) g65.0<1>UW g65.0<16,16,1>UW g54.0<16,16,1>UB {align1};
+
+add (16) g58.0<1>UW g58.0<16,16,1>UW g40.1<16,16,1>UB {align1};
+add (16) g59.0<1>UW g59.0<16,16,1>UW g42.1<16,16,1>UB {align1};
+add (16) g60.0<1>UW g60.0<16,16,1>UW g44.1<16,16,1>UB {align1};
+add (16) g61.0<1>UW g61.0<16,16,1>UW g46.1<16,16,1>UB {align1};
+add (16) g62.0<1>UW g62.0<16,16,1>UW g48.1<16,16,1>UB {align1};
+add (16) g63.0<1>UW g63.0<16,16,1>UW g50.1<16,16,1>UB {align1};
+add (16) g64.0<1>UW g64.0<16,16,1>UW g52.1<16,16,1>UB {align1};
+add (16) g65.0<1>UW g65.0<16,16,1>UW g54.1<16,16,1>UB {align1};
+
+shr (16) g58.0<1>UW g58.0<16,16,1>UW 2UW {align1};
+shr (16) g59.0<1>UW g59.0<16,16,1>UW 2UW {align1};
+shr (16) g60.0<1>UW g60.0<16,16,1>UW 2UW {align1};
+shr (16) g61.0<1>UW g61.0<16,16,1>UW 2UW {align1};
+shr (16) g62.0<1>UW g62.0<16,16,1>UW 2UW {align1};
+shr (16) g63.0<1>UW g63.0<16,16,1>UW 2UW {align1};
+shr (16) g64.0<1>UW g64.0<16,16,1>UW 2UW {align1};
+shr (16) g65.0<1>UW g65.0<16,16,1>UW 2UW {align1};
+
+mov (1) g32.8<1>UD 0x07001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+send (16) 0 g46.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g32.4<1>UD g32.4<1,1,1>UD 8UD {align1};
+mov (1) g32.8<1>UD 0x1FUD {align1};
+send (16) 0 g54.0<1>UW g32<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (16) g66.0<1>UW g38.0<16,16,1>UB g38.1<16,16,1>UB {align1};
+add (16) g67.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+add (16) g68.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+add (16) g69.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+add (16) g70.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+add (16) g71.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+add (16) g72.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+add (16) g73.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+
+add (16) g66.0<1>UW g66.0<16,16,1>UW g40.0<16,16,1>UB {align1};
+add (16) g67.0<1>UW g67.0<16,16,1>UW g42.0<16,16,1>UB {align1};
+add (16) g68.0<1>UW g68.0<16,16,1>UW g44.0<16,16,1>UB {align1};
+add (16) g69.0<1>UW g69.0<16,16,1>UW g46.0<16,16,1>UB {align1};
+add (16) g70.0<1>UW g70.0<16,16,1>UW g48.0<16,16,1>UB {align1};
+add (16) g71.0<1>UW g71.0<16,16,1>UW g50.0<16,16,1>UB {align1};
+add (16) g72.0<1>UW g72.0<16,16,1>UW g52.0<16,16,1>UB {align1};
+add (16) g73.0<1>UW g73.0<16,16,1>UW g54.0<16,16,1>UB {align1};
+
+add (16) g66.0<1>UW g66.0<16,16,1>UW g40.1<16,16,1>UB {align1};
+add (16) g67.0<1>UW g67.0<16,16,1>UW g42.1<16,16,1>UB {align1};
+add (16) g68.0<1>UW g68.0<16,16,1>UW g44.1<16,16,1>UB {align1};
+add (16) g69.0<1>UW g69.0<16,16,1>UW g46.1<16,16,1>UB {align1};
+add (16) g70.0<1>UW g70.0<16,16,1>UW g48.1<16,16,1>UB {align1};
+add (16) g71.0<1>UW g71.0<16,16,1>UW g50.1<16,16,1>UB {align1};
+add (16) g72.0<1>UW g72.0<16,16,1>UW g52.1<16,16,1>UB {align1};
+add (16) g73.0<1>UW g73.0<16,16,1>UW g54.1<16,16,1>UB {align1};
+
+shr (16) g66.0<1>UW g66.0<16,16,1>UW 2UW {align1};
+shr (16) g67.0<1>UW g67.0<16,16,1>UW 2UW {align1};
+shr (16) g68.0<1>UW g68.0<16,16,1>UW 2UW {align1};
+shr (16) g69.0<1>UW g69.0<16,16,1>UW 2UW {align1};
+shr (16) g70.0<1>UW g70.0<16,16,1>UW 2UW {align1};
+shr (16) g71.0<1>UW g71.0<16,16,1>UW 2UW {align1};
+shr (16) g72.0<1>UW g72.0<16,16,1>UW 2UW {align1};
+shr (16) g73.0<1>UW g73.0<16,16,1>UW 2UW {align1};
+
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4a b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4a
new file mode 100644
index 0000000..9db50ed
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4a
@@ -0,0 +1,126 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov(2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+/*field 0 of Y*/
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`motion_field_y.g4i')
+mov (8) g58.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g60.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g62.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g64.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g66.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g68.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g70.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g72.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 1 of Y*/
+asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.28')
+define(`mv2',`g82.30')
+include(`motion_field_y.g4i')
+mov (8) g59.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g61.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g63.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g65.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g67.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g69.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g71.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g73.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 0 of UV*/
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g82.20<1>W g82.20<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `8')
+define(`surface_v', `9')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`motion_field_uv.g4i')
+mov (8) g74.0<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.0<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.0<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.0<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.0<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.0<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.0<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.0<1>UW g39.0<8,8,1>UW {align1};
+
+/*field 1 of UV*/
+asr (2) g82.28<1>W g82.28<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`mv1',`g82.28')
+define(`mv2',`g82.30')
+include(`motion_field_uv.g4i')
+mov (8) g74.16<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.16<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.16<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.16<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.16<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.16<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.16<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.16<1>UW g39.0<8,8,1>UW {align1};
+
+include(`addidct.g4i')
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4b b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4b
new file mode 100644
index 0000000..5d46829
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_backward.g4b
@@ -0,0 +1,553 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27400021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27800021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27c00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28000021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28400021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28800021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28c00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29000021, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a5c, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x80008000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a5c, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27600021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27a00021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27e00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28200021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28600021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28a00021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28e00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29200021, 0x008d04e0, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x2a543dad, 0x00450a54, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a009 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29400129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29600129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29800129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29a00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29c00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29e00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a000129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a200129, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x2a5c3dad, 0x00450a5c, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a5c, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x80008000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a5c, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a009 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29500129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29700129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29900129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29b00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29d00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29f00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a100129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a300129, 0x008d04e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a
new file mode 100644
index 0000000..fdc1e83
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a
@@ -0,0 +1,213 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov(2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+/*field 0 forward prediction of Y*/
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`motion_field_y.g4i')
+mov (8) g58.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g60.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g62.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g64.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g66.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g68.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g70.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g72.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 1 forward prediction of Y*/
+asr (2) g31.14<1>W g82.24<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x4000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.24')
+define(`mv2',`g82.26')
+include(`motion_field_y.g4i')
+mov (8) g59.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g61.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g63.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g65.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g67.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g69.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g71.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g73.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 0 forward prediction of UV*/
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g82.16<1>W g82.16<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `5')
+define(`surface_v', `6')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`motion_field_uv.g4i')
+mov (8) g74.0<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.0<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.0<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.0<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.0<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.0<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.0<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.0<1>UW g39.0<8,8,1>UW {align1};
+
+/*field 1 forward prediction of UV*/
+asr (2) g82.24<1>W g82.24<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.24<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x4000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`mv1',`g82.24')
+define(`mv2',`g82.26')
+include(`motion_field_uv.g4i')
+mov (8) g74.16<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.16<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.16<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.16<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.16<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.16<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.16<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.16<1>UW g39.0<8,8,1>UW {align1};
+
+/*field 0 backward prediction of Y*/
+mov(2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`motion_field_y.g4i')
+avg.sat (16) g58.0<1>UW g58.0<16,16,1>UW g32.0<16,16,1>UW {align1};
+avg.sat (16) g60.0<1>UW g60.0<16,16,1>UW g33.0<16,16,1>UW {align1};
+avg.sat (16) g62.0<1>UW g62.0<16,16,1>UW g34.0<16,16,1>UW {align1};
+avg.sat (16) g64.0<1>UW g64.0<16,16,1>UW g35.0<16,16,1>UW {align1};
+avg.sat (16) g66.0<1>UW g66.0<16,16,1>UW g36.0<16,16,1>UW {align1};
+avg.sat (16) g68.0<1>UW g68.0<16,16,1>UW g37.0<16,16,1>UW {align1};
+avg.sat (16) g70.0<1>UW g70.0<16,16,1>UW g38.0<16,16,1>UW {align1};
+avg.sat (16) g72.0<1>UW g72.0<16,16,1>UW g39.0<16,16,1>UW {align1};
+
+/*field 1 backward prediction of Y*/
+asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`7')
+define(`mv1',`g82.28')
+define(`mv2',`g82.30')
+include(`motion_field_y.g4i')
+avg.sat (16) g59.0<1>UW g59.0<16,16,1>UW g32.0<16,16,1>UW {align1};
+avg.sat (16) g61.0<1>UW g61.0<16,16,1>UW g33.0<16,16,1>UW {align1};
+avg.sat (16) g63.0<1>UW g63.0<16,16,1>UW g34.0<16,16,1>UW {align1};
+avg.sat (16) g65.0<1>UW g65.0<16,16,1>UW g35.0<16,16,1>UW {align1};
+avg.sat (16) g67.0<1>UW g67.0<16,16,1>UW g36.0<16,16,1>UW {align1};
+avg.sat (16) g69.0<1>UW g69.0<16,16,1>UW g37.0<16,16,1>UW {align1};
+avg.sat (16) g71.0<1>UW g71.0<16,16,1>UW g38.0<16,16,1>UW {align1};
+avg.sat (16) g73.0<1>UW g73.0<16,16,1>UW g39.0<16,16,1>UW {align1};
+
+/*field 0 backward prediction of UV*/
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g82.20<1>W g82.20<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x2000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `8')
+define(`surface_v', `9')
+define(`mv1',`g82.20')
+define(`mv2',`g82.22')
+include(`motion_field_uv.g4i')
+avg.sat (8) g74.0<1>UW g74.0<8,8,1>UW g32.0<8,8,1>UW {align1};
+avg.sat (8) g75.0<1>UW g75.0<8,8,1>UW g33.0<8,8,1>UW {align1};
+avg.sat (8) g76.0<1>UW g76.0<8,8,1>UW g34.0<8,8,1>UW {align1};
+avg.sat (8) g77.0<1>UW g77.0<8,8,1>UW g35.0<8,8,1>UW {align1};
+avg.sat (8) g78.0<1>UW g78.0<8,8,1>UW g36.0<8,8,1>UW {align1};
+avg.sat (8) g79.0<1>UW g79.0<8,8,1>UW g37.0<8,8,1>UW {align1};
+avg.sat (8) g80.0<1>UW g80.0<8,8,1>UW g38.0<8,8,1>UW {align1};
+avg.sat (8) g81.0<1>UW g81.0<8,8,1>UW g39.0<8,8,1>UW {align1};
+
+/*field 1 backward prediction of UV*/
+asr (2) g82.28<1>W g82.28<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.28<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x8000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`mv1',`g82.28')
+define(`mv2',`g82.30')
+include(`motion_field_uv.g4i')
+avg.sat (8) g74.16<1>UW g74.16<8,8,1>UW g32.0<8,8,1>UW {align1};
+avg.sat (8) g75.16<1>UW g75.16<8,8,1>UW g33.0<8,8,1>UW {align1};
+avg.sat (8) g76.16<1>UW g76.16<8,8,1>UW g34.0<8,8,1>UW {align1};
+avg.sat (8) g77.16<1>UW g77.16<8,8,1>UW g35.0<8,8,1>UW {align1};
+avg.sat (8) g78.16<1>UW g78.16<8,8,1>UW g36.0<8,8,1>UW {align1};
+avg.sat (8) g79.16<1>UW g79.16<8,8,1>UW g37.0<8,8,1>UW {align1};
+avg.sat (8) g80.16<1>UW g80.16<8,8,1>UW g38.0<8,8,1>UW {align1};
+avg.sat (8) g81.16<1>UW g81.16<8,8,1>UW g39.0<8,8,1>UW {align1};
+
+include(`addidct.g4i')
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b
new file mode 100644
index 0000000..9bd272e
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b
@@ -0,0 +1,1007 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27400021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27800021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27c00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28000021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28400021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28800021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28c00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29000021, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a58, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x40004000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a58, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27600021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27a00021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27e00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28200021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28600021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28a00021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28e00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29200021, 0x008d04e0, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x2a503dad, 0x00450a50, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a006 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29400129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29600129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29800129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29a00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29c00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29e00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a000129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a200129, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x2a583dad, 0x00450a58, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a58, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x40004000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a58, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a006 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29500129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29700129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29900129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29b00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29d00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29f00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a100129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a300129, 0x008d04e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x80800042, 0x27402529, 0x00b10740, 0x00b10400 },
+ { 0x80800042, 0x27802529, 0x00b10780, 0x00b10420 },
+ { 0x80800042, 0x27c02529, 0x00b107c0, 0x00b10440 },
+ { 0x80800042, 0x28002529, 0x00b10800, 0x00b10460 },
+ { 0x80800042, 0x28402529, 0x00b10840, 0x00b10480 },
+ { 0x80800042, 0x28802529, 0x00b10880, 0x00b104a0 },
+ { 0x80800042, 0x28c02529, 0x00b108c0, 0x00b104c0 },
+ { 0x80800042, 0x29002529, 0x00b10900, 0x00b104e0 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a5c, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x80008000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a5c, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a007 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a007 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a007 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x80800042, 0x27602529, 0x00b10760, 0x00b10400 },
+ { 0x80800042, 0x27a02529, 0x00b107a0, 0x00b10420 },
+ { 0x80800042, 0x27e02529, 0x00b107e0, 0x00b10440 },
+ { 0x80800042, 0x28202529, 0x00b10820, 0x00b10460 },
+ { 0x80800042, 0x28602529, 0x00b10860, 0x00b10480 },
+ { 0x80800042, 0x28a02529, 0x00b108a0, 0x00b104a0 },
+ { 0x80800042, 0x28e02529, 0x00b108e0, 0x00b104c0 },
+ { 0x80800042, 0x29202529, 0x00b10920, 0x00b104e0 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x2a543dad, 0x00450a54, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x20002000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a54, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a56, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a009 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x80600042, 0x29402529, 0x008d0940, 0x008d0400 },
+ { 0x80600042, 0x29602529, 0x008d0960, 0x008d0420 },
+ { 0x80600042, 0x29802529, 0x008d0980, 0x008d0440 },
+ { 0x80600042, 0x29a02529, 0x008d09a0, 0x008d0460 },
+ { 0x80600042, 0x29c02529, 0x008d09c0, 0x008d0480 },
+ { 0x80600042, 0x29e02529, 0x008d09e0, 0x008d04a0 },
+ { 0x80600042, 0x2a002529, 0x008d0a00, 0x008d04c0 },
+ { 0x80600042, 0x2a202529, 0x008d0a20, 0x008d04e0 },
+ { 0x0020000c, 0x2a5c3dad, 0x00450a5c, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a5c, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x80008000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a5c, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a5e, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a009 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a008 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a009 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a008 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a009 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x80600042, 0x29502529, 0x008d0950, 0x008d0400 },
+ { 0x80600042, 0x29702529, 0x008d0970, 0x008d0420 },
+ { 0x80600042, 0x29902529, 0x008d0990, 0x008d0440 },
+ { 0x80600042, 0x29b02529, 0x008d09b0, 0x008d0460 },
+ { 0x80600042, 0x29d02529, 0x008d09d0, 0x008d0480 },
+ { 0x80600042, 0x29f02529, 0x008d09f0, 0x008d04a0 },
+ { 0x80600042, 0x2a102529, 0x008d0a10, 0x008d04c0 },
+ { 0x80600042, 0x2a302529, 0x008d0a30, 0x008d04e0 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4a b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4a
new file mode 100644
index 0000000..4c79c5f
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4a
@@ -0,0 +1,130 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data
+ g115: message descriptor for reading reference data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+/*field 0 of Y*/
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1}; //motion vertical field select
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`motion_field_y.g4i')
+mov (8) g58.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g60.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g62.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g64.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g66.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g68.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g70.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g72.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 1 of Y*/
+asr (2) g31.14<1>W g82.24<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x4000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface',`4')
+define(`mv1',`g82.24')
+define(`mv2',`g82.26')
+include(`motion_field_y.g4i')
+mov (8) g59.0<1>UD g32.0<8,8,1>UD {align1};
+mov (8) g61.0<1>UD g33.0<8,8,1>UD {align1};
+mov (8) g63.0<1>UD g34.0<8,8,1>UD {align1};
+mov (8) g65.0<1>UD g35.0<8,8,1>UD {align1};
+mov (8) g67.0<1>UD g36.0<8,8,1>UD {align1};
+mov (8) g69.0<1>UD g37.0<8,8,1>UD {align1};
+mov (8) g71.0<1>UD g38.0<8,8,1>UD {align1};
+mov (8) g73.0<1>UD g39.0<8,8,1>UD {align1};
+
+/*field 0 of UV*/
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g82.16<1>W g82.16<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x1000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `5')
+define(`surface_v', `6')
+define(`mv1',`g82.16')
+define(`mv2',`g82.18')
+include(`motion_field_uv.g4i')
+mov (8) g74.0<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.0<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.0<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.0<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.0<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.0<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.0<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.0<1>UW g39.0<8,8,1>UW {align1};
+
+/*field 1 of UV*/
+asr (2) g82.24<1>W g82.24<2,2,1>W 1W {align1};
+asr (2) g31.14<1>W g82.24<2,2,1>W 1W {align1};
+shl (1) g31.16<1>W g31.16<1,1,1>W 1W {align1};
+add (2) g115.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+and (1) g115.4<1>UD g115.4<1,1,1>UD 0xFFFFFFFEUD {align1};
+and.nz (1) null g82.2<1,1,1>UW 0x4000UW {align1};
+(f0) add (1) g115.4<1>UD g115.4<1,1,1>UD 1UD {align1};
+define(`surface_u', `5')
+define(`surface_v', `6')
+define(`mv1',`g82.24')
+define(`mv2',`g82.26')
+include(`motion_field_uv.g4i')
+mov (8) g74.16<1>UW g32.0<8,8,1>UW {align1};
+mov (8) g75.16<1>UW g33.0<8,8,1>UW {align1};
+mov (8) g76.16<1>UW g34.0<8,8,1>UW {align1};
+mov (8) g77.16<1>UW g35.0<8,8,1>UW {align1};
+mov (8) g78.16<1>UW g36.0<8,8,1>UW {align1};
+mov (8) g79.16<1>UW g37.0<8,8,1>UW {align1};
+mov (8) g80.16<1>UW g38.0<8,8,1>UW {align1};
+mov (8) g81.16<1>UW g39.0<8,8,1>UW {align1};
+
+include(`addidct.g4i')
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4b b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4b
new file mode 100644
index 0000000..6c02221
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_field_pred_forward.g4b
@@ -0,0 +1,555 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27400021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27800021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27c00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28000021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28400021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28800021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28c00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29000021, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a58, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x40004000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20002dbc, 0x00210a58, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000045 },
+ { 0x01000005, 0x20002dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002f },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00800040, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x00800040, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x00800040, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x00800040, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x00800040, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x00800040, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x00800040, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x00800040, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10501 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10541 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b10581 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b105c1 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10601 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10641 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b10681 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b106c1 },
+ { 0x00800040, 0x24004529, 0x00b10400, 0x00b10541 },
+ { 0x00800040, 0x24204529, 0x00b10420, 0x00b10581 },
+ { 0x00800040, 0x24404529, 0x00b10440, 0x00b105c1 },
+ { 0x00800040, 0x24604529, 0x00b10460, 0x00b10601 },
+ { 0x00800040, 0x24804529, 0x00b10480, 0x00b10641 },
+ { 0x00800040, 0x24a04529, 0x00b104a0, 0x00b10681 },
+ { 0x00800040, 0x24c04529, 0x00b104c0, 0x00b106c1 },
+ { 0x00800040, 0x24e04529, 0x00b104e0, 0x00b10701 },
+ { 0x00800008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00800008, 0x24202d29, 0x00b10420, 0x00020002 },
+ { 0x00800008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00800008, 0x24602d29, 0x00b10460, 0x00020002 },
+ { 0x00800008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00800008, 0x24a02d29, 0x00b104a0, 0x00020002 },
+ { 0x00800008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00800008, 0x24e02d29, 0x00b104e0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b106c1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x01000005, 0x20002dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000017 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x27001d29, 0x008d0e60, 0x0411a004 },
+ { 0x80800042, 0x24004629, 0x00b10500, 0x00b10540 },
+ { 0x80800042, 0x24204629, 0x00b10540, 0x00b10580 },
+ { 0x80800042, 0x24404629, 0x00b10580, 0x00b105c0 },
+ { 0x80800042, 0x24604629, 0x00b105c0, 0x00b10600 },
+ { 0x80800042, 0x24804629, 0x00b10600, 0x00b10640 },
+ { 0x80800042, 0x24a04629, 0x00b10640, 0x00b10680 },
+ { 0x80800042, 0x24c04629, 0x00b10680, 0x00b106c0 },
+ { 0x80800042, 0x24e04629, 0x00b106c0, 0x00b10700 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000013 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25401d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00800031, 0x25c01d29, 0x008d0e60, 0x0411a004 },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000002 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x26001d29, 0x008d0e60, 0x0418a004 },
+ { 0x00800001, 0x24000229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00b106c0, 0x00000000 },
+ { 0x00600001, 0x27600021, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x27a00021, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x27e00021, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x28200021, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x28600021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28a00021, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x28e00021, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x29200021, 0x008d04e0, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x2a503dad, 0x00450a50, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x10001000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a50, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a52, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a006 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29400129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29600129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29800129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29a00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29c00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29e00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a000129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a200129, 0x008d04e0, 0x00000000 },
+ { 0x0020000c, 0x2a583dad, 0x00450a58, 0x00010001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a58, 0x00010001 },
+ { 0x00000009, 0x23f03dad, 0x002103f0, 0x00010001 },
+ { 0x00200040, 0x2e603421, 0x004503e0, 0x004503ee },
+ { 0x00000005, 0x2e640c21, 0x00210e64, 0xfffffffe },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x40004000 },
+ { 0x00010040, 0x2e640c21, 0x00210e64, 0x00000001 },
+ { 0x01000005, 0x20003dbc, 0x00210a58, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000032 },
+ { 0x01000005, 0x20003dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000024 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0001000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800040, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800040, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800040, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800040, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0501 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0521 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0541 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0561 },
+ { 0x00800040, 0x24004529, 0x00ad0400, 0x00ad0521 },
+ { 0x00800040, 0x24204529, 0x00ad0420, 0x00ad0541 },
+ { 0x00800040, 0x24404529, 0x00ad0440, 0x00ad0561 },
+ { 0x00800040, 0x24604529, 0x00ad0460, 0x00ad0581 },
+ { 0x00800040, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800040, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800040, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800040, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05a1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05c1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad05e1 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0601 },
+ { 0x00800040, 0x24804529, 0x00ad0480, 0x00ad05c1 },
+ { 0x00800040, 0x24a04529, 0x00ad04a0, 0x00ad05e1 },
+ { 0x00800040, 0x24c04529, 0x00ad04c0, 0x00ad0601 },
+ { 0x00800040, 0x24e04529, 0x00ad04e0, 0x00ad0621 },
+ { 0x00a02008, 0x24002d29, 0x00b10400, 0x00020002 },
+ { 0x00a02008, 0x24402d29, 0x00b10440, 0x00020002 },
+ { 0x00a02008, 0x24802d29, 0x00b10480, 0x00020002 },
+ { 0x00a02008, 0x24c02d29, 0x00b104c0, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000029 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0414a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0501 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0521 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0541 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0561 },
+ { 0x00800042, 0x24804629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x24a04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x24c04629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x24e04629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000001d },
+ { 0x01000005, 0x20003dbc, 0x00210a5a, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x008d0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x008d0e60, 0x0414a006 },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0000000f },
+ { 0x00000040, 0x2e640c21, 0x00210e64, 0x00000008 },
+ { 0x00800031, 0x25801d29, 0x008d0e60, 0x0411a005 },
+ { 0x00800031, 0x26201d29, 0x008d0e60, 0x0411a006 },
+ { 0x00800042, 0x24004629, 0x00ad0500, 0x00ad0520 },
+ { 0x00800042, 0x24204629, 0x00ad0520, 0x00ad0540 },
+ { 0x00800042, 0x24404629, 0x00ad0540, 0x00ad0560 },
+ { 0x00800042, 0x24604629, 0x00ad0560, 0x00ad0580 },
+ { 0x00800042, 0x24804629, 0x00ad05a0, 0x00ad05c0 },
+ { 0x00800042, 0x24a04629, 0x00ad05c0, 0x00ad05e0 },
+ { 0x00800042, 0x24c04629, 0x00ad05e0, 0x00ad0600 },
+ { 0x00800042, 0x24e04629, 0x00ad0600, 0x00ad0620 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x2e680061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x25001d29, 0x00ad0e60, 0x0414a005 },
+ { 0x00800031, 0x25a01d29, 0x00ad0e60, 0x0414a006 },
+ { 0x00800001, 0x24000229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x24200229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x24400229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x24600229, 0x00ad0560, 0x00000000 },
+ { 0x00800001, 0x24800229, 0x00ad05a0, 0x00000000 },
+ { 0x00800001, 0x24a00229, 0x00ad05c0, 0x00000000 },
+ { 0x00800001, 0x24c00229, 0x00ad05e0, 0x00000000 },
+ { 0x00800001, 0x24e00229, 0x00ad0600, 0x00000000 },
+ { 0x00600001, 0x29500129, 0x008d0400, 0x00000000 },
+ { 0x00600001, 0x29700129, 0x008d0420, 0x00000000 },
+ { 0x00600001, 0x29900129, 0x008d0440, 0x00000000 },
+ { 0x00600001, 0x29b00129, 0x008d0460, 0x00000000 },
+ { 0x00600001, 0x29d00129, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x29f00129, 0x008d04a0, 0x00000000 },
+ { 0x00600001, 0x2a100129, 0x008d04c0, 0x00000000 },
+ { 0x00600001, 0x2a300129, 0x008d04e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4a b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4a
new file mode 100644
index 0000000..28fe910
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4a
@@ -0,0 +1,61 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g32: message descriptor for reading reference data
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov(2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+//Y, (x', y') = (x, y) + (motion_vector.x >> 1, motion_vector.y >> 1)
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+define(`input_surface', `7')
+define(`mv1', `g82.20')
+define(`mv2', `g82.22')
+include(`motion_frame_y.g4i')
+
+//UV, (x', y') = (x >> 1, y >> 1) + (motion_vector.x >> 2, motion_vector.y >> 2)
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.20<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+define(`input_surface1', `8')
+define(`input_surface2', `9')
+include(`motion_frame_uv.g4i')
+
+include(`addidct.g4i')
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4b b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4b
new file mode 100644
index 0000000..475200b
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_backward.g4b
@@ -0,0 +1,369 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x01000005, 0x20000d3c, 0x00210a54, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x00800040, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x00800040, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x00800040, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x00800040, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x00800040, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x00800040, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x00800040, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e0 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10500 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10520 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10540 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10560 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10580 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a0 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e0 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10600 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10620 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10640 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10660 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10680 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a0 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e1 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10501 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10521 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10541 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10561 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10581 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a1 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c1 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e1 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10601 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10621 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10641 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10661 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10681 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a1 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x80800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x80800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x80800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x80800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x80800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x80800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x80800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x80800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x80800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x80800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x80800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x80800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x80800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x80800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x80800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x80800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104e0 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b10500 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10520 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10540 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10560 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10580 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b105a0 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105c0 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105e0 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b10600 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10620 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10640 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10660 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10680 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b106a0 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b104e0, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10520, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10560, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b105a0, 0x00000000 },
+ { 0x00800001, 0x28400229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b105e0, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10620, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10660, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b106a0, 0x00000000 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x01000005, 0x20000d3c, 0x00210a54, 0x00000002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24401d29, 0x008d0400, 0x0418a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0418a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25401d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26801d29, 0x008d0400, 0x0411a009 },
+ { 0x00600040, 0x29404629, 0x008d0440, 0x008d0441 },
+ { 0x00600040, 0x29504629, 0x008d0460, 0x008d0461 },
+ { 0x00600040, 0x29604629, 0x008d0480, 0x008d0481 },
+ { 0x00600040, 0x29704629, 0x008d04a0, 0x008d04a1 },
+ { 0x00600040, 0x29804629, 0x008d04c0, 0x008d04c1 },
+ { 0x00600040, 0x29904629, 0x008d04e0, 0x008d04e1 },
+ { 0x00600040, 0x29a04629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29b04629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0460 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0480 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d04a0 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d04c0 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d04e0 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0500 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0520 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0540 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0461 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0481 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d04a1 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d04c1 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d04e1 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0501 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0521 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0541 },
+ { 0x00600040, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600040, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600040, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a004629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a104629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a204629, 0x008d0640, 0x008d0641 },
+ { 0x00600040, 0x2a304629, 0x008d0660, 0x008d0661 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05a0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d05c0 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d05e0 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0600 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d0620 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0640 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0660 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0680 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05a1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d05c1 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d05e1 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0601 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d0621 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0641 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0661 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0681 },
+ { 0x00800008, 0x29402d29, 0x00b10940, 0x00020002 },
+ { 0x00800008, 0x29602d29, 0x00b10960, 0x00020002 },
+ { 0x00800008, 0x29802d29, 0x00b10980, 0x00020002 },
+ { 0x00800008, 0x29a02d29, 0x00b109a0, 0x00020002 },
+ { 0x00800008, 0x29c02d29, 0x00b109c0, 0x00020002 },
+ { 0x00800008, 0x29e02d29, 0x00b109e0, 0x00020002 },
+ { 0x00800008, 0x2a002d29, 0x00b10a00, 0x00020002 },
+ { 0x00800008, 0x2a202d29, 0x00b10a20, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000031 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x24401d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a009 },
+ { 0x00800042, 0x29404629, 0x00ad0440, 0x00ad0441 },
+ { 0x00800042, 0x29604629, 0x00ad0460, 0x00ad0461 },
+ { 0x00800042, 0x29804629, 0x00ad0480, 0x00ad0481 },
+ { 0x00800042, 0x29a04629, 0x00ad04a0, 0x00ad04a1 },
+ { 0x00800042, 0x29c04629, 0x00ad0580, 0x00ad0581 },
+ { 0x00800042, 0x29e04629, 0x00ad05a0, 0x00ad05a1 },
+ { 0x00800042, 0x2a004629, 0x00ad05c0, 0x00ad05c1 },
+ { 0x00800042, 0x2a204629, 0x00ad05e0, 0x00ad05e1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000025 },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24401d29, 0x008d0400, 0x0418a008 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0418a009 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25401d29, 0x008d0400, 0x0411a008 },
+ { 0x00800031, 0x26801d29, 0x008d0400, 0x0411a009 },
+ { 0x00600042, 0x29404629, 0x008d0440, 0x008d0460 },
+ { 0x00600042, 0x29504629, 0x008d0460, 0x008d0480 },
+ { 0x00600042, 0x29604629, 0x008d0480, 0x008d04a0 },
+ { 0x00600042, 0x29704629, 0x008d04a0, 0x008d04c0 },
+ { 0x00600042, 0x29804629, 0x008d04c0, 0x008d04e0 },
+ { 0x00600042, 0x29904629, 0x008d04e0, 0x008d0500 },
+ { 0x00600042, 0x29a04629, 0x008d0500, 0x008d0520 },
+ { 0x00600042, 0x29b04629, 0x008d0520, 0x008d0540 },
+ { 0x00600042, 0x29c04629, 0x008d0580, 0x008d05a0 },
+ { 0x00600042, 0x29d04629, 0x008d05a0, 0x008d05c0 },
+ { 0x00600042, 0x29e04629, 0x008d05c0, 0x008d05e0 },
+ { 0x00600042, 0x29f04629, 0x008d05e0, 0x008d0600 },
+ { 0x00600042, 0x2a004629, 0x008d0600, 0x008d0620 },
+ { 0x00600042, 0x2a104629, 0x008d0620, 0x008d0640 },
+ { 0x00600042, 0x2a204629, 0x008d0640, 0x008d0660 },
+ { 0x00600042, 0x2a304629, 0x008d0660, 0x008d0680 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000b },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x00800031, 0x24801d29, 0x008d0400, 0x0414a008 },
+ { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a009 },
+ { 0x00800001, 0x29400229, 0x00ad0480, 0x00000000 },
+ { 0x00800001, 0x29600229, 0x00ad04a0, 0x00000000 },
+ { 0x00800001, 0x29800229, 0x00ad04c0, 0x00000000 },
+ { 0x00800001, 0x29a00229, 0x00ad04e0, 0x00000000 },
+ { 0x00800001, 0x29c00229, 0x00ad0500, 0x00000000 },
+ { 0x00800001, 0x29e00229, 0x00ad0520, 0x00000000 },
+ { 0x00800001, 0x2a000229, 0x00ad0540, 0x00000000 },
+ { 0x00800001, 0x2a200229, 0x00ad0560, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x02000005, 0x20002d3c, 0x00210a42, 0x00200020 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000011 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10a80, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10aa0, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10ac0, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10ae0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10b00, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10b20, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10b40, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10b60, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10b80, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10ba0, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10bc0, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10be0, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c00, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10c20, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x00800040, 0x274045ad, 0x00b10a60, 0x00b20740 },
+ { 0x00800040, 0x276045ad, 0x00b10b60, 0x00b20760 },
+ { 0x00800040, 0x278045ad, 0x00b10a80, 0x00b20780 },
+ { 0x00800040, 0x27a045ad, 0x00b10b80, 0x00b207a0 },
+ { 0x00800040, 0x27c045ad, 0x00b10aa0, 0x00b207c0 },
+ { 0x00800040, 0x27e045ad, 0x00b10ba0, 0x00b207e0 },
+ { 0x00800040, 0x280045ad, 0x00b10ac0, 0x00b20800 },
+ { 0x00800040, 0x282045ad, 0x00b10bc0, 0x00b20820 },
+ { 0x00800040, 0x284045ad, 0x00b10ae0, 0x00b20840 },
+ { 0x00800040, 0x286045ad, 0x00b10be0, 0x00b20860 },
+ { 0x00800040, 0x288045ad, 0x00b10b00, 0x00b20880 },
+ { 0x00800040, 0x28a045ad, 0x00b10c00, 0x00b208a0 },
+ { 0x00800040, 0x28c045ad, 0x00b10b20, 0x00b208c0 },
+ { 0x00800040, 0x28e045ad, 0x00b10c20, 0x00b208e0 },
+ { 0x00800040, 0x290045ad, 0x00b10b40, 0x00b20900 },
+ { 0x00800040, 0x292045ad, 0x00b10c40, 0x00b20920 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x000f000f },
+ { 0x80800001, 0x474001b1, 0x00b10740, 0x00000000 },
+ { 0x80800001, 0x476001b1, 0x00b10760, 0x00000000 },
+ { 0x80800001, 0x478001b1, 0x00b10780, 0x00000000 },
+ { 0x80800001, 0x47a001b1, 0x00b107a0, 0x00000000 },
+ { 0x80800001, 0x47c001b1, 0x00b107c0, 0x00000000 },
+ { 0x80800001, 0x47e001b1, 0x00b107e0, 0x00000000 },
+ { 0x80800001, 0x480001b1, 0x00b10800, 0x00000000 },
+ { 0x80800001, 0x482001b1, 0x00b10820, 0x00000000 },
+ { 0x80800001, 0x484001b1, 0x00b10840, 0x00000000 },
+ { 0x80800001, 0x486001b1, 0x00b10860, 0x00000000 },
+ { 0x80800001, 0x488001b1, 0x00b10880, 0x00000000 },
+ { 0x80800001, 0x48a001b1, 0x00b108a0, 0x00000000 },
+ { 0x80800001, 0x48c001b1, 0x00b108c0, 0x00000000 },
+ { 0x80800001, 0x48e001b1, 0x00b108e0, 0x00000000 },
+ { 0x80800001, 0x490001b1, 0x00b10900, 0x00000000 },
+ { 0x80800001, 0x492001b1, 0x00b10920, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20740, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20760, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20780, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b207a0, 0x00000000 },
+ { 0x00800001, 0x20600232, 0x00b207c0, 0x00000000 },
+ { 0x00800001, 0x20700232, 0x00b207e0, 0x00000000 },
+ { 0x00800001, 0x20800232, 0x00b20800, 0x00000000 },
+ { 0x00800001, 0x20900232, 0x00b20820, 0x00000000 },
+ { 0x00800001, 0x20a00232, 0x00b20840, 0x00000000 },
+ { 0x00800001, 0x20b00232, 0x00b20860, 0x00000000 },
+ { 0x00800001, 0x20c00232, 0x00b20880, 0x00000000 },
+ { 0x00800001, 0x20d00232, 0x00b208a0, 0x00000000 },
+ { 0x00800001, 0x20e00232, 0x00b208c0, 0x00000000 },
+ { 0x00800001, 0x20f00232, 0x00b208e0, 0x00000000 },
+ { 0x00800001, 0x21000232, 0x00b20900, 0x00000000 },
+ { 0x00800001, 0x21100232, 0x00b20920, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05902000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x00200008, 0x23e01c21, 0x004503e0, 0x00000001 },
+ { 0x00800040, 0x294025ad, 0x00b10c60, 0x00b10940 },
+ { 0x00800040, 0x296025ad, 0x00b10c80, 0x00b10960 },
+ { 0x00800040, 0x298025ad, 0x00b10ca0, 0x00b10980 },
+ { 0x00800040, 0x29a025ad, 0x00b10cc0, 0x00b109a0 },
+ { 0x80800001, 0x494001b1, 0x00b10940, 0x00000000 },
+ { 0x80800001, 0x496001b1, 0x00b10960, 0x00000000 },
+ { 0x80800001, 0x498001b1, 0x00b10980, 0x00000000 },
+ { 0x80800001, 0x49a001b1, 0x00b109a0, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b20940, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b20960, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20980, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b209a0, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302001 },
+ { 0x00800040, 0x29c025a9, 0x00b10ce0, 0x00b109c0 },
+ { 0x00800040, 0x29e025a9, 0x00b10d00, 0x00b109e0 },
+ { 0x00800040, 0x2a0025a9, 0x00b10d20, 0x00b10a00 },
+ { 0x00800040, 0x2a2025a9, 0x00b10d40, 0x00b10a20 },
+ { 0x80800001, 0x49c001b1, 0x00b109c0, 0x00000000 },
+ { 0x80800001, 0x49e001b1, 0x00b109e0, 0x00000000 },
+ { 0x80800001, 0x4a0001b1, 0x00b10a00, 0x00000000 },
+ { 0x80800001, 0x4a2001b1, 0x00b10a20, 0x00000000 },
+ { 0x00800001, 0x20200232, 0x00b209c0, 0x00000000 },
+ { 0x00800001, 0x20300232, 0x00b209e0, 0x00000000 },
+ { 0x00800001, 0x20400232, 0x00b20a00, 0x00000000 },
+ { 0x00800001, 0x20500232, 0x00b20a20, 0x00000000 },
+ { 0x00800031, 0x24001d28, 0x008d03e0, 0x05302002 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
+ { 0x00800031, 0x24001d28, 0x008d0000, 0x87100000 },
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a
new file mode 100644
index 0000000..cf7ef57
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a
@@ -0,0 +1,120 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author:
+ * Zou Nan hai <nanhai.zou@intel.com>
+ * Yan Li <li.l.yan@intel.com>
+ * Liu Xi bin<xibin.liu@intel.com>
+ */
+/* GRF allocation:
+ g1~g30: constant buffer
+ g1~g2:intra IQ matrix
+ g3~g4:non intra IQ matrix
+ g5~g20:IDCT table
+ g31: thread payload
+ g32: message descriptor for reading reference data
+ g58~g81:reference data
+ g82: thread payload backup
+ g83~g106:IDCT data */
+mov (8) g82.0<1>UD g31.0<8,8,1>UD {align1};
+mov (2) g31.0<1>UD g82.12<2,2,1>UW {align1};
+mov (1) g126.8<1>UD ip {align1};
+mov (1) ip g21.0<1,1,1>UD {align1};
+
+//Y, Forward
+mov (1) g31.8<1>UD 0x0070007UD {align1};
+define(`input_surface', `4')
+define(`mv1', `g82.16')
+define(`mv2', `g82.18')
+asr (2) g31.14<1>W g82.16<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+include(`motion_frame_y.g4i')
+//Save Forward
+mov (16) g108.0<1>UD g58.0<16,16,1>UD {align1 compr};
+mov (16) g110.0<1>UD g60.0<16,16,1>UD {align1 compr};
+mov (16) g112.0<1>UD g62.0<16,16,1>UD {align1 compr};
+mov (16) g114.0<1>UD g64.0<16,16,1>UD {align1 compr};
+mov (16) g116.0<1>UD g66.0<16,16,1>UD {align1 compr};
+mov (16) g118.0<1>UD g68.0<16,16,1>UD {align1 compr};
+mov (16) g120.0<1>UD g70.0<16,16,1>UD {align1 compr};
+mov (16) g122.0<1>UD g72.0<16,16,1>UD {align1 compr};
+//Y, Backward
+define(`input_surface', `7')
+define(`mv1', `g82.20')
+define(`mv2', `g82.22')
+asr (2) g31.14<1>W g82.20<2,2,1>W 1W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+include(`motion_frame_y.g4i')
+//Average Forward and Backward
+avg.sat (16) g58.0<1>UW g58.0<16,16,1>UW g108.0<16,16,1>UW {align1};
+avg.sat (16) g59.0<1>UW g59.0<16,16,1>UW g109.0<16,16,1>UW {align1};
+avg.sat (16) g60.0<1>UW g60.0<16,16,1>UW g110.0<16,16,1>UW {align1};
+avg.sat (16) g61.0<1>UW g61.0<16,16,1>UW g111.0<16,16,1>UW {align1};
+avg.sat (16) g62.0<1>UW g62.0<16,16,1>UW g112.0<16,16,1>UW {align1};
+avg.sat (16) g63.0<1>UW g63.0<16,16,1>UW g113.0<16,16,1>UW {align1};
+avg.sat (16) g64.0<1>UW g64.0<16,16,1>UW g114.0<16,16,1>UW {align1};
+avg.sat (16) g65.0<1>UW g65.0<16,16,1>UW g115.0<16,16,1>UW {align1};
+avg.sat (16) g66.0<1>UW g66.0<16,16,1>UW g116.0<16,16,1>UW {align1};
+avg.sat (16) g67.0<1>UW g67.0<16,16,1>UW g117.0<16,16,1>UW {align1};
+avg.sat (16) g68.0<1>UW g68.0<16,16,1>UW g118.0<16,16,1>UW {align1};
+avg.sat (16) g69.0<1>UW g69.0<16,16,1>UW g119.0<16,16,1>UW {align1};
+avg.sat (16) g70.0<1>UW g70.0<16,16,1>UW g120.0<16,16,1>UW {align1};
+avg.sat (16) g71.0<1>UW g71.0<16,16,1>UW g121.0<16,16,1>UW {align1};
+avg.sat (16) g72.0<1>UW g72.0<16,16,1>UW g122.0<16,16,1>UW {align1};
+avg.sat (16) g73.0<1>UW g73.0<16,16,1>UW g123.0<16,16,1>UW {align1};
+
+//UV, Forward
+shr (2) g31.0<1>UD g31.0<2,2,1>UD 1UD {align1};
+asr (2) g31.14<1>W g82.16<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+define(`input_surface1', `5')
+define(`input_surface2', `6')
+mov (1) g32.8<1>UD 0x007000fUD {align1};
+include(`motion_frame_uv.g4i')
+//Save UV Forward
+mov (16) g108.0<1>UB g74.0<16,16,2>UB {align1};
+mov (16) g108.16<1>UB g75.0<16,16,2>UB {align1};
+mov (16) g109.0<1>UB g76.0<16,16,2>UB {align1};
+mov (16) g109.16<1>UB g77.0<16,16,2>UB {align1};
+mov (16) g110.0<1>UB g78.0<16,16,2>UB {align1};
+mov (16) g110.16<1>UB g79.0<16,16,2>UB {align1};
+mov (16) g111.0<1>UB g80.0<16,16,2>UB {align1};
+mov (16) g111.16<1>UB g81.0<16,16,2>UB {align1};
+//UV, Backward
+asr (2) g31.14<1>W g82.20<2,2,1>W 2W {align1};
+add (2) g32.0<1>UD g31.0<2,2,1>UD g31.14<2,2,1>W {align1};
+define(`input_surface1', `8')
+define(`input_surface2', `9')
+include(`motion_frame_uv.g4i')
+//Average Forward and Backward
+avg.sat (16) g74.0<1>UW g74.0<16,16,1>UW g108.0<16,16,1>UB {align1};
+avg.sat (16) g75.0<1>UW g75.0<16,16,1>UW g108.16<16,16,1>UB {align1};
+avg.sat (16) g76.0<1>UW g76.0<16,16,1>UW g109.0<16,16,1>UB {align1};
+avg.sat (16) g77.0<1>UW g77.0<16,16,1>UW g109.16<16,16,1>UB {align1};
+avg.sat (16) g78.0<1>UW g78.0<16,16,1>UW g110.0<16,16,1>UB {align1};
+avg.sat (16) g79.0<1>UW g79.0<16,16,1>UW g110.16<16,16,1>UB {align1};
+avg.sat (16) g80.0<1>UW g80.0<16,16,1>UW g111.0<16,16,1>UB {align1};
+avg.sat (16) g81.0<1>UW g81.0<16,16,1>UW g111.16<16,16,1>UB {align1};
+
+include(`addidct.g4i')
+send (16) 0 acc0<1>UW g0<8,8,1>UW
+ thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT};
diff --git a/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b
new file mode 100644
index 0000000..0ca1f38
--- /dev/null
+++ b/i965_drv_video/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b
@@ -0,0 +1,675 @@
+ { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+ { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+ { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+ { 0x00000001, 0x23e80061, 0x00000000, 0x00070007 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x01000005, 0x20000d3c, 0x00210a50, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
+ { 0x01000005, 0x20000d3c, 0x00210a52, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x00800040, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x00800040, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x00800040, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x00800040, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x00800040, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x00800040, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x00800040, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e0 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10500 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10520 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10540 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10560 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10580 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a0 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e0 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10600 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10620 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10640 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10660 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10680 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a0 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e1 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10501 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10521 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10541 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10561 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10581 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a1 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c1 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e1 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10601 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10621 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10641 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10661 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10681 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a1 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x80800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x80800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x80800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x80800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x80800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x80800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x80800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x80800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x80800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x80800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x80800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x80800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x80800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x80800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x80800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x80800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
+ { 0x01000005, 0x20000d3c, 0x00210a52, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a004 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104e0 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b10500 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10520 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10540 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10560 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10580 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b105a0 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105c0 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105e0 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b10600 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10620 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10640 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10660 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10680 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b106a0 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a004 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b104e0, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10520, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10560, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b105a0, 0x00000000 },
+ { 0x00800001, 0x28400229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b105e0, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10620, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10660, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b106a0, 0x00000000 },
+ { 0x00802001, 0x2d800021, 0x00b10740, 0x00000000 },
+ { 0x00802001, 0x2dc00021, 0x00b10780, 0x00000000 },
+ { 0x00802001, 0x2e000021, 0x00b107c0, 0x00000000 },
+ { 0x00802001, 0x2e400021, 0x00b10800, 0x00000000 },
+ { 0x00802001, 0x2e800021, 0x00b10840, 0x00000000 },
+ { 0x00802001, 0x2ec00021, 0x00b10880, 0x00000000 },
+ { 0x00802001, 0x2f000021, 0x00b108c0, 0x00000000 },
+ { 0x00802001, 0x2f400021, 0x00b10900, 0x00000000 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a54, 0x00010001 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x01000005, 0x20000d3c, 0x00210a54, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000005f },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000048 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x00800040, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x00800040, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x00800040, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x00800040, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x00800040, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x00800040, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x00800040, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x00800040, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x00800040, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x00800040, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x00800040, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x00800040, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x00800040, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x00800040, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x00800040, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x00800040, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e0 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10500 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10520 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10540 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10560 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10580 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a0 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c0 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e0 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10600 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10620 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10640 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10660 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10680 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a0 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c0 },
+ { 0x00800040, 0x27404529, 0x00b10740, 0x00b104e1 },
+ { 0x00800040, 0x27604529, 0x00b10760, 0x00b10501 },
+ { 0x00800040, 0x27804529, 0x00b10780, 0x00b10521 },
+ { 0x00800040, 0x27a04529, 0x00b107a0, 0x00b10541 },
+ { 0x00800040, 0x27c04529, 0x00b107c0, 0x00b10561 },
+ { 0x00800040, 0x27e04529, 0x00b107e0, 0x00b10581 },
+ { 0x00800040, 0x28004529, 0x00b10800, 0x00b105a1 },
+ { 0x00800040, 0x28204529, 0x00b10820, 0x00b105c1 },
+ { 0x00800040, 0x28404529, 0x00b10840, 0x00b105e1 },
+ { 0x00800040, 0x28604529, 0x00b10860, 0x00b10601 },
+ { 0x00800040, 0x28804529, 0x00b10880, 0x00b10621 },
+ { 0x00800040, 0x28a04529, 0x00b108a0, 0x00b10641 },
+ { 0x00800040, 0x28c04529, 0x00b108c0, 0x00b10661 },
+ { 0x00800040, 0x28e04529, 0x00b108e0, 0x00b10681 },
+ { 0x00800040, 0x29004529, 0x00b10900, 0x00b106a1 },
+ { 0x00800040, 0x29204529, 0x00b10920, 0x00b106c1 },
+ { 0x80800008, 0x27402d29, 0x00b10740, 0x00020002 },
+ { 0x80800008, 0x27602d29, 0x00b10760, 0x00020002 },
+ { 0x80800008, 0x27802d29, 0x00b10780, 0x00020002 },
+ { 0x80800008, 0x27a02d29, 0x00b107a0, 0x00020002 },
+ { 0x80800008, 0x27c02d29, 0x00b107c0, 0x00020002 },
+ { 0x80800008, 0x27e02d29, 0x00b107e0, 0x00020002 },
+ { 0x80800008, 0x28002d29, 0x00b10800, 0x00020002 },
+ { 0x80800008, 0x28202d29, 0x00b10820, 0x00020002 },
+ { 0x80800008, 0x28402d29, 0x00b10840, 0x00020002 },
+ { 0x80800008, 0x28602d29, 0x00b10860, 0x00020002 },
+ { 0x80800008, 0x28802d29, 0x00b10880, 0x00020002 },
+ { 0x80800008, 0x28a02d29, 0x00b108a0, 0x00020002 },
+ { 0x80800008, 0x28c02d29, 0x00b108c0, 0x00020002 },
+ { 0x80800008, 0x28e02d29, 0x00b108e0, 0x00020002 },
+ { 0x80800008, 0x29002d29, 0x00b10900, 0x00020002 },
+ { 0x80800008, 0x29202d29, 0x00b10920, 0x00020002 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000043 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104c1 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b104e1 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10501 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10521 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10541 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10561 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b10581 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105a1 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105c1 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b105e1 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10601 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10621 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10641 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10661 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b10681 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106a1 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000002e },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x26c01d29, 0x008d0400, 0x0411a007 },
+ { 0x80800042, 0x27404629, 0x00b104c0, 0x00b104e0 },
+ { 0x80800042, 0x27604629, 0x00b104e0, 0x00b10500 },
+ { 0x80800042, 0x27804629, 0x00b10500, 0x00b10520 },
+ { 0x80800042, 0x27a04629, 0x00b10520, 0x00b10540 },
+ { 0x80800042, 0x27c04629, 0x00b10540, 0x00b10560 },
+ { 0x80800042, 0x27e04629, 0x00b10560, 0x00b10580 },
+ { 0x80800042, 0x28004629, 0x00b10580, 0x00b105a0 },
+ { 0x80800042, 0x28204629, 0x00b105a0, 0x00b105c0 },
+ { 0x80800042, 0x28404629, 0x00b105c0, 0x00b105e0 },
+ { 0x80800042, 0x28604629, 0x00b105e0, 0x00b10600 },
+ { 0x80800042, 0x28804629, 0x00b10600, 0x00b10620 },
+ { 0x80800042, 0x28a04629, 0x00b10620, 0x00b10640 },
+ { 0x80800042, 0x28c04629, 0x00b10640, 0x00b10660 },
+ { 0x80800042, 0x28e04629, 0x00b10660, 0x00b10680 },
+ { 0x80800042, 0x29004629, 0x00b10680, 0x00b106a0 },
+ { 0x80800042, 0x29204629, 0x00b106a0, 0x00b106c0 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00800031, 0x25c01d29, 0x008d0400, 0x0418a007 },
+ { 0x00800001, 0x27400229, 0x00b104c0, 0x00000000 },
+ { 0x00800001, 0x27600229, 0x00b104e0, 0x00000000 },
+ { 0x00800001, 0x27800229, 0x00b10500, 0x00000000 },
+ { 0x00800001, 0x27a00229, 0x00b10520, 0x00000000 },
+ { 0x00800001, 0x27c00229, 0x00b10540, 0x00000000 },
+ { 0x00800001, 0x27e00229, 0x00b10560, 0x00000000 },
+ { 0x00800001, 0x28000229, 0x00b10580, 0x00000000 },
+ { 0x00800001, 0x28200229, 0x00b105a0, 0x00000000 },
+ { 0x00800001, 0x28400229, 0x00b105c0, 0x00000000 },
+ { 0x00800001, 0x28600229, 0x00b105e0, 0x00000000 },
+ { 0x00800001, 0x28800229, 0x00b10600, 0x00000000 },
+ { 0x00800001, 0x28a00229, 0x00b10620, 0x00000000 },
+ { 0x00800001, 0x28c00229, 0x00b10640, 0x00000000 },
+ { 0x00800001, 0x28e00229, 0x00b10660, 0x00000000 },
+ { 0x00800001, 0x29000229, 0x00b10680, 0x00000000 },
+ { 0x00800001, 0x29200229, 0x00b106a0, 0x00000000 },
+ { 0x80800042, 0x27402529, 0x00b10740, 0x00b10d80 },
+ { 0x80800042, 0x27602529, 0x00b10760, 0x00b10da0 },
+ { 0x80800042, 0x27802529, 0x00b10780, 0x00b10dc0 },
+ { 0x80800042, 0x27a02529, 0x00b107a0, 0x00b10de0 },
+ { 0x80800042, 0x27c02529, 0x00b107c0, 0x00b10e00 },
+ { 0x80800042, 0x27e02529, 0x00b107e0, 0x00b10e20 },
+ { 0x80800042, 0x28002529, 0x00b10800, 0x00b10e40 },
+ { 0x80800042, 0x28202529, 0x00b10820, 0x00b10e60 },
+ { 0x80800042, 0x28402529, 0x00b10840, 0x00b10e80 },
+ { 0x80800042, 0x28602529, 0x00b10860, 0x00b10ea0 },
+ { 0x80800042, 0x28802529, 0x00b10880, 0x00b10ec0 },
+ { 0x80800042, 0x28a02529, 0x00b108a0, 0x00b10ee0 },
+ { 0x80800042, 0x28c02529, 0x00b108c0, 0x00b10f00 },
+ { 0x80800042, 0x28e02529, 0x00b108e0, 0x00b10f20 },
+ { 0x80800042, 0x29002529, 0x00b10900, 0x00b10f40 },
+ { 0x80800042, 0x29202529, 0x00b10920, 0x00b10f60 },
+ { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+ { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00020002 },
+ { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007000f },
+ { 0x01000005, 0x20000d3c, 0x00210a54, 0x00000002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
+ { 0x01000005, 0x20000d3c, 0x00210a56, 0x00000002 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000040 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0007001f },
+ { 0x00800031, 0x24401d29, 0x008d0400, 0x0418a005 },
+ { 0x00800031, 0x25801d29, 0x008d0400, 0x0418a006 },
+ { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+ { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+ { 0x00800031, 0x25401d29, 0x008d0400, 0x0411a005 },
+ { 0x00800031, 0x26801d29, 0x008d0400, 0x0411a006 },
+ { 0x00600040, 0x29404629, 0x008d0440, 0x008d0441 },
+ { 0x00600040, 0x29504629, 0x008d0460, 0x008d0461 },
+ { 0x00600040, 0x29604629, 0x008d0480, 0x008d0481 },
+ { 0x00600040, 0x29704629, 0x008d04a0, 0x008d04a1 },
+ { 0x00600040, 0x29804629, 0x008d04c0, 0x008d04c1 },
+ { 0x00600040, 0x29904629, 0x008d04e0, 0x008d04e1 },
+ { 0x00600040, 0x29a04629, 0x008d0500, 0x008d0501 },
+ { 0x00600040, 0x29b04629, 0x008d0520, 0x008d0521 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0460 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0480 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d04a0 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d04c0 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d04e0 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0500 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0520 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0540 },
+ { 0x00600040, 0x29404529, 0x008d0940, 0x008d0461 },
+ { 0x00600040, 0x29504529, 0x008d0950, 0x008d0481 },
+ { 0x00600040, 0x29604529, 0x008d0960, 0x008d04a1 },
+ { 0x00600040, 0x29704529, 0x008d0970, 0x008d04c1 },
+ { 0x00600040, 0x29804529, 0x008d0980, 0x008d04e1 },
+ { 0x00600040, 0x29904529, 0x008d0990, 0x008d0501 },
+ { 0x00600040, 0x29a04529, 0x008d09a0, 0x008d0521 },
+ { 0x00600040, 0x29b04529, 0x008d09b0, 0x008d0541 },
+ { 0x00600040, 0x29c04629, 0x008d0580, 0x008d0581 },
+ { 0x00600040, 0x29d04629, 0x008d05a0, 0x008d05a1 },
+ { 0x00600040, 0x29e04629, 0x008d05c0, 0x008d05c1 },
+ { 0x00600040, 0x29f04629, 0x008d05e0, 0x008d05e1 },
+ { 0x00600040, 0x2a004629, 0x008d0600, 0x008d0601 },
+ { 0x00600040, 0x2a104629, 0x008d0620, 0x008d0621 },
+ { 0x00600040, 0x2a204629, 0x008d0640, 0x008d0641 },
+ { 0x00600040, 0x2a304629, 0x008d0660, 0x008d0661 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05a0 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d05c0 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d05e0 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0600 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0x008d0620 },
+ { 0x00600040, 0x2a104529, 0x008d0a10, 0x008d0640 },
+ { 0x00600040, 0x2a204529, 0x008d0a20, 0x008d0660 },
+ { 0x00600040, 0x2a304529, 0x008d0a30, 0x008d0680 },
+ { 0x00600040, 0x29c04529, 0x008d09c0, 0x008d05a1 },
+ { 0x00600040, 0x29d04529, 0x008d09d0, 0x008d05c1 },
+ { 0x00600040, 0x29e04529, 0x008d09e0, 0x008d05e1 },
+ { 0x00600040, 0x29f04529, 0x008d09f0, 0x008d0601 },
+ { 0x00600040, 0x2a004529, 0x008d0a00, 0