Coverage Report

Created: 2024-09-06 07:53

/src/ffmpeg/libavcodec/x86/rv40dsp_init.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * RV40 decoder motion compensation functions x86-optimised
3
 * Copyright (c) 2008 Konstantin Shishkov
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
 * @file
24
 * RV40 decoder motion compensation functions x86-optimised
25
 * 2,0 and 0,2 have h264 equivalents.
26
 * 3,3 is bugged in the rv40 format and maps to _xy2 version
27
 */
28
29
#include "libavcodec/rv34dsp.h"
30
#include "libavutil/attributes.h"
31
#include "libavutil/mem_internal.h"
32
#include "libavutil/x86/cpu.h"
33
#include "hpeldsp.h"
34
35
#define DEFINE_FN(op, size, insn) \
36
static void op##_rv40_qpel##size##_mc33_##insn(uint8_t *dst, const uint8_t *src, \
37
4.79k
                                               ptrdiff_t stride) \
38
4.79k
{ \
39
4.79k
    ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
40
4.79k
}
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc33_mmx
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc33_mmxext
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc33_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc33_sse2
rv40dsp_init.c:put_rv40_qpel16_mc33_ssse3
Line
Count
Source
37
1.34k
                                               ptrdiff_t stride) \
38
1.34k
{ \
39
1.34k
    ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
40
1.34k
}
rv40dsp_init.c:put_rv40_qpel8_mc33_ssse3
Line
Count
Source
37
2.18k
                                               ptrdiff_t stride) \
38
2.18k
{ \
39
2.18k
    ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
40
2.18k
}
rv40dsp_init.c:avg_rv40_qpel16_mc33_ssse3
Line
Count
Source
37
265
                                               ptrdiff_t stride) \
38
265
{ \
39
265
    ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
40
265
}
rv40dsp_init.c:avg_rv40_qpel8_mc33_ssse3
Line
Count
Source
37
1.00k
                                               ptrdiff_t stride) \
38
1.00k
{ \
39
1.00k
    ff_##op##_pixels##size##_xy2_##insn(dst, src, stride, size); \
40
1.00k
}
41
42
#if HAVE_X86ASM
43
void ff_put_rv40_chroma_mc8_mmx  (uint8_t *dst, const uint8_t *src,
44
                                  ptrdiff_t stride, int h, int x, int y);
45
void ff_avg_rv40_chroma_mc8_mmxext(uint8_t *dst, const uint8_t *src,
46
                                   ptrdiff_t stride, int h, int x, int y);
47
48
void ff_put_rv40_chroma_mc4_mmx  (uint8_t *dst, const uint8_t *src,
49
                                  ptrdiff_t stride, int h, int x, int y);
50
void ff_avg_rv40_chroma_mc4_mmxext(uint8_t *dst, const uint8_t *src,
51
                                   ptrdiff_t stride, int h, int x, int y);
52
53
#define DECLARE_WEIGHT(opt) \
54
void ff_rv40_weight_func_rnd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
55
                                      int w1, int w2, ptrdiff_t stride); \
56
void ff_rv40_weight_func_rnd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
57
                                      int w1, int w2, ptrdiff_t stride); \
58
void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
59
                                        int w1, int w2, ptrdiff_t stride); \
60
void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
61
                                        int w1, int w2, ptrdiff_t stride);
62
DECLARE_WEIGHT(sse2)
63
DECLARE_WEIGHT(ssse3)
64
65
/** @{ */
66
/**
67
 * Define one qpel function.
68
 * LOOPSIZE must be already set to the number of pixels processed per
69
 * iteration in the inner loop of the called functions.
70
 * COFF(x) must be already defined so as to provide the offset into any
71
 * array of coeffs used by the called function for the qpel position x.
72
 */
73
#define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT)                           \
74
static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst,  \
75
                                                         const uint8_t *src, \
76
62.2k
                                                         ptrdiff_t stride)  \
77
62.2k
{                                                                       \
78
62.2k
    int i;                                                              \
79
62.2k
    if (PH && PV) {                                                     \
80
32.9k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
32.9k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
32.9k
        src -= stride * 2;                                              \
83
32.9k
                                                                        \
84
78.0k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
45.0k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
45.0k
                                     SIZE + 5, HCOFF(PH));              \
87
78.0k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
45.0k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
45.0k
                                         SIZE, SIZE, VCOFF(PV));        \
90
32.9k
    } else if (PV) {                                                    \
91
25.9k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
14.9k
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
14.9k
                                          stride, SIZE, VCOFF(PV));     \
94
18.2k
    } else {                                                            \
95
42.4k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
24.1k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
24.1k
                                          stride, SIZE, HCOFF(PH));     \
98
18.2k
    }                                                                   \
