• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1;*!
2;* \copy
3;*     Copyright (c)  2009-2013, Cisco Systems
4;*     All rights reserved.
5;*
6;*     Redistribution and use in source and binary forms, with or without
7;*     modification, are permitted provided that the following conditions
8;*     are met:
9;*
10;*        * Redistributions of source code must retain the above copyright
11;*          notice, this list of conditions and the following disclaimer.
12;*
13;*        * Redistributions in binary form must reproduce the above copyright
14;*          notice, this list of conditions and the following disclaimer in
15;*          the documentation and/or other materials provided with the
16;*          distribution.
17;*
18;*     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19;*     "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20;*     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21;*     FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22;*     COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23;*     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24;*     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25;*     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26;*     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27;*     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28;*     ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29;*     POSSIBILITY OF SUCH DAMAGE.
30;*
31;*
32;*  intra_pred_common.asm
33;*
34;*  Abstract
35;*      sse2 function for intra predict operations
36;*
37;*  History
38;*      18/09/2009 Created
39;*
40;*
41;*************************************************************************/
42%include "asm_inc.asm"
43
44;***********************************************************************
45; Code
46;***********************************************************************
47
48SECTION .text
49
50;***********************************************************************
51; void WelsI16x16LumaPredH_sse2(uint8_t *pred, uint8_t *pRef, int32_t stride);
52;***********************************************************************
53
54%macro SSE2_PRED_H_16X16_ONE_LINE 0
55    add r0, 16
56    add r1, r2
57    movzx r3, byte [r1]
58    SSE2_Copy16Times xmm0, r3d
59    movdqa [r0], xmm0
60%endmacro
61
62WELS_EXTERN WelsI16x16LumaPredH_sse2
63    push r3
64    %assign push_num 1
65    LOAD_3_PARA
66    SIGN_EXTENSION r2, r2d
67    dec r1
68    movzx r3, byte [r1]
69    SSE2_Copy16Times xmm0, r3d
70    movdqa [r0], xmm0
71    SSE2_PRED_H_16X16_ONE_LINE
72    SSE2_PRED_H_16X16_ONE_LINE
73    SSE2_PRED_H_16X16_ONE_LINE
74    SSE2_PRED_H_16X16_ONE_LINE
75    SSE2_PRED_H_16X16_ONE_LINE
76    SSE2_PRED_H_16X16_ONE_LINE
77    SSE2_PRED_H_16X16_ONE_LINE
78    SSE2_PRED_H_16X16_ONE_LINE
79    SSE2_PRED_H_16X16_ONE_LINE
80    SSE2_PRED_H_16X16_ONE_LINE
81    SSE2_PRED_H_16X16_ONE_LINE
82    SSE2_PRED_H_16X16_ONE_LINE
83    SSE2_PRED_H_16X16_ONE_LINE
84    SSE2_PRED_H_16X16_ONE_LINE
85    SSE2_PRED_H_16X16_ONE_LINE
86    pop r3
87    ret
88
89;***********************************************************************
90; void WelsI16x16LumaPredV_sse2(uint8_t *pred, uint8_t *pRef, int32_t stride);
91;***********************************************************************
92WELS_EXTERN WelsI16x16LumaPredV_sse2
93    %assign push_num 0
94    LOAD_3_PARA
95    SIGN_EXTENSION r2, r2d
96    sub     r1, r2
97    movdqa  xmm0, [r1]
98
99    movdqa  [r0], xmm0
100    movdqa  [r0+10h], xmm0
101    movdqa  [r0+20h], xmm0
102    movdqa  [r0+30h], xmm0
103    movdqa  [r0+40h], xmm0
104    movdqa  [r0+50h], xmm0
105    movdqa  [r0+60h], xmm0
106    movdqa  [r0+70h], xmm0
107    movdqa  [r0+80h], xmm0
108    movdqa  [r0+90h], xmm0
109    movdqa  [r0+160], xmm0
110    movdqa  [r0+176], xmm0
111    movdqa  [r0+192], xmm0
112    movdqa  [r0+208], xmm0
113    movdqa  [r0+224], xmm0
114    movdqa  [r0+240], xmm0
115
116    ret
117
118