| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Chinese AVS video (AVS1-P2, JiZhun profile) decoder. | ||
| 3 | * | ||
| 4 | * DSP functions | ||
| 5 | * | ||
| 6 | * Copyright (c) 2006 Stefan Gehrer <stefan.gehrer@gmx.de> | ||
| 7 | * | ||
| 8 | * This file is part of FFmpeg. | ||
| 9 | * | ||
| 10 | * FFmpeg is free software; you can redistribute it and/or | ||
| 11 | * modify it under the terms of the GNU Lesser General Public | ||
| 12 | * License as published by the Free Software Foundation; either | ||
| 13 | * version 2.1 of the License, or (at your option) any later version. | ||
| 14 | * | ||
| 15 | * FFmpeg is distributed in the hope that it will be useful, | ||
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 18 | * Lesser General Public License for more details. | ||
| 19 | * | ||
| 20 | * You should have received a copy of the GNU Lesser General Public | ||
| 21 | * License along with FFmpeg; if not, write to the Free Software | ||
| 22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 23 | */ | ||
| 24 | |||
| 25 | #include "idctdsp.h" | ||
| 26 | #include "mathops.h" | ||
| 27 | #include "cavsdsp.h" | ||
| 28 | #include "libavutil/common.h" | ||
| 29 | |||
| 30 | /***************************************************************************** | ||
| 31 | * | ||
| 32 | * in-loop deblocking filter | ||
| 33 | * | ||
| 34 | ****************************************************************************/ | ||
| 35 | |||
| 36 | #define P2 p0_p[-3*stride] | ||
| 37 | #define P1 p0_p[-2*stride] | ||
| 38 | #define P0 p0_p[-1*stride] | ||
| 39 | #define Q0 p0_p[ 0*stride] | ||
| 40 | #define Q1 p0_p[ 1*stride] | ||
| 41 | #define Q2 p0_p[ 2*stride] | ||
| 42 | |||
| 43 | 1997152 | static inline void loop_filter_l2(uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta) | |
| 44 | { | ||
| 45 | 1997152 | int p0 = P0; | |
| 46 | 1997152 | int q0 = Q0; | |
| 47 | |||
| 48 |
6/6✓ Branch 0 taken 1924897 times.
✓ Branch 1 taken 72255 times.
✓ Branch 2 taken 1853634 times.
✓ Branch 3 taken 71263 times.
✓ Branch 4 taken 1800900 times.
✓ Branch 5 taken 52734 times.
|
1997152 | if(abs(p0-q0)<alpha && abs(P1-p0)<beta && abs(Q1-q0)<beta) { |
| 49 | 1800900 | int s = p0 + q0 + 2; | |
| 50 | 1800900 | alpha = (alpha>>2) + 2; | |
| 51 |
4/4✓ Branch 0 taken 1750579 times.
✓ Branch 1 taken 50321 times.
✓ Branch 2 taken 1688025 times.
✓ Branch 3 taken 62554 times.
|
1800900 | if(abs(P2-p0) < beta && abs(p0-q0) < alpha) { |
| 52 | 1688025 | P0 = (P1 + p0 + s) >> 2; | |
| 53 | 1688025 | P1 = (2*P1 + s) >> 2; | |
| 54 | } else | ||
| 55 | 112875 | P0 = (2*P1 + s) >> 2; | |
| 56 |
4/4✓ Branch 0 taken 1749501 times.
✓ Branch 1 taken 51399 times.
✓ Branch 2 taken 1687034 times.
✓ Branch 3 taken 62467 times.
|
1800900 | if(abs(Q2-q0) < beta && abs(q0-p0) < alpha) { |
| 57 | 1687034 | Q0 = (Q1 + q0 + s) >> 2; | |
| 58 | 1687034 | Q1 = (2*Q1 + s) >> 2; | |
| 59 | } else | ||
| 60 | 113866 | Q0 = (2*Q1 + s) >> 2; | |
| 61 | } | ||
| 62 | 1997152 | } | |
| 63 | |||
| 64 | 2780432 | static inline void loop_filter_l1(uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta, int tc) | |
| 65 | { | ||
| 66 | 2780432 | int p0 = P0; | |
| 67 | 2780432 | int q0 = Q0; | |
| 68 | |||
| 69 |
6/6✓ Branch 0 taken 2467535 times.
✓ Branch 1 taken 312897 times.
✓ Branch 2 taken 2273533 times.
✓ Branch 3 taken 194002 times.
✓ Branch 4 taken 2156397 times.
✓ Branch 5 taken 117136 times.
|
2780432 | if(abs(p0-q0)<alpha && abs(P1-p0)<beta && abs(Q1-q0)<beta) { |
| 70 | 2156397 | int delta = av_clip(((q0-p0)*3+P1-Q1+4)>>3,-tc, tc); | |
| 71 | 2156397 | P0 = av_clip_uint8(p0+delta); | |
| 72 | 2156397 | Q0 = av_clip_uint8(q0-delta); | |
| 73 |
2/2✓ Branch 0 taken 2076123 times.
✓ Branch 1 taken 80274 times.
|
2156397 | if(abs(P2-p0)<beta) { |
| 74 | 2076123 | delta = av_clip(((P0-P1)*3+P2-Q0+4)>>3, -tc, tc); | |
| 75 | 2076123 | P1 = av_clip_uint8(P1+delta); | |
| 76 | } | ||
| 77 |
2/2✓ Branch 0 taken 2072458 times.
✓ Branch 1 taken 83939 times.
|
2156397 | if(abs(Q2-q0)<beta) { |
| 78 | 2072458 | delta = av_clip(((Q1-Q0)*3+P0-Q2+4)>>3, -tc, tc); | |
| 79 | 2072458 | Q1 = av_clip_uint8(Q1-delta); | |
| 80 | } | ||
| 81 | } | ||
| 82 | 2780432 | } | |
| 83 | |||
| 84 | 1054816 | static inline void loop_filter_c2(uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta) | |
| 85 | { | ||
| 86 | 1054816 | int p0 = P0; | |
| 87 | 1054816 | int q0 = Q0; | |
| 88 | |||
| 89 |
6/6✓ Branch 0 taken 1032928 times.
✓ Branch 1 taken 21888 times.
✓ Branch 2 taken 1008833 times.
✓ Branch 3 taken 24095 times.
✓ Branch 4 taken 987840 times.
✓ Branch 5 taken 20993 times.
|
1054816 | if(abs(p0-q0)<alpha && abs(P1-p0)<beta && abs(Q1-q0)<beta) { |
| 90 | 987840 | int s = p0 + q0 + 2; | |
| 91 | 987840 | alpha = (alpha>>2) + 2; | |
| 92 |
4/4✓ Branch 0 taken 967641 times.
✓ Branch 1 taken 20199 times.
✓ Branch 2 taken 946591 times.
✓ Branch 3 taken 21050 times.
|
987840 | if(abs(P2-p0) < beta && abs(p0-q0) < alpha) { |
| 93 | 946591 | P0 = (P1 + p0 + s) >> 2; | |
| 94 | } else | ||
| 95 | 41249 | P0 = (2*P1 + s) >> 2; | |
| 96 |
4/4✓ Branch 0 taken 967180 times.
✓ Branch 1 taken 20660 times.
✓ Branch 2 taken 946635 times.
✓ Branch 3 taken 20545 times.
|
987840 | if(abs(Q2-q0) < beta && abs(q0-p0) < alpha) { |
| 97 | 946635 | Q0 = (Q1 + q0 + s) >> 2; | |
| 98 | } else | ||
| 99 | 41205 | Q0 = (2*Q1 + s) >> 2; | |
| 100 | } | ||
| 101 | 1054816 | } | |
| 102 | |||
| 103 | 2003616 | static inline void loop_filter_c1(uint8_t *p0_p, ptrdiff_t stride, int alpha, int beta, | |
| 104 | int tc) | ||
| 105 | { | ||
| 106 |
6/6✓ Branch 0 taken 1889843 times.
✓ Branch 1 taken 113773 times.
✓ Branch 2 taken 1780422 times.
✓ Branch 3 taken 109421 times.
✓ Branch 4 taken 1704791 times.
✓ Branch 5 taken 75631 times.
|
2003616 | if(abs(P0-Q0)<alpha && abs(P1-P0)<beta && abs(Q1-Q0)<beta) { |
| 107 | 1704791 | int delta = av_clip(((Q0-P0)*3+P1-Q1+4)>>3, -tc, tc); | |
| 108 | 1704791 | P0 = av_clip_uint8(P0+delta); | |
| 109 | 1704791 | Q0 = av_clip_uint8(Q0-delta); | |
| 110 | } | ||
| 111 | 2003616 | } | |
| 112 | |||
| 113 | #undef P0 | ||
| 114 | #undef P1 | ||
| 115 | #undef P2 | ||
| 116 | #undef Q0 | ||
| 117 | #undef Q1 | ||
| 118 | #undef Q2 | ||
| 119 | |||
| 120 | 272600 | static void cavs_filter_lv_c(uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, | |
| 121 | int bs1, int bs2) | ||
| 122 | { | ||
| 123 | int i; | ||
| 124 |
2/2✓ Branch 0 taken 62142 times.
✓ Branch 1 taken 210458 times.
|
272600 | if(bs1==2) |
| 125 |
2/2✓ Branch 0 taken 994272 times.
✓ Branch 1 taken 62142 times.
|
1056414 | for(i=0;i<16;i++) |
| 126 | 994272 | loop_filter_l2(d + i*stride,1,alpha,beta); | |
| 127 | else { | ||
| 128 |
2/2✓ Branch 0 taken 87189 times.
✓ Branch 1 taken 123269 times.
|
210458 | if(bs1) |
| 129 |
2/2✓ Branch 0 taken 697512 times.
✓ Branch 1 taken 87189 times.
|
784701 | for(i=0;i<8;i++) |
| 130 | 697512 | loop_filter_l1(d + i*stride,1,alpha,beta,tc); | |
| 131 |
2/2✓ Branch 0 taken 85048 times.
✓ Branch 1 taken 125410 times.
|
210458 | if (bs2) |
| 132 |
2/2✓ Branch 0 taken 680384 times.
✓ Branch 1 taken 85048 times.
|
765432 | for(i=8;i<16;i++) |
| 133 | 680384 | loop_filter_l1(d + i*stride,1,alpha,beta,tc); | |
| 134 | } | ||
| 135 | 272600 | } | |
| 136 | |||
| 137 | 270884 | static void cavs_filter_lh_c(uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, | |
| 138 | int bs1, int bs2) | ||
| 139 | { | ||
| 140 | int i; | ||
| 141 |
2/2✓ Branch 0 taken 62680 times.
✓ Branch 1 taken 208204 times.
|
270884 | if(bs1==2) |
| 142 |
2/2✓ Branch 0 taken 1002880 times.
✓ Branch 1 taken 62680 times.
|
1065560 | for(i=0;i<16;i++) |
| 143 | 1002880 | loop_filter_l2(d + i,stride,alpha,beta); | |
| 144 | else { | ||
| 145 |
2/2✓ Branch 0 taken 87029 times.
✓ Branch 1 taken 121175 times.
|
208204 | if(bs1) |
| 146 |
2/2✓ Branch 0 taken 696232 times.
✓ Branch 1 taken 87029 times.
|
783261 | for(i=0;i<8;i++) |
| 147 | 696232 | loop_filter_l1(d + i,stride,alpha,beta,tc); | |
| 148 |
2/2✓ Branch 0 taken 88288 times.
✓ Branch 1 taken 119916 times.
|
208204 | if (bs2) |
| 149 |
2/2✓ Branch 0 taken 706304 times.
✓ Branch 1 taken 88288 times.
|
794592 | for(i=8;i<16;i++) |
| 150 | 706304 | loop_filter_l1(d + i,stride,alpha,beta,tc); | |
| 151 | } | ||
| 152 | 270884 | } | |
| 153 | |||
| 154 | 265866 | static void cavs_filter_cv_c(uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, | |
| 155 | int bs1, int bs2) | ||
| 156 | { | ||
| 157 | int i; | ||
| 158 |
2/2✓ Branch 0 taken 65388 times.
✓ Branch 1 taken 200478 times.
|
265866 | if(bs1==2) |
| 159 |
2/2✓ Branch 0 taken 523104 times.
✓ Branch 1 taken 65388 times.
|
588492 | for(i=0;i<8;i++) |
| 160 | 523104 | loop_filter_c2(d + i*stride,1,alpha,beta); | |
| 161 | else { | ||
| 162 |
2/2✓ Branch 0 taken 126658 times.
✓ Branch 1 taken 73820 times.
|
200478 | if(bs1) |
| 163 |
2/2✓ Branch 0 taken 506632 times.
✓ Branch 1 taken 126658 times.
|
633290 | for(i=0;i<4;i++) |
| 164 | 506632 | loop_filter_c1(d + i*stride,1,alpha,beta,tc); | |
| 165 |
2/2✓ Branch 0 taken 123392 times.
✓ Branch 1 taken 77086 times.
|
200478 | if (bs2) |
| 166 |
2/2✓ Branch 0 taken 493568 times.
✓ Branch 1 taken 123392 times.
|
616960 | for(i=4;i<8;i++) |
| 167 | 493568 | loop_filter_c1(d + i*stride,1,alpha,beta,tc); | |
| 168 | } | ||
| 169 | 265866 | } | |
| 170 | |||
| 171 | 262434 | static void cavs_filter_ch_c(uint8_t *d, ptrdiff_t stride, int alpha, int beta, int tc, | |
| 172 | int bs1, int bs2) | ||
| 173 | { | ||
| 174 | int i; | ||
| 175 |
2/2✓ Branch 0 taken 66464 times.
✓ Branch 1 taken 195970 times.
|
262434 | if(bs1==2) |
| 176 |
2/2✓ Branch 0 taken 531712 times.
✓ Branch 1 taken 66464 times.
|
598176 | for(i=0;i<8;i++) |
| 177 | 531712 | loop_filter_c2(d + i,stride,alpha,beta); | |
| 178 | else { | ||
| 179 |
2/2✓ Branch 0 taken 124080 times.
✓ Branch 1 taken 71890 times.
|
195970 | if(bs1) |
| 180 |
2/2✓ Branch 0 taken 496320 times.
✓ Branch 1 taken 124080 times.
|
620400 | for(i=0;i<4;i++) |
| 181 | 496320 | loop_filter_c1(d + i,stride,alpha,beta,tc); | |
| 182 |
2/2✓ Branch 0 taken 126774 times.
✓ Branch 1 taken 69196 times.
|
195970 | if (bs2) |
| 183 |
2/2✓ Branch 0 taken 507096 times.
✓ Branch 1 taken 126774 times.
|
633870 | for(i=4;i<8;i++) |
| 184 | 507096 | loop_filter_c1(d + i,stride,alpha,beta,tc); | |
| 185 | } | ||
| 186 | 262434 | } | |
| 187 | |||
| 188 | /***************************************************************************** | ||
| 189 | * | ||
| 190 | * inverse transform | ||
| 191 | * | ||
| 192 | ****************************************************************************/ | ||
| 193 | |||
| 194 | 356707 | static void cavs_idct8_add_c(uint8_t *dst, int16_t *block, ptrdiff_t stride) | |
| 195 | { | ||
| 196 | int i; | ||
| 197 | 356707 | int16_t (*src)[8] = (int16_t(*)[8])block; | |
| 198 | |||
| 199 | 356707 | src[0][0] += 8; | |
| 200 | |||
| 201 |
2/2✓ Branch 0 taken 2853656 times.
✓ Branch 1 taken 356707 times.
|
3210363 | for( i = 0; i < 8; i++ ) { |
| 202 | 2853656 | const int a0 = 3 * src[i][1] - 2 * src[i][7]; | |
| 203 | 2853656 | const int a1 = 3 * src[i][3] + 2 * src[i][5]; | |
| 204 | 2853656 | const int a2 = 2 * src[i][3] - 3 * src[i][5]; | |
| 205 | 2853656 | const int a3 = 2 * src[i][1] + 3 * src[i][7]; | |
| 206 | |||
| 207 | 2853656 | const int b4 = 2 * (a0 + a1 + a3) + a1; | |
| 208 | 2853656 | const int b5 = 2 * (a0 - a1 + a2) + a0; | |
| 209 | 2853656 | const int b6 = 2 * (a3 - a2 - a1) + a3; | |
| 210 | 2853656 | const int b7 = 2 * (a0 - a2 - a3) - a2; | |
| 211 | |||
| 212 | 2853656 | const int a7 = 4 * src[i][2] - 10 * src[i][6]; | |
| 213 | 2853656 | const int a6 = 4 * src[i][6] + 10 * src[i][2]; | |
| 214 | 2853656 | const int a5 = 8 * (src[i][0] - src[i][4]) + 4; | |
| 215 | 2853656 | const int a4 = 8 * (src[i][0] + src[i][4]) + 4; | |
| 216 | |||
| 217 | 2853656 | const int b0 = a4 + a6; | |
| 218 | 2853656 | const int b1 = a5 + a7; | |
| 219 | 2853656 | const int b2 = a5 - a7; | |
| 220 | 2853656 | const int b3 = a4 - a6; | |
| 221 | |||
| 222 | 2853656 | src[i][0] = (b0 + b4) >> 3; | |
| 223 | 2853656 | src[i][1] = (b1 + b5) >> 3; | |
| 224 | 2853656 | src[i][2] = (b2 + b6) >> 3; | |
| 225 | 2853656 | src[i][3] = (b3 + b7) >> 3; | |
| 226 | 2853656 | src[i][4] = (b3 - b7) >> 3; | |
| 227 | 2853656 | src[i][5] = (b2 - b6) >> 3; | |
| 228 | 2853656 | src[i][6] = (b1 - b5) >> 3; | |
| 229 | 2853656 | src[i][7] = (b0 - b4) >> 3; | |
| 230 | } | ||
| 231 |
2/2✓ Branch 0 taken 2853656 times.
✓ Branch 1 taken 356707 times.
|
3210363 | for( i = 0; i < 8; i++ ) { |
| 232 | 2853656 | const int a0 = 3 * src[1][i] - 2 * src[7][i]; | |
| 233 | 2853656 | const int a1 = 3 * src[3][i] + 2 * src[5][i]; | |
| 234 | 2853656 | const int a2 = 2 * src[3][i] - 3 * src[5][i]; | |
| 235 | 2853656 | const int a3 = 2 * src[1][i] + 3 * src[7][i]; | |
| 236 | |||
| 237 | 2853656 | const int b4 = 2 * (a0 + a1 + a3) + a1; | |
| 238 | 2853656 | const int b5 = 2 * (a0 - a1 + a2) + a0; | |
| 239 | 2853656 | const int b6 = 2 * (a3 - a2 - a1) + a3; | |
| 240 | 2853656 | const int b7 = 2 * (a0 - a2 - a3) - a2; | |
| 241 | |||
| 242 | 2853656 | const int a7 = 4 * src[2][i] - 10 * src[6][i]; | |
| 243 | 2853656 | const int a6 = 4 * src[6][i] + 10 * src[2][i]; | |
| 244 | 2853656 | const int a5 = 8 * (src[0][i] - src[4][i]); | |
| 245 | 2853656 | const int a4 = 8 * (src[0][i] + src[4][i]); | |
| 246 | |||
| 247 | 2853656 | const int b0 = a4 + a6; | |
| 248 | 2853656 | const int b1 = a5 + a7; | |
| 249 | 2853656 | const int b2 = a5 - a7; | |
| 250 | 2853656 | const int b3 = a4 - a6; | |
| 251 | |||
| 252 | 2853656 | dst[i + 0*stride] = av_clip_uint8( dst[i + 0*stride] + ((b0 + b4) >> 7)); | |
| 253 | 2853656 | dst[i + 1*stride] = av_clip_uint8( dst[i + 1*stride] + ((b1 + b5) >> 7)); | |
| 254 | 2853656 | dst[i + 2*stride] = av_clip_uint8( dst[i + 2*stride] + ((b2 + b6) >> 7)); | |
| 255 | 2853656 | dst[i + 3*stride] = av_clip_uint8( dst[i + 3*stride] + ((b3 + b7) >> 7)); | |
| 256 | 2853656 | dst[i + 4*stride] = av_clip_uint8( dst[i + 4*stride] + ((b3 - b7) >> 7)); | |
| 257 | 2853656 | dst[i + 5*stride] = av_clip_uint8( dst[i + 5*stride] + ((b2 - b6) >> 7)); | |
| 258 | 2853656 | dst[i + 6*stride] = av_clip_uint8( dst[i + 6*stride] + ((b1 - b5) >> 7)); | |
| 259 | 2853656 | dst[i + 7*stride] = av_clip_uint8( dst[i + 7*stride] + ((b0 - b4) >> 7)); | |
| 260 | } | ||
| 261 | 356707 | } | |
| 262 | |||
| 263 | /***************************************************************************** | ||
| 264 | * | ||
| 265 | * motion compensation | ||
| 266 | * | ||
| 267 | ****************************************************************************/ | ||
| 268 | |||
| 269 | #define CAVS_SUBPIX(OPNAME, OP, NAME, A, B, C, D, E, F) \ | ||
| 270 | static void OPNAME ## cavs_filt8_h_ ## NAME(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 271 | { \ | ||
| 272 | const int h=8;\ | ||
| 273 | const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;\ | ||
| 274 | int i;\ | ||
| 275 | for(i=0; i<h; i++)\ | ||
| 276 | {\ | ||
| 277 | OP(dst[0], A*src[-2] + B*src[-1] + C*src[0] + D*src[1] + E*src[2] + F*src[3]);\ | ||
| 278 | OP(dst[1], A*src[-1] + B*src[ 0] + C*src[1] + D*src[2] + E*src[3] + F*src[4]);\ | ||
| 279 | OP(dst[2], A*src[ 0] + B*src[ 1] + C*src[2] + D*src[3] + E*src[4] + F*src[5]);\ | ||
| 280 | OP(dst[3], A*src[ 1] + B*src[ 2] + C*src[3] + D*src[4] + E*src[5] + F*src[6]);\ | ||
| 281 | OP(dst[4], A*src[ 2] + B*src[ 3] + C*src[4] + D*src[5] + E*src[6] + F*src[7]);\ | ||
| 282 | OP(dst[5], A*src[ 3] + B*src[ 4] + C*src[5] + D*src[6] + E*src[7] + F*src[8]);\ | ||
| 283 | OP(dst[6], A*src[ 4] + B*src[ 5] + C*src[6] + D*src[7] + E*src[8] + F*src[9]);\ | ||
| 284 | OP(dst[7], A*src[ 5] + B*src[ 6] + C*src[7] + D*src[8] + E*src[9] + F*src[10]);\ | ||
| 285 | dst+=dstStride;\ | ||
| 286 | src+=srcStride;\ | ||
| 287 | }\ | ||
| 288 | }\ | ||
| 289 | \ | ||
| 290 | static void OPNAME ## cavs_filt8_v_ ## NAME(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 291 | { \ | ||
| 292 | const int w=8;\ | ||
| 293 | const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;\ | ||
| 294 | int i;\ | ||
| 295 | for(i=0; i<w; i++)\ | ||
| 296 | {\ | ||
| 297 | const int srcB= src[-2*srcStride];\ | ||
| 298 | const int srcA= src[-1*srcStride];\ | ||
| 299 | const int src0= src[0 *srcStride];\ | ||
| 300 | const int src1= src[1 *srcStride];\ | ||
| 301 | const int src2= src[2 *srcStride];\ | ||
| 302 | const int src3= src[3 *srcStride];\ | ||
| 303 | const int src4= src[4 *srcStride];\ | ||
| 304 | const int src5= src[5 *srcStride];\ | ||
| 305 | const int src6= src[6 *srcStride];\ | ||
| 306 | const int src7= src[7 *srcStride];\ | ||
| 307 | const int src8= src[8 *srcStride];\ | ||
| 308 | const int src9= src[9 *srcStride];\ | ||
| 309 | const int src10= src[10 *srcStride];\ | ||
| 310 | OP(dst[0*dstStride], A*srcB + B*srcA + C*src0 + D*src1 + E*src2 + F*src3);\ | ||
| 311 | OP(dst[1*dstStride], A*srcA + B*src0 + C*src1 + D*src2 + E*src3 + F*src4);\ | ||
| 312 | OP(dst[2*dstStride], A*src0 + B*src1 + C*src2 + D*src3 + E*src4 + F*src5);\ | ||
| 313 | OP(dst[3*dstStride], A*src1 + B*src2 + C*src3 + D*src4 + E*src5 + F*src6);\ | ||
| 314 | OP(dst[4*dstStride], A*src2 + B*src3 + C*src4 + D*src5 + E*src6 + F*src7);\ | ||
| 315 | OP(dst[5*dstStride], A*src3 + B*src4 + C*src5 + D*src6 + E*src7 + F*src8);\ | ||
| 316 | OP(dst[6*dstStride], A*src4 + B*src5 + C*src6 + D*src7 + E*src8 + F*src9);\ | ||
| 317 | OP(dst[7*dstStride], A*src5 + B*src6 + C*src7 + D*src8 + E*src9 + F*src10);\ | ||
| 318 | dst++;\ | ||
| 319 | src++;\ | ||
| 320 | }\ | ||
| 321 | }\ | ||
| 322 | \ | ||
| 323 | static void OPNAME ## cavs_filt16_v_ ## NAME(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 324 | { \ | ||
| 325 | OPNAME ## cavs_filt8_v_ ## NAME(dst , src , dstStride, srcStride);\ | ||
| 326 | OPNAME ## cavs_filt8_v_ ## NAME(dst+8, src+8, dstStride, srcStride);\ | ||
| 327 | src += 8*srcStride;\ | ||
| 328 | dst += 8*dstStride;\ | ||
| 329 | OPNAME ## cavs_filt8_v_ ## NAME(dst , src , dstStride, srcStride);\ | ||
| 330 | OPNAME ## cavs_filt8_v_ ## NAME(dst+8, src+8, dstStride, srcStride);\ | ||
| 331 | }\ | ||
| 332 | \ | ||
| 333 | static void OPNAME ## cavs_filt16_h_ ## NAME(uint8_t *dst, const uint8_t *src, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 334 | { \ | ||
| 335 | OPNAME ## cavs_filt8_h_ ## NAME(dst , src , dstStride, srcStride);\ | ||
| 336 | OPNAME ## cavs_filt8_h_ ## NAME(dst+8, src+8, dstStride, srcStride);\ | ||
| 337 | src += 8*srcStride;\ | ||
| 338 | dst += 8*dstStride;\ | ||
| 339 | OPNAME ## cavs_filt8_h_ ## NAME(dst , src , dstStride, srcStride);\ | ||
| 340 | OPNAME ## cavs_filt8_h_ ## NAME(dst+8, src+8, dstStride, srcStride);\ | ||
| 341 | }\ | ||
| 342 | |||
| 343 | #define CAVS_SUBPIX_HV(OPNAME, OP, NAME, AH, BH, CH, DH, EH, FH, AV, BV, CV, DV, EV, FV, FULL) \ | ||
| 344 | static void OPNAME ## cavs_filt8_hv_ ## NAME(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 345 | { \ | ||
| 346 | int16_t temp[8*(8+5)];\ | ||
| 347 | int16_t *tmp = temp;\ | ||
| 348 | const int h=8;\ | ||
| 349 | const int w=8;\ | ||
| 350 | const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;\ | ||
| 351 | int i;\ | ||
| 352 | src1 -= 2*srcStride;\ | ||
| 353 | for(i=0; i<h+5; i++)\ | ||
| 354 | {\ | ||
| 355 | tmp[0]= AH*src1[-2] + BH*src1[-1] + CH*src1[0] + DH*src1[1] + EH*src1[2] + FH*src1[3];\ | ||
| 356 | tmp[1]= AH*src1[-1] + BH*src1[ 0] + CH*src1[1] + DH*src1[2] + EH*src1[3] + FH*src1[4];\ | ||
| 357 | tmp[2]= AH*src1[ 0] + BH*src1[ 1] + CH*src1[2] + DH*src1[3] + EH*src1[4] + FH*src1[5];\ | ||
| 358 | tmp[3]= AH*src1[ 1] + BH*src1[ 2] + CH*src1[3] + DH*src1[4] + EH*src1[5] + FH*src1[6];\ | ||
| 359 | tmp[4]= AH*src1[ 2] + BH*src1[ 3] + CH*src1[4] + DH*src1[5] + EH*src1[6] + FH*src1[7];\ | ||
| 360 | tmp[5]= AH*src1[ 3] + BH*src1[ 4] + CH*src1[5] + DH*src1[6] + EH*src1[7] + FH*src1[8];\ | ||
| 361 | tmp[6]= AH*src1[ 4] + BH*src1[ 5] + CH*src1[6] + DH*src1[7] + EH*src1[8] + FH*src1[9];\ | ||
| 362 | tmp[7]= AH*src1[ 5] + BH*src1[ 6] + CH*src1[7] + DH*src1[8] + EH*src1[9] + FH*src1[10];\ | ||
| 363 | tmp+=8;\ | ||
| 364 | src1+=srcStride;\ | ||
| 365 | }\ | ||
| 366 | if(FULL) {\ | ||
| 367 | tmp = temp+8*2; \ | ||
| 368 | for(i=0; i<w; i++) \ | ||
| 369 | { \ | ||
| 370 | const int tmpB= tmp[-2*8]; \ | ||
| 371 | const int tmpA= tmp[-1*8]; \ | ||
| 372 | const int tmp0= tmp[0 *8]; \ | ||
| 373 | const int tmp1= tmp[1 *8]; \ | ||
| 374 | const int tmp2= tmp[2 *8]; \ | ||
| 375 | const int tmp3= tmp[3 *8]; \ | ||
| 376 | const int tmp4= tmp[4 *8]; \ | ||
| 377 | const int tmp5= tmp[5 *8]; \ | ||
| 378 | const int tmp6= tmp[6 *8]; \ | ||
| 379 | const int tmp7= tmp[7 *8]; \ | ||
| 380 | const int tmp8= tmp[8 *8]; \ | ||
| 381 | const int tmp9= tmp[9 *8]; \ | ||
| 382 | const int tmp10=tmp[10*8]; \ | ||
| 383 | OP(dst[0*dstStride], AV*tmpB + BV*tmpA + CV*tmp0 + DV*tmp1 + EV*tmp2 + FV*tmp3 + 64*src2[0*srcStride]); \ | ||
| 384 | OP(dst[1*dstStride], AV*tmpA + BV*tmp0 + CV*tmp1 + DV*tmp2 + EV*tmp3 + FV*tmp4 + 64*src2[1*srcStride]); \ | ||
| 385 | OP(dst[2*dstStride], AV*tmp0 + BV*tmp1 + CV*tmp2 + DV*tmp3 + EV*tmp4 + FV*tmp5 + 64*src2[2*srcStride]); \ | ||
| 386 | OP(dst[3*dstStride], AV*tmp1 + BV*tmp2 + CV*tmp3 + DV*tmp4 + EV*tmp5 + FV*tmp6 + 64*src2[3*srcStride]); \ | ||
| 387 | OP(dst[4*dstStride], AV*tmp2 + BV*tmp3 + CV*tmp4 + DV*tmp5 + EV*tmp6 + FV*tmp7 + 64*src2[4*srcStride]); \ | ||
| 388 | OP(dst[5*dstStride], AV*tmp3 + BV*tmp4 + CV*tmp5 + DV*tmp6 + EV*tmp7 + FV*tmp8 + 64*src2[5*srcStride]); \ | ||
| 389 | OP(dst[6*dstStride], AV*tmp4 + BV*tmp5 + CV*tmp6 + DV*tmp7 + EV*tmp8 + FV*tmp9 + 64*src2[6*srcStride]); \ | ||
| 390 | OP(dst[7*dstStride], AV*tmp5 + BV*tmp6 + CV*tmp7 + DV*tmp8 + EV*tmp9 + FV*tmp10 + 64*src2[7*srcStride]); \ | ||
| 391 | dst++; \ | ||
| 392 | tmp++; \ | ||
| 393 | src2++; \ | ||
| 394 | } \ | ||
| 395 | } else {\ | ||
| 396 | tmp = temp+8*2; \ | ||
| 397 | for(i=0; i<w; i++) \ | ||
| 398 | { \ | ||
| 399 | const int tmpB= tmp[-2*8]; \ | ||
| 400 | const int tmpA= tmp[-1*8]; \ | ||
| 401 | const int tmp0= tmp[0 *8]; \ | ||
| 402 | const int tmp1= tmp[1 *8]; \ | ||
| 403 | const int tmp2= tmp[2 *8]; \ | ||
| 404 | const int tmp3= tmp[3 *8]; \ | ||
| 405 | const int tmp4= tmp[4 *8]; \ | ||
| 406 | const int tmp5= tmp[5 *8]; \ | ||
| 407 | const int tmp6= tmp[6 *8]; \ | ||
| 408 | const int tmp7= tmp[7 *8]; \ | ||
| 409 | const int tmp8= tmp[8 *8]; \ | ||
| 410 | const int tmp9= tmp[9 *8]; \ | ||
| 411 | const int tmp10=tmp[10*8]; \ | ||
| 412 | OP(dst[0*dstStride], AV*tmpB + BV*tmpA + CV*tmp0 + DV*tmp1 + EV*tmp2 + FV*tmp3); \ | ||
| 413 | OP(dst[1*dstStride], AV*tmpA + BV*tmp0 + CV*tmp1 + DV*tmp2 + EV*tmp3 + FV*tmp4); \ | ||
| 414 | OP(dst[2*dstStride], AV*tmp0 + BV*tmp1 + CV*tmp2 + DV*tmp3 + EV*tmp4 + FV*tmp5); \ | ||
| 415 | OP(dst[3*dstStride], AV*tmp1 + BV*tmp2 + CV*tmp3 + DV*tmp4 + EV*tmp5 + FV*tmp6); \ | ||
| 416 | OP(dst[4*dstStride], AV*tmp2 + BV*tmp3 + CV*tmp4 + DV*tmp5 + EV*tmp6 + FV*tmp7); \ | ||
| 417 | OP(dst[5*dstStride], AV*tmp3 + BV*tmp4 + CV*tmp5 + DV*tmp6 + EV*tmp7 + FV*tmp8); \ | ||
| 418 | OP(dst[6*dstStride], AV*tmp4 + BV*tmp5 + CV*tmp6 + DV*tmp7 + EV*tmp8 + FV*tmp9); \ | ||
| 419 | OP(dst[7*dstStride], AV*tmp5 + BV*tmp6 + CV*tmp7 + DV*tmp8 + EV*tmp9 + FV*tmp10); \ | ||
| 420 | dst++; \ | ||
| 421 | tmp++; \ | ||
| 422 | } \ | ||
| 423 | }\ | ||
| 424 | }\ | ||
| 425 | \ | ||
| 426 | static void OPNAME ## cavs_filt16_hv_ ## NAME(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, ptrdiff_t dstStride, ptrdiff_t srcStride)\ | ||
| 427 | { \ | ||
| 428 | OPNAME ## cavs_filt8_hv_ ## NAME(dst , src1, FULL ? src2 : NULL, dstStride, srcStride); \ | ||
| 429 | OPNAME ## cavs_filt8_hv_ ## NAME(dst+8, src1+8, FULL ? src2 + 8 : NULL, dstStride, srcStride); \ | ||
| 430 | src1 += 8*srcStride;\ | ||
| 431 | if (FULL) \ | ||
| 432 | src2 += 8*srcStride;\ | ||
| 433 | dst += 8*dstStride;\ | ||
| 434 | OPNAME ## cavs_filt8_hv_ ## NAME(dst , src1, FULL ? src2 : NULL, dstStride, srcStride); \ | ||
| 435 | OPNAME ## cavs_filt8_hv_ ## NAME(dst+8, src1+8, FULL ? src2 + 8 : NULL, dstStride, srcStride); \ | ||
| 436 | }\ | ||
| 437 | |||
| 438 | #define CAVS_MC(OPNAME, SIZE) \ | ||
| 439 | static void OPNAME ## cavs_qpel ## SIZE ## _mc10_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 440 | {\ | ||
| 441 | OPNAME ## cavs_filt ## SIZE ## _h_qpel_l(dst, src, stride, stride);\ | ||
| 442 | }\ | ||
| 443 | \ | ||
| 444 | static void OPNAME ## cavs_qpel ## SIZE ## _mc20_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 445 | {\ | ||
| 446 | OPNAME ## cavs_filt ## SIZE ## _h_hpel(dst, src, stride, stride);\ | ||
| 447 | }\ | ||
| 448 | \ | ||
| 449 | static void OPNAME ## cavs_qpel ## SIZE ## _mc30_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 450 | {\ | ||
| 451 | OPNAME ## cavs_filt ## SIZE ## _h_qpel_r(dst, src, stride, stride);\ | ||
| 452 | }\ | ||
| 453 | \ | ||
| 454 | static void OPNAME ## cavs_qpel ## SIZE ## _mc01_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 455 | {\ | ||
| 456 | OPNAME ## cavs_filt ## SIZE ## _v_qpel_l(dst, src, stride, stride);\ | ||
| 457 | }\ | ||
| 458 | \ | ||
| 459 | static void OPNAME ## cavs_qpel ## SIZE ## _mc02_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 460 | {\ | ||
| 461 | OPNAME ## cavs_filt ## SIZE ## _v_hpel(dst, src, stride, stride);\ | ||
| 462 | }\ | ||
| 463 | \ | ||
| 464 | static void OPNAME ## cavs_qpel ## SIZE ## _mc03_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 465 | {\ | ||
| 466 | OPNAME ## cavs_filt ## SIZE ## _v_qpel_r(dst, src, stride, stride);\ | ||
| 467 | }\ | ||
| 468 | \ | ||
| 469 | static void OPNAME ## cavs_qpel ## SIZE ## _mc22_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 470 | {\ | ||
| 471 | OPNAME ## cavs_filt ## SIZE ## _hv_jj(dst, src, NULL, stride, stride); \ | ||
| 472 | }\ | ||
| 473 | \ | ||
| 474 | static void OPNAME ## cavs_qpel ## SIZE ## _mc11_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 475 | {\ | ||
| 476 | OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src, stride, stride); \ | ||
| 477 | }\ | ||
| 478 | \ | ||
| 479 | static void OPNAME ## cavs_qpel ## SIZE ## _mc13_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 480 | {\ | ||
| 481 | OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride, stride, stride); \ | ||
| 482 | }\ | ||
| 483 | \ | ||
| 484 | static void OPNAME ## cavs_qpel ## SIZE ## _mc31_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 485 | {\ | ||
| 486 | OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+1, stride, stride); \ | ||
| 487 | }\ | ||
| 488 | \ | ||
| 489 | static void OPNAME ## cavs_qpel ## SIZE ## _mc33_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 490 | {\ | ||
| 491 | OPNAME ## cavs_filt ## SIZE ## _hv_egpr(dst, src, src+stride+1,stride, stride); \ | ||
| 492 | }\ | ||
| 493 | \ | ||
| 494 | static void OPNAME ## cavs_qpel ## SIZE ## _mc21_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 495 | {\ | ||
| 496 | OPNAME ## cavs_filt ## SIZE ## _hv_ff(dst, src, NULL, stride, stride); \ | ||
| 497 | }\ | ||
| 498 | \ | ||
| 499 | static void OPNAME ## cavs_qpel ## SIZE ## _mc12_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 500 | {\ | ||
| 501 | OPNAME ## cavs_filt ## SIZE ## _hv_ii(dst, src, NULL, stride, stride); \ | ||
| 502 | }\ | ||
| 503 | \ | ||
| 504 | static void OPNAME ## cavs_qpel ## SIZE ## _mc32_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 505 | {\ | ||
| 506 | OPNAME ## cavs_filt ## SIZE ## _hv_kk(dst, src, NULL, stride, stride); \ | ||
| 507 | }\ | ||
| 508 | \ | ||
| 509 | static void OPNAME ## cavs_qpel ## SIZE ## _mc23_c(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ | ||
| 510 | {\ | ||
| 511 | OPNAME ## cavs_filt ## SIZE ## _hv_qq(dst, src, NULL, stride, stride); \ | ||
| 512 | }\ | ||
| 513 | |||
| 514 | #define op_put1(a, b) a = cm[((b)+4)>>3] | ||
| 515 | #define op_put2(a, b) a = cm[((b)+64)>>7] | ||
| 516 | #define op_put3(a, b) a = cm[((b)+32)>>6] | ||
| 517 | #define op_put4(a, b) a = cm[((b)+512)>>10] | ||
| 518 | #define op_avg1(a, b) a = ((a)+cm[((b)+4)>>3] +1)>>1 | ||
| 519 | #define op_avg2(a, b) a = ((a)+cm[((b)+64)>>7] +1)>>1 | ||
| 520 | #define op_avg3(a, b) a = ((a)+cm[((b)+32)>>6] +1)>>1 | ||
| 521 | #define op_avg4(a, b) a = ((a)+cm[((b)+512)>>10]+1)>>1 | ||
| 522 |
2/2✓ Branch 0 taken 268184 times.
✓ Branch 1 taken 33523 times.
|
607418 | CAVS_SUBPIX(put_ , op_put1, hpel, 0, -1, 5, 5, -1, 0) |
| 523 |
2/2✓ Branch 0 taken 368592 times.
✓ Branch 1 taken 46074 times.
|
836064 | CAVS_SUBPIX(put_ , op_put2, qpel_l, -1, -2, 96, 42, -7, 0) |
| 524 |
2/2✓ Branch 0 taken 369504 times.
✓ Branch 1 taken 46188 times.
|
838306 | CAVS_SUBPIX(put_ , op_put2, qpel_r, 0, -7, 42, 96, -2, -1) |
| 525 |
4/4✓ Branch 0 taken 35659 times.
✓ Branch 1 taken 2743 times.
✓ Branch 2 taken 21944 times.
✓ Branch 3 taken 2743 times.
|
121028 | CAVS_SUBPIX_HV(put_, op_put3, jj, 0, -1, 5, 5, -1, 0, 0, -1, 5, 5, -1, 0, 0) |
| 526 |
4/4✓ Branch 0 taken 49621 times.
✓ Branch 1 taken 3817 times.
✓ Branch 2 taken 30536 times.
✓ Branch 3 taken 3817 times.
|
168428 | CAVS_SUBPIX_HV(put_, op_put4, ff, 0, -1, 5, 5, -1, 0, -1, -2, 96, 42, -7, 0, 0) |
| 527 |
4/4✓ Branch 0 taken 47736 times.
✓ Branch 1 taken 3672 times.
✓ Branch 2 taken 29376 times.
✓ Branch 3 taken 3672 times.
|
161986 | CAVS_SUBPIX_HV(put_, op_put4, ii, -1, -2, 96, 42, -7, 0, 0, -1, 5, 5, -1, 0, 0) |
| 528 |
4/4✓ Branch 0 taken 54951 times.
✓ Branch 1 taken 4227 times.
✓ Branch 2 taken 33816 times.
✓ Branch 3 taken 4227 times.
|
186530 | CAVS_SUBPIX_HV(put_, op_put4, kk, 0, -7, 42, 96, -2, -1, 0, -1, 5, 5, -1, 0, 0) |
| 529 |
4/4✓ Branch 0 taken 49348 times.
✓ Branch 1 taken 3796 times.
✓ Branch 2 taken 30368 times.
✓ Branch 3 taken 3796 times.
|
167486 | CAVS_SUBPIX_HV(put_, op_put4, qq, 0, -1, 5, 5, -1, 0, 0, -7, 42, 96, -2,-1, 0) |
| 530 |
4/4✓ Branch 0 taken 298168 times.
✓ Branch 1 taken 22936 times.
✓ Branch 2 taken 183488 times.
✓ Branch 3 taken 22936 times.
|
1012530 | CAVS_SUBPIX_HV(put_, op_put2, egpr, 0, -1, 5, 5, -1, 0, 0, -1, 5, 5, -1, 0, 1) |
| 531 |
2/2✓ Branch 0 taken 171592 times.
✓ Branch 1 taken 21449 times.
|
386960 | CAVS_SUBPIX(avg_ , op_avg1, hpel, 0, -1, 5, 5, -1, 0) |
| 532 |
2/2✓ Branch 0 taken 77912 times.
✓ Branch 1 taken 9739 times.
|
175566 | CAVS_SUBPIX(avg_ , op_avg2, qpel_l, -1, -2, 96, 42, -7, 0) |
| 533 |
2/2✓ Branch 0 taken 91592 times.
✓ Branch 1 taken 11449 times.
|
206564 | CAVS_SUBPIX(avg_ , op_avg2, qpel_r, 0, -7, 42, 96, -2, -1) |
| 534 |
4/4✓ Branch 0 taken 26494 times.
✓ Branch 1 taken 2038 times.
✓ Branch 2 taken 16304 times.
✓ Branch 3 taken 2038 times.
|
89800 | CAVS_SUBPIX_HV(avg_, op_avg3, jj, 0, -1, 5, 5, -1, 0, 0, -1, 5, 5, -1, 0, 0) |
| 535 |
4/4✓ Branch 0 taken 9295 times.
✓ Branch 1 taken 715 times.
✓ Branch 2 taken 5720 times.
✓ Branch 3 taken 715 times.
|
31474 | CAVS_SUBPIX_HV(avg_, op_avg4, ff, 0, -1, 5, 5, -1, 0, -1, -2, 96, 42, -7, 0, 0) |
| 536 |
4/4✓ Branch 0 taken 8372 times.
✓ Branch 1 taken 644 times.
✓ Branch 2 taken 5152 times.
✓ Branch 3 taken 644 times.
|
28362 | CAVS_SUBPIX_HV(avg_, op_avg4, ii, -1, -2, 96, 42, -7, 0, 0, -1, 5, 5, -1, 0, 0) |
| 537 |
4/4✓ Branch 0 taken 9516 times.
✓ Branch 1 taken 732 times.
✓ Branch 2 taken 5856 times.
✓ Branch 3 taken 732 times.
|
32230 | CAVS_SUBPIX_HV(avg_, op_avg4, kk, 0, -7, 42, 96, -2, -1, 0, -1, 5, 5, -1, 0, 0) |
| 538 |
4/4✓ Branch 0 taken 12012 times.
✓ Branch 1 taken 924 times.
✓ Branch 2 taken 7392 times.
✓ Branch 3 taken 924 times.
|
40688 | CAVS_SUBPIX_HV(avg_, op_avg4, qq, 0, -1, 5, 5, -1, 0, 0, -7, 42, 96, -2,-1, 0) |
| 539 |
4/4✓ Branch 0 taken 40170 times.
✓ Branch 1 taken 3090 times.
✓ Branch 2 taken 24720 times.
✓ Branch 3 taken 3090 times.
|
136124 | CAVS_SUBPIX_HV(avg_, op_avg2, egpr, 0, -1, 5, 5, -1, 0, 0, -1, 5, 5, -1, 0, 1) |
| 540 | 240984 | CAVS_MC(put_, 8) | |
| 541 | 23242 | CAVS_MC(put_, 16) | |
| 542 | 93520 | CAVS_MC(avg_, 8) | |
| 543 | 2010 | CAVS_MC(avg_, 16) | |
| 544 | |||
| 545 | #define put_cavs_qpel8_mc00_c ff_put_pixels8x8_c | ||
| 546 | #define avg_cavs_qpel8_mc00_c ff_avg_pixels8x8_c | ||
| 547 | #define put_cavs_qpel16_mc00_c ff_put_pixels16x16_c | ||
| 548 | #define avg_cavs_qpel16_mc00_c ff_avg_pixels16x16_c | ||
| 549 | |||
| 550 | 19 | av_cold void ff_cavsdsp_init(CAVSDSPContext* c) | |
| 551 | { | ||
| 552 | #define dspfunc(PFX, IDX, NUM) \ | ||
| 553 | c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \ | ||
| 554 | c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \ | ||
| 555 | c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \ | ||
| 556 | c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \ | ||
| 557 | c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \ | ||
| 558 | c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \ | ||
| 559 | c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \ | ||
| 560 | c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \ | ||
| 561 | c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \ | ||
| 562 | c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \ | ||
| 563 | c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \ | ||
| 564 | c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \ | ||
| 565 | c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \ | ||
| 566 | c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \ | ||
| 567 | c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \ | ||
| 568 | c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c | ||
| 569 | 19 | dspfunc(put_cavs_qpel, 0, 16); | |
| 570 | 19 | dspfunc(put_cavs_qpel, 1, 8); | |
| 571 | 19 | dspfunc(avg_cavs_qpel, 0, 16); | |
| 572 | 19 | dspfunc(avg_cavs_qpel, 1, 8); | |
| 573 | 19 | c->cavs_filter_lv = cavs_filter_lv_c; | |
| 574 | 19 | c->cavs_filter_lh = cavs_filter_lh_c; | |
| 575 | 19 | c->cavs_filter_cv = cavs_filter_cv_c; | |
| 576 | 19 | c->cavs_filter_ch = cavs_filter_ch_c; | |
| 577 | 19 | c->cavs_idct8_add = cavs_idct8_add_c; | |
| 578 | 19 | c->idct_perm = FF_IDCT_PERM_NONE; | |
| 579 | |||
| 580 | #if ARCH_X86 | ||
| 581 | 19 | ff_cavsdsp_init_x86(c); | |
| 582 | #endif | ||
| 583 | 19 | } | |
| 584 |