Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5361 | serge | 1 | /* |
2 | * All Video Processing kernels |
||
3 | * Copyright © <2010>, Intel Corporation. |
||
4 | * |
||
5 | * This program is licensed under the terms and conditions of the |
||
6 | * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at |
||
7 | * http://www.opensource.org/licenses/eclipse-1.0.php. |
||
8 | * |
||
9 | */ |
||
10 | |||
11 | #define DI_ENABLE |
||
12 | |||
13 | #include "DNDI.inc" |
||
14 | |||
15 | #ifdef DI_ONLY |
||
16 | #undef nSMPL_RESP_LEN |
||
17 | #define nSMPL_RESP_LEN nSMPL_RESP_LEN_DI // set the number of GRF |
||
18 | #else |
||
19 | #undef nSMPL_RESP_LEN |
||
20 | #define nSMPL_RESP_LEN nSMPL_RESP_LEN_DNDI // set the number of GRF |
||
21 | #endif |
||
22 | |||
23 | #undef nDPW_BLOCK_SIZE_HIST |
||
24 | #define nDPW_BLOCK_SIZE_HIST nBLOCK_WIDTH_4+nBLOCK_HEIGHT_1 // HIST Block Size for Write is 4x2 |
||
25 | #undef nDPW_BLOCK_SIZE_DN |
||
26 | #define nDPW_BLOCK_SIZE_DN nBLOCK_WIDTH_16+nBLOCK_HEIGHT_4 // DN Block Size for Write is 16x4 |
||
27 | |||
28 | ////////////////////////////////////// Run the DN Algorithm /////////////////////////////////////// |
||
29 | #include "DNDI_Command.asm" |
||
30 | |||
31 | ////////////////////////////////////// Rearrange for Internal Planar ////////////////////////////// |
||
32 | |||
33 | ////////////////////////////////////// Save the STMM Data for Next Run ///////////////////////// |
||
34 | // Write STMM to memory |
||
35 | shr (1) rMSGSRC.0<1>:ud wORIX<0;1,0>:w 1:w NODDCLR_NODDCHK // X origin / 2 |
||
36 | mov (1) rMSGSRC.1<1>:ud wORIY<0;1,0>:w NODDCLR_NODDCHK // Y origin |
||
37 | mov (1) rMSGSRC.2<1>:ud nDPW_BLOCK_SIZE_STMM:ud NODDCHK // block width and height (8x4) |
||
38 | mov (8) mudMSGHDR_STMM(0)<1> rMSGSRC.0<8;8,1>:ud // message header |
||
39 | mov (8) mudMSGHDR_STMM(1)<1> udRESP(nDI_STMM_OFFSET,0) // Move STMM to MRF |
||
40 | send (8) dNULLREG mMSGHDR_STMM udDUMMY_NULL nDATAPORT_WRITE nDPMW_MSGDSC+nDPMW_MSG_LEN_STMM+nBI_STMM_HISTORY_OUTPUT:ud |
||
41 | |||
42 | #ifdef DI_ONLY |
||
43 | #else |
||
44 | |||
45 | ////////////////////////////////////// Save the History Data for Next Run ///////////////////////// |
||
46 | #include "DI_Hist_Save.asm" |
||
47 | |||
48 | ////////////////////////////////////// Save the DN Curr Frame for Next Run //////////////////////// |
||
49 | |||
50 | //set the save DN parameters |
||
51 | mov (2) rMSGSRC.0<1>:ud wORIX<2;2,1>:w NODDCLR // X origin and Y origin |
||
52 | mov (1) rMSGSRC.2<1>:ud nDPW_BLOCK_SIZE_DN:ud NODDCLR_NODDCHK // block width and height (16x4) |
||
53 | mov (8) mudMSGHDR_DN(0)<1> rMSGSRC.0<8;8,1>:ud |
||
54 | |||
55 | // check top/bottom field first |
||
56 | cmp.e.f0.0 (1) null<1>:w ubTFLD_FIRST<0;1,0>:ub 1:w |
||
57 | (f0.0) jmpi (1) TOP_FIELD_FIRST |
||
58 | |||
59 | BOTTOM_FIELD_FIRST: |
||
60 | $for (0,0; |
||
61 | mov (4) mudMSGHDR_DN(1,%1*4)<1> udRESP(nDI_CURR_2ND_FIELD_LUMA_OFFSET,%2*4)<4;4,1> // 2nd field luma from current frame (line 0,2) |
||
62 | } |
||
63 | $for (0,0; |
||
64 | mov (4) mudMSGHDR_DN(1,%1*4+4)<1> udRESP(nDI_CURR_FRAME_LUMA_OFFSET+%2,4)<4;4,1> // 1st field luma from current frame (line 1,3) |
||
65 | } |
||
66 | |||
67 | jmpi (1) SAVE_DN_CURR |
||
68 | |||
69 | TOP_FIELD_FIRST: |
||
70 | $for (0,0; |
||
71 | mov (4) mudMSGHDR_DN(1,%1*4)<1> udRESP(nDI_CURR_FRAME_LUMA_OFFSET+%2,0)<4;4,1> // 2nd field luma from current frame (line 0,2) |
||
72 | } |
||
73 | $for (0,0; |
||
74 | mov (4) mudMSGHDR_DN(1,%1*4+4)<1> udRESP(nDI_CURR_2ND_FIELD_LUMA_OFFSET,%2*4)<4;4,1> // 1st field luma from current frame (line 1,3) |
||
75 | } |
||
76 | |||
77 | SAVE_DN_CURR: |
||
78 | send (8) dNULLREG mMSGHDR_DN udDUMMY_NULL nDATAPORT_WRITE nDPMW_MSGDSC+nDPMW_MSG_LEN_PL_DN_DI+nBI_DESTINATION_Y:ud |
||
79 | #endif |
||
80 | |||
81 | // Save Processed frames |
||
82 | #include "DI_Save_PA.asm"4;4,1>1>4;4,1>1>4;4,1>1>4;4,1>1>0;1,0>1>8;8,1>1>1>2;2,1>1>1>8;8,1>1>1>0;1,0>1>0;1,0>1>2010> |
||
83 |