99
62.2k
}
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc01_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc01_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc03_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc03_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc10_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc10_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc11_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc11_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc12_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc12_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc13_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc13_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc21_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc21_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc22_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc22_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc23_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc23_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc30_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc30_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc31_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc31_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel8_mc32_sse2
Unexecuted instantiation: rv40dsp_init.c:put_rv40_qpel16_mc32_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc01_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc01_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc03_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc03_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc10_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc10_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc11_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc11_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc12_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc12_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc13_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc13_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc21_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc21_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc22_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc22_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc23_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc23_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc30_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc30_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc31_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc31_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel8_mc32_sse2
Unexecuted instantiation: rv40dsp_init.c:avg_rv40_qpel16_mc32_sse2
rv40dsp_init.c:put_rv40_qpel8_mc01_ssse3
Line
Count
Source
76
2.57k
                                                         ptrdiff_t stride)  \
77
2.57k
{                                                                       \
78
2.57k
    int i;                                                              \
79
2.57k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.57k
    } else if (PV) {                                                    \
91
5.15k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
2.57k
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
2.57k
                                          stride, SIZE, VCOFF(PV));     \
94
2.57k
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
2.57k
}
rv40dsp_init.c:put_rv40_qpel16_mc01_ssse3
Line
Count
Source
76
1.50k
                                                         ptrdiff_t stride)  \
77
1.50k
{                                                                       \
78
1.50k
    int i;                                                              \
79
1.50k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.50k
    } else if (PV) {                                                    \
91
4.51k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
3.00k
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
3.00k
                                          stride, SIZE, VCOFF(PV));     \
94
1.50k
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.50k
}
rv40dsp_init.c:put_rv40_qpel8_mc03_ssse3
Line
Count
Source
76
3.16k
                                                         ptrdiff_t stride)  \
77
3.16k
{                                                                       \
78
3.16k
    int i;                                                              \
79
3.16k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
3.16k
    } else if (PV) {                                                    \
91
6.32k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
3.16k
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
3.16k
                                          stride, SIZE, VCOFF(PV));     \
94
3.16k
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
3.16k
}
rv40dsp_init.c:put_rv40_qpel16_mc03_ssse3
Line
Count
Source
76
1.75k
                                                         ptrdiff_t stride)  \
77
1.75k
{                                                                       \
78
1.75k
    int i;                                                              \
79
1.75k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.75k
    } else if (PV) {                                                    \
91
5.25k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
3.50k
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
3.50k
                                          stride, SIZE, VCOFF(PV));     \
94
1.75k
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.75k
}
rv40dsp_init.c:put_rv40_qpel8_mc10_ssse3
Line
Count
Source
76
7.26k
                                                         ptrdiff_t stride)  \
77
7.26k
{                                                                       \
78
7.26k
    int i;                                                              \
79
7.26k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
7.26k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
7.26k
    } else {                                                            \
95
14.5k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
7.26k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
7.26k
                                          stride, SIZE, HCOFF(PH));     \
98
7.26k
    }                                                                   \
99
7.26k
}
rv40dsp_init.c:put_rv40_qpel16_mc10_ssse3
Line
Count
Source
76
2.45k
                                                         ptrdiff_t stride)  \
77
2.45k
{                                                                       \
78
2.45k
    int i;                                                              \
79
2.45k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.45k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
2.45k
    } else {                                                            \
95
7.36k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
4.91k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
4.91k
                                          stride, SIZE, HCOFF(PH));     \
98
2.45k
    }                                                                   \
99
2.45k
}
rv40dsp_init.c:put_rv40_qpel8_mc11_ssse3
Line
Count
Source
76
2.71k
                                                         ptrdiff_t stride)  \
77
2.71k
{                                                                       \
78
2.71k
    int i;                                                              \
79
2.71k
    if (PH && PV) {                                                     \
80
2.71k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
2.71k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
2.71k
        src -= stride * 2;                                              \
83
2.71k
                                                                        \
84
5.42k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.71k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.71k
                                     SIZE + 5, HCOFF(PH));              \
87
5.42k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.71k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.71k
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.71k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
2.71k
}
rv40dsp_init.c:put_rv40_qpel16_mc11_ssse3
Line
Count
Source
76
704
                                                         ptrdiff_t stride)  \
77
704
{                                                                       \
78
704
    int i;                                                              \
79
704
    if (PH && PV) {                                                     \
80
704
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
704
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
704
        src -= stride * 2;                                              \
83
704
                                                                        \
84
2.11k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.40k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.40k
                                     SIZE + 5, HCOFF(PH));              \
87
2.11k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.40k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.40k
                                         SIZE, SIZE, VCOFF(PV));        \
90
704
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
704
}
rv40dsp_init.c:put_rv40_qpel8_mc12_ssse3
Line
Count
Source
76
2.61k
                                                         ptrdiff_t stride)  \
77
2.61k
{                                                                       \
78
2.61k
    int i;                                                              \
79
2.61k
    if (PH && PV) {                                                     \
80
2.61k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
2.61k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
2.61k
        src -= stride * 2;                                              \
83
2.61k
                                                                        \
84
5.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.61k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.61k
                                     SIZE + 5, HCOFF(PH));              \
87
5.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.61k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.61k
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.61k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
2.61k
}
rv40dsp_init.c:put_rv40_qpel16_mc12_ssse3
Line
Count
Source
76
1.08k
                                                         ptrdiff_t stride)  \
