Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3769 | 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 | ///////////////////////////////////////////////////////////////////////////////// |
||
12 | // Multiple_Loop.asm |
||
13 | |||
14 | |||
15 | // This lable is for satisfying component kernel build. |
||
16 | // DL will remove this label and reference the real one in Multiple_Loop_Head.asm. |
||
17 | #if defined(COMPONENT) |
||
18 | VIDEO_PROCESSING_LOOP: |
||
19 | #endif |
||
20 | |||
21 | |||
22 | //===== Possible build flags for component kernels |
||
23 | // 1) INC_SCALING |
||
24 | // 2) INC_BLENDING |
||
25 | // 3) INC_BLENDING and INC_SCALING |
||
26 | // 4) (no flags) |
||
27 | |||
28 | |||
29 | #define MxN_MULTIPLE_BLOCKS |
||
30 | |||
31 | //------------------------------------------------------------------------------ |
||
32 | #if defined(MxN_MULTIPLE_BLOCKS) |
||
33 | // Do Multiple Block Processing ------------------------------------------------ |
||
34 | |||
35 | // The 1st block has been processed before entering the loop |
||
36 | |||
37 | // Processed all blocks? |
||
38 | add.z.f0.0 (1) wNUM_BLKS:w wNUM_BLKS:w -1:w |
||
39 | |||
40 | // Reached multi-block width? |
||
41 | add (1) wORIX:w wORIX:w 16:w |
||
42 | cmp.l.f0.1 (1) null:w wORIX:w wFRAME_ENDX:w // acc0.0 has wORIX |
||
43 | |||
44 | #if defined(INC_SCALING) |
||
45 | // Update SRC_VID_H_ORI for scaling |
||
46 | mul (1) REG(r,nTEMP0):f fVIDEO_STEP_X:f 16.0:f |
||
47 | add (1) fSRC_VID_H_ORI:f REG(r,nTEMP0):f fSRC_VID_H_ORI:f |
||
48 | #endif |
||
49 | |||
50 | #if defined(INC_BLENDING) |
||
51 | // Update SRC_ALPHA_H_ORI for blending |
||
52 | mul (1) REG(r,nTEMP0):f fALPHA_STEP_X:f 16.0:f |
||
53 | add (1) fSRC_ALPHA_H_ORI:f REG(r,nTEMP0):f fSRC_ALPHA_H_ORI:f |
||
54 | #endif |
||
55 | |||
56 | (f0.0)jmpi (1) END_VIDEO_PROCESSING // All blocks are done - Exit loop |
||
57 | |||
58 | (f0.1)jmpi (1) VIDEO_PROCESSING_LOOP // If not the end of row, goto the beginning of the loop |
||
59 | |||
60 | //If end of row, restart Horizontal offset and calculate Vertical offsets next row. |
||
61 | mov (1) wORIX:w wCOPY_ORIX:w |
||
62 | add (1) wORIY:w wORIY:w 8:w |
||
63 | |||
64 | #if defined(INC_SCALING) |
||
65 | // Update SRC_VID_H_ORI and SRC_VID_V_ORI for scaling |
||
66 | mov (1) fSRC_VID_H_ORI:f fFRAME_VID_ORIX:f // Reset normalised X origin to 0 for video and alpha |
||
67 | mul (1) REG(r,nTEMP0):f fVIDEO_STEP_Y:f 8.0:f |
||
68 | add (1) fSRC_VID_V_ORI:f REG(r,nTEMP0):f fSRC_VID_V_ORI:f |
||
69 | #endif |
||
70 | |||
71 | #if defined(INC_BLENDING) |
||
72 | // Update SRC_ALPHA_H_ORI and SRC_ALPHA_V_ORI for blending |
||
73 | mov (1) fSRC_ALPHA_H_ORI:f fFRAME_ALPHA_ORIX:f // Reset normalised X origin to 0 for video and alpha |
||
74 | mul (1) REG(r,nTEMP0):f fALPHA_STEP_Y:f 8.0:f |
||
75 | add (1) fSRC_ALPHA_V_ORI:f REG(r,nTEMP0):f fSRC_ALPHA_V_ORI:f |
||
76 | #endif |
||
77 | |||
78 | jmpi (1) VIDEO_PROCESSING_LOOP // Continue Loop |
||
79 | |||
80 | END_VIDEO_PROCESSING: |
||
81 | nop |
||
82 | |||
83 | #endif |
||
84 | END_THREAD // End of Thread2010> |