Coverage Report

Created: 2024-09-06 07:53

/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
2.42M
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
2.42M
    pixel *dst = (pixel*)_dst;\
31
2.42M
    const pixel *src = (const pixel*)_src;\
32
2.42M
    const int A=(8-x)*(8-y);\
33
2.42M
    const int B=(  x)*(8-y);\
34
2.42M
    const int C=(8-x)*(  y);\
35
2.42M
    const int D=(  x)*(  y);\
36
2.42M
    int i;\
37
2.42M
    stride >>= sizeof(pixel)-1;\
38
2.42M
    \
39
2.42M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
40
2.42M
\
41
2.42M
    if(D){\
42
102k
        for(i=0; i<h; i++){\
43
52.9k
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
44
52.9k
            dst+= stride;\
45
52.9k
            src+= stride;\
46
52.9k
        }\
47
2.37M
    } else if (B + C) {\
48
357k
        const int E= B+C;\
49
357k
        const int step= C ? stride : 1;\
50
719k
        for(i=0; i<h; i++){\
51
361k
            OP(dst[0], (A*src[0] + E*src[step+0]));\
52
361k
            dst+= stride;\
53
361k
            src+= stride;\
54
361k
        }\
55
2.01M
    } else {\
56
4.03M
        for(i=0; i<h; i++){\
57
2.02M
            OP(dst[0], (A*src[0]));\
58
2.02M
            dst+= stride;\
59
2.02M
            src+= stride;\
60
2.02M
        }\
61
2.01M
    }\
62
2.42M
}\
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
2.39M
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
2.39M
    pixel *dst = (pixel*)_dst;\
31
2.39M
    const pixel *src = (const pixel*)_src;\
32
2.39M
    const int A=(8-x)*(8-y);\
33
2.39M
    const int B=(  x)*(8-y);\
34
2.39M
    const int C=(8-x)*(  y);\
35
2.39M
    const int D=(  x)*(  y);\
36
2.39M
    int i;\
37
2.39M
    stride >>= sizeof(pixel)-1;\
38
2.39M
    \
39
2.39M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
40
2.39M
\
41
2.39M
    if(D){\
42
85.9k
        for(i=0; i<h; i++){\
43
43.8k
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
44
43.8k
            dst+= stride;\
45
43.8k
            src+= stride;\
46
43.8k
        }\
47
2.35M
    } else if (B + C) {\
48
348k
        const int E= B+C;\
49
348k
        const int step= C ? stride : 1;\
50
699k
        for(i=0; i<h; i++){\
51
351k
            OP(dst[0], (A*src[0] + E*src[step+0]));\
52
351k
            dst+= stride;\
53
351k
            src+= stride;\
54
351k
        }\
55
2.00M
    } else {\
56
4.01M
        for(i=0; i<h; i++){\
57
2.01M
            OP(dst[0], (A*src[0]));\
58
2.01M
            dst+= stride;\
59
2.01M
            src+= stride;\
60
2.01M
        }\
61
2.00M
    }\
62
2.39M
}\
h264chroma.c:avg_h264_chroma_mc1_8_c
Line
Count
Source
29
24.6k
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
24.6k
    pixel *dst = (pixel*)_dst;\
31
24.6k
    const pixel *src = (const pixel*)_src;\
32
24.6k
    const int A=(8-x)*(8-y);\
33
24.6k
    const int B=(  x)*(8-y);\
34
24.6k
    const int C=(8-x)*(  y);\
35
24.6k
    const int D=(  x)*(  y);\
36
24.6k
    int i;\
37
24.6k
    stride >>= sizeof(pixel)-1;\
38
24.6k
    \
39
24.6k
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
40
24.6k
\
41
24.6k
    if(D){\
42
16.6k
        for(i=0; i<h; i++){\
43
9.11k
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
44
9.11k
            dst+= stride;\
45
9.11k
            src+= stride;\
46
9.11k
        }\
47
17.1k
    } else if (B + C) {\
48
8.80k
        const int E= B+C;\
49
8.80k
        const int step= C ? stride : 1;\
50
19.5k
        for(i=0; i<h; i++){\
51
10.7k
            OP(dst[0], (A*src[0] + E*src[step+0]));\
52
10.7k
            dst+= stride;\
53
10.7k
            src+= stride;\
54
10.7k
        }\
55
8.80k
    } else {\
56
20.5k
        for(i=0; i<h; i++){\
57
12.1k
            OP(dst[0], (A*src[0]));\
58
12.1k
            dst+= stride;\
59
12.1k
            src+= stride;\
60
12.1k
        }\
61
8.32k
    }\