77
1.08k
{                                                                       \
78
1.08k
    int i;                                                              \
79
1.08k
    if (PH && PV) {                                                     \
80
1.08k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.08k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.08k
        src -= stride * 2;                                              \
83
1.08k
                                                                        \
84
3.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.16k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.16k
                                     SIZE + 5, HCOFF(PH));              \
87
3.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.16k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.16k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.08k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.08k
}
rv40dsp_init.c:put_rv40_qpel8_mc13_ssse3
Line
Count
Source
76
1.58k
                                                         ptrdiff_t stride)  \
77
1.58k
{                                                                       \
78
1.58k
    int i;                                                              \
79
1.58k
    if (PH && PV) {                                                     \
80
1.58k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.58k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.58k
        src -= stride * 2;                                              \
83
1.58k
                                                                        \
84
3.17k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.58k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.58k
                                     SIZE + 5, HCOFF(PH));              \
87
3.17k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.58k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.58k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.58k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.58k
}
rv40dsp_init.c:put_rv40_qpel16_mc13_ssse3
Line
Count
Source
76
795
                                                         ptrdiff_t stride)  \
77
795
{                                                                       \
78
795
    int i;                                                              \
79
795
    if (PH && PV) {                                                     \
80
795
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
795
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
795
        src -= stride * 2;                                              \
83
795
                                                                        \
84
2.38k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.59k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.59k
                                     SIZE + 5, HCOFF(PH));              \
87
2.38k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.59k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.59k
                                         SIZE, SIZE, VCOFF(PV));        \
90
795
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
795
}
rv40dsp_init.c:put_rv40_qpel8_mc21_ssse3
Line
Count
Source
76
1.78k
                                                         ptrdiff_t stride)  \
77
1.78k
{                                                                       \
78
1.78k
    int i;                                                              \
79
1.78k
    if (PH && PV) {                                                     \
80
1.78k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.78k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.78k
        src -= stride * 2;                                              \
83
1.78k
                                                                        \
84
3.56k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.78k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.78k
                                     SIZE + 5, HCOFF(PH));              \
87
3.56k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.78k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.78k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.78k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.78k
}
rv40dsp_init.c:put_rv40_qpel16_mc21_ssse3
Line
Count
Source
76
1.20k
                                                         ptrdiff_t stride)  \
77
1.20k
{                                                                       \
78
1.20k
    int i;                                                              \
79
1.20k
    if (PH && PV) {                                                     \
80
1.20k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.20k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.20k
        src -= stride * 2;                                              \
83
1.20k
                                                                        \
84
3.60k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.40k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.40k
                                     SIZE + 5, HCOFF(PH));              \
87
3.60k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.40k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.40k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.20k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.20k
}
rv40dsp_init.c:put_rv40_qpel8_mc22_ssse3
Line
Count
Source
76
2.30k
                                                         ptrdiff_t stride)  \
77
2.30k
{                                                                       \
78
2.30k
    int i;                                                              \
79
2.30k
    if (PH && PV) {                                                     \
80
2.30k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
2.30k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
2.30k
        src -= stride * 2;                                              \
83
2.30k
                                                                        \
84
4.60k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.30k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.30k
                                     SIZE + 5, HCOFF(PH));              \
87
4.60k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.30k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.30k
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.30k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
2.30k
}
rv40dsp_init.c:put_rv40_qpel16_mc22_ssse3
Line
Count
Source
76
1.63k
                                                         ptrdiff_t stride)  \
77
1.63k
{                                                                       \
78
1.63k
    int i;                                                              \
79
1.63k
    if (PH && PV) {                                                     \
80
1.63k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.63k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.63k
        src -= stride * 2;                                              \
83
1.63k
                                                                        \
84
4.90k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
3.27k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
3.27k
                                     SIZE + 5, HCOFF(PH));              \
87
4.90k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
3.27k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
3.27k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.63k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.63k
}
rv40dsp_init.c:put_rv40_qpel8_mc23_ssse3
Line
Count
Source
76
1.56k
                                                         ptrdiff_t stride)  \
77
1.56k
{                                                                       \
78
1.56k
    int i;                                                              \
79
1.56k
    if (PH && PV) {                                                     \
80
1.56k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.56k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.56k
        src -= stride * 2;                                              \
83
1.56k
                                                                        \
84
3.12k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.56k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.56k
                                     SIZE + 5, HCOFF(PH));              \
87
3.12k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.56k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.56k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.56k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.56k
}
rv40dsp_init.c:put_rv40_qpel16_mc23_ssse3
Line
Count
Source
76
918
                                                         ptrdiff_t stride)  \
77
918
{                                                                       \
78
918
    int i;                                                              \
79
918
    if (PH && PV) {                                                     \
80
918
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
918
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
918
        src -= stride * 2;                                              \
83
918
                                                                        \
84
2.75k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.83k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.83k
                                     SIZE + 5, HCOFF(PH));              \
87
2.75k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.83k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.83k
                                         SIZE, SIZE, VCOFF(PV));        \
90
918
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
918
}
rv40dsp_init.c:put_rv40_qpel8_mc30_ssse3
Line
Count
Source
76
3.44k
                                                         ptrdiff_t stride)  \
