Apply the patch from Nanhai to support MPEG2 VLD on Intel integrated G45 graphics
authorAustin Yuan <shengquan.yuan@intel.com>
Thu, 2 Jul 2009 09:02:12 +0000 (17:02 +0800)
committerAustin Yuan <shengquan.yuan@intel.com>
Thu, 2 Jul 2009 09:02:12 +0000 (17:02 +0800)
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
111 files changed:
Makefile.am [new file with mode: 0644]
i965_defines.h [new file with mode: 0644]
i965_drv_video.c [new file with mode: 0644]
i965_drv_video.h [new file with mode: 0644]
i965_drv_video.la [new file with mode: 0644]
i965_media.c [new file with mode: 0644]
i965_media.h [new file with mode: 0644]
i965_media_mpeg2.c [new file with mode: 0644]
i965_media_mpeg2.h [new file with mode: 0644]
i965_render.c [new file with mode: 0644]
i965_render.h [new file with mode: 0644]
i965_structs.h [new file with mode: 0644]
intel_batchbuffer.c [new file with mode: 0644]
intel_batchbuffer.h [new file with mode: 0644]
intel_driver.c [new file with mode: 0644]
intel_driver.h [new file with mode: 0644]
intel_memman.c [new file with mode: 0644]
intel_memman.h [new file with mode: 0644]
object_heap.c [new file with mode: 0644]
object_heap.h [new file with mode: 0644]
shaders/Makefile.am [new file with mode: 0644]
shaders/mpeg2/Makefile.am [new file with mode: 0644]
shaders/mpeg2/vld/Makefile.am [new file with mode: 0644]
shaders/mpeg2/vld/addidct.g4i [new file with mode: 0644]
shaders/mpeg2/vld/do_iq_intra.g4i [new file with mode: 0644]
shaders/mpeg2/vld/do_iq_non_intra.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_addidct.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_backward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_backward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_backward_16x8.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_backward_16x8.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_bidirect.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_bidirect.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_bidirect_16x8.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_bidirect_16x8.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_forward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_forward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_forward_16x8.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_forward_16x8.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_intra.g4a [new file with mode: 0644]
shaders/mpeg2/vld/field_intra.g4b [new file with mode: 0644]
shaders/mpeg2/vld/field_motion_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_motion_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x0y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x0y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x0y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x0y1_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x1y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x1y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x1y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/field_read_x1y1_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_backward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_backward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_bidirect.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_bidirect.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_forward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_field_pred_forward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_backward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_backward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_forward.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_frame_pred_forward.g4b [new file with mode: 0644]
shaders/mpeg2/vld/frame_intra.g4a [new file with mode: 0644]
shaders/mpeg2/vld/frame_intra.g4b [new file with mode: 0644]
shaders/mpeg2/vld/idct.g4i [new file with mode: 0644]
shaders/mpeg2/vld/iq_intra.g4i [new file with mode: 0644]
shaders/mpeg2/vld/iq_non_intra.g4i [new file with mode: 0644]
shaders/mpeg2/vld/lib.g4a [new file with mode: 0644]
shaders/mpeg2/vld/lib.g4b [new file with mode: 0644]
shaders/mpeg2/vld/motion_field_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/motion_field_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/motion_frame_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/motion_frame_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/null.g4a [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x0y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x0y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x0y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x0y1_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x1y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x1y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x1y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_field_x1y1_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x0y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x0y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x0y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x0y1_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x1y0_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x1y0_y.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x1y1_uv.g4i [new file with mode: 0644]
shaders/mpeg2/vld/read_frame_x1y1_y.g4i [new file with mode: 0644]
shaders/render/Makefile [new file with mode: 0644]
shaders/render/Makefile.am [new file with mode: 0644]
shaders/render/Makefile.in [new file with mode: 0644]
shaders/render/exa_sf.g4a [new file with mode: 0644]
shaders/render/exa_sf.g4b [new file with mode: 0644]
shaders/render/exa_wm.g4i [new file with mode: 0644]
shaders/render/exa_wm_affine.g4i [new file with mode: 0644]
shaders/render/exa_wm_blend_subpicture.g4a [new file with mode: 0644]
shaders/render/exa_wm_blend_subpicture.g4b [new file with mode: 0644]
shaders/render/exa_wm_src_affine.g4a [new file with mode: 0644]
shaders/render/exa_wm_src_affine.g4b [new file with mode: 0644]
shaders/render/exa_wm_src_sample_planar.g4a [new file with mode: 0644]
shaders/render/exa_wm_src_sample_planar.g4b [new file with mode: 0644]
shaders/render/exa_wm_write.g4a [new file with mode: 0644]
shaders/render/exa_wm_write.g4b [new file with mode: 0644]
shaders/render/exa_wm_xy.g4a [new file with mode: 0644]
shaders/render/exa_wm_xy.g4b [new file with mode: 0644]
shaders/render/exa_wm_yuv_rgb.g4a [new file with mode: 0644]
shaders/render/exa_wm_yuv_rgb.g4b [new file with mode: 0644]
shaders/vld/Makefile [new file with mode: 0644]

diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..f01f4ef
--- /dev/null
@@ -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_defines.h b/i965_defines.h
new file mode 100644 (file)
index 0000000..e0f38b2
--- /dev/null
@@ -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.c b/i965_drv_video.c
new file mode 100644 (file)
index 0000000..0b3f6c1
--- /dev/null
@@ -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.h b/i965_drv_video.h
new file mode 100644 (file)
index 0000000..1771b0d
--- /dev/null
@@ -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.la b/i965_drv_video.la
new file mode 100644 (file)
index 0000000..1fc7278
--- /dev/null
@@ -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_media.c b/i965_media.c
new file mode 100644 (file)
index 0000000..bc51e8e
--- /dev/null
@@ -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_media.h b/i965_media.h
new file mode 100644 (file)
index 0000000..e207f4e
--- /dev/null
@@ -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_media_mpeg2.c b/i965_media_mpeg2.c
new file mode 100644 (file)
index 0000000..0069301
--- /dev/null
@@ -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_media_mpeg2.h b/i965_media_mpeg2.h
new file mode 100644 (file)
index 0000000..bfeda13
--- /dev/null
@@ -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_render.c b/i965_render.c
new file mode 100644 (file)
index 0000000..c232191
--- /dev/null
@@ -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_render.h b/i965_render.h
new file mode 100644 (file)
index 0000000..e3dce02
--- /dev/null
@@ -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_structs.h b/i965_structs.h
new file mode 100644 (file)
index 0000000..93fa2f0
--- /dev/null
@@ -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/intel_batchbuffer.c b/intel_batchbuffer.c
new file mode 100644 (file)
index 0000000..46c9496
--- /dev/null
@@ -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/intel_batchbuffer.h b/intel_batchbuffer.h
new file mode 100644 (file)
index 0000000..c3a2457
--- /dev/null
@@ -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/intel_driver.c b/intel_driver.c
new file mode 100644 (file)
index 0000000..6ab915c
--- /dev/null
@@ -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/intel_driver.h b/intel_driver.h
new file mode 100644 (file)
index 0000000..e0271eb
--- /dev/null
@@ -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/intel_memman.c b/intel_memman.c
new file mode 100644 (file)
index 0000000..aeb4186
--- /dev/null
@@ -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/intel_memman.h b/intel_memman.h
new file mode 100644 (file)
index 0000000..4e516e5
--- /dev/null
@@ -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/object_heap.c b/object_heap.c
new file mode 100644 (file)
index 0000000..1900f8c
--- /dev/null
@@ -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/object_heap.h b/object_heap.h
new file mode 100644 (file)
index 0000000..154fddb
--- /dev/null
@@ -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/shaders/Makefile.am b/shaders/Makefile.am
new file mode 100644 (file)
index 0000000..24f1aa8
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = mpeg2 render
diff --git a/shaders/mpeg2/Makefile.am b/shaders/mpeg2/Makefile.am
new file mode 100644 (file)
index 0000000..e5c6e7f
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = vld
diff --git a/shaders/mpeg2/vld/Makefile.am b/shaders/mpeg2/vld/Makefile.am
new file mode 100644 (file)
index 0000000..463dc16
--- /dev/null
@@ -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/shaders/mpeg2/vld/addidct.g4i b/shaders/mpeg2/vld/addidct.g4i
new file mode 100644 (file)
index 0000000..b57548d
--- /dev/null
@@ -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/shaders/mpeg2/vld/do_iq_intra.g4i b/shaders/mpeg2/vld/do_iq_intra.g4i
new file mode 100644 (file)
index 0000000..29bd020
--- /dev/null
@@ -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/shaders/mpeg2/vld/do_iq_non_intra.g4i b/shaders/mpeg2/vld/do_iq_non_intra.g4i
new file mode 100644 (file)
index 0000000..da85e84
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_addidct.g4i b/shaders/mpeg2/vld/field_addidct.g4i
new file mode 100644 (file)
index 0000000..05d0f95
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_backward.g4a b/shaders/mpeg2/vld/field_backward.g4a
new file mode 100644 (file)
index 0000000..1696ff3
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_backward.g4b b/shaders/mpeg2/vld/field_backward.g4b
new file mode 100644 (file)
index 0000000..f00d8e5
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_backward_16x8.g4a b/shaders/mpeg2/vld/field_backward_16x8.g4a
new file mode 100644 (file)
index 0000000..89b8368
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_backward_16x8.g4b b/shaders/mpeg2/vld/field_backward_16x8.g4b
new file mode 100644 (file)
index 0000000..9d95f70
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_bidirect.g4a b/shaders/mpeg2/vld/field_bidirect.g4a
new file mode 100644 (file)
index 0000000..ad6d302
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_bidirect.g4b b/shaders/mpeg2/vld/field_bidirect.g4b
new file mode 100644 (file)
index 0000000..181e776
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_bidirect_16x8.g4a b/shaders/mpeg2/vld/field_bidirect_16x8.g4a
new file mode 100644 (file)
index 0000000..e4fc178
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_bidirect_16x8.g4b b/shaders/mpeg2/vld/field_bidirect_16x8.g4b
new file mode 100644 (file)
index 0000000..9d95f70
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_forward.g4a b/shaders/mpeg2/vld/field_forward.g4a
new file mode 100644 (file)
index 0000000..611cf0c
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_forward.g4b b/shaders/mpeg2/vld/field_forward.g4b
new file mode 100644 (file)
index 0000000..aa059f1
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_forward_16x8.g4a b/shaders/mpeg2/vld/field_forward_16x8.g4a
new file mode 100644 (file)
index 0000000..2052481
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_forward_16x8.g4b b/shaders/mpeg2/vld/field_forward_16x8.g4b
new file mode 100644 (file)
index 0000000..9d95f70
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_intra.g4a b/shaders/mpeg2/vld/field_intra.g4a
new file mode 100644 (file)
index 0000000..e85ec85
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_intra.g4b b/shaders/mpeg2/vld/field_intra.g4b
new file mode 100644 (file)
index 0000000..4c1c8c4
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_motion_uv.g4i b/shaders/mpeg2/vld/field_motion_uv.g4i
new file mode 100644 (file)
index 0000000..201ee51
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_motion_y.g4i b/shaders/mpeg2/vld/field_motion_y.g4i
new file mode 100644 (file)
index 0000000..20adb31
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x0y0_uv.g4i b/shaders/mpeg2/vld/field_read_x0y0_uv.g4i
new file mode 100644 (file)
index 0000000..ff439e5
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x0y0_y.g4i b/shaders/mpeg2/vld/field_read_x0y0_y.g4i
new file mode 100644 (file)
index 0000000..3b0da9c
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x0y1_uv.g4i b/shaders/mpeg2/vld/field_read_x0y1_uv.g4i
new file mode 100644 (file)
index 0000000..b72507a
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x0y1_y.g4i b/shaders/mpeg2/vld/field_read_x0y1_y.g4i
new file mode 100644 (file)
index 0000000..98a09ed
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x1y0_uv.g4i b/shaders/mpeg2/vld/field_read_x1y0_uv.g4i
new file mode 100644 (file)
index 0000000..8e318d7
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x1y0_y.g4i b/shaders/mpeg2/vld/field_read_x1y0_y.g4i
new file mode 100644 (file)
index 0000000..0d2fbb1
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x1y1_uv.g4i b/shaders/mpeg2/vld/field_read_x1y1_uv.g4i
new file mode 100644 (file)
index 0000000..dd8877a
--- /dev/null
@@ -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/shaders/mpeg2/vld/field_read_x1y1_y.g4i b/shaders/mpeg2/vld/field_read_x1y1_y.g4i
new file mode 100644 (file)
index 0000000..7c28b86
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_backward.g4a b/shaders/mpeg2/vld/frame_field_pred_backward.g4a
new file mode 100644 (file)
index 0000000..9db50ed
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_backward.g4b b/shaders/mpeg2/vld/frame_field_pred_backward.g4b
new file mode 100644 (file)
index 0000000..5d46829
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a b/shaders/mpeg2/vld/frame_field_pred_bidirect.g4a
new file mode 100644 (file)
index 0000000..fdc1e83
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b b/shaders/mpeg2/vld/frame_field_pred_bidirect.g4b
new file mode 100644 (file)
index 0000000..9bd272e
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_forward.g4a b/shaders/mpeg2/vld/frame_field_pred_forward.g4a
new file mode 100644 (file)
index 0000000..4c79c5f
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_field_pred_forward.g4b b/shaders/mpeg2/vld/frame_field_pred_forward.g4b
new file mode 100644 (file)
index 0000000..6c02221
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_frame_pred_backward.g4a b/shaders/mpeg2/vld/frame_frame_pred_backward.g4a
new file mode 100644 (file)
index 0000000..28fe910
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_frame_pred_backward.g4b b/shaders/mpeg2/vld/frame_frame_pred_backward.g4b
new file mode 100644 (file)
index 0000000..475200b
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a b/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4a
new file mode 100644 (file)
index 0000000..cf7ef57
--- /dev/null
@@ -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/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b b/shaders/mpeg2/vld/frame_frame_pred_bidirect.g4b
new file mode 100644 (file)
index 0000000..0ca1f38
--- /dev/null
@@ -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, 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, 0x0414a005 },
+   { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+   { 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, 0x0418a005 },
+   { 0x00800031, 0x25801d29, 0x008d0400, 0x0418a006 },
+   { 0x00000040, 0x24040c21, 0x00210404, 0x00000008 },
+   { 0x00000001, 0x24080061, 0x00000000, 0x0000001f },
+   { 0x00800031, 0x25401d29, 0x008d0400, 0x0411a005 },
+   { 0x00800031, 0x26801d29, 0x008d0400, 0x0411a006 },
+   { 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, 0x0414a005 },
+   { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a006 },
+   { 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 },
+   { 0x00800001, 0x2d800231, 0x00b20940, 0x00000000 },
+   { 0x00800001, 0x2d900231, 0x00b20960, 0x00000000 },
+   { 0x00800001, 0x2da00231, 0x00b20980, 0x00000000 },
+   { 0x00800001, 0x2db00231, 0x00b209a0, 0x00000000 },
+   { 0x00800001, 0x2dc00231, 0x00b209c0, 0x00000000 },
+   { 0x00800001, 0x2dd00231, 0x00b209e0, 0x00000000 },
+   { 0x00800001, 0x2de00231, 0x00b20a00, 0x00000000 },
+   { 0x00800001, 0x2df00231, 0x00b20a20, 0x00000000 },
+   { 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 },
+   { 0x80800042, 0x29404529, 0x00b10940, 0x00b10d80 },
+   { 0x80800042, 0x29604529, 0x00b10960, 0x00b10d90 },
+   { 0x80800042, 0x29804529, 0x00b10980, 0x00b10da0 },
+   { 0x80800042, 0x29a04529, 0x00b109a0, 0x00b10db0 },
+   { 0x80800042, 0x29c04529, 0x00b109c0, 0x00b10dc0 },
+   { 0x80800042, 0x29e04529, 0x00b109e0, 0x00b10dd0 },
+   { 0x80800042, 0x2a004529, 0x00b10a00, 0x00b10de0 },
+   { 0x80800042, 0x2a204529, 0x00b10a20, 0x00b10df0 },
+   { 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/shaders/mpeg2/vld/frame_frame_pred_forward.g4a b/shaders/mpeg2/vld/frame_frame_pred_forward.g4a
new file mode 100644 (file)
index 0000000..22f4804
--- /dev/null
@@ -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.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};
+define(`input_surface',        `4')
+define(`mv1',  `g82.16')
+define(`mv2',  `g82.18')
+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.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')
+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/shaders/mpeg2/vld/frame_frame_pred_forward.g4b b/shaders/mpeg2/vld/frame_frame_pred_forward.g4b
new file mode 100644 (file)
index 0000000..4bf6c93
--- /dev/null
@@ -0,0 +1,369 @@
+   { 0x00600001, 0x2a400021, 0x008d03e0, 0x00000000 },
+   { 0x00200001, 0x23e00121, 0x00450a4c, 0x00000000 },
+   { 0x00000001, 0x2fc80001, 0x00001400, 0x00000000 },
+   { 0x00000001, 0x34000020, 0x002102a0, 0x00000000 },
+   { 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 },
+   { 0x00200008, 0x23e00c21, 0x004503e0, 0x00000001 },
+   { 0x0020000c, 0x23ee3dad, 0x00450a50, 0x00020002 },
+   { 0x00200040, 0x24003421, 0x004503e0, 0x004503ee },
+   { 0x01000005, 0x20000d3c, 0x00210a50, 0x00000002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000004e },
+   { 0x01000005, 0x20000d3c, 0x00210a52, 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, 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, 0x0414a005 },
+   { 0x00800031, 0x25801d29, 0x008d0400, 0x0414a006 },
+   { 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, 0x00210a52, 0x00000002 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+   { 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 },
+   { 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, 0x0414a005 },
+   { 0x00800031, 0x25001d29, 0x008d0400, 0x0414a006 },
+   { 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/shaders/mpeg2/vld/frame_intra.g4a b/shaders/mpeg2/vld/frame_intra.g4a
new file mode 100644 (file)
index 0000000..cf12a44
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ * 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};
+//shl (1) g31.4<1>UD g31.4<1,1,1>UD 1UD {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/shaders/mpeg2/vld/frame_intra.g4b b/shaders/mpeg2/vld/frame_intra.g4b
new file mode 100644 (file)
index 0000000..4c1c8c4
--- /dev/null
@@ -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/shaders/mpeg2/vld/idct.g4i b/shaders/mpeg2/vld/idct.g4i
new file mode 100644 (file)
index 0000000..c1747d1
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * 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 in UB format
+           g3~g4:non intra IQ matrix in UB format
+           g5~g20:IDCT table
+   g56~g79:DCT data after IQ before idct
+   g83~g106: IDCT data after idct
+   g82:    thread payload backup
+   g125:   ip before idct
+*/
+IDCT_START:
+mov (1) g126.0<1>UD ip {align1};
+jmpi DO_IDCT;
+add (16) g32<1>D g32<8,8,1>D ROW_ADD {compr};
+add (16) g34<1>D g34<8,8,1>D ROW_ADD {compr};
+add (16) g36<1>D g36<8,8,1>D ROW_ADD {compr};
+add (16) g38<1>D g38<8,8,1>D ROW_ADD {compr};
+
+shr (16) g32<1>D g32<8,8,1>D ROW_SHIFT {compr};
+shr (16) g34<1>D g34<8,8,1>D ROW_SHIFT {compr};
+shr (16) g36<1>D g36<8,8,1>D ROW_SHIFT {compr};
+shr (16) g38<1>D g38<8,8,1>D ROW_SHIFT {compr};
+
+mov (16) g110.0<1>W g32<16,8,2>W {align1};
+mov (16) g111.0<1>W g34<16,8,2>W {align1};
+mov (16) g112.0<1>W g36<16,8,2>W {align1};
+mov (16) g113.0<1>W g38<16,8,2>W {align1};
+
+mov (1) g80.0<1>UD a0.0<1,1,1>UD {align1};  //save a0
+mov (1) a0.0<1>UD 0x0DB00DA0UD {align1};  //begin at g110.0, the output of idct_row.g4i
+mov (1) g126.0<1>UD ip {align1};
+jmpi DO_IDCT;
+
+add (16) g32<1>D g32<8,8,1>D COL_ADD {compr};
+add (16) g34<1>D g34<8,8,1>D COL_ADD {compr};
+add (16) g36<1>D g36<8,8,1>D COL_ADD {compr};
+add (16) g38<1>D g38<8,8,1>D COL_ADD {compr};
+
+shr (16) g32<1>D g32<8,8,1>D COL_SHIFT {compr};
+shr (16) g34<1>D g34<8,8,1>D COL_SHIFT {compr};
+shr (16) g36<1>D g36<8,8,1>D COL_SHIFT {compr};
+shr (16) g38<1>D g38<8,8,1>D COL_SHIFT {compr};
+
+mov (1) a0.0<1>UD g80.0<1,1,1>UD {align1};             //restore a0 
+add (1) ip g125.0<1,1,1>UD 0x20UD {align1};            //jump back
+
+DO_IDCT:
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};           //increase the address 
+dp4 (16) g40<1>D g[a0.0]<8,8,1>W g5<8,8,1>D {align1 compr};
+dp4 (16) g42<1>D g[a0.0]<8,8,1>W g7<8,8,1>D {align1 compr};
+dp4 (16) g44<1>D g[a0.0]<8,8,1>W g9<8,8,1>D {align1 compr};
+dp4 (16) g46<1>D g[a0.0]<8,8,1>W g11<8,8,1>D {align1 compr};
+dp4 (16) g48<1>D g[a0.0]<8,8,1>W g13<8,8,1>D {align1 compr};
+dp4 (16) g50<1>D g[a0.0]<8,8,1>W g15<8,8,1>D {align1 compr};
+dp4 (16) g52<1>D g[a0.0]<8,8,1>W g17<8,8,1>D {align1 compr};
+dp4 (16) g54<1>D g[a0.0]<8,8,1>W g19<8,8,1>D {align1 compr};
+add (2) g32.0<1>D g40.0<8,1,8>D g40.16<8,1,8>D {align1};
+add (2) g33.0<1>D g42.0<8,1,8>D g42.16<8,1,8>D {align1};
+add (2) g34.0<1>D g44.0<8,1,8>D g44.16<8,1,8>D {align1};
+add (2) g35.0<1>D g46.0<8,1,8>D g46.16<8,1,8>D {align1};
+add (2) g36.0<1>D g48.0<8,1,8>D g48.16<8,1,8>D {align1};
+add (2) g37.0<1>D g50.0<8,1,8>D g50.16<8,1,8>D {align1};
+add (2) g38.0<1>D g52.0<8,1,8>D g52.16<8,1,8>D {align1};
+add (2) g39.0<1>D g54.0<8,1,8>D g54.16<8,1,8>D {align1};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+dp4 (16) g40<1>D g[a0.0]<8,8,1>W g5<8,8,1>D {align1 compr};
+dp4 (16) g42<1>D g[a0.0]<8,8,1>W g7<8,8,1>D {align1 compr};
+dp4 (16) g44<1>D g[a0.0]<8,8,1>W g9<8,8,1>D {align1 compr};
+dp4 (16) g46<1>D g[a0.0]<8,8,1>W g11<8,8,1>D {align1 compr};
+dp4 (16) g48<1>D g[a0.0]<8,8,1>W g13<8,8,1>D {align1 compr};
+dp4 (16) g50<1>D g[a0.0]<8,8,1>W g15<8,8,1>D {align1 compr};
+dp4 (16) g52<1>D g[a0.0]<8,8,1>W g17<8,8,1>D {align1 compr};
+dp4 (16) g54<1>D g[a0.0]<8,8,1>W g19<8,8,1>D {align1 compr};
+add (2) g32.8<1>D g40.0<8,1,8>D g40.16<8,1,8>D {align1};
+add (2) g33.8<1>D g42.0<8,1,8>D g42.16<8,1,8>D {align1};
+add (2) g34.8<1>D g44.0<8,1,8>D g44.16<8,1,8>D {align1};
+add (2) g35.8<1>D g46.0<8,1,8>D g46.16<8,1,8>D {align1};
+add (2) g36.8<1>D g48.0<8,1,8>D g48.16<8,1,8>D {align1};
+add (2) g37.8<1>D g50.0<8,1,8>D g50.16<8,1,8>D {align1};
+add (2) g38.8<1>D g52.0<8,1,8>D g52.16<8,1,8>D {align1};
+add (2) g39.8<1>D g54.0<8,1,8>D g54.16<8,1,8>D {align1};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+dp4 (16) g40<1>D g[a0.0]<8,8,1>W g5<8,8,1>D {align1 compr};
+dp4 (16) g42<1>D g[a0.0]<8,8,1>W g7<8,8,1>D {align1 compr};
+dp4 (16) g44<1>D g[a0.0]<8,8,1>W g9<8,8,1>D {align1 compr};
+dp4 (16) g46<1>D g[a0.0]<8,8,1>W g11<8,8,1>D {align1 compr};
+dp4 (16) g48<1>D g[a0.0]<8,8,1>W g13<8,8,1>D {align1 compr};
+dp4 (16) g50<1>D g[a0.0]<8,8,1>W g15<8,8,1>D {align1 compr};
+dp4 (16) g52<1>D g[a0.0]<8,8,1>W g17<8,8,1>D {align1 compr};
+dp4 (16) g54<1>D g[a0.0]<8,8,1>W g19<8,8,1>D {align1 compr};
+add (2) g32.16<1>D g40.0<8,1,8>D g40.16<8,1,8>D {align1};
+add (2) g33.16<1>D g42.0<8,1,8>D g42.16<8,1,8>D {align1};
+add (2) g34.16<1>D g44.0<8,1,8>D g44.16<8,1,8>D {align1};
+add (2) g35.16<1>D g46.0<8,1,8>D g46.16<8,1,8>D {align1};
+add (2) g36.16<1>D g48.0<8,1,8>D g48.16<8,1,8>D {align1};
+add (2) g37.16<1>D g50.0<8,1,8>D g50.16<8,1,8>D {align1};
+add (2) g38.16<1>D g52.0<8,1,8>D g52.16<8,1,8>D {align1};
+add (2) g39.16<1>D g54.0<8,1,8>D g54.16<8,1,8>D {align1};
+
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00200020UD {align1};
+dp4 (16) g40<1>D g[a0.0]<8,8,1>W g5<8,8,1>D {align1 compr};
+dp4 (16) g42<1>D g[a0.0]<8,8,1>W g7<8,8,1>D {align1 compr};
+dp4 (16) g44<1>D g[a0.0]<8,8,1>W g9<8,8,1>D {align1 compr};
+dp4 (16) g46<1>D g[a0.0]<8,8,1>W g11<8,8,1>D {align1 compr};
+dp4 (16) g48<1>D g[a0.0]<8,8,1>W g13<8,8,1>D {align1 compr};
+dp4 (16) g50<1>D g[a0.0]<8,8,1>W g15<8,8,1>D {align1 compr};
+dp4 (16) g52<1>D g[a0.0]<8,8,1>W g17<8,8,1>D {align1 compr};
+dp4 (16) g54<1>D g[a0.0]<8,8,1>W g19<8,8,1>D {align1 compr};
+add (2) g32.24<1>D g40.0<8,1,8>D g40.16<8,1,8>D {align1};
+add (2) g33.24<1>D g42.0<8,1,8>D g42.16<8,1,8>D {align1};
+add (2) g34.24<1>D g44.0<8,1,8>D g44.16<8,1,8>D {align1};
+add (2) g35.24<1>D g46.0<8,1,8>D g46.16<8,1,8>D {align1};
+add (2) g36.24<1>D g48.0<8,1,8>D g48.16<8,1,8>D {align1};
+add (2) g37.24<1>D g50.0<8,1,8>D g50.16<8,1,8>D {align1};
+add (2) g38.24<1>D g52.0<8,1,8>D g52.16<8,1,8>D {align1};
+add (2) g39.24<1>D g54.0<8,1,8>D g54.16<8,1,8>D {align1};
+
+add (1) ip g126.0<1,1,1>UD 0x20UD {align1};            //jump back
diff --git a/shaders/mpeg2/vld/iq_intra.g4i b/shaders/mpeg2/vld/iq_intra.g4i
new file mode 100644 (file)
index 0000000..b014361
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * 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 in UB format
+           g3~g4:non intra IQ matrix in UB format
+           g5~g20:IDCT table
+   g32~g55:DCT data before IQ
+   g56~g79:DCT data after IQ
+   g82:    thread payload backup
+   g109:   g109.0:q_scale_code, g109.4:intra_dc_mult, 
+   g110:   q_scale_code
+   g111:   intra DC coefficient 
+   g112~g115: intra IQ matrix in UW format (in order to use instruction compress), copys from g1~g2
+   g125:   ip before jump
+*/
+and (1) g109.0<1>UW g82.8<1,1,1>UW 0x1fUW {align1};    //q_scale_code
+
+and (1) g109.4<1>UW g82.8<1,1,1>UW 0x6000UW {align1};   //intra_dc_presion
+shr (1) g109.4<1>UW g109.4<1,1,1>UW 13UW {align1};
+mov (1) g109.6<1>UW 0x8UW {align1};
+shr (1) g109.4<1>UW g109.6<1,1,1>UW g109.4<1,1,1>UW {align1};  //intra_dc_mult
+and.z (1) null g82.8<1,1,1>UW 0x20UW {align1};   //if(q_scale_type==0) q_scale=q_scale_code*2;
+(f0) jmpi Q_SCALE_TYPE_0;
+
+cmp.l (1) null g109.0<1,1,1>UW 9UW {align1};      //if(q_scale_type!=0) calculate q_scale
+(f0) jmpi DO_IQ;
+cmp.l (1) null g109.0<1,1,1>UW 17UW {align1};
+(f0) jmpi RANG_9_16;
+cmp.l (1) null g109.0<1,1,1>UW 25UW {align1};
+(f0) jmpi RANG_17_24;
+
+RANG_25_31:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -25W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 3UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 64UW {align1};
+jmpi DO_IQ;
+
+RANG_9_16:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -9W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 1UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 10UW {align1};
+jmpi DO_IQ;
+
+RANG_17_24:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -17W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 2UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 28UW {align1};
+jmpi DO_IQ;
+
+Q_SCALE_TYPE_0:
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 1UD {align1};
+
+DO_IQ:
+mov (1) g110.0<1>UW g109.0<1,1,1>UW {align1};
+
+mov (16) g112.0<1>UW g1.0<16,16,1>UB {align1};
+mov (16) g113.0<1>UW g1.16<16,16,1>UB {align1};
+mov (16) g114.0<1>UW g2.0<16,16,1>UB {align1};
+mov (16) g115.0<1>UW g2.16<16,16,1>UB {align1};
+
+mov (1) a0.0<1>UD 0x03F003E0UD {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g56.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g57.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g58.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g59.0<1>W g122.0<16,8,2>W {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g60.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g61.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g62.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g63.0<1>W g122.0<16,8,2>W {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g64.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g65.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g66.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g67.0<1>W g122.0<16,8,2>W {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g68.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g69.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g70.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g71.0<1>W g122.0<16,8,2>W {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g72.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g73.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g74.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g75.0<1>W g122.0<16,8,2>W {align1};
+
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_INTRA;
+mov (16) g76.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g77.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g78.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g79.0<1>W g122.0<16,8,2>W {align1};
+
diff --git a/shaders/mpeg2/vld/iq_non_intra.g4i b/shaders/mpeg2/vld/iq_non_intra.g4i
new file mode 100644 (file)
index 0000000..03c09aa
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * 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 in UB format
+           g3~g4:non intra IQ matrix in UB format
+           g5~g20:IDCT table
+   g32~g55:DCT data before IQ
+   g56~g79:DCT data after IQ
+   g82:    thread payload backup
+   g109:   q_scale_code
+   g110:   q_scale_code
+   g112~g115: non intra IQ matrix in UW format (in order to use instruction compress), copys from g3~g4
+   g125:   ip before jump
+*/
+and (1) g109.0<1>UW g82.8<1,1,1>UW 0x1fUW {align1}; //q_scale_code
+
+and.z (1) null g82.8<1,1,1>UW 0x20UW {align1};   //if(q_scale_type==0) q_scale=q_scale_code*2;
+(f0) jmpi Q_SCALE_TYPE_0;
+
+cmp.l (1) null g109.0<1,1,1>UW 9UW {align1};      //if(q_scale_type!=0) calculate q_scale
+(f0) jmpi DO_IQ;
+cmp.l (1) null g109.0<1,1,1>UW 17UW {align1};
+(f0) jmpi RANG_9_16;
+cmp.l (1) null g109.0<1,1,1>UW 25UW {align1};
+(f0) jmpi RANG_17_24;
+
+RANG_25_31:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -25W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 3UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 64UW {align1};
+jmpi DO_IQ;
+
+RANG_9_16:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -9W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 1UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 10UW {align1};
+jmpi DO_IQ;
+
+RANG_17_24:
+add (1) g109.0<1>UW g109.0<1,1,1>UW -17W {align1};
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 2UW {align1};
+add (1) g109.0<1>UW g109.0<1,1,1>UW 28UW {align1};
+jmpi DO_IQ;
+
+Q_SCALE_TYPE_0:
+shl (1) g109.0<1>UW g109.0<1,1,1>UW 1UD {align1};
+
+DO_IQ:
+mov (1) g110.0<1>UW g109.0<1,1,1>UW {align1};
+
+mov (16) g112.0<1>UW g3.0<16,16,1>UB {align1};
+mov (16) g113.0<1>UW g3.16<16,16,1>UB {align1};
+mov (16) g114.0<1>UW g4.0<16,16,1>UB {align1};
+mov (16) g115.0<1>UW g4.16<16,16,1>UB {align1};
+
+mov (1) a0.0<1>UD 0x03F003E0UD {align1};
+
+//Y0
+iq_non_intra_y0:
+and.z (1) null g82.8<1,1,1>UW 0x800UW {align1};
+(f0) jmpi iq_non_intra_y1;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g56.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g57.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g58.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g59.0<1>W g122.0<16,8,2>W {align1};
+
+//Y1
+iq_non_intra_y1:
+and.z (1) null g82.8<1,1,1>UW 0x400UW {align1};
+(f0) jmpi iq_non_intra_y2;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g60.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g61.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g62.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g63.0<1>W g122.0<16,8,2>W {align1};
+
+//Y2
+iq_non_intra_y2:
+and.z (1) null g82.8<1,1,1>UW 0x200UW {align1};
+(f0) jmpi iq_non_intra_y3;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g64.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g65.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g66.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g67.0<1>W g122.0<16,8,2>W {align1};
+
+//Y3
+iq_non_intra_y3:
+and.z (1) null g82.8<1,1,1>UW 0x100UW {align1};
+(f0) jmpi iq_non_intra_u;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g68.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g69.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g70.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g71.0<1>W g122.0<16,8,2>W {align1};
+
+//U
+iq_non_intra_u:
+and.z (1) null g82.8<1,1,1>UW 0x80UW {align1};
+(f0) jmpi iq_non_intra_v;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g72.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g73.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g74.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g75.0<1>W g122.0<16,8,2>W {align1};
+
+//V
+iq_non_intra_v:
+and.z (1) null g82.8<1,1,1>UW 0x40UW {align1};
+(f0) jmpi iq_non_intra_end;
+mov (1) g125.0<1>UD ip {align1};
+jmpi DO_IQ_NON_INTRA;
+mov (16) g76.0<1>W g116.0<16,8,2>W {align1};
+mov (16) g77.0<1>W g118.0<16,8,2>W {align1};
+mov (16) g78.0<1>W g120.0<16,8,2>W {align1};
+mov (16) g79.0<1>W g122.0<16,8,2>W {align1};
+
+iq_non_intra_end:
diff --git a/shaders/mpeg2/vld/lib.g4a b/shaders/mpeg2/vld/lib.g4a
new file mode 100644 (file)
index 0000000..567caaf
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * 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 in UB format
+           g3~g4:non intra IQ matrix in UB format
+           g5~g20:IDCT table
+   g32~g55:DCT data before IQ
+   g56~g79:DCT data after IQ
+   g83~g106: IDCT data after idct
+   g82:    thread payload backup
+   g125:   ip before jump
+*/
+include(`iq_non_intra.g4i')
+
+define(`ROW_SHIFT', `11UD') //define for idct
+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,the start of DCT data)
+
+//Y0
+and.nz (1) null g82.8<1,1,1>UW 0x800UW {align1};
+(f0) jmpi do_idct_y0;
+
+mov (8) g83.0<1>UW 0UW {align1}; 
+mov (8) g84.0<1>UW 0UW {align1}; 
+mov (8) g85.0<1>UW 0UW {align1}; 
+mov (8) g86.0<1>UW 0UW {align1}; 
+mov (8) g87.0<1>UW 0UW {align1}; 
+mov (8) g88.0<1>UW 0UW {align1}; 
+mov (8) g89.0<1>UW 0UW {align1}; 
+mov (8) g90.0<1>UW 0UW {align1}; 
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00800080UD {align1};
+jmpi block_y1;
+do_idct_y0:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (8) g83.0<1>W g32.0<16,8,2>W {align1};
+mov (8) g84.0<1>W g33.0<16,8,2>W {align1};
+mov (8) g85.0<1>W g34.0<16,8,2>W {align1};
+mov (8) g86.0<1>W g35.0<16,8,2>W {align1};
+mov (8) g87.0<1>W g36.0<16,8,2>W {align1};
+mov (8) g88.0<1>W g37.0<16,8,2>W {align1};
+mov (8) g89.0<1>W g38.0<16,8,2>W {align1};
+mov (8) g90.0<1>W g39.0<16,8,2>W {align1};
+
+//Y1
+block_y1:
+and.nz (1) null g82.8<1,1,1>UW 0x400UW {align1};
+(f0) jmpi do_idct_y1;
+mov (8) g83.16<1>UW 0UW {align1}; 
+mov (8) g84.16<1>UW 0UW {align1}; 
+mov (8) g85.16<1>UW 0UW {align1}; 
+mov (8) g86.16<1>UW 0UW {align1}; 
+mov (8) g87.16<1>UW 0UW {align1}; 
+mov (8) g88.16<1>UW 0UW {align1}; 
+mov (8) g89.16<1>UW 0UW {align1}; 
+mov (8) g90.16<1>UW 0UW {align1}; 
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00800080UD {align1};
+jmpi block_y2;
+do_idct_y1:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (8) g83.16<1>W g32.0<16,8,2>W {align1};
+mov (8) g84.16<1>W g33.0<16,8,2>W {align1};
+mov (8) g85.16<1>W g34.0<16,8,2>W {align1};
+mov (8) g86.16<1>W g35.0<16,8,2>W {align1};
+mov (8) g87.16<1>W g36.0<16,8,2>W {align1};
+mov (8) g88.16<1>W g37.0<16,8,2>W {align1};
+mov (8) g89.16<1>W g38.0<16,8,2>W {align1};
+mov (8) g90.16<1>W g39.0<16,8,2>W {align1};
+
+//Y2
+block_y2:
+and.nz (1) null g82.8<1,1,1>UW 0x200UW {align1};
+(f0) jmpi do_idct_y2;
+mov (8) g91.0<1>UW 0UW {align1}; 
+mov (8) g92.0<1>UW 0UW {align1}; 
+mov (8) g93.0<1>UW 0UW {align1}; 
+mov (8) g94.0<1>UW 0UW {align1}; 
+mov (8) g95.0<1>UW 0UW {align1}; 
+mov (8) g96.0<1>UW 0UW {align1}; 
+mov (8) g97.0<1>UW 0UW {align1}; 
+mov (8) g98.0<1>UW 0UW {align1}; 
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00800080UD {align1};
+jmpi block_y3;
+do_idct_y2:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (8) g91.0<1>W g32.0<16,8,2>W {align1};
+mov (8) g92.0<1>W g33.0<16,8,2>W {align1};
+mov (8) g93.0<1>W g34.0<16,8,2>W {align1};
+mov (8) g94.0<1>W g35.0<16,8,2>W {align1};
+mov (8) g95.0<1>W g36.0<16,8,2>W {align1};
+mov (8) g96.0<1>W g37.0<16,8,2>W {align1};
+mov (8) g97.0<1>W g38.0<16,8,2>W {align1};
+mov (8) g98.0<1>W g39.0<16,8,2>W {align1};
+
+//Y3
+block_y3:
+and.nz (1) null g82.8<1,1,1>UW 0x100UW {align1};
+(f0) jmpi do_idct_y3;
+mov (8) g91.16<1>UW 0UW {align1}; 
+mov (8) g92.16<1>UW 0UW {align1}; 
+mov (8) g93.16<1>UW 0UW {align1}; 
+mov (8) g94.16<1>UW 0UW {align1}; 
+mov (8) g95.16<1>UW 0UW {align1}; 
+mov (8) g96.16<1>UW 0UW {align1}; 
+mov (8) g97.16<1>UW 0UW {align1}; 
+mov (8) g98.16<1>UW 0UW {align1}; 
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00800080UD {align1};
+jmpi block_u;
+do_idct_y3:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (8) g91.16<1>W g32.0<16,8,2>W {align1};
+mov (8) g92.16<1>W g33.0<16,8,2>W {align1};
+mov (8) g93.16<1>W g34.0<16,8,2>W {align1};
+mov (8) g94.16<1>W g35.0<16,8,2>W {align1};
+mov (8) g95.16<1>W g36.0<16,8,2>W {align1};
+mov (8) g96.16<1>W g37.0<16,8,2>W {align1};
+mov (8) g97.16<1>W g38.0<16,8,2>W {align1};
+mov (8) g98.16<1>W g39.0<16,8,2>W {align1};
+
+//U
+block_u:
+and.nz (1) null g82.8<1,1,1>UW 0x80UW {align1};
+(f0) jmpi do_idct_u;
+mov (16) g99.0<1>UW 0UW {align1}; 
+mov (16) g100.0<1>UW 0UW {align1}; 
+mov (16) g101.0<1>UW 0UW {align1}; 
+mov (16) g102.0<1>UW 0UW {align1}; 
+add (1) a0.0<1>UD a0.0<1,1,1>UD 0x00800080UD {align1};
+jmpi block_v;
+do_idct_u:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (16) g99.0<1>W g32.0<16,8,2>W {align1};
+mov (16) g100.0<1>W g34.0<16,8,2>W {align1};
+mov (16) g101.0<1>W g36.0<16,8,2>W {align1};
+mov (16) g102.0<1>W g38.0<16,8,2>W {align1};
+
+//V
+block_v:
+and.nz (1) null g82.8<1,1,1>UW 0x40UW {align1};
+(f0) jmpi do_idct_v;
+mov (16) g103.0<1>UW 0UW {align1}; 
+mov (16) g104.0<1>UW 0UW {align1}; 
+mov (16) g105.0<1>UW 0UW {align1}; 
+mov (16) g106.0<1>UW 0UW {align1};  
+jmpi block_end;
+do_idct_v:
+mov (1) g125.0<1>UD ip {align1};
+jmpi IDCT_START;
+mov (16) g103.0<1>W g32.0<16,8,2>W {align1};
+mov (16) g104.0<1>W g34.0<16,8,2>W {align1};
+mov (16) g105.0<1>W g36.0<16,8,2>W {align1};
+mov (16) g106.0<1>W g38.0<16,8,2>W {align1};
+block_end:
+
+add (1) ip g126.8<1,1,1>UD 0x20UD {align1};            //jump back
+include(`do_iq_non_intra.g4i')
+include(`idct.g4i')
diff --git a/shaders/mpeg2/vld/lib.g4b b/shaders/mpeg2/vld/lib.g4b
new file mode 100644 (file)
index 0000000..262bff9
--- /dev/null
@@ -0,0 +1,307 @@
+   { 0x00000005, 0x2da02d29, 0x00210a48, 0x001f001f },
+   { 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, 0x00b10060, 0x00000000 },
+   { 0x00800001, 0x2e200229, 0x00b10070, 0x00000000 },
+   { 0x00800001, 0x2e400229, 0x00b10080, 0x00000000 },
+   { 0x00800001, 0x2e600229, 0x00b10090, 0x00000000 },
+   { 0x00000001, 0x22000060, 0x00000000, 0x03f003e0 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x08000800 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x000000a1 },
+   { 0x00800001, 0x270001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x272001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x274001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x276001ad, 0x00ae0f40, 0x00000000 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x04000400 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000099 },
+   { 0x00800001, 0x278001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x27a001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x27c001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x27e001ad, 0x00ae0f40, 0x00000000 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x02000200 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000091 },
+   { 0x00800001, 0x280001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x282001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x284001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x286001ad, 0x00ae0f40, 0x00000000 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x01000100 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000089 },
+   { 0x00800001, 0x288001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x28a001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x28c001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x28e001ad, 0x00ae0f40, 0x00000000 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x00800080 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000081 },
+   { 0x00800001, 0x290001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x292001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x294001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x296001ad, 0x00ae0f40, 0x00000000 },
+   { 0x01000005, 0x20002d3c, 0x00210a48, 0x00400040 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000079 },
+   { 0x00800001, 0x298001ad, 0x00ae0e80, 0x00000000 },
+   { 0x00800001, 0x29a001ad, 0x00ae0ec0, 0x00000000 },
+   { 0x00800001, 0x29c001ad, 0x00ae0f00, 0x00000000 },
+   { 0x00800001, 0x29e001ad, 0x00ae0f40, 0x00000000 },
+   { 0x00000001, 0x22000060, 0x00000000, 0x06f006e0 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x08000800 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00600001, 0x2a600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2a800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2aa00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2ac00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2ae00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b400169, 0x00000000, 0x00000000 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00800080 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000077 },
+   { 0x00600001, 0x2a6001ad, 0x00ae0400, 0x00000000 },
+   { 0x00600001, 0x2a8001ad, 0x00ae0420, 0x00000000 },
+   { 0x00600001, 0x2aa001ad, 0x00ae0440, 0x00000000 },
+   { 0x00600001, 0x2ac001ad, 0x00ae0460, 0x00000000 },
+   { 0x00600001, 0x2ae001ad, 0x00ae0480, 0x00000000 },
+   { 0x00600001, 0x2b0001ad, 0x00ae04a0, 0x00000000 },
+   { 0x00600001, 0x2b2001ad, 0x00ae04c0, 0x00000000 },
+   { 0x00600001, 0x2b4001ad, 0x00ae04e0, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x04000400 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00600001, 0x2a700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2a900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2ab00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2ad00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2af00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b500169, 0x00000000, 0x00000000 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00800080 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000061 },
+   { 0x00600001, 0x2a7001ad, 0x00ae0400, 0x00000000 },
+   { 0x00600001, 0x2a9001ad, 0x00ae0420, 0x00000000 },
+   { 0x00600001, 0x2ab001ad, 0x00ae0440, 0x00000000 },
+   { 0x00600001, 0x2ad001ad, 0x00ae0460, 0x00000000 },
+   { 0x00600001, 0x2af001ad, 0x00ae0480, 0x00000000 },
+   { 0x00600001, 0x2b1001ad, 0x00ae04a0, 0x00000000 },
+   { 0x00600001, 0x2b3001ad, 0x00ae04c0, 0x00000000 },
+   { 0x00600001, 0x2b5001ad, 0x00ae04e0, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x02000200 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00600001, 0x2b600169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b800169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2ba00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2bc00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2be00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c000169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c200169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c400169, 0x00000000, 0x00000000 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00800080 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000004b },
+   { 0x00600001, 0x2b6001ad, 0x00ae0400, 0x00000000 },
+   { 0x00600001, 0x2b8001ad, 0x00ae0420, 0x00000000 },
+   { 0x00600001, 0x2ba001ad, 0x00ae0440, 0x00000000 },
+   { 0x00600001, 0x2bc001ad, 0x00ae0460, 0x00000000 },
+   { 0x00600001, 0x2be001ad, 0x00ae0480, 0x00000000 },
+   { 0x00600001, 0x2c0001ad, 0x00ae04a0, 0x00000000 },
+   { 0x00600001, 0x2c2001ad, 0x00ae04c0, 0x00000000 },
+   { 0x00600001, 0x2c4001ad, 0x00ae04e0, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x01000100 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00600001, 0x2b700169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2b900169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2bb00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2bd00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2bf00169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c100169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c300169, 0x00000000, 0x00000000 },
+   { 0x00600001, 0x2c500169, 0x00000000, 0x00000000 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00800080 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000035 },
+   { 0x00600001, 0x2b7001ad, 0x00ae0400, 0x00000000 },
+   { 0x00600001, 0x2b9001ad, 0x00ae0420, 0x00000000 },
+   { 0x00600001, 0x2bb001ad, 0x00ae0440, 0x00000000 },
+   { 0x00600001, 0x2bd001ad, 0x00ae0460, 0x00000000 },
+   { 0x00600001, 0x2bf001ad, 0x00ae0480, 0x00000000 },
+   { 0x00600001, 0x2c1001ad, 0x00ae04a0, 0x00000000 },
+   { 0x00600001, 0x2c3001ad, 0x00ae04c0, 0x00000000 },
+   { 0x00600001, 0x2c5001ad, 0x00ae04e0, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x00800080 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00800001, 0x2c600169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2c800169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2ca00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2cc00169, 0x00000000, 0x00000000 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00800080 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000023 },
+   { 0x00800001, 0x2c6001ad, 0x00ae0400, 0x00000000 },
+   { 0x00800001, 0x2c8001ad, 0x00ae0440, 0x00000000 },
+   { 0x00800001, 0x2ca001ad, 0x00ae0480, 0x00000000 },
+   { 0x00800001, 0x2cc001ad, 0x00ae04c0, 0x00000000 },
+   { 0x02000005, 0x20002d3c, 0x00210a48, 0x00400040 },
+   { 0x00010020, 0x34001c00, 0x00001400, 0x00000005 },
+   { 0x00800001, 0x2ce00169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2d000169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2d200169, 0x00000000, 0x00000000 },
+   { 0x00800001, 0x2d400169, 0x00000000, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 },
+   { 0x00000001, 0x2fa00001, 0x00001400, 0x00000000 },
+   { 0x00000020, 0x34001c00, 0x00001400, 0x00000016 },
+   { 0x00800001, 0x2ce001ad, 0x00ae0400, 0x00000000 },
+   { 0x00800001, 0x2d0001ad, 0x00ae0440, 0x00000000 },
+   { 0x00800001, 0x2d2001ad, 0x00ae0480, 0x00000000 },
+   { 0x00800001, 0x2d4001ad, 0x00ae04c0, 0x00000000 },
+   { 0x00000040, 0x34000c20, 0x00210fc8, 0x00000020 },
+   { 0x00000040, 0x22000c00, 0x00210200, 0x00200020 },
+   { 0x00802041, 0x2e8025a5, 0x008d8000, 0x008d0e00 },
+   { 0x00802041, 0x2e8024a5, 0x008d0e80, 0x008c0da0 },
+   { 0x0080200c, 0x2e802ca5, 0x008d0e80, 0x00040004 },
+   { 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/shaders/mpeg2/vld/motion_field_uv.g4i b/shaders/mpeg2/vld/motion_field_uv.g4i
new file mode 100644 (file)
index 0000000..4598c85
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * 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 1W {align1};       
+       (f0) jmpi L1;
+       and.z (1) null mv2<1,1,1>W 1W {align1};       
+       (f0) jmpi L2;
+       include(`read_field_x1y1_uv.g4i')
+       jmpi L5;
+L2:
+       include(`read_field_x1y0_uv.g4i')
+       jmpi L5;
+L1:
+       and.z (1) null mv2<1,1,1>W 1W {align1};       
+       (f0) jmpi L4;
+       include(`read_field_x0y1_uv.g4i')
+       jmpi L5;
+L4:
+       include(`read_field_x0y0_uv.g4i')
+L5:
+
diff --git a/shaders/mpeg2/vld/motion_field_y.g4i b/shaders/mpeg2/vld/motion_field_y.g4i
new file mode 100644 (file)
index 0000000..47d2ec4
--- /dev/null
@@ -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(`read_field_x1y1_y.g4i')
+       jmpi L5;
+L2:
+       include(`read_field_x1y0_y.g4i')
+       jmpi L5;
+L1:
+       and.z (1) null mv2<1,1,1>W 1UW {align1};        
+       (f0) jmpi L4;
+       include(`read_field_x0y1_y.g4i')
+       jmpi L5;
+L4:
+       include(`read_field_x0y0_y.g4i')
+L5:
diff --git a/shaders/mpeg2/vld/motion_frame_uv.g4i b/shaders/mpeg2/vld/motion_frame_uv.g4i
new file mode 100644 (file)
index 0000000..00a5f2b
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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>UW 2UD {align1};       
+       (f0) jmpi LL1;
+       and.z (1) null mv2<1,1,1>UW 2UD {align1};       
+       (f0) jmpi LL2;
+       include(`read_frame_x1y1_uv.g4i')
+       jmpi LL5;
+LL2:
+       include(`read_frame_x1y0_uv.g4i')
+       jmpi LL5;
+LL1:
+       and.z (1) null mv2<1,1,1>UW 2UD {align1};       
+       (f0) jmpi LL4;
+       include(`read_frame_x0y1_uv.g4i')
+       jmpi LL5;
+LL4:
+       include(`read_frame_x0y0_uv.g4i')
+LL5:
diff --git a/shaders/mpeg2/vld/motion_frame_y.g4i b/shaders/mpeg2/vld/motion_frame_y.g4i
new file mode 100644 (file)
index 0000000..88c8085
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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>
+ */  
+/* if (motion_vect.x & 1) {
+ *   if (motion_vect.y & 1)
+ *      half_pixel in x and y;
+ *   else
+ *      half_pixel in x;
+ * } else {
+ *     if (motion_vect.y & 1) 
+ *       half_pixel y;
+ *     else
+ *       full_pixel_read;      
+ * }    
+ */
+
+       and.z (1) null mv1<1,1,1>UW 1UD {align1};       
+       (f0) jmpi LL1;
+       and.z (1) null mv2<1,1,1>UW 1UD {align1};       
+       (f0) jmpi LL2;
+       include(`read_frame_x1y1_y.g4i') 
+       jmpi LL5;
+LL2: 
+       include(`read_frame_x1y0_y.g4i') 
+       jmpi LL5;
+LL1: 
+       and.z (1) null mv2<1,1,1>UW 1UD {align1};       
+       (f0) jmpi LL4;
+       include(`read_frame_x0y1_y.g4i')
+       jmpi LL5;
+LL4:
+       include(`read_frame_x0y0_y.g4i')
+LL5:
+
diff --git a/shaders/mpeg2/vld/null.g4a b/shaders/mpeg2/vld/null.g4a
new file mode 100644 (file)
index 0000000..1e1dcea
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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>
+ *
+ */
+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};
+//mov (16) m1<1>UD g1.0<16,8,1>UD {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/shaders/mpeg2/vld/read_field_x0y0_uv.g4i b/shaders/mpeg2/vld/read_field_x0y0_uv.g4i
new file mode 100644 (file)
index 0000000..36e589a
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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) g115.8<1>UD 0x7000FUD {align1}; // 8*16/32=4
+send (16) 0 g40.0<1>UW g115<16,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g45.0<1>UW g115<16,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+
+mov (16) g32.0<1>UW g40.0<16,8,1>UB {align1};
+mov (16) g33.0<1>UW g41.0<16,8,1>UB {align1};
+mov (16) g34.0<1>UW g42.0<16,8,1>UB {align1};
+mov (16) g35.0<1>UW g43.0<16,8,1>UB {align1};
+mov (16) g36.0<1>UW g45.0<16,8,1>UB {align1};
+mov (16) g37.0<1>UW g46.0<16,8,1>UB {align1};
+mov (16) g38.0<1>UW g47.0<16,8,1>UB {align1};
+mov (16) g39.0<1>UW g48.0<16,8,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x0y0_y.g4i b/shaders/mpeg2/vld/read_field_x0y0_y.g4i
new file mode 100644 (file)
index 0000000..e549598
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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) g115.8<1>UD 0x01FUD {align1};
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g42.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g46.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+mov (1) g115.8<1>UD 0x07001FUD {align1};
+send (16) 0 g48.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+
+mov (16) g32.0<1>UW g40.0<16,16,1>UB {align1};
+mov (16) g33.0<1>UW g42.0<16,16,1>UB {align1};
+mov (16) g34.0<1>UW g44.0<16,16,1>UB {align1};
+mov (16) g35.0<1>UW g46.0<16,16,1>UB {align1};
+mov (16) g36.0<1>UW g48.0<16,16,1>UB {align1};
+mov (16) g37.0<1>UW g50.0<16,16,1>UB {align1};
+mov (16) g38.0<1>UW g52.0<16,16,1>UB {align1};
+mov (16) g39.0<1>UW g54.0<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x0y1_uv.g4i b/shaders/mpeg2/vld/read_field_x0y1_uv.g4i
new file mode 100644 (file)
index 0000000..ac8030b
--- /dev/null
@@ -0,0 +1,28 @@
+/* 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) g115.8<1>UD 0x07000FUD {align1}; // 8*16/32=4
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g45.0<1>UW g115<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+mov (1) g115.8<1>UD 0xFUD {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 8UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g49.0<1>UW g115<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+
+avg (16) g32.0<1>UW g40.0<16,8,1>UB g41.0<16,8,1>UB {align1};
+avg (16) g33.0<1>UW g41.0<16,8,1>UB g42.0<16,8,1>UB {align1};
+avg (16) g34.0<1>UW g42.0<16,8,1>UB g43.0<16,8,1>UB {align1};
+avg (16) g35.0<1>UW g43.0<16,8,1>UB g44.0<16,8,1>UB {align1};
+
+avg (16) g36.0<1>UW g45.0<16,8,1>UB g46.0<16,8,1>UB {align1};
+avg (16) g37.0<1>UW g46.0<16,8,1>UB g47.0<16,8,1>UB {align1};
+avg (16) g38.0<1>UW g47.0<16,8,1>UB g48.0<16,8,1>UB {align1};
+avg (16) g39.0<1>UW g48.0<16,8,1>UB g49.0<16,8,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x0y1_y.g4i b/shaders/mpeg2/vld/read_field_x0y1_y.g4i
new file mode 100644 (file)
index 0000000..7a7909f
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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) g115.8<1>UD 0x01FUD {align1};
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g42.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g46.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+mov (1) g115.8<1>UD 0x07001FUD {align1};
+send (16) 0 g48.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 8UD {align1};
+mov (1) g115.8<1>UD 0x1FUD {align1};
+send (16) 0 g56.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+
+avg.sat (16) g32.0<1>UW g40.0<16,16,1>UB g42.0<16,16,1>UB {align1};
+avg.sat (16) g33.0<1>UW g42.0<16,16,1>UB g44.0<16,16,1>UB {align1};
+avg.sat (16) g34.0<1>UW g44.0<16,16,1>UB g46.0<16,16,1>UB {align1};
+avg.sat (16) g35.0<1>UW g46.0<16,16,1>UB g48.0<16,16,1>UB {align1};
+avg.sat (16) g36.0<1>UW g48.0<16,16,1>UB g50.0<16,16,1>UB {align1};
+avg.sat (16) g37.0<1>UW g50.0<16,16,1>UB g52.0<16,16,1>UB {align1};
+avg.sat (16) g38.0<1>UW g52.0<16,16,1>UB g54.0<16,16,1>UB {align1};
+avg.sat (16) g39.0<1>UW g54.0<16,16,1>UB g56.0<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x1y0_uv.g4i b/shaders/mpeg2/vld/read_field_x1y0_uv.g4i
new file mode 100644 (file)
index 0000000..4c36438
--- /dev/null
@@ -0,0 +1,24 @@
+/* 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) g115.8<1>UD 0x07000FUD {align1}; // 8*16/32=4
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+
+avg (16) g32.0<1>UW g40.0<16,8,1>UB g40.1<16,8,1>UB {align1};
+avg (16) g33.0<1>UW g41.0<16,8,1>UB g41.1<16,8,1>UB {align1};
+avg (16) g34.0<1>UW g42.0<16,8,1>UB g42.1<16,8,1>UB {align1};
+avg (16) g35.0<1>UW g43.0<16,8,1>UB g43.1<16,8,1>UB {align1};
+
+avg (16) g36.0<1>UW g44.0<16,8,1>UB g44.1<16,8,1>UB {align1};
+avg (16) g37.0<1>UW g45.0<16,8,1>UB g45.1<16,8,1>UB {align1};
+avg (16) g38.0<1>UW g46.0<16,8,1>UB g46.1<16,8,1>UB {align1};
+avg (16) g39.0<1>UW g47.0<16,8,1>UB g47.1<16,8,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x1y0_y.g4i b/shaders/mpeg2/vld/read_field_x1y0_y.g4i
new file mode 100644 (file)
index 0000000..c8ff505
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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) g115.8<1>UD 0x01FUD {align1};
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g42.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g46.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+mov (1) g115.8<1>UD 0x07001FUD {align1};
+send (16) 0 g48.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+
+avg.sat (16) g32.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+avg.sat (16) g33.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+avg.sat (16) g34.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+avg.sat (16) g35.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+avg.sat (16) g36.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+avg.sat (16) g37.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+avg.sat (16) g38.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+avg.sat (16) g39.0<1>UW g54.0<16,16,1>UB g54.1<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_field_x1y1_uv.g4i b/shaders/mpeg2/vld/read_field_x1y1_uv.g4i
new file mode 100644 (file)
index 0000000..816dd72
--- /dev/null
@@ -0,0 +1,53 @@
+/* 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) g115.8<1>UD 0x07000FUD {align1};
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 4 {align1};//U
+send (16) 0 g45.0<1>UW g115<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 4 {align1};//V
+mov (1) g115.8<1>UD 0x01000FUD {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 8UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface_u, 2, 0, 2) mlen 1 rlen 1 {align1};//U
+send (16) 0 g49.0<1>UW g115<8,8,1>UW read(surface_v, 2, 0, 2) mlen 1 rlen 1 {align1};//V
+//U
+add (16) g32.0<1>UW g40.0<16,8,1>UB g41.0<16,8,1>UB {align1};
+add (16) g33.0<1>UW g41.0<16,8,1>UB g42.0<16,8,1>UB {align1};
+add (16) g34.0<1>UW g42.0<16,8,1>UB g43.0<16,8,1>UB {align1};
+add (16) g35.0<1>UW g43.0<16,8,1>UB g44.0<16,8,1>UB {align1};
+
+add (16) g32.0<1>UW g32.0<16,8,1>UW g40.1<16,8,1>UB {align1};
+add (16) g33.0<1>UW g33.0<16,8,1>UW g41.1<16,8,1>UB {align1};
+add (16) g34.0<1>UW g34.0<16,8,1>UW g42.1<16,8,1>UB {align1};
+add (16) g35.0<1>UW g35.0<16,8,1>UW g43.1<16,8,1>UB {align1};
+
+add (16) g32.0<1>UW g32.0<16,8,1>UW g41.1<16,8,1>UB {align1};
+add (16) g33.0<1>UW g33.0<16,8,1>UW g42.1<16,8,1>UB {align1};
+add (16) g34.0<1>UW g34.0<16,8,1>UW g43.1<16,8,1>UB {align1};
+add (16) g35.0<1>UW g35.0<16,8,1>UW g44.1<16,8,1>UB {align1};
+//V
+add (16) g36.0<1>UW g45.0<16,8,1>UB g46.0<16,8,1>UB {align1};
+add (16) g37.0<1>UW g46.0<16,8,1>UB g47.0<16,8,1>UB {align1};
+add (16) g38.0<1>UW g47.0<16,8,1>UB g48.0<16,8,1>UB {align1};
+add (16) g39.0<1>UW g48.0<16,8,1>UB g49.0<16,8,1>UB {align1};
+
+add (16) g36.0<1>UW g36.0<16,8,1>UW g45.1<16,8,1>UB {align1};
+add (16) g37.0<1>UW g37.0<16,8,1>UW g46.1<16,8,1>UB {align1};
+add (16) g38.0<1>UW g38.0<16,8,1>UW g47.1<16,8,1>UB {align1};
+add (16) g39.0<1>UW g39.0<16,8,1>UW g48.1<16,8,1>UB {align1};
+
+add (16) g36.0<1>UW g36.0<16,8,1>UW g46.1<16,8,1>UB {align1};
+add (16) g37.0<1>UW g37.0<16,8,1>UW g47.1<16,8,1>UB {align1};
+add (16) g38.0<1>UW g38.0<16,8,1>UW g48.1<16,8,1>UB {align1};
+add (16) g39.0<1>UW g39.0<16,8,1>UW g49.1<16,8,1>UB {align1};
+
+shr (32) g32.0<1>UW g32.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g34.0<1>UW g34.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g36.0<1>UW g36.0<16,16,1>UW 2UW {align1 compr};
+shr (32) g38.0<1>UW g38.0<16,16,1>UW 2UW {align1 compr};
+
diff --git a/shaders/mpeg2/vld/read_field_x1y1_y.g4i b/shaders/mpeg2/vld/read_field_x1y1_y.g4i
new file mode 100644 (file)
index 0000000..dcc9ebf
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * 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) g115.8<1>UD 0x01FUD {align1};
+send (16) 0 g40.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g42.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g44.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+send (16) 0 g46.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 2UD {align1};
+mov (1) g115.8<1>UD 0x07001FUD {align1};
+send (16) 0 g48.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 8 {align1};
+add (1) g115.4<1>UD g115.4<1,1,1>UD 8UD {align1};
+mov (1) g115.8<1>UD 0x1FUD {align1};
+send (16) 0 g56.0<1>UW g115<8,8,1>UW read(surface,2,0,2) mlen 1 rlen 1 {align1};
+
+add (16) g32.0<1>UW g40.0<16,16,1>UB g42.0<16,16,1>UB {align1};
+add (16) g33.0<1>UW g42.0<16,16,1>UB g44.0<16,16,1>UB {align1};
+add (16) g34.0<1>UW g44.0<16,16,1>UB g46.0<16,16,1>UB {align1};
+add (16) g35.0<1>UW g46.0<16,16,1>UB g48.0<16,16,1>UB {align1};
+add (16) g36.0<1>UW g48.0<16,16,1>UB g50.0<16,16,1>UB {align1};
+add (16) g37.0<1>UW g50.0<16,16,1>UB g52.0<16,16,1>UB {align1};
+add (16) g38.0<1>UW g52.0<16,16,1>UB g54.0<16,16,1>UB {align1};
+add (16) g39.0<1>UW g54.0<16,16,1>UB g56.0<16,16,1>UB {align1};
+
+add (16) g32.0<1>UW g32.0<16,16,1>UW g40.1<16,16,1>UB {align1};
+add (16) g33.0<1>UW g33.0<16,16,1>UW g42.1<16,16,1>UB {align1};
+add (16) g34.0<1>UW g34.0<16,16,1>UW g44.1<16,16,1>UB {align1};
+add (16) g35.0<1>UW g35.0<16,16,1>UW g46.1<16,16,1>UB {align1};
+add (16) g36.0<1>UW g36.0<16,16,1>UW g48.1<16,16,1>UB {align1};
+add (16) g37.0<1>UW g37.0<16,16,1>UW g50.1<16,16,1>UB {align1};
+add (16) g38.0<1>UW g38.0<16,16,1>UW g52.1<16,16,1>UB {align1};
+add (16) g39.0<1>UW g39.0<16,16,1>UW g54.1<16,16,1>UB {align1};
+
+add (16) g32.0<1>UW g32.0<16,16,1>UW g42.1<16,16,1>UB {align1};
+add (16) g33.0<1>UW g33.0<16,16,1>UW g44.1<16,16,1>UB {align1};
+add (16) g34.0<1>UW g34.0<16,16,1>UW g46.1<16,16,1>UB {align1};
+add (16) g35.0<1>UW g35.0<16,16,1>UW g48.1<16,16,1>UB {align1};
+add (16) g36.0<1>UW g36.0<16,16,1>UW g50.1<16,16,1>UB {align1};
+add (16) g37.0<1>UW g37.0<16,16,1>UW g52.1<16,16,1>UB {align1};
+add (16) g38.0<1>UW g38.0<16,16,1>UW g54.1<16,16,1>UB {align1};
+add (16) g39.0<1>UW g39.0<16,16,1>UW g56.1<16,16,1>UB {align1};
+
+shr (16) g32.0<1>UW g32.0<16,16,1>UW 2UW {align1};
+shr (16) g33.0<1>UW g33.0<16,16,1>UW 2UW {align1};
+shr (16) g34.0<1>UW g34.0<16,16,1>UW 2UW {align1};
+shr (16) g35.0<1>UW g35.0<16,16,1>UW 2UW {align1};
+shr (16) g36.0<1>UW g36.0<16,16,1>UW 2UW {align1};
+shr (16) g37.0<1>UW g37.0<16,16,1>UW 2UW {align1};
+shr (16) g38.0<1>UW g38.0<16,16,1>UW 2UW {align1};
+shr (16) g39.0<1>UW g39.0<16,16,1>UW 2UW {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x0y0_uv.g4i b/shaders/mpeg2/vld/read_frame_x0y0_uv.g4i
new file mode 100644 (file)
index 0000000..63f898f
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * 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 (1) g32.8<1>UD 0x007000fUD  {align1};
+send (16) 0 g36.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 4 {align1};
+send (16) 0 g40.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 4 {align1};
+
+mov (16) g74.0<1>UW g36.0<16,8,1>UB {align1};
+mov (16) g75.0<1>UW g37.0<16,8,1>UB {align1};
+mov (16) g76.0<1>UW g38.0<16,8,1>UB {align1};
+mov (16) g77.0<1>UW g39.0<16,8,1>UB {align1};
+mov (16) g78.0<1>UW g40.0<16,8,1>UB {align1};
+mov (16) g79.0<1>UW g41.0<16,8,1>UB {align1};
+mov (16) g80.0<1>UW g42.0<16,8,1>UB {align1};
+mov (16) g81.0<1>UW g43.0<16,8,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x0y0_y.g4i b/shaders/mpeg2/vld/read_frame_x0y0_y.g4i
new file mode 100644 (file)
index 0000000..3ab5ccd
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * 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 (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(input_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(input_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 g39.0<16,16,1>UB {align1};
+mov (16) g60.0<1>UW g40.0<16,16,1>UB {align1};
+mov (16) g61.0<1>UW g41.0<16,16,1>UB {align1};
+mov (16) g62.0<1>UW g42.0<16,16,1>UB {align1};
+mov (16) g63.0<1>UW g43.0<16,16,1>UB {align1};
+mov (16) g64.0<1>UW g44.0<16,16,1>UB {align1};
+mov (16) g65.0<1>UW g45.0<16,16,1>UB {align1};
+mov (16) g66.0<1>UW g46.0<16,16,1>UB {align1};
+mov (16) g67.0<1>UW g47.0<16,16,1>UB {align1};
+mov (16) g68.0<1>UW g48.0<16,16,1>UB {align1};
+mov (16) g69.0<1>UW g49.0<16,16,1>UB {align1};
+mov (16) g70.0<1>UW g50.0<16,16,1>UB {align1};
+mov (16) g71.0<1>UW g51.0<16,16,1>UB {align1};
+mov (16) g72.0<1>UW g52.0<16,16,1>UB {align1};
+mov (16) g73.0<1>UW g53.0<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x0y1_uv.g4i b/shaders/mpeg2/vld/read_frame_x0y1_uv.g4i
new file mode 100644 (file)
index 0000000..6351ec5
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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>
+ *
+ */
+mov (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g34.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 8 {align1}; //U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 8 {align1}; //V
+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 g42.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 1 {align1}; //U
+send (16) 0 g52.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 1 {align1}; //V
+
+//U
+avg (8) g74.0<1>UW  g34.0<8,8,1>UB g35.0<8,8,1>UB {align1};
+avg (8) g74.16<1>UW g35.0<8,8,1>UB g36.0<8,8,1>UB {align1};
+avg (8) g75.0<1>UW  g36.0<8,8,1>UB g37.0<8,8,1>UB {align1};
+avg (8) g75.16<1>UW g37.0<8,8,1>UB g38.0<8,8,1>UB {align1};
+avg (8) g76.0<1>UW  g38.0<8,8,1>UB g39.0<8,8,1>UB {align1};
+avg (8) g76.16<1>UW g39.0<8,8,1>UB g40.0<8,8,1>UB {align1};
+avg (8) g77.0<1>UW  g40.0<8,8,1>UB g41.0<8,8,1>UB {align1};
+avg (8) g77.16<1>UW g41.0<8,8,1>UB g42.0<8,8,1>UB {align1};
+
+//V
+avg (8) g78.0<1>UW  g44.0<8,8,1>UB g45.0<8,8,1>UB {align1};
+avg (8) g78.16<1>UW g45.0<8,8,1>UB g46.0<8,8,1>UB {align1};
+avg (8) g79.0<1>UW  g46.0<8,8,1>UB g47.0<8,8,1>UB {align1};
+avg (8) g79.16<1>UW g47.0<8,8,1>UB g48.0<8,8,1>UB {align1};
+avg (8) g80.0<1>UW  g48.0<8,8,1>UB g49.0<8,8,1>UB {align1};
+avg (8) g80.16<1>UW g49.0<8,8,1>UB g50.0<8,8,1>UB {align1};
+avg (8) g81.0<1>UW  g50.0<8,8,1>UB g51.0<8,8,1>UB {align1};
+avg (8) g81.16<1>UW g51.0<8,8,1>UB g52.0<8,8,1>UB {align1};
+
diff --git a/shaders/mpeg2/vld/read_frame_x0y1_y.g4i b/shaders/mpeg2/vld/read_frame_x0y1_y.g4i
new file mode 100644 (file)
index 0000000..db3dcc5
--- /dev/null
@@ -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 (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(input_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(input_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(input_surface, 2, 0, 2) mlen 1 rlen 1 {align1};
+
+avg.sat (16) g58.0<1>UW g38.0<16,16,1>UB g39.0<16,16,1>UB {align1};
+avg.sat (16) g59.0<1>UW g39.0<16,16,1>UB g40.0<16,16,1>UB {align1};
+avg.sat (16) g60.0<1>UW g40.0<16,16,1>UB g41.0<16,16,1>UB {align1};
+avg.sat (16) g61.0<1>UW g41.0<16,16,1>UB g42.0<16,16,1>UB {align1};
+avg.sat (16) g62.0<1>UW g42.0<16,16,1>UB g43.0<16,16,1>UB {align1};
+avg.sat (16) g63.0<1>UW g43.0<16,16,1>UB g44.0<16,16,1>UB {align1};
+avg.sat (16) g64.0<1>UW g44.0<16,16,1>UB g45.0<16,16,1>UB {align1};
+avg.sat (16) g65.0<1>UW g45.0<16,16,1>UB g46.0<16,16,1>UB {align1};
+avg.sat (16) g66.0<1>UW g46.0<16,16,1>UB g47.0<16,16,1>UB {align1};
+avg.sat (16) g67.0<1>UW g47.0<16,16,1>UB g48.0<16,16,1>UB {align1};
+avg.sat (16) g68.0<1>UW g48.0<16,16,1>UB g49.0<16,16,1>UB {align1};
+avg.sat (16) g69.0<1>UW g49.0<16,16,1>UB g50.0<16,16,1>UB {align1};
+avg.sat (16) g70.0<1>UW g50.0<16,16,1>UB g51.0<16,16,1>UB {align1};
+avg.sat (16) g71.0<1>UW g51.0<16,16,1>UB g52.0<16,16,1>UB {align1};
+avg.sat (16) g72.0<1>UW g52.0<16,16,1>UB g53.0<16,16,1>UB {align1};
+avg.sat (16) g73.0<1>UW g53.0<16,16,1>UB g54.0<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x1y0_uv.g4i b/shaders/mpeg2/vld/read_frame_x1y0_uv.g4i
new file mode 100644 (file)
index 0000000..05736f0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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>
+ *
+ */
+
+mov (1) g32.8<1>UD 0x007000fUD  {align1};
+send (16) 0 g34.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 4 {align1};
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 4 {align1};
+
+avg (16) g74.0<1>UW g34.0<16,8,1>UB g34.1<16,8,1>UB{align1};
+avg (16) g75.0<1>UW g35.0<16,8,1>UB g35.1<16,8,1>UB{align1};
+avg (16) g76.0<1>UW g36.0<16,8,1>UB g36.1<16,8,1>UB{align1};
+avg (16) g77.0<1>UW g37.0<16,8,1>UB g37.1<16,8,1>UB{align1};
+
+avg (16) g78.0<1>UW g44.0<16,8,1>UB g44.1<16,8,1>UB{align1};
+avg (16) g79.0<1>UW g45.0<16,8,1>UB g45.1<16,8,1>UB{align1};
+avg (16) g80.0<1>UW g46.0<16,8,1>UB g46.1<16,8,1>UB{align1};
+avg (16) g81.0<1>UW g47.0<16,8,1>UB g47.1<16,8,1>UB{align1};
diff --git a/shaders/mpeg2/vld/read_frame_x1y0_y.g4i b/shaders/mpeg2/vld/read_frame_x1y0_y.g4i
new file mode 100644 (file)
index 0000000..c236d11
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * 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 (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(input_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(input_surface, 2, 0, 2) mlen 1 rlen 8 {align1};
+
+avg.sat (16) g58.0<1>UW g38.0<16,16,1>UB g38.1<16,16,1>UB {align1};
+avg.sat (16) g59.0<1>UW g39.0<16,16,1>UB g39.1<16,16,1>UB {align1};
+avg.sat (16) g60.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+avg.sat (16) g61.0<1>UW g41.0<16,16,1>UB g41.1<16,16,1>UB {align1};
+avg.sat (16) g62.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+avg.sat (16) g63.0<1>UW g43.0<16,16,1>UB g43.1<16,16,1>UB {align1};
+avg.sat (16) g64.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+avg.sat (16) g65.0<1>UW g45.0<16,16,1>UB g45.1<16,16,1>UB {align1};
+avg.sat (16) g66.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+avg.sat (16) g67.0<1>UW g47.0<16,16,1>UB g47.1<16,16,1>UB {align1};
+avg.sat (16) g68.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+avg.sat (16) g69.0<1>UW g49.0<16,16,1>UB g49.1<16,16,1>UB {align1};
+avg.sat (16) g70.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+avg.sat (16) g71.0<1>UW g51.0<16,16,1>UB g51.1<16,16,1>UB {align1};
+avg.sat (16) g72.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+avg.sat (16) g73.0<1>UW g53.0<16,16,1>UB g53.1<16,16,1>UB {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x1y1_uv.g4i b/shaders/mpeg2/vld/read_frame_x1y1_uv.g4i
new file mode 100644 (file)
index 0000000..2f741fa
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ */
+mov (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g34.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 8 {align1}; //U
+send (16) 0 g44.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 8 {align1}; //V
+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 g42.0<1>UW g32<8,8,1>UW read(input_surface1, 2, 0, 2) mlen 1 rlen 1 {align1}; //U
+send (16) 0 g52.0<1>UW g32<8,8,1>UW read(input_surface2, 2, 0, 2) mlen 1 rlen 1 {align1}; //V
+
+//U
+add (8) g74.0<1>UW  g34.0<8,8,1>UB g34.1<8,8,1>UB {align1};
+add (8) g74.16<1>UW g35.0<8,8,1>UB g35.1<8,8,1>UB {align1};
+add (8) g75.0<1>UW  g36.0<8,8,1>UB g36.1<8,8,1>UB {align1};
+add (8) g75.16<1>UW g37.0<8,8,1>UB g37.1<8,8,1>UB {align1};
+add (8) g76.0<1>UW  g38.0<8,8,1>UB g38.1<8,8,1>UB {align1};
+add (8) g76.16<1>UW g39.0<8,8,1>UB g39.1<8,8,1>UB {align1};
+add (8) g77.0<1>UW  g40.0<8,8,1>UB g40.1<8,8,1>UB {align1};
+add (8) g77.16<1>UW g41.0<8,8,1>UB g41.1<8,8,1>UB {align1};
+
+add (8) g74.0<1>UW  g74.0<8,8,1>UW  g35.0<8,8,1>UB {align1};
+add (8) g74.16<1>UW g74.16<8,8,1>UW g36.0<8,8,1>UB {align1};
+add (8) g75.0<1>UW  g75.0<8,8,1>UW  g37.0<8,8,1>UB {align1};
+add (8) g75.16<1>UW g75.16<8,8,1>UW g38.0<8,8,1>UB {align1};
+add (8) g76.0<1>UW  g76.0<8,8,1>UW  g39.0<8,8,1>UB {align1};
+add (8) g76.16<1>UW g76.16<8,8,1>UW g40.0<8,8,1>UB {align1};
+add (8) g77.0<1>UW  g77.0<8,8,1>UW  g41.0<8,8,1>UB {align1};
+add (8) g77.16<1>UW g77.16<8,8,1>UW g42.0<8,8,1>UB {align1};
+
+add (8) g74.0<1>UW  g74.0<8,8,1>UW  g35.1<8,8,1>UB {align1};
+add (8) g74.16<1>UW g74.16<8,8,1>UW g36.1<8,8,1>UB {align1};
+add (8) g75.0<1>UW  g75.0<8,8,1>UW  g37.1<8,8,1>UB {align1};
+add (8) g75.16<1>UW g75.16<8,8,1>UW g38.1<8,8,1>UB {align1};
+add (8) g76.0<1>UW  g76.0<8,8,1>UW  g39.1<8,8,1>UB {align1};
+add (8) g76.16<1>UW g76.16<8,8,1>UW g40.1<8,8,1>UB {align1};
+add (8) g77.0<1>UW  g77.0<8,8,1>UW  g41.1<8,8,1>UB {align1};
+add (8) g77.16<1>UW g77.16<8,8,1>UW g42.1<8,8,1>UB {align1};
+
+//V
+add (8) g78.0<1>UW  g44.0<8,8,1>UB g44.1<8,8,1>UB {align1};
+add (8) g78.16<1>UW g45.0<8,8,1>UB g45.1<8,8,1>UB {align1};
+add (8) g79.0<1>UW  g46.0<8,8,1>UB g46.1<8,8,1>UB {align1};
+add (8) g79.16<1>UW g47.0<8,8,1>UB g47.1<8,8,1>UB {align1};
+add (8) g80.0<1>UW  g48.0<8,8,1>UB g48.1<8,8,1>UB {align1};
+add (8) g80.16<1>UW g49.0<8,8,1>UB g49.1<8,8,1>UB {align1};
+add (8) g81.0<1>UW  g50.0<8,8,1>UB g50.1<8,8,1>UB {align1};
+add (8) g81.16<1>UW g51.0<8,8,1>UB g51.1<8,8,1>UB {align1};
+
+add (8) g78.0<1>UW  g78.0<8,8,1>UW  g45.0<8,8,1>UB {align1};
+add (8) g78.16<1>UW g78.16<8,8,1>UW g46.0<8,8,1>UB {align1};
+add (8) g79.0<1>UW  g79.0<8,8,1>UW  g47.0<8,8,1>UB {align1};
+add (8) g79.16<1>UW g79.16<8,8,1>UW g48.0<8,8,1>UB {align1};
+add (8) g80.0<1>UW  g80.0<8,8,1>UW  g49.0<8,8,1>UB {align1};
+add (8) g80.16<1>UW g80.16<8,8,1>UW g50.0<8,8,1>UB {align1};
+add (8) g81.0<1>UW  g81.0<8,8,1>UW  g51.0<8,8,1>UB {align1};
+add (8) g81.16<1>UW g81.16<8,8,1>UW g52.0<8,8,1>UB {align1};
+
+add (8) g78.0<1>UW  g78.0<8,8,1>UW  g45.1<8,8,1>UB {align1};
+add (8) g78.16<1>UW g78.16<8,8,1>UW g46.1<8,8,1>UB {align1};
+add (8) g79.0<1>UW  g79.0<8,8,1>UW  g47.1<8,8,1>UB {align1};
+add (8) g79.16<1>UW g79.16<8,8,1>UW g48.1<8,8,1>UB {align1};
+add (8) g80.0<1>UW  g80.0<8,8,1>UW  g49.1<8,8,1>UB {align1};
+add (8) g80.16<1>UW g80.16<8,8,1>UW g50.1<8,8,1>UB {align1};
+add (8) g81.0<1>UW  g81.0<8,8,1>UW  g51.1<8,8,1>UB {align1};
+add (8) g81.16<1>UW g81.16<8,8,1>UW g52.1<8,8,1>UB {align1};
+
+shr (16) g74.0<1>UW g74.0<16,16,1>UW 2UW {align1};
+shr (16) g75.0<1>UW g75.0<16,16,1>UW 2UW {align1};
+shr (16) g76.0<1>UW g76.0<16,16,1>UW 2UW {align1};
+shr (16) g77.0<1>UW g77.0<16,16,1>UW 2UW {align1};
+shr (16) g78.0<1>UW g78.0<16,16,1>UW 2UW {align1};
+shr (16) g79.0<1>UW g79.0<16,16,1>UW 2UW {align1};
+shr (16) g80.0<1>UW g80.0<16,16,1>UW 2UW {align1};
+shr (16) g81.0<1>UW g81.0<16,16,1>UW 2UW {align1};
diff --git a/shaders/mpeg2/vld/read_frame_x1y1_y.g4i b/shaders/mpeg2/vld/read_frame_x1y1_y.g4i
new file mode 100644 (file)
index 0000000..990927d
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 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 (1) g32.8<1>UD 0x007001FUD {align1};
+send (16) 0 g38.0<1>UW g32<8,8,1>UW read(input_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(input_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(input_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 g39.0<16,16,1>UB g39.1<16,16,1>UB {align1};
+add (16) g60.0<1>UW g40.0<16,16,1>UB g40.1<16,16,1>UB {align1};
+add (16) g61.0<1>UW g41.0<16,16,1>UB g41.1<16,16,1>UB {align1};
+add (16) g62.0<1>UW g42.0<16,16,1>UB g42.1<16,16,1>UB {align1};
+add (16) g63.0<1>UW g43.0<16,16,1>UB g43.1<16,16,1>UB {align1};
+add (16) g64.0<1>UW g44.0<16,16,1>UB g44.1<16,16,1>UB {align1};
+add (16) g65.0<1>UW g45.0<16,16,1>UB g45.1<16,16,1>UB {align1};
+add (16) g66.0<1>UW g46.0<16,16,1>UB g46.1<16,16,1>UB {align1};
+add (16) g67.0<1>UW g47.0<16,16,1>UB g47.1<16,16,1>UB {align1};
+add (16) g68.0<1>UW g48.0<16,16,1>UB g48.1<16,16,1>UB {align1};
+add (16) g69.0<1>UW g49.0<16,16,1>UB g49.1<16,16,1>UB {align1};
+add (16) g70.0<1>UW g50.0<16,16,1>UB g50.1<16,16,1>UB {align1};
+add (16) g71.0<1>UW g51.0<16,16,1>UB g51.1<16,16,1>UB {align1};
+add (16) g72.0<1>UW g52.0<16,16,1>UB g52.1<16,16,1>UB {align1};
+add (16) g73.0<1>UW g53.0<16,16,1>UB g53.1<16,16,1>UB {align1};
+
+add (16) g58.0<1>UW g58.0<16,16,1>UW g39.0<16,16,1>UB {align1};
+add (16) g59.0<1>UW g59.0<16,16,1>UW g40.0<16,16,1>UB {align1};
+add (16) g60.0<1>UW g60.0<16,16,1>UW g41.0<16,16,1>UB {align1};
+add (16) g61.0<1>UW g61.0<16,16,1>UW g42.0<16,16,1>UB {align1};
+add (16) g62.0<1>UW g62.0<16,16,1>UW g43.0<16,16,1>UB {align1};
+add (16) g63.0<1>UW g63.0<16,16,1>UW g44.0<16,16,1>UB {align1};
+add (16) g64.0<1>UW g64.0<16,16,1>UW g45.0<16,16,1>UB {align1};
+add (16) g65.0<1>UW g65.0<16,16,1>UW g46.0<16,16,1>UB {align1};
+add (16) g66.0<1>UW g66.0<16,16,1>UW g47.0<16,16,1>UB {align1};
+add (16) g67.0<1>UW g67.0<16,16,1>UW g48.0<16,16,1>UB {align1};
+add (16) g68.0<1>UW g68.0<16,16,1>UW g49.0<16,16,1>UB {align1};
+add (16) g69.0<1>UW g69.0<16,16,1>UW g50.0<16,16,1>UB {align1};
+add (16) g70.0<1>UW g70.0<16,16,1>UW g51.0<16,16,1>UB {align1};
+add (16) g71.0<1>UW g71.0<16,16,1>UW g52.0<16,16,1>UB {align1};
+add (16) g72.0<1>UW g72.0<16,16,1>UW g53.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) g58.0<1>UW g58.0<16,16,1>UW g39.1<16,16,1>UB {align1};
+add (16) g59.0<1>UW g59.0<16,16,1>UW g40.1<16,16,1>UB {align1};
+add (16) g60.0<1>UW g60.0<16,16,1>UW g41.1<16,16,1>UB {align1};
+add (16) g61.0<1>UW g61.0<16,16,1>UW g42.1<16,16,1>UB {align1};
+add (16) g62.0<1>UW g62.0<16,16,1>UW g43.1<16,16,1>UB {align1};
+add (16) g63.0<1>UW g63.0<16,16,1>UW g44.1<16,16,1>UB {align1};
+add (16) g64.0<1>UW g64.0<16,16,1>UW g45.1<16,16,1>UB {align1};
+add (16) g65.0<1>UW g65.0<16,16,1>UW g46.1<16,16,1>UB {align1};
+add (16) g66.0<1>UW g66.0<16,16,1>UW g47.1<16,16,1>UB {align1};
+add (16) g67.0<1>UW g67.0<16,16,1>UW g48.1<16,16,1>UB {align1};
+add (16) g68.0<1>UW g68.0<16,16,1>UW g49.1<16,16,1>UB {align1};
+add (16) g69.0<1>UW g69.0<16,16,1>UW g50.1<16,16,1>UB {align1};
+add (16) g70.0<1>UW g70.0<16,16,1>UW g51.1<16,16,1>UB {align1};
+add (16) g71.0<1>UW g71.0<16,16,1>UW g52.1<16,16,1>UB {align1};
+add (16) g72.0<1>UW g72.0<16,16,1>UW g53.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.sat (16) g58.0<1>UW g58.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g59.0<1>UW g59.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g60.0<1>UW g60.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g61.0<1>UW g61.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g62.0<1>UW g62.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g63.0<1>UW g63.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g64.0<1>UW g64.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g65.0<1>UW g65.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g66.0<1>UW g66.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g67.0<1>UW g67.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g68.0<1>UW g68.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g69.0<1>UW g69.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g70.0<1>UW g70.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g71.0<1>UW g71.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g72.0<1>UW g72.0<16,16,1>UW 2UW {align1};
+shr.sat (16) g73.0<1>UW g73.0<16,16,1>UW 2UW {align1};
diff --git a/shaders/render/Makefile b/shaders/render/Makefile
new file mode 100644 (file)
index 0000000..2b7180c
--- /dev/null
@@ -0,0 +1,375 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# i965_drv_video/shaders/render/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/libva
+pkglibdir = $(libdir)/libva
+pkgincludedir = $(includedir)/libva
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+subdir = i965_drv_video/shaders/render
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = aclocal -I /opt/X11R7/share/aclocal
+AMTAR = ${SHELL} /home/znh/libva.old/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /home/znh/libva.old/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/znh/libva.old/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/znh/libva.old/missing --run automake-1.10
+AWK = mawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DRM_CFLAGS = -I/opt/X11R7/include -I/opt/X11R7/include/drm  
+DRM_LIBS = -L/opt/X11R7/lib -ldrm  
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+FGREP = /bin/grep -F
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBDRM_DEPS_CFLAGS = -I/opt/X11R7/include -I/opt/X11R7/include/drm  
+LIBDRM_DEPS_LIBS = -L/opt/X11R7/lib -ldrm  
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIBVA_CFLAGS = -I/opt/X11R7/include -I/opt/X11R7/include/drm  
+LIBVA_LIBS = 
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/znh/libva.old/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJEXT = o
+PACKAGE = libva
+PACKAGE_BUGREPORT = waldo.bastian@intel.com
+PACKAGE_NAME = libva
+PACKAGE_STRING = libva 0.30.4
+PACKAGE_TARNAME = libva
+PACKAGE_VERSION = 0.30.4
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+VERSION = 0.30.4
+X11_CFLAGS = -I/opt/X11R7/include  
+X11_LIBS = -L/opt/X11R7/lib -lX11  
+XEXT_CFLAGS = -I/opt/X11R7/include  
+XEXT_LIBS = -L/opt/X11R7/lib -lXext  
+abs_builddir = /home/znh/libva.old/i965_drv_video/shaders/render
+abs_srcdir = /home/znh/libva.old/i965_drv_video/shaders/render
+abs_top_builddir = /home/znh/libva.old
+abs_top_srcdir = /home/znh/libva.old
+ac_ct_CC = gcc
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+gen4asm = yes
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /home/znh/libva.old/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+lt_ECHO = echo
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgconfigdir = ${exec_prefix}/lib/pkgconfig
+prefix = /opt/X11R7
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../../../
+top_builddir = ../../..
+top_srcdir = ../../..
+INTEL_G4I = \
+       exa_wm.g4i              \
+       exa_wm_affine.g4i
+
+INTEL_G4A = \
+       exa_sf.g4a                      \
+       exa_wm_xy.g4a                   \
+       exa_wm_src_affine.g4a           \
+       exa_wm_src_sample_planar.g4a    \
+       exa_wm_yuv_rgb.g4a              \
+       exa_wm_blend_subpicture.g4a             \
+       exa_wm_write.g4a
+
+INTEL_G4B = \
+       exa_sf.g4b                      \
+       exa_wm_xy.g4b                   \
+       exa_wm_src_affine.g4b           \
+       exa_wm_src_sample_planar.g4b    \
+       exa_wm_yuv_rgb.g4b              \
+       exa_wm_blend_subpicture.g4b             \
+       exa_wm_write.g4b
+
+EXTRA_DIST = $(INTEL_G4I)      \
+            $(INTEL_G4A)       \
+            $(INTEL_G4B)    
+
+SUFFIXES = .g4a .g4b
+BUILT_SOURCES = $(INTEL_G4B)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .g4a .g4b
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  i965_drv_video/shaders/render/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  i965_drv_video/shaders/render/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+#clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       clean-local distclean distclean-generic distclean-libtool \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am
+
+.g4a.g4b:
+       m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && rm $*.g4m
+
+$(INTEL_G4B): $(INTEL_G4I)
+
+clean-local:
+       -rm -f $(INTEL_G4B)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/shaders/render/Makefile.am b/shaders/render/Makefile.am
new file mode 100644 (file)
index 0000000..0387dfc
--- /dev/null
@@ -0,0 +1,40 @@
+
+INTEL_G4I =                    \
+       exa_wm.g4i              \
+       exa_wm_affine.g4i
+
+INTEL_G4A =                            \
+       exa_sf.g4a                      \
+       exa_wm_xy.g4a                   \
+       exa_wm_src_affine.g4a           \
+       exa_wm_src_sample_planar.g4a    \
+       exa_wm_yuv_rgb.g4a              \
+       exa_wm_blend_subpicture.g4a             \
+       exa_wm_write.g4a
+
+INTEL_G4B =                            \
+       exa_sf.g4b                      \
+       exa_wm_xy.g4b                   \
+       exa_wm_src_affine.g4b           \
+       exa_wm_src_sample_planar.g4b    \
+       exa_wm_yuv_rgb.g4b              \
+       exa_wm_blend_subpicture.g4b             \
+       exa_wm_write.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/shaders/render/Makefile.in b/shaders/render/Makefile.in
new file mode 100644 (file)
index 0000000..b7840a6
--- /dev/null
@@ -0,0 +1,375 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = i965_drv_video/shaders/render
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DRM_CFLAGS = @DRM_CFLAGS@
+DRM_LIBS = @DRM_LIBS@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBDRM_DEPS_CFLAGS = @LIBDRM_DEPS_CFLAGS@
+LIBDRM_DEPS_LIBS = @LIBDRM_DEPS_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVA_CFLAGS = @LIBVA_CFLAGS@
+LIBVA_LIBS = @LIBVA_LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+XEXT_CFLAGS = @XEXT_CFLAGS@
+XEXT_LIBS = @XEXT_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+gen4asm = @gen4asm@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INTEL_G4I = \
+       exa_wm.g4i              \
+       exa_wm_affine.g4i
+
+INTEL_G4A = \
+       exa_sf.g4a                      \
+       exa_wm_xy.g4a                   \
+       exa_wm_src_affine.g4a           \
+       exa_wm_src_sample_planar.g4a    \
+       exa_wm_yuv_rgb.g4a              \
+       exa_wm_blend_subpicture.g4a             \
+       exa_wm_write.g4a
+
+INTEL_G4B = \
+       exa_sf.g4b                      \
+       exa_wm_xy.g4b                   \
+       exa_wm_src_affine.g4b           \
+       exa_wm_src_sample_planar.g4b    \
+       exa_wm_yuv_rgb.g4b              \
+       exa_wm_blend_subpicture.g4b             \
+       exa_wm_write.g4b
+
+EXTRA_DIST = $(INTEL_G4I)      \
+            $(INTEL_G4A)       \
+            $(INTEL_G4B)    
+
+@HAVE_GEN4ASM_TRUE@SUFFIXES = .g4a .g4b
+@HAVE_GEN4ASM_TRUE@BUILT_SOURCES = $(INTEL_G4B)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .g4a .g4b
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  i965_drv_video/shaders/render/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  i965_drv_video/shaders/render/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+@HAVE_GEN4ASM_FALSE@clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       clean-local distclean distclean-generic distclean-libtool \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am
+
+@HAVE_GEN4ASM_TRUE@.g4a.g4b:
+@HAVE_GEN4ASM_TRUE@    m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && rm $*.g4m
+
+@HAVE_GEN4ASM_TRUE@$(INTEL_G4B): $(INTEL_G4I)
+
+@HAVE_GEN4ASM_TRUE@clean-local:
+@HAVE_GEN4ASM_TRUE@    -rm -f $(INTEL_G4B)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/shaders/render/exa_sf.g4a b/shaders/render/exa_sf.g4a
new file mode 100644 (file)
index 0000000..3e660ac
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * 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:
+ *    Keith Packard <keithp@keithp.com>
+ *    Eric Anholt <eric@anholt.net>
+ *
+ */
+
+/*
+ * Inputs (note all sub-register addresses are bytes, not float indices)
+ *
+ * Note that the vertices will have been reordered:
+ *
+ * V0 is topmost (leftmost among topmost) (upper left)
+ * V1 is next clockwise (lower right)
+ * V2 is remaining (lower left)
+ *
+ *  V0 ...................... XX
+ *  |                          .
+ *  |                          .
+ *  |                          .
+ *  V2------------------------V1
+ *
+ *  G0     thread state -- just pass along
+ *
+ *  G1 and G2 are fixed by SF spec
+ *
+ *  G1.0    reserved
+ *  G1.4    Provoking vertex
+ *  G1.8    Determinant
+ *  G1.12   X1 - X0
+ *  G1.16   X2 - X0
+ *  G1.20   Y1 - Y0
+ *  G1.24   Y2 - Y0
+ *  G1.30   reserved
+ *
+ *  G2.0    Z0
+ *  G2.4    1/W0
+ *  G2.8    Z1
+ *  G2.12   1/W1
+ *  G2.16   Z2
+ *  G2.20   1/W2
+ *  G2.24   reserved
+ *  G2.30   reserved
+ *
+ *  G3 is V0 Vertex Attribute Data from URB (upper left)
+ *
+ *  G3.0    u0
+ *  G3.4    v0
+ *
+ *  G4 is V1 Vertex Attribute Data from URB (lower right)
+ *
+ *  G4.0    u1
+ *  G4.4    v1
+ *
+ *  G5 is V2 Vertex Attribute Data from URB (lower left)
+ *
+ */
+
+/* Compute inverses of the input deltas */
+send (4) 0 g6<1>F g1.12<4,4,1>F math inv mlen 1 rlen 1 { align1 };
+
+/* texture location at V0 */
+mov (4) m3<1>F g3<4,4,1>F { align1 };
+
+/* compute V1 - V2 (motion in X) for texture coordinates */
+add (4) g7<1>F g4<4,4,1>F -g5<4,4,1>F { align1 };
+
+/* multiply by 1/dx */
+mul (4) m1<1>F g7<4,4,1>F g6.0<0,1,0>F { align1 };
+
+/* Compute V2 - V0 (motion in Y) for texture coordinates */
+add (4) g7<1>F g5<4,4,1>F -g3<4,4,1>F { align1 };
+
+/* multiply by 1/dy */
+mul (4) m2<1>F g7<4,4,1>F g6.8<0,1,0>F {align1 };
+
+/* and we're done */
+send (8) 0 null g0<8,8,1>F urb 0 transpose used complete mlen 4 rlen 0 { align1 EOT };
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
diff --git a/shaders/render/exa_sf.g4b b/shaders/render/exa_sf.g4b
new file mode 100644 (file)
index 0000000..223c9c9
--- /dev/null
@@ -0,0 +1,15 @@
+   { 0x00400031, 0x20c01fbd, 0x0069002c, 0x01110001 },
+   { 0x00400001, 0x206003be, 0x00690060, 0x00000000 },
+   { 0x00400040, 0x20e077bd, 0x00690080, 0x006940a0 },
+   { 0x00400041, 0x202077be, 0x006900e0, 0x000000c0 },
+   { 0x00400040, 0x20e077bd, 0x006900a0, 0x00694060 },
+   { 0x00400041, 0x204077be, 0x006900e0, 0x000000c8 },
+   { 0x00600031, 0x20001fbc, 0x008d0000, 0x8640c800 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
diff --git a/shaders/render/exa_wm.g4i b/shaders/render/exa_wm.g4i
new file mode 100644 (file)
index 0000000..5d3d45b
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+/*
+ * Input parameters
+ */
+
+/* Destination X/Y */
+define(`dst_x_uw',  `g1.8<2,4,0>UW')
+define(`dst_y_uw',  `g1.10<2,4,0>UW')
+define(`screen_x0', `g1.0<0,1,0>F')
+define(`screen_y0', `g1.4<0,1,0>F')
+
+/* Source transformation parameters */
+define(`src_du_dx', `g3.0<0,1,0>F')
+define(`src_du_dy', `g3.4<0,1,0>F')
+define(`src_uo',    `g3.12<0,1,0>F')
+define(`src_dv_dx', `g3.16<0,1,0>F')
+define(`src_dv_dy', `g3.20<0,1,0>F')
+define(`src_vo',    `g3.28<0,1,0>F')
+define(`src_dw_dx', `g4.0<0,1,0>F')
+define(`src_dw_dy', `g4.4<0,1,0>F')
+define(`src_wo',    `g4.12<0,1,0>F')
+
+define(`mask_du_dx', `g5.0<0,1,0>F')
+define(`mask_du_dy', `g5.4<0,1,0>F')
+define(`mask_uo',    `g5.12<0,1,0>F')
+define(`mask_dv_dx', `g5.16<0,1,0>F')
+define(`mask_dv_dy', `g5.20<0,1,0>F')
+define(`mask_vo',    `g5.28<0,1,0>F')
+define(`mask_dw_dx', `g6.0<0,1,0>F')
+define(`mask_dw_dy', `g6.4<0,1,0>F')
+define(`mask_wo',    `g6.12<0,1,0>F')
+
+/*
+ * Local variables. Pairs must be aligned on even reg boundry
+ */
+
+/* this holds the X dest coordinates */
+define(`dst_x',            `g8')
+define(`dst_x_0',   `dst_x')
+define(`dst_x_1',   `g9')
+
+/* this holds the Y dest coordinates */
+define(`dst_y',            `g10')
+define(`dst_y_0',   `dst_y')
+define(`dst_y_1',   `g11')
+
+/* When computing x * dn/dx, use this */
+define(`temp_x',    `g30')
+define(`temp_x_0',  `temp_x')
+define(`temp_x_1',  `g31')
+
+/* When computing y * dn/dy, use this */
+define(`temp_y',    `g28')
+define(`temp_y_0',  temp_y)
+define(`temp_y_1',  `g29')
+
+/* when loading x/y, use these to hold them in UW format */
+define(`temp_x_uw', temp_x)
+define(`temp_y_uw', temp_y)
+
+/* compute source and mask u/v to this pair to send to sampler */
+define(`src_msg',   `m1')
+define(`src_msg_ind',`1')
+define(`src_u',            `m2')
+define(`src_v',            `m4')
+define(`src_w',            `g12')
+define(`src_w_0',   `src_w')
+define(`src_w_1',   `g13')
+
+define(`mask_msg',  `m7')
+define(`mask_msg_ind',`7')
+define(`mask_u',    `m8')
+define(`mask_v',    `m10')
+define(`mask_w',    `src_w')
+define(`mask_w_0',  `src_w_0')
+define(`mask_w_1',  `src_w_1')
+
+/* sample src to these registers */
+define(`src_sample_base',      `g14')
+
+define(`src_sample_r',         `g14')
+define(`src_sample_r_01',      `g14')
+define(`src_sample_r_23',      `g15')
+
+define(`src_sample_g',         `g16')
+define(`src_sample_g_01',      `g16')
+define(`src_sample_g_23',      `g17')
+
+define(`src_sample_b',         `g18')
+define(`src_sample_b_01',      `g18')
+define(`src_sample_b_23',      `g19')
+
+define(`src_sample_a',         `g20')
+define(`src_sample_a_01',      `g20')
+define(`src_sample_a_23',      `g21')
+
+/* sample mask to these registers */
+define(`mask_sample_base',     `g22')
+    
+define(`mask_sample_r',                `g22')
+define(`mask_sample_r_01',     `g22')
+define(`mask_sample_r_23',     `g23')
+    
+define(`mask_sample_g',                `g24')
+define(`mask_sample_g_01',     `g24')
+define(`mask_sample_g_23',     `g25')
+    
+define(`mask_sample_b',                `g26')
+define(`mask_sample_b_01',     `g26')
+define(`mask_sample_b_23',     `g27')
+    
+define(`mask_sample_a',                `g28')
+define(`mask_sample_a_01',     `g28')
+define(`mask_sample_a_23',     `g29')
+
+/* data port SIMD16 send registers */
+
+define(`data_port_msg_0',      `m0')
+define(`data_port_msg_0_ind',  `0')
+define(`data_port_msg_1',      `m1')
+define(`data_port_r_01',       `m2')
+define(`data_port_g_01',       `m3')
+define(`data_port_b_01',       `m4')
+define(`data_port_a_01',       `m5')
+
+define(`data_port_r_23',       `m6')
+define(`data_port_g_23',       `m7')
+define(`data_port_b_23',       `m8')
+define(`data_port_a_23',       `m9')
+
diff --git a/shaders/render/exa_wm_affine.g4i b/shaders/render/exa_wm_affine.g4i
new file mode 100644 (file)
index 0000000..e72656b
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+
+/*
+ * Fragment to compute src u/v values under an affine transform
+ */
+
+/********** Compute u *************/
+
+mul (16)       temp_x<1>F      dst_x<8,8,1>F   du_dx           { compr align1 };
+mul (16)       temp_y<1>F      dst_y<8,8,1>F   du_dy           { compr align1 };
+add (16)       temp_x<1>F      temp_x<8,8,1>F  temp_y<8,8,1>F  { compr align1 };
+add (16)       u<1>F           temp_x<8,8,1>F  uo              { compr align1 };
+
+/********** Compute v *************/
+
+mul (16)       temp_x<1>F      dst_x<8,8,1>F   dv_dx           { compr align1 };
+mul (16)       temp_y<1>F      dst_y<8,8,1>F   dv_dy           { compr align1 };
+add (16)       temp_x<1>F      temp_x<8,8,1>F  temp_y<8,8,1>F  { compr align1 };
+add (16)       v<1>F           temp_x<8,8,1>F  vo              { compr align1 };
diff --git a/shaders/render/exa_wm_blend_subpicture.g4a b/shaders/render/exa_wm_blend_subpicture.g4a
new file mode 100644 (file)
index 0000000..2d2cd31
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+
+/* Sample the src surface in planar format */
+include(`exa_wm.g4i')
+
+/* prepare sampler read back gX register, which would be written back to output */
+
+/* use simd16 sampler, param 0 is u, param 1 is v. */
+/* 'payload' loading, assuming tex coord start from g4 */
+
+/* load r */
+mov (1) g0.8<1>UD      0x0000e000UD { align1 mask_disable };
+
+/* src_msg will be copied with g0, as it contains send desc */
+/* emit sampler 'send' cmd */
+
+
+/* sample Y */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_g<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (1,0,F)         /* sampler message description, (binding_table,sampler_index,datatype)*/
+       mlen 5 rlen 2 {align1};
+
+/* sample U (Cr) */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_r<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (1,2,F)         /* sampler message description, (binding_table,sampler_index,datatype)
+                               /* here(src->dst) we should use src_sampler and src_surface */
+       mlen 5 rlen 2 { align1 };   /* required message len 5, readback len 8 */
+       
+/* sample V (Cb) */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_b<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (1,4,F)         /* sampler message description, (binding_table,sampler_index,datatype)
+                               /* here(src->dst) we should use src_sampler and src_surface */
+       mlen 5 rlen 2 { align1 };   /* required message len 5, readback len 8 */
+
+/*extract alpha value, alpha value stores in one float with color value, because the color value is small,
+we can neglect it when doing alpha blend*/
+mov (8) src_sample_a<1>F g14<8,8,1>F { align1 };
+mov (8) src_sample_a_23<1>F g15<8,8,1>F { align1 };
+
+
+/*set subtitle color*/
+add (8) g14<1>F g14<8,8,1>F 0.5F { align1 };
+add (8) g15<1>F g15<8,8,1>F 0.5F { align1 };
+add (8) g16<1>F g16<8,8,1>F 0.5F { align1 };
+add (8) g17<1>F g17<8,8,1>F 0.5F { align1 };
+add (8) g18<1>F g18<8,8,1>F 0.5F { align1 };
+add (8) g19<1>F g19<8,8,1>F 0.5F { align1 };
+
+nop;
+nop;
+nop;
+
diff --git a/shaders/render/exa_wm_blend_subpicture.g4b b/shaders/render/exa_wm_blend_subpicture.g4b
new file mode 100644 (file)
index 0000000..bbc75c0
--- /dev/null
@@ -0,0 +1,15 @@
+   { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 },
+   { 0x01800031, 0x22001d29, 0x008d0000, 0x02520001 },
+   { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520201 },
+   { 0x01800031, 0x22401d29, 0x008d0000, 0x02520401 },
+   { 0x00600001, 0x228003bd, 0x008d01c0, 0x00000000 },
+   { 0x00600001, 0x22a003bd, 0x008d01e0, 0x00000000 },
+   { 0x00600040, 0x21c07fbd, 0x008d01c0, 0x3f000000 },
+   { 0x00600040, 0x21e07fbd, 0x008d01e0, 0x3f000000 },
+   { 0x00600040, 0x22007fbd, 0x008d0200, 0x3f000000 },
+   { 0x00600040, 0x22207fbd, 0x008d0220, 0x3f000000 },
+   { 0x00600040, 0x22407fbd, 0x008d0240, 0x3f000000 },
+   { 0x00600040, 0x22607fbd, 0x008d0260, 0x3f000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
diff --git a/shaders/render/exa_wm_src_affine.g4a b/shaders/render/exa_wm_src_affine.g4a
new file mode 100644 (file)
index 0000000..3194b5a
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+
+/*
+ * Fragment to compute src u/v values under an affine transform
+ */
+
+include(`exa_wm.g4i')
+
+define(`du_dx',        `src_du_dx')
+define(`du_dy',        `src_du_dy')
+define(`uo',   `src_uo')
+
+define(`dv_dx',        `src_dv_dx')
+define(`dv_dy',        `src_dv_dy')
+define(`vo',   `src_vo')
+
+define(`u',    `src_u')
+define(`v',    `src_v')
+
+include(`exa_wm_affine.g4i')
diff --git a/shaders/render/exa_wm_src_affine.g4b b/shaders/render/exa_wm_src_affine.g4b
new file mode 100644 (file)
index 0000000..d30da87
--- /dev/null
@@ -0,0 +1,8 @@
+   { 0x00802041, 0x23c077bd, 0x008d0100, 0x00000060 },
+   { 0x00802041, 0x238077bd, 0x008d0140, 0x00000064 },
+   { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 },
+   { 0x00802040, 0x204077be, 0x008d03c0, 0x0000006c },
+   { 0x00802041, 0x23c077bd, 0x008d0100, 0x00000070 },
+   { 0x00802041, 0x238077bd, 0x008d0140, 0x00000074 },
+   { 0x00802040, 0x23c077bd, 0x008d03c0, 0x008d0380 },
+   { 0x00802040, 0x208077be, 0x008d03c0, 0x0000007c },
diff --git a/shaders/render/exa_wm_src_sample_planar.g4a b/shaders/render/exa_wm_src_sample_planar.g4a
new file mode 100644 (file)
index 0000000..ca77b48
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+
+/* Sample the src surface in planar format */
+
+include(`exa_wm.g4i')
+
+/* prepare sampler read back gX register, which would be written back to output */
+
+/* use simd16 sampler, param 0 is u, param 1 is v. */
+/* 'payload' loading, assuming tex coord start from g4 */
+
+/* load r */
+mov (1) g0.8<1>UD      0x0000e000UD { align1 mask_disable };
+
+/* src_msg will be copied with g0, as it contains send desc */
+/* emit sampler 'send' cmd */
+
+/* sample Y */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_g<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (1,0,F)         /* sampler message description, (binding_table,sampler_index,datatype)
+                               /* here(src->dst) we should use src_sampler and src_surface */
+       mlen 5 rlen 2 { align1 };   /* required message len 5, readback len 8 */
+       
+/* sample U (Cr) */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_r<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (3,2,F)         /* sampler message description, (binding_table,sampler_index,datatype)
+                               /* here(src->dst) we should use src_sampler and src_surface */
+       mlen 5 rlen 2 { align1 };   /* required message len 5, readback len 8 */
+       
+/* sample V (Cb) */
+send (16) src_msg_ind          /* msg reg index */
+       src_sample_b<1>UW       /* readback */
+       g0<8,8,1>UW             /* copy to msg start reg*/
+       sampler (5,4,F)         /* sampler message description, (binding_table,sampler_index,datatype)
+                               /* here(src->dst) we should use src_sampler and src_surface */
+       mlen 5 rlen 2 { align1 };   /* required message len 5, readback len 8 */
diff --git a/shaders/render/exa_wm_src_sample_planar.g4b b/shaders/render/exa_wm_src_sample_planar.g4b
new file mode 100644 (file)
index 0000000..77a5c23
--- /dev/null
@@ -0,0 +1,4 @@
+   { 0x00000201, 0x20080061, 0x00000000, 0x0000e000 },
+   { 0x01800031, 0x22001d29, 0x008d0000, 0x02520001 },
+   { 0x01800031, 0x21c01d29, 0x008d0000, 0x02520203 },
+   { 0x01800031, 0x22401d29, 0x008d0000, 0x02520405 },
diff --git a/shaders/render/exa_wm_write.g4a b/shaders/render/exa_wm_write.g4a
new file mode 100644 (file)
index 0000000..2cb3d89
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+
+include(`exa_wm.g4i')
+
+/*
+ * Prepare data in m2-m5 for subspan(1,0), m6-m9 for subspan(3,2),
+ *
+ * Note that the SIMD16 write message takes data for the first
+ * two sub-spans followed by the data for the second two sub-spans
+ * instead of having the two sub-spans interleaved by channel. Weird.
+ */
+
+mov (8) data_port_r_01<1>F     g14<8,8,1>F { align1 };
+mov (8) data_port_g_01<1>F     g16<8,8,1>F { align1 };
+mov (8) data_port_b_01<1>F     g18<8,8,1>F { align1 };
+mov (8) data_port_a_01<1>F     src_sample_a_01<8,8,1>F { align1 };
+
+mov (8) data_port_r_23<1>F     src_sample_r_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_g_23<1>F     src_sample_g_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_b_23<1>F     src_sample_b_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_a_23<1>F     src_sample_a_23<8,8,1>F { sechalf align1 };
+
+
+mov (8) data_port_r_01<1>F     src_sample_r_01<8,8,1>F { align1 };
+mov (8) data_port_g_01<1>F     src_sample_g_01<8,8,1>F { align1 };
+mov (8) data_port_b_01<1>F     src_sample_b_01<8,8,1>F { align1 };
+mov (8) data_port_a_01<1>F     src_sample_a_01<8,8,1>F { align1 };
+
+mov (8) data_port_r_23<1>F     src_sample_r_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_g_23<1>F     src_sample_g_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_b_23<1>F     src_sample_b_23<8,8,1>F { sechalf align1 };
+mov (8) data_port_a_23<1>F     src_sample_a_23<8,8,1>F { sechalf align1 };
+
+/* m0, m1 are all direct passed by PS thread payload */
+mov (8) data_port_msg_1<1>UD   g1<8,8,1>UD             { mask_disable align1 };
+
+/* write */
+send (16) 
+       data_port_msg_0_ind 
+       acc0<1>UW 
+       g0<8,8,1>UW 
+       write (
+              0,  /* binding_table */
+              8,  /* pixel scordboard clear, msg type simd16 single source */
+              4,  /* render target write */
+              0   /* no write commit message */
+       ) 
+       mlen 10
+       rlen 0
+       { align1 EOT };
+
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
+nop;
+
diff --git a/shaders/render/exa_wm_write.g4b b/shaders/render/exa_wm_write.g4b
new file mode 100644 (file)
index 0000000..b7dcd16
--- /dev/null
@@ -0,0 +1,26 @@
+   { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 },
+   { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 },
+   { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 },
+   { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 },
+   { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 },
+   { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 },
+   { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 },
+   { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 },
+   { 0x00600001, 0x204003be, 0x008d01c0, 0x00000000 },
+   { 0x00600001, 0x206003be, 0x008d0200, 0x00000000 },
+   { 0x00600001, 0x208003be, 0x008d0240, 0x00000000 },
+   { 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 },
+   { 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 },
+   { 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 },
+   { 0x00601001, 0x210003be, 0x008d0260, 0x00000000 },
+   { 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 },
+   { 0x00600201, 0x20200022, 0x008d0020, 0x00000000 },
+   { 0x00800031, 0x24001d28, 0x008d0000, 0x85a04800 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+   { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
diff --git a/shaders/render/exa_wm_xy.g4a b/shaders/render/exa_wm_xy.g4a
new file mode 100644 (file)
index 0000000..e99f5ac
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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:
+ *    Wang Zhenyu <zhenyu.z.wang@intel.com>
+ *    Keith Packard <keithp@keithp.com>
+ */
+/*
+ * Register assignments:
+ *
+ *  x              g6/g7
+ *  y              g8/g9
+ *
+ *  temp x         g10/g11
+ *  temp y         g12/g13
+ *
+ *  src w          g14/g15
+ *  src u          m1/m2
+ *  src v          m3/m4
+ */
+/* Fragment to compute per-pixel XY values */
+
+include(`exa_wm.g4i')
+    
+    /* Load X and Y coordinates and compute per-pixel coordinates */
+add (16)       temp_x_uw<1>UW  dst_x_uw                0x10101010V     { align1 };
+add (16)       temp_y_uw<1>UW  dst_y_uw                0x11001100V     { align1 };
+
+    /* subtract screen-space origin of vertex 0 */
+add (16)       dst_x<1>F       temp_x_uw<8,8,1>UW      -screen_x0      { compr align1 };
+add (16)       dst_y<1>F       temp_y_uw<8,8,1>UW      -screen_y0      { compr align1 };
diff --git a/shaders/render/exa_wm_xy.g4b b/shaders/render/exa_wm_xy.g4b
new file mode 100644 (file)
index 0000000..327fc29
--- /dev/null
@@ -0,0 +1,4 @@
+   { 0x00800040, 0x23c06d29, 0x00480028, 0x10101010 },
+   { 0x00800040, 0x23806d29, 0x0048002a, 0x11001100 },
+   { 0x00802040, 0x2100753d, 0x008d03c0, 0x00004020 },
+   { 0x00802040, 0x2140753d, 0x008d0380, 0x00004024 },
diff --git a/shaders/render/exa_wm_yuv_rgb.g4a b/shaders/render/exa_wm_yuv_rgb.g4a
new file mode 100644 (file)
index 0000000..c16037e
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * 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:
+ *    Keith Packard <keithp@keithp.com>
+ *    Eric Anholt <eric@anholt.net>
+ *
+ */
+
+include(`exa_wm.g4i')
+
+define(`YCbCr_base',   `src_sample_base')
+
+define(`Cr',           `src_sample_r')
+define(`Cr_01',                `src_sample_r_01')
+define(`Cr_23',                `src_sample_r_23')
+
+define(`Y',            `src_sample_g')
+define(`Y_01',         `src_sample_g_01')
+define(`Y_23',         `src_sample_g_23')
+
+define(`Cb',           `src_sample_b')
+define(`Cb_01',                `src_sample_b_01')
+define(`Cb_23',                `src_sample_b_23')
+
+define(`Crn',          `mask_sample_r')
+define(`Crn_01',       `mask_sample_r_01')
+define(`Crn_23',       `mask_sample_r_23')
+
+define(`Yn',           `mask_sample_g')
+define(`Yn_01',                `mask_sample_g_01')
+define(`Yn_23',                `mask_sample_g_23')
+
+define(`Cbn',          `mask_sample_b')
+define(`Cbn_01',       `mask_sample_b_01')
+define(`Cbn_23',       `mask_sample_b_23')
+
+    /* color space conversion function:
+     * R = Clamp ( 1.164(Y-16/255) + 1.596(Cr-128/255), 0, 1)
+     * G = Clamp ( 1.164(Y-16/255) - 0.813(Cr-128/255) - 0.392(Cb-128/255), 0, 1)
+     * B = Clamp ( 1.164(Y-16/255) + 2.017(Cb-128/255), 0, 1)
+     */
+
+    /* Normalize Y, Cb and Cr:
+     *
+     * Yn = (Y - 16/255) * 1.164
+     * Crn = Cr - 128 / 255
+     * Cbn = Cb - 128 / 255
+     */
+add (16)    Yn<1>F             Y<8,8,1>F       -0.0627451F { compr align1 };
+mul (16)    Yn<1>F             Yn<8,8,1>F      1.164F      { compr align1 };
+
+add (16)    Crn<1>F            Cr<8,8,1>F      -0.501961F  { compr align1 };
+
+add (16)    Cbn<1>F            Cb<8,8,1>F      -0.501961F  { compr align1 };
+
+    /* 
+     * R = Y + Cr * 1.596
+     */
+mov (16)    acc0<1>F           Yn<8,8,1>F                  { compr align1 };
+mac.sat(16) src_sample_r<1>F   Crn<8,8,1>F     1.596F      { compr align1 };
+     
+    /*
+     * G = Crn * -0.813 + Cbn * -0.392 + Y
+     */
+mov (16)    acc0<1>F           Yn<8,8,1>F                  { compr align1 };
+mac (16)    acc0<1>F           Crn<8,8,1>F     -0.813F     { compr align1 };
+mac.sat(16) src_sample_g<1>F   Cbn<8,8,1>F     -0.392F     { compr align1 };
+
+    /*
+     * B = Cbn * 2.017 + Y
+     */
+mov (16)    acc0<1>F           Yn<8,8,1>F                  { compr align1 };
+mac.sat(16) src_sample_b<1>F   Cbn<8,8,1>F     2.017F      { compr align1 };
+
+    /*
+     * A = 1.0
+     */
+//mov (16)    src_sample_a<1>F 1.0F                        { compr align1 };
diff --git a/shaders/render/exa_wm_yuv_rgb.g4b b/shaders/render/exa_wm_yuv_rgb.g4b
new file mode 100644 (file)
index 0000000..ce19e1a
--- /dev/null
@@ -0,0 +1,11 @@
+   { 0x00802040, 0x23007fbd, 0x008d0200, 0xbd808081 },
+   { 0x00802041, 0x23007fbd, 0x008d0300, 0x3f94fdf4 },
+   { 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbf008084 },
+   { 0x00802040, 0x23407fbd, 0x008d0240, 0xbf008084 },
+   { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
+   { 0x80802048, 0x21c07fbd, 0x008d02c0, 0x3fcc49ba },
+   { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
+   { 0x00802048, 0x24007fbc, 0x008d02c0, 0xbf5020c5 },
+   { 0x80802048, 0x22007fbd, 0x008d0340, 0xbec8b439 },
+   { 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
+   { 0x80802048, 0x22407fbd, 0x008d0340, 0x40011687 },
diff --git a/shaders/vld/Makefile b/shaders/vld/Makefile
new file mode 100644 (file)
index 0000000..c0bda3a
--- /dev/null
@@ -0,0 +1,384 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# i965_drv_video/shaders/vld/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/libva
+pkglibdir = $(libdir)/libva
+pkgincludedir = $(includedir)/libva
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+subdir = i965_drv_video/shaders/vld
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = aclocal -I /opt/X11R7/share/aclocal
+AMTAR = ${SHELL} /root/libva/missing --run tar
+AR = ar
+AUTOCONF = ${SHELL} /root/libva/missing --run autoconf
+AUTOHEADER = ${SHELL} /root/libva/missing --run autoheader
+AUTOMAKE = ${SHELL} /root/libva/missing --run automake-1.10
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DRM_CFLAGS = -I/opt/X11R7/include -I/opt/X11R7/include/drm  
+DRM_LIBS = -L/opt/X11R7/lib -ldrm  
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+F77 = gfortran
+FFLAGS = -g -O2
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /root/libva/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = libva
+PACKAGE_BUGREPORT = waldo.bastian@intel.com
+PACKAGE_NAME = libva
+PACKAGE_STRING = libva 0.29
+PACKAGE_TARNAME = libva
+PACKAGE_VERSION = 0.29
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+RANLIB = ranlib
+SED = /bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+VERSION = 0.29
+abs_builddir = /root/libva/i965_drv_video/shaders/vld
+abs_srcdir = /root/libva/i965_drv_video/shaders/vld
+abs_top_builddir = /root/libva
+abs_top_srcdir = /root/libva
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+gen4asm = no
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /root/libva/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgconfigdir = ${exec_prefix}/lib/pkgconfig
+prefix = /opt/X11R7
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_builddir = ../../..
+top_srcdir = ../../..
+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 = ipicture.g4a       \
+           lib.g4a             \
+           frame_forward.g4a   \
+           frame_backward.g4a  \
+           frame_f_b.g4a       \
+           field_forward.g4a   \
+           field_backward.g4a  \
+           field_f_b.g4a       
+
+INTEL_G4B = ipicture.g4b       \
+           lib.g4b             \
+           frame_forward.g4b   \
+           frame_backward.g4b  \
+           frame_f_b.g4b       \
+           field_forward.g4b   \
+           field_backward.g4b  \
+           field_f_b.g4b
+
+EXTRA_DIST = $(INTEL_G4I)      \
+            $(INTEL_G4A)       \
+            $(INTEL_G4B)    
+
+#SUFFIXES = .g4a .g4b
+#BUILT_SOURCES = $(INTEL_G4B)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .g4a .g4b
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+               && exit 0; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  i965_drv_video/shaders/vld/Makefile'; \
+       cd $(top_srcdir) && \
+         $(AUTOMAKE) --gnu  i965_drv_video/shaders/vld/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+           fi; \
+           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile
+installdirs:
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean-local:
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-am
+       -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+       clean-local distclean distclean-generic distclean-libtool \
+       distdir dvi dvi-am html html-am info info-am install \
+       install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+       uninstall uninstall-am
+
+#.g4a.g4b:
+#      m4 $*.g4a > $*.g4m && intel-gen4asm -o $@ $*.g4m && rm $*.g4m
+
+#$(INTEL_G4B): $(INTEL_G4I)
+
+#clean-local:
+#      -rm -f $(INTEL_G4B)
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT: