/src/ffmpeg/libavcodec/h264chroma_template.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2000, 2001 Fabrice Bellard |
3 | | * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> |
4 | | * |
5 | | * This file is part of FFmpeg. |
6 | | * |
7 | | * FFmpeg is free software; you can redistribute it and/or |
8 | | * modify it under the terms of the GNU Lesser General Public |
9 | | * License as published by the Free Software Foundation; either |
10 | | * version 2.1 of the License, or (at your option) any later version. |
11 | | * |
12 | | * FFmpeg is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | | * Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public |
18 | | * License along with FFmpeg; if not, write to the Free Software |
19 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | | */ |
21 | | |
22 | | |
23 | | #include <stddef.h> |
24 | | |
25 | | #include "libavutil/avassert.h" |
26 | | #include "bit_depth_template.c" |
27 | | |
28 | | #define H264_CHROMA_MC(OPNAME, OP)\ |
29 | 13.8M | static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ |
30 | 13.8M | pixel *dst = (pixel*)_dst;\ |
31 | 13.8M | const pixel *src = (const pixel*)_src;\ |
32 | 13.8M | const int A=(8-x)*(8-y);\ |
33 | 13.8M | const int B=( x)*(8-y);\ |
34 | 13.8M | const int C=(8-x)*( y);\ |
35 | 13.8M | const int D=( x)*( y);\ |
36 | 13.8M | int i;\ |
37 | 13.8M | stride >>= sizeof(pixel)-1;\ |
38 | 13.8M | \ |
39 | 13.8M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ |
40 | 13.8M | \ |
41 | 13.8M | if(D){\ |
42 | 1.87M | for(i=0; i<h; i++){\ |
43 | 946k | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ |
44 | 946k | dst+= stride;\ |
45 | 946k | src+= stride;\ |
46 | 946k | }\ |
47 | 12.9M | } else if (B + C) {\ |
48 | 3.06M | const int E= B+C;\ |
49 | 3.06M | const int step= C ? stride : 1;\ |
50 | 6.15M | for(i=0; i<h; i++){\ |
51 | 3.08M | OP(dst[0], (A*src[0] + E*src[step+0]));\ |
52 | 3.08M | dst+= stride;\ |
53 | 3.08M | src+= stride;\ |
54 | 3.08M | }\ |
55 | 9.89M | } else {\ |
56 | 19.8M | for(i=0; i<h; i++){\ |
57 | 9.94M | OP(dst[0], (A*src[0]));\ |
58 | 9.94M | dst+= stride;\ |
59 | 9.94M | src+= stride;\ |
60 | 9.94M | }\ |
61 | 9.89M | }\ |
62 | 13.8M | }\ Unexecuted instantiation: h264chroma.c:put_h264_chroma_mc1_16_c Unexecuted instantiation: h264chroma.c:avg_h264_chroma_mc1_16_c h264chroma.c:put_h264_chroma_mc1_8_c Line | Count | Source | 29 | 13.3M | static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ | 30 | 13.3M | pixel *dst = (pixel*)_dst;\ | 31 | 13.3M | const pixel *src = (const pixel*)_src;\ | 32 | 13.3M | const int A=(8-x)*(8-y);\ | 33 | 13.3M | const int B=( x)*(8-y);\ | 34 | 13.3M | const int C=(8-x)*( y);\ | 35 | 13.3M | const int D=( x)*( y);\ | 36 | 13.3M | int i;\ | 37 | 13.3M | stride >>= sizeof(pixel)-1;\ | 38 | 13.3M | \ | 39 | 13.3M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 40 | 13.3M | \ | 41 | 13.3M | if(D){\ | 42 | 1.69M | for(i=0; i<h; i++){\ | 43 | 856k | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 44 | 856k | dst+= stride;\ | 45 | 856k | src+= stride;\ | 46 | 856k | }\ | 47 | 12.5M | } else if (B + C) {\ | 48 | 2.95M | const int E= B+C;\ | 49 | 2.95M | const int step= C ? stride : 1;\ | 50 | 5.91M | for(i=0; i<h; i++){\ | 51 | 2.96M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 52 | 2.96M | dst+= stride;\ | 53 | 2.96M | src+= stride;\ | 54 | 2.96M | }\ | 55 | 9.57M | } else {\ | 56 | 19.1M | for(i=0; i<h; i++){\ | 57 | 9.61M | OP(dst[0], (A*src[0]));\ | 58 | 9.61M | dst+= stride;\ | 59 | 9.61M | src+= stride;\ | 60 | 9.61M | }\ | 61 | 9.57M | }\ | 62 | 13.3M | }\ |
h264chroma.c:avg_h264_chroma_mc1_8_c Line | Count | Source | 29 | 519k | static void FUNCC(OPNAME ## h264_chroma_mc1)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y){\ | 30 | 519k | pixel *dst = (pixel*)_dst;\ | 31 | 519k | const pixel *src = (const pixel*)_src;\ | 32 | 519k | const int A=(8-x)*(8-y);\ | 33 | 519k | const int B=( x)*(8-y);\ | 34 | 519k | const int C=(8-x)*( y);\ | 35 | 519k | const int D=( x)*( y);\ | 36 | 519k | int i;\ | 37 | 519k | stride >>= sizeof(pixel)-1;\ | 38 | 519k | \ | 39 | 519k | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 40 | 519k | \ | 41 | 519k | if(D){\ | 42 | 172k | for(i=0; i<h; i++){\ | 43 | 89.4k | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 44 | 89.4k | dst+= stride;\ | 45 | 89.4k | src+= stride;\ | 46 | 89.4k | }\ | 47 | 436k | } else if (B + C) {\ | 48 | 112k | const int E= B+C;\ | 49 | 112k | const int step= C ? stride : 1;\ | 50 | 233k | for(i=0; i<h; i++){\ | 51 | 121k | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 52 | 121k | dst+= stride;\ | 53 | 121k | src+= stride;\ | 54 | 121k | }\ | 55 | 324k | } else {\ | 56 | 661k | for(i=0; i<h; i++){\ | 57 | 337k | OP(dst[0], (A*src[0]));\ | 58 | 337k | dst+= stride;\ | 59 | 337k | src+= stride;\ | 60 | 337k | }\ | 61 | 324k | }\ | 62 | 519k | }\ |
|
63 | 33.3M | static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ |
64 | 33.3M | {\ |
65 | 33.3M | pixel *dst = (pixel*)_dst;\ |
66 | 33.3M | const pixel *src = (const pixel*)_src;\ |
67 | 33.3M | const int A=(8-x)*(8-y);\ |
68 | 33.3M | const int B=( x)*(8-y);\ |
69 | 33.3M | const int C=(8-x)*( y);\ |
70 | 33.3M | const int D=( x)*( y);\ |
71 | 33.3M | int i;\ |
72 | 33.3M | stride >>= sizeof(pixel)-1;\ |
73 | 33.3M | \ |
74 | 33.3M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ |
75 | 33.3M | \ |
76 | 33.3M | if(D){\ |
77 | 22.7M | for(i=0; i<h; i++){\ |
78 | 17.2M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ |
79 | 17.2M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ |
80 | 17.2M | dst+= stride;\ |
81 | 17.2M | src+= stride;\ |
82 | 17.2M | }\ |
83 | 27.8M | } else if (B + C) {\ |
84 | 5.69M | const int E= B+C;\ |
85 | 5.69M | const ptrdiff_t step = C ? stride : 1;\ |
86 | 22.2M | for(i=0; i<h; i++){\ |
87 | 16.5M | OP(dst[0], (A*src[0] + E*src[step+0]));\ |
88 | 16.5M | OP(dst[1], (A*src[1] + E*src[step+1]));\ |
89 | 16.5M | dst+= stride;\ |
90 | 16.5M | src+= stride;\ |
91 | 16.5M | }\ |
92 | 22.1M | } else {\ |
93 | 80.5M | for ( i = 0; i < h; i++){\ |
94 | 58.3M | OP(dst[0], A * src[0]);\ |
95 | 58.3M | OP(dst[1], A * src[1]);\ |
96 | 58.3M | dst += stride;\ |
97 | 58.3M | src += stride;\ |
98 | 58.3M | }\ |
99 | 22.1M | }\ |
100 | 33.3M | }\ h264chroma.c:put_h264_chroma_mc2_16_c Line | Count | Source | 63 | 11.7M | static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 64 | 11.7M | {\ | 65 | 11.7M | pixel *dst = (pixel*)_dst;\ | 66 | 11.7M | const pixel *src = (const pixel*)_src;\ | 67 | 11.7M | const int A=(8-x)*(8-y);\ | 68 | 11.7M | const int B=( x)*(8-y);\ | 69 | 11.7M | const int C=(8-x)*( y);\ | 70 | 11.7M | const int D=( x)*( y);\ | 71 | 11.7M | int i;\ | 72 | 11.7M | stride >>= sizeof(pixel)-1;\ | 73 | 11.7M | \ | 74 | 11.7M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 75 | 11.7M | \ | 76 | 11.7M | if(D){\ | 77 | 11.6M | for(i=0; i<h; i++){\ | 78 | 9.08M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 79 | 9.08M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 80 | 9.08M | dst+= stride;\ | 81 | 9.08M | src+= stride;\ | 82 | 9.08M | }\ | 83 | 9.19M | } else if (B + C) {\ | 84 | 2.27M | const int E= B+C;\ | 85 | 2.27M | const ptrdiff_t step = C ? stride : 1;\ | 86 | 10.3M | for(i=0; i<h; i++){\ | 87 | 8.12M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 88 | 8.12M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 89 | 8.12M | dst+= stride;\ | 90 | 8.12M | src+= stride;\ | 91 | 8.12M | }\ | 92 | 6.92M | } else {\ | 93 | 28.8M | for ( i = 0; i < h; i++){\ | 94 | 21.9M | OP(dst[0], A * src[0]);\ | 95 | 21.9M | OP(dst[1], A * src[1]);\ | 96 | 21.9M | dst += stride;\ | 97 | 21.9M | src += stride;\ | 98 | 21.9M | }\ | 99 | 6.92M | }\ | 100 | 11.7M | }\ |
h264chroma.c:avg_h264_chroma_mc2_16_c Line | Count | Source | 63 | 6.65M | static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 64 | 6.65M | {\ | 65 | 6.65M | pixel *dst = (pixel*)_dst;\ | 66 | 6.65M | const pixel *src = (const pixel*)_src;\ | 67 | 6.65M | const int A=(8-x)*(8-y);\ | 68 | 6.65M | const int B=( x)*(8-y);\ | 69 | 6.65M | const int C=(8-x)*( y);\ | 70 | 6.65M | const int D=( x)*( y);\ | 71 | 6.65M | int i;\ | 72 | 6.65M | stride >>= sizeof(pixel)-1;\ | 73 | 6.65M | \ | 74 | 6.65M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 75 | 6.65M | \ | 76 | 6.65M | if(D){\ | 77 | 2.55M | for(i=0; i<h; i++){\ | 78 | 1.87M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 79 | 1.87M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 80 | 1.87M | dst+= stride;\ | 81 | 1.87M | src+= stride;\ | 82 | 1.87M | }\ | 83 | 5.98M | } else if (B + C) {\ | 84 | 677k | const int E= B+C;\ | 85 | 677k | const ptrdiff_t step = C ? stride : 1;\ | 86 | 2.68M | for(i=0; i<h; i++){\ | 87 | 2.00M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 88 | 2.00M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 89 | 2.00M | dst+= stride;\ | 90 | 2.00M | src+= stride;\ | 91 | 2.00M | }\ | 92 | 5.30M | } else {\ | 93 | 21.6M | for ( i = 0; i < h; i++){\ | 94 | 16.3M | OP(dst[0], A * src[0]);\ | 95 | 16.3M | OP(dst[1], A * src[1]);\ | 96 | 16.3M | dst += stride;\ | 97 | 16.3M | src += stride;\ | 98 | 16.3M | }\ | 99 | 5.30M | }\ | 100 | 6.65M | }\ |
h264chroma.c:put_h264_chroma_mc2_8_c Line | Count | Source | 63 | 13.0M | static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 64 | 13.0M | {\ | 65 | 13.0M | pixel *dst = (pixel*)_dst;\ | 66 | 13.0M | const pixel *src = (const pixel*)_src;\ | 67 | 13.0M | const int A=(8-x)*(8-y);\ | 68 | 13.0M | const int B=( x)*(8-y);\ | 69 | 13.0M | const int C=(8-x)*( y);\ | 70 | 13.0M | const int D=( x)*( y);\ | 71 | 13.0M | int i;\ | 72 | 13.0M | stride >>= sizeof(pixel)-1;\ | 73 | 13.0M | \ | 74 | 13.0M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 75 | 13.0M | \ | 76 | 13.0M | if(D){\ | 77 | 8.21M | for(i=0; i<h; i++){\ | 78 | 6.01M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 79 | 6.01M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 80 | 6.01M | dst+= stride;\ | 81 | 6.01M | src+= stride;\ | 82 | 6.01M | }\ | 83 | 10.8M | } else if (B + C) {\ | 84 | 2.57M | const int E= B+C;\ | 85 | 2.57M | const ptrdiff_t step = C ? stride : 1;\ | 86 | 8.61M | for(i=0; i<h; i++){\ | 87 | 6.04M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 88 | 6.04M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 89 | 6.04M | dst+= stride;\ | 90 | 6.04M | src+= stride;\ | 91 | 6.04M | }\ | 92 | 8.26M | } else {\ | 93 | 25.0M | for ( i = 0; i < h; i++){\ | 94 | 16.8M | OP(dst[0], A * src[0]);\ | 95 | 16.8M | OP(dst[1], A * src[1]);\ | 96 | 16.8M | dst += stride;\ | 97 | 16.8M | src += stride;\ | 98 | 16.8M | }\ | 99 | 8.26M | }\ | 100 | 13.0M | }\ |
h264chroma.c:avg_h264_chroma_mc2_8_c Line | Count | Source | 63 | 1.95M | static void FUNCC(OPNAME ## h264_chroma_mc2)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 64 | 1.95M | {\ | 65 | 1.95M | pixel *dst = (pixel*)_dst;\ | 66 | 1.95M | const pixel *src = (const pixel*)_src;\ | 67 | 1.95M | const int A=(8-x)*(8-y);\ | 68 | 1.95M | const int B=( x)*(8-y);\ | 69 | 1.95M | const int C=(8-x)*( y);\ | 70 | 1.95M | const int D=( x)*( y);\ | 71 | 1.95M | int i;\ | 72 | 1.95M | stride >>= sizeof(pixel)-1;\ | 73 | 1.95M | \ | 74 | 1.95M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 75 | 1.95M | \ | 76 | 1.95M | if(D){\ | 77 | 387k | for(i=0; i<h; i++){\ | 78 | 250k | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 79 | 250k | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 80 | 250k | dst+= stride;\ | 81 | 250k | src+= stride;\ | 82 | 250k | }\ | 83 | 1.81M | } else if (B + C) {\ | 84 | 176k | const int E= B+C;\ | 85 | 176k | const ptrdiff_t step = C ? stride : 1;\ | 86 | 517k | for(i=0; i<h; i++){\ | 87 | 341k | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 88 | 341k | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 89 | 341k | dst+= stride;\ | 90 | 341k | src+= stride;\ | 91 | 341k | }\ | 92 | 1.63M | } else {\ | 93 | 4.98M | for ( i = 0; i < h; i++){\ | 94 | 3.34M | OP(dst[0], A * src[0]);\ | 95 | 3.34M | OP(dst[1], A * src[1]);\ | 96 | 3.34M | dst += stride;\ | 97 | 3.34M | src += stride;\ | 98 | 3.34M | }\ | 99 | 1.63M | }\ | 100 | 1.95M | }\ |
|
101 | | \ |
102 | 128M | static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ |
103 | 128M | {\ |
104 | 128M | pixel *dst = (pixel*)_dst;\ |
105 | 128M | const pixel *src = (const pixel*)_src;\ |
106 | 128M | const int A=(8-x)*(8-y);\ |
107 | 128M | const int B=( x)*(8-y);\ |
108 | 128M | const int C=(8-x)*( y);\ |
109 | 128M | const int D=( x)*( y);\ |
110 | 128M | int i;\ |
111 | 128M | stride >>= sizeof(pixel)-1;\ |
112 | 128M | \ |
113 | 128M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ |
114 | 128M | \ |
115 | 128M | if(D){\ |
116 | 139M | for(i=0; i<h; i++){\ |
117 | 115M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ |
118 | 115M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ |
119 | 115M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ |
120 | 115M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ |
121 | 115M | dst+= stride;\ |
122 | 115M | src+= stride;\ |
123 | 115M | }\ |
124 | 105M | } else if (B + C) {\ |
125 | 20.7M | const int E= B+C;\ |
126 | 20.7M | const ptrdiff_t step = C ? stride : 1;\ |
127 | 128M | for(i=0; i<h; i++){\ |
128 | 107M | OP(dst[0], (A*src[0] + E*src[step+0]));\ |
129 | 107M | OP(dst[1], (A*src[1] + E*src[step+1]));\ |
130 | 107M | OP(dst[2], (A*src[2] + E*src[step+2]));\ |
131 | 107M | OP(dst[3], (A*src[3] + E*src[step+3]));\ |
132 | 107M | dst+= stride;\ |
133 | 107M | src+= stride;\ |
134 | 107M | }\ |
135 | 84.4M | } else {\ |
136 | 519M | for ( i = 0; i < h; i++){\ |
137 | 435M | OP(dst[0], A * src[0]);\ |
138 | 435M | OP(dst[1], A * src[1]);\ |
139 | 435M | OP(dst[2], A * src[2]);\ |
140 | 435M | OP(dst[3], A * src[3]);\ |
141 | 435M | dst += stride;\ |
142 | 435M | src += stride;\ |
143 | 435M | }\ |
144 | 84.4M | }\ |
145 | 128M | }\ h264chroma.c:put_h264_chroma_mc4_16_c Line | Count | Source | 102 | 33.8M | static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 103 | 33.8M | {\ | 104 | 33.8M | pixel *dst = (pixel*)_dst;\ | 105 | 33.8M | const pixel *src = (const pixel*)_src;\ | 106 | 33.8M | const int A=(8-x)*(8-y);\ | 107 | 33.8M | const int B=( x)*(8-y);\ | 108 | 33.8M | const int C=(8-x)*( y);\ | 109 | 33.8M | const int D=( x)*( y);\ | 110 | 33.8M | int i;\ | 111 | 33.8M | stride >>= sizeof(pixel)-1;\ | 112 | 33.8M | \ | 113 | 33.8M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 114 | 33.8M | \ | 115 | 33.8M | if(D){\ | 116 | 34.0M | for(i=0; i<h; i++){\ | 117 | 29.1M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 118 | 29.1M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 119 | 29.1M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 120 | 29.1M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 121 | 29.1M | dst+= stride;\ | 122 | 29.1M | src+= stride;\ | 123 | 29.1M | }\ | 124 | 28.9M | } else if (B + C) {\ | 125 | 5.09M | const int E= B+C;\ | 126 | 5.09M | const ptrdiff_t step = C ? stride : 1;\ | 127 | 38.5M | for(i=0; i<h; i++){\ | 128 | 33.4M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 129 | 33.4M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 130 | 33.4M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 131 | 33.4M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 132 | 33.4M | dst+= stride;\ | 133 | 33.4M | src+= stride;\ | 134 | 33.4M | }\ | 135 | 23.8M | } else {\ | 136 | 167M | for ( i = 0; i < h; i++){\ | 137 | 143M | OP(dst[0], A * src[0]);\ | 138 | 143M | OP(dst[1], A * src[1]);\ | 139 | 143M | OP(dst[2], A * src[2]);\ | 140 | 143M | OP(dst[3], A * src[3]);\ | 141 | 143M | dst += stride;\ | 142 | 143M | src += stride;\ | 143 | 143M | }\ | 144 | 23.8M | }\ | 145 | 33.8M | }\ |
h264chroma.c:avg_h264_chroma_mc4_16_c Line | Count | Source | 102 | 17.0M | static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 103 | 17.0M | {\ | 104 | 17.0M | pixel *dst = (pixel*)_dst;\ | 105 | 17.0M | const pixel *src = (const pixel*)_src;\ | 106 | 17.0M | const int A=(8-x)*(8-y);\ | 107 | 17.0M | const int B=( x)*(8-y);\ | 108 | 17.0M | const int C=(8-x)*( y);\ | 109 | 17.0M | const int D=( x)*( y);\ | 110 | 17.0M | int i;\ | 111 | 17.0M | stride >>= sizeof(pixel)-1;\ | 112 | 17.0M | \ | 113 | 17.0M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 114 | 17.0M | \ | 115 | 17.0M | if(D){\ | 116 | 7.34M | for(i=0; i<h; i++){\ | 117 | 6.50M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 118 | 6.50M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 119 | 6.50M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 120 | 6.50M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 121 | 6.50M | dst+= stride;\ | 122 | 6.50M | src+= stride;\ | 123 | 6.50M | }\ | 124 | 16.2M | } else if (B + C) {\ | 125 | 1.77M | const int E= B+C;\ | 126 | 1.77M | const ptrdiff_t step = C ? stride : 1;\ | 127 | 13.1M | for(i=0; i<h; i++){\ | 128 | 11.3M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 129 | 11.3M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 130 | 11.3M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 131 | 11.3M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 132 | 11.3M | dst+= stride;\ | 133 | 11.3M | src+= stride;\ | 134 | 11.3M | }\ | 135 | 14.4M | } else {\ | 136 | 114M | for ( i = 0; i < h; i++){\ | 137 | 99.5M | OP(dst[0], A * src[0]);\ | 138 | 99.5M | OP(dst[1], A * src[1]);\ | 139 | 99.5M | OP(dst[2], A * src[2]);\ | 140 | 99.5M | OP(dst[3], A * src[3]);\ | 141 | 99.5M | dst += stride;\ | 142 | 99.5M | src += stride;\ | 143 | 99.5M | }\ | 144 | 14.4M | }\ | 145 | 17.0M | }\ |
h264chroma.c:put_h264_chroma_mc4_8_c Line | Count | Source | 102 | 54.4M | static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 103 | 54.4M | {\ | 104 | 54.4M | pixel *dst = (pixel*)_dst;\ | 105 | 54.4M | const pixel *src = (const pixel*)_src;\ | 106 | 54.4M | const int A=(8-x)*(8-y);\ | 107 | 54.4M | const int B=( x)*(8-y);\ | 108 | 54.4M | const int C=(8-x)*( y);\ | 109 | 54.4M | const int D=( x)*( y);\ | 110 | 54.4M | int i;\ | 111 | 54.4M | stride >>= sizeof(pixel)-1;\ | 112 | 54.4M | \ | 113 | 54.4M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 114 | 54.4M | \ | 115 | 54.4M | if(D){\ | 116 | 82.7M | for(i=0; i<h; i++){\ | 117 | 68.0M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 118 | 68.0M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 119 | 68.0M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 120 | 68.0M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 121 | 68.0M | dst+= stride;\ | 122 | 68.0M | src+= stride;\ | 123 | 68.0M | }\ | 124 | 39.7M | } else if (B + C) {\ | 125 | 12.0M | const int E= B+C;\ | 126 | 12.0M | const ptrdiff_t step = C ? stride : 1;\ | 127 | 67.2M | for(i=0; i<h; i++){\ | 128 | 55.2M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 129 | 55.2M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 130 | 55.2M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 131 | 55.2M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 132 | 55.2M | dst+= stride;\ | 133 | 55.2M | src+= stride;\ | 134 | 55.2M | }\ | 135 | 27.7M | } else {\ | 136 | 144M | for ( i = 0; i < h; i++){\ | 137 | 116M | OP(dst[0], A * src[0]);\ | 138 | 116M | OP(dst[1], A * src[1]);\ | 139 | 116M | OP(dst[2], A * src[2]);\ | 140 | 116M | OP(dst[3], A * src[3]);\ | 141 | 116M | dst += stride;\ | 142 | 116M | src += stride;\ | 143 | 116M | }\ | 144 | 27.7M | }\ | 145 | 54.4M | }\ |
h264chroma.c:avg_h264_chroma_mc4_8_c Line | Count | Source | 102 | 23.1M | static void FUNCC(OPNAME ## h264_chroma_mc4)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 103 | 23.1M | {\ | 104 | 23.1M | pixel *dst = (pixel*)_dst;\ | 105 | 23.1M | const pixel *src = (const pixel*)_src;\ | 106 | 23.1M | const int A=(8-x)*(8-y);\ | 107 | 23.1M | const int B=( x)*(8-y);\ | 108 | 23.1M | const int C=(8-x)*( y);\ | 109 | 23.1M | const int D=( x)*( y);\ | 110 | 23.1M | int i;\ | 111 | 23.1M | stride >>= sizeof(pixel)-1;\ | 112 | 23.1M | \ | 113 | 23.1M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 114 | 23.1M | \ | 115 | 23.1M | if(D){\ | 116 | 15.0M | for(i=0; i<h; i++){\ | 117 | 12.1M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 118 | 12.1M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 119 | 12.1M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 120 | 12.1M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 121 | 12.1M | dst+= stride;\ | 122 | 12.1M | src+= stride;\ | 123 | 12.1M | }\ | 124 | 20.2M | } else if (B + C) {\ | 125 | 1.84M | const int E= B+C;\ | 126 | 1.84M | const ptrdiff_t step = C ? stride : 1;\ | 127 | 9.75M | for(i=0; i<h; i++){\ | 128 | 7.90M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 129 | 7.90M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 130 | 7.90M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 131 | 7.90M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 132 | 7.90M | dst+= stride;\ | 133 | 7.90M | src+= stride;\ | 134 | 7.90M | }\ | 135 | 18.4M | } else {\ | 136 | 93.5M | for ( i = 0; i < h; i++){\ | 137 | 75.1M | OP(dst[0], A * src[0]);\ | 138 | 75.1M | OP(dst[1], A * src[1]);\ | 139 | 75.1M | OP(dst[2], A * src[2]);\ | 140 | 75.1M | OP(dst[3], A * src[3]);\ | 141 | 75.1M | dst += stride;\ | 142 | 75.1M | src += stride;\ | 143 | 75.1M | }\ | 144 | 18.4M | }\ | 145 | 23.1M | }\ |
|
146 | | \ |
147 | 194M | static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ |
148 | 194M | {\ |
149 | 194M | pixel *dst = (pixel*)_dst;\ |
150 | 194M | const pixel *src = (const pixel*)_src;\ |
151 | 194M | const int A=(8-x)*(8-y);\ |
152 | 194M | const int B=( x)*(8-y);\ |
153 | 194M | const int C=(8-x)*( y);\ |
154 | 194M | const int D=( x)*( y);\ |
155 | 194M | int i;\ |
156 | 194M | stride >>= sizeof(pixel)-1;\ |
157 | 194M | \ |
158 | 194M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ |
159 | 194M | \ |
160 | 194M | if(D){\ |
161 | 172M | for(i=0; i<h; i++){\ |
162 | 155M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ |
163 | 155M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ |
164 | 155M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ |
165 | 155M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ |
166 | 155M | OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\ |
167 | 155M | OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\ |
168 | 155M | OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\ |
169 | 155M | OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\ |
170 | 155M | dst+= stride;\ |
171 | 155M | src+= stride;\ |
172 | 155M | }\ |
173 | 177M | } else if (B + C) {\ |
174 | 34.0M | const int E= B+C;\ |
175 | 34.0M | const ptrdiff_t step = C ? stride : 1;\ |
176 | 343M | for(i=0; i<h; i++){\ |
177 | 309M | OP(dst[0], (A*src[0] + E*src[step+0]));\ |
178 | 309M | OP(dst[1], (A*src[1] + E*src[step+1]));\ |
179 | 309M | OP(dst[2], (A*src[2] + E*src[step+2]));\ |
180 | 309M | OP(dst[3], (A*src[3] + E*src[step+3]));\ |
181 | 309M | OP(dst[4], (A*src[4] + E*src[step+4]));\ |
182 | 309M | OP(dst[5], (A*src[5] + E*src[step+5]));\ |
183 | 309M | OP(dst[6], (A*src[6] + E*src[step+6]));\ |
184 | 309M | OP(dst[7], (A*src[7] + E*src[step+7]));\ |
185 | 309M | dst+= stride;\ |
186 | 309M | src+= stride;\ |
187 | 309M | }\ |
188 | 142M | } else {\ |
189 | 1.61G | for ( i = 0; i < h; i++){\ |
190 | 1.47G | OP(dst[0], A * src[0]);\ |
191 | 1.47G | OP(dst[1], A * src[1]);\ |
192 | 1.47G | OP(dst[2], A * src[2]);\ |
193 | 1.47G | OP(dst[3], A * src[3]);\ |
194 | 1.47G | OP(dst[4], A * src[4]);\ |
195 | 1.47G | OP(dst[5], A * src[5]);\ |
196 | 1.47G | OP(dst[6], A * src[6]);\ |
197 | 1.47G | OP(dst[7], A * src[7]);\ |
198 | 1.47G | dst += stride;\ |
199 | 1.47G | src += stride;\ |
200 | 1.47G | }\ |
201 | 142M | }\ |
202 | 194M | } h264chroma.c:put_h264_chroma_mc8_16_c Line | Count | Source | 147 | 72.3M | static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 148 | 72.3M | {\ | 149 | 72.3M | pixel *dst = (pixel*)_dst;\ | 150 | 72.3M | const pixel *src = (const pixel*)_src;\ | 151 | 72.3M | const int A=(8-x)*(8-y);\ | 152 | 72.3M | const int B=( x)*(8-y);\ | 153 | 72.3M | const int C=(8-x)*( y);\ | 154 | 72.3M | const int D=( x)*( y);\ | 155 | 72.3M | int i;\ | 156 | 72.3M | stride >>= sizeof(pixel)-1;\ | 157 | 72.3M | \ | 158 | 72.3M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 159 | 72.3M | \ | 160 | 72.3M | if(D){\ | 161 | 61.8M | for(i=0; i<h; i++){\ | 162 | 56.1M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 163 | 56.1M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 164 | 56.1M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 165 | 56.1M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 166 | 56.1M | OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\ | 167 | 56.1M | OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\ | 168 | 56.1M | OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\ | 169 | 56.1M | OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\ | 170 | 56.1M | dst+= stride;\ | 171 | 56.1M | src+= stride;\ | 172 | 56.1M | }\ | 173 | 66.6M | } else if (B + C) {\ | 174 | 8.17M | const int E= B+C;\ | 175 | 8.17M | const ptrdiff_t step = C ? stride : 1;\ | 176 | 99.4M | for(i=0; i<h; i++){\ | 177 | 91.2M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 178 | 91.2M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 179 | 91.2M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 180 | 91.2M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 181 | 91.2M | OP(dst[4], (A*src[4] + E*src[step+4]));\ | 182 | 91.2M | OP(dst[5], (A*src[5] + E*src[step+5]));\ | 183 | 91.2M | OP(dst[6], (A*src[6] + E*src[step+6]));\ | 184 | 91.2M | OP(dst[7], (A*src[7] + E*src[step+7]));\ | 185 | 91.2M | dst+= stride;\ | 186 | 91.2M | src+= stride;\ | 187 | 91.2M | }\ | 188 | 58.4M | } else {\ | 189 | 694M | for ( i = 0; i < h; i++){\ | 190 | 635M | OP(dst[0], A * src[0]);\ | 191 | 635M | OP(dst[1], A * src[1]);\ | 192 | 635M | OP(dst[2], A * src[2]);\ | 193 | 635M | OP(dst[3], A * src[3]);\ | 194 | 635M | OP(dst[4], A * src[4]);\ | 195 | 635M | OP(dst[5], A * src[5]);\ | 196 | 635M | OP(dst[6], A * src[6]);\ | 197 | 635M | OP(dst[7], A * src[7]);\ | 198 | 635M | dst += stride;\ | 199 | 635M | src += stride;\ | 200 | 635M | }\ | 201 | 58.4M | }\ | 202 | 72.3M | } |
h264chroma.c:avg_h264_chroma_mc8_16_c Line | Count | Source | 147 | 12.1M | static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 148 | 12.1M | {\ | 149 | 12.1M | pixel *dst = (pixel*)_dst;\ | 150 | 12.1M | const pixel *src = (const pixel*)_src;\ | 151 | 12.1M | const int A=(8-x)*(8-y);\ | 152 | 12.1M | const int B=( x)*(8-y);\ | 153 | 12.1M | const int C=(8-x)*( y);\ | 154 | 12.1M | const int D=( x)*( y);\ | 155 | 12.1M | int i;\ | 156 | 12.1M | stride >>= sizeof(pixel)-1;\ | 157 | 12.1M | \ | 158 | 12.1M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 159 | 12.1M | \ | 160 | 12.1M | if(D){\ | 161 | 9.26M | for(i=0; i<h; i++){\ | 162 | 8.39M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 163 | 8.39M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 164 | 8.39M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 165 | 8.39M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 166 | 8.39M | OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\ | 167 | 8.39M | OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\ | 168 | 8.39M | OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\ | 169 | 8.39M | OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\ | 170 | 8.39M | dst+= stride;\ | 171 | 8.39M | src+= stride;\ | 172 | 8.39M | }\ | 173 | 11.2M | } else if (B + C) {\ | 174 | 2.15M | const int E= B+C;\ | 175 | 2.15M | const ptrdiff_t step = C ? stride : 1;\ | 176 | 26.1M | for(i=0; i<h; i++){\ | 177 | 24.0M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 178 | 24.0M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 179 | 24.0M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 180 | 24.0M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 181 | 24.0M | OP(dst[4], (A*src[4] + E*src[step+4]));\ | 182 | 24.0M | OP(dst[5], (A*src[5] + E*src[step+5]));\ | 183 | 24.0M | OP(dst[6], (A*src[6] + E*src[step+6]));\ | 184 | 24.0M | OP(dst[7], (A*src[7] + E*src[step+7]));\ | 185 | 24.0M | dst+= stride;\ | 186 | 24.0M | src+= stride;\ | 187 | 24.0M | }\ | 188 | 9.09M | } else {\ | 189 | 110M | for ( i = 0; i < h; i++){\ | 190 | 101M | OP(dst[0], A * src[0]);\ | 191 | 101M | OP(dst[1], A * src[1]);\ | 192 | 101M | OP(dst[2], A * src[2]);\ | 193 | 101M | OP(dst[3], A * src[3]);\ | 194 | 101M | OP(dst[4], A * src[4]);\ | 195 | 101M | OP(dst[5], A * src[5]);\ | 196 | 101M | OP(dst[6], A * src[6]);\ | 197 | 101M | OP(dst[7], A * src[7]);\ | 198 | 101M | dst += stride;\ | 199 | 101M | src += stride;\ | 200 | 101M | }\ | 201 | 9.09M | }\ | 202 | 12.1M | } |
h264chroma.c:put_h264_chroma_mc8_8_c Line | Count | Source | 147 | 97.7M | static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 148 | 97.7M | {\ | 149 | 97.7M | pixel *dst = (pixel*)_dst;\ | 150 | 97.7M | const pixel *src = (const pixel*)_src;\ | 151 | 97.7M | const int A=(8-x)*(8-y);\ | 152 | 97.7M | const int B=( x)*(8-y);\ | 153 | 97.7M | const int C=(8-x)*( y);\ | 154 | 97.7M | const int D=( x)*( y);\ | 155 | 97.7M | int i;\ | 156 | 97.7M | stride >>= sizeof(pixel)-1;\ | 157 | 97.7M | \ | 158 | 97.7M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 159 | 97.7M | \ | 160 | 97.7M | if(D){\ | 161 | 90.5M | for(i=0; i<h; i++){\ | 162 | 80.7M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 163 | 80.7M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 164 | 80.7M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 165 | 80.7M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 166 | 80.7M | OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\ | 167 | 80.7M | OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\ | 168 | 80.7M | OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\ | 169 | 80.7M | OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\ | 170 | 80.7M | dst+= stride;\ | 171 | 80.7M | src+= stride;\ | 172 | 80.7M | }\ | 173 | 87.8M | } else if (B + C) {\ | 174 | 22.0M | const int E= B+C;\ | 175 | 22.0M | const ptrdiff_t step = C ? stride : 1;\ | 176 | 203M | for(i=0; i<h; i++){\ | 177 | 181M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 178 | 181M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 179 | 181M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 180 | 181M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 181 | 181M | OP(dst[4], (A*src[4] + E*src[step+4]));\ | 182 | 181M | OP(dst[5], (A*src[5] + E*src[step+5]));\ | 183 | 181M | OP(dst[6], (A*src[6] + E*src[step+6]));\ | 184 | 181M | OP(dst[7], (A*src[7] + E*src[step+7]));\ | 185 | 181M | dst+= stride;\ | 186 | 181M | src+= stride;\ | 187 | 181M | }\ | 188 | 65.8M | } else {\ | 189 | 722M | for ( i = 0; i < h; i++){\ | 190 | 656M | OP(dst[0], A * src[0]);\ | 191 | 656M | OP(dst[1], A * src[1]);\ | 192 | 656M | OP(dst[2], A * src[2]);\ | 193 | 656M | OP(dst[3], A * src[3]);\ | 194 | 656M | OP(dst[4], A * src[4]);\ | 195 | 656M | OP(dst[5], A * src[5]);\ | 196 | 656M | OP(dst[6], A * src[6]);\ | 197 | 656M | OP(dst[7], A * src[7]);\ | 198 | 656M | dst += stride;\ | 199 | 656M | src += stride;\ | 200 | 656M | }\ | 201 | 65.8M | }\ | 202 | 97.7M | } |
h264chroma.c:avg_h264_chroma_mc8_8_c Line | Count | Source | 147 | 12.5M | static void FUNCC(OPNAME ## h264_chroma_mc8)(uint8_t *_dst /*align 8*/, const uint8_t *_src /*align 1*/, ptrdiff_t stride, int h, int x, int y)\ | 148 | 12.5M | {\ | 149 | 12.5M | pixel *dst = (pixel*)_dst;\ | 150 | 12.5M | const pixel *src = (const pixel*)_src;\ | 151 | 12.5M | const int A=(8-x)*(8-y);\ | 152 | 12.5M | const int B=( x)*(8-y);\ | 153 | 12.5M | const int C=(8-x)*( y);\ | 154 | 12.5M | const int D=( x)*( y);\ | 155 | 12.5M | int i;\ | 156 | 12.5M | stride >>= sizeof(pixel)-1;\ | 157 | 12.5M | \ | 158 | 12.5M | av_assert2(x<8 && y<8 && x>=0 && y>=0);\ | 159 | 12.5M | \ | 160 | 12.5M | if(D){\ | 161 | 11.3M | for(i=0; i<h; i++){\ | 162 | 10.0M | OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\ | 163 | 10.0M | OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\ | 164 | 10.0M | OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\ | 165 | 10.0M | OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\ | 166 | 10.0M | OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\ | 167 | 10.0M | OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\ | 168 | 10.0M | OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\ | 169 | 10.0M | OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\ | 170 | 10.0M | dst+= stride;\ | 171 | 10.0M | src+= stride;\ | 172 | 10.0M | }\ | 173 | 11.2M | } else if (B + C) {\ | 174 | 1.67M | const int E= B+C;\ | 175 | 1.67M | const ptrdiff_t step = C ? stride : 1;\ | 176 | 14.8M | for(i=0; i<h; i++){\ | 177 | 13.1M | OP(dst[0], (A*src[0] + E*src[step+0]));\ | 178 | 13.1M | OP(dst[1], (A*src[1] + E*src[step+1]));\ | 179 | 13.1M | OP(dst[2], (A*src[2] + E*src[step+2]));\ | 180 | 13.1M | OP(dst[3], (A*src[3] + E*src[step+3]));\ | 181 | 13.1M | OP(dst[4], (A*src[4] + E*src[step+4]));\ | 182 | 13.1M | OP(dst[5], (A*src[5] + E*src[step+5]));\ | 183 | 13.1M | OP(dst[6], (A*src[6] + E*src[step+6]));\ | 184 | 13.1M | OP(dst[7], (A*src[7] + E*src[step+7]));\ | 185 | 13.1M | dst+= stride;\ | 186 | 13.1M | src+= stride;\ | 187 | 13.1M | }\ | 188 | 9.53M | } else {\ | 189 | 88.2M | for ( i = 0; i < h; i++){\ | 190 | 78.6M | OP(dst[0], A * src[0]);\ | 191 | 78.6M | OP(dst[1], A * src[1]);\ | 192 | 78.6M | OP(dst[2], A * src[2]);\ | 193 | 78.6M | OP(dst[3], A * src[3]);\ | 194 | 78.6M | OP(dst[4], A * src[4]);\ | 195 | 78.6M | OP(dst[5], A * src[5]);\ | 196 | 78.6M | OP(dst[6], A * src[6]);\ | 197 | 78.6M | OP(dst[7], A * src[7]);\ | 198 | 78.6M | dst += stride;\ | 199 | 78.6M | src += stride;\ | 200 | 78.6M | }\ | 201 | 9.53M | }\ | 202 | 12.5M | } |
|
203 | | |
204 | 2.78G | #define op_avg(a, b) a = (((a)+(((b) + 32)>>6)+1)>>1) |
205 | 15.5G | #define op_put(a, b) a = (((b) + 32)>>6) |
206 | | |
207 | 15.5G | H264_CHROMA_MC(put_ , op_put) |
208 | 2.78G | H264_CHROMA_MC(avg_ , op_avg) |
209 | | #undef op_avg |
210 | | #undef op_put |