77
3.44k
{                                                                       \
78
3.44k
    int i;                                                              \
79
3.44k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
3.44k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
3.44k
    } else {                                                            \
95
6.88k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
3.44k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
3.44k
                                          stride, SIZE, HCOFF(PH));     \
98
3.44k
    }                                                                   \
99
3.44k
}
rv40dsp_init.c:put_rv40_qpel16_mc30_ssse3
Line
Count
Source
76
2.29k
                                                         ptrdiff_t stride)  \
77
2.29k
{                                                                       \
78
2.29k
    int i;                                                              \
79
2.29k
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
2.29k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
2.29k
    } else {                                                            \
95
6.89k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
4.59k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
4.59k
                                          stride, SIZE, HCOFF(PH));     \
98
2.29k
    }                                                                   \
99
2.29k
}
rv40dsp_init.c:put_rv40_qpel8_mc31_ssse3
Line
Count
Source
76
1.71k
                                                         ptrdiff_t stride)  \
77
1.71k
{                                                                       \
78
1.71k
    int i;                                                              \
79
1.71k
    if (PH && PV) {                                                     \
80
1.71k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.71k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.71k
        src -= stride * 2;                                              \
83
1.71k
                                                                        \
84
3.43k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.71k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.71k
                                     SIZE + 5, HCOFF(PH));              \
87
3.43k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.71k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.71k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.71k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.71k
}
rv40dsp_init.c:put_rv40_qpel16_mc31_ssse3
Line
Count
Source
76
1.08k
                                                         ptrdiff_t stride)  \
77
1.08k
{                                                                       \
78
1.08k
    int i;                                                              \
79
1.08k
    if (PH && PV) {                                                     \
80
1.08k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.08k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.08k
        src -= stride * 2;                                              \
83
1.08k
                                                                        \
84
3.26k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.17k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.17k
                                     SIZE + 5, HCOFF(PH));              \
87
3.26k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.17k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.17k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.08k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.08k
}
rv40dsp_init.c:put_rv40_qpel8_mc32_ssse3
Line
Count
Source
76
1.66k
                                                         ptrdiff_t stride)  \
77
1.66k
{                                                                       \
78
1.66k
    int i;                                                              \
79
1.66k
    if (PH && PV) {                                                     \
80
1.66k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.66k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.66k
        src -= stride * 2;                                              \
83
1.66k
                                                                        \
84
3.32k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.66k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.66k
                                     SIZE + 5, HCOFF(PH));              \
87
3.32k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.66k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.66k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.66k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.66k
}
rv40dsp_init.c:put_rv40_qpel16_mc32_ssse3
Line
Count
Source
76
1.25k
                                                         ptrdiff_t stride)  \
77
1.25k
{                                                                       \
78
1.25k
    int i;                                                              \
79
1.25k
    if (PH && PV) {                                                     \
80
1.25k
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
1.25k
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
1.25k
        src -= stride * 2;                                              \
83
1.25k
                                                                        \
84
3.77k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
2.51k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
2.51k
                                     SIZE + 5, HCOFF(PH));              \
87
3.77k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
2.51k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
2.51k
                                         SIZE, SIZE, VCOFF(PV));        \
90
1.25k
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
1.25k
}
rv40dsp_init.c:avg_rv40_qpel8_mc01_ssse3
Line
Count
Source
76
535
                                                         ptrdiff_t stride)  \
77
535
{                                                                       \
78
535
    int i;                                                              \
79
535
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
535
    } else if (PV) {                                                    \
91
1.07k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
535
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
535
                                          stride, SIZE, VCOFF(PV));     \
94
535
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
535
}
rv40dsp_init.c:avg_rv40_qpel16_mc01_ssse3
Line
Count
Source
76
427
                                                         ptrdiff_t stride)  \
77
427
{                                                                       \
78
427
    int i;                                                              \
79
427
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
427
    } else if (PV) {                                                    \
91
1.28k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
854
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
854
                                          stride, SIZE, VCOFF(PV));     \
94
427
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
427
}
rv40dsp_init.c:avg_rv40_qpel8_mc03_ssse3
Line
Count
Source
76
746
                                                         ptrdiff_t stride)  \
77
746
{                                                                       \
78
746
    int i;                                                              \
79
746
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
746
    } else if (PV) {                                                    \
91
1.49k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
746
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
746
                                          stride, SIZE, VCOFF(PV));     \
94
746
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
746
}
rv40dsp_init.c:avg_rv40_qpel16_mc03_ssse3
Line
Count
Source
76
303
                                                         ptrdiff_t stride)  \
77
303
{                                                                       \
78
303
    int i;                                                              \
79
303
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
303
    } else if (PV) {                                                    \
91
909
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
606
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
606
                                          stride, SIZE, VCOFF(PV));     \
94
303
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
303
}
rv40dsp_init.c:avg_rv40_qpel8_mc10_ssse3
Line
Count
Source
76
955
                                                         ptrdiff_t stride)  \
