summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2013-01-10 15:25:24 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-01-17 13:08:40 +0800
commit481063446a997d886ccdfa3be308763c15c0a8a2 (patch)
tree37b1272c7851a4dab4633c2b901d69b279104df3 /src
parente57a0155c5cd3ee842664f84b464f489ff11f6e1 (diff)
downloadvaapi-intel-driver-481063446a997d886ccdfa3be308763c15c0a8a2.tar.gz
vaapi-intel-driver-481063446a997d886ccdfa3be308763c15c0a8a2.tar.bz2
vaapi-intel-driver-481063446a997d886ccdfa3be308763c15c0a8a2.zip
Add the bidirectional MVP to optimize the VME parameter on Ivb
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/gen6_mfc.c4
-rw-r--r--src/gen7_mfc.c10
-rw-r--r--src/gen7_vme.c77
-rw-r--r--src/shaders/vme/Makefile.am6
-rw-r--r--src/shaders/vme/inter_bframe_ivb.asm721
-rw-r--r--src/shaders/vme/inter_bframe_ivb.g7a2
-rw-r--r--src/shaders/vme/inter_bframe_ivb.g7b371
7 files changed, 1168 insertions, 23 deletions
diff --git a/src/gen6_mfc.c b/src/gen6_mfc.c
index f58b9f1..82c7406 100644
--- a/src/gen6_mfc.c
+++ b/src/gen6_mfc.c
@@ -360,6 +360,7 @@ gen6_mfc_avc_slice_state(VADriverContextP ctx,
int weighted_pred_idc = 0;
unsigned int luma_log2_weight_denom = slice_param->luma_log2_weight_denom;
unsigned int chroma_log2_weight_denom = slice_param->chroma_log2_weight_denom;
+ int bslice = 0;
if (batch == NULL)
batch = encoder_context->base.batch;
@@ -374,6 +375,7 @@ gen6_mfc_avc_slice_state(VADriverContextP ctx,
weighted_pred_idc = pic_param->pic_fields.bits.weighted_pred_flag;
} else if (slice_type == SLICE_TYPE_B) {
weighted_pred_idc = pic_param->pic_fields.bits.weighted_bipred_idc;
+ bslice = 1;
if (weighted_pred_idc == 2) {
/* 8.4.3 - Derivation process for prediction weights (8-279) */
@@ -402,7 +404,7 @@ gen6_mfc_avc_slice_state(VADriverContextP ctx,
OUT_BCS_BATCH(batch, 0); /*no reference frames and pred_weight_table*/
} else {
OUT_BCS_BATCH(batch,
- (1 << 16) | /*1 reference frame*/
+ (1 << 16) | (bslice << 24) | /*1 reference frame*/
(chroma_log2_weight_denom << 8) |
(luma_log2_weight_denom << 0));
}
diff --git a/src/gen7_mfc.c b/src/gen7_mfc.c
index 1b6f6a7..620d2d6 100644
--- a/src/gen7_mfc.c
+++ b/src/gen7_mfc.c
@@ -181,11 +181,13 @@ gen7_mfc_avc_img_state(VADriverContextP ctx, struct encode_state *encode_state,
BEGIN_BCS_BATCH(batch, 16);
OUT_BCS_BATCH(batch, MFX_AVC_IMG_STATE | (16 - 2));
+ /*DW1 frame size */
OUT_BCS_BATCH(batch,
((width_in_mbs * height_in_mbs) & 0xFFFF));
OUT_BCS_BATCH(batch,
((height_in_mbs - 1) << 16) |
((width_in_mbs - 1) << 0));
+ /*DW3 Qp setting */
OUT_BCS_BATCH(batch,
(0 << 24) | /* Second Chroma QP Offset */
(0 << 16) | /* Chroma QP Offset */
@@ -211,17 +213,21 @@ gen7_mfc_avc_img_state(VADriverContextP ctx, struct encode_state *encode_state,
(1 << 2) | /* Frame MB only flag */
(0 << 1) | /* MBAFF mode is in active */
(0 << 0)); /* Field picture flag */
+ /*DW5 trequllis quantization */
OUT_BCS_BATCH(batch, 0); /* Mainly about MB rate control and debug, just ignoring */
OUT_BCS_BATCH(batch, /* Inter and Intra Conformance Max size limit */
(0xBB8 << 16) | /* InterMbMaxSz */
(0xEE8) ); /* IntraMbMaxSz */
+ /* DW7 */
OUT_BCS_BATCH(batch, 0); /* Reserved */
OUT_BCS_BATCH(batch, 0); /* Slice QP Delta for bitrate control */
- OUT_BCS_BATCH(batch, 0); /* Slice QP Delta for bitrate control */
+ OUT_BCS_BATCH(batch, 0); /* Slice QP Delta for bitrate control */
+ /* DW10 frame bit setting */
OUT_BCS_BATCH(batch, 0x8C000000);
OUT_BCS_BATCH(batch, 0x00010000);
OUT_BCS_BATCH(batch, 0);
- OUT_BCS_BATCH(batch, 0);
+ /* DW13 Ref setting */
+ OUT_BCS_BATCH(batch, 0x02010100);
OUT_BCS_BATCH(batch, 0);
OUT_BCS_BATCH(batch, 0);
diff --git a/src/gen7_vme.c b/src/gen7_vme.c
index f39b325..9880eab 100644
--- a/src/gen7_vme.c
+++ b/src/gen7_vme.c
@@ -67,6 +67,7 @@ enum AVC_VME_KERNEL_TYPE{
AVC_VME_INTRA_SHADER = 0,
AVC_VME_INTER_SHADER,
AVC_VME_BATCHBUFFER,
+ AVC_VME_BINTER_SHADER,
AVC_VME_KERNEL_SUM
};
@@ -92,6 +93,10 @@ static const uint32_t gen7_vme_batchbuffer[][4] = {
#include "shaders/vme/batchbuffer.g7b"
};
+static const uint32_t gen7_vme_binter_frame[][4] = {
+#include "shaders/vme/inter_bframe_ivb.g7b"
+};
+
static struct i965_kernel gen7_vme_kernels[] = {
{
"AVC VME Intra Frame",
@@ -114,6 +119,13 @@ static struct i965_kernel gen7_vme_kernels[] = {
sizeof(gen7_vme_batchbuffer),
NULL
},
+ {
+ "AVC VME binter Frame",
+ AVC_VME_BINTER_SHADER,
+ gen7_vme_binter_frame,
+ sizeof(gen7_vme_binter_frame),
+ NULL
+ }
};
static const uint32_t gen7_vme_mpeg2_inter_frame[][4] = {
@@ -428,6 +440,7 @@ static VAStatus gen7_vme_avc_state_setup(VADriverContextP ctx,
unsigned int *vme_state_message;
unsigned int *mb_cost_table;
int i;
+ VAEncSliceParameterBufferH264 *slice_param = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[0]->buffer;
mb_cost_table = (unsigned int *)vme_context->vme_state_message;
//building VME state message
@@ -435,20 +448,38 @@ static VAStatus gen7_vme_avc_state_setup(VADriverContextP ctx,
assert(vme_context->vme_state.bo->virtual);
vme_state_message = (unsigned int *)vme_context->vme_state.bo->virtual;
- vme_state_message[0] = 0x01010101;
- vme_state_message[1] = 0x10010101;
- vme_state_message[2] = 0x0F0F0F0F;
- vme_state_message[3] = 0x100F0F0F;
- vme_state_message[4] = 0x01010101;
- vme_state_message[5] = 0x10010101;
- vme_state_message[6] = 0x0F0F0F0F;
- vme_state_message[7] = 0x100F0F0F;
- vme_state_message[8] = 0x01010101;
- vme_state_message[9] = 0x10010101;
- vme_state_message[10] = 0x0F0F0F0F;
- vme_state_message[11] = 0x000F0F0F;
- vme_state_message[12] = 0x00;
- vme_state_message[13] = 0x00;
+ if ((slice_param->slice_type == SLICE_TYPE_P) ||
+ (slice_param->slice_type == SLICE_TYPE_SP)) {
+ vme_state_message[0] = 0x01010101;
+ vme_state_message[1] = 0x10010101;
+ vme_state_message[2] = 0x0F0F0F0F;
+ vme_state_message[3] = 0x100F0F0F;
+ vme_state_message[4] = 0x01010101;
+ vme_state_message[5] = 0x10010101;
+ vme_state_message[6] = 0x0F0F0F0F;
+ vme_state_message[7] = 0x100F0F0F;
+ vme_state_message[8] = 0x01010101;
+ vme_state_message[9] = 0x10010101;
+ vme_state_message[10] = 0x0F0F0F0F;
+ vme_state_message[11] = 0x000F0F0F;
+ vme_state_message[12] = 0x00;
+ vme_state_message[13] = 0x00;
+ } else {
+ vme_state_message[0] = 0x10010101;
+ vme_state_message[1] = 0x100F0F0F;
+ vme_state_message[2] = 0x10010101;
+ vme_state_message[3] = 0x000F0F0F;
+ vme_state_message[4] = 0;
+ vme_state_message[5] = 0;
+ vme_state_message[6] = 0;
+ vme_state_message[7] = 0;
+ vme_state_message[8] = 0;
+ vme_state_message[9] = 0;
+ vme_state_message[10] = 0;
+ vme_state_message[11] = 0;
+ vme_state_message[12] = 0;
+ vme_state_message[13] = 0;
+ }
vme_state_message[14] = (mb_cost_table[2] & 0xFFFF);
vme_state_message[15] = 0;
@@ -780,11 +811,11 @@ static void gen7_vme_pipeline_programing(VADriverContextP ctx,
VAEncPictureParameterBufferH264 *pPicParameter = (VAEncPictureParameterBufferH264 *)encode_state->pic_param_ext->buffer;
VAEncSliceParameterBufferH264 *pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[0]->buffer;
VAEncSequenceParameterBufferH264 *pSequenceParameter = (VAEncSequenceParameterBufferH264 *)encode_state->seq_param_ext->buffer;
- int is_intra = pSliceParameter->slice_type == SLICE_TYPE_I;
int width_in_mbs = pSequenceParameter->picture_width_in_mbs;
int height_in_mbs = pSequenceParameter->picture_height_in_mbs;
int s;
bool allow_hwscore = true;
+ int kernel_shader;
for (s = 0; s < encode_state->num_slice_params_ext; s++) {
pSliceParameter = (VAEncSliceParameterBufferH264 *)encode_state->slice_params_ext[s]->buffer;
@@ -794,11 +825,23 @@ static void gen7_vme_pipeline_programing(VADriverContextP ctx,
}
}
+ if ((pSliceParameter->slice_type == SLICE_TYPE_I) ||
+ (pSliceParameter->slice_type == SLICE_TYPE_I)) {
+ kernel_shader = AVC_VME_INTRA_SHADER;
+ } else if ((pSliceParameter->slice_type == SLICE_TYPE_P) ||
+ (pSliceParameter->slice_type == SLICE_TYPE_SP)) {
+ kernel_shader = AVC_VME_INTER_SHADER;
+ } else {
+ kernel_shader = AVC_VME_BINTER_SHADER;
+ if (!allow_hwscore)
+ kernel_shader = AVC_VME_INTER_SHADER;
+ }
+
if (allow_hwscore)
gen7_vme_walker_fill_vme_batchbuffer(ctx,
encode_state,
width_in_mbs, height_in_mbs,
- is_intra ? AVC_VME_INTRA_SHADER : AVC_VME_INTER_SHADER,
+ kernel_shader,
pPicParameter->pic_fields.bits.transform_8x8_mode_flag,
encoder_context);
@@ -806,7 +849,7 @@ static void gen7_vme_pipeline_programing(VADriverContextP ctx,
gen7_vme_fill_vme_batchbuffer(ctx,
encode_state,
width_in_mbs, height_in_mbs,
- is_intra ? AVC_VME_INTRA_SHADER : AVC_VME_INTER_SHADER,
+ kernel_shader,
pPicParameter->pic_fields.bits.transform_8x8_mode_flag,
encoder_context);
diff --git a/src/shaders/vme/Makefile.am b/src/shaders/vme/Makefile.am
index 22b3b00..e5c311a 100644
--- a/src/shaders/vme/Makefile.am
+++ b/src/shaders/vme/Makefile.am
@@ -1,5 +1,5 @@
VME_CORE = batchbuffer.asm intra_frame.asm inter_frame.asm
-VME7_CORE = batchbuffer.asm intra_frame_ivb.asm inter_frame_ivb.asm
+VME7_CORE = batchbuffer.asm intra_frame_ivb.asm inter_frame_ivb.asm inter_bframe_ivb..asm
VME75_CORE = batchbuffer.asm intra_frame_haswell.asm inter_frame_haswell.asm inter_bframe_haswell.asm
INTEL_G6B = batchbuffer.g6b intra_frame.g6b inter_frame.g6b
@@ -7,8 +7,8 @@ INTEL_G6A = batchbuffer.g6a intra_frame.g6a inter_frame.g6a
INTEL_GEN6_INC = batchbuffer.inc vme.inc
INTEL_GEN6_ASM = $(INTEL_G6A:%.g6a=%.gen6.asm)
-INTEL_G7B = batchbuffer.g7b intra_frame.g7b inter_frame.g7b mpeg2_inter_frame.g7b intra_frame_ivb.g7b inter_frame_ivb.g7b
-INTEL_G7A = batchbuffer.g7a intra_frame.g7a inter_frame.g7a mpeg2_inter_frame.g7a intra_frame_ivb.g7a inter_frame_ivb.g7a
+INTEL_G7B = batchbuffer.g7b intra_frame.g7b inter_frame.g7b mpeg2_inter_frame.g7b intra_frame_ivb.g7b inter_frame_ivb.g7b inter_bframe_ivb.g7b
+INTEL_G7A = batchbuffer.g7a intra_frame.g7a inter_frame.g7a mpeg2_inter_frame.g7a intra_frame_ivb.g7a inter_frame_ivb.g7a inter_bframe_ivb.g7a
INTEL_GEN7_INC = batchbuffer.inc vme.inc vme7_mpeg2.inc vme7.inc
INTEL_GEN7_ASM = $(INTEL_G7A:%.g7a=%.gen7.asm)
diff --git a/src/shaders/vme/inter_bframe_ivb.asm b/src/shaders/vme/inter_bframe_ivb.asm
new file mode 100644
index 0000000..c8d9c16
--- /dev/null
+++ b/src/shaders/vme/inter_bframe_ivb.asm
@@ -0,0 +1,721 @@
+/*
+ * Copyright © <2010>, Intel Corporation.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at
+ * http://www.opensource.org/licenses/eclipse-1.0.php.
+ * Authors: Zhao Yakui <yakui.zhao@intel.com>
+ *
+ */
+// Modual name: InterFrame_ivy.asm
+//
+// Make intra predition estimation for Inter-B frame
+//
+
+//
+// Now, begin source code....
+//
+
+#define SAVE_RET add (1) RETURN_REG<1>:ud ip:ud 32:ud
+#define RETURN mov (1) ip:ud RETURN_REG<0,1,0>:ud
+
+/*
+ * __START
+ */
+__INTER_START:
+mov (16) tmp_reg0.0<1>:UD 0x0:UD {align1};
+mov (16) tmp_reg2.0<1>:UD 0x0:UD {align1};
+mov (16) tmp_reg4.0<1>:UD 0x0:UD {align1} ;
+mov (16) tmp_reg6.0<1>:UD 0x0:UD {align1} ;
+
+shl (2) read0_header.0<1>:D orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */
+add (1) read0_header.0<1>:D read0_header.0<0,1,0>:D -8:W {align1}; /* X offset */
+add (1) read0_header.4<1>:D read0_header.4<0,1,0>:D -1:W {align1}; /* Y offset */
+mov (1) read0_header.8<1>:UD BLOCK_32X1 {align1};
+mov (1) read0_header.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+
+shl (2) read1_header.0<1>:D orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */
+add (1) read1_header.0<1>:D read1_header.0<0,1,0>:D -4:W {align1}; /* X offset */
+mov (1) read1_header.8<1>:UD BLOCK_4X16 {align1};
+mov (1) read1_header.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+
+shl (2) vme_m0.8<1>:UW orig_xy_ub<2,2,1>:UB 4:UW {align1}; /* (x, y) * 16 */
+mov (1) vme_m0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+
+mul (1) obw_m0.8<1>:UD w_in_mb_uw<0,1,0>:UW orig_y_ub<0,1,0>:UB {align1};
+add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD orig_x_ub<0,1,0>:UB {align1};
+mul (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD INTER_VME_OUTPUT_IN_OWS:UD {align1};
+mov (1) obw_m0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+
+/*
+ * Media Read Message -- fetch Luma neighbor edge pixels
+ */
+/* ROW */
+mov (8) msg_reg0.0<1>:UD read0_header.0<8,8,1>:UD {align1};
+send (8) msg_ind INEP_ROW<1>:UB null read(BIND_IDX_INEP, 0, 0, 4) mlen 1 rlen 1 {align1};
+
+/* COL */
+mov (8) msg_reg0.0<1>:UD read1_header.0<8,8,1>:UD {align1};
+send (8) msg_ind INEP_COL0<1>:UB null read(BIND_IDX_INEP, 0, 0, 4) mlen 1 rlen 2 {align1};
+
+mov (8) mb_mvp_ref.0<1>:ud 0:ud {align1};
+mov (8) mb_ref_win.0<1>:ud 0:ud {align1};
+and.z.f0.0 (1) null:uw mb_hwdep<0,1,0>:uw 0x04:uw {align1};
+(f0.0) jmpi (1) __mb_hwdep_end;
+/* read back the data for MB A */
+/* the layout of MB result is: rx.0(Available). rx.4(MVa), rX.8(MVb), rX.16(Pred_L0 flag),
+* rX.18 (Pred_L1 flag), rX.20(Forward reference ID), rX.22(Backwared reference ID)
+*/
+mov (8) mba_result.0<1>:ud 0x0:ud {align1};
+mov (8) mbb_result.0<1>:ud 0x0:ud {align1};
+mov (8) mbc_result.0<1>:ud 0x0:ud {align1};
+mba_start:
+mov (8) mb_msg0.0<1>:ud 0:ud {align1};
+and.z.f0.0 (1) null:uw input_mb_intra_ub<0,1,0>:ub INTRA_PRED_AVAIL_FLAG_AE:uw {align1};
+/* MB A doesn't exist. Zero MV. mba_flag is zero and ref ID = -1 */
+(f0.0) mov (2) mba_result.20<1>:w -1:w {align1};
+(f0.0) jmpi (1) mbb_start;
+mov (1) mba_result.0<1>:d MB_AVAIL {align1};
+mov (2) tmp_reg0.0<1>:UW orig_xy_ub<2,2,1>:UB {align1};
+add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>:w -1:w {align1};
+mul (1) mb_msg0.8<1>:UD w_in_mb_uw<0,1,0>:UW tmp_reg0.2<0,1,0>:UW {align1};
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD tmp_reg0.0<0,1,0>:uw {align1};
+mul (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_IN_OWS:UD {align1};
+mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+mov (1) mb_msg_tmp.8<1>:ud mb_msg0.8<0,1,0>:ud {align1};
+
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_MV_IN_OWS:UD {align1};
+/* bind index 3, read 1 oword (16bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_wb.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_0,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 1
+ {align1};
+
+/* TODO: RefID is required after multi-references are added */
+and.z.f0.0 (1) null<1>:ud mb_mode_wb.0 <0,1,0>:ud INTRAMBFLAG_MASK:ud {align1} ;
+(-f0.0) mov (2) mba_result.20<1>:w -1:w {align1};
+(-f0.0) jmpi (1) mbb_start;
+
+mov (1) mb_msg0.8<1>:UD mb_msg_tmp.8<0,1,0>:ud {align1};
+/* Read MV for MB A */
+/* bind index 3, read 8 oword (128bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_mv0.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_8,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 4
+ {align1};
+/* TODO: RefID is required after multi-references are added */
+/* MV */
+mov (2) mba_result.4<1>:ud mb_mv1.8<2,2,1>:ud {align1};
+mov (2) mba_result.20<1>:w -1:w {align1};
+mov (1) INPUT_ARG0.0<1>:ud mb_mode_wb.4<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.4<1>:ud mb_mode_wb.0<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.8<1>:ud INTER_BLOCK1:ud {align1};
+SAVE_RET {align1};
+jmpi (1) mb_pred_func;
+mov (1) mb_pred_mode.0<1>:uw RET_ARG<0,1,0>:uw {align1};
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L0 {align1};
+(f0.0) mov (1) mba_result.16<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mba_result.20<1>:w 0:w {align1};
+(f0.0) jmpi (1) mbb_start;
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L1 {align1};
+(f0.0) mov (1) mba_result.18<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mba_result.22<1>:w 0:w {align1};
+(f0.0) jmpi (1) mbb_start;
+mov (2) mba_result.16<1>:uw MB_PRED_FLAG {align1};
+mov (2) mba_result.20<1>:w 0:w {align1};
+
+mbb_start:
+mov (8) mb_msg0.0<1>:ud 0:ud {align1};
+and.z.f0.0 (1) null:uw input_mb_intra_ub<0,1,0>:ub INTRA_PRED_AVAIL_FLAG_B:uw {align1};
+/* MB B doesn't exist. Zero MV. mba_flag is zero */
+/* If MB B doesn't exist, neither MB C nor D exists */
+(f0.0) mov (2) mbb_result.20<1>:w -1:w {align1};
+(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1};
+(f0.0) jmpi (1) mb_mvp_start;
+mov (1) mbb_result.0<1>:d MB_AVAIL {align1};
+mov (2) tmp_reg0.0<1>:UW orig_xy_ub<2,2,1>:UB {align1};
+add (1) tmp_reg0.2<1>:w tmp_reg0.2<0,1,0>:w -1:w {align1};
+mul (1) mb_msg0.8<1>:UD w_in_mb_uw<0,1,0>:UW tmp_reg0.2<0,1,0>:UW {align1};
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD tmp_reg0.0<0,1,0>:uw {align1};
+mul (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_IN_OWS:UD {align1};
+mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+mov (1) mb_msg_tmp.8<1>:ud mb_msg0.8<0,1,0>:ud {align1};
+
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_MV_IN_OWS:UD {align1};
+
+/* bind index 3, read 4 oword (64bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_wb.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_0,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 1
+ {align1};
+
+/* TODO: RefID is required after multi-references are added */
+and.z.f0.0 (1) null<1>:ud mb_mode_wb.0 <0,1,0>:ud INTRAMBFLAG_MASK:ud {align1} ;
+(-f0.0) mov (2) mbb_result.20<1>:w -1:w {align1};
+(-f0.0) jmpi (1) mbc_start;
+
+mov (1) mb_msg0.8<1>:UD mb_msg_tmp.8<0,1,0>:ud {align1};
+/* Read MV for MB B */
+/* bind index 3, read 8 oword (128bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_mv0.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_8,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 4
+ {align1};
+/* TODO: RefID is required after multi-references are added */
+
+mov (2) mbb_result.4<1>:ud mb_mv2.16<2,2,1>:ud {align1};
+mov (2) mbb_result.20<1>:w -1:w {align1};
+mov (1) INPUT_ARG0.0<1>:ud mb_mode_wb.4<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.4<1>:ud mb_mode_wb.0<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.8<1>:ud INTER_BLOCK2:ud {align1};
+SAVE_RET {align1};
+jmpi (1) mb_pred_func;
+mov (1) mb_pred_mode.0<1>:uw RET_ARG<0,1,0>:uw {align1};
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L0 {align1};
+(f0.0) mov (1) mbb_result.16<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbb_result.20<1>:w 0:w {align1};
+(f0.0) jmpi (1) mbc_start;
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L1 {align1};
+(f0.0) mov (1) mbb_result.18<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbb_result.22<1>:w 0:w {align1};
+(f0.0) jmpi (1) mbc_start;
+mov (2) mbb_result.16<1>:uw MB_PRED_FLAG {align1};
+
+mbc_start:
+mov (8) mb_msg0.0<1>:ud 0:ud {align1};
+and.z.f0.0 (1) null:uw input_mb_intra_ub<0,1,0>:ub INTRA_PRED_AVAIL_FLAG_C:uw {align1};
+/* MB C doesn't exist. Zero MV. mba_flag is zero */
+/* Based on h264 spec the MB D will be replaced if MB C doesn't exist */
+(f0.0) jmpi (1) mbd_start;
+mov (1) mbc_result.0<1>:d MB_AVAIL {align1};
+mov (2) tmp_reg0.0<1>:UW orig_xy_ub<2,2,1>:UB {align1};
+add (1) tmp_reg0.2<1>:w tmp_reg0.2<0,1,0>:w -1:w {align1};
+add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>:w 1:w {align1};
+mul (1) mb_msg0.8<1>:UD w_in_mb_uw<0,1,0>:UW tmp_reg0.2<0,1,0>:UW {align1};
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD tmp_reg0.0<0,1,0>:uw {align1};
+mul (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_IN_OWS:UD {align1};
+mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+
+mov (1) mb_msg_tmp.8<1>:ud mb_msg0.8<0,1,0>:ud {align1};
+
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_MV_IN_OWS:UD {align1};
+/* bind index 3, read 4 oword (64bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_wb.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_0,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 1
+ {align1};
+
+/* TODO: RefID is required after multi-references are added */
+and.z.f0.0 (1) null<1>:ud mb_mode_wb.0 <0,1,0>:ud INTRAMBFLAG_MASK:ud {align1} ;
+(-f0.0) mov (2) mbc_result.20<1>:w -1:w {align1};
+(-f0.0) jmpi (1) mb_mvp_start;
+mov (1) mb_msg0.8<1>:UD mb_msg_tmp.8<0,1,0>:ud {align1};
+/* Read MV for MB C */
+/* bind index 3, read 8 oword (128bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_mv0.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_8,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 4
+ {align1};
+/* TODO: RefID is required after multi-references are added */
+/* Forward MV */
+mov (2) mbc_result.4<1>:ud mb_mv2.16<2,2,1>:ud {align1};
+mov (2) mbc_result.20<1>:w -1:w {align1};
+mov (1) INPUT_ARG0.0<1>:ud mb_mode_wb.4<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.4<1>:ud mb_mode_wb.0<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.8<1>:ud INTER_BLOCK2:ud {align1};
+SAVE_RET {align1};
+jmpi (1) mb_pred_func;
+mov (1) mb_pred_mode.0<1>:uw RET_ARG<0,1,0>:uw {align1};
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L0 {align1};
+(f0.0) mov (1) mbc_result.16<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbc_result.20<1>:w 0:w {align1};
+(f0.0) jmpi (1) mb_mvp_start;
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L1 {align1};
+(f0.0) mov (1) mbc_result.18<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbc_result.22<1>:w 0:w {align1};
+(f0.0) jmpi (1) mb_mvp_start;
+mov (2) mbc_result.16<1>:uw MB_PRED_FLAG {align1};
+mov (2) mbc_result.20<1>:w 0:w {align1};
+
+jmpi (1) mb_mvp_start;
+mbd_start:
+mov (1) mbc_result.0<1>:d MB_AVAIL {align1};
+mov (2) tmp_reg0.0<1>:UW orig_xy_ub<2,2,1>:UB {align1};
+add (2) tmp_reg0.0<1>:w tmp_reg0.0<2,2,1>:w -1:w {align1};
+mul (1) mb_msg0.8<1>:UD w_in_mb_uw<0,1,0>:UW tmp_reg0.2<0,1,0>:UW {align1};
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD tmp_reg0.0<0,1,0>:uw {align1};
+
+mul (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_IN_OWS:UD {align1};
+mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */
+mov (1) mb_msg_tmp.8<1>:ud mb_msg0.8<0,1,0>:ud {align1};
+
+add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:UD INTER_VME_OUTPUT_MV_IN_OWS:UD {align1};
+/* bind index 3, read 4 oword (64bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_wb.0<1>:ud
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_0,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 1
+ {align1};
+
+and.z.f0.0 (1) null<1>:ud mb_mode_wb.0 <0,1,0>:ud INTRAMBFLAG_MASK:ud {align1} ;
+(-f0.0) mov (2) mbc_result.20<1>:w -1:w {align1};
+(-f0.0) jmpi (1) mb_mvp_start;
+
+mov (1) mb_msg0.8<1>:UD mb_msg_tmp.8<0,1,0>:ud {align1};
+/* Read MV for MB D */
+/* bind index 3, read 8 oword (128bytes), msg type: 0(OWord Block Read) */
+send (16)
+ mb_ind
+ mb_mv0.0<1>:ub
+ NULL
+ data_port(
+ OBR_CACHE_TYPE,
+ OBR_MESSAGE_TYPE,
+ OBR_CONTROL_8,
+ OBR_BIND_IDX,
+ OBR_WRITE_COMMIT_CATEGORY,
+ OBR_HEADER_PRESENT
+ )
+ mlen 1
+ rlen 4
+ {align1};
+
+/* TODO: RefID is required after multi-references are added */
+
+/* Forward MV */
+mov (2) mbc_result.4<1>:ud mb_mv3.24<2,2,1>:ud {align1};
+mov (2) mbc_result.20<1>:w -1:w {align1};
+mov (1) INPUT_ARG0.0<1>:ud mb_mode_wb.4<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.4<1>:ud mb_mode_wb.0<0,1,0>:ud {align1};
+mov (1) INPUT_ARG0.8<1>:ud INTER_BLOCK3:ud {align1};
+SAVE_RET {align1};
+jmpi (1) mb_pred_func;
+mov (1) mb_pred_mode.0<1>:uw RET_ARG<0,1,0>:uw {align1};
+mov (1) mbc_result.18<1>:w MB_PRED_FLAG {align1};
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L0 {align1};
+(f0.0) mov (1) mbc_result.16<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbc_result.20<1>:w 0:w {align1};
+(f0.0) jmpi (1) mb_mvp_start;
+cmp.e.f0.0 (1) null:uw mb_pred_mode.0<0,1,0>:uw PRED_L1 {align1};
+(f0.0) mov (1) mbc_result.18<1>:uw MB_PRED_FLAG {align1};
+(f0.0) mov (1) mbc_result.22<1>:w 0:w {align1};
+(f0.0) jmpi (1) mb_mvp_start;
+mov (2) mbc_result.16<1>:uw MB_PRED_FLAG {align1};
+mov (2) mbc_result.20<1>:w 0:w {align1};
+
+mb_mvp_start:
+/*TODO: Add the skip prediction */
+/* Check whether both MB B and C are invailable */
+add (1) tmp_reg0.0<1>:d mbb_result.0<0,1,0>:d mbc_result.0<0,1,0>:d {align1};
+cmp.z.f0.0 (1) null:d tmp_reg0.0<0,1,0>:d 0:d {align1};
+(-f0.0) jmpi (1) mb_median_start;
+cmp.nz.f0.0 (1) null:d mba_result.0<0,1,0>:d 1:d {align1};
+(f0.0) mov (2) mbb_result.4<1>:ud mba_result.4<2,2,1>:ud {align1};
+(f0.0) mov (2) mbc_result.4<1>:ud mba_result.4<2,2,1>:ud {align1};
+(f0.0) mov (2) mbb_result.20<1>:uw mba_result.20<2,2,1>:uw {align1};
+(f0.0) mov (2) mbc_result.20<1>:uw mba_result.20<2,2,1>:uw {align1};
+(f0.0) mov (2) mb_mvp_ref.0<1>:ud mba_result.4<2,2,1>:ud {align1};
+(-f0.0) mov (2) mb_mvp_ref.0<1>:ud 0:ud {align1};
+jmpi (1) __mb_hwdep_end;
+
+mb_median_start:
+/* forward_MVP */
+/* check whether only one neighbour MB has the same ref ID with the current MB */
+mov (8) tmp_reg0.0<1>:ud 0:ud {align1};
+cmp.z.f0.0 (1) null:d mba_result.20<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mba_result.4<0,1,0>:ud {align1};
+cmp.z.f0.0 (1) null:d mbb_result.20<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mbb_result.4<0,1,0>:ud {align1};
+cmp.z.f0.0 (1) null:d mbc_result.20<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mbc_result.4<0,1,0>:ud {align1};
+cmp.e.f0.0 (1) null:d tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) mb_mvp_ref.0<1>:ud tmp_reg0.4<0,1,0>:ud {align1};
+(f0.0) jmpi (1) mvp_backward;
+
+mov (1) INPUT_ARG0.0<1>:w mba_result.4<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.4<1>:w mbb_result.4<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.8<1>:w mbc_result.4<0,1,0>:w {align1};
+SAVE_RET {align1};
+ jmpi (1) word_imedian;
+mov (1) mb_mvp_ref.0<1>:w RET_ARG<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.0<1>:w mba_result.6<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.4<1>:w mbb_result.6<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.8<1>:w mbc_result.6<0,1,0>:w {align1};
+SAVE_RET {align1};
+jmpi (1) word_imedian;
+mov (1) mb_mvp_ref.2<1>:w RET_ARG<0,1,0>:w {align1};
+
+
+mvp_backward:
+/* check whether only one neighbour MB has the same ref ID with the current MB */
+mov (8) tmp_reg0.0<1>:ud 0:ud {align1};
+cmp.z.f0.0 (1) null:d mba_result.22<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mba_result.8<0,1,0>:ud {align1};
+cmp.z.f0.0 (1) null:d mbb_result.22<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mbb_result.8<0,1,0>:ud {align1};
+cmp.z.f0.0 (1) null:d mbc_result.22<1>:w 0:w {align1};
+(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) tmp_reg0.4<1>:ud mbc_result.8<0,1,0>:ud {align1};
+cmp.e.f0.0 (1) null:d tmp_reg0.0<1>:w 1:w {align1};
+(f0.0) mov (1) mb_mvp_ref.4<1>:ud tmp_reg0.4<0,1,0>:ud {align1};
+(f0.0) jmpi (1) __mb_hwdep_end;
+
+mov (1) INPUT_ARG0.0<1>:w mba_result.8<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.4<1>:w mbb_result.8<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.8<1>:w mbc_result.8<0,1,0>:w {align1};
+SAVE_RET {align1};
+ jmpi (1) word_imedian;
+mov (1) mb_mvp_ref.4<1>:w RET_ARG<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.0<1>:w mba_result.10<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.4<1>:w mbb_result.10<0,1,0>:w {align1};
+mov (1) INPUT_ARG0.8<1>:w mbc_result.10<0,1,0>:w {align1};
+SAVE_RET {align1};
+jmpi (1) word_imedian;
+mov (1) mb_mvp_ref.6<1>:w RET_ARG<0,1,0>:w {align1};
+
+__mb_hwdep_end:
+asr (4) mb_ref_win.0<1>:w mb_mvp_ref.0<4,4,1>:w 2:w {align1};
+add (4) mb_ref_win.8<1>:w mb_ref_win.0<4,4,1>:w 3:w {align1};
+and (4) mb_ref_win.16<1>:uw mb_ref_win.8<4,4,1>:uw 0xFFFC:uw {align1};
+
+/* m2 */
+mov (8) vme_msg_2<1>:UD 0x0:UD {align1};
+
+/* m3 */
+mov (1) INEP_ROW.0<1>:UD 0x0:UD {align1};
+and (1) INEP_ROW.4<1>:UD INEP_ROW.4<0,1,0>:UD 0xFF000000:UD {align1};
+mov (8) vme_msg_3<1>:UD INEP_ROW.0<8,8,1>:UD {align1};
+
+/* m4 */
+mov (8) vme_msg_4<1>:UD 0x0 {align1};
+mov (16) vme_msg_4.0<1>:UB INEP_COL0.3<32,8,4>:UB {align1};
+mov (1) vme_msg_4.16<1>:UD INTRA_PREDICTORE_MODE {align1};
+
+
+/* m1 */
+mov (8) vme_m1.0<1>:ud 0x0:ud {align1};
+and.z.f0.0 (1) null<1>:UW transform_8x8_ub<0,1,0>:UB 1:UW {align1};
+(f0.0) mov (1) intra_part_mask_ub<1>:UB LUMA_INTRA_8x8_DISABLE:uw {align1};
+
+/* assign MB intra struct from the thread payload*/
+mov (1) mb_intra_struct_ub<1>:UB input_mb_intra_ub<0,1,0>:UB {align1};
+
+
+/* M0 */
+/* IME search */
+mov (1) vme_m0.12<1>:UD SEARCH_CTRL_DUAL_REFERENCE + INTER_PART_MASK + INTER_SAD_HAAR + SUB_PEL_MODE_QUARTER:UD {align1};
+/* 16x16 Source, 1/4 pixel, harr */
+mov (1) vme_m0.22<1>:UW DREF_REGION_SIZE {align1}; /* Reference Width&Height, 48x40 */
+
+mov (1) vme_m0.0<1>:UD vme_m0.8<0,1,0>:UD {align1};
+
+mov (1) vme_m0.0<1>:W -8:W {align1};
+mov (1) vme_m0.2<1>:W -8:W {align1};
+
+mov (1) vme_m0.4<1>:UD vme_m0.0<0,1,0>:UD {align1};
+and.z.f0.0 (1) null:uw input_mb_intra_ub<0,1,0>:ub INTRA_PRED_AVAIL_FLAG_AE:uw {align1};
+(f0.0) add (1) vme_m0.0<1>:w vme_m0.0<0,1,0>:w 4:w {align1};
+(f0.0) add (1) vme_m0.4<1>:w vme_m0.4<0,1,0>:w 4:w {align1};
+and.z.f0.0 (1) null:uw input_mb_intra_ub<0,1,0>:ub INTRA_PRED_AVAIL_FLAG_B:uw {align1};
+(f0.0) add (1) vme_m0.2<1>:w vme_m0.2<0,1,0>:w 4:w {align1};
+(f0.0) add (1) vme_m0.6<1>:w vme_m0.6<0,1,0>:w 4:w {align1};
+
+mov (1) vme_m0.4<1>:UD vme_m0.0<0,1,0>:UD {align1};
+
+add (2) vme_m0.0<1>:w vme_m0.0<2,2,1>:w mb_ref_win.16<2,2,1>:w {align1};
+add (2) vme_m0.4<1>:w vme_m0.4<2,2,1>:w mb_ref_win.20<2,2,1>:w {align1};
+mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1};
+
+/* m1 */
+
+mov (1) vme_m1.0<1>:UD ADAPTIVE_SEARCH_ENABLE:ud {align1} ;
+/* MV num is passed by constant buffer. R4.28 */
+mov (1) vme_m1.4<1>:UB r4.28<0,1,0>:UB {align1};
+add (1) vme_m1.4<1>:UD vme_m1.4<0,1,0>:UD FB_PRUNING_ENABLE:UD {align1};
+add (1) vme_m1.6<1>:uw vme_m1.6<0,1,0>:uw BI_WEIGHT {align1};
+
+
+mov (1) vme_m1.8<1>:UD DSTART_CENTER + DSEARCH_PATH_LEN:UD {align1};
+
+/* Set the MV cost center */
+mov (1) vme_m1.16<1>:ud mb_mvp_ref.0<0,1,0>:ud {align1};
+mov (1) vme_m1.20<1>:ud mb_mvp_ref.4<0,1,0>:ud {align1};
+mov (8) vme_msg_1.0<1>:UD vme_m1.0<8,8,1>:UD {align1};
+
+
+send (8)
+ vme_msg_ind
+ vme_wb
+ null
+ vme(
+ BIND_IDX_VME,
+ 0,
+ 0,
+ VME_MESSAGE_TYPE_MIXED
+ )
+ mlen vme_msg_length
+ rlen vme_inter_wb_length
+ {align1};
+
+and.z.f0.0 (1) null<1>:ud vme_wb0.0<0,1,0>:ud INTRAMBFLAG_MASK:ud {align1} ;
+
+(-f0.0)jmpi (1) __INTRA_INFO ;
+
+__INTER_INFO:
+/* Write MV pairs */
+mov (8) msg_reg0.0<1>:UD obw_m0.0<8,8,1>:UD {align1};
+
+mov (8) msg_reg1.0<1>:UD vme_wb1.0<8,8,1>:UD {align1};
+
+mov (8) msg_reg2.0<1>:UD vme_wb2.0<8,8,1>:UD {align1};
+
+mov (8) msg_reg3.0<1>:UD vme_wb3.0<8,8,1>:UD {align1};
+
+mov (8) msg_reg4.0<1>:UD vme_wb4.0<8,8,1>:UD {align1};
+/* bind index 3, write 8 oword (128 bytes), msg type: 8(OWord Block Write) */
+send (16)
+ msg_ind
+ obw_wb
+ null
+ data_port(
+ OBW_CACHE_TYPE,
+ OBW_MESSAGE_TYPE,
+ OBW_CONTROL_8,
+ OBW_BIND_IDX,
+ OBW_WRITE_COMMIT_CATEGORY,
+ OBW_HEADER_PRESENT
+ )
+ mlen 5
+ rlen obw_wb_length
+ {align1};
+
+mov (1) tmp_uw1<1>:uw 0:uw {align1} ;
+mov (1) tmp_ud1<1>:ud 0:ud {align1} ;
+and (1) tmp_uw1<1>:uw vme_wb0.2<0,1,0>:uw MV32_BIT_MASK:uw {align1} ;
+shr (1) tmp_uw1<1>:uw tmp_uw1<1>:uw MV32_BIT_SHIFT:uw {align1} ;
+mul (1) tmp_ud1<1>:ud tmp_uw1<0,1,0>:uw 96:uw {align1} ;
+add (1) tmp_ud1<1>:ud tmp_ud1<0,1,0>:ud 32:uw {align1} ;
+shl (1) tmp_uw1<1>:uw tmp_uw1<0,1,0>:uw MFC_MV32_BIT_SHIFT:uw {align1} ;
+add (1) tmp_uw1<1>:uw tmp_uw1<0,1,0>:uw MVSIZE_UW_BASE:uw {align1} ;
+add (1) tmp_uw1<1>:uw tmp_uw1<0,1,0>:uw CBP_DC_YUV_UW:uw {align1} ;
+
+mov (1) msg_reg1.0<1>:uw vme_wb0.0<0,1,0>:uw {align1} ;
+mov (1) msg_reg1.2<1>:uw tmp_uw1<0,1,0>:uw {align1} ;
+mov (1) msg_reg1.4<1>:UD vme_wb0.28<0,1,0>:UD {align1};
+mov (1) msg_reg1.8<1>:ud tmp_ud1<0,1,0>:ud {align1} ;
+mov (1) msg_reg1.12<1>:ud vme_wb0.0<0,1,0>:ud {align1} ;
+mov (1) msg_reg1.16<1>:ud 0x25:ud {align1} ;
+jmpi (1) __OUTPUT_INFO;
+
+__INTRA_INFO:
+mov (1) msg_reg1.0<1>:UD vme_wb.0<0,1,0>:UD {align1};
+mov (1) msg_reg1.4<1>:UD vme_wb.16<0,1,0>:UD {align1};
+mov (1) msg_reg1.8<1>:UD vme_wb.20<0,1,0>:UD {align1};
+mov (1) msg_reg1.12<1>:UD vme_wb.24<0,1,0>:UD {align1};
+mov (1) msg_reg1.16<1>:ud 0x35:ud {align1} ;
+
+__OUTPUT_INFO:
+
+mov (1) msg_reg1.20<1>:ud obw_m0.8<0,1,0>:ud {align1};
+add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD INTER_VME_OUTPUT_MV_IN_OWS:UD {align1};
+mov (8) msg_reg0.0<1>:ud obw_m0.0<8,8,1>:ud {align1};
+
+
+/* bind index 3, write 1 oword, msg type: 8(OWord Block Write) */
+send (16)
+ msg_ind
+ obw_wb
+ null
+ data_port(
+ OBW_CACHE_TYPE,
+ OBW_MESSAGE_TYPE,
+ OBW_CONTROL_2,
+ OBW_BIND_IDX,
+ OBW_WRITE_COMMIT_CATEGORY,
+ OBW_HEADER_PRESENT
+ )
+ mlen 2
+ rlen obw_wb_length
+ {align1};
+
+__EXIT:
+/*
+ * kill thread
+ */
+mov (8) ts_msg_reg0<1>:UD r0<8,8,1>:UD {align1};
+send (16) ts_msg_ind acc0<1>UW null thread_spawner(0, 0, 1) mlen 1 rlen 0 {align1 EOT};
+
+
+ nop ;
+ nop ;
+/* Compare three word data to get the min value */
+word_imin:
+ cmp.le.f0.0 (1) null:w INPUT_ARG0.0<0,1,0>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ (f0.0) mov (1) TEMP_VAR0.0<1>:w INPUT_ARG0.0<0,1,0>:w {align1};
+ (-f0.0) mov (1) TEMP_VAR0.0<1>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ cmp.le.f0.0 (1) null:w TEMP_VAR0.0<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w TEMP_VAR0.0<0,1,0>:w {align1};
+ (-f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ RETURN {align1};
+
+/* Compare three word data to get the max value */
+word_imax:
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.0<0,1,0>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ (f0.0) mov (1) TEMP_VAR0.0<1>:w INPUT_ARG0.0<0,1,0>:w {align1};
+ (-f0.0) mov (1) TEMP_VAR0.0<1>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ cmp.ge.f0.0 (1) null:w TEMP_VAR0.0<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w TEMP_VAR0.0<0,1,0>:w {align1};
+ (-f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ RETURN {align1};
+
+word_imedian:
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.0<0,1,0>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ (f0.0) jmpi (1) cmp_a_ge_b;
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.0<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.0<0,1,0>:w {align1};
+ (f0.0) jmpi (1) cmp_end;
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.4<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (-f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ jmpi (1) cmp_end;
+cmp_a_ge_b:
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.4<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.4<0,1,0>:w {align1};
+ (f0.0) jmpi (1) cmp_end;
+ cmp.ge.f0.0 (1) null:w INPUT_ARG0.0<0,1,0>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.8<0,1,0>:w {align1};
+ (-f0.0) mov (1) RET_ARG<1>:w INPUT_ARG0.0<0,1,0>:w {align1};
+cmp_end:
+ RETURN {align1};
+
+/* This is to get the prediction mode for the correspongding partions/sub-mb
+ * Parameter description:
+ ARG0.0: INTER_SHAPE/PRED_MODE
+ ARG0.4: INTER_MODE(16x16, 16x8, 8x16 or 8X8)
+ ARG0.8: sub-mb block number(block 0/1/2/3)
+*/
+
+mb_pred_func:
+ mov (8) TEMP_VAR0.0<1>:ud 0:ud {align1};
+ mov (1) TEMP_VAR0.0<1>:ub INPUT_ARG0.1<0,1,0>:ub {align1};
+ and (1) TEMP_VAR0.4<1>:uw INPUT_ARG0.4<0,1,0>:uw INTER_MASK:uw {align1};
+ /* INTER16x16 mode. The bit1-0 is the prediction mode */
+ cmp.e.f0.0 (1) null:uw TEMP_VAR0.4<1>:uw INTER_16X16MODE:uw {align1};
+ (f0.0) and (1) RET_ARG<1>:uw TEMP_VAR0.0<0,1,0>:uw PRED_MASK {align1};
+ (f0.0) jmpi (1) end_mb_pred;
+ /* Check whether it is INTER8x8 mode. */
+ cmp.e.f0.0 (1) null:uw TEMP_VAR0.4<1>:uw INTER_8X8MODE:uw {align1};
+ (f0.0) jmpi (1) mb_pred_func_8;
+
+ /* Check whether it is INTER16x8 mode. */
+ cmp.e.f0.0 (1) null:uw TEMP_VAR0.4<1>:uw INTER_16X8MODE:uw {align1};
+ (f0.0) jmpi (1) mb_pred_func_168;
+mb_pred_func_816:
+ /* Block 0/2 uses the bit1-0. Block 1/3 uses the bit3-2 */
+ mov (1) TEMP_VAR0.8<1>:uw INPUT_ARG0.8<0,1,0>:uw {align1};
+ and.z.f0.0 (1) null:uw TEMP_VAR0.8<1>:uw INTER_BLOCK1:uw {align1};
+ (f0.0) and (1) RET_ARG<1>:uw TEMP_VAR0.0<0,1,0>:uw PRED_MASK {align1};
+ (f0.0) jmpi (1) end_mb_pred;
+ shr (1) TEMP_VAR0.16<1>:uw TEMP_VAR0.0<0,1,0>:uw 2:uw {align1};
+ and (1) RET_ARG<1>:uw TEMP_VAR0.16<1>:uw PRED_MASK {align1};
+ jmpi (1) end_mb_pred;
+
+mb_pred_func_168:
+ /* Block 0/1 uses the bit1-0. Block 2/3 uses the bit3-2 */
+ mov (1) TEMP_VAR0.8<1>:uw INPUT_ARG0.8<0,1,0>:uw {align1};
+ cmp.l.f0.0 (1) null:uw TEMP_VAR0.8<1>:uw INTER_BLOCK2:uw {align1};
+ (f0.0) and (1) RET_ARG<1>:uw TEMP_VAR0.0<0,1,0>:uw PRED_MASK {align1};
+ (f0.0) jmpi (1) end_mb_pred;
+ shr (1) TEMP_VAR0.16<1>:uw TEMP_VAR0.0<0,1,0>:uw 2:uw {align1};
+ and (1) RET_ARG<1>:uw TEMP_VAR0.16<1>:uw PRED_MASK {align1};
+ jmpi (1) end_mb_pred;
+
+mb_pred_func_8:
+ /* 8X8 mode. Every block uses two bits as the prediction mode. */
+ mul (1) TEMP_VAR0.8<1>:uw INPUT_ARG0.8<0,1,0>:uw 2:uw {align1};
+ shr (1) TEMP_VAR0.16<1>:uw TEMP_VAR0.0<0,1,0>:uw TEMP_VAR0.8<0,1,0>:uw {align1};
+ and (1) RET_ARG<1>:uw TEMP_VAR0.16<1>:uw PRED_MASK {align1};
+end_mb_pred:
+ RETURN {align1};
+
diff --git a/src/shaders/vme/inter_bframe_ivb.g7a b/src/shaders/vme/inter_bframe_ivb.g7a
new file mode 100644
index 0000000..e7ae9c4
--- /dev/null
+++ b/src/shaders/vme/inter_bframe_ivb.g7a
@@ -0,0 +1,2 @@
+#include "vme7.inc"
+#include "inter_bframe_ivb.asm"
diff --git a/src/shaders/vme/inter_bframe_ivb.g7b b/src/shaders/vme/inter_bframe_ivb.g7b
new file mode 100644
index 0000000..ec967ea
--- /dev/null
+++ b/src/shaders/vme/inter_bframe_ivb.g7b
@@ -0,0 +1,371 @@
+ { 0x00800001, 0x24000061, 0x00000000, 0x00000000 },
+ { 0x00800001, 0x24400061, 0x00000000, 0x00000000 },
+ { 0x00800001, 0x24800061, 0x00000000, 0x00000000 },
+ { 0x00800001, 0x24c00061, 0x00000000, 0x00000000 },
+ { 0x00200009, 0x24002e25, 0x004500a0, 0x00040004 },
+ { 0x00000040, 0x24003ca5, 0x00000400, 0xfff8fff8 },
+ { 0x00000040, 0x24043ca5, 0x00000404, 0xffffffff },
+ { 0x00000001, 0x240800e1, 0x00000000, 0x0000001f },
+ { 0x00000001, 0x24140231, 0x00000014, 0x00000000 },
+ { 0x00200009, 0x24202e25, 0x004500a0, 0x00040004 },
+ { 0x00000040, 0x24203ca5, 0x00000420, 0xfffcfffc },
+ { 0x00000001, 0x242800e1, 0x00000000, 0x000f0003 },
+ { 0x00000001, 0x24340231, 0x00000014, 0x00000000 },
+ { 0x00200009, 0x24482e29, 0x004500a0, 0x00040004 },
+ { 0x00000001, 0x24540231, 0x00000014, 0x00000000 },
+ { 0x00000041, 0x24884521, 0x000000a2, 0x000000a1 },
+ { 0x00000040, 0x24884421, 0x00000488, 0x000000a0 },
+ { 0x00000041, 0x24880c21, 0x00000488, 0x0000000a },
+ { 0x00000001, 0x24940231, 0x00000014, 0x00000000 },
+ { 0x00600001, 0x28000021, 0x008d0400, 0x00000000 },
+ { 0x04600031, 0x23801cb1, 0x00000800, 0x02190004 },
+ { 0x00600001, 0x28000021, 0x008d0420, 0x00000000 },
+ { 0x04600031, 0x23a01cb1, 0x00000800, 0x02290004 },
+ { 0x00600001, 0x2ac00061, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x2a800061, 0x00000000, 0x00000000 },
+ { 0x01000005, 0x20002d28, 0x000000a6, 0x00040004 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x000001a4 },
+ { 0x00600001, 0x2ae00061, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x2b000061, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x2b200061, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x2b400061, 0x00000000, 0x00000000 },
+ { 0x01000005, 0x20002e28, 0x000000a5, 0x00600060 },
+ { 0x00210001, 0x2af401ed, 0x00000000, 0xffffffff },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000042 },
+ { 0x00000001, 0x2ae000e5, 0x00000000, 0x00000001 },
+ { 0x00200001, 0x24000229, 0x004500a0, 0x00000000 },
+ { 0x00000040, 0x24003dad, 0x00000400, 0xffffffff },
+ { 0x00000041, 0x2b482521, 0x000000a2, 0x00000402 },
+ { 0x00000040, 0x2b482421, 0x00000b48, 0x00000400 },
+ { 0x00000041, 0x2b480c21, 0x00000b48, 0x0000000a },
+ { 0x00000001, 0x2b540231, 0x00000014, 0x00000000 },
+ { 0x00000001, 0x2b680021, 0x00000b48, 0x00000000 },
+ { 0x00000040, 0x2b480c21, 0x00000b48, 0x00000008 },
+ { 0x0a800031, 0x2b801ca1, 0x00000b40, 0x02180003 },
+ { 0x01000005, 0x20000c20, 0x00000b80, 0x00002000 },
+ { 0x00310001, 0x2af401ed, 0x00000000, 0xffffffff },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x00000028 },
+ { 0x00000001, 0x2b480021, 0x00000b68, 0x00000000 },
+ { 0x0a800031, 0x2ba01ca1, 0x00000b40, 0x02480403 },
+ { 0x00200001, 0x2ae40021, 0x00450bc8, 0x00000000 },
+ { 0x00200001, 0x2af401ed, 0x00000000, 0xffffffff },
+ { 0x00000001, 0x2fa00021, 0x00000b84, 0x00000000 },
+ { 0x00000001, 0x2fa40021, 0x00000b80, 0x00000000 },
+ { 0x00000001, 0x2fa80061, 0x00000000, 0x00000001 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000023e },
+ { 0x00000001, 0x2aa00129, 0x00000fe4, 0x00000000 },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00000000 },
+ { 0x00010001, 0x2af001e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2af401ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000c },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00010001 },
+ { 0x00010001, 0x2af201e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2af601ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+ { 0x00200001, 0x2af001e9, 0x00000000, 0x00010001 },
+ { 0x00200001, 0x2af401ed, 0x00000000, 0x00000000 },
+ { 0x00600001, 0x2b400061, 0x00000000, 0x00000000 },
+ { 0x01000005, 0x20002e28, 0x000000a5, 0x00100010 },
+ { 0x00210001, 0x2b1401ed, 0x00000000, 0xffffffff },
+ { 0x00210001, 0x2b3401ed, 0x00000000, 0xffffffff },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x000000d0 },
+ { 0x00000001, 0x2b0000e5, 0x00000000, 0x00000001 },
+ { 0x00200001, 0x24000229, 0x004500a0, 0x00000000 },
+ { 0x00000040, 0x24023dad, 0x00000402, 0xffffffff },
+ { 0x00000041, 0x2b482521, 0x000000a2, 0x00000402 },
+ { 0x00000040, 0x2b482421, 0x00000b48, 0x00000400 },
+ { 0x00000041, 0x2b480c21, 0x00000b48, 0x0000000a },
+ { 0x00000001, 0x2b540231, 0x00000014, 0x00000000 },
+ { 0x00000001, 0x2b680021, 0x00000b48, 0x00000000 },
+ { 0x00000040, 0x2b480c21, 0x00000b48, 0x00000008 },
+ { 0x0a800031, 0x2b801ca1, 0x00000b40, 0x02180003 },
+ { 0x01000005, 0x20000c20, 0x00000b80, 0x00002000 },
+ { 0x00310001, 0x2b1401ed, 0x00000000, 0xffffffff },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x00000026 },
+ { 0x00000001, 0x2b480021, 0x00000b68, 0x00000000 },
+ { 0x0a800031, 0x2ba01ca1, 0x00000b40, 0x02480403 },
+ { 0x00200001, 0x2b040021, 0x00450bf0, 0x00000000 },
+ { 0x00200001, 0x2b1401ed, 0x00000000, 0xffffffff },
+ { 0x00000001, 0x2fa00021, 0x00000b84, 0x00000000 },
+ { 0x00000001, 0x2fa40021, 0x00000b80, 0x00000000 },
+ { 0x00000001, 0x2fa80061, 0x00000000, 0x00000002 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000001f2 },
+ { 0x00000001, 0x2aa00129, 0x00000fe4, 0x00000000 },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00000000 },
+ { 0x00010001, 0x2b1001e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b1401ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000a },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00010001 },
+ { 0x00010001, 0x2b1201e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b1601ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000002 },
+ { 0x00200001, 0x2b1001e9, 0x00000000, 0x00010001 },
+ { 0x00600001, 0x2b400061, 0x00000000, 0x00000000 },
+ { 0x01000005, 0x20002e28, 0x000000a5, 0x00080008 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000046 },
+ { 0x00000001, 0x2b2000e5, 0x00000000, 0x00000001 },
+ { 0x00200001, 0x24000229, 0x004500a0, 0x00000000 },
+ { 0x00000040, 0x24023dad, 0x00000402, 0xffffffff },
+ { 0x00000040, 0x24003dad, 0x00000400, 0x00010001 },
+ { 0x00000041, 0x2b482521, 0x000000a2, 0x00000402 },
+ { 0x00000040, 0x2b482421, 0x00000b48, 0x00000400 },
+ { 0x00000041, 0x2b480c21, 0x00000b48, 0x0000000a },
+ { 0x00000001, 0x2b540231, 0x00000014, 0x00000000 },
+ { 0x00000001, 0x2b680021, 0x00000b48, 0x00000000 },
+ { 0x00000040, 0x2b480c21, 0x00000b48, 0x00000008 },
+ { 0x0a800031, 0x2b801ca1, 0x00000b40, 0x02180003 },
+ { 0x01000005, 0x20000c20, 0x00000b80, 0x00002000 },
+ { 0x00310001, 0x2b3401ed, 0x00000000, 0xffffffff },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x0000006e },
+ { 0x00000001, 0x2b480021, 0x00000b68, 0x00000000 },
+ { 0x0a800031, 0x2ba01ca1, 0x00000b40, 0x02480403 },
+ { 0x00200001, 0x2b240021, 0x00450bf0, 0x00000000 },
+ { 0x00200001, 0x2b3401ed, 0x00000000, 0xffffffff },
+ { 0x00000001, 0x2fa00021, 0x00000b84, 0x00000000 },
+ { 0x00000001, 0x2fa40021, 0x00000b80, 0x00000000 },
+ { 0x00000001, 0x2fa80061, 0x00000000, 0x00000002 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000001aa },
+ { 0x00000001, 0x2aa00129, 0x00000fe4, 0x00000000 },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00000000 },
+ { 0x00010001, 0x2b3001e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b3401ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000052 },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00010001 },
+ { 0x00010001, 0x2b3201e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b3601ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000004a },
+ { 0x00200001, 0x2b3001e9, 0x00000000, 0x00010001 },
+ { 0x00200001, 0x2b3401ed, 0x00000000, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000044 },
+ { 0x00000001, 0x2b2000e5, 0x00000000, 0x00000001 },
+ { 0x00200001, 0x24000229, 0x004500a0, 0x00000000 },
+ { 0x00200040, 0x24003dad, 0x00450400, 0xffffffff },
+ { 0x00000041, 0x2b482521, 0x000000a2, 0x00000402 },
+ { 0x00000040, 0x2b482421, 0x00000b48, 0x00000400 },
+ { 0x00000041, 0x2b480c21, 0x00000b48, 0x0000000a },
+ { 0x00000001, 0x2b540231, 0x00000014, 0x00000000 },
+ { 0x00000001, 0x2b680021, 0x00000b48, 0x00000000 },
+ { 0x00000040, 0x2b480c21, 0x00000b48, 0x00000008 },
+ { 0x0a800031, 0x2b801ca1, 0x00000b40, 0x02180003 },
+ { 0x01000005, 0x20000c20, 0x00000b80, 0x00002000 },
+ { 0x00310001, 0x2b3401ed, 0x00000000, 0xffffffff },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x0000002a },
+ { 0x00000001, 0x2b480021, 0x00000b68, 0x00000000 },
+ { 0x0a800031, 0x2ba01cb1, 0x00000b40, 0x02480403 },
+ { 0x00200001, 0x2b240021, 0x00450c18, 0x00000000 },
+ { 0x00200001, 0x2b3401ed, 0x00000000, 0xffffffff },
+ { 0x00000001, 0x2fa00021, 0x00000b84, 0x00000000 },
+ { 0x00000001, 0x2fa40021, 0x00000b80, 0x00000000 },
+ { 0x00000001, 0x2fa80061, 0x00000000, 0x00000003 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000166 },
+ { 0x00000001, 0x2aa00129, 0x00000fe4, 0x00000000 },
+ { 0x00000001, 0x2b3201ed, 0x00000000, 0x00010001 },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00000000 },
+ { 0x00010001, 0x2b3001e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b3401ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000c },
+ { 0x01000010, 0x20002d28, 0x00000aa0, 0x00010001 },
+ { 0x00010001, 0x2b3201e9, 0x00000000, 0x00010001 },
+ { 0x00010001, 0x2b3601ed, 0x00000000, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000004 },
+ { 0x00200001, 0x2b3001e9, 0x00000000, 0x00010001 },
+ { 0x00200001, 0x2b3401ed, 0x00000000, 0x00000000 },
+ { 0x00000040, 0x240014a5, 0x00000b00, 0x00000b20 },
+ { 0x01000010, 0x20001ca4, 0x00000400, 0x00000000 },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x00000010 },
+ { 0x02000010, 0x20001ca4, 0x00000ae0, 0x00000001 },
+ { 0x00210001, 0x2b040021, 0x00450ae4, 0x00000000 },
+ { 0x00210001, 0x2b240021, 0x00450ae4, 0x00000000 },
+ { 0x00210001, 0x2b140129, 0x00450af4, 0x00000000 },
+ { 0x00210001, 0x2b340129, 0x00450af4, 0x00000000 },
+ { 0x00210001, 0x2ac00021, 0x00450ae4, 0x00000000 },
+ { 0x00310001, 0x2ac00061, 0x00000000, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000064 },
+ { 0x00600001, 0x24000061, 0x00000000, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200af4, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000ae4, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200b14, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000b04, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200b34, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000b24, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x2ac00021, 0x00000404, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x2fa001ad, 0x00000ae4, 0x00000000 },
+ { 0x00000001, 0x2fa401ad, 0x00000b04, 0x00000000 },
+ { 0x00000001, 0x2fa801ad, 0x00000b24, 0x00000000 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000000f4 },
+ { 0x00000001, 0x2ac001ad, 0x00000fe4, 0x00000000 },
+ { 0x00000001, 0x2fa001ad, 0x00000ae6, 0x00000000 },
+ { 0x00000001, 0x2fa401ad, 0x00000b06, 0x00000000 },
+ { 0x00000001, 0x2fa801ad, 0x00000b26, 0x00000000 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000000e8 },
+ { 0x00000001, 0x2ac201ad, 0x00000fe4, 0x00000000 },
+ { 0x00600001, 0x24000061, 0x00000000, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200af6, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000ae8, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200b16, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000b08, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200b36, 0x00000000 },
+ { 0x00010040, 0x24003dad, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x24040021, 0x00000b28, 0x00000000 },
+ { 0x01000010, 0x20003da4, 0x00200400, 0x00010001 },
+ { 0x00010001, 0x2ac40021, 0x00000404, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000018 },
+ { 0x00000001, 0x2fa001ad, 0x00000ae8, 0x00000000 },
+ { 0x00000001, 0x2fa401ad, 0x00000b08, 0x00000000 },
+ { 0x00000001, 0x2fa801ad, 0x00000b28, 0x00000000 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000000c2 },
+ { 0x00000001, 0x2ac401ad, 0x00000fe4, 0x00000000 },
+ { 0x00000001, 0x2fa001ad, 0x00000aea, 0x00000000 },
+ { 0x00000001, 0x2fa401ad, 0x00000b0a, 0x00000000 },
+ { 0x00000001, 0x2fa801ad, 0x00000b2a, 0x00000000 },
+ { 0x00000040, 0x2fe00c01, 0x00001400, 0x00000020 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x000000b6 },
+ { 0x00000001, 0x2ac601ad, 0x00000fe4, 0x00000000 },
+ { 0x0040000c, 0x2a803dad, 0x00690ac0, 0x00020002 },
+ { 0x00400040, 0x2a883dad, 0x00690a80, 0x00030003 },
+ { 0x00400005, 0x2a902d29, 0x00690a88, 0xfffcfffc },
+ { 0x00600001, 0x28400061, 0x00000000, 0x00000000 },
+ { 0x00000001, 0x23800061, 0x00000000, 0x00000000 },
+ { 0x00000005, 0x23840c21, 0x00000384, 0xff000000 },
+ { 0x00600001, 0x28600021, 0x008d0380, 0x00000000 },
+ { 0x00600001, 0x288000e1, 0x00000000, 0x00000000 },
+ { 0x00800001, 0x28800231, 0x00cf03a3, 0x00000000 },
+ { 0x00000001, 0x28900061, 0x00000000, 0x11111111 },
+ { 0x00600001, 0x24600061, 0x00000000, 0x00000000 },
+ { 0x01000005, 0x20002e28, 0x000000a4, 0x00010001 },
+ { 0x00010001, 0x247c0171, 0x00000000, 0x00020002 },
+ { 0x00000001, 0x247d0231, 0x000000a5, 0x00000000 },
+ { 0x00000001, 0x244c0061, 0x00000000, 0x00203700 },
+ { 0x00000001, 0x24560169, 0x00000000, 0x20202020 },
+ { 0x00000001, 0x24400021, 0x00000448, 0x00000000 },
+ { 0x00000001, 0x244001ed, 0x00000000, 0xfff8fff8 },
+ { 0x00000001, 0x244201ed, 0x00000000, 0xfff8fff8 },
+ { 0x00000001, 0x24440021, 0x00000440, 0x00000000 },
+ { 0x01000005, 0x20002e28, 0x000000a5, 0x00600060 },
+ { 0x00010040, 0x24403dad, 0x00000440, 0x00040004 },
+ { 0x00010040, 0x24443dad, 0x00000444, 0x00040004 },
+ { 0x01000005, 0x20002e28, 0x000000a5, 0x00100010 },
+ { 0x00010040, 0x24423dad, 0x00000442, 0x00040004 },
+ { 0x00010040, 0x24463dad, 0x00000446, 0x00040004 },
+ { 0x00000001, 0x24440021, 0x00000440, 0x00000000 },
+ { 0x00200040, 0x244035ad, 0x00450440, 0x00450a90 },
+ { 0x00200040, 0x244435ad, 0x00450444, 0x00450a94 },
+ { 0x00600001, 0x28000021, 0x008d0440, 0x00000000 },
+ { 0x00000001, 0x24600061, 0x00000000, 0x00000002 },
+ { 0x00000001, 0x24640231, 0x0000009c, 0x00000000 },
+ { 0x00000040, 0x24640c21, 0x00000464, 0x40000000 },
+ { 0x00000040, 0x24662d29, 0x00000466, 0x00200020 },
+ { 0x00000001, 0x24680061, 0x00000000, 0x00001212 },
+ { 0x00000001, 0x24700021, 0x00000ac0, 0x00000000 },
+ { 0x00000001, 0x24740021, 0x00000ac4, 0x00000000 },
+ { 0x00600001, 0x28200021, 0x008d0460, 0x00000000 },
+ { 0x08600031, 0x21801cbd, 0x00000800, 0x0a686000 },
+ { 0x01000005, 0x20000c20, 0x00000180, 0x00002000 },
+ { 0x00110020, 0x34001c00, 0x00001400, 0x0000002c },
+ { 0x00600001, 0x28000021, 0x008d0480, 0x00000000 },
+ { 0x00600001, 0x28200021, 0x008d01a0, 0x00000000 },
+ { 0x00600001, 0x28400021, 0x008d01c0, 0x00000000 },
+ { 0x00600001, 0x28600021, 0x008d01e0, 0x00000000 },
+ { 0x00600001, 0x28800021, 0x008d0200, 0x00000000 },
+ { 0x0a800031, 0x20001cac, 0x00000800, 0x0a0a0403 },
+ { 0x00000001, 0x25420169, 0x00000000, 0x00000000 },
+ { 0x00000001, 0x25440061, 0x00000000, 0x00000000 },
+ { 0x00000005, 0x25422d29, 0x00000182, 0x00200020 },
+ { 0x00000008, 0x25422d29, 0x00200542, 0x00050005 },
+ { 0x00000041, 0x25442d21, 0x00000542, 0x00600060 },
+ { 0x00000040, 0x25442c21, 0x00000544, 0x00200020 },
+ { 0x00000009, 0x25422d29, 0x00000542, 0x00050005 },
+ { 0x00000040, 0x25422d29, 0x00000542, 0x00400040 },
+ { 0x00000040, 0x25422d29, 0x00000542, 0x000e000e },
+ { 0x00000001, 0x28200129, 0x00000180, 0x00000000 },
+ { 0x00000001, 0x28220129, 0x00000542, 0x00000000 },
+ { 0x00000001, 0x28240021, 0x0000019c, 0x00000000 },
+ { 0x00000001, 0x28280021, 0x00000544, 0x00000000 },
+ { 0x00000001, 0x282c0021, 0x00000180, 0x00000000 },
+ { 0x00000001, 0x28300061, 0x00000000, 0x00000025 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000a },
+ { 0x00000001, 0x28200021, 0x00000180, 0x00000000 },
+ { 0x00000001, 0x28240021, 0x00000190, 0x00000000 },
+ { 0x00000001, 0x28280021, 0x00000194, 0x00000000 },
+ { 0x00000001, 0x282c0021, 0x00000198, 0x00000000 },
+ { 0x00000001, 0x28300061, 0x00000000, 0x00000035 },
+ { 0x00000001, 0x28340021, 0x00000488, 0x00000000 },
+ { 0x00000040, 0x24880c21, 0x00000488, 0x00000008 },
+ { 0x00600001, 0x28000021, 0x008d0480, 0x00000000 },
+ { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0203 },
+ { 0x00600001, 0x2e000021, 0x008d0000, 0x00000000 },
+ { 0x07800031, 0x24001ca8, 0x00000e00, 0x82000010 },
+ { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+ { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
+ { 0x06000010, 0x200035ac, 0x00000fa0, 0x00000fa4 },
+ { 0x00010001, 0x2f6001ad, 0x00000fa0, 0x00000000 },
+ { 0x00110001, 0x2f6001ad, 0x00000fa4, 0x00000000 },
+ { 0x06000010, 0x200035ac, 0x00000f60, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000f60, 0x00000000 },
+ { 0x00110001, 0x2fe401ad, 0x00000fa8, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x00000fe0, 0x00000000 },
+ { 0x04000010, 0x200035ac, 0x00000fa0, 0x00000fa4 },
+ { 0x00010001, 0x2f6001ad, 0x00000fa0, 0x00000000 },
+ { 0x00110001, 0x2f6001ad, 0x00000fa4, 0x00000000 },
+ { 0x04000010, 0x200035ac, 0x00000f60, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000f60, 0x00000000 },
+ { 0x00110001, 0x2fe401ad, 0x00000fa8, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x00000fe0, 0x00000000 },
+ { 0x04000010, 0x200035ac, 0x00000fa0, 0x00000fa4 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000e },
+ { 0x04000010, 0x200035ac, 0x00000fa0, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000fa0, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000014 },
+ { 0x04000010, 0x200035ac, 0x00000fa4, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000fa8, 0x00000000 },
+ { 0x00110001, 0x2fe401ad, 0x00000fa4, 0x00000000 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x0000000c },
+ { 0x04000010, 0x200035ac, 0x00000fa4, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000fa4, 0x00000000 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000006 },
+ { 0x04000010, 0x200035ac, 0x00000fa0, 0x00000fa8 },
+ { 0x00010001, 0x2fe401ad, 0x00000fa8, 0x00000000 },
+ { 0x00110001, 0x2fe401ad, 0x00000fa0, 0x00000000 },
+ { 0x00000001, 0x34000020, 0x00000fe0, 0x00000000 },
+ { 0x00600001, 0x2f600061, 0x00000000, 0x00000000 },
+ { 0x00000001, 0x2f600231, 0x00000fa1, 0x00000000 },
+ { 0x00000005, 0x2f642d29, 0x00000fa4, 0x00030003 },
+ { 0x01000010, 0x20002d28, 0x00200f64, 0x00000000 },
+ { 0x00010005, 0x2fe42d29, 0x00000f60, 0x00030003 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000002a },
+ { 0x01000010, 0x20002d28, 0x00200f64, 0x00030003 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x00000020 },
+ { 0x01000010, 0x20002d28, 0x00200f64, 0x00010001 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000e },
+ { 0x00000001, 0x2f680129, 0x00000fa8, 0x00000000 },
+ { 0x01000005, 0x20002d28, 0x00200f68, 0x00010001 },
+ { 0x00010005, 0x2fe42d29, 0x00000f60, 0x00030003 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000001a },
+ { 0x00000008, 0x2f702d29, 0x00000f60, 0x00020002 },
+ { 0x00000005, 0x2fe42d29, 0x00200f70, 0x00030003 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000014 },
+ { 0x00000001, 0x2f680129, 0x00000fa8, 0x00000000 },
+ { 0x05000010, 0x20002d28, 0x00200f68, 0x00020002 },
+ { 0x00010005, 0x2fe42d29, 0x00000f60, 0x00030003 },
+ { 0x00010020, 0x34001c00, 0x00001400, 0x0000000c },
+ { 0x00000008, 0x2f702d29, 0x00000f60, 0x00020002 },
+ { 0x00000005, 0x2fe42d29, 0x00200f70, 0x00030003 },
+ { 0x00000020, 0x34001c00, 0x00001400, 0x00000006 },
+ { 0x00000041, 0x2f682d29, 0x00000fa8, 0x00020002 },
+ { 0x00000008, 0x2f702529, 0x00000f60, 0x00000f68 },
+ { 0x00000005, 0x2fe42d29, 0x00200f70, 0x00030003 },
+ { 0x00000001, 0x34000020, 0x00000fe0, 0x00000000 },