diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2013-03-27 09:24:15 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-02-27 10:04:12 +0800 |
commit | d1ce64926f3c0fedcfe4bab86e51ed406b5aa96f (patch) | |
tree | 7c5babbae6d58d6a9c69ab6d38f1b4b70e529be2 | |
parent | 088e84c25c74b587ace06bf67cd8f8ac84f433c0 (diff) | |
download | libva-intel-driver-d1ce64926f3c0fedcfe4bab86e51ed406b5aa96f.tar.gz libva-intel-driver-d1ce64926f3c0fedcfe4bab86e51ed406b5aa96f.tar.bz2 libva-intel-driver-d1ce64926f3c0fedcfe4bab86e51ed406b5aa96f.zip |
Rewrite the VME shader for encoding on BDW
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
-rw-r--r-- | src/gen8_mfc.c | 2 | ||||
-rw-r--r-- | src/gen8_vme.c | 35 | ||||
-rw-r--r-- | src/shaders/vme/Makefile.am | 26 | ||||
-rw-r--r-- | src/shaders/vme/inter_bframe_gen8.asm | 875 | ||||
-rw-r--r-- | src/shaders/vme/inter_bframe_gen8.g8a | 2 | ||||
-rw-r--r-- | src/shaders/vme/inter_bframe_gen8.g8b | 423 | ||||
-rw-r--r-- | src/shaders/vme/inter_frame_gen8.asm | 727 | ||||
-rw-r--r-- | src/shaders/vme/inter_frame_gen8.g8a | 2 | ||||
-rw-r--r-- | src/shaders/vme/inter_frame_gen8.g8b | 300 | ||||
-rw-r--r-- | src/shaders/vme/intra_frame_gen8.asm | 185 | ||||
-rw-r--r-- | src/shaders/vme/intra_frame_gen8.g8a | 2 | ||||
-rw-r--r-- | src/shaders/vme/intra_frame_gen8.g8b | 72 | ||||
-rw-r--r-- | src/shaders/vme/mpeg2_inter_frame_gen8.g8a | 3 | ||||
-rw-r--r-- | src/shaders/vme/mpeg2_inter_frame_gen8.g8b | 300 | ||||
-rw-r--r-- | src/shaders/vme/vme8.inc | 341 | ||||
-rw-r--r-- | src/shaders/vme/vme8_mpeg2.inc | 18 |
16 files changed, 3281 insertions, 32 deletions
diff --git a/src/gen8_mfc.c b/src/gen8_mfc.c index fb8b0d7..1deaae3 100644 --- a/src/gen8_mfc.c +++ b/src/gen8_mfc.c @@ -2463,7 +2463,7 @@ Bool gen8_mfc_context_init(VADriverContextP ctx, struct intel_encoder_context *e mfc_context->avc_qm_state = gen8_mfc_avc_qm_state; mfc_context->avc_fqm_state = gen8_mfc_avc_fqm_state; mfc_context->insert_object = gen8_mfc_avc_insert_object; - mfc_context->buffer_suface_setup = gen7_gpe_buffer_suface_setup; + mfc_context->buffer_suface_setup = gen8_gpe_buffer_suface_setup; encoder_context->mfc_context = mfc_context; encoder_context->mfc_context_destroy = gen8_mfc_context_destroy; diff --git a/src/gen8_vme.c b/src/gen8_vme.c index 389ca8e..65d27c1 100644 --- a/src/gen8_vme.c +++ b/src/gen8_vme.c @@ -51,8 +51,7 @@ #define VME_INTRA_SHADER 0 #define VME_INTER_SHADER 1 -#define VME_BINTER_SHADER 3 -#define VME_BATCHBUFFER 2 +#define VME_BINTER_SHADER 2 #define CURBE_ALLOCATION_SIZE 37 /* in 256-bit */ #define CURBE_TOTAL_DATA_LENGTH (4 * 32) /* in byte, it should be less than or equal to CURBE_ALLOCATION_SIZE * 32 */ @@ -61,19 +60,15 @@ #define VME_MSG_LENGTH 32 static const uint32_t gen8_vme_intra_frame[][4] = { -#include "shaders/vme/intra_frame_haswell.g75b" +#include "shaders/vme/intra_frame_gen8.g8b" }; static const uint32_t gen8_vme_inter_frame[][4] = { -#include "shaders/vme/inter_frame_haswell.g75b" +#include "shaders/vme/inter_frame_gen8.g8b" }; static const uint32_t gen8_vme_inter_bframe[][4] = { -#include "shaders/vme/inter_bframe_haswell.g75b" -}; - -static const uint32_t gen8_vme_batchbuffer[][4] = { -#include "shaders/vme/batchbuffer.g75b" +#include "shaders/vme/inter_bframe_gen8.g8b" }; static struct i965_kernel gen8_vme_kernels[] = { @@ -92,13 +87,6 @@ static struct i965_kernel gen8_vme_kernels[] = { NULL }, { - "VME BATCHBUFFER", - VME_BATCHBUFFER, - gen8_vme_batchbuffer, - sizeof(gen8_vme_batchbuffer), - NULL - }, - { "VME inter BFrame", VME_BINTER_SHADER, gen8_vme_inter_bframe, @@ -108,15 +96,11 @@ static struct i965_kernel gen8_vme_kernels[] = { }; static const uint32_t gen8_vme_mpeg2_intra_frame[][4] = { -#include "shaders/vme/intra_frame_haswell.g75b" +#include "shaders/vme/intra_frame_gen8.g8b" }; static const uint32_t gen8_vme_mpeg2_inter_frame[][4] = { -#include "shaders/vme/mpeg2_inter_haswell.g75b" -}; - -static const uint32_t gen8_vme_mpeg2_batchbuffer[][4] = { -#include "shaders/vme/batchbuffer.g75b" +#include "shaders/vme/mpeg2_inter_frame_gen8.g8b" }; static struct i965_kernel gen8_vme_mpeg2_kernels[] = { @@ -134,13 +118,6 @@ static struct i965_kernel gen8_vme_mpeg2_kernels[] = { sizeof(gen8_vme_mpeg2_inter_frame), NULL }, - { - "VME BATCHBUFFER", - VME_BATCHBUFFER, - gen8_vme_mpeg2_batchbuffer, - sizeof(gen8_vme_mpeg2_batchbuffer), - NULL - }, }; /* only used for VME source surface state */ diff --git a/src/shaders/vme/Makefile.am b/src/shaders/vme/Makefile.am index 634e6d4..d84f795 100644 --- a/src/shaders/vme/Makefile.am +++ b/src/shaders/vme/Makefile.am @@ -1,6 +1,7 @@ VME_CORE = batchbuffer.asm intra_frame.asm inter_frame.asm VME7_CORE = batchbuffer.asm intra_frame_ivb.asm inter_frame_ivb.asm inter_bframe_ivb.asm mpeg2_inter_ivb.asm VME75_CORE = batchbuffer.asm intra_frame_haswell.asm inter_frame_haswell.asm inter_bframe_haswell.asm mpeg2_inter_haswell.asm +VME8_CORE = intra_frame_gen8.asm inter_frame_gen8.asm inter_bframe_gen8.asm INTEL_G6B = batchbuffer.g6b intra_frame.g6b inter_frame.g6b INTEL_G6A = batchbuffer.g6a intra_frame.g6a inter_frame.g6a @@ -17,16 +18,24 @@ INTEL_G75A = batchbuffer.g75a intra_frame_haswell.g75a inter_frame_haswell.g75a INTEL_GEN75_INC = batchbuffer.inc vme75.inc vme75_mpeg2.inc INTEL_GEN75_ASM = $(INTEL_G75A:%.g75a=%.gen75.asm) + +INTEL_G8B = intra_frame_gen8.g8b inter_frame_gen8.g8b mpeg2_inter_frame_gen8.g8b inter_bframe_gen8.g8b +INTEL_G8A = intra_frame_gen8.g8a inter_frame_gen8.g8a mpeg2_inter_frame_gen8.g8a inter_bframe_gen8.g8a +INTEL_GEN8_INC = vme8.inc vme8_mpeg2.inc +INTEL_GEN8_ASM = $(INTEL_G8A:%.g8a=%.gen8.asm) + + TARGETS = if HAVE_GEN4ASM TARGETS += $(INTEL_G6B) TARGETS += $(INTEL_G7B) TARGETS += $(INTEL_G75B) +TARGETS += $(INTEL_G8B) endif all-local: $(TARGETS) -SUFFIXES = .g6a .g6b .g7a .g7b .gen6.asm .gen7.asm .g75a .g75b .gen75.asm +SUFFIXES = .g6a .g6b .g7a .g7b .gen6.asm .gen7.asm .g75a .g75b .gen75.asm .g8a .g8b .gen8.asm if HAVE_GEN4ASM $(INTEL_GEN6_ASM): $(VME_CORE) $(INTEL_GEN6_INC) @@ -53,9 +62,18 @@ $(INTEL_GEN75_ASM): $(VME75_CORE) $(INTEL_GEN75_INC) rm _vme0.$@ .gen75.asm.g75b: $(AM_V_GEN)$(GEN4ASM) -g 7.5 -o $@ $< + +$(INTEL_GEN8_ASM): $(VME8_CORE) $(INTEL_GEN8_INC) +.g8a.gen8.asm: + $(AM_V_GEN)cpp -P $< > _vme0.$@ && \ + m4 _vme0.$@ > $@ && \ + rm _vme0.$@ +.gen8.asm.g8b: + $(AM_V_GEN)$(GEN4ASM) -g 8 -o $@ $< + endif -CLEANFILES = $(INTEL_GEN6_ASM) $(INTEL_GEN7_ASM) $(INTEL_GEN75_ASM) +CLEANFILES = $(INTEL_GEN6_ASM) $(INTEL_GEN7_ASM) $(INTEL_GEN75_ASM) $(INTEL_GEN8_ASM) EXTRA_DIST = \ $(INTEL_G6A) \ @@ -64,11 +82,15 @@ EXTRA_DIST = \ $(INTEL_G75B) \ $(INTEL_G7A) \ $(INTEL_G7B) \ + $(INTEL_G8A) \ + $(INTEL_G8B) \ $(INTEL_GEN6_INC) \ $(INTEL_GEN75_INC) \ $(INTEL_GEN7_INC) \ + $(INTEL_GEN8_INC) \ $(VME75_CORE) \ $(VME7_CORE) \ + $(VME8_CORE) \ $(VME_CORE) \ $(NULL) diff --git a/src/shaders/vme/inter_bframe_gen8.asm b/src/shaders/vme/inter_bframe_gen8.asm new file mode 100644 index 0000000..d8de588 --- /dev/null +++ b/src/shaders/vme/inter_bframe_gen8.asm @@ -0,0 +1,875 @@ +/* + * 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: Inter_bframe_haswell.asm +// +// Make inter predition estimation for Inter frame for 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 24: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}; + +/* + * Media Read Message -- fetch Chroma neighbor edge pixels + */ +/* ROW */ +shl (2) read0_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16 , y * 8 */ +mul (1) read0_header.0<1>:D read0_header.0<0,1,0>:D 2:W {align1}; +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 (8) msg_reg0.0<1>:UD read0_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_ROW<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {align1}; + +/* COL */ +shl (2) read1_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16, y * 8 */ +mul (1) read1_header.0<1>:D read1_header.0<0,1,0>:D 2:W {align1}; +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_8X4 {align1}; +mov (8) msg_reg0.0<1>:UD read1_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_COL<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {align1}; + +mov (8) vme_m1.0<1>:ud 0:ud {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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mba_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mbb_start; + +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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.20<1>:w -1:w {align1}; +mov (1) INPUT_ARG0.0<1>:ud mb_inter_wb.4<0,1,0>:ud {align1}; +mov (1) INPUT_ARG0.4<1>:ud mb_inter_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) mov (1) mba_result.4<1>:ud mb_mv1.8<0,1,0>:ud {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) mov (1) mba_result.8<1>:ud mb_mv1.12<0,1,0>:ud {align1}; +(f0.0) jmpi (1) mbb_start; +mov (2) mba_result.4<1>:ud mb_mv1.8<2,2,1>:ud {align1}; +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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbb_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mbc_start; +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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.20<1>:w -1:w {align1}; +mov (1) INPUT_ARG0.0<1>:ud mb_inter_wb.4<0,1,0>:ud {align1}; +mov (1) INPUT_ARG0.4<1>:ud mb_inter_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) mov (1) mbb_result.4<1>:ud mb_mv2.16<0,1,0>:ud {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) mov (1) mbb_result.8<1>:ud mb_mv2.20<0,1,0>:ud {align1}; +(f0.0) jmpi (1) mbc_start; +mov (2) mbb_result.16<1>:uw MB_PRED_FLAG {align1}; +mov (2) mbb_result.20<1>:w 0:w {align1}; +mov (2) mbb_result.4<1>:ud mb_mv2.16<2,2,1>:ud {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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_start; +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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.20<1>:w -1:w {align1}; +mov (1) INPUT_ARG0.0<1>:ud mb_inter_wb.4<0,1,0>:ud {align1}; +mov (1) INPUT_ARG0.4<1>:ud mb_inter_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) mov (1) mbc_result.4<1>:ud mb_mv2.16<0,1,0>:ud {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) mov (1) mbc_result.8<1>:ud mb_mv2.20<0,1,0>:ud {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}; +mov (2) mbc_result.4<1>:ud mb_mv2.16<2,2,1>:ud {align1}; + +jmpi (1) mb_mvp_start; +mbd_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_D:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_start; + +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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.20<1>:w -1:w {align1}; +mov (1) INPUT_ARG0.0<1>:ud mb_inter_wb.4<0,1,0>:ud {align1}; +mov (1) INPUT_ARG0.4<1>:ud mb_inter_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}; +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) mov (1) mbc_result.4<1>:ud mb_mv3.24<0,1,0>:ud {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) mov (1) mbc_result.8<1>:ud mb_mv3.28<0,1,0>:ud {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}; +mov (2) mbc_result.4<1>:ud mb_mv3.24<2,2,1>:ud {align1}; + +mb_mvp_start: +/*TODO: Add the skip prediction */ +/* Check whether both MB B and C are inavailable */ +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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>: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, get the MV/Mb cost passed from constant buffer when +spawning thread by MEDIA_OBJECT */ +mov (8) vme_m2<1>:UD r1.0<8,8,1>:UD {align1}; + +mov (8) vme_msg_2<1>:UD vme_m2.0<8,8,1>:UD {align1}; +/* m3 cost center */ +mov (8) vme_m3.0<1>:ud 0x0:ud {align1}; +mov (8) vme_msg_3<1>:UD vme_m3.0<8,8,1>:UD {align1}; + +/* m4. skip center */ +mov (8) vme_msg_4<1>:ud 0x0:ud {align1}; + +/* m5 */ +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_5<1>:UD INEP_ROW.0<8,8,1>:UD {align1}; +/* Use the Luma mode */ +mov (1) tmp_reg0.0<1>:UW LUMA_INTRA_MODE:UW {align1}; +mov (1) vme_msg_5.5<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +/* m6 */ +mov (8) vme_msg_6<1>:UD 0x0:UD {align1}; +mov (16) vme_msg_6.0<1>:UB INEP_COL0.3<32,8,4>:UB {align1}; +mov (1) vme_msg_6.16<1>:UD INTRA_PREDICTORE_MODE {align1}; + +/* the penalty for Intra mode */ +mov (1) vme_msg_6.28<1>:UD 0x010101:UD {align1}; +mov (1) vme_msg_6.20<1>:UW CHROMA_ROW.6<0,1,0>:UW {align1}; + + +/* m7 */ + +mov (4) vme_msg_7.16<1>:UD CHROMA_ROW.8<4,4,1>:UD {align1}; +mov (8) vme_msg_7.0<1>:UW CHROMA_COL.2<16,8,2>:UW {align1}; + +/* + * SIC VME message + */ +/* m1 */ +mov (1) intra_flag<1>:UW 0x0:UW {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 {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}; + +/* Disable DC HAAR component when calculating HARR SATD block */ +mov (1) tmp_reg0.0<1>:UW DC_HARR_DISABLE:UW {align1}; +mov (1) vme_m1.30<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; +mov (8) vme_msg_1<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +/* m0 */ +mov (1) vme_m0.12<1>:UD INTRA_SAD_HAAR:UD {align1}; /* 16x16 Source, Intra_harr */ +mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; + +/* after verification it will be passed by using payload */ +send (8) + vme_msg_ind + vme_wb<1>:UD + null + cre( + BIND_IDX_VME, + VME_SIC_MESSAGE_TYPE + ) + mlen sic_vme_msg_length + rlen vme_wb_length + {align1}; +/* + * Oword Block Write message + */ +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; + +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}; + +/* Distortion, Intra (17-16), */ +mov (1) msg_reg1.16<1>:UW vme_wb.12<0,1,0>:UW {align1}; + +mov (1) msg_reg1.20<1>:UD vme_wb.8<0,1,0>:UD {align1}; +/* VME clock counts */ +mov (1) msg_reg1.24<1>:UD vme_wb.28<0,1,0>:UD {align1}; + +mov (1) msg_reg1.28<1>:UD obw_m0.8<0,1,0>:UD {align1}; + +/* bind index 3, write 2 oword (32bytes), 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}; + +/* IME search */ +mov (1) vme_m0.12<1>:UD SEARCH_CTRL_DUAL_REFERENCE + INTER_PART_MASK + INTER_SAD_HAAR:UD {align1}; /* 16x16 Source, harr */ +mov (1) vme_m0.22<1>:UW DREF_REGION_SIZE {align1}; +/* Dual Reference Width&Height,32x32 */ + +mov (1) vme_m0.0<1>:UD vme_m0.8<0,1,0>:UD {align1}; + +/* Reference = (x-8,y-8)-(x+8,y+8) */ +add (1) vme_m0.0<1>:W vme_m0.0<0,1,0>:W -8:W {align1}; +add (1) vme_m0.2<1>:W vme_m0.2<0,1,0>:W -8:W {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}; + +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}; + +mov (1) vme_m1.0<1>:UD ADAPTIVE_SEARCH_ENABLE:ud {align1} ; +/* the Max MV number is passed by constant buffer */ +mov (1) vme_m1.4<1>:UB r4.28<0,1,0>:UB {align1}; +mov (1) vme_m1.8<1>:UD DSTART_CENTER + DSEARCH_PATH_LEN:UD {align1}; +mov (8) vme_msg_1.0<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +mov (8) vme_msg_2<1>:UD vme_m2.0<8,8,1>:UD {align1}; + + +/* Setup the Cost center */ +/* currently four 8x8 share the same cost center */ +mov (4) vme_m3.0<2>:ud mb_mvp_ref.0<0,1,0>:ud {align1}; +mov (4) vme_m3.4<2>:ud mb_mvp_ref.4<0,1,0>:ud {align1}; + +/* M4/M5 search path */ + +mov (1) vme_msg_4.0<1>:UD 0x10010101:UD {align1}; +mov (1) vme_msg_4.4<1>:UD 0x100F0F0F:UD {align1}; +mov (1) vme_msg_4.8<1>:UD 0x10010101:UD {align1}; +mov (1) vme_msg_4.12<1>:UD 0x000F0F0F:UD {align1}; + +mov (4) vme_msg_4.16<1>:UD 0x0:UD {align1}; +mov (8) vme_msg_5.16<1>:UD 0x0:UD {align1}; + +send (8) + vme_msg_ind + vme_wb<1>:UD + null + vme( + BIND_IDX_VME, + 0, + 0, + VME_IME_MESSAGE_TYPE + ) + mlen ime_vme_msg_length + rlen vme_wb_length {align1}; + +/* Set Macroblock-shape/mode for FBR */ + +mov (1) vme_m2.20<1>:UD 0x0:UD {align1}; +mov (1) vme_m2.21<1>:UB vme_wb.25<0,1,0>:UB {align1}; +mov (1) vme_m2.22<1>:UB vme_wb.26<0,1,0>:UB {align1}; + +and (1) tmp_reg0.0<1>:UW vme_wb.0<0,1,0>:UW 0x03:UW {align1}; +mov (1) vme_m2.20<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +/* Send FBR message into CRE */ + +mov (8) vme_msg_4.0<1>:UD vme_wb1.0<8,8,1>:UD {align1}; +mov (8) vme_msg_5.0<1>:ud vme_wb2.0<8,8,1>:ud {align1}; +mov (8) vme_msg_6.0<1>:ud vme_wb3.0<8,8,1>:ud {align1}; +mov (8) vme_msg_7.0<1>:ud vme_wb4.0<8,8,1>:ud {align1}; + + /* 16x16 Source, 1/4 pixel, harr, BME ENABLE */ +mov (1) vme_m0.12<1>:UD INTER_SAD_HAAR + SUB_PEL_MODE_QUARTER + FBR_BME_ENABLE:UD {align1}; + +mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; + +mov (1) tmp_reg0.0<1>:uw BI_WEIGHT {align1}; +mov (1) vme_m1.6<1>:UB tmp_reg0.0<0,1,0>:ub {align1}; +mov (8) vme_msg_1.0<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +mov (8) vme_msg_2.0<1>:UD vme_m2.0<8,8,1>:UD {align1}; +mov (8) vme_msg_3.0<1>:UD vme_m3.0<8,8,1>:UD {align1}; + +/* after verification it will be passed by using payload */ +send (8) + vme_msg_ind + vme_wb<1>:UD + null + cre( + BIND_IDX_VME, + VME_FBR_MESSAGE_TYPE + ) + mlen fbr_vme_msg_length + rlen vme_wb_length + {align1}; + +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x02:UD {align1}; +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; +/* write FME 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.24<0,1,0>:UD {align1}; +/* Inter distortion of FME */ +mov (1) msg_reg1.8<1>:UD vme_wb.8<0,1,0>:UD {align1}; + +mov (1) msg_reg1.12<1>:UD vme_m2.20<0,1,0>:UD {align1}; + +/* bind index 3, write oword (16bytes), msg type: 8(OWord Block Write) */ +send (16) + msg_ind + obw_wb + null + data_port( + OBW_CACHE_TYPE, + OBW_MESSAGE_TYPE, + OBW_CONTROL_0, + OBW_BIND_IDX, + OBW_WRITE_COMMIT_CATEGORY, + OBW_HEADER_PRESENT + ) + mlen 2 + rlen obw_wb_length + {align1}; + +/* Write FME/BME MV */ +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x01:UD {align1}; +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}; + +/* Write FME/BME RefID */ +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x08:UD {align1}; +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; + +mov (8) msg_reg1.0<1>:UD vme_wb6.0<8,8,1>:UD {align1}; + +/* bind index 3, write 2 oword (32bytes), 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}; + + +/* Issue message fence so that the previous write message is committed */ +send (16) + mb_ind + obw_wb + NULL + data_port( + OBR_CACHE_TYPE, + OBR_MESSAGE_FENCE, + OBR_MF_COMMIT, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 1 + {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}; + +mb_pred_func: + mov (8) TEMP_VAR0.0<1>:ud 0:ud {align1}; + mov (1) TEMP_VAR0.0<1>:ub INPUT_ARG0.2<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<0,1,0>: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<0,1,0>: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<0,1,0>: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<0,1,0>: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<0,1,0>: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<0,1,0>: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<0,1,0>: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<0,1,0>:uw PRED_MASK {align1}; +end_mb_pred: + RETURN {align1}; + diff --git a/src/shaders/vme/inter_bframe_gen8.g8a b/src/shaders/vme/inter_bframe_gen8.g8a new file mode 100644 index 0000000..8aff32e --- /dev/null +++ b/src/shaders/vme/inter_bframe_gen8.g8a @@ -0,0 +1,2 @@ +#include "vme8.inc" +#include "inter_bframe_gen8.asm" diff --git a/src/shaders/vme/inter_bframe_gen8.g8b b/src/shaders/vme/inter_bframe_gen8.g8b new file mode 100644 index 0000000..b3d74cc --- /dev/null +++ b/src/shaders/vme/inter_bframe_gen8.g8b @@ -0,0 +1,423 @@ + { 0x00800001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24400608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24800608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24c00608, 0x00000000, 0x00000000 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00000001, 0x24080e08, 0x08000000, 0x0000001f }, + { 0x00000001, 0x24142288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x000f0003 }, + { 0x00000001, 0x24342288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24482248, 0x164500a0, 0x00040004 }, + { 0x00000001, 0x24542288, 0x00000014, 0x00000000 }, + { 0x00000041, 0x24881208, 0x220000a2, 0x000000a1 }, + { 0x00000040, 0x24880208, 0x22000488, 0x000000a0 }, + { 0x00000041, 0x24880208, 0x06000488, 0x00000018 }, + { 0x00000001, 0x24942288, 0x00000014, 0x00000000 }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x23800a88, 0x0e000800, 0x02190004 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x23a00a88, 0x0e000800, 0x02290004 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24000a28, 0x1e000400, 0x00020002 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x26000a88, 0x0e000800, 0x02190006 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24200a28, 0x1e000420, 0x00020002 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x00070003 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x26200a88, 0x0e000800, 0x02190006 }, + { 0x00600001, 0x24600608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2a800608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20001240, 0x160000a6, 0x00040004 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000d60 }, + { 0x00600001, 0x2ae00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b000608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b200608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000210 }, + { 0x00000001, 0x2ae00e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24001a68, 0x1e000400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000160 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00000001, 0x2fa00208, 0x00000b84, 0x00000000 }, + { 0x00000001, 0x2fa40208, 0x00000b80, 0x00000000 }, + { 0x00000001, 0x2fa80608, 0x00000000, 0x00000001 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00001490 }, + { 0x00000001, 0x2aa01248, 0x00000fe4, 0x00000000 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00000000 }, + { 0x00010001, 0x2af01e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2af41e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2ae40208, 0x00000bc8, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00010001 }, + { 0x00010001, 0x2af21e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2af61e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2ae80208, 0x00000bcc, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x00200001, 0x2ae40208, 0x00450bc8, 0x00000000 }, + { 0x00200001, 0x2af01e48, 0x18000000, 0x00010001 }, + { 0x00200001, 0x2af41e68, 0x18000000, 0x00000000 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000006c0 }, + { 0x00000001, 0x2b000e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000160 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00000001, 0x2fa00208, 0x00000b84, 0x00000000 }, + { 0x00000001, 0x2fa40208, 0x00000b80, 0x00000000 }, + { 0x00000001, 0x2fa80608, 0x00000000, 0x00000002 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00001230 }, + { 0x00000001, 0x2aa01248, 0x00000fe4, 0x00000000 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00000000 }, + { 0x00010001, 0x2b101e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b141e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b040208, 0x00000bf0, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00010001 }, + { 0x00010001, 0x2b121e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b161e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b080208, 0x00000bf4, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x00200001, 0x2b101e48, 0x18000000, 0x00010001 }, + { 0x00200001, 0x2b141e68, 0x18000000, 0x00000000 }, + { 0x00200001, 0x2b040208, 0x00450bf0, 0x00000000 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00080008 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000230 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000003c0 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00000001, 0x2fa00208, 0x00000b84, 0x00000000 }, + { 0x00000001, 0x2fa40208, 0x00000b80, 0x00000000 }, + { 0x00000001, 0x2fa80608, 0x00000000, 0x00000002 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000fe0 }, + { 0x00000001, 0x2aa01248, 0x00000fe4, 0x00000000 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00000000 }, + { 0x00010001, 0x2b301e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b341e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b240208, 0x00000bf0, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000002e0 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00010001 }, + { 0x00010001, 0x2b321e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b361e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b280208, 0x00000bf4, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000290 }, + { 0x00200001, 0x2b301e48, 0x18000000, 0x00010001 }, + { 0x00200001, 0x2b341e68, 0x18000000, 0x00000000 }, + { 0x00200001, 0x2b240208, 0x00450bf0, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000250 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00040004 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000210 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00200040, 0x24001a68, 0x1e450400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000160 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a88, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00000001, 0x2fa00208, 0x00000b84, 0x00000000 }, + { 0x00000001, 0x2fa40208, 0x00000b80, 0x00000000 }, + { 0x00000001, 0x2fa80608, 0x00000000, 0x00000003 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000d80 }, + { 0x00000001, 0x2aa01248, 0x00000fe4, 0x00000000 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00000000 }, + { 0x00010001, 0x2b301e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b341e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b240208, 0x00000c18, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x01000010, 0x20001240, 0x16000aa0, 0x00010001 }, + { 0x00010001, 0x2b321e48, 0x18000000, 0x00010001 }, + { 0x00010001, 0x2b361e68, 0x18000000, 0x00000000 }, + { 0x00010001, 0x2b280208, 0x00000c1c, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x00200001, 0x2b301e48, 0x18000000, 0x00010001 }, + { 0x00200001, 0x2b341e68, 0x18000000, 0x00000000 }, + { 0x00200001, 0x2b240208, 0x00450c18, 0x00000000 }, + { 0x00000040, 0x24000a28, 0x0a000b00, 0x00000b20 }, + { 0x01000010, 0x20000a20, 0x0e000400, 0x00000000 }, + { 0x00110020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x02000010, 0x20000a20, 0x0e000ae0, 0x00000001 }, + { 0x00210001, 0x2b040208, 0x00450ae4, 0x00000000 }, + { 0x00210001, 0x2b240208, 0x00450ae4, 0x00000000 }, + { 0x00210001, 0x2b141248, 0x00450af4, 0x00000000 }, + { 0x00210001, 0x2b341248, 0x00450af4, 0x00000000 }, + { 0x00210001, 0x2ac00208, 0x00450ae4, 0x00000000 }, + { 0x00310001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000320 }, + { 0x00600001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000af4, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000ae4, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b14, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b04, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b34, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b24, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x2ac00208, 0x00000404, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, + { 0x00000001, 0x2fa01a68, 0x00000ae4, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b04, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b24, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x000009d0 }, + { 0x00000001, 0x2ac01a68, 0x00000fe4, 0x00000000 }, + { 0x00000001, 0x2fa01a68, 0x00000ae6, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b06, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b26, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000970 }, + { 0x00000001, 0x2ac21a68, 0x00000fe4, 0x00000000 }, + { 0x00600001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000af6, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000ae8, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b16, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b08, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b36, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b28, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x2ac40208, 0x00000404, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, + { 0x00000001, 0x2fa01a68, 0x00000ae8, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b08, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b28, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000840 }, + { 0x00000001, 0x2ac41a68, 0x00000fe4, 0x00000000 }, + { 0x00000001, 0x2fa01a68, 0x00000aea, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b0a, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b2a, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x000007e0 }, + { 0x00000001, 0x2ac61a68, 0x00000fe4, 0x00000000 }, + { 0x0040000c, 0x2a801a68, 0x1e690ac0, 0x00020002 }, + { 0x00400040, 0x2a881a68, 0x1e690a80, 0x00030003 }, + { 0x00400005, 0x2a901248, 0x16690a88, 0xfffcfffc }, + { 0x00600001, 0x25600208, 0x008d0020, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x25800608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x00600001, 0x28800608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x23800608, 0x00000000, 0x00000000 }, + { 0x00000005, 0x23840208, 0x06000384, 0xff000000 }, + { 0x00600001, 0x28a00208, 0x008d0380, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00010001 }, + { 0x00000001, 0x28a52288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28c00608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x28c02288, 0x00cf03a3, 0x00000000 }, + { 0x00000001, 0x28d00608, 0x00000000, 0x11111111 }, + { 0x00000001, 0x28dc0608, 0x00000000, 0x00010101 }, + { 0x00000001, 0x28d41248, 0x00000606, 0x00000000 }, + { 0x00400001, 0x28f00208, 0x00690608, 0x00000000 }, + { 0x00600001, 0x28e01248, 0x00ae0622, 0x00000000 }, + { 0x00000001, 0x247c1648, 0x10000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a4, 0x00010001 }, + { 0x00010001, 0x247c0e88, 0x08000000, 0x00000002 }, + { 0x00000001, 0x247d2288, 0x000000a5, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00200020 }, + { 0x00000001, 0x247e2288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00800000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000190, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000194, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28301248, 0x0000018c, 0x00000000 }, + { 0x00000001, 0x28340208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x28380208, 0x0000019c, 0x00000000 }, + { 0x00000001, 0x283c0208, 0x00000488, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00200700 }, + { 0x00000001, 0x24561648, 0x10000000, 0x20202020 }, + { 0x00000001, 0x24400208, 0x00000448, 0x00000000 }, + { 0x00000040, 0x24401a68, 0x1e000440, 0xfff8fff8 }, + { 0x00000040, 0x24421a68, 0x1e000442, 0xfff8fff8 }, + { 0x00000001, 0x24401e68, 0x18000000, 0xfff8fff8 }, + { 0x00000001, 0x24421e68, 0x18000000, 0xfff8fff8 }, + { 0x00000001, 0x24440208, 0x00000440, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00010040, 0x24401a68, 0x1e000440, 0x00040004 }, + { 0x00010040, 0x24441a68, 0x1e000444, 0x00040004 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00010040, 0x24421a68, 0x1e000442, 0x00040004 }, + { 0x00010040, 0x24461a68, 0x1e000446, 0x00040004 }, + { 0x00200040, 0x24401a68, 0x1a450440, 0x00450a90 }, + { 0x00200040, 0x24441a68, 0x1a450444, 0x00450a94 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00000001, 0x24600608, 0x00000000, 0x00000002 }, + { 0x00000001, 0x24642288, 0x0000009c, 0x00000000 }, + { 0x00000001, 0x24680608, 0x00000000, 0x00001212 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00400001, 0x45800208, 0x00000ac0, 0x00000000 }, + { 0x00400001, 0x45840208, 0x00000ac4, 0x00000000 }, + { 0x00000001, 0x28800608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28840608, 0x00000000, 0x100f0f0f }, + { 0x00000001, 0x28880608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x288c0608, 0x00000000, 0x000f0f0f }, + { 0x00400001, 0x28900608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28b00608, 0x00000000, 0x00000000 }, + { 0x08600031, 0x21800a08, 0x0e000800, 0x0c784000 }, + { 0x00000001, 0x25740608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25752288, 0x00000199, 0x00000000 }, + { 0x00000001, 0x25762288, 0x0000019a, 0x00000000 }, + { 0x00000005, 0x24001248, 0x16000180, 0x00030003 }, + { 0x00000001, 0x25742288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28a00208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28c00208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28e00208, 0x008d0200, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00203000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00200020 }, + { 0x00000001, 0x24662288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10786000 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000002 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000574, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0003 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000001 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d0200, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x0a0a0403 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000008 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0240, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x0a800031, 0x20000a60, 0x0e000b40, 0x0219e003 }, + { 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 }, + { 0x07800031, 0x24000a40, 0x0e000e00, 0x82000010 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000a0 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000060 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x00600001, 0x2f600608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x2f602288, 0x00000fa2, 0x00000000 }, + { 0x00000005, 0x2f641248, 0x16000fa4, 0x00030003 }, + { 0x01000010, 0x20001240, 0x16000f64, 0x00000000 }, + { 0x00010005, 0x2fe41248, 0x16000f60, 0x00030003 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000150 }, + { 0x01000010, 0x20001240, 0x16000f64, 0x00030003 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000100 }, + { 0x01000010, 0x20001240, 0x16000f64, 0x00010001 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, + { 0x00000001, 0x2f681248, 0x00000fa8, 0x00000000 }, + { 0x01000005, 0x20001240, 0x16000f68, 0x00010001 }, + { 0x00010005, 0x2fe41248, 0x16000f60, 0x00030003 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000d0 }, + { 0x00000008, 0x2f701248, 0x16000f60, 0x00020002 }, + { 0x00000005, 0x2fe41248, 0x16000f70, 0x00030003 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x000000a0 }, + { 0x00000001, 0x2f681248, 0x00000fa8, 0x00000000 }, + { 0x05000010, 0x20001240, 0x16000f68, 0x00020002 }, + { 0x00010005, 0x2fe41248, 0x16000f60, 0x00030003 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000060 }, + { 0x00000008, 0x2f701248, 0x16000f60, 0x00020002 }, + { 0x00000005, 0x2fe41248, 0x16000f70, 0x00030003 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x00000041, 0x2f681248, 0x16000fa8, 0x00020002 }, + { 0x00000008, 0x2f701248, 0x12000f60, 0x00000f68 }, + { 0x00000005, 0x2fe41248, 0x16000f70, 0x00030003 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, diff --git a/src/shaders/vme/inter_frame_gen8.asm b/src/shaders/vme/inter_frame_gen8.asm new file mode 100644 index 0000000..aa9fb80 --- /dev/null +++ b/src/shaders/vme/inter_frame_gen8.asm @@ -0,0 +1,727 @@ +/* + * Copyright © <2013>, 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. + * + */ +// Modual name: Inter_frame_gen8.asm +// +// Make inter predition estimation for Inter-frame on gen8 +// + +// +// 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 24: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}; + +/* + * Media Read Message -- fetch Chroma neighbor edge pixels + */ +/* ROW */ +shl (2) read0_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16 , y * 8 */ +mul (1) read0_header.0<1>:D read0_header.0<0,1,0>:D 2:W {align1}; +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 (8) msg_reg0.0<1>:UD read0_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_ROW<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {align1}; + +/* COL */ +shl (2) read1_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16, y * 8 */ +mul (1) read1_header.0<1>:D read1_header.0<0,1,0>:D 2:W {align1}; +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_8X4 {align1}; +mov (8) msg_reg0.0<1>:UD read1_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_COL<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mba_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mbb_start; + +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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 (1) mba_result.16<1>:w MB_PRED_FLAG {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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbb_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mbc_start; +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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 (1) mbb_result.16<1>:w 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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +/* TODO: RefID is required after multi-references are added */ +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_start; +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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 (1) mbc_result.16<1>:w MB_PRED_FLAG {align1}; + +jmpi (1) mb_mvp_start; +mbd_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_D:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_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 24:UD {align1}; +mov (1) mb_msg0.20<1>:UB thread_id_ub {align1}; /* dispatch id */ + +/* 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_4, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 2 + {align1}; + +cmp.l.f0.0 (1) null:w mb_intra_wb.16<0,1,0>:uw mb_inter_wb.8<0,1,0>:uw {align1}; +(f0.0) mov (2) mbc_result.20<1>:w -1:w {align1}; +(f0.0) jmpi (1) mb_mvp_start; + +add (1) mb_msg0.8<1>:UD mb_msg0.8<0,1,0>:ud 3: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 (1) mbc_result.16<1>:w MB_PRED_FLAG {align1}; + +mb_mvp_start: +/*TODO: Add the skip prediction */ +/* Check whether both MB B and C are inavailable */ +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 (1) mbb_result.4<1>:ud mba_result.4<0,1,0>:ud {align1}; +(f0.0) mov (1) mbc_result.4<1>:ud mba_result.4<0,1,0>:ud {align1}; +(f0.0) mov (1) mbb_result.20<1>:uw mba_result.20<0,1,0>:uw {align1}; +(f0.0) mov (1) mbc_result.20<1>:uw mba_result.20<0,1,0>:uw {align1}; +(f0.0) mov (1) mb_mvp_ref.0<1>:ud mba_result.4<0,1,0>:ud {align1}; +(-f0.0) mov (1) mb_mvp_ref.0<1>:ud 0:ud {align1}; +jmpi (1) __mb_hwdep_end; + +mb_median_start: +/* 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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>:w 0:w {align1}; +(f0.0) add (1) tmp_reg0.0<1>:w tmp_reg0.0<0,1,0>: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<0,1,0>: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) __mb_hwdep_end; + +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}; + +__mb_hwdep_end: +asr (2) mb_ref_win.0<1>:w mb_mvp_ref.0<2,2,1>:w 2:w {align1}; +add (2) mb_ref_win.8<1>:w mb_ref_win.0<2,2,1>:w 3:w {align1}; +and (2) mb_ref_win.16<1>:uw mb_ref_win.8<2,2,1>:uw 0xFFFC:uw {align1}; +/* m2, get the MV/Mb cost passed from constant buffer when +spawning thread by MEDIA_OBJECT */ +mov (8) vme_m2<1>:UD r1.0<8,8,1>:UD {align1}; + +mov (8) vme_msg_2<1>:UD vme_m2.0<8,8,1>:UD {align1}; + +/* m3 FWD/BWD cost center*/ +mov (8) vme_msg_3<1>:UD 0x0:UD {align1}; + +/* m4 skip center*/ +mov (8) vme_msg_4<1>:UD 0x0:UD {align1}; + +/* m5 */ +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_5<1>:UD INEP_ROW.0<8,8,1>:UD {align1}; + + +/* Use the Luma mode */ +mov (1) tmp_reg0.0<1>:UW LUMA_INTRA_MODE:UW {align1}; +mov (1) vme_msg_5.5<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +/* m6 */ +mov (8) vme_msg_6<1>:UD 0x0:UD {align1}; +mov (16) vme_msg_6.0<1>:UB INEP_COL0.3<32,8,4>:UB {align1}; +mov (1) vme_msg_6.16<1>:UD INTRA_PREDICTORE_MODE {align1}; + +/* the penalty for Intra mode */ +mov (1) vme_msg_6.28<1>:UD 0x010101:UD {align1}; +mov (1) vme_msg_6.20<1>:UW CHROMA_ROW.6<0,1,0>:UW {align1}; + + +/* m7 */ + +mov (4) vme_msg_7.16<1>:UD CHROMA_ROW.8<4,4,1>:UD {align1}; +mov (8) vme_msg_7.0<1>:UW CHROMA_COL.2<16,8,2>:UW {align1}; + +/* + * SIC VME message + */ + +/* m1 */ +mov (1) intra_flag<1>:UW 0x0:UW {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 {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}; + +/* Disable DC HAAR component when calculating HARR SATD block */ +mov (1) tmp_reg0.0<1>:UW DC_HARR_DISABLE:UW {align1}; +mov (1) vme_m1.30<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; +mov (8) vme_msg_1<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +/* m0 */ +mov (1) vme_m0.12<1>:UD INTRA_SAD_HAAR:UD {align1}; /* 16x16 Source, Intra_harr */ +mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; + +/* after verification it will be passed by using payload */ +send (8) + vme_msg_ind + vme_wb<1>:UD + null + cre( + BIND_IDX_VME, + VME_SIC_MESSAGE_TYPE + ) + mlen sic_vme_msg_length + rlen vme_wb_length + {align1}; +/* + * Oword Block Write message + */ +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; + +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}; + +/* Distortion, Intra (17-16), */ +mov (1) msg_reg1.16<1>:UW vme_wb.12<0,1,0>:UW {align1}; + +mov (1) msg_reg1.20<1>:UD vme_wb.8<0,1,0>:UD {align1}; +/* VME clock counts */ +mov (1) msg_reg1.24<1>:UD vme_wb.28<0,1,0>:UD {align1}; + +mov (1) msg_reg1.28<1>:UD obw_m0.8<0,1,0>:UD {align1}; + +/* bind index 3, write 2 oword (32bytes), 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}; + +/* IME search */ +mov (1) vme_m0.12<1>:UD SEARCH_CTRL_SINGLE + INTER_PART_MASK + INTER_SAD_HAAR:UD {align1}; /* 16x16 Source, harr */ +mov (1) vme_m0.22<1>:UW REF_REGION_SIZE {align1}; /* Reference Width&Height, 48x40 */ + +mov (1) vme_m0.0<1>:UD vme_m0.8<0,1,0>:UD {align1}; + +add (1) vme_m0.0<1>:W vme_m0.0<0,1,0>:W -16:W {align1}; /* Reference = (x-16,y-12)-(x+32,y+28) */ +add (1) vme_m0.2<1>:W vme_m0.2<0,1,0>:W -12:W {align1}; + +mov (1) vme_m0.0<1>:W -16:W {align1}; +mov (1) vme_m0.2<1>:W -12: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 12: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 8:w {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.16<2,2,1>:w {align1}; +mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; + +mov (1) vme_m1.0<1>:UD ADAPTIVE_SEARCH_ENABLE:ud {align1} ; +/* the Max MV number is passed by constant buffer */ +mov (1) vme_m1.4<1>:UB r4.28<0,1,0>:UB {align1}; +mov (1) vme_m1.8<1>:UD START_CENTER + SEARCH_PATH_LEN:UD {align1}; +mov (8) vme_msg_1.0<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +/* Setup the Cost center */ +/* currently four 8x8 share the same cost center */ +mov (4) vme_m3.0<2>:ud mb_mvp_ref.0<0,1,0>:ud {align1}; +mov (4) vme_m3.4<2>:ud mb_mvp_ref.0<0,1,0>:ud {align1}; + +mov (8) vme_msg_3<1>:UD vme_m3.0<8,8,1>:UD {align1}; +mov (8) vme_msg_2<1>:UD vme_m2.0<8,8,1>:UD {align1}; + +/* M4/M5 search path */ +mov (1) vme_msg_4.0<1>:UD 0x01010101:UD {align1}; +mov (1) vme_msg_4.4<1>:UD 0x10010101:UD {align1}; +mov (1) vme_msg_4.8<1>:UD 0x0F0F0F0F:UD {align1}; +mov (1) vme_msg_4.12<1>:UD 0x100F0F0F:UD {align1}; +mov (1) vme_msg_4.16<1>:UD 0x01010101:UD {align1}; +mov (1) vme_msg_4.20<1>:UD 0x10010101:UD {align1}; +mov (1) vme_msg_4.24<1>:UD 0x0F0F0F0F:UD {align1}; +mov (1) vme_msg_4.28<1>:UD 0x100F0F0F:UD {align1}; + +mov (1) vme_msg_5.0<1>:UD 0x01010101:UD {align1}; +mov (1) vme_msg_5.4<1>:UD 0x10010101:UD {align1}; +mov (1) vme_msg_5.8<1>:UD 0x0F0F0F0F:UD {align1}; +mov (1) vme_msg_5.12<1>:UD 0x000F0F0F:UD {align1}; + +mov (4) vme_msg_5.16<1>:UD 0x0:UD {align1}; + +send (8) + vme_msg_ind + vme_wb<1>:UD + null + vme( + BIND_IDX_VME, + 0, + 0, + VME_IME_MESSAGE_TYPE + ) + mlen ime_vme_msg_length + rlen vme_wb_length {align1}; + +/* Set Macroblock-shape/mode for FBR */ + +mov (1) vme_m2.20<1>:UD 0x0:UD {align1}; +mov (1) vme_m2.21<1>:UB vme_wb.25<0,1,0>:UB {align1}; +mov (1) vme_m2.22<1>:UB vme_wb.26<0,1,0>:UB {align1}; + +and (1) tmp_reg0.0<1>:UW vme_wb.0<0,1,0>:UW 0x03:UW {align1}; +mov (1) vme_m2.20<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +/* Send FBR message into CRE */ + +mov (8) vme_msg_4.0<1>:UD vme_wb1.0<8,8,1>:UD {align1}; +mov (8) vme_msg_5.0<1>:ud vme_wb2.0<8,8,1>:ud {align1}; +mov (8) vme_msg_6.0<1>:ud vme_wb3.0<8,8,1>:ud {align1}; +mov (8) vme_msg_7.0<1>:ud vme_wb4.0<8,8,1>:ud {align1}; + +mov (1) vme_m0.12<1>:UD INTER_SAD_HAAR + SUB_PEL_MODE_QUARTER + FBR_BME_DISABLE:UD {align1}; /* 16x16 Source, 1/4 pixel, harr, BME disable */ +mov (8) vme_msg_0.0<1>:UD vme_m0.0<8,8,1>:UD {align1}; +mov (8) vme_msg_1.0<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +mov (8) vme_msg_2.0<1>:UD vme_m2.0<8,8,1>:UD {align1}; +mov (8) vme_msg_3.0<1>:UD vme_m3.0<8,8,1>:UD {align1}; + +/* after verification it will be passed by using payload */ +send (8) + vme_msg_ind + vme_wb<1>:UD + null + cre( + BIND_IDX_VME, + VME_FBR_MESSAGE_TYPE + ) + mlen fbr_vme_msg_length + rlen vme_wb_length + {align1}; + +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x02:UD {align1}; +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; +/* write FME 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.24<0,1,0>:UD {align1}; +/* Inter distortion of FME */ +mov (1) msg_reg1.8<1>:UD vme_wb.8<0,1,0>:UD {align1}; + +mov (1) msg_reg1.12<1>:UD vme_m2.20<0,1,0>:UD {align1}; + +/* bind index 3, write oword (16bytes), msg type: 8(OWord Block Write) */ +send (16) + msg_ind + obw_wb + null + data_port( + OBW_CACHE_TYPE, + OBW_MESSAGE_TYPE, + OBW_CONTROL_0, + OBW_BIND_IDX, + OBW_WRITE_COMMIT_CATEGORY, + OBW_HEADER_PRESENT + ) + mlen 2 + rlen obw_wb_length + {align1}; + +/* Write FME/BME MV */ +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x01:UD {align1}; +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}; + +/* Write FME/BME RefID */ +add (1) obw_m0.8<1>:UD obw_m0.8<0,1,0>:UD 0x08:UD {align1}; +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; + +mov (8) msg_reg1.0<1>:UD vme_wb6.0<8,8,1>:UD {align1}; + +/* bind index 3, write 2 oword (32bytes), 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}; + +/* Issue message fence so that the previous write message is committed */ +send (16) + mb_ind + mb_wb.0<1>:ud + NULL + data_port( + OBR_CACHE_TYPE, + OBR_MESSAGE_FENCE, + OBR_MF_COMMIT, + OBR_BIND_IDX, + OBR_WRITE_COMMIT_CATEGORY, + OBR_HEADER_PRESENT + ) + mlen 1 + rlen 1 + {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}; + diff --git a/src/shaders/vme/inter_frame_gen8.g8a b/src/shaders/vme/inter_frame_gen8.g8a new file mode 100644 index 0000000..f514dd3 --- /dev/null +++ b/src/shaders/vme/inter_frame_gen8.g8a @@ -0,0 +1,2 @@ +#include "vme8.inc" +#include "inter_frame_gen8.asm" diff --git a/src/shaders/vme/inter_frame_gen8.g8b b/src/shaders/vme/inter_frame_gen8.g8b new file mode 100644 index 0000000..c4e2c97 --- /dev/null +++ b/src/shaders/vme/inter_frame_gen8.g8b @@ -0,0 +1,300 @@ + { 0x00800001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24400608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24800608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24c00608, 0x00000000, 0x00000000 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00000001, 0x24080e08, 0x08000000, 0x0000001f }, + { 0x00000001, 0x24142288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x000f0003 }, + { 0x00000001, 0x24342288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24482248, 0x164500a0, 0x00040004 }, + { 0x00000001, 0x24542288, 0x00000014, 0x00000000 }, + { 0x00000041, 0x24881208, 0x220000a2, 0x000000a1 }, + { 0x00000040, 0x24880208, 0x22000488, 0x000000a0 }, + { 0x00000041, 0x24880208, 0x06000488, 0x00000018 }, + { 0x00000001, 0x24942288, 0x00000014, 0x00000000 }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x23800a88, 0x0e000800, 0x02190004 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x23a00a88, 0x0e000800, 0x02290004 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24000a28, 0x1e000400, 0x00020002 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x26000a88, 0x0e000800, 0x02190006 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24200a28, 0x1e000420, 0x00020002 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x00070003 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x26200a88, 0x0e000800, 0x02190006 }, + { 0x00600001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2a800608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20001240, 0x160000a6, 0x00040004 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000750 }, + { 0x00600001, 0x2ae00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b000608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b200608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000f0 }, + { 0x00000001, 0x2ae00e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24001a68, 0x1e000400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2ae40208, 0x00450bc8, 0x00000000 }, + { 0x00000001, 0x2af01e68, 0x18000000, 0x00010001 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000360 }, + { 0x00000001, 0x2b000e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b040208, 0x00450bf0, 0x00000000 }, + { 0x00000001, 0x2b101e68, 0x18000000, 0x00010001 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00080008 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000110 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000180 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b240208, 0x00450bf0, 0x00000000 }, + { 0x00000001, 0x2b301e68, 0x18000000, 0x00010001 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000130 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00040004 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000f0 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00200040, 0x24001a68, 0x1e450400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a88, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b240208, 0x00450c18, 0x00000000 }, + { 0x00000001, 0x2b301e68, 0x18000000, 0x00010001 }, + { 0x00000040, 0x24000a28, 0x0a000b00, 0x00000b20 }, + { 0x01000010, 0x20000a20, 0x0e000400, 0x00000000 }, + { 0x00110020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x02000010, 0x20000a20, 0x0e000ae0, 0x00000001 }, + { 0x00010001, 0x2b040208, 0x00000ae4, 0x00000000 }, + { 0x00010001, 0x2b240208, 0x00000ae4, 0x00000000 }, + { 0x00010001, 0x2b141248, 0x00000af4, 0x00000000 }, + { 0x00010001, 0x2b341248, 0x00000af4, 0x00000000 }, + { 0x00010001, 0x2ac00208, 0x00000ae4, 0x00000000 }, + { 0x00110001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000190 }, + { 0x00600001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000af4, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000ae4, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b14, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b04, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b34, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b24, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x2ac00208, 0x00000404, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, + { 0x00000001, 0x2fa01a68, 0x00000ae4, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b04, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b24, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000870 }, + { 0x00000001, 0x2ac01a68, 0x00000fe4, 0x00000000 }, + { 0x00000001, 0x2fa01a68, 0x00000ae6, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b06, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b26, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000810 }, + { 0x00000001, 0x2ac21a68, 0x00000fe4, 0x00000000 }, + { 0x0020000c, 0x2a801a68, 0x1e450ac0, 0x00020002 }, + { 0x00200040, 0x2a881a68, 0x1e450a80, 0x00030003 }, + { 0x00200005, 0x2a901248, 0x16450a88, 0xfffcfffc }, + { 0x00600001, 0x25600208, 0x008d0020, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x28600608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28800608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x23800608, 0x00000000, 0x00000000 }, + { 0x00000005, 0x23840208, 0x06000384, 0xff000000 }, + { 0x00600001, 0x28a00208, 0x008d0380, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00010001 }, + { 0x00000001, 0x28a52288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28c00608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x28c02288, 0x00cf03a3, 0x00000000 }, + { 0x00000001, 0x28d00608, 0x00000000, 0x11111111 }, + { 0x00000001, 0x28dc0608, 0x00000000, 0x00010101 }, + { 0x00000001, 0x28d41248, 0x00000606, 0x00000000 }, + { 0x00400001, 0x28f00208, 0x00690608, 0x00000000 }, + { 0x00600001, 0x28e01248, 0x00ae0622, 0x00000000 }, + { 0x00000001, 0x247c1648, 0x10000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a4, 0x00010001 }, + { 0x00010001, 0x247c0e88, 0x08000000, 0x00000002 }, + { 0x00000001, 0x247d2288, 0x000000a5, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00200020 }, + { 0x00000001, 0x247e2288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00800000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000190, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000194, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28301248, 0x0000018c, 0x00000000 }, + { 0x00000001, 0x28340208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x28380208, 0x0000019c, 0x00000000 }, + { 0x00000001, 0x283c0208, 0x00000488, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00200000 }, + { 0x00000001, 0x24561648, 0x10000000, 0x28302830 }, + { 0x00000001, 0x24400208, 0x00000448, 0x00000000 }, + { 0x00000040, 0x24401a68, 0x1e000440, 0xfff0fff0 }, + { 0x00000040, 0x24421a68, 0x1e000442, 0xfff4fff4 }, + { 0x00000001, 0x24401e68, 0x18000000, 0xfff0fff0 }, + { 0x00000001, 0x24421e68, 0x18000000, 0xfff4fff4 }, + { 0x00000001, 0x24440208, 0x00000440, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00010040, 0x24401a68, 0x1e000440, 0x000c000c }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00010040, 0x24421a68, 0x1e000442, 0x00080008 }, + { 0x00200040, 0x24401a68, 0x1a450440, 0x00450a90 }, + { 0x00200040, 0x24441a68, 0x1a450444, 0x00450a90 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00000001, 0x24600608, 0x00000000, 0x00000002 }, + { 0x00000001, 0x24642288, 0x0000009c, 0x00000000 }, + { 0x00000001, 0x24680608, 0x00000000, 0x30003030 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00400001, 0x45800208, 0x00000ac0, 0x00000000 }, + { 0x00400001, 0x45840208, 0x00000ac0, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00000001, 0x28800608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28840608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28880608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x288c0608, 0x00000000, 0x100f0f0f }, + { 0x00000001, 0x28900608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28940608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28980608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x289c0608, 0x00000000, 0x100f0f0f }, + { 0x00000001, 0x28a00608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28a40608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28a80608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x28ac0608, 0x00000000, 0x000f0f0f }, + { 0x00400001, 0x28b00608, 0x00000000, 0x00000000 }, + { 0x08600031, 0x21800a08, 0x0e000800, 0x0c784000 }, + { 0x00000001, 0x25740608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25752288, 0x00000199, 0x00000000 }, + { 0x00000001, 0x25762288, 0x0000019a, 0x00000000 }, + { 0x00000005, 0x24001248, 0x16000180, 0x00030003 }, + { 0x00000001, 0x25742288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28a00208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28c00208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28e00208, 0x008d0200, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00243000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10786000 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000002 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000574, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0003 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000001 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d0200, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x0a0a0403 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000008 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0240, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x0219e003 }, + { 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 }, + { 0x07800031, 0x24000a40, 0x0e000e00, 0x82000010 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000a0 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000060 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, diff --git a/src/shaders/vme/intra_frame_gen8.asm b/src/shaders/vme/intra_frame_gen8.asm new file mode 100644 index 0000000..41cdb3a --- /dev/null +++ b/src/shaders/vme/intra_frame_gen8.asm @@ -0,0 +1,185 @@ +/* + * 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. + * + */ +// Modual name: IntraFrame_gen8.asm +// +// Make intra predition estimation for Intra frame on Gen8 +// + +// +// Now, begin source code.... +// + +/* + * __START + */ +__INTRA_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 0x02: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}; + +/* + * Media Read Message -- fetch Chroma neighbor edge pixels + */ +/* ROW */ +shl (2) read0_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16 , y * 8 */ +mul (1) read0_header.0<1>:D read0_header.0<0,1,0>:D 2:W {align1}; +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 (8) msg_reg0.0<1>:UD read0_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_ROW<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {align1}; + +/* COL */ +shl (2) read1_header.0<1>:D orig_xy_ub<2,2,1>:UB 3:UW {align1}; /* x * 16, y * 8 */ +mul (1) read1_header.0<1>:D read1_header.0<0,1,0>:D 2:W {align1}; +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_8X4 {align1}; +mov (8) msg_reg0.0<1>:UD read1_header.0<8,8,1>:UD {align1}; +send (8) msg_ind CHROMA_COL<1>:UB null read(BIND_IDX_CBCR, 0, 0, 4) mlen 1 rlen 1 {align1}; + +/* m2, get the MV/Mb cost passed by constant buffer +when creating EU thread by MEDIA_OBJECT */ +mov (8) vme_msg_2<1>:UD r1.0<8,8,1>:UD {align1}; + +/* m3. This is changed for FWD/BWD cost center */ +mov (8) vme_msg_3<1>:UD 0x0:UD {align1}; + +/* m4.*/ +mov (8) vme_msg_4<1>:ud 0x0:ud {align1}; + +/* m5 */ +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_5<1>:UD INEP_ROW.0<8,8,1>:UD {align1}; + +mov (1) tmp_reg0.0<1>:UW LUMA_CHROMA_MODE:UW {align1}; +/* Use the Luma mode */ +mov (1) vme_msg_5.5<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +/* m6 */ +mov (8) vme_msg_6<1>:UD 0x0:UD {align1}; +mov (16) vme_msg_6.0<1>:UB INEP_COL0.3<32,8,4>:UB {align1}; +mov (1) vme_msg_6.16<1>:UD INTRA_PREDICTORE_MODE {align1}; + +/* the penalty for Intra mode */ +mov (1) vme_msg_6.28<1>:UD 0x010101:UD {align1}; +mov (1) vme_msg_6.20<1>:UW CHROMA_ROW.6<0,1,0>:UW {align1}; + + +/* m7 */ + +mov (4) vme_msg_7.16<1>:UD CHROMA_ROW.8<4,4,1>:UD {align1}; +mov (8) vme_msg_7.0<1>:UW CHROMA_COL.2<16,8,2>:UW {align1}; + +/* + * VME message + */ + +/* m1 */ +mov (1) intra_flag<1>:UW 0x0:UW {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 {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}; + +/* Disable DC HAAR component when calculating HARR SATD block */ +mov (1) tmp_reg0.0<1>:UW DC_HARR_DISABLE:UW {align1}; +mov (1) vme_m1.30<1>:UB tmp_reg0.0<0,1,0>:UB {align1}; + +mov (8) vme_msg_1<1>:UD vme_m1.0<8,8,1>:UD {align1}; +/* m0 */ +/* 16x16 Source, Intra_harr */ +add (1) vme_m0.12<1>:UD vme_m0.12<0,1,0>:ud INTRA_SAD_HAAR:UD {align1}; +mov (8) vme_msg_1<1>:UD vme_m1.0<8,8,1>:UD {align1}; + +/* after verification it will be passed by using payload */ +send (8) + vme_msg_ind + vme_wb<1>:UD + null + cre( + BIND_IDX_VME, + VME_SIC_MESSAGE_TYPE + ) + mlen sic_vme_msg_length + rlen vme_wb_length + {align1}; +/* + * Oword Block Write message + */ +mov (8) msg_reg0.0<1>:UD obw_m0<8,8,1>:UD {align1}; + +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}; + +/* Distortion, Intra (17-16), */ +mov (1) msg_reg1.16<1>:UW vme_wb.12<0,1,0>:UW {align1}; + +mov (1) msg_reg1.20<1>:UD vme_wb.8<0,1,0>:UD {align1}; +/* VME clock counts */ +mov (1) msg_reg1.24<1>:UD vme_wb.28<0,1,0>:UD {align1}; + +mov (1) msg_reg1.28<1>:UD obw_m0.8<0,1,0>:UD {align1}; + +/* bind index 3, write 2 oword (32bytes), 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}; diff --git a/src/shaders/vme/intra_frame_gen8.g8a b/src/shaders/vme/intra_frame_gen8.g8a new file mode 100644 index 0000000..859c72c --- /dev/null +++ b/src/shaders/vme/intra_frame_gen8.g8a @@ -0,0 +1,2 @@ +#include "vme8.inc" +#include "intra_frame_gen8.asm" diff --git a/src/shaders/vme/intra_frame_gen8.g8b b/src/shaders/vme/intra_frame_gen8.g8b new file mode 100644 index 0000000..43c904a --- /dev/null +++ b/src/shaders/vme/intra_frame_gen8.g8b @@ -0,0 +1,72 @@ + { 0x00800001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24400608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24800608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24c00608, 0x00000000, 0x00000000 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00000001, 0x24080e08, 0x08000000, 0x0000001f }, + { 0x00000001, 0x24142288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x000f0003 }, + { 0x00000001, 0x24342288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24482248, 0x164500a0, 0x00040004 }, + { 0x00000001, 0x24542288, 0x00000014, 0x00000000 }, + { 0x00000041, 0x24881208, 0x220000a2, 0x000000a1 }, + { 0x00000040, 0x24880208, 0x22000488, 0x000000a0 }, + { 0x00000041, 0x24880208, 0x06000488, 0x00000002 }, + { 0x00000001, 0x24942288, 0x00000014, 0x00000000 }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x23800a88, 0x0e000800, 0x02190004 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x23a00a88, 0x0e000800, 0x02290004 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24000a28, 0x1e000400, 0x00020002 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x26000a88, 0x0e000800, 0x02190006 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24200a28, 0x1e000420, 0x00020002 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x00070003 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x26200a88, 0x0e000800, 0x02190006 }, + { 0x00600001, 0x28400208, 0x008d0020, 0x00000000 }, + { 0x00600001, 0x28600608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28800608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x23800608, 0x00000000, 0x00000000 }, + { 0x00000005, 0x23840208, 0x06000384, 0xff000000 }, + { 0x00600001, 0x28a00208, 0x008d0380, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00000000 }, + { 0x00000001, 0x28a52288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28c00608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x28c02288, 0x00cf03a3, 0x00000000 }, + { 0x00000001, 0x28d00608, 0x00000000, 0x11111111 }, + { 0x00000001, 0x28dc0608, 0x00000000, 0x00010101 }, + { 0x00000001, 0x28d41248, 0x00000606, 0x00000000 }, + { 0x00400001, 0x28f00208, 0x00690608, 0x00000000 }, + { 0x00600001, 0x28e01248, 0x00ae0622, 0x00000000 }, + { 0x00000001, 0x247c1648, 0x10000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a4, 0x00010001 }, + { 0x00010001, 0x247c0e88, 0x08000000, 0x00000002 }, + { 0x00000001, 0x247d2288, 0x000000a5, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00200020 }, + { 0x00000001, 0x247e2288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00000040, 0x244c0208, 0x0600044c, 0x00800000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000190, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000194, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28301248, 0x0000018c, 0x00000000 }, + { 0x00000001, 0x28340208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x28380208, 0x0000019c, 0x00000000 }, + { 0x00000001, 0x283c0208, 0x00000488, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 }, + { 0x07800031, 0x24000a40, 0x0e000e00, 0x82000010 }, diff --git a/src/shaders/vme/mpeg2_inter_frame_gen8.g8a b/src/shaders/vme/mpeg2_inter_frame_gen8.g8a new file mode 100644 index 0000000..9925c25 --- /dev/null +++ b/src/shaders/vme/mpeg2_inter_frame_gen8.g8a @@ -0,0 +1,3 @@ +#include "vme8.inc" +#include "vme75_mpeg2.inc" +#include "inter_frame_gen8.asm" diff --git a/src/shaders/vme/mpeg2_inter_frame_gen8.g8b b/src/shaders/vme/mpeg2_inter_frame_gen8.g8b new file mode 100644 index 0000000..7e52539 --- /dev/null +++ b/src/shaders/vme/mpeg2_inter_frame_gen8.g8b @@ -0,0 +1,300 @@ + { 0x00800001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24400608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24800608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x24c00608, 0x00000000, 0x00000000 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00000001, 0x24080e08, 0x08000000, 0x0000001f }, + { 0x00000001, 0x24142288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00040004 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x000f0003 }, + { 0x00000001, 0x24342288, 0x00000014, 0x00000000 }, + { 0x00200009, 0x24482248, 0x164500a0, 0x00040004 }, + { 0x00000001, 0x24542288, 0x00000014, 0x00000000 }, + { 0x00000041, 0x24881208, 0x220000a2, 0x000000a1 }, + { 0x00000040, 0x24880208, 0x22000488, 0x000000a0 }, + { 0x00000041, 0x24880208, 0x06000488, 0x00000018 }, + { 0x00000001, 0x24942288, 0x00000014, 0x00000000 }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x23800a88, 0x0e000800, 0x02190004 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x23a00a88, 0x0e000800, 0x02290004 }, + { 0x00200009, 0x24002228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24000a28, 0x1e000400, 0x00020002 }, + { 0x00000040, 0x24000a28, 0x1e000400, 0xfff8fff8 }, + { 0x00000040, 0x24040a28, 0x1e000404, 0xffffffff }, + { 0x00600001, 0x28000208, 0x008d0400, 0x00000000 }, + { 0x04600031, 0x26000a88, 0x0e000800, 0x02190006 }, + { 0x00200009, 0x24202228, 0x164500a0, 0x00030003 }, + { 0x00000041, 0x24200a28, 0x1e000420, 0x00020002 }, + { 0x00000040, 0x24200a28, 0x1e000420, 0xfffcfffc }, + { 0x00000001, 0x24280e08, 0x08000000, 0x00070003 }, + { 0x00600001, 0x28000208, 0x008d0420, 0x00000000 }, + { 0x04600031, 0x26200a88, 0x0e000800, 0x02190006 }, + { 0x00600001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2a800608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20001240, 0x160000a6, 0x00040004 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000750 }, + { 0x00600001, 0x2ae00608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b000608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b200608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000f0 }, + { 0x00000001, 0x2ae00e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24001a68, 0x1e000400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2af41e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2ae40208, 0x00450bc8, 0x00000000 }, + { 0x00000001, 0x2af01e68, 0x18000000, 0x00010001 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000360 }, + { 0x00000001, 0x2b000e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b141e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b040208, 0x00450bf0, 0x00000000 }, + { 0x00000001, 0x2b101e68, 0x18000000, 0x00010001 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00080008 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000110 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00000040, 0x24021a68, 0x1e000402, 0xffffffff }, + { 0x00000040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000180 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a08, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b240208, 0x00450bf0, 0x00000000 }, + { 0x00000001, 0x2b301e68, 0x18000000, 0x00010001 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000130 }, + { 0x00600001, 0x2b400608, 0x00000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00040004 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000f0 }, + { 0x00000001, 0x2b200e28, 0x08000000, 0x00000001 }, + { 0x00200001, 0x24002248, 0x004500a0, 0x00000000 }, + { 0x00200040, 0x24001a68, 0x1e450400, 0xffffffff }, + { 0x00000041, 0x2b481208, 0x120000a2, 0x00000402 }, + { 0x00000040, 0x2b480208, 0x12000b48, 0x00000400 }, + { 0x00000041, 0x2b480208, 0x06000b48, 0x00000018 }, + { 0x00000001, 0x2b542288, 0x00000014, 0x00000000 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x02280303 }, + { 0x05000010, 0x20001260, 0x12000b70, 0x00000b88 }, + { 0x00210001, 0x2b341e68, 0x18000000, 0xffffffff }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000040 }, + { 0x00000040, 0x2b480208, 0x06000b48, 0x00000003 }, + { 0x0a800031, 0x2ba00a88, 0x0e000b40, 0x02480403 }, + { 0x00200001, 0x2b240208, 0x00450c18, 0x00000000 }, + { 0x00000001, 0x2b301e68, 0x18000000, 0x00010001 }, + { 0x00000040, 0x24000a28, 0x0a000b00, 0x00000b20 }, + { 0x01000010, 0x20000a20, 0x0e000400, 0x00000000 }, + { 0x00110020, 0x34000000, 0x0e001400, 0x00000080 }, + { 0x02000010, 0x20000a20, 0x0e000ae0, 0x00000001 }, + { 0x00010001, 0x2b040208, 0x00000ae4, 0x00000000 }, + { 0x00010001, 0x2b240208, 0x00000ae4, 0x00000000 }, + { 0x00010001, 0x2b141248, 0x00000af4, 0x00000000 }, + { 0x00010001, 0x2b341248, 0x00000af4, 0x00000000 }, + { 0x00010001, 0x2ac00208, 0x00000ae4, 0x00000000 }, + { 0x00110001, 0x2ac00608, 0x00000000, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000190 }, + { 0x00600001, 0x24000608, 0x00000000, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000af4, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000ae4, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b14, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b04, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000b34, 0x00000000 }, + { 0x00010040, 0x24001a68, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x24040208, 0x00000b24, 0x00000000 }, + { 0x01000010, 0x20001a20, 0x1e000400, 0x00010001 }, + { 0x00010001, 0x2ac00208, 0x00000404, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000c0 }, + { 0x00000001, 0x2fa01a68, 0x00000ae4, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b04, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b24, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000870 }, + { 0x00000001, 0x2ac01a68, 0x00000fe4, 0x00000000 }, + { 0x00000001, 0x2fa01a68, 0x00000ae6, 0x00000000 }, + { 0x00000001, 0x2fa41a68, 0x00000b06, 0x00000000 }, + { 0x00000001, 0x2fa81a68, 0x00000b26, 0x00000000 }, + { 0x00000040, 0x2fe00008, 0x06001400, 0x00000020 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000810 }, + { 0x00000001, 0x2ac21a68, 0x00000fe4, 0x00000000 }, + { 0x0020000c, 0x2a801a68, 0x1e450ac0, 0x00020002 }, + { 0x00200040, 0x2a881a68, 0x1e450a80, 0x00030003 }, + { 0x00200005, 0x2a901248, 0x16450a88, 0xfffcfffc }, + { 0x00600001, 0x25600208, 0x008d0020, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x28600608, 0x00000000, 0x00000000 }, + { 0x00600001, 0x28800608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x23800608, 0x00000000, 0x00000000 }, + { 0x00000005, 0x23840208, 0x06000384, 0xff000000 }, + { 0x00600001, 0x28a00208, 0x008d0380, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00010001 }, + { 0x00000001, 0x28a52288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28c00608, 0x00000000, 0x00000000 }, + { 0x00800001, 0x28c02288, 0x00cf03a3, 0x00000000 }, + { 0x00000001, 0x28d00608, 0x00000000, 0x11111111 }, + { 0x00000001, 0x28dc0608, 0x00000000, 0x00010101 }, + { 0x00000001, 0x28d41248, 0x00000606, 0x00000000 }, + { 0x00400001, 0x28f00208, 0x00690608, 0x00000000 }, + { 0x00600001, 0x28e01248, 0x00ae0622, 0x00000000 }, + { 0x00000001, 0x247c1648, 0x10000000, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a4, 0x00010001 }, + { 0x00010001, 0x247c0e88, 0x08000000, 0x00000002 }, + { 0x00000001, 0x247d2288, 0x000000a5, 0x00000000 }, + { 0x00000001, 0x24001648, 0x10000000, 0x00200020 }, + { 0x00000001, 0x247e2288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00800000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10782000 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000190, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000194, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28301248, 0x0000018c, 0x00000000 }, + { 0x00000001, 0x28340208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x28380208, 0x0000019c, 0x00000000 }, + { 0x00000001, 0x283c0208, 0x00000488, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x7e200000 }, + { 0x00000001, 0x24561648, 0x10000000, 0x28302830 }, + { 0x00000001, 0x24400208, 0x00000448, 0x00000000 }, + { 0x00000040, 0x24401a68, 0x1e000440, 0xfff0fff0 }, + { 0x00000040, 0x24421a68, 0x1e000442, 0xfff4fff4 }, + { 0x00000001, 0x24401e68, 0x18000000, 0xfff0fff0 }, + { 0x00000001, 0x24421e68, 0x18000000, 0xfff4fff4 }, + { 0x00000001, 0x24440208, 0x00000440, 0x00000000 }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00600060 }, + { 0x00010040, 0x24401a68, 0x1e000440, 0x000c000c }, + { 0x01000005, 0x20002240, 0x160000a5, 0x00100010 }, + { 0x00010040, 0x24421a68, 0x1e000442, 0x00080008 }, + { 0x00200040, 0x24401a68, 0x1a450440, 0x00450a90 }, + { 0x00200040, 0x24441a68, 0x1a450444, 0x00450a90 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00000001, 0x24600608, 0x00000000, 0x00000002 }, + { 0x00000001, 0x24642288, 0x0000009c, 0x00000000 }, + { 0x00000001, 0x24680608, 0x00000000, 0x30003030 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00400001, 0x45800208, 0x00000ac0, 0x00000000 }, + { 0x00400001, 0x45840208, 0x00000ac0, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00000001, 0x28800608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28840608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28880608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x288c0608, 0x00000000, 0x100f0f0f }, + { 0x00000001, 0x28900608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28940608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28980608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x289c0608, 0x00000000, 0x100f0f0f }, + { 0x00000001, 0x28a00608, 0x00000000, 0x01010101 }, + { 0x00000001, 0x28a40608, 0x00000000, 0x10010101 }, + { 0x00000001, 0x28a80608, 0x00000000, 0x0f0f0f0f }, + { 0x00000001, 0x28ac0608, 0x00000000, 0x000f0f0f }, + { 0x00400001, 0x28b00608, 0x00000000, 0x00000000 }, + { 0x08600031, 0x21800a08, 0x0e000800, 0x0c784000 }, + { 0x00000001, 0x25740608, 0x00000000, 0x00000000 }, + { 0x00000001, 0x25752288, 0x00000199, 0x00000000 }, + { 0x00000001, 0x25762288, 0x0000019a, 0x00000000 }, + { 0x00000005, 0x24001248, 0x16000180, 0x00030003 }, + { 0x00000001, 0x25742288, 0x00000400, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28a00208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28c00208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28e00208, 0x008d0200, 0x00000000 }, + { 0x00000001, 0x244c0608, 0x00000000, 0x00243000 }, + { 0x00600001, 0x28000208, 0x008d0440, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0460, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d0560, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d0580, 0x00000000 }, + { 0x0d600031, 0x21800a08, 0x0e000800, 0x10786000 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000002 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00000001, 0x28200208, 0x00000180, 0x00000000 }, + { 0x00000001, 0x28240208, 0x00000198, 0x00000000 }, + { 0x00000001, 0x28280208, 0x00000188, 0x00000000 }, + { 0x00000001, 0x282c0208, 0x00000574, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0003 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000001 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d01a0, 0x00000000 }, + { 0x00600001, 0x28400208, 0x008d01c0, 0x00000000 }, + { 0x00600001, 0x28600208, 0x008d01e0, 0x00000000 }, + { 0x00600001, 0x28800208, 0x008d0200, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x0a0a0403 }, + { 0x00000040, 0x24880208, 0x06000488, 0x00000008 }, + { 0x00600001, 0x28000208, 0x008d0480, 0x00000000 }, + { 0x00600001, 0x28200208, 0x008d0240, 0x00000000 }, + { 0x0a800031, 0x20000a60, 0x0e000800, 0x040a0203 }, + { 0x0a800031, 0x2b600a08, 0x0e000b40, 0x0219e003 }, + { 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 }, + { 0x07800031, 0x24000a40, 0x0e000e00, 0x82000010 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000007e, 0x00000000, 0x00000000, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x06000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010001, 0x2f601a68, 0x00000fa0, 0x00000000 }, + { 0x00110001, 0x2f601a68, 0x00000fa4, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000f60, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000f60, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa4 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000070 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x000000a0 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00000020, 0x34000000, 0x0e001400, 0x00000060 }, + { 0x04000010, 0x20001a60, 0x1a000fa4, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa4, 0x00000000 }, + { 0x00010020, 0x34000000, 0x0e001400, 0x00000030 }, + { 0x04000010, 0x20001a60, 0x1a000fa0, 0x00000fa8 }, + { 0x00010001, 0x2fe41a68, 0x00000fa8, 0x00000000 }, + { 0x00110001, 0x2fe41a68, 0x00000fa0, 0x00000000 }, + { 0x00000001, 0x34000200, 0x00000fe0, 0x00000000 }, diff --git a/src/shaders/vme/vme8.inc b/src/shaders/vme/vme8.inc new file mode 100644 index 0000000..bf60ad5 --- /dev/null +++ b/src/shaders/vme/vme8.inc @@ -0,0 +1,341 @@ +/* + * 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. + * + */ +// Modual name: ME_header.inc for Gen8 +// +// Global symbols define +// + +/* + * Constant + */ +define(`VME_MESSAGE_TYPE_INTER', `1') +define(`VME_MESSAGE_TYPE_INTRA', `2') +define(`VME_MESSAGE_TYPE_MIXED', `3') + +define(`VME_SIC_MESSAGE_TYPE', `1') +define(`VME_IME_MESSAGE_TYPE', `2') +define(`VME_FBR_MESSAGE_TYPE', `3') + +define(`BLOCK_32X1', `0x0000001F') +define(`BLOCK_4X16', `0x000F0003') +define(`BLOCK_8X4', `0x00070003') + +define(`LUMA_INTRA_16x16_DISABLE', `0x1') +define(`LUMA_INTRA_8x8_DISABLE', `0x2') +define(`LUMA_INTRA_4x4_DISABLE', `0x4') + +define(`INTRA_PRED_AVAIL_FLAG_AE', `0x60') +define(`INTRA_PRED_AVAIL_FLAG_B', `0x10') +define(`INTRA_PRED_AVAIL_FLAG_C', `0x8') +define(`INTRA_PRED_AVAIL_FLAG_D', `0x4') + +define(`BIND_IDX_VME', `0') +define(`BIND_IDX_VME_REF0', `1') +define(`BIND_IDX_VME_REF1', `2') +define(`BIND_IDX_OUTPUT', `3') +define(`BIND_IDX_INEP', `4') + +define(`SUB_PEL_MODE_INTEGER', `0x00000000') +define(`SUB_PEL_MODE_HALF', `0x00001000') +define(`SUB_PEL_MODE_QUARTER', `0x00003000') + +define(`INTER_SAD_NONE', `0x00000000') +define(`INTER_SAD_HAAR', `0x00200000') + +define(`INTRA_SAD_NONE', `0x00000000') +define(`INTRA_SAD_HAAR', `0x00800000') + +define(`INTER_PART_MASK', `0x00000000') + +define(`SEARCH_CTRL_SINGLE', `0x00000000') +define(`SEARCH_CTRL_DUAL_START', `0x00000100') +define(`SEARCH_CTRL_DUAL_RECORD', `0x00000300') +define(`SEARCH_CTRL_DUAL_REFERENCE', `0x00000700') + +define(`REF_REGION_SIZE', `0x2830:UW') + +define(`BI_SUB_MB_PART_MASK', `0x0c000000') +define(`MAX_NUM_MV', `0x00000020') +define(`FB_PRUNING_ENABLE', `0x40000000') + +define(`SEARCH_PATH_LEN', `0x00003030') +define(`START_CENTER', `0x30000000') + +define(`ADAPTIVE_SEARCH_ENABLE', `0x00000002') +define(`INTRA_PREDICTORE_MODE', `0x11111111:UD') + +define(`INTER_VME_OUTPUT_IN_OWS', `10') +define(`INTER_VME_OUTPUT_MV_IN_OWS', `8') + +define(`INTRAMBFLAG_MASK', `0x00002000') +define(`MVSIZE_UW_BASE', `0x0040') +define(`MFC_MV32_BIT_SHIFT', `5') +define(`CBP_DC_YUV_UW', `0x000E') + +define(`DC_HARR_ENABLE', `0x0000') +define(`DC_HARR_DISABLE', `0x0020') + +define(`MV32_BIT_MASK', `0x0020') +define(`MV32_BIT_SHIFT', `5') + +define(`OBW_CACHE_TYPE', `10') + + +define(`OBW_MESSAGE_TYPE', `8') + +define(`OBW_BIND_IDX', `BIND_IDX_OUTPUT') + +define(`OBW_CONTROL_0', `0') /* 1 OWord, low 128 bits */ +define(`OBW_CONTROL_1', `1') /* 1 OWord, high 128 bits */ +define(`OBW_CONTROL_2', `2') /* 2 OWords */ +define(`OBW_CONTROL_3', `3') /* 4 OWords */ +define(`OBW_CONTROL_8', `4') /* 8 OWords */ + +define(`FBR_BME_ENABLE', `0x00000000') +define(`FBR_BME_DISABLE', `0x00040000') + +define(`OBW_WRITE_COMMIT_CATEGORY', `0') /* category on Ivybridge */ + + +define(`OBW_HEADER_PRESENT', `1') + +/* GRF registers + * r0 header + * r1~r4 constant buffer (reserved) + * r5 inline data + * r6~r11 reserved + * r12 write back of VME message + * r13 write back of Oword Block Write + */ +/* + * GRF 0 -- header + */ +define(`thread_id_ub', `r0.20<0,1,0>:UB') /* thread id in payload */ + +/* + * GRF 1~4 -- Constant Buffer (reserved) + */ + +/* + * GRF 5 -- inline data + */ +define(`inline_reg0', `r5') +define(`w_in_mb_uw', `inline_reg0.2') +define(`orig_xy_ub', `inline_reg0.0') +define(`orig_x_ub', `inline_reg0.0') /* in macroblock */ +define(`orig_y_ub', `inline_reg0.1') +define(`transform_8x8_ub', `inline_reg0.4') +define(`input_mb_intra_ub', `inline_reg0.5') +define(`num_macroblocks', `inline_reg0.6') + +/* + * GRF 6~11 -- reserved + */ + +/* + * GRF 12~15 -- write back for VME message + */ +define(`vme_wb', `r12') +define(`vme_wb0', `r12') +define(`vme_wb1', `r13') +define(`vme_wb2', `r14') +define(`vme_wb3', `r15') +define(`vme_wb4', `r16') +define(`vme_wb5', `r17') +define(`vme_wb6', `r18') +define(`vme_ime_wb7', `r19') +define(`vme_ime_wb8', `r20') +define(`vme_ime_wb9', `r21') +define(`vme_ime_wb10', `r22') + + +/* + * GRF 24 -- write for VME output message + */ +define(`obw_wb', `null<1>:W') +define(`obw_wb_length', `0') + + +/* + * GRF 28~30 -- Intra Neighbor Edge Pixels + */ +define(`INEP_ROW', `r28') +define(`INEP_COL0', `r29') +define(`INEP_COL1', `r30') + +/* + * GRF 48~50 -- Chroma Neighbor Edge Pixels + */ +define(`CHROMA_ROW', `r48') +define(`CHROMA_COL', `r49') + +/* + * temporary registers + */ +define(`tmp_reg0', `r32') +define(`read0_header', `tmp_reg0') +define(`tmp_reg1', `r33') +define(`read1_header', `tmp_reg1') +define(`tmp_reg2', `r34') +define(`vme_m0', `tmp_reg2') +define(`tmp_reg3', `r35') +define(`vme_m1', `tmp_reg3') +define(`intra_flag', `vme_m1.28') +define(`intra_part_mask_ub', `vme_m1.28') +define(`mb_intra_struct_ub', `vme_m1.29') +define(`tmp_reg4', `r36') +define(`obw_m0', `tmp_reg4') +define(`tmp_reg5', `r37') +define(`obw_m1', `tmp_reg5') +define(`tmp_reg6', `r38') +define(`obw_m2', `tmp_reg6') +define(`tmp_reg7', `r39') +define(`obw_m3', `tmp_reg7') +define(`tmp_reg8', `r40') +define(`obw_m4', `tmp_reg8') +define(`tmp_reg9', `r41') +define(`tmp_x_w', `tmp_reg9.0') +define(`tmp_rega', `r42') +define(`tmp_ud0', `tmp_rega.0') +define(`tmp_ud1', `tmp_rega.4') +define(`tmp_ud2', `tmp_rega.8') +define(`tmp_ud3', `tmp_rega.12') +define(`tmp_uw0', `tmp_rega.0') +define(`tmp_uw1', `tmp_rega.2') +define(`tmp_uw2', `tmp_rega.4') +define(`tmp_uw3', `tmp_rega.6') +define(`tmp_uw4', `tmp_rega.8') +define(`tmp_uw5', `tmp_rega.10') +define(`tmp_uw6', `tmp_rega.12') +define(`tmp_uw7', `tmp_rega.14') + +define(`vme_m2', `r43') +define(`vme_m3', `r44') +/* + * MRF registers + */ + +define(`msg_ind', `64') +define(`msg_reg0', `r64') +define(`msg_reg1', `r65') +define(`msg_reg2', `r66') +define(`msg_reg3', `r67') +define(`msg_reg4', `r68') +define(`msg_reg5', `r69') +define(`msg_reg6', `r70') +define(`msg_reg7', `r71') +define(`msg_reg8', `r72') +define(`msg_reg9', `r73') + +define(`ts_msg_ind', `112') +define(`ts_msg_reg0', `r112') +/* + * VME message payload + */ + +define(`vme_intra_wb_length', `1') +define(`vme_wb_length', `7') +define(`sic_vme_msg_length', `8') +define(`fbr_vme_msg_length', `8') +define(`ime_vme_msg_length', `6') + +define(`vme_msg_ind', `msg_ind') +define(`vme_msg_0', `msg_reg0') +define(`vme_msg_1', `msg_reg1') +define(`vme_msg_2', `msg_reg2') + +define(`vme_msg_3', `msg_reg3') +define(`vme_msg_4', `msg_reg4') + + +define(`vme_msg_5', `msg_reg5') +define(`vme_msg_6', `msg_reg6') +define(`vme_msg_7', `msg_reg7') +define(`vme_msg_8', `msg_reg8') +define(`vme_msg_9', `msg_reg9') + +define(`BIND_IDX_CBCR', `6') + + +define(`LUMA_CHROMA_MODE', `0x0') +define(`LUMA_INTRA_MODE', `0x1') +define(`LUMA_INTRA_DISABLE', `0x2') + +define(`RETURN_REG', `r127.0') +define(`RET_ARG', `r127.4') + +/* Now at most two registers are used for input parameter */ +define(`INPUT_ARG0', `r125') +define(`INPUT_ARG1', `r126') + +/* Two temporal registers are used in the function */ +define(`TEMP_VAR0', `r123') +define(`TEMP_VAR1', `r124') + + +define(`OBR_MESSAGE_TYPE', `0') +define(`OBR_CACHE_TYPE', `10') +define(`OBR_BIND_IDX', `BIND_IDX_OUTPUT') + +define(`OBR_CONTROL_0', `0') /* 1 OWord, low 128 bits */ +define(`OBR_CONTROL_1', `1') /* 1 OWord, high 128 bits */ +define(`OBR_CONTROL_2', `2') /* 2 OWords */ +define(`OBR_CONTROL_4', `3') /* 4 OWords */ +define(`OBR_CONTROL_8', `4') /* 8 OWords */ +define(`OBR_WRITE_COMMIT_CATEGORY', `0') /* category on SNB+ for Data port */ +define(`OBR_HEADER_PRESENT', `1') + +define(`mb_hwdep', `r5.6') +define(`MB_AVAIL', `1:d') +define(`MB_PRED_FLAG', `1:w') + +define(`mb_pred_mode', `r85') +define(`mb_mvp_ref', `r86') +define(`mba_result', `r87') +define(`mbb_result', `r88') +define(`mbc_result', `r89') +define(`mb_ind', `90') +define(`mb_msg0', `r90') +define(`mb_wb', `r91') +define(`mb_intra_wb', `r91') +define(`mb_inter_wb', `r92') +define(`mb_mv0', `r93') +define(`mb_mv1', `r94') +define(`mb_mv2', `r95') +define(`mb_mv3', `r96') +define(`mb_ref', `r97') +define(`mb_ref_win', `r84') + +define(`DREF_REGION_SIZE', `0x2020:UW') +define(`PRED_L0', `0x0':uw) +define(`PRED_L1', `0x1':uw) +define(`PRED_BI', `0x2':uw) +define(`PRED_DIRECT', `0x3':uw) +define(`PRED_MASK', `0x3':uw) + +/* The MAX search len per reference is 16 */ +define(`DSEARCH_PATH_LEN', `0x00001212') +define(`BI_WEIGHT', `0x20':uw) +define(`DSTART_CENTER', `0x00000000') +define(`INTER_MASK', `0x03') +define(`INTER_16X16MODE', `0x0') +define(`INTER_16X8MODE', `0x01') +define(`INTER_8X16MODE', `0x02') +define(`INTER_8X8MODE', `0x03') +define(`INTER_BLOCK0', `0x0') +define(`INTER_BLOCK1', `0x1') +define(`INTER_BLOCK2', `0x2') +define(`INTER_BLOCK3', `0x3') +define(`INTER_16X8MODE', `0x01') +define(`INTER_8X16MODE', `0x02') + + +define(`OBR_MESSAGE_FENCE', `7') +define(`OBR_MF_NOCOMMIT', `0') +define(`OBR_MF_COMMIT', `0x20') diff --git a/src/shaders/vme/vme8_mpeg2.inc b/src/shaders/vme/vme8_mpeg2.inc new file mode 100644 index 0000000..9b877ac --- /dev/null +++ b/src/shaders/vme/vme8_mpeg2.inc @@ -0,0 +1,18 @@ +/* + * 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. + * + */ +// Modual name: ME_header.inc +// +// Global symbols define +// + +/* + * Constant + */ + +define(`INTER_PART_MASK', `0x7e000000') |