77
955
{                                                                       \
78
955
    int i;                                                              \
79
955
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
955
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
955
    } else {                                                            \
95
1.91k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
955
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
955
                                          stride, SIZE, HCOFF(PH));     \
98
955
    }                                                                   \
99
955
}
rv40dsp_init.c:avg_rv40_qpel16_mc10_ssse3
Line
Count
Source
76
744
                                                         ptrdiff_t stride)  \
77
744
{                                                                       \
78
744
    int i;                                                              \
79
744
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
744
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
744
    } else {                                                            \
95
2.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
1.48k
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
1.48k
                                          stride, SIZE, HCOFF(PH));     \
98
744
    }                                                                   \
99
744
}
rv40dsp_init.c:avg_rv40_qpel8_mc11_ssse3
Line
Count
Source
76
639
                                                         ptrdiff_t stride)  \
77
639
{                                                                       \
78
639
    int i;                                                              \
79
639
    if (PH && PV) {                                                     \
80
639
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
639
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
639
        src -= stride * 2;                                              \
83
639
                                                                        \
84
1.27k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
639
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
639
                                     SIZE + 5, HCOFF(PH));              \
87
1.27k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
639
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
639
                                         SIZE, SIZE, VCOFF(PV));        \
90
639
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
639
}
rv40dsp_init.c:avg_rv40_qpel16_mc11_ssse3
Line
Count
Source
76
748
                                                         ptrdiff_t stride)  \
77
748
{                                                                       \
78
748
    int i;                                                              \
79
748
    if (PH && PV) {                                                     \
80
748
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
748
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
748
        src -= stride * 2;                                              \
83
748
                                                                        \
84
2.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
1.49k
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
1.49k
                                     SIZE + 5, HCOFF(PH));              \
87
2.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
1.49k
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
1.49k
                                         SIZE, SIZE, VCOFF(PV));        \
90
748
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
748
}
rv40dsp_init.c:avg_rv40_qpel8_mc12_ssse3
Line
Count
Source
76
374
                                                         ptrdiff_t stride)  \
77
374
{                                                                       \
78
374
    int i;                                                              \
79
374
    if (PH && PV) {                                                     \
80
374
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
374
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
374
        src -= stride * 2;                                              \
83
374
                                                                        \
84
748
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
374
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
374
                                     SIZE + 5, HCOFF(PH));              \
87
748
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
374
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
374
                                         SIZE, SIZE, VCOFF(PV));        \
90
374
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
374
}
rv40dsp_init.c:avg_rv40_qpel16_mc12_ssse3
Line
Count
Source
76
445
                                                         ptrdiff_t stride)  \
77
445
{                                                                       \
78
445
    int i;                                                              \
79
445
    if (PH && PV) {                                                     \
80
445
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
445
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
445
        src -= stride * 2;                                              \
83
445
                                                                        \
84
1.33k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
890
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
890
                                     SIZE + 5, HCOFF(PH));              \
87
1.33k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
890
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
890
                                         SIZE, SIZE, VCOFF(PV));        \
90
445
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
445
}
rv40dsp_init.c:avg_rv40_qpel8_mc13_ssse3
Line
Count
Source
76
950
                                                         ptrdiff_t stride)  \
77
950
{                                                                       \
78
950
    int i;                                                              \
79
950
    if (PH && PV) {                                                     \
80
950
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
950
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
950
        src -= stride * 2;                                              \
83
950
                                                                        \
84
1.90k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
950
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
950
                                     SIZE + 5, HCOFF(PH));              \
87
1.90k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
950
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
950
                                         SIZE, SIZE, VCOFF(PV));        \
90
950
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
950
}
rv40dsp_init.c:avg_rv40_qpel16_mc13_ssse3
Line
Count
Source
76
308
                                                         ptrdiff_t stride)  \
77
308
{                                                                       \
78
308
    int i;                                                              \
79
308
    if (PH && PV) {                                                     \
80
308
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
308
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
308
        src -= stride * 2;                                              \
83
308
                                                                        \
84
924
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
616
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
616
                                     SIZE + 5, HCOFF(PH));              \
87
924
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
616
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
616
                                         SIZE, SIZE, VCOFF(PV));        \
90
308
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
308
}
rv40dsp_init.c:avg_rv40_qpel8_mc21_ssse3
Line
Count
Source
76
632
                                                         ptrdiff_t stride)  \
77
632
{                                                                       \
78
632
    int i;                                                              \
79
632
    if (PH && PV) {                                                     \
80
632
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
632
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
632
        src -= stride * 2;                                              \
83
632
                                                                        \
84
1.26k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
632
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
632
                                     SIZE + 5, HCOFF(PH));              \
87
1.26k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
632
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
632
                                         SIZE, SIZE, VCOFF(PV));        \
90
632
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
632
}
rv40dsp_init.c:avg_rv40_qpel16_mc21_ssse3
Line
Count
Source
76
287
                                                         ptrdiff_t stride)  \
77
287
{                                                                       \
78
287
    int i;                                                              \
79
287
    if (PH && PV) {                                                     \
80
287
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
287
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
287
        src -= stride * 2;                                              \
83
287
                                                                        \
84
861
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
574
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
574
                                     SIZE + 5, HCOFF(PH));              \
87
861
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
574
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
574
                                         SIZE, SIZE, VCOFF(PV));        \