62
24.6k
}\
63
14.9M
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
14.9M
{\
65
14.9M
    pixel *dst = (pixel*)_dst;\
66
14.9M
    const pixel *src = (const pixel*)_src;\
67
14.9M
    const int A=(8-x)*(8-y);\
68
14.9M
    const int B=(  x)*(8-y);\
69
14.9M
    const int C=(8-x)*(  y);\
70
14.9M
    const int D=(  x)*(  y);\
71
14.9M
    int i;\
72
14.9M
    stride >>= sizeof(pixel)-1;\
73
14.9M
    \
74
14.9M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
75
14.9M
\
76
14.9M
    if(D){\
77
11.3M
        for(i=0; i<h; i++){\
78
8.75M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
79
8.75M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
80
8.75M
            dst+= stride;\
81
8.75M
            src+= stride;\
82
8.75M
        }\
83
12.3M
    } else if (B + C) {\
84
2.19M
        const int E= B+C;\
85
2.19M
        const ptrdiff_t step = C ? stride : 1;\
86
9.47M
        for(i=0; i<h; i++){\
87
7.27M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
88
7.27M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
89
7.27M
            dst+= stride;\
90
7.27M
            src+= stride;\
91
7.27M
        }\
92
10.1M
    } else {\
93
35.5M
        for ( i = 0; i < h; i++){\
94
25.3M
            OP(dst[0], A * src[0]);\
95
25.3M
            OP(dst[1], A * src[1]);\
96
25.3M
            dst += stride;\
97
25.3M
            src += stride;\
98
25.3M
        }\
99
10.1M
    }\
100
14.9M
}\
h264chroma.c:put_h264_chroma_mc2_16_c
Line
Count
Source
63
6.47M
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.47M
{\
65
6.47M
    pixel *dst = (pixel*)_dst;\
66
6.47M
    const pixel *src = (const pixel*)_src;\
67
6.47M
    const int A=(8-x)*(8-y);\
68
6.47M
    const int B=(  x)*(8-y);\
69
6.47M
    const int C=(8-x)*(  y);\
70
6.47M
    const int D=(  x)*(  y);\
71
6.47M
    int i;\
72
6.47M
    stride >>= sizeof(pixel)-1;\
73
6.47M
    \
74
6.47M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
75
6.47M
\
76
6.47M
    if(D){\
77
6.91M
        for(i=0; i<h; i++){\
78
5.40M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
79
5.40M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
80
5.40M
            dst+= stride;\
81
5.40M
            src+= stride;\
82
5.40M
        }\
83
4.96M
    } else if (B + C) {\
84
1.25M
        const int E= B+C;\
85
1.25M
        const ptrdiff_t step = C ? stride : 1;\
86
5.76M
        for(i=0; i<h; i++){\
87
4.50M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
88
4.50M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
89
4.50M
            dst+= stride;\
90
4.50M
            src+= stride;\
91
4.50M
        }\
92
3.70M
    } else {\
93
14.3M
        for ( i = 0; i < h; i++){\
94
10.6M
            OP(dst[0], A * src[0]);\
95
10.6M
            OP(dst[1], A * src[1]);\
96
10.6M
            dst += stride;\
97
10.6M
            src += stride;\
98
10.6M
        }\
99
3.70M
    }\
100
6.47M
}\
h264chroma.c:avg_h264_chroma_mc2_16_c
Line
Count
Source
63
3.44M
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
3.44M
{\
65
3.44M
    pixel *dst = (pixel*)_dst;\
66
3.44M
    const pixel *src = (const pixel*)_src;\
67
3.44M
    const int A=(8-x)*(8-y);\
68
3.44M
    const int B=(  x)*(8-y);\
69
3.44M
    const int C=(8-x)*(  y);\
70
3.44M
    const int D=(  x)*(  y);\
71
3.44M
    int i;\
72
3.44M
    stride >>= sizeof(pixel)-1;\
73
3.44M
    \
74
3.44M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
75
3.44M
\
76
3.44M
    if(D){\
77
1.60M
        for(i=0; i<h; i++){\
78
1.16M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
79
1.16M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
80
1.16M
            dst+= stride;\
81
1.16M
            src+= stride;\
82
1.16M
        }\
83
3.00M
    } else if (B + C) {\
84
368k
        const int E= B+C;\
85
368k
        const ptrdiff_t step = C ? stride : 1;\
86
1.41M
        for(i=0; i<h; i++){\
87
1.04M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
88
1.04M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
89
1.04M
            dst+= stride;\
90
1.04M
            src+= stride;\
91
1.04M
        }\
92
2.63M
    } else {\
93
9.57M
        for ( i = 0; i < h; i++){\
94
6.93M
            OP(dst[0], A * src[0]);\
95
6.93M
            OP(dst[1], A * src[1]);\
96
6.93M
            dst += stride;\
97
6.93M
            src += stride;\
98
6.93M
        }\
99
2.63M
    }\
100
3.44M
}\
h264chroma.c:put_h264_chroma_mc2_8_c
Line
Count
Source
63
3.68M
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
3.68M
{\
65
3.68M
    pixel *dst = (pixel*)_dst;\
66
3.68M
    const pixel *src = (const pixel*)_src;\
67
3.68M
    const int A=(8-x)*(8-y);\
68
3.68M
    const int B=(  x)*(8-y);\
69
3.68M
    const int C=(8-x)*(  y);\
70
3.68M
    const int D=(  x)*(  y);\
71
3.68M
    int i;\
72
3.68M
    stride >>= sizeof(pixel)-1;\
73
3.68M
    \
74
3.68M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
75
3.68M
\
76
3.68M
    if(D){\
77
2.69M
        for(i=0; i<h; i++){\
78
2.11M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
79
2.11M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
80
2.11M
            dst+= stride;\
81
2.11M
            src+= stride;\
82
2.11M
        }\
83
3.10M
    } else if (B + C) {\
84
534k
        const int E= B+C;\
85
534k
        const ptrdiff_t step = C ? stride : 1;\
86
2.19M
        for(i=0; i<h; i++){\
87
1.65M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
88
1.65M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
89
1.65M
            dst+= stride;\
90
1.65M
            src+= stride;\
91
1.65M
        }\
92
2.57M
    } else {\
93
7.84M
        for ( i = 0; i < h; i++){\
94
5.27M
            OP(dst[0], A * src[0]);\
95
5.27M
            OP(dst[1], A * src[1]);\
96
5.27M
            dst += stride;\
97
5.27M
            src += stride;\
98
5.27M
        }\
99
2.57M
    }\
100
3.68M
}\
h264chroma.c:avg_h264_chroma_mc2_8_c
Line
Count
Source
63
1.32M
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.32M
{\
65
1.32M
    pixel *dst = (pixel*)_dst;\
66
1.32M
    const pixel *src = (const pixel*)_src;\
67
1.32M
    const int A=(8-x)*(8-y);\
68
1.32M
    const int B=(  x)*(8-y);\
69
1.32M
    const int C=(8-x)*(  y);\
70
1.32M
    const int D=(  x)*(  y);\
71
1.32M
    int i;\
72
1.32M
    stride >>= sizeof(pixel)-1;\
73
1.32M
    \
74
1.32M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
75
1.32M
\
76
1.32M
    if(D){\
77
105k
        for(i=0; i<h; i++){\
78
70.1k
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
79
70.1k
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
80
70.1k
            dst+= stride;\
81
70.1k
            src+= stride;\
82
70.1k
        }\
83
1.29M
    } else if (B + C) {\
84
34.9k
        const int E= B+C;\
85
34.9k
        const ptrdiff_t step = C ? stride : 1;\
86
104k
        for(i=0; i<h; i++){\
87
69.9k
            OP(dst[0], (A*src[0] + E*src[step+0]));\
88
69.9k
            OP(dst[1], (A*src[1] + E*src[step+1]));\
89
69.9k
            dst+= stride;\
90
69.9k
            src+= stride;\
91
69.9k
        }\
92
1.25M
    } else {\
93
3.79M
        for ( i = 0; i < h; i++){\
94
2.53M
            OP(dst[0], A * src[0]);\
95
2.53M
            OP(dst[1], A * src[1]);\
96
2.53M
            dst += stride;\
97
2.53M
            src += stride;\
98
2.53M
        }\
99
1.25M
    }\
100
1.32M
}\
101
\
102
86.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
86.8M
{\
104
86.8M
    pixel *dst = (pixel*)_dst;\
105
86.8M
    const pixel *src = (const pixel*)_src;\
106
86.8M
    const int A=(8-x)*(8-y);\
107
86.8M
    const int B=(  x)*(8-y);\
108
86.8M
    const int C=(8-x)*(  y);\
109
86.8M
    const int D=(  x)*(  y);\
110
86.8M
    int i;\
111
86.8M
    stride >>= sizeof(pixel)-1;\
112
86.8M
    \
113
86.8M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
114
86.8M
\
115
86.8M
    if(D){\
116
90.6M
        for(i=0; i<h; i++){\
117
75.6M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
118
75.6M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
119
75.6M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
120
75.6M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
121
75.6M
            dst+= stride;\
122
75.6M
            src+= stride;\
123
75.6M
        }\
124
71.8M
    } else if (B + C) {\
125
13.2M
        const int E= B+C;\
126
13.2M
        const ptrdiff_t step = C ? stride : 1;\
127
85.2M
        for(i=0; i<h; i++){\
128
71.9M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
129
71.9M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
130
71.9M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
131
71.9M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
132
71.9M
            dst+= stride;\
133
71.9M
            src+= stride;\
134
71.9M
        }\
135
58.5M
    } else {\
136
364M
        for ( i = 0; i < h; i++){\
137
305M
            OP(dst[0], A * src[0]);\
138
305M
            OP(dst[1], A * src[1]);\
139
305M
            OP(dst[2], A * src[2]);\
140
305M
            OP(dst[3], A * src[3]);\
141
305M
            dst += stride;\
142
305M
            src += stride;\
143
305M
        }\
144
58.5M
    }\
145
86.8M
}\
h264chroma.c:put_h264_chroma_mc4_16_c
Line
Count
Source
102
25.2M
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
25.2M
{\
104
25.2M
    pixel *dst = (pixel*)_dst;\
105
25.2M
    const pixel *src = (const pixel*)_src;\
106
25.2M
    const int A=(8-x)*(8-y);\
107
25.2M
    const int B=(  x)*(8-y);\
108
25.2M
    const int C=(8-x)*(  y);\
109
25.2M
    const int D=(  x)*(  y);\
110
25.2M
    int i;\
111
25.2M
    stride >>= sizeof(pixel)-1;\
112
25.2M
    \
113
25.2M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
114
25.2M
\
115
25.2M
    if(D){\
116
21.9M
        for(i=0; i<h; i++){\
117
18.8M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
118
18.8M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
119
18.8M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
120
18.8M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
121
18.8M
            dst+= stride;\
122
18.8M
            src+= stride;\
123
18.8M
        }\
124
22.1M
    } else if (B + C) {\
125
3.24M
        const int E= B+C;\
126
3.24M
        const ptrdiff_t step = C ? stride : 1;\
127
25.9M
        for(i=0; i<h; i++){\
128
22.7M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
129
22.7M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
130
22.7M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
131
22.7M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
132
22.7M
            dst+= stride;\
133
22.7M
            src+= stride;\
134
22.7M
        }\
135
18.9M
    } else {\
136
130M
        for ( i = 0; i < h; i++){\
137
111M
            OP(dst[0], A * src[0]);\
138
111M
            OP(dst[1], A * src[1]);\
139
111M
            OP(dst[2], A * src[2]);\
140
111M
            OP(dst[3], A * src[3]);\
141
111M
            dst += stride;\
142
111M
            src += stride;\
143
111M
        }\
144
18.9M
    }\
145
25.2M
}\
h264chroma.c:avg_h264_chroma_mc4_16_c
Line
Count
Source
102
12.3M
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
12.3M
{\
104
12.3M
    pixel *dst = (pixel*)_dst;\
105
12.3M
    const pixel *src = (const pixel*)_src;\
106
12.3M
    const int A=(8-x)*(8-y);\
107
12.3M
    const int B=(  x)*(8-y);\
108
12.3M
    const int C=(8-x)*(  y);\
109
12.3M
    const int D=(  x)*(  y);\
110
12.3M
    int i;\
111
12.3M
    stride >>= sizeof(pixel)-1;\
112
12.3M
    \
113
12.3M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
114
12.3M
\
115
12.3M
    if(D){\
116
5.17M
        for(i=0; i<h; i++){\
117
4.56M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
118
4.56M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
119
4.56M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
120
4.56M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
121
4.56M
            dst+= stride;\
122
4.56M
            src+= stride;\
123
4.56M
        }\
124
11.7M
    } else if (B + C) {\
125
1.27M
        const int E= B+C;\
126
1.27M
        const ptrdiff_t step = C ? stride : 1;\
127
9.65M
        for(i=0; i<h; i++){\
128
8.37M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
129
8.37M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
130
8.37M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
131
8.37M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
132
8.37M
            dst+= stride;\
133
8.37M
            src+= stride;\
134
8.37M
        }\
135
10.4M
    } else {\
136
83.2M
        for ( i = 0; i < h; i++){\
137
72.7M
            OP(dst[0], A * src[0]);\
138
72.7M
            OP(dst[1], A * src[1]);\
139
72.7M
            OP(dst[2], A * src[2]);\
140
72.7M
            OP(dst[3], A * src[3]);\
141
72.7M
            dst += stride;\
142
72.7M
            src += stride;\
143
72.7M
        }\
144
10.4M
    }\
145
12.3M
}\
h264chroma.c:put_h264_chroma_mc4_8_c
Line
Count
Source
102
32.3M
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
32.3M
{\
104
32.3M
    pixel *dst = (pixel*)_dst;\
105
32.3M
    const pixel *src = (const pixel*)_src;\
106
32.3M
    const int A=(8-x)*(8-y);\
107
32.3M
    const int B=(  x)*(8-y);\
108
32.3M
    const int C=(8-x)*(  y);\
109
32.3M
    const int D=(  x)*(  y);\
110
32.3M
    int i;\
111
32.3M
    stride >>= sizeof(pixel)-1;\
112
32.3M
    \
113
32.3M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
114
32.3M
\
115
32.3M
    if(D){\
116
50.1M
        for(i=0; i<h; i++){\
117
41.4M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
118
41.4M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
119
41.4M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
120
41.4M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
121
41.4M
            dst+= stride;\
122
41.4M
            src+= stride;\
123
41.4M
        }\
124
23.7M
    } else if (B + C) {\
125
7.41M
        const int E= B+C;\
126
7.41M
        const ptrdiff_t step = C ? stride : 1;\
127
42.4M
        for(i=0; i<h; i++){\
128
35.0M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
129
35.0M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
130
35.0M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
131
35.0M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
132
35.0M
            dst+= stride;\
133
35.0M
            src+= stride;\
134
35.0M
        }\
135
16.2M
    } else {\
136
84.9M
        for ( i = 0; i < h; i++){\
137
68.6M
            OP(dst[0], A * src[0]);\
138
68.6M
            OP(dst[1], A * src[1]);\
139
68.6M
            OP(dst[2], A * src[2]);\
140
68.6M
            OP(dst[3], A * src[3]);\
141
68.6M
            dst += stride;\
142
68.6M
            src += stride;\
143
68.6M
        }\
144
16.2M
    }\
145
32.3M
}\
h264chroma.c:avg_h264_chroma_mc4_8_c
Line
Count
Source
102
16.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
16.8M
{\
104
16.8M
    pixel *dst = (pixel*)_dst;\
105
16.8M
    const pixel *src = (const pixel*)_src;\
106
16.8M
    const int A=(8-x)*(8-y);\
107
16.8M
    const int B=(  x)*(8-y);\
108
16.8M
    const int C=(8-x)*(  y);\
109
16.8M
    const int D=(  x)*(  y);\
110
16.8M
    int i;\
111
16.8M
    stride >>= sizeof(pixel)-1;\
112
16.8M
    \
113
16.8M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
114
16.8M
\
115
16.8M
    if(D){\
116
13.3M
        for(i=0; i<h; i++){\
117
10.7M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
118
10.7M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
119
10.7M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
120
10.7M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
121
10.7M
            dst+= stride;\
122
10.7M
            src+= stride;\
123
10.7M
        }\
124
14.2M
    } else if (B + C) {\
125
1.37M
        const int E= B+C;\
126
1.37M
        const ptrdiff_t step = C ? stride : 1;\
127
7.19M
        for(i=0; i<h; i++){\
128
5.81M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
129
5.81M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
130
5.81M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
131
5.81M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
132
5.81M
            dst+= stride;\
133
5.81M
            src+= stride;\
134
5.81M
        }\
135
12.8M
    } else {\
136
65.5M
        for ( i = 0; i < h; i++){\
137
52.7M
            OP(dst[0], A * src[0]);\
138
52.7M
            OP(dst[1], A * src[1]);\
139
52.7M
            OP(dst[2], A * src[2]);\
140
52.7M
            OP(dst[3], A * src[3]);\
141
52.7M
            dst += stride;\
142
52.7M
            src += stride;\
143
52.7M
        }\
144
12.8M
    }\
145
16.8M
}\
146
\
147
113M
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
113M
{\
149
113M
    pixel *dst = (pixel*)_dst;\
150
113M
    const pixel *src = (const pixel*)_src;\
151
113M
    const int A=(8-x)*(8-y);\
152
113M
    const int B=(  x)*(8-y);\
153
113M
    const int C=(8-x)*(  y);\
154
113M
    const int D=(  x)*(  y);\
155
113M
    int i;\
156
113M
    stride >>= sizeof(pixel)-1;\
157
113M
    \
158
113M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
159
113M
\
160
113M
    if(D){\
161
112M
        for(i=0; i<h; i++){\
162
100M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
163
100M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
164
100M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
165
100M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
166
100M
            OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
167
100M
            OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
168
100M
            OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
169
100M
            OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
170
100M
            dst+= stride;\
171
100M
            src+= stride;\
172
100M
        }\
173
102M
    } else if (B + C) {\
174
24.2M
        const int E= B+C;\
175
24.2M
        const ptrdiff_t step = C ? stride : 1;\
176
245M
        for(i=0; i<h; i++){\
177
221M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
178
221M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
179
221M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
180
221M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
181
221M
            OP(dst[4], (A*src[4] + E*src[step+4]));\
182
221M
            OP(dst[5], (A*src[5] + E*src[step+5]));\
183
221M
            OP(dst[6], (A*src[6] + E*src[step+6]));\
184
221M
            OP(dst[7], (A*src[7] + E*src[step+7]));\
185
221M
            dst+= stride;\
186
221M
            src+= stride;\
187
221M
        }\
188
77.9M
    } else {\
189
862M
        for ( i = 0; i < h; i++){\
190
784M
            OP(dst[0], A * src[0]);\
191
784M
            OP(dst[1], A * src[1]);\
192
784M
            OP(dst[2], A * src[2]);\
193
784M
            OP(dst[3], A * src[3]);\
194
784M
            OP(dst[4], A * src[4]);\
195
784M
            OP(dst[5], A * src[5]);\
196
784M
            OP(dst[6], A * src[6]);\
197
784M
            OP(dst[7], A * src[7]);\
198
784M
            dst += stride;\
199
784M
            src += stride;\
200
784M
        }\
201
77.9M
    }\
202
113M
}
h264chroma.c:put_h264_chroma_mc8_16_c
Line
Count
Source
147
44.0M
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
44.0M
{\
149
44.0M
    pixel *dst = (pixel*)_dst;\
150
44.0M
    const pixel *src = (const pixel*)_src;\
151
44.0M
    const int A=(8-x)*(8-y);\
152
44.0M
    const int B=(  x)*(8-y);\
153
44.0M
    const int C=(8-x)*(  y);\
154
44.0M
    const int D=(  x)*(  y);\
155
44.0M
    int i;\
156
44.0M
    stride >>= sizeof(pixel)-1;\
157
44.0M
    \
158
44.0M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
159
44.0M
\
160
44.0M
    if(D){\
161
40.2M
        for(i=0; i<h; i++){\
162
36.6M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
163
36.6M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
164
36.6M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
165
36.6M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
166
36.6M
            OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
167
36.6M
            OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
168
36.6M
            OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
169
36.6M
            OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
170
36.6M
            dst+= stride;\
171
36.6M
            src+= stride;\
172
36.6M
        }\
173
40.4M
    } else if (B + C) {\
174
5.40M
        const int E= B+C;\
175
5.40M
        const ptrdiff_t step = C ? stride : 1;\
176
68.6M
        for(i=0; i<h; i++){\
177
63.2M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
178
63.2M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
179
63.2M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
180
63.2M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
181
63.2M
            OP(dst[4], (A*src[4] + E*src[step+4]));\
182
63.2M
            OP(dst[5], (A*src[5] + E*src[step+5]));\
183
63.2M
            OP(dst[6], (A*src[6] + E*src[step+6]));\
184
63.2M
            OP(dst[7], (A*src[7] + E*src[step+7]));\
185
63.2M
            dst+= stride;\
186
63.2M
            src+= stride;\
187
63.2M
        }\
188
35.0M
    } else {\
189
439M
        for ( i = 0; i < h; i++){\
190
404M
            OP(dst[0], A * src[0]);\
191
404M
            OP(dst[1], A * src[1]);\
192
404M
            OP(dst[2], A * src[2]);\
193
404M
            OP(dst[3], A * src[3]);\
194
404M
            OP(dst[4], A * src[4]);\
195
404M
            OP(dst[5], A * src[5]);\
196
404M
            OP(dst[6], A * src[6]);\
197
404M
            OP(dst[7], A * src[7]);\
198
404M
            dst += stride;\
199
404M
            src += stride;\
200
404M
        }\
201
35.0M
    }\
202
44.0M
}
h264chroma.c:avg_h264_chroma_mc8_16_c
Line
Count
Source
147
7.92M
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
7.92M
{\
149
7.92M
    pixel *dst = (pixel*)_dst;\
150
7.92M
    const pixel *src = (const pixel*)_src;\
151
7.92M
    const int A=(8-x)*(8-y);\
152
7.92M
    const int B=(  x)*(8-y);\
153
7.92M
    const int C=(8-x)*(  y);\
154
7.92M
    const int D=(  x)*(  y);\
155
7.92M
    int i;\
156
7.92M
    stride >>= sizeof(pixel)-1;\
157
7.92M
    \
158
7.92M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
159
7.92M
\
160
7.92M
    if(D){\
161
6.20M
        for(i=0; i<h; i++){\
162
5.62M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
163
5.62M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
164
5.62M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
165
5.62M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
166
5.62M
            OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
167
5.62M
            OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
168
5.62M
            OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
169
5.62M
            OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
170
5.62M
            dst+= stride;\
171
5.62M
            src+= stride;\
172
5.62M
        }\
173
7.35M
    } else if (B + C) {\
174
1.54M
        const int E= B+C;\
175
1.54M
        const ptrdiff_t step = C ? stride : 1;\
176
19.0M
        for(i=0; i<h; i++){\
177
17.5M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
178
17.5M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
179
17.5M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
180
17.5M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
181
17.5M
            OP(dst[4], (A*src[4] + E*src[step+4]));\
182
17.5M
            OP(dst[5], (A*src[5] + E*src[step+5]));\
183
17.5M
            OP(dst[6], (A*src[6] + E*src[step+6]));\
184
17.5M
            OP(dst[7], (A*src[7] + E*src[step+7]));\
185
17.5M
            dst+= stride;\
186
17.5M
            src+= stride;\
187
17.5M
        }\
188
5.80M
    } else {\
189
76.2M
        for ( i = 0; i < h; i++){\
190
70.4M
            OP(dst[0], A * src[0]);\
191
70.4M
            OP(dst[1], A * src[1]);\
192
70.4M
            OP(dst[2], A * src[2]);\
193
70.4M
            OP(dst[3], A * src[3]);\
194
70.4M
            OP(dst[4], A * src[4]);\
195
70.4M
            OP(dst[5], A * src[5]);\
196
70.4M
            OP(dst[6], A * src[6]);\
197
70.4M
            OP(dst[7], A * src[7]);\
198
70.4M
            dst += stride;\
199
70.4M
            src += stride;\
200
70.4M
        }\
201
5.80M
    }\
202
7.92M
}
h264chroma.c:put_h264_chroma_mc8_8_c
Line
Count
Source
147
53.6M
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
53.6M
{\
149
53.6M
    pixel *dst = (pixel*)_dst;\
150
53.6M
    const pixel *src = (const pixel*)_src;\
151
53.6M
    const int A=(8-x)*(8-y);\
152
53.6M
    const int B=(  x)*(8-y);\
153
53.6M
    const int C=(8-x)*(  y);\
154
53.6M
    const int D=(  x)*(  y);\
155
53.6M
    int i;\
156
53.6M
    stride >>= sizeof(pixel)-1;\
157
53.6M
    \
158
53.6M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
159
53.6M
\
160
53.6M
    if(D){\
161
58.4M
        for(i=0; i<h; i++){\
162
51.9M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
163
51.9M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
164
51.9M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
165
51.9M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
166
51.9M
            OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
167
51.9M
            OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
168
51.9M
            OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
169
51.9M
            OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
170
51.9M
            dst+= stride;\
171
51.9M
            src+= stride;\
172
51.9M
        }\
173
47.1M
    } else if (B + C) {\
174
16.2M
        const int E= B+C;\
175
16.2M
        const ptrdiff_t step = C ? stride : 1;\
176
148M
        for(i=0; i<h; i++){\
177
132M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
178
132M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
179
132M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
180
132M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
181
132M
            OP(dst[4], (A*src[4] + E*src[step+4]));\
182
132M
            OP(dst[5], (A*src[5] + E*src[step+5]));\
183
132M
            OP(dst[6], (A*src[6] + E*src[step+6]));\
184
132M
            OP(dst[7], (A*src[7] + E*src[step+7]));\
185
132M
            dst+= stride;\
186
132M
            src+= stride;\
187
132M
        }\
188
30.9M
    } else {\
189
290M
        for ( i = 0; i < h; i++){\
190
260M
            OP(dst[0], A * src[0]);\
191
260M
            OP(dst[1], A * src[1]);\
192
260M
            OP(dst[2], A * src[2]);\
193
260M
            OP(dst[3], A * src[3]);\
194
260M
            OP(dst[4], A * src[4]);\
195
260M
            OP(dst[5], A * src[5]);\
196
260M
            OP(dst[6], A * src[6]);\
197
260M
            OP(dst[7], A * src[7]);\
198
260M
            dst += stride;\
199
260M
            src += stride;\
200
260M
        }\
201
30.9M
    }\
202
53.6M
}
h264chroma.c:avg_h264_chroma_mc8_8_c
Line
Count
Source
147
8.06M
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
8.06M
{\
149
8.06M
    pixel *dst = (pixel*)_dst;\
150
8.06M
    const pixel *src = (const pixel*)_src;\
151
8.06M
    const int A=(8-x)*(8-y);\
152
8.06M
    const int B=(  x)*(8-y);\
153
8.06M
    const int C=(8-x)*(  y);\
154
8.06M
    const int D=(  x)*(  y);\
155
8.06M
    int i;\
156
8.06M
    stride >>= sizeof(pixel)-1;\
157
8.06M
    \
158
8.06M
    av_assert2(x<8 && y<8 && x>=0 && y>=0);\
159
8.06M
\
160
8.06M
    if(D){\
161
7.42M
        for(i=0; i<h; i++){\
162
6.57M
            OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
163
6.57M
            OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
164
6.57M
            OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
165
6.57M
            OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
166
6.57M
            OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
167
6.57M
            OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
168
6.57M
            OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
169
6.57M
            OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
170
6.57M
            dst+= stride;\
171
6.57M
            src+= stride;\
172
6.57M
        }\
173
7.22M
    } else if (B + C) {\
174
1.03M
        const int E= B+C;\
175
1.03M
        const ptrdiff_t step = C ? stride : 1;\
176
9.17M
        for(i=0; i<h; i++){\
177
8.13M
            OP(dst[0], (A*src[0] + E*src[step+0]));\
178
8.13M
            OP(dst[1], (A*src[1] + E*src[step+1]));\
179
8.13M
            OP(dst[2], (A*src[2] + E*src[step+2]));\
180
8.13M
            OP(dst[3], (A*src[3] + E*src[step+3]));\
181
8.13M
            OP(dst[4], (A*src[4] + E*src[step+4]));\
182
8.13M
            OP(dst[5], (A*src[5] + E*src[step+5]));\
183
8.13M
            OP(dst[6], (A*src[6] + E*src[step+6]));\
184
8.13M
            OP(dst[7], (A*src[7] + E*src[step+7]));\
185
8.13M
            dst+= stride;\
186
8.13M
            src+= stride;\
187
8.13M
        }\
188
6.18M
    } else {\
189
56.4M
        for ( i = 0; i < h; i++){\
190
50.2M
            OP(dst[0], A * src[0]);\
191
50.2M
            OP(dst[1], A * src[1]);\
192
50.2M
            OP(dst[2], A * src[2]);\
193
50.2M
            OP(dst[3], A * src[3]);\
194
50.2M
            OP(dst[4], A * src[4]);\
195
50.2M
            OP(dst[5], A * src[5]);\
196
50.2M
            OP(dst[6], A * src[6]);\
197
50.2M
            OP(dst[7], A * src[7]);\
198
50.2M
            dst += stride;\
199
50.2M
            src += stride;\
200
50.2M
        }\
201
6.18M
    }\
202
8.06M
}
203
204
1.91G
#define op_avg(a, b) a = (((a)+(((b) + 32)>>6)+1)>>1)
205
8.84G
#define op_put(a, b) a = (((b) + 32)>>6)
206
207
8.84G
H264_CHROMA_MC(put_       , op_put)
208
1.91G
H264_CHROMA_MC(avg_       , op_avg)
209
#undef op_avg
210
#undef op_put