90
287
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
287
}
rv40dsp_init.c:avg_rv40_qpel8_mc22_ssse3
Line
Count
Source
76
523
                                                         ptrdiff_t stride)  \
77
523
{                                                                       \
78
523
    int i;                                                              \
79
523
    if (PH && PV) {                                                     \
80
523
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
523
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
523
        src -= stride * 2;                                              \
83
523
                                                                        \
84
1.04k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
523
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
523
                                     SIZE + 5, HCOFF(PH));              \
87
1.04k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
523
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
523
                                         SIZE, SIZE, VCOFF(PV));        \
90
523
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
523
}
rv40dsp_init.c:avg_rv40_qpel16_mc22_ssse3
Line
Count
Source
76
411
                                                         ptrdiff_t stride)  \
77
411
{                                                                       \
78
411
    int i;                                                              \
79
411
    if (PH && PV) {                                                     \
80
411
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
411
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
411
        src -= stride * 2;                                              \
83
411
                                                                        \
84
1.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
822
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
822
                                     SIZE + 5, HCOFF(PH));              \
87
1.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
822
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
822
                                         SIZE, SIZE, VCOFF(PV));        \
90
411
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
411
}
rv40dsp_init.c:avg_rv40_qpel8_mc23_ssse3
Line
Count
Source
76
566
                                                         ptrdiff_t stride)  \
77
566
{                                                                       \
78
566
    int i;                                                              \
79
566
    if (PH && PV) {                                                     \
80
566
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
566
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
566
        src -= stride * 2;                                              \
83
566
                                                                        \
84
1.13k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
566
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
566
                                     SIZE + 5, HCOFF(PH));              \
87
1.13k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
566
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
566
                                         SIZE, SIZE, VCOFF(PV));        \
90
566
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
566
}
rv40dsp_init.c:avg_rv40_qpel16_mc23_ssse3
Line
Count
Source
76
490
                                                         ptrdiff_t stride)  \
77
490
{                                                                       \
78
490
    int i;                                                              \
79
490
    if (PH && PV) {                                                     \
80
490
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
490
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
490
        src -= stride * 2;                                              \
83
490
                                                                        \
84
1.47k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
980
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
980
                                     SIZE + 5, HCOFF(PH));              \
87
1.47k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
980
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
980
                                         SIZE, SIZE, VCOFF(PV));        \
90
490
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
490
}
rv40dsp_init.c:avg_rv40_qpel8_mc30_ssse3
Line
Count
Source
76
637
                                                         ptrdiff_t stride)  \
77
637
{                                                                       \
78
637
    int i;                                                              \
79
637
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
637
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
637
    } else {                                                            \
95
1.27k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
637
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
637
                                          stride, SIZE, HCOFF(PH));     \
98
637
    }                                                                   \
99
637
}
rv40dsp_init.c:avg_rv40_qpel16_mc30_ssse3
Line
Count
Source
76
451
                                                         ptrdiff_t stride)  \
77
451
{                                                                       \
78
451
    int i;                                                              \
79
451
    if (PH && PV) {                                                     \
80
0
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
0
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
0
        src -= stride * 2;                                              \
83
0
                                                                        \
84
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
0
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
0
                                     SIZE + 5, HCOFF(PH));              \
87
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
0
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
0
                                         SIZE, SIZE, VCOFF(PV));        \
90
451
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
451
    } else {                                                            \
95
1.35k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
902
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
902
                                          stride, SIZE, HCOFF(PH));     \
98
451
    }                                                                   \
99
451
}
rv40dsp_init.c:avg_rv40_qpel8_mc31_ssse3
Line
Count
Source
76
620
                                                         ptrdiff_t stride)  \
77
620
{                                                                       \
78
620
    int i;                                                              \
79
620
    if (PH && PV) {                                                     \
80
620
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
620
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
620
        src -= stride * 2;                                              \
83
620
                                                                        \
84
1.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
620
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
620
                                     SIZE + 5, HCOFF(PH));              \
87
1.24k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
620
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
620
                                         SIZE, SIZE, VCOFF(PV));        \
90
620
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
620
}
rv40dsp_init.c:avg_rv40_qpel16_mc31_ssse3
Line
Count
Source
76
410
                                                         ptrdiff_t stride)  \
77
410
{                                                                       \
78
410
    int i;                                                              \
79
410
    if (PH && PV) {                                                     \
80
410
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
410
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
410
        src -= stride * 2;                                              \
83
410
                                                                        \
84
1.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
820
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
820
                                     SIZE + 5, HCOFF(PH));              \
87
1.23k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
820
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
820
                                         SIZE, SIZE, VCOFF(PV));        \
90
410
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
410
}
rv40dsp_init.c:avg_rv40_qpel8_mc32_ssse3
Line
Count
Source
76
690
                                                         ptrdiff_t stride)  \
77
690
{                                                                       \
78
690
    int i;                                                              \
79
690
    if (PH && PV) {                                                     \
80
690
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
690
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
690
        src -= stride * 2;                                              \
83
690
                                                                        \
84
1.38k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
690
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
690
                                     SIZE + 5, HCOFF(PH));              \
87
1.38k
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
690
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
690
                                         SIZE, SIZE, VCOFF(PV));        \
90
690
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
690
}
rv40dsp_init.c:avg_rv40_qpel16_mc32_ssse3
Line
Count
Source
76
285
                                                         ptrdiff_t stride)  \
77
285
{                                                                       \
78
285
    int i;                                                              \
79
285
    if (PH && PV) {                                                     \
80
285
        LOCAL_ALIGNED(16, uint8_t, tmp, [SIZE * (SIZE + 5)]);           \
81
285
        uint8_t *tmpptr = tmp + SIZE * 2;                               \
82
285
        src -= stride * 2;                                              \
83
285
                                                                        \
84
855
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
85
570
            ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride,    \
86
570
                                     SIZE + 5, HCOFF(PH));              \
87
855
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
88
570
            ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i,   \
89
570
                                         SIZE, SIZE, VCOFF(PV));        \
90
285
    } else if (PV) {                                                    \
91
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
92
0
            ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i,     \
93
0
                                          stride, SIZE, VCOFF(PV));     \
94
0
    } else {                                                            \
95
0
        for (i = 0; i < SIZE; i += LOOPSIZE)                            \
96
0
            ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i,     \
97
0
                                          stride, SIZE, HCOFF(PH));     \
98
0
    }                                                                   \
99
285
}
100
101
/** Declare functions for sizes 8 and 16 and given operations
102
 *  and qpel position. */
103
#define QPEL_FUNCS_DECL(OP, PH, PV, OPT) \
104
    QPEL_FUNC_DECL(OP,  8, PH, PV, OPT)  \
105
    QPEL_FUNC_DECL(OP, 16, PH, PV, OPT)
106
107
/** Declare all functions for all sizes and qpel positions */
108
#define QPEL_MC_DECL(OP, OPT)                                           \
109
void ff_ ##OP ##rv40_qpel_h ##OPT(uint8_t *dst, ptrdiff_t dstStride,    \
110
                                  const uint8_t *src,                   \
111
                                  ptrdiff_t srcStride,                  \
112
                                  int len, int m);                      \
113
void ff_ ##OP ##rv40_qpel_v ##OPT(uint8_t *dst, ptrdiff_t dstStride,    \
114
                                  const uint8_t *src,                   \
115
                                  ptrdiff_t srcStride,                  \
116
                                  int len, int m);                      \
117
QPEL_FUNCS_DECL(OP, 0, 1, OPT)                                          \
118
QPEL_FUNCS_DECL(OP, 0, 3, OPT)                                          \
119
QPEL_FUNCS_DECL(OP, 1, 0, OPT)                                          \
120
QPEL_FUNCS_DECL(OP, 1, 1, OPT)                                          \
121
QPEL_FUNCS_DECL(OP, 1, 2, OPT)                                          \
122
QPEL_FUNCS_DECL(OP, 1, 3, OPT)                                          \
123
QPEL_FUNCS_DECL(OP, 2, 1, OPT)                                          \
124
QPEL_FUNCS_DECL(OP, 2, 2, OPT)                                          \
125
QPEL_FUNCS_DECL(OP, 2, 3, OPT)                                          \
126
QPEL_FUNCS_DECL(OP, 3, 0, OPT)                                          \
127
QPEL_FUNCS_DECL(OP, 3, 1, OPT)                                          \
128
QPEL_FUNCS_DECL(OP, 3, 2, OPT)
129
/** @} */
130
131
129k
#define LOOPSIZE  8
132
69.2k
#define HCOFF(x)  (32 * ((x) - 1))
133
60.0k
#define VCOFF(x)  (32 * ((x) - 1))
134
QPEL_MC_DECL(put_, _ssse3)
135
QPEL_MC_DECL(avg_, _ssse3)
136
137
#undef LOOPSIZE
138
#undef HCOFF
139
#undef VCOFF
140
0
#define LOOPSIZE  8
141
0
#define HCOFF(x)  (64 * ((x) - 1))
142
0
#define VCOFF(x)  (64 * ((x) - 1))
143
QPEL_MC_DECL(put_, _sse2)
144
QPEL_MC_DECL(avg_, _sse2)
145
146
/** @{ */
147
/** Set one function */
148
#define QPEL_FUNC_SET(OP, SIZE, PH, PV, OPT)                            \
149
459k
    c-> OP ## pixels_tab[2 - SIZE / 8][4 * PV + PH] = OP ## rv40_qpel ##SIZE ## _mc ##PH ##PV ##OPT;
150
151
/** Set functions put and avg for sizes 8 and 16 and a given qpel position */
152
#define QPEL_FUNCS_SET(OP, PH, PV, OPT)         \
153
229k
    QPEL_FUNC_SET(OP,  8, PH, PV, OPT)          \
154
229k
    QPEL_FUNC_SET(OP, 16, PH, PV, OPT)
155
156
/** Set all functions for all sizes and qpel positions */
157
19.1k
#define QPEL_MC_SET(OP, OPT)   \
158
19.1k
QPEL_FUNCS_SET (OP, 0, 1, OPT) \
159
19.1k
QPEL_FUNCS_SET (OP, 0, 3, OPT) \
160
19.1k
QPEL_FUNCS_SET (OP, 1, 0, OPT) \
161
19.1k
QPEL_FUNCS_SET (OP, 1, 1, OPT) \
162
19.1k
QPEL_FUNCS_SET (OP, 1, 2, OPT) \
163
19.1k
QPEL_FUNCS_SET (OP, 1, 3, OPT) \
164
19.1k
QPEL_FUNCS_SET (OP, 2, 1, OPT) \
165
19.1k
QPEL_FUNCS_SET (OP, 2, 2, OPT) \
166
19.1k
QPEL_FUNCS_SET (OP, 2, 3, OPT) \
167
19.1k
QPEL_FUNCS_SET (OP, 3, 0, OPT) \
168
19.1k
QPEL_FUNCS_SET (OP, 3, 1, OPT) \
169
19.1k
QPEL_FUNCS_SET (OP, 3, 2, OPT)
170
/** @} */
171
172
DEFINE_FN(put, 8, ssse3)
173
174
DEFINE_FN(put, 16, sse2)
175
DEFINE_FN(put, 16, ssse3)
176
177
DEFINE_FN(avg, 8, mmxext)
178
DEFINE_FN(avg, 8, ssse3)
179
180
DEFINE_FN(avg, 16, sse2)
181
DEFINE_FN(avg, 16, ssse3)
182
#endif /* HAVE_X86ASM */
183
184
#if HAVE_MMX_INLINE
185
DEFINE_FN(put, 8, mmx)
186
#endif
187
188
av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c)
189
5.99k
{
190
5.99k
    av_unused int cpu_flags = av_get_cpu_flags();
191
192
5.99k
#if HAVE_MMX_INLINE
193
5.99k
    if (INLINE_MMX(cpu_flags)) {
194
4.78k
        c->put_pixels_tab[1][15] = put_rv40_qpel8_mc33_mmx;
195
4.78k
    }
196
5.99k
#endif /* HAVE_MMX_INLINE */
197
198
5.99k
#if HAVE_X86ASM
199
5.99k
    if (EXTERNAL_MMX(cpu_flags)) {
200
4.78k
        c->put_chroma_pixels_tab[0] = ff_put_rv40_chroma_mc8_mmx;
201
4.78k
        c->put_chroma_pixels_tab[1] = ff_put_rv40_chroma_mc4_mmx;
202
4.78k
    }
203
5.99k
    if (EXTERNAL_MMXEXT(cpu_flags)) {
204
4.78k
        c->avg_pixels_tab[1][15]        = avg_rv40_qpel8_mc33_mmxext;
205
4.78k
        c->avg_chroma_pixels_tab[0]     = ff_avg_rv40_chroma_mc8_mmxext;
206
4.78k
        c->avg_chroma_pixels_tab[1]     = ff_avg_rv40_chroma_mc4_mmxext;
207
4.78k
    }
208
5.99k
    if (EXTERNAL_SSE2(cpu_flags)) {
209
4.78k
        c->put_pixels_tab[0][15]        = put_rv40_qpel16_mc33_sse2;
210
4.78k
        c->avg_pixels_tab[0][15]        = avg_rv40_qpel16_mc33_sse2;
211
4.78k
        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_sse2;
212
4.78k
        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_sse2;
213
4.78k
        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_sse2;
214
4.78k
        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_sse2;
215
4.78k
        QPEL_MC_SET(put_, _sse2)
216
4.78k
        QPEL_MC_SET(avg_, _sse2)
217
4.78k
    }
218
5.99k
    if (EXTERNAL_SSSE3(cpu_flags)) {
219
4.78k
        c->put_pixels_tab[0][15]        = put_rv40_qpel16_mc33_ssse3;
220
4.78k
        c->put_pixels_tab[1][15]        = put_rv40_qpel8_mc33_ssse3;
221
4.78k
        c->avg_pixels_tab[0][15]        = avg_rv40_qpel16_mc33_ssse3;
222
4.78k
        c->avg_pixels_tab[1][15]        = avg_rv40_qpel8_mc33_ssse3;
223
4.78k
        c->rv40_weight_pixels_tab[0][0] = ff_rv40_weight_func_rnd_16_ssse3;
224
4.78k
        c->rv40_weight_pixels_tab[0][1] = ff_rv40_weight_func_rnd_8_ssse3;
225
4.78k
        c->rv40_weight_pixels_tab[1][0] = ff_rv40_weight_func_nornd_16_ssse3;
226
4.78k
        c->rv40_weight_pixels_tab[1][1] = ff_rv40_weight_func_nornd_8_ssse3;
227
4.78k
        QPEL_MC_SET(put_, _ssse3)
228
4.78k
        QPEL_MC_SET(avg_, _ssse3)
229
4.78k
    }
230
5.99k
#endif /* HAVE_X86ASM */
231
5.99k
}