/src/ffmpeg/libavcodec/dirac_dwt_template.c
Line | Count | Source |
1 | | /* |
2 | | * Copyright (C) 2004-2010 Michael Niedermayer <michaelni@gmx.at> |
3 | | * Copyright (C) 2008 David Conrad |
4 | | * Copyright (C) 2015 Open Broadcast Systems Ltd. |
5 | | * Author (C) 2015 Rostislav Pehlivanov <atomnuker@gmail.com> |
6 | | * |
7 | | * This file is part of FFmpeg. |
8 | | * |
9 | | * FFmpeg is free software; you can redistribute it and/or |
10 | | * modify it under the terms of the GNU Lesser General Public |
11 | | * License as published by the Free Software Foundation; either |
12 | | * version 2.1 of the License, or (at your option) any later version. |
13 | | * |
14 | | * FFmpeg is distributed in the hope that it will be useful, |
15 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | | * Lesser General Public License for more details. |
18 | | * |
19 | | * You should have received a copy of the GNU Lesser General Public |
20 | | * License along with FFmpeg; if not, write to the Free Software |
21 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | | */ |
23 | | |
24 | | #if defined(TEMPLATE_8bit) |
25 | | |
26 | 7.90k | # define RENAME(N) N ## _8bit |
27 | 91.2M | # define TYPE int16_t |
28 | | # undef TEMPLATE_8bit |
29 | | |
30 | | #elif defined(TEMPLATE_10bit) |
31 | | |
32 | 8.58k | # define RENAME(N) N ## _10bit |
33 | 59.5M | # define TYPE int32_t |
34 | | # undef TEMPLATE_10bit |
35 | | |
36 | | #elif defined(TEMPLATE_12bit) |
37 | | |
38 | 4.54k | # define RENAME(N) N ## _12bit |
39 | 66.2M | # define TYPE int32_t |
40 | | # undef TEMPLATE_12bit |
41 | | |
42 | | #endif |
43 | | |
44 | | static void RENAME(vertical_compose53iL0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, |
45 | | int width) |
46 | 4.56M | { |
47 | 4.56M | int i; |
48 | 4.56M | TYPE *b0 = (TYPE *)_b0; |
49 | 4.56M | TYPE *b1 = (TYPE *)_b1; |
50 | 4.56M | TYPE *b2 = (TYPE *)_b2; |
51 | 847M | for (i = 0; i < width; i++) |
52 | 843M | b1[i] -= (unsigned)((int)(b0[i] + (unsigned)b2[i] + 2) >> 2); |
53 | 4.56M | } dirac_dwt.c:vertical_compose53iL0_8bit Line | Count | Source | 46 | 1.75M | { | 47 | 1.75M | int i; | 48 | 1.75M | TYPE *b0 = (TYPE *)_b0; | 49 | 1.75M | TYPE *b1 = (TYPE *)_b1; | 50 | 1.75M | TYPE *b2 = (TYPE *)_b2; | 51 | 345M | for (i = 0; i < width; i++) | 52 | 344M | b1[i] -= (unsigned)((int)(b0[i] + (unsigned)b2[i] + 2) >> 2); | 53 | 1.75M | } |
dirac_dwt.c:vertical_compose53iL0_10bit Line | Count | Source | 46 | 1.54M | { | 47 | 1.54M | int i; | 48 | 1.54M | TYPE *b0 = (TYPE *)_b0; | 49 | 1.54M | TYPE *b1 = (TYPE *)_b1; | 50 | 1.54M | TYPE *b2 = (TYPE *)_b2; | 51 | 463M | for (i = 0; i < width; i++) | 52 | 461M | b1[i] -= (unsigned)((int)(b0[i] + (unsigned)b2[i] + 2) >> 2); | 53 | 1.54M | } |
dirac_dwt.c:vertical_compose53iL0_12bit Line | Count | Source | 46 | 1.25M | { | 47 | 1.25M | int i; | 48 | 1.25M | TYPE *b0 = (TYPE *)_b0; | 49 | 1.25M | TYPE *b1 = (TYPE *)_b1; | 50 | 1.25M | TYPE *b2 = (TYPE *)_b2; | 51 | 38.5M | for (i = 0; i < width; i++) | 52 | 37.2M | b1[i] -= (unsigned)((int)(b0[i] + (unsigned)b2[i] + 2) >> 2); | 53 | 1.25M | } |
|
54 | | |
55 | | static av_always_inline void RENAME(interleave)(TYPE *dst, TYPE *src0, TYPE *src1, int w2, |
56 | | int add, int shift) |
57 | 16.3M | { |
58 | 16.3M | int i; |
59 | 1.00G | for (i = 0; i < w2; i++) { |
60 | 990M | dst[2*i ] = ((int)(src0[i] + (unsigned)add)) >> shift; |
61 | 990M | dst[2*i+1] = ((int)(src1[i] + (unsigned)add)) >> shift; |
62 | 990M | } |
63 | 16.3M | } dirac_dwt.c:interleave_8bit Line | Count | Source | 57 | 6.69M | { | 58 | 6.69M | int i; | 59 | 501M | for (i = 0; i < w2; i++) { | 60 | 495M | dst[2*i ] = ((int)(src0[i] + (unsigned)add)) >> shift; | 61 | 495M | dst[2*i+1] = ((int)(src1[i] + (unsigned)add)) >> shift; | 62 | 495M | } | 63 | 6.69M | } |
dirac_dwt.c:interleave_10bit Line | Count | Source | 57 | 5.14M | { | 58 | 5.14M | int i; | 59 | 421M | for (i = 0; i < w2; i++) { | 60 | 416M | dst[2*i ] = ((int)(src0[i] + (unsigned)add)) >> shift; | 61 | 416M | dst[2*i+1] = ((int)(src1[i] + (unsigned)add)) >> shift; | 62 | 416M | } | 63 | 5.14M | } |
dirac_dwt.c:interleave_12bit Line | Count | Source | 57 | 4.51M | { | 58 | 4.51M | int i; | 59 | 83.5M | for (i = 0; i < w2; i++) { | 60 | 79.0M | dst[2*i ] = ((int)(src0[i] + (unsigned)add)) >> shift; | 61 | 79.0M | dst[2*i+1] = ((int)(src1[i] + (unsigned)add)) >> shift; | 62 | 79.0M | } | 63 | 4.51M | } |
|
64 | | |
65 | | static void RENAME(horizontal_compose_dirac53i)(uint8_t *_b, uint8_t *_temp, int w) |
66 | 5.65M | { |
67 | 5.65M | int x; |
68 | 5.65M | const int w2 = w >> 1; |
69 | 5.65M | TYPE *b = (TYPE *)_b; |
70 | 5.65M | TYPE *temp = (TYPE *)_temp; |
71 | | |
72 | 5.65M | temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); |
73 | 492M | for (x = 1; x < w2; x++) { |
74 | 487M | temp[x ] = COMPOSE_53iL0 (b[x+w2-1], b[x ], b[x+w2]); |
75 | 487M | temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]); |
76 | 487M | } |
77 | 5.65M | temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]); |
78 | | |
79 | 5.65M | RENAME(interleave)(b, temp, temp+w2, w2, 1, 1); |
80 | 5.65M | } dirac_dwt.c:horizontal_compose_dirac53i_8bit Line | Count | Source | 66 | 2.46M | { | 67 | 2.46M | int x; | 68 | 2.46M | const int w2 = w >> 1; | 69 | 2.46M | TYPE *b = (TYPE *)_b; | 70 | 2.46M | TYPE *temp = (TYPE *)_temp; | 71 | | | 72 | 2.46M | temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 73 | 262M | for (x = 1; x < w2; x++) { | 74 | 260M | temp[x ] = COMPOSE_53iL0 (b[x+w2-1], b[x ], b[x+w2]); | 75 | 260M | temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]); | 76 | 260M | } | 77 | 2.46M | temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]); | 78 | | | 79 | 2.46M | RENAME(interleave)(b, temp, temp+w2, w2, 1, 1); | 80 | 2.46M | } |
dirac_dwt.c:horizontal_compose_dirac53i_10bit Line | Count | Source | 66 | 2.08M | { | 67 | 2.08M | int x; | 68 | 2.08M | const int w2 = w >> 1; | 69 | 2.08M | TYPE *b = (TYPE *)_b; | 70 | 2.08M | TYPE *temp = (TYPE *)_temp; | 71 | | | 72 | 2.08M | temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 73 | 204M | for (x = 1; x < w2; x++) { | 74 | 202M | temp[x ] = COMPOSE_53iL0 (b[x+w2-1], b[x ], b[x+w2]); | 75 | 202M | temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]); | 76 | 202M | } | 77 | 2.08M | temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]); | 78 | | | 79 | 2.08M | RENAME(interleave)(b, temp, temp+w2, w2, 1, 1); | 80 | 2.08M | } |
dirac_dwt.c:horizontal_compose_dirac53i_12bit Line | Count | Source | 66 | 1.10M | { | 67 | 1.10M | int x; | 68 | 1.10M | const int w2 = w >> 1; | 69 | 1.10M | TYPE *b = (TYPE *)_b; | 70 | 1.10M | TYPE *temp = (TYPE *)_temp; | 71 | | | 72 | 1.10M | temp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 73 | 25.7M | for (x = 1; x < w2; x++) { | 74 | 24.6M | temp[x ] = COMPOSE_53iL0 (b[x+w2-1], b[x ], b[x+w2]); | 75 | 24.6M | temp[x+w2-1] = COMPOSE_DIRAC53iH0(temp[x-1], b[x+w2-1], temp[x]); | 76 | 24.6M | } | 77 | 1.10M | temp[w-1] = COMPOSE_DIRAC53iH0(temp[w2-1], b[w-1], temp[w2-1]); | 78 | | | 79 | 1.10M | RENAME(interleave)(b, temp, temp+w2, w2, 1, 1); | 80 | 1.10M | } |
|
81 | | |
82 | | static void RENAME(horizontal_compose_dd97i)(uint8_t *_b, uint8_t *_tmp, int w) |
83 | 3.47M | { |
84 | 3.47M | int x; |
85 | 3.47M | const int w2 = w >> 1; |
86 | 3.47M | TYPE *b = (TYPE *)_b; |
87 | 3.47M | TYPE *tmp = (TYPE *)_tmp; |
88 | | |
89 | 3.47M | tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); |
90 | 350M | for (x = 1; x < w2; x++) |
91 | 346M | tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]); |
92 | | |
93 | | // extend the edges |
94 | 3.47M | tmp[-1] = tmp[0]; |
95 | 3.47M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; |
96 | | |
97 | 353M | for (x = 0; x < w2; x++) { |
98 | 350M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; |
99 | 350M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; |
100 | 350M | } |
101 | 3.47M | } dirac_dwt.c:horizontal_compose_dd97i_8bit Line | Count | Source | 83 | 1.04M | { | 84 | 1.04M | int x; | 85 | 1.04M | const int w2 = w >> 1; | 86 | 1.04M | TYPE *b = (TYPE *)_b; | 87 | 1.04M | TYPE *tmp = (TYPE *)_tmp; | 88 | | | 89 | 1.04M | tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 90 | 81.3M | for (x = 1; x < w2; x++) | 91 | 80.3M | tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]); | 92 | | | 93 | | // extend the edges | 94 | 1.04M | tmp[-1] = tmp[0]; | 95 | 1.04M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 96 | | | 97 | 82.4M | for (x = 0; x < w2; x++) { | 98 | 81.3M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 99 | 81.3M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 100 | 81.3M | } | 101 | 1.04M | } |
dirac_dwt.c:horizontal_compose_dd97i_10bit Line | Count | Source | 83 | 1.01M | { | 84 | 1.01M | int x; | 85 | 1.01M | const int w2 = w >> 1; | 86 | 1.01M | TYPE *b = (TYPE *)_b; | 87 | 1.01M | TYPE *tmp = (TYPE *)_tmp; | 88 | | | 89 | 1.01M | tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 90 | 257M | for (x = 1; x < w2; x++) | 91 | 256M | tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]); | 92 | | | 93 | | // extend the edges | 94 | 1.01M | tmp[-1] = tmp[0]; | 95 | 1.01M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 96 | | | 97 | 258M | for (x = 0; x < w2; x++) { | 98 | 257M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 99 | 257M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 100 | 257M | } | 101 | 1.01M | } |
dirac_dwt.c:horizontal_compose_dd97i_12bit Line | Count | Source | 83 | 1.41M | { | 84 | 1.41M | int x; | 85 | 1.41M | const int w2 = w >> 1; | 86 | 1.41M | TYPE *b = (TYPE *)_b; | 87 | 1.41M | TYPE *tmp = (TYPE *)_tmp; | 88 | | | 89 | 1.41M | tmp[0] = COMPOSE_53iL0(b[w2], b[0], b[w2]); | 90 | 11.4M | for (x = 1; x < w2; x++) | 91 | 9.99M | tmp[x] = COMPOSE_53iL0(b[x+w2-1], b[x], b[x+w2]); | 92 | | | 93 | | // extend the edges | 94 | 1.41M | tmp[-1] = tmp[0]; | 95 | 1.41M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 96 | | | 97 | 12.8M | for (x = 0; x < w2; x++) { | 98 | 11.4M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 99 | 11.4M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 100 | 11.4M | } | 101 | 1.41M | } |
|
102 | | |
103 | | static void RENAME(horizontal_compose_dd137i)(uint8_t *_b, uint8_t *_tmp, int w) |
104 | 7.77M | { |
105 | 7.77M | const int w2 = w >> 1; |
106 | 7.77M | int x; |
107 | 7.77M | TYPE *b = (TYPE *)_b; |
108 | 7.77M | TYPE *tmp = (TYPE *)_tmp; |
109 | | |
110 | 7.77M | tmp[0] = COMPOSE_DD137iL0(b[w2], b[w2], b[0], b[w2 ], b[w2+1]); |
111 | 7.77M | tmp[1] = COMPOSE_DD137iL0(b[w2], b[w2], b[1], b[w2+1], b[w2+2]); |
112 | 570M | for (x = 2; x < w2-1; x++) |
113 | 562M | tmp[x] = COMPOSE_DD137iL0(b[x+w2-2], b[x+w2-1], b[x], b[x+w2], b[x+w2+1]); |
114 | 7.77M | tmp[w2-1] = COMPOSE_DD137iL0(b[w-3], b[w-2], b[w2-1], b[w-1], b[w-1]); |
115 | | |
116 | | // extend the edges |
117 | 7.77M | tmp[-1] = tmp[0]; |
118 | 7.77M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; |
119 | | |
120 | 587M | for (x = 0; x < w2; x++) { |
121 | 580M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; |
122 | 580M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; |
123 | 580M | } |
124 | 7.77M | } dirac_dwt.c:horizontal_compose_dd137i_8bit Line | Count | Source | 104 | 4.52M | { | 105 | 4.52M | const int w2 = w >> 1; | 106 | 4.52M | int x; | 107 | 4.52M | TYPE *b = (TYPE *)_b; | 108 | 4.52M | TYPE *tmp = (TYPE *)_tmp; | 109 | | | 110 | 4.52M | tmp[0] = COMPOSE_DD137iL0(b[w2], b[w2], b[0], b[w2 ], b[w2+1]); | 111 | 4.52M | tmp[1] = COMPOSE_DD137iL0(b[w2], b[w2], b[1], b[w2+1], b[w2+2]); | 112 | 114M | for (x = 2; x < w2-1; x++) | 113 | 109M | tmp[x] = COMPOSE_DD137iL0(b[x+w2-2], b[x+w2-1], b[x], b[x+w2], b[x+w2+1]); | 114 | 4.52M | tmp[w2-1] = COMPOSE_DD137iL0(b[w-3], b[w-2], b[w2-1], b[w-1], b[w-1]); | 115 | | | 116 | | // extend the edges | 117 | 4.52M | tmp[-1] = tmp[0]; | 118 | 4.52M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 119 | | | 120 | 122M | for (x = 0; x < w2; x++) { | 121 | 118M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 122 | 118M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 123 | 118M | } | 124 | 4.52M | } |
dirac_dwt.c:horizontal_compose_dd137i_10bit Line | Count | Source | 104 | 1.89M | { | 105 | 1.89M | const int w2 = w >> 1; | 106 | 1.89M | int x; | 107 | 1.89M | TYPE *b = (TYPE *)_b; | 108 | 1.89M | TYPE *tmp = (TYPE *)_tmp; | 109 | | | 110 | 1.89M | tmp[0] = COMPOSE_DD137iL0(b[w2], b[w2], b[0], b[w2 ], b[w2+1]); | 111 | 1.89M | tmp[1] = COMPOSE_DD137iL0(b[w2], b[w2], b[1], b[w2+1], b[w2+2]); | 112 | 369M | for (x = 2; x < w2-1; x++) | 113 | 367M | tmp[x] = COMPOSE_DD137iL0(b[x+w2-2], b[x+w2-1], b[x], b[x+w2], b[x+w2+1]); | 114 | 1.89M | tmp[w2-1] = COMPOSE_DD137iL0(b[w-3], b[w-2], b[w2-1], b[w-1], b[w-1]); | 115 | | | 116 | | // extend the edges | 117 | 1.89M | tmp[-1] = tmp[0]; | 118 | 1.89M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 119 | | | 120 | 375M | for (x = 0; x < w2; x++) { | 121 | 373M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 122 | 373M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 123 | 373M | } | 124 | 1.89M | } |
dirac_dwt.c:horizontal_compose_dd137i_12bit Line | Count | Source | 104 | 1.35M | { | 105 | 1.35M | const int w2 = w >> 1; | 106 | 1.35M | int x; | 107 | 1.35M | TYPE *b = (TYPE *)_b; | 108 | 1.35M | TYPE *tmp = (TYPE *)_tmp; | 109 | | | 110 | 1.35M | tmp[0] = COMPOSE_DD137iL0(b[w2], b[w2], b[0], b[w2 ], b[w2+1]); | 111 | 1.35M | tmp[1] = COMPOSE_DD137iL0(b[w2], b[w2], b[1], b[w2+1], b[w2+2]); | 112 | 86.3M | for (x = 2; x < w2-1; x++) | 113 | 85.0M | tmp[x] = COMPOSE_DD137iL0(b[x+w2-2], b[x+w2-1], b[x], b[x+w2], b[x+w2+1]); | 114 | 1.35M | tmp[w2-1] = COMPOSE_DD137iL0(b[w-3], b[w-2], b[w2-1], b[w-1], b[w-1]); | 115 | | | 116 | | // extend the edges | 117 | 1.35M | tmp[-1] = tmp[0]; | 118 | 1.35M | tmp[w2+1] = tmp[w2] = tmp[w2-1]; | 119 | | | 120 | 89.7M | for (x = 0; x < w2; x++) { | 121 | 88.3M | b[2*x ] = ((int)(tmp[x] + 1U))>>1; | 122 | 88.3M | b[2*x+1] = ((int)(COMPOSE_DD97iH0(tmp[x-1], tmp[x], b[x+w2], tmp[x+1], tmp[x+2]) + 1U))>>1; | 123 | 88.3M | } | 124 | 1.35M | } |
|
125 | | |
126 | | static av_always_inline void RENAME(horizontal_compose_haari)(TYPE *b, TYPE *temp, |
127 | | int w, int shift) |
128 | 3.41M | { |
129 | 3.41M | const int w2 = w >> 1; |
130 | 3.41M | int x; |
131 | | |
132 | 421M | for (x = 0; x < w2; x++) { |
133 | 417M | temp[x ] = COMPOSE_HAARiL0(b[x ], b[x+w2]); |
134 | 417M | temp[x+w2] = COMPOSE_HAARiH0(b[x+w2], temp[x]); |
135 | 417M | } |
136 | | |
137 | 3.41M | RENAME(interleave)(b, temp, temp+w2, w2, shift, shift); |
138 | 3.41M | } dirac_dwt.c:horizontal_compose_haari_8bit Line | Count | Source | 128 | 1.79M | { | 129 | 1.79M | const int w2 = w >> 1; | 130 | 1.79M | int x; | 131 | | | 132 | 207M | for (x = 0; x < w2; x++) { | 133 | 205M | temp[x ] = COMPOSE_HAARiL0(b[x ], b[x+w2]); | 134 | 205M | temp[x+w2] = COMPOSE_HAARiH0(b[x+w2], temp[x]); | 135 | 205M | } | 136 | | | 137 | 1.79M | RENAME(interleave)(b, temp, temp+w2, w2, shift, shift); | 138 | 1.79M | } |
dirac_dwt.c:horizontal_compose_haari_10bit Line | Count | Source | 128 | 1.09M | { | 129 | 1.09M | const int w2 = w >> 1; | 130 | 1.09M | int x; | 131 | | | 132 | 184M | for (x = 0; x < w2; x++) { | 133 | 183M | temp[x ] = COMPOSE_HAARiL0(b[x ], b[x+w2]); | 134 | 183M | temp[x+w2] = COMPOSE_HAARiH0(b[x+w2], temp[x]); | 135 | 183M | } | 136 | | | 137 | 1.09M | RENAME(interleave)(b, temp, temp+w2, w2, shift, shift); | 138 | 1.09M | } |
dirac_dwt.c:horizontal_compose_haari_12bit Line | Count | Source | 128 | 517k | { | 129 | 517k | const int w2 = w >> 1; | 130 | 517k | int x; | 131 | | | 132 | 29.4M | for (x = 0; x < w2; x++) { | 133 | 28.9M | temp[x ] = COMPOSE_HAARiL0(b[x ], b[x+w2]); | 134 | 28.9M | temp[x+w2] = COMPOSE_HAARiH0(b[x+w2], temp[x]); | 135 | 28.9M | } | 136 | | | 137 | 517k | RENAME(interleave)(b, temp, temp+w2, w2, shift, shift); | 138 | 517k | } |
|
139 | | |
140 | | static void RENAME(horizontal_compose_haar0i)(uint8_t *_b, uint8_t *_temp, int w) |
141 | 1.57M | { |
142 | 1.57M | TYPE *b = (TYPE *)_b; |
143 | 1.57M | TYPE *temp = (TYPE *)_temp; |
144 | 1.57M | RENAME(horizontal_compose_haari)(b, temp, w, 0); |
145 | 1.57M | } dirac_dwt.c:horizontal_compose_haar0i_8bit Line | Count | Source | 141 | 516k | { | 142 | 516k | TYPE *b = (TYPE *)_b; | 143 | 516k | TYPE *temp = (TYPE *)_temp; | 144 | 516k | RENAME(horizontal_compose_haari)(b, temp, w, 0); | 145 | 516k | } |
dirac_dwt.c:horizontal_compose_haar0i_10bit Line | Count | Source | 141 | 669k | { | 142 | 669k | TYPE *b = (TYPE *)_b; | 143 | 669k | TYPE *temp = (TYPE *)_temp; | 144 | 669k | RENAME(horizontal_compose_haari)(b, temp, w, 0); | 145 | 669k | } |
dirac_dwt.c:horizontal_compose_haar0i_12bit Line | Count | Source | 141 | 384k | { | 142 | 384k | TYPE *b = (TYPE *)_b; | 143 | 384k | TYPE *temp = (TYPE *)_temp; | 144 | 384k | RENAME(horizontal_compose_haari)(b, temp, w, 0); | 145 | 384k | } |
|
146 | | |
147 | | static void RENAME(horizontal_compose_haar1i)(uint8_t *_b, uint8_t *_temp, int w) |
148 | 1.84M | { |
149 | 1.84M | TYPE *b = (TYPE *)_b; |
150 | 1.84M | TYPE *temp = (TYPE *)_temp; |
151 | 1.84M | RENAME(horizontal_compose_haari)(b, temp, w, 1); |
152 | 1.84M | } dirac_dwt.c:horizontal_compose_haar1i_8bit Line | Count | Source | 148 | 1.28M | { | 149 | 1.28M | TYPE *b = (TYPE *)_b; | 150 | 1.28M | TYPE *temp = (TYPE *)_temp; | 151 | 1.28M | RENAME(horizontal_compose_haari)(b, temp, w, 1); | 152 | 1.28M | } |
dirac_dwt.c:horizontal_compose_haar1i_10bit Line | Count | Source | 148 | 424k | { | 149 | 424k | TYPE *b = (TYPE *)_b; | 150 | 424k | TYPE *temp = (TYPE *)_temp; | 151 | 424k | RENAME(horizontal_compose_haari)(b, temp, w, 1); | 152 | 424k | } |
dirac_dwt.c:horizontal_compose_haar1i_12bit Line | Count | Source | 148 | 132k | { | 149 | 132k | TYPE *b = (TYPE *)_b; | 150 | 132k | TYPE *temp = (TYPE *)_temp; | 151 | 132k | RENAME(horizontal_compose_haari)(b, temp, w, 1); | 152 | 132k | } |
|
153 | | |
154 | | static void RENAME(horizontal_compose_fidelityi)(uint8_t *_b, uint8_t *_tmp, int w) |
155 | 7.28M | { |
156 | 7.28M | const int w2 = w >> 1; |
157 | 7.28M | int i, x; |
158 | 7.28M | TYPE v[8]; |
159 | 7.28M | TYPE *b = (TYPE *)_b; |
160 | 7.28M | TYPE *tmp = (TYPE *)_tmp; |
161 | | |
162 | 87.3M | for (x = 0; x < w2; x++) { |
163 | 720M | for (i = 0; i < 8; i++) |
164 | 640M | v[i] = b[av_clip(x-3+i, 0, w2-1)]; |
165 | 80.0M | tmp[x] = COMPOSE_FIDELITYiH0(v[0], v[1], v[2], v[3], b[x+w2], v[4], v[5], v[6], v[7]); |
166 | 80.0M | } |
167 | | |
168 | 87.3M | for (x = 0; x < w2; x++) { |
169 | 720M | for (i = 0; i < 8; i++) |
170 | 640M | v[i] = tmp[av_clip(x-4+i, 0, w2-1)]; |
171 | 80.0M | tmp[x+w2] = COMPOSE_FIDELITYiL0(v[0], v[1], v[2], v[3], b[x], v[4], v[5], v[6], v[7]); |
172 | 80.0M | } |
173 | | |
174 | 7.28M | RENAME(interleave)(b, tmp+w2, tmp, w2, 0, 0); |
175 | 7.28M | } dirac_dwt.c:horizontal_compose_fidelityi_8bit Line | Count | Source | 155 | 2.42M | { | 156 | 2.42M | const int w2 = w >> 1; | 157 | 2.42M | int i, x; | 158 | 2.42M | TYPE v[8]; | 159 | 2.42M | TYPE *b = (TYPE *)_b; | 160 | 2.42M | TYPE *tmp = (TYPE *)_tmp; | 161 | | | 162 | 29.6M | for (x = 0; x < w2; x++) { | 163 | 244M | for (i = 0; i < 8; i++) | 164 | 217M | v[i] = b[av_clip(x-3+i, 0, w2-1)]; | 165 | 27.1M | tmp[x] = COMPOSE_FIDELITYiH0(v[0], v[1], v[2], v[3], b[x+w2], v[4], v[5], v[6], v[7]); | 166 | 27.1M | } | 167 | | | 168 | 29.6M | for (x = 0; x < w2; x++) { | 169 | 244M | for (i = 0; i < 8; i++) | 170 | 217M | v[i] = tmp[av_clip(x-4+i, 0, w2-1)]; | 171 | 27.1M | tmp[x+w2] = COMPOSE_FIDELITYiL0(v[0], v[1], v[2], v[3], b[x], v[4], v[5], v[6], v[7]); | 172 | 27.1M | } | 173 | | | 174 | 2.42M | RENAME(interleave)(b, tmp+w2, tmp, w2, 0, 0); | 175 | 2.42M | } |
dirac_dwt.c:horizontal_compose_fidelityi_10bit Line | Count | Source | 155 | 1.96M | { | 156 | 1.96M | const int w2 = w >> 1; | 157 | 1.96M | int i, x; | 158 | 1.96M | TYPE v[8]; | 159 | 1.96M | TYPE *b = (TYPE *)_b; | 160 | 1.96M | TYPE *tmp = (TYPE *)_tmp; | 161 | | | 162 | 30.5M | for (x = 0; x < w2; x++) { | 163 | 257M | for (i = 0; i < 8; i++) | 164 | 228M | v[i] = b[av_clip(x-3+i, 0, w2-1)]; | 165 | 28.5M | tmp[x] = COMPOSE_FIDELITYiH0(v[0], v[1], v[2], v[3], b[x+w2], v[4], v[5], v[6], v[7]); | 166 | 28.5M | } | 167 | | | 168 | 30.5M | for (x = 0; x < w2; x++) { | 169 | 257M | for (i = 0; i < 8; i++) | 170 | 228M | v[i] = tmp[av_clip(x-4+i, 0, w2-1)]; | 171 | 28.5M | tmp[x+w2] = COMPOSE_FIDELITYiL0(v[0], v[1], v[2], v[3], b[x], v[4], v[5], v[6], v[7]); | 172 | 28.5M | } | 173 | | | 174 | 1.96M | RENAME(interleave)(b, tmp+w2, tmp, w2, 0, 0); | 175 | 1.96M | } |
dirac_dwt.c:horizontal_compose_fidelityi_12bit Line | Count | Source | 155 | 2.89M | { | 156 | 2.89M | const int w2 = w >> 1; | 157 | 2.89M | int i, x; | 158 | 2.89M | TYPE v[8]; | 159 | 2.89M | TYPE *b = (TYPE *)_b; | 160 | 2.89M | TYPE *tmp = (TYPE *)_tmp; | 161 | | | 162 | 27.1M | for (x = 0; x < w2; x++) { | 163 | 218M | for (i = 0; i < 8; i++) | 164 | 194M | v[i] = b[av_clip(x-3+i, 0, w2-1)]; | 165 | 24.2M | tmp[x] = COMPOSE_FIDELITYiH0(v[0], v[1], v[2], v[3], b[x+w2], v[4], v[5], v[6], v[7]); | 166 | 24.2M | } | 167 | | | 168 | 27.1M | for (x = 0; x < w2; x++) { | 169 | 218M | for (i = 0; i < 8; i++) | 170 | 194M | v[i] = tmp[av_clip(x-4+i, 0, w2-1)]; | 171 | 24.2M | tmp[x+w2] = COMPOSE_FIDELITYiL0(v[0], v[1], v[2], v[3], b[x], v[4], v[5], v[6], v[7]); | 172 | 24.2M | } | 173 | | | 174 | 2.89M | RENAME(interleave)(b, tmp+w2, tmp, w2, 0, 0); | 175 | 2.89M | } |
|
176 | | |
177 | | static void RENAME(horizontal_compose_daub97i)(uint8_t *_b, uint8_t *_temp, int w) |
178 | 1.97M | { |
179 | 1.97M | const int w2 = w >> 1; |
180 | 1.97M | int x, b0, b1, b2; |
181 | 1.97M | TYPE *b = (TYPE *)_b; |
182 | 1.97M | TYPE *temp = (TYPE *)_temp; |
183 | | |
184 | 1.97M | temp[0] = COMPOSE_DAUB97iL1(b[w2], b[0], b[w2]); |
185 | 83.6M | for (x = 1; x < w2; x++) { |
186 | 81.7M | temp[x ] = COMPOSE_DAUB97iL1(b[x+w2-1], b[x ], b[x+w2]); |
187 | 81.7M | temp[x+w2-1] = COMPOSE_DAUB97iH1(temp[x-1], b[x+w2-1], temp[x]); |
188 | 81.7M | } |
189 | 1.97M | temp[w-1] = COMPOSE_DAUB97iH1(temp[w2-1], b[w-1], temp[w2-1]); |
190 | | |
191 | | // second stage combined with interleave and shift |
192 | 1.97M | b0 = b2 = COMPOSE_DAUB97iL0(temp[w2], temp[0], temp[w2]); |
193 | 1.97M | b[0] = ~((~b0) >> 1); |
194 | 83.6M | for (x = 1; x < w2; x++) { |
195 | 81.7M | b2 = COMPOSE_DAUB97iL0(temp[x+w2-1], temp[x ], temp[x+w2]); |
196 | 81.7M | b1 = COMPOSE_DAUB97iH0( b0, temp[x+w2-1], b2 ); |
197 | 81.7M | b[2*x-1] = ~((~b1) >> 1); |
198 | 81.7M | b[2*x ] = ~((~b2) >> 1); |
199 | 81.7M | b0 = b2; |
200 | 81.7M | } |
201 | 1.97M | b[w-1] = ~((~COMPOSE_DAUB97iH0(b2, temp[w-1], b2)) >> 1); |
202 | 1.97M | } dirac_dwt.c:horizontal_compose_daub97i_8bit Line | Count | Source | 178 | 803k | { | 179 | 803k | const int w2 = w >> 1; | 180 | 803k | int x, b0, b1, b2; | 181 | 803k | TYPE *b = (TYPE *)_b; | 182 | 803k | TYPE *temp = (TYPE *)_temp; | 183 | | | 184 | 803k | temp[0] = COMPOSE_DAUB97iL1(b[w2], b[0], b[w2]); | 185 | 62.7M | for (x = 1; x < w2; x++) { | 186 | 61.9M | temp[x ] = COMPOSE_DAUB97iL1(b[x+w2-1], b[x ], b[x+w2]); | 187 | 61.9M | temp[x+w2-1] = COMPOSE_DAUB97iH1(temp[x-1], b[x+w2-1], temp[x]); | 188 | 61.9M | } | 189 | 803k | temp[w-1] = COMPOSE_DAUB97iH1(temp[w2-1], b[w-1], temp[w2-1]); | 190 | | | 191 | | // second stage combined with interleave and shift | 192 | 803k | b0 = b2 = COMPOSE_DAUB97iL0(temp[w2], temp[0], temp[w2]); | 193 | 803k | b[0] = ~((~b0) >> 1); | 194 | 62.7M | for (x = 1; x < w2; x++) { | 195 | 61.9M | b2 = COMPOSE_DAUB97iL0(temp[x+w2-1], temp[x ], temp[x+w2]); | 196 | 61.9M | b1 = COMPOSE_DAUB97iH0( b0, temp[x+w2-1], b2 ); | 197 | 61.9M | b[2*x-1] = ~((~b1) >> 1); | 198 | 61.9M | b[2*x ] = ~((~b2) >> 1); | 199 | 61.9M | b0 = b2; | 200 | 61.9M | } | 201 | 803k | b[w-1] = ~((~COMPOSE_DAUB97iH0(b2, temp[w-1], b2)) >> 1); | 202 | 803k | } |
dirac_dwt.c:horizontal_compose_daub97i_10bit Line | Count | Source | 178 | 368k | { | 179 | 368k | const int w2 = w >> 1; | 180 | 368k | int x, b0, b1, b2; | 181 | 368k | TYPE *b = (TYPE *)_b; | 182 | 368k | TYPE *temp = (TYPE *)_temp; | 183 | | | 184 | 368k | temp[0] = COMPOSE_DAUB97iL1(b[w2], b[0], b[w2]); | 185 | 7.20M | for (x = 1; x < w2; x++) { | 186 | 6.83M | temp[x ] = COMPOSE_DAUB97iL1(b[x+w2-1], b[x ], b[x+w2]); | 187 | 6.83M | temp[x+w2-1] = COMPOSE_DAUB97iH1(temp[x-1], b[x+w2-1], temp[x]); | 188 | 6.83M | } | 189 | 368k | temp[w-1] = COMPOSE_DAUB97iH1(temp[w2-1], b[w-1], temp[w2-1]); | 190 | | | 191 | | // second stage combined with interleave and shift | 192 | 368k | b0 = b2 = COMPOSE_DAUB97iL0(temp[w2], temp[0], temp[w2]); | 193 | 368k | b[0] = ~((~b0) >> 1); | 194 | 7.20M | for (x = 1; x < w2; x++) { | 195 | 6.83M | b2 = COMPOSE_DAUB97iL0(temp[x+w2-1], temp[x ], temp[x+w2]); | 196 | 6.83M | b1 = COMPOSE_DAUB97iH0( b0, temp[x+w2-1], b2 ); | 197 | 6.83M | b[2*x-1] = ~((~b1) >> 1); | 198 | 6.83M | b[2*x ] = ~((~b2) >> 1); | 199 | 6.83M | b0 = b2; | 200 | 6.83M | } | 201 | 368k | b[w-1] = ~((~COMPOSE_DAUB97iH0(b2, temp[w-1], b2)) >> 1); | 202 | 368k | } |
dirac_dwt.c:horizontal_compose_daub97i_12bit Line | Count | Source | 178 | 803k | { | 179 | 803k | const int w2 = w >> 1; | 180 | 803k | int x, b0, b1, b2; | 181 | 803k | TYPE *b = (TYPE *)_b; | 182 | 803k | TYPE *temp = (TYPE *)_temp; | 183 | | | 184 | 803k | temp[0] = COMPOSE_DAUB97iL1(b[w2], b[0], b[w2]); | 185 | 13.6M | for (x = 1; x < w2; x++) { | 186 | 12.8M | temp[x ] = COMPOSE_DAUB97iL1(b[x+w2-1], b[x ], b[x+w2]); | 187 | 12.8M | temp[x+w2-1] = COMPOSE_DAUB97iH1(temp[x-1], b[x+w2-1], temp[x]); | 188 | 12.8M | } | 189 | 803k | temp[w-1] = COMPOSE_DAUB97iH1(temp[w2-1], b[w-1], temp[w2-1]); | 190 | | | 191 | | // second stage combined with interleave and shift | 192 | 803k | b0 = b2 = COMPOSE_DAUB97iL0(temp[w2], temp[0], temp[w2]); | 193 | 803k | b[0] = ~((~b0) >> 1); | 194 | 13.6M | for (x = 1; x < w2; x++) { | 195 | 12.8M | b2 = COMPOSE_DAUB97iL0(temp[x+w2-1], temp[x ], temp[x+w2]); | 196 | 12.8M | b1 = COMPOSE_DAUB97iH0( b0, temp[x+w2-1], b2 ); | 197 | 12.8M | b[2*x-1] = ~((~b1) >> 1); | 198 | 12.8M | b[2*x ] = ~((~b2) >> 1); | 199 | 12.8M | b0 = b2; | 200 | 12.8M | } | 201 | 803k | b[w-1] = ~((~COMPOSE_DAUB97iH0(b2, temp[w-1], b2)) >> 1); | 202 | 803k | } |
|
203 | | |
204 | | static void RENAME(vertical_compose_dirac53iH0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, |
205 | | int width) |
206 | 2.82M | { |
207 | 2.82M | int i; |
208 | 2.82M | TYPE *b0 = (TYPE *)_b0; |
209 | 2.82M | TYPE *b1 = (TYPE *)_b1; |
210 | 2.82M | TYPE *b2 = (TYPE *)_b2; |
211 | 495M | for(i=0; i<width; i++){ |
212 | 492M | b1[i] = COMPOSE_DIRAC53iH0(b0[i], b1[i], b2[i]); |
213 | 492M | } |
214 | 2.82M | } dirac_dwt.c:vertical_compose_dirac53iH0_8bit Line | Count | Source | 206 | 1.23M | { | 207 | 1.23M | int i; | 208 | 1.23M | TYPE *b0 = (TYPE *)_b0; | 209 | 1.23M | TYPE *b1 = (TYPE *)_b1; | 210 | 1.23M | TYPE *b2 = (TYPE *)_b2; | 211 | 263M | for(i=0; i<width; i++){ | 212 | 262M | b1[i] = COMPOSE_DIRAC53iH0(b0[i], b1[i], b2[i]); | 213 | 262M | } | 214 | 1.23M | } |
dirac_dwt.c:vertical_compose_dirac53iH0_10bit Line | Count | Source | 206 | 1.04M | { | 207 | 1.04M | int i; | 208 | 1.04M | TYPE *b0 = (TYPE *)_b0; | 209 | 1.04M | TYPE *b1 = (TYPE *)_b1; | 210 | 1.04M | TYPE *b2 = (TYPE *)_b2; | 211 | 205M | for(i=0; i<width; i++){ | 212 | 204M | b1[i] = COMPOSE_DIRAC53iH0(b0[i], b1[i], b2[i]); | 213 | 204M | } | 214 | 1.04M | } |
dirac_dwt.c:vertical_compose_dirac53iH0_12bit Line | Count | Source | 206 | 550k | { | 207 | 550k | int i; | 208 | 550k | TYPE *b0 = (TYPE *)_b0; | 209 | 550k | TYPE *b1 = (TYPE *)_b1; | 210 | 550k | TYPE *b2 = (TYPE *)_b2; | 211 | 26.3M | for(i=0; i<width; i++){ | 212 | 25.7M | b1[i] = COMPOSE_DIRAC53iH0(b0[i], b1[i], b2[i]); | 213 | 25.7M | } | 214 | 550k | } |
|
215 | | |
216 | | static void RENAME(vertical_compose_dd97iH0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, |
217 | | uint8_t *_b3, uint8_t *_b4, int width) |
218 | 5.62M | { |
219 | 5.62M | int i; |
220 | 5.62M | TYPE *b0 = (TYPE *)_b0; |
221 | 5.62M | TYPE *b1 = (TYPE *)_b1; |
222 | 5.62M | TYPE *b2 = (TYPE *)_b2; |
223 | 5.62M | TYPE *b3 = (TYPE *)_b3; |
224 | 5.62M | TYPE *b4 = (TYPE *)_b4; |
225 | 935M | for(i=0; i<width; i++){ |
226 | 930M | b2[i] = COMPOSE_DD97iH0(b0[i], b1[i], b2[i], b3[i], b4[i]); |
227 | 930M | } |
228 | 5.62M | } dirac_dwt.c:vertical_compose_dd97iH0_8bit Line | Count | Source | 218 | 2.78M | { | 219 | 2.78M | int i; | 220 | 2.78M | TYPE *b0 = (TYPE *)_b0; | 221 | 2.78M | TYPE *b1 = (TYPE *)_b1; | 222 | 2.78M | TYPE *b2 = (TYPE *)_b2; | 223 | 2.78M | TYPE *b3 = (TYPE *)_b3; | 224 | 2.78M | TYPE *b4 = (TYPE *)_b4; | 225 | 202M | for(i=0; i<width; i++){ | 226 | 199M | b2[i] = COMPOSE_DD97iH0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 227 | 199M | } | 228 | 2.78M | } |
dirac_dwt.c:vertical_compose_dd97iH0_10bit Line | Count | Source | 218 | 1.45M | { | 219 | 1.45M | int i; | 220 | 1.45M | TYPE *b0 = (TYPE *)_b0; | 221 | 1.45M | TYPE *b1 = (TYPE *)_b1; | 222 | 1.45M | TYPE *b2 = (TYPE *)_b2; | 223 | 1.45M | TYPE *b3 = (TYPE *)_b3; | 224 | 1.45M | TYPE *b4 = (TYPE *)_b4; | 225 | 632M | for(i=0; i<width; i++){ | 226 | 630M | b2[i] = COMPOSE_DD97iH0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 227 | 630M | } | 228 | 1.45M | } |
dirac_dwt.c:vertical_compose_dd97iH0_12bit Line | Count | Source | 218 | 1.38M | { | 219 | 1.38M | int i; | 220 | 1.38M | TYPE *b0 = (TYPE *)_b0; | 221 | 1.38M | TYPE *b1 = (TYPE *)_b1; | 222 | 1.38M | TYPE *b2 = (TYPE *)_b2; | 223 | 1.38M | TYPE *b3 = (TYPE *)_b3; | 224 | 1.38M | TYPE *b4 = (TYPE *)_b4; | 225 | 101M | for(i=0; i<width; i++){ | 226 | 99.8M | b2[i] = COMPOSE_DD97iH0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 227 | 99.8M | } | 228 | 1.38M | } |
|
229 | | |
230 | | static void RENAME(vertical_compose_dd137iL0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, |
231 | | uint8_t *_b3, uint8_t *_b4, int width) |
232 | 3.89M | { |
233 | 3.89M | int i; |
234 | 3.89M | TYPE *b0 = (TYPE *)_b0; |
235 | 3.89M | TYPE *b1 = (TYPE *)_b1; |
236 | 3.89M | TYPE *b2 = (TYPE *)_b2; |
237 | 3.89M | TYPE *b3 = (TYPE *)_b3; |
238 | 3.89M | TYPE *b4 = (TYPE *)_b4; |
239 | 584M | for(i=0; i<width; i++){ |
240 | 580M | b2[i] = COMPOSE_DD137iL0(b0[i], b1[i], b2[i], b3[i], b4[i]); |
241 | 580M | } |
242 | 3.89M | } dirac_dwt.c:vertical_compose_dd137iL0_8bit Line | Count | Source | 232 | 2.26M | { | 233 | 2.26M | int i; | 234 | 2.26M | TYPE *b0 = (TYPE *)_b0; | 235 | 2.26M | TYPE *b1 = (TYPE *)_b1; | 236 | 2.26M | TYPE *b2 = (TYPE *)_b2; | 237 | 2.26M | TYPE *b3 = (TYPE *)_b3; | 238 | 2.26M | TYPE *b4 = (TYPE *)_b4; | 239 | 120M | for(i=0; i<width; i++){ | 240 | 118M | b2[i] = COMPOSE_DD137iL0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 241 | 118M | } | 242 | 2.26M | } |
dirac_dwt.c:vertical_compose_dd137iL0_10bit Line | Count | Source | 232 | 948k | { | 233 | 948k | int i; | 234 | 948k | TYPE *b0 = (TYPE *)_b0; | 235 | 948k | TYPE *b1 = (TYPE *)_b1; | 236 | 948k | TYPE *b2 = (TYPE *)_b2; | 237 | 948k | TYPE *b3 = (TYPE *)_b3; | 238 | 948k | TYPE *b4 = (TYPE *)_b4; | 239 | 374M | for(i=0; i<width; i++){ | 240 | 373M | b2[i] = COMPOSE_DD137iL0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 241 | 373M | } | 242 | 948k | } |
dirac_dwt.c:vertical_compose_dd137iL0_12bit Line | Count | Source | 232 | 677k | { | 233 | 677k | int i; | 234 | 677k | TYPE *b0 = (TYPE *)_b0; | 235 | 677k | TYPE *b1 = (TYPE *)_b1; | 236 | 677k | TYPE *b2 = (TYPE *)_b2; | 237 | 677k | TYPE *b3 = (TYPE *)_b3; | 238 | 677k | TYPE *b4 = (TYPE *)_b4; | 239 | 89.1M | for(i=0; i<width; i++){ | 240 | 88.4M | b2[i] = COMPOSE_DD137iL0(b0[i], b1[i], b2[i], b3[i], b4[i]); | 241 | 88.4M | } | 242 | 677k | } |
|
243 | | |
244 | | static void RENAME(vertical_compose_haar)(uint8_t *_b0, uint8_t *_b1, int width) |
245 | 1.70M | { |
246 | 1.70M | int i; |
247 | 1.70M | TYPE *b0 = (TYPE *)_b0; |
248 | 1.70M | TYPE *b1 = (TYPE *)_b1; |
249 | | |
250 | 419M | for (i = 0; i < width; i++) { |
251 | 417M | b0[i] = COMPOSE_HAARiL0(b0[i], b1[i]); |
252 | 417M | b1[i] = COMPOSE_HAARiH0(b1[i], b0[i]); |
253 | 417M | } |
254 | 1.70M | } dirac_dwt.c:vertical_compose_haar_8bit Line | Count | Source | 245 | 899k | { | 246 | 899k | int i; | 247 | 899k | TYPE *b0 = (TYPE *)_b0; | 248 | 899k | TYPE *b1 = (TYPE *)_b1; | 249 | | | 250 | 206M | for (i = 0; i < width; i++) { | 251 | 205M | b0[i] = COMPOSE_HAARiL0(b0[i], b1[i]); | 252 | 205M | b1[i] = COMPOSE_HAARiH0(b1[i], b0[i]); | 253 | 205M | } | 254 | 899k | } |
dirac_dwt.c:vertical_compose_haar_10bit Line | Count | Source | 245 | 547k | { | 246 | 547k | int i; | 247 | 547k | TYPE *b0 = (TYPE *)_b0; | 248 | 547k | TYPE *b1 = (TYPE *)_b1; | 249 | | | 250 | 183M | for (i = 0; i < width; i++) { | 251 | 183M | b0[i] = COMPOSE_HAARiL0(b0[i], b1[i]); | 252 | 183M | b1[i] = COMPOSE_HAARiH0(b1[i], b0[i]); | 253 | 183M | } | 254 | 547k | } |
dirac_dwt.c:vertical_compose_haar_12bit Line | Count | Source | 245 | 258k | { | 246 | 258k | int i; | 247 | 258k | TYPE *b0 = (TYPE *)_b0; | 248 | 258k | TYPE *b1 = (TYPE *)_b1; | 249 | | | 250 | 29.1M | for (i = 0; i < width; i++) { | 251 | 28.9M | b0[i] = COMPOSE_HAARiL0(b0[i], b1[i]); | 252 | 28.9M | b1[i] = COMPOSE_HAARiH0(b1[i], b0[i]); | 253 | 28.9M | } | 254 | 258k | } |
|
255 | | |
256 | | static void RENAME(vertical_compose_fidelityiH0)(uint8_t *_dst, uint8_t *_b[8], int width) |
257 | 3.64M | { |
258 | 3.64M | int i; |
259 | 3.64M | TYPE *dst = (TYPE *)_dst; |
260 | 3.64M | TYPE *b0 = (TYPE *)_b[0]; |
261 | 3.64M | TYPE *b1 = (TYPE *)_b[1]; |
262 | 3.64M | TYPE *b2 = (TYPE *)_b[2]; |
263 | 3.64M | TYPE *b3 = (TYPE *)_b[3]; |
264 | 3.64M | TYPE *b4 = (TYPE *)_b[4]; |
265 | 3.64M | TYPE *b5 = (TYPE *)_b[5]; |
266 | 3.64M | TYPE *b6 = (TYPE *)_b[6]; |
267 | 3.64M | TYPE *b7 = (TYPE *)_b[7]; |
268 | 83.7M | for(i=0; i<width; i++){ |
269 | 80.0M | dst[i] = COMPOSE_FIDELITYiH0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); |
270 | 80.0M | } |
271 | 3.64M | } dirac_dwt.c:vertical_compose_fidelityiH0_8bit Line | Count | Source | 257 | 1.21M | { | 258 | 1.21M | int i; | 259 | 1.21M | TYPE *dst = (TYPE *)_dst; | 260 | 1.21M | TYPE *b0 = (TYPE *)_b[0]; | 261 | 1.21M | TYPE *b1 = (TYPE *)_b[1]; | 262 | 1.21M | TYPE *b2 = (TYPE *)_b[2]; | 263 | 1.21M | TYPE *b3 = (TYPE *)_b[3]; | 264 | 1.21M | TYPE *b4 = (TYPE *)_b[4]; | 265 | 1.21M | TYPE *b5 = (TYPE *)_b[5]; | 266 | 1.21M | TYPE *b6 = (TYPE *)_b[6]; | 267 | 1.21M | TYPE *b7 = (TYPE *)_b[7]; | 268 | 28.4M | for(i=0; i<width; i++){ | 269 | 27.1M | dst[i] = COMPOSE_FIDELITYiH0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 270 | 27.1M | } | 271 | 1.21M | } |
dirac_dwt.c:vertical_compose_fidelityiH0_10bit Line | Count | Source | 257 | 983k | { | 258 | 983k | int i; | 259 | 983k | TYPE *dst = (TYPE *)_dst; | 260 | 983k | TYPE *b0 = (TYPE *)_b[0]; | 261 | 983k | TYPE *b1 = (TYPE *)_b[1]; | 262 | 983k | TYPE *b2 = (TYPE *)_b[2]; | 263 | 983k | TYPE *b3 = (TYPE *)_b[3]; | 264 | 983k | TYPE *b4 = (TYPE *)_b[4]; | 265 | 983k | TYPE *b5 = (TYPE *)_b[5]; | 266 | 983k | TYPE *b6 = (TYPE *)_b[6]; | 267 | 983k | TYPE *b7 = (TYPE *)_b[7]; | 268 | 29.5M | for(i=0; i<width; i++){ | 269 | 28.5M | dst[i] = COMPOSE_FIDELITYiH0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 270 | 28.5M | } | 271 | 983k | } |
dirac_dwt.c:vertical_compose_fidelityiH0_12bit Line | Count | Source | 257 | 1.44M | { | 258 | 1.44M | int i; | 259 | 1.44M | TYPE *dst = (TYPE *)_dst; | 260 | 1.44M | TYPE *b0 = (TYPE *)_b[0]; | 261 | 1.44M | TYPE *b1 = (TYPE *)_b[1]; | 262 | 1.44M | TYPE *b2 = (TYPE *)_b[2]; | 263 | 1.44M | TYPE *b3 = (TYPE *)_b[3]; | 264 | 1.44M | TYPE *b4 = (TYPE *)_b[4]; | 265 | 1.44M | TYPE *b5 = (TYPE *)_b[5]; | 266 | 1.44M | TYPE *b6 = (TYPE *)_b[6]; | 267 | 1.44M | TYPE *b7 = (TYPE *)_b[7]; | 268 | 25.7M | for(i=0; i<width; i++){ | 269 | 24.2M | dst[i] = COMPOSE_FIDELITYiH0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 270 | 24.2M | } | 271 | 1.44M | } |
|
272 | | |
273 | | static void RENAME(vertical_compose_fidelityiL0)(uint8_t *_dst, uint8_t *_b[8], int width) |
274 | 3.64M | { |
275 | 3.64M | int i; |
276 | 3.64M | TYPE *dst = (TYPE *)_dst; |
277 | 3.64M | TYPE *b0 = (TYPE *)_b[0]; |
278 | 3.64M | TYPE *b1 = (TYPE *)_b[1]; |
279 | 3.64M | TYPE *b2 = (TYPE *)_b[2]; |
280 | 3.64M | TYPE *b3 = (TYPE *)_b[3]; |
281 | 3.64M | TYPE *b4 = (TYPE *)_b[4]; |
282 | 3.64M | TYPE *b5 = (TYPE *)_b[5]; |
283 | 3.64M | TYPE *b6 = (TYPE *)_b[6]; |
284 | 3.64M | TYPE *b7 = (TYPE *)_b[7]; |
285 | | |
286 | 83.7M | for(i=0; i<width; i++){ |
287 | 80.0M | dst[i] = COMPOSE_FIDELITYiL0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); |
288 | 80.0M | } |
289 | 3.64M | } dirac_dwt.c:vertical_compose_fidelityiL0_8bit Line | Count | Source | 274 | 1.21M | { | 275 | 1.21M | int i; | 276 | 1.21M | TYPE *dst = (TYPE *)_dst; | 277 | 1.21M | TYPE *b0 = (TYPE *)_b[0]; | 278 | 1.21M | TYPE *b1 = (TYPE *)_b[1]; | 279 | 1.21M | TYPE *b2 = (TYPE *)_b[2]; | 280 | 1.21M | TYPE *b3 = (TYPE *)_b[3]; | 281 | 1.21M | TYPE *b4 = (TYPE *)_b[4]; | 282 | 1.21M | TYPE *b5 = (TYPE *)_b[5]; | 283 | 1.21M | TYPE *b6 = (TYPE *)_b[6]; | 284 | 1.21M | TYPE *b7 = (TYPE *)_b[7]; | 285 | | | 286 | 28.4M | for(i=0; i<width; i++){ | 287 | 27.1M | dst[i] = COMPOSE_FIDELITYiL0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 288 | 27.1M | } | 289 | 1.21M | } |
dirac_dwt.c:vertical_compose_fidelityiL0_10bit Line | Count | Source | 274 | 983k | { | 275 | 983k | int i; | 276 | 983k | TYPE *dst = (TYPE *)_dst; | 277 | 983k | TYPE *b0 = (TYPE *)_b[0]; | 278 | 983k | TYPE *b1 = (TYPE *)_b[1]; | 279 | 983k | TYPE *b2 = (TYPE *)_b[2]; | 280 | 983k | TYPE *b3 = (TYPE *)_b[3]; | 281 | 983k | TYPE *b4 = (TYPE *)_b[4]; | 282 | 983k | TYPE *b5 = (TYPE *)_b[5]; | 283 | 983k | TYPE *b6 = (TYPE *)_b[6]; | 284 | 983k | TYPE *b7 = (TYPE *)_b[7]; | 285 | | | 286 | 29.5M | for(i=0; i<width; i++){ | 287 | 28.5M | dst[i] = COMPOSE_FIDELITYiL0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 288 | 28.5M | } | 289 | 983k | } |
dirac_dwt.c:vertical_compose_fidelityiL0_12bit Line | Count | Source | 274 | 1.44M | { | 275 | 1.44M | int i; | 276 | 1.44M | TYPE *dst = (TYPE *)_dst; | 277 | 1.44M | TYPE *b0 = (TYPE *)_b[0]; | 278 | 1.44M | TYPE *b1 = (TYPE *)_b[1]; | 279 | 1.44M | TYPE *b2 = (TYPE *)_b[2]; | 280 | 1.44M | TYPE *b3 = (TYPE *)_b[3]; | 281 | 1.44M | TYPE *b4 = (TYPE *)_b[4]; | 282 | 1.44M | TYPE *b5 = (TYPE *)_b[5]; | 283 | 1.44M | TYPE *b6 = (TYPE *)_b[6]; | 284 | 1.44M | TYPE *b7 = (TYPE *)_b[7]; | 285 | | | 286 | 25.7M | for(i=0; i<width; i++){ | 287 | 24.2M | dst[i] = COMPOSE_FIDELITYiL0(b0[i], b1[i], b2[i], b3[i], dst[i], b4[i], b5[i], b6[i], b7[i]); | 288 | 24.2M | } | 289 | 1.44M | } |
|
290 | | |
291 | | static void RENAME(vertical_compose_daub97iH0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, int width) |
292 | 987k | { |
293 | 987k | int i; |
294 | 987k | TYPE *b0 = (TYPE *)_b0; |
295 | 987k | TYPE *b1 = (TYPE *)_b1; |
296 | 987k | TYPE *b2 = (TYPE *)_b2; |
297 | | |
298 | 84.6M | for(i=0; i<width; i++){ |
299 | 83.6M | b1[i] = COMPOSE_DAUB97iH0(b0[i], b1[i], b2[i]); |
300 | 83.6M | } |
301 | 987k | } dirac_dwt.c:vertical_compose_daub97iH0_8bit Line | Count | Source | 292 | 401k | { | 293 | 401k | int i; | 294 | 401k | TYPE *b0 = (TYPE *)_b0; | 295 | 401k | TYPE *b1 = (TYPE *)_b1; | 296 | 401k | TYPE *b2 = (TYPE *)_b2; | 297 | | | 298 | 63.1M | for(i=0; i<width; i++){ | 299 | 62.7M | b1[i] = COMPOSE_DAUB97iH0(b0[i], b1[i], b2[i]); | 300 | 62.7M | } | 301 | 401k | } |
dirac_dwt.c:vertical_compose_daub97iH0_10bit Line | Count | Source | 292 | 184k | { | 293 | 184k | int i; | 294 | 184k | TYPE *b0 = (TYPE *)_b0; | 295 | 184k | TYPE *b1 = (TYPE *)_b1; | 296 | 184k | TYPE *b2 = (TYPE *)_b2; | 297 | | | 298 | 7.39M | for(i=0; i<width; i++){ | 299 | 7.20M | b1[i] = COMPOSE_DAUB97iH0(b0[i], b1[i], b2[i]); | 300 | 7.20M | } | 301 | 184k | } |
dirac_dwt.c:vertical_compose_daub97iH0_12bit Line | Count | Source | 292 | 401k | { | 293 | 401k | int i; | 294 | 401k | TYPE *b0 = (TYPE *)_b0; | 295 | 401k | TYPE *b1 = (TYPE *)_b1; | 296 | 401k | TYPE *b2 = (TYPE *)_b2; | 297 | | | 298 | 14.0M | for(i=0; i<width; i++){ | 299 | 13.6M | b1[i] = COMPOSE_DAUB97iH0(b0[i], b1[i], b2[i]); | 300 | 13.6M | } | 301 | 401k | } |
|
302 | | |
303 | | static void RENAME(vertical_compose_daub97iH1)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, int width) |
304 | 990k | { |
305 | 990k | int i; |
306 | 990k | TYPE *b0 = (TYPE *)_b0; |
307 | 990k | TYPE *b1 = (TYPE *)_b1; |
308 | 990k | TYPE *b2 = (TYPE *)_b2; |
309 | | |
310 | 84.7M | for(i=0; i<width; i++){ |
311 | 83.7M | b1[i] = COMPOSE_DAUB97iH1(b0[i], b1[i], b2[i]); |
312 | 83.7M | } |
313 | 990k | } dirac_dwt.c:vertical_compose_daub97iH1_8bit Line | Count | Source | 304 | 402k | { | 305 | 402k | int i; | 306 | 402k | TYPE *b0 = (TYPE *)_b0; | 307 | 402k | TYPE *b1 = (TYPE *)_b1; | 308 | 402k | TYPE *b2 = (TYPE *)_b2; | 309 | | | 310 | 63.2M | for(i=0; i<width; i++){ | 311 | 62.8M | b1[i] = COMPOSE_DAUB97iH1(b0[i], b1[i], b2[i]); | 312 | 62.8M | } | 313 | 402k | } |
dirac_dwt.c:vertical_compose_daub97iH1_10bit Line | Count | Source | 304 | 185k | { | 305 | 185k | int i; | 306 | 185k | TYPE *b0 = (TYPE *)_b0; | 307 | 185k | TYPE *b1 = (TYPE *)_b1; | 308 | 185k | TYPE *b2 = (TYPE *)_b2; | 309 | | | 310 | 7.43M | for(i=0; i<width; i++){ | 311 | 7.24M | b1[i] = COMPOSE_DAUB97iH1(b0[i], b1[i], b2[i]); | 312 | 7.24M | } | 313 | 185k | } |
dirac_dwt.c:vertical_compose_daub97iH1_12bit Line | Count | Source | 304 | 402k | { | 305 | 402k | int i; | 306 | 402k | TYPE *b0 = (TYPE *)_b0; | 307 | 402k | TYPE *b1 = (TYPE *)_b1; | 308 | 402k | TYPE *b2 = (TYPE *)_b2; | 309 | | | 310 | 14.1M | for(i=0; i<width; i++){ | 311 | 13.7M | b1[i] = COMPOSE_DAUB97iH1(b0[i], b1[i], b2[i]); | 312 | 13.7M | } | 313 | 402k | } |
|
314 | | |
315 | | static void RENAME(vertical_compose_daub97iL0)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, int width) |
316 | 990k | { |
317 | 990k | int i; |
318 | 990k | TYPE *b0 = (TYPE *)_b0; |
319 | 990k | TYPE *b1 = (TYPE *)_b1; |
320 | 990k | TYPE *b2 = (TYPE *)_b2; |
321 | | |
322 | 84.7M | for(i=0; i<width; i++){ |
323 | 83.7M | b1[i] = COMPOSE_DAUB97iL0(b0[i], b1[i], b2[i]); |
324 | 83.7M | } |
325 | 990k | } dirac_dwt.c:vertical_compose_daub97iL0_8bit Line | Count | Source | 316 | 402k | { | 317 | 402k | int i; | 318 | 402k | TYPE *b0 = (TYPE *)_b0; | 319 | 402k | TYPE *b1 = (TYPE *)_b1; | 320 | 402k | TYPE *b2 = (TYPE *)_b2; | 321 | | | 322 | 63.2M | for(i=0; i<width; i++){ | 323 | 62.8M | b1[i] = COMPOSE_DAUB97iL0(b0[i], b1[i], b2[i]); | 324 | 62.8M | } | 325 | 402k | } |
dirac_dwt.c:vertical_compose_daub97iL0_10bit Line | Count | Source | 316 | 185k | { | 317 | 185k | int i; | 318 | 185k | TYPE *b0 = (TYPE *)_b0; | 319 | 185k | TYPE *b1 = (TYPE *)_b1; | 320 | 185k | TYPE *b2 = (TYPE *)_b2; | 321 | | | 322 | 7.43M | for(i=0; i<width; i++){ | 323 | 7.24M | b1[i] = COMPOSE_DAUB97iL0(b0[i], b1[i], b2[i]); | 324 | 7.24M | } | 325 | 185k | } |
dirac_dwt.c:vertical_compose_daub97iL0_12bit Line | Count | Source | 316 | 402k | { | 317 | 402k | int i; | 318 | 402k | TYPE *b0 = (TYPE *)_b0; | 319 | 402k | TYPE *b1 = (TYPE *)_b1; | 320 | 402k | TYPE *b2 = (TYPE *)_b2; | 321 | | | 322 | 14.1M | for(i=0; i<width; i++){ | 323 | 13.7M | b1[i] = COMPOSE_DAUB97iL0(b0[i], b1[i], b2[i]); | 324 | 13.7M | } | 325 | 402k | } |
|
326 | | |
327 | | static void RENAME(vertical_compose_daub97iL1)(uint8_t *_b0, uint8_t *_b1, uint8_t *_b2, int width) |
328 | 991k | { |
329 | 991k | int i; |
330 | 991k | TYPE *b0 = (TYPE *)_b0; |
331 | 991k | TYPE *b1 = (TYPE *)_b1; |
332 | 991k | TYPE *b2 = (TYPE *)_b2; |
333 | | |
334 | 84.8M | for(i=0; i<width; i++){ |
335 | 83.8M | b1[i] = COMPOSE_DAUB97iL1(b0[i], b1[i], b2[i]); |
336 | 83.8M | } |
337 | 991k | } dirac_dwt.c:vertical_compose_daub97iL1_8bit Line | Count | Source | 328 | 402k | { | 329 | 402k | int i; | 330 | 402k | TYPE *b0 = (TYPE *)_b0; | 331 | 402k | TYPE *b1 = (TYPE *)_b1; | 332 | 402k | TYPE *b2 = (TYPE *)_b2; | 333 | | | 334 | 63.2M | for(i=0; i<width; i++){ | 335 | 62.8M | b1[i] = COMPOSE_DAUB97iL1(b0[i], b1[i], b2[i]); | 336 | 62.8M | } | 337 | 402k | } |
dirac_dwt.c:vertical_compose_daub97iL1_10bit Line | Count | Source | 328 | 185k | { | 329 | 185k | int i; | 330 | 185k | TYPE *b0 = (TYPE *)_b0; | 331 | 185k | TYPE *b1 = (TYPE *)_b1; | 332 | 185k | TYPE *b2 = (TYPE *)_b2; | 333 | | | 334 | 7.45M | for(i=0; i<width; i++){ | 335 | 7.27M | b1[i] = COMPOSE_DAUB97iL1(b0[i], b1[i], b2[i]); | 336 | 7.27M | } | 337 | 185k | } |
dirac_dwt.c:vertical_compose_daub97iL1_12bit Line | Count | Source | 328 | 403k | { | 329 | 403k | int i; | 330 | 403k | TYPE *b0 = (TYPE *)_b0; | 331 | 403k | TYPE *b1 = (TYPE *)_b1; | 332 | 403k | TYPE *b2 = (TYPE *)_b2; | 333 | | | 334 | 14.1M | for(i=0; i<width; i++){ | 335 | 13.7M | b1[i] = COMPOSE_DAUB97iL1(b0[i], b1[i], b2[i]); | 336 | 13.7M | } | 337 | 403k | } |
|
338 | | |
339 | | static void RENAME(spatial_compose_dd97i_dy)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
340 | 1.82M | { |
341 | 1.82M | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; |
342 | 1.82M | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; |
343 | 1.82M | DWTCompose *cs = d->cs + level; |
344 | | |
345 | 1.82M | int i, y = cs->y; |
346 | 1.82M | uint8_t *b[8]; |
347 | 12.7M | for (i = 0; i < 6; i++) |
348 | 10.9M | b[i] = cs->b[i]; |
349 | 1.82M | b[6] = d->buffer + av_clip(y+5, 0, height-2)*stride; |
350 | 1.82M | b[7] = d->buffer + av_clip(y+6, 1, height-1)*stride; |
351 | | |
352 | 1.82M | if(y+5<(unsigned)height) vertical_compose_l0( b[5], b[6], b[7], width); |
353 | 1.82M | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); |
354 | | |
355 | 1.82M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); |
356 | 1.82M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); |
357 | | |
358 | 12.7M | for (i = 0; i < 6; i++) |
359 | 10.9M | cs->b[i] = b[i+2]; |
360 | 1.82M | cs->y += 2; |
361 | 1.82M | } dirac_dwt.c:spatial_compose_dd97i_dy_8bit Line | Count | Source | 340 | 559k | { | 341 | 559k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 342 | 559k | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 343 | 559k | DWTCompose *cs = d->cs + level; | 344 | | | 345 | 559k | int i, y = cs->y; | 346 | 559k | uint8_t *b[8]; | 347 | 3.91M | for (i = 0; i < 6; i++) | 348 | 3.35M | b[i] = cs->b[i]; | 349 | 559k | b[6] = d->buffer + av_clip(y+5, 0, height-2)*stride; | 350 | 559k | b[7] = d->buffer + av_clip(y+6, 1, height-1)*stride; | 351 | | | 352 | 559k | if(y+5<(unsigned)height) vertical_compose_l0( b[5], b[6], b[7], width); | 353 | 559k | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 354 | | | 355 | 559k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 356 | 559k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 357 | | | 358 | 3.91M | for (i = 0; i < 6; i++) | 359 | 3.35M | cs->b[i] = b[i+2]; | 360 | 559k | cs->y += 2; | 361 | 559k | } |
dirac_dwt.c:spatial_compose_dd97i_dy_10bit Line | Count | Source | 340 | 531k | { | 341 | 531k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 342 | 531k | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 343 | 531k | DWTCompose *cs = d->cs + level; | 344 | | | 345 | 531k | int i, y = cs->y; | 346 | 531k | uint8_t *b[8]; | 347 | 3.72M | for (i = 0; i < 6; i++) | 348 | 3.18M | b[i] = cs->b[i]; | 349 | 531k | b[6] = d->buffer + av_clip(y+5, 0, height-2)*stride; | 350 | 531k | b[7] = d->buffer + av_clip(y+6, 1, height-1)*stride; | 351 | | | 352 | 531k | if(y+5<(unsigned)height) vertical_compose_l0( b[5], b[6], b[7], width); | 353 | 531k | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 354 | | | 355 | 531k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 356 | 531k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 357 | | | 358 | 3.72M | for (i = 0; i < 6; i++) | 359 | 3.18M | cs->b[i] = b[i+2]; | 360 | 531k | cs->y += 2; | 361 | 531k | } |
dirac_dwt.c:spatial_compose_dd97i_dy_12bit Line | Count | Source | 340 | 732k | { | 341 | 732k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 342 | 732k | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 343 | 732k | DWTCompose *cs = d->cs + level; | 344 | | | 345 | 732k | int i, y = cs->y; | 346 | 732k | uint8_t *b[8]; | 347 | 5.12M | for (i = 0; i < 6; i++) | 348 | 4.39M | b[i] = cs->b[i]; | 349 | 732k | b[6] = d->buffer + av_clip(y+5, 0, height-2)*stride; | 350 | 732k | b[7] = d->buffer + av_clip(y+6, 1, height-1)*stride; | 351 | | | 352 | 732k | if(y+5<(unsigned)height) vertical_compose_l0( b[5], b[6], b[7], width); | 353 | 732k | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 354 | | | 355 | 732k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 356 | 732k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 357 | | | 358 | 5.12M | for (i = 0; i < 6; i++) | 359 | 4.39M | cs->b[i] = b[i+2]; | 360 | 732k | cs->y += 2; | 361 | 732k | } |
|
362 | | |
363 | | static void RENAME(spatial_compose_dirac53i_dy)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
364 | 2.84M | { |
365 | 2.84M | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; |
366 | 2.84M | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; |
367 | 2.84M | DWTCompose *cs = d->cs + level; |
368 | | |
369 | 2.84M | int y= cs->y; |
370 | 2.84M | uint8_t *b[4] = { cs->b[0], cs->b[1] }; |
371 | 2.84M | b[2] = d->buffer + avpriv_mirror(y+1, height-1)*stride; |
372 | 2.84M | b[3] = d->buffer + avpriv_mirror(y+2, height-1)*stride; |
373 | | |
374 | 2.84M | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); |
375 | 2.84M | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); |
376 | | |
377 | 2.84M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); |
378 | 2.84M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); |
379 | | |
380 | 2.84M | cs->b[0] = b[2]; |
381 | 2.84M | cs->b[1] = b[3]; |
382 | 2.84M | cs->y += 2; |
383 | 2.84M | } dirac_dwt.c:spatial_compose_dirac53i_dy_8bit Line | Count | Source | 364 | 1.24M | { | 365 | 1.24M | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 366 | 1.24M | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 367 | 1.24M | DWTCompose *cs = d->cs + level; | 368 | | | 369 | 1.24M | int y= cs->y; | 370 | 1.24M | uint8_t *b[4] = { cs->b[0], cs->b[1] }; | 371 | 1.24M | b[2] = d->buffer + avpriv_mirror(y+1, height-1)*stride; | 372 | 1.24M | b[3] = d->buffer + avpriv_mirror(y+2, height-1)*stride; | 373 | | | 374 | 1.24M | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 375 | 1.24M | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 376 | | | 377 | 1.24M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 378 | 1.24M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 379 | | | 380 | 1.24M | cs->b[0] = b[2]; | 381 | 1.24M | cs->b[1] = b[3]; | 382 | 1.24M | cs->y += 2; | 383 | 1.24M | } |
dirac_dwt.c:spatial_compose_dirac53i_dy_10bit Line | Count | Source | 364 | 1.04M | { | 365 | 1.04M | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 366 | 1.04M | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 367 | 1.04M | DWTCompose *cs = d->cs + level; | 368 | | | 369 | 1.04M | int y= cs->y; | 370 | 1.04M | uint8_t *b[4] = { cs->b[0], cs->b[1] }; | 371 | 1.04M | b[2] = d->buffer + avpriv_mirror(y+1, height-1)*stride; | 372 | 1.04M | b[3] = d->buffer + avpriv_mirror(y+2, height-1)*stride; | 373 | | | 374 | 1.04M | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 375 | 1.04M | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 376 | | | 377 | 1.04M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 378 | 1.04M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 379 | | | 380 | 1.04M | cs->b[0] = b[2]; | 381 | 1.04M | cs->b[1] = b[3]; | 382 | 1.04M | cs->y += 2; | 383 | 1.04M | } |
dirac_dwt.c:spatial_compose_dirac53i_dy_12bit Line | Count | Source | 364 | 553k | { | 365 | 553k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 366 | 553k | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 367 | 553k | DWTCompose *cs = d->cs + level; | 368 | | | 369 | 553k | int y= cs->y; | 370 | 553k | uint8_t *b[4] = { cs->b[0], cs->b[1] }; | 371 | 553k | b[2] = d->buffer + avpriv_mirror(y+1, height-1)*stride; | 372 | 553k | b[3] = d->buffer + avpriv_mirror(y+2, height-1)*stride; | 373 | | | 374 | 553k | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 375 | 553k | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 376 | | | 377 | 553k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 378 | 553k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 379 | | | 380 | 553k | cs->b[0] = b[2]; | 381 | 553k | cs->b[1] = b[3]; | 382 | 553k | cs->y += 2; | 383 | 553k | } |
|
384 | | |
385 | | static void RENAME(spatial_compose_dd137i_dy)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
386 | 4.02M | { |
387 | 4.02M | vertical_compose_5tap vertical_compose_l0 = d->vertical_compose_l0.tap5; |
388 | 4.02M | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; |
389 | 4.02M | DWTCompose *cs = d->cs + level; |
390 | | |
391 | 4.02M | int i, y = cs->y; |
392 | 4.02M | uint8_t *b[10]; |
393 | 36.2M | for (i = 0; i < 8; i++) |
394 | 32.1M | b[i] = cs->b[i]; |
395 | 4.02M | b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride; |
396 | 4.02M | b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride; |
397 | | |
398 | 4.02M | if(y+5<(unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width); |
399 | 4.02M | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); |
400 | | |
401 | 4.02M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); |
402 | 4.02M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); |
403 | | |
404 | 36.2M | for (i = 0; i < 8; i++) |
405 | 32.1M | cs->b[i] = b[i+2]; |
406 | 4.02M | cs->y += 2; |
407 | 4.02M | } dirac_dwt.c:spatial_compose_dd137i_dy_8bit Line | Count | Source | 386 | 2.33M | { | 387 | 2.33M | vertical_compose_5tap vertical_compose_l0 = d->vertical_compose_l0.tap5; | 388 | 2.33M | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 389 | 2.33M | DWTCompose *cs = d->cs + level; | 390 | | | 391 | 2.33M | int i, y = cs->y; | 392 | 2.33M | uint8_t *b[10]; | 393 | 21.0M | for (i = 0; i < 8; i++) | 394 | 18.6M | b[i] = cs->b[i]; | 395 | 2.33M | b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride; | 396 | 2.33M | b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride; | 397 | | | 398 | 2.33M | if(y+5<(unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width); | 399 | 2.33M | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 400 | | | 401 | 2.33M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 402 | 2.33M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 403 | | | 404 | 21.0M | for (i = 0; i < 8; i++) | 405 | 18.6M | cs->b[i] = b[i+2]; | 406 | 2.33M | cs->y += 2; | 407 | 2.33M | } |
dirac_dwt.c:spatial_compose_dd137i_dy_10bit Line | Count | Source | 386 | 995k | { | 387 | 995k | vertical_compose_5tap vertical_compose_l0 = d->vertical_compose_l0.tap5; | 388 | 995k | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 389 | 995k | DWTCompose *cs = d->cs + level; | 390 | | | 391 | 995k | int i, y = cs->y; | 392 | 995k | uint8_t *b[10]; | 393 | 8.95M | for (i = 0; i < 8; i++) | 394 | 7.96M | b[i] = cs->b[i]; | 395 | 995k | b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride; | 396 | 995k | b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride; | 397 | | | 398 | 995k | if(y+5<(unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width); | 399 | 995k | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 400 | | | 401 | 995k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 402 | 995k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 403 | | | 404 | 8.95M | for (i = 0; i < 8; i++) | 405 | 7.96M | cs->b[i] = b[i+2]; | 406 | 995k | cs->y += 2; | 407 | 995k | } |
dirac_dwt.c:spatial_compose_dd137i_dy_12bit Line | Count | Source | 386 | 693k | { | 387 | 693k | vertical_compose_5tap vertical_compose_l0 = d->vertical_compose_l0.tap5; | 388 | 693k | vertical_compose_5tap vertical_compose_h0 = d->vertical_compose_h0.tap5; | 389 | 693k | DWTCompose *cs = d->cs + level; | 390 | | | 391 | 693k | int i, y = cs->y; | 392 | 693k | uint8_t *b[10]; | 393 | 6.24M | for (i = 0; i < 8; i++) | 394 | 5.54M | b[i] = cs->b[i]; | 395 | 693k | b[8] = d->buffer + av_clip(y+7, 0, height-2)*stride; | 396 | 693k | b[9] = d->buffer + av_clip(y+8, 1, height-1)*stride; | 397 | | | 398 | 693k | if(y+5<(unsigned)height) vertical_compose_l0(b[3], b[5], b[6], b[7], b[9], width); | 399 | 693k | if(y+1<(unsigned)height) vertical_compose_h0(b[0], b[2], b[3], b[4], b[6], width); | 400 | | | 401 | 693k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 402 | 693k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 403 | | | 404 | 6.24M | for (i = 0; i < 8; i++) | 405 | 5.54M | cs->b[i] = b[i+2]; | 406 | 693k | cs->y += 2; | 407 | 693k | } |
|
408 | | |
409 | | // haar makes the assumption that height is even (always true for dirac) |
410 | | static void RENAME(spatial_compose_haari_dy)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
411 | 1.70M | { |
412 | 1.70M | vertical_compose_2tap vertical_compose = d->vertical_compose; |
413 | 1.70M | int y = d->cs[level].y; |
414 | 1.70M | uint8_t *b0 = d->buffer + (y-1)*stride; |
415 | 1.70M | uint8_t *b1 = d->buffer + (y )*stride; |
416 | | |
417 | 1.70M | vertical_compose(b0, b1, width); |
418 | 1.70M | d->horizontal_compose(b0, d->temp, width); |
419 | 1.70M | d->horizontal_compose(b1, d->temp, width); |
420 | | |
421 | 1.70M | d->cs[level].y += 2; |
422 | 1.70M | } dirac_dwt.c:spatial_compose_haari_dy_8bit Line | Count | Source | 411 | 899k | { | 412 | 899k | vertical_compose_2tap vertical_compose = d->vertical_compose; | 413 | 899k | int y = d->cs[level].y; | 414 | 899k | uint8_t *b0 = d->buffer + (y-1)*stride; | 415 | 899k | uint8_t *b1 = d->buffer + (y )*stride; | 416 | | | 417 | 899k | vertical_compose(b0, b1, width); | 418 | 899k | d->horizontal_compose(b0, d->temp, width); | 419 | 899k | d->horizontal_compose(b1, d->temp, width); | 420 | | | 421 | 899k | d->cs[level].y += 2; | 422 | 899k | } |
dirac_dwt.c:spatial_compose_haari_dy_10bit Line | Count | Source | 411 | 547k | { | 412 | 547k | vertical_compose_2tap vertical_compose = d->vertical_compose; | 413 | 547k | int y = d->cs[level].y; | 414 | 547k | uint8_t *b0 = d->buffer + (y-1)*stride; | 415 | 547k | uint8_t *b1 = d->buffer + (y )*stride; | 416 | | | 417 | 547k | vertical_compose(b0, b1, width); | 418 | 547k | d->horizontal_compose(b0, d->temp, width); | 419 | 547k | d->horizontal_compose(b1, d->temp, width); | 420 | | | 421 | 547k | d->cs[level].y += 2; | 422 | 547k | } |
dirac_dwt.c:spatial_compose_haari_dy_12bit Line | Count | Source | 411 | 258k | { | 412 | 258k | vertical_compose_2tap vertical_compose = d->vertical_compose; | 413 | 258k | int y = d->cs[level].y; | 414 | 258k | uint8_t *b0 = d->buffer + (y-1)*stride; | 415 | 258k | uint8_t *b1 = d->buffer + (y )*stride; | 416 | | | 417 | 258k | vertical_compose(b0, b1, width); | 418 | 258k | d->horizontal_compose(b0, d->temp, width); | 419 | 258k | d->horizontal_compose(b1, d->temp, width); | 420 | | | 421 | 258k | d->cs[level].y += 2; | 422 | 258k | } |
|
423 | | |
424 | | // Don't do sliced idwt for fidelity; the 9 tap filter makes it a bit annoying |
425 | | // Fortunately, this filter isn't used in practice. |
426 | | static void RENAME(spatial_compose_fidelity)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
427 | 13.9k | { |
428 | 13.9k | vertical_compose_9tap vertical_compose_l0 = d->vertical_compose_l0.tap9; |
429 | 13.9k | vertical_compose_9tap vertical_compose_h0 = d->vertical_compose_h0.tap9; |
430 | 13.9k | int i, y; |
431 | 13.9k | uint8_t *b[8]; |
432 | | |
433 | 3.65M | for (y = 1; y < height; y += 2) { |
434 | 32.8M | for (i = 0; i < 8; i++) |
435 | 29.1M | b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride; |
436 | 3.64M | vertical_compose_h0(d->buffer + y*stride, b, width); |
437 | 3.64M | } |
438 | | |
439 | 3.65M | for (y = 0; y < height; y += 2) { |
440 | 32.8M | for (i = 0; i < 8; i++) |
441 | 29.1M | b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride; |
442 | 3.64M | vertical_compose_l0(d->buffer + y*stride, b, width); |
443 | 3.64M | } |
444 | | |
445 | 7.30M | for (y = 0; y < height; y++) |
446 | 7.28M | d->horizontal_compose(d->buffer + y*stride, d->temp, width); |
447 | | |
448 | 13.9k | d->cs[level].y = height+1; |
449 | 13.9k | } dirac_dwt.c:spatial_compose_fidelity_8bit Line | Count | Source | 427 | 5.59k | { | 428 | 5.59k | vertical_compose_9tap vertical_compose_l0 = d->vertical_compose_l0.tap9; | 429 | 5.59k | vertical_compose_9tap vertical_compose_h0 = d->vertical_compose_h0.tap9; | 430 | 5.59k | int i, y; | 431 | 5.59k | uint8_t *b[8]; | 432 | | | 433 | 1.21M | for (y = 1; y < height; y += 2) { | 434 | 10.9M | for (i = 0; i < 8; i++) | 435 | 9.69M | b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride; | 436 | 1.21M | vertical_compose_h0(d->buffer + y*stride, b, width); | 437 | 1.21M | } | 438 | | | 439 | 1.21M | for (y = 0; y < height; y += 2) { | 440 | 10.9M | for (i = 0; i < 8; i++) | 441 | 9.69M | b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride; | 442 | 1.21M | vertical_compose_l0(d->buffer + y*stride, b, width); | 443 | 1.21M | } | 444 | | | 445 | 2.42M | for (y = 0; y < height; y++) | 446 | 2.42M | d->horizontal_compose(d->buffer + y*stride, d->temp, width); | 447 | | | 448 | 5.59k | d->cs[level].y = height+1; | 449 | 5.59k | } |
dirac_dwt.c:spatial_compose_fidelity_10bit Line | Count | Source | 427 | 3.81k | { | 428 | 3.81k | vertical_compose_9tap vertical_compose_l0 = d->vertical_compose_l0.tap9; | 429 | 3.81k | vertical_compose_9tap vertical_compose_h0 = d->vertical_compose_h0.tap9; | 430 | 3.81k | int i, y; | 431 | 3.81k | uint8_t *b[8]; | 432 | | | 433 | 987k | for (y = 1; y < height; y += 2) { | 434 | 8.84M | for (i = 0; i < 8; i++) | 435 | 7.86M | b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride; | 436 | 983k | vertical_compose_h0(d->buffer + y*stride, b, width); | 437 | 983k | } | 438 | | | 439 | 987k | for (y = 0; y < height; y += 2) { | 440 | 8.84M | for (i = 0; i < 8; i++) | 441 | 7.86M | b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride; | 442 | 983k | vertical_compose_l0(d->buffer + y*stride, b, width); | 443 | 983k | } | 444 | | | 445 | 1.97M | for (y = 0; y < height; y++) | 446 | 1.96M | d->horizontal_compose(d->buffer + y*stride, d->temp, width); | 447 | | | 448 | 3.81k | d->cs[level].y = height+1; | 449 | 3.81k | } |
dirac_dwt.c:spatial_compose_fidelity_12bit Line | Count | Source | 427 | 4.56k | { | 428 | 4.56k | vertical_compose_9tap vertical_compose_l0 = d->vertical_compose_l0.tap9; | 429 | 4.56k | vertical_compose_9tap vertical_compose_h0 = d->vertical_compose_h0.tap9; | 430 | 4.56k | int i, y; | 431 | 4.56k | uint8_t *b[8]; | 432 | | | 433 | 1.45M | for (y = 1; y < height; y += 2) { | 434 | 13.0M | for (i = 0; i < 8; i++) | 435 | 11.5M | b[i] = d->buffer + av_clip((y-7 + 2*i), 0, height-2)*stride; | 436 | 1.44M | vertical_compose_h0(d->buffer + y*stride, b, width); | 437 | 1.44M | } | 438 | | | 439 | 1.45M | for (y = 0; y < height; y += 2) { | 440 | 13.0M | for (i = 0; i < 8; i++) | 441 | 11.5M | b[i] = d->buffer + av_clip((y-7 + 2*i), 1, height-1)*stride; | 442 | 1.44M | vertical_compose_l0(d->buffer + y*stride, b, width); | 443 | 1.44M | } | 444 | | | 445 | 2.90M | for (y = 0; y < height; y++) | 446 | 2.89M | d->horizontal_compose(d->buffer + y*stride, d->temp, width); | 447 | | | 448 | 4.56k | d->cs[level].y = height+1; | 449 | 4.56k | } |
|
450 | | |
451 | | static void RENAME(spatial_compose_daub97i_dy)(DWTContext *d, int level, int width, int height, ptrdiff_t stride) |
452 | 1.01M | { |
453 | 1.01M | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; |
454 | 1.01M | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; |
455 | 1.01M | vertical_compose_3tap vertical_compose_l1 = d->vertical_compose_l1; |
456 | 1.01M | vertical_compose_3tap vertical_compose_h1 = d->vertical_compose_h1; |
457 | 1.01M | DWTCompose *cs = d->cs + level; |
458 | | |
459 | 1.01M | int i, y = cs->y; |
460 | 1.01M | uint8_t *b[6]; |
461 | 5.05M | for (i = 0; i < 4; i++) |
462 | 4.04M | b[i] = cs->b[i]; |
463 | 1.01M | b[4] = d->buffer + avpriv_mirror(y+3, height-1)*stride; |
464 | 1.01M | b[5] = d->buffer + avpriv_mirror(y+4, height-1)*stride; |
465 | | |
466 | 1.01M | if(y+3<(unsigned)height) vertical_compose_l1(b[3], b[4], b[5], width); |
467 | 1.01M | if(y+2<(unsigned)height) vertical_compose_h1(b[2], b[3], b[4], width); |
468 | 1.01M | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); |
469 | 1.01M | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); |
470 | | |
471 | 1.01M | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); |
472 | 1.01M | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); |
473 | | |
474 | 5.05M | for (i = 0; i < 4; i++) |
475 | 4.04M | cs->b[i] = b[i+2]; |
476 | 1.01M | cs->y += 2; |
477 | 1.01M | } dirac_dwt.c:spatial_compose_daub97i_dy_8bit Line | Count | Source | 452 | 410k | { | 453 | 410k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 454 | 410k | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 455 | 410k | vertical_compose_3tap vertical_compose_l1 = d->vertical_compose_l1; | 456 | 410k | vertical_compose_3tap vertical_compose_h1 = d->vertical_compose_h1; | 457 | 410k | DWTCompose *cs = d->cs + level; | 458 | | | 459 | 410k | int i, y = cs->y; | 460 | 410k | uint8_t *b[6]; | 461 | 2.05M | for (i = 0; i < 4; i++) | 462 | 1.64M | b[i] = cs->b[i]; | 463 | 410k | b[4] = d->buffer + avpriv_mirror(y+3, height-1)*stride; | 464 | 410k | b[5] = d->buffer + avpriv_mirror(y+4, height-1)*stride; | 465 | | | 466 | 410k | if(y+3<(unsigned)height) vertical_compose_l1(b[3], b[4], b[5], width); | 467 | 410k | if(y+2<(unsigned)height) vertical_compose_h1(b[2], b[3], b[4], width); | 468 | 410k | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 469 | 410k | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 470 | | | 471 | 410k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 472 | 410k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 473 | | | 474 | 2.05M | for (i = 0; i < 4; i++) | 475 | 1.64M | cs->b[i] = b[i+2]; | 476 | 410k | cs->y += 2; | 477 | 410k | } |
dirac_dwt.c:spatial_compose_daub97i_dy_10bit Line | Count | Source | 452 | 191k | { | 453 | 191k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 454 | 191k | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 455 | 191k | vertical_compose_3tap vertical_compose_l1 = d->vertical_compose_l1; | 456 | 191k | vertical_compose_3tap vertical_compose_h1 = d->vertical_compose_h1; | 457 | 191k | DWTCompose *cs = d->cs + level; | 458 | | | 459 | 191k | int i, y = cs->y; | 460 | 191k | uint8_t *b[6]; | 461 | 957k | for (i = 0; i < 4; i++) | 462 | 766k | b[i] = cs->b[i]; | 463 | 191k | b[4] = d->buffer + avpriv_mirror(y+3, height-1)*stride; | 464 | 191k | b[5] = d->buffer + avpriv_mirror(y+4, height-1)*stride; | 465 | | | 466 | 191k | if(y+3<(unsigned)height) vertical_compose_l1(b[3], b[4], b[5], width); | 467 | 191k | if(y+2<(unsigned)height) vertical_compose_h1(b[2], b[3], b[4], width); | 468 | 191k | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 469 | 191k | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 470 | | | 471 | 191k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 472 | 191k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 473 | | | 474 | 957k | for (i = 0; i < 4; i++) | 475 | 766k | cs->b[i] = b[i+2]; | 476 | 191k | cs->y += 2; | 477 | 191k | } |
dirac_dwt.c:spatial_compose_daub97i_dy_12bit Line | Count | Source | 452 | 408k | { | 453 | 408k | vertical_compose_3tap vertical_compose_l0 = d->vertical_compose_l0.tap3; | 454 | 408k | vertical_compose_3tap vertical_compose_h0 = d->vertical_compose_h0.tap3; | 455 | 408k | vertical_compose_3tap vertical_compose_l1 = d->vertical_compose_l1; | 456 | 408k | vertical_compose_3tap vertical_compose_h1 = d->vertical_compose_h1; | 457 | 408k | DWTCompose *cs = d->cs + level; | 458 | | | 459 | 408k | int i, y = cs->y; | 460 | 408k | uint8_t *b[6]; | 461 | 2.04M | for (i = 0; i < 4; i++) | 462 | 1.63M | b[i] = cs->b[i]; | 463 | 408k | b[4] = d->buffer + avpriv_mirror(y+3, height-1)*stride; | 464 | 408k | b[5] = d->buffer + avpriv_mirror(y+4, height-1)*stride; | 465 | | | 466 | 408k | if(y+3<(unsigned)height) vertical_compose_l1(b[3], b[4], b[5], width); | 467 | 408k | if(y+2<(unsigned)height) vertical_compose_h1(b[2], b[3], b[4], width); | 468 | 408k | if(y+1<(unsigned)height) vertical_compose_l0(b[1], b[2], b[3], width); | 469 | 408k | if(y+0<(unsigned)height) vertical_compose_h0(b[0], b[1], b[2], width); | 470 | | | 471 | 408k | if(y-1<(unsigned)height) d->horizontal_compose(b[0], d->temp, width); | 472 | 408k | if(y+0<(unsigned)height) d->horizontal_compose(b[1], d->temp, width); | 473 | | | 474 | 2.04M | for (i = 0; i < 4; i++) | 475 | 1.63M | cs->b[i] = b[i+2]; | 476 | 408k | cs->y += 2; | 477 | 408k | } |
|
478 | | |
479 | | static void RENAME(spatial_compose97i_init)(DWTCompose *cs, uint8_t *buffer, int height, ptrdiff_t stride) |
480 | 11.9k | { |
481 | 11.9k | cs->b[0] = buffer + avpriv_mirror(-3-1, height-1)*stride; |
482 | 11.9k | cs->b[1] = buffer + avpriv_mirror(-3 , height-1)*stride; |
483 | 11.9k | cs->b[2] = buffer + avpriv_mirror(-3+1, height-1)*stride; |
484 | 11.9k | cs->b[3] = buffer + avpriv_mirror(-3+2, height-1)*stride; |
485 | 11.9k | cs->y = -3; |
486 | 11.9k | } dirac_dwt.c:spatial_compose97i_init_8bit Line | Count | Source | 480 | 4.56k | { | 481 | 4.56k | cs->b[0] = buffer + avpriv_mirror(-3-1, height-1)*stride; | 482 | 4.56k | cs->b[1] = buffer + avpriv_mirror(-3 , height-1)*stride; | 483 | 4.56k | cs->b[2] = buffer + avpriv_mirror(-3+1, height-1)*stride; | 484 | 4.56k | cs->b[3] = buffer + avpriv_mirror(-3+2, height-1)*stride; | 485 | 4.56k | cs->y = -3; | 486 | 4.56k | } |
dirac_dwt.c:spatial_compose97i_init_10bit Line | Count | Source | 480 | 3.73k | { | 481 | 3.73k | cs->b[0] = buffer + avpriv_mirror(-3-1, height-1)*stride; | 482 | 3.73k | cs->b[1] = buffer + avpriv_mirror(-3 , height-1)*stride; | 483 | 3.73k | cs->b[2] = buffer + avpriv_mirror(-3+1, height-1)*stride; | 484 | 3.73k | cs->b[3] = buffer + avpriv_mirror(-3+2, height-1)*stride; | 485 | 3.73k | cs->y = -3; | 486 | 3.73k | } |
dirac_dwt.c:spatial_compose97i_init_12bit Line | Count | Source | 480 | 3.61k | { | 481 | 3.61k | cs->b[0] = buffer + avpriv_mirror(-3-1, height-1)*stride; | 482 | 3.61k | cs->b[1] = buffer + avpriv_mirror(-3 , height-1)*stride; | 483 | 3.61k | cs->b[2] = buffer + avpriv_mirror(-3+1, height-1)*stride; | 484 | 3.61k | cs->b[3] = buffer + avpriv_mirror(-3+2, height-1)*stride; | 485 | 3.61k | cs->y = -3; | 486 | 3.61k | } |
|
487 | | |
488 | | static void RENAME(spatial_compose53i_init)(DWTCompose *cs, uint8_t *buffer, int height, ptrdiff_t stride) |
489 | 15.5k | { |
490 | 15.5k | cs->b[0] = buffer + avpriv_mirror(-1-1, height-1)*stride; |
491 | 15.5k | cs->b[1] = buffer + avpriv_mirror(-1 , height-1)*stride; |
492 | 15.5k | cs->y = -1; |
493 | 15.5k | } dirac_dwt.c:spatial_compose53i_init_8bit Line | Count | Source | 489 | 9.32k | { | 490 | 9.32k | cs->b[0] = buffer + avpriv_mirror(-1-1, height-1)*stride; | 491 | 9.32k | cs->b[1] = buffer + avpriv_mirror(-1 , height-1)*stride; | 492 | 9.32k | cs->y = -1; | 493 | 9.32k | } |
dirac_dwt.c:spatial_compose53i_init_10bit Line | Count | Source | 489 | 3.59k | { | 490 | 3.59k | cs->b[0] = buffer + avpriv_mirror(-1-1, height-1)*stride; | 491 | 3.59k | cs->b[1] = buffer + avpriv_mirror(-1 , height-1)*stride; | 492 | 3.59k | cs->y = -1; | 493 | 3.59k | } |
dirac_dwt.c:spatial_compose53i_init_12bit Line | Count | Source | 489 | 2.66k | { | 490 | 2.66k | cs->b[0] = buffer + avpriv_mirror(-1-1, height-1)*stride; | 491 | 2.66k | cs->b[1] = buffer + avpriv_mirror(-1 , height-1)*stride; | 492 | 2.66k | cs->y = -1; | 493 | 2.66k | } |
|
494 | | |
495 | | static void RENAME(spatial_compose_dd97i_init)(DWTCompose *cs, uint8_t *buffer, int height, ptrdiff_t stride) |
496 | 29.1k | { |
497 | 29.1k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; |
498 | 29.1k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; |
499 | 29.1k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; |
500 | 29.1k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; |
501 | 29.1k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; |
502 | 29.1k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; |
503 | 29.1k | cs->y = -5; |
504 | 29.1k | } dirac_dwt.c:spatial_compose_dd97i_init_8bit Line | Count | Source | 496 | 12.0k | { | 497 | 12.0k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 498 | 12.0k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 499 | 12.0k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 500 | 12.0k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 501 | 12.0k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 502 | 12.0k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 503 | 12.0k | cs->y = -5; | 504 | 12.0k | } |
dirac_dwt.c:spatial_compose_dd97i_init_10bit Line | Count | Source | 496 | 8.74k | { | 497 | 8.74k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 498 | 8.74k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 499 | 8.74k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 500 | 8.74k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 501 | 8.74k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 502 | 8.74k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 503 | 8.74k | cs->y = -5; | 504 | 8.74k | } |
dirac_dwt.c:spatial_compose_dd97i_init_12bit Line | Count | Source | 496 | 8.39k | { | 497 | 8.39k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 498 | 8.39k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 499 | 8.39k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 500 | 8.39k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 501 | 8.39k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 502 | 8.39k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 503 | 8.39k | cs->y = -5; | 504 | 8.39k | } |
|
505 | | |
506 | | static void RENAME(spatial_compose_dd137i_init)(DWTCompose *cs, uint8_t *buffer, int height, ptrdiff_t stride) |
507 | 45.2k | { |
508 | 45.2k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; |
509 | 45.2k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; |
510 | 45.2k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; |
511 | 45.2k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; |
512 | 45.2k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; |
513 | 45.2k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; |
514 | 45.2k | cs->b[6] = buffer + av_clip(-5+5, 0, height-2)*stride; |
515 | 45.2k | cs->b[7] = buffer + av_clip(-5+6, 1, height-1)*stride; |
516 | 45.2k | cs->y = -5; |
517 | 45.2k | } dirac_dwt.c:spatial_compose_dd137i_init_8bit Line | Count | Source | 507 | 23.9k | { | 508 | 23.9k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 509 | 23.9k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 510 | 23.9k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 511 | 23.9k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 512 | 23.9k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 513 | 23.9k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 514 | 23.9k | cs->b[6] = buffer + av_clip(-5+5, 0, height-2)*stride; | 515 | 23.9k | cs->b[7] = buffer + av_clip(-5+6, 1, height-1)*stride; | 516 | 23.9k | cs->y = -5; | 517 | 23.9k | } |
dirac_dwt.c:spatial_compose_dd137i_init_10bit Line | Count | Source | 507 | 15.8k | { | 508 | 15.8k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 509 | 15.8k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 510 | 15.8k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 511 | 15.8k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 512 | 15.8k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 513 | 15.8k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 514 | 15.8k | cs->b[6] = buffer + av_clip(-5+5, 0, height-2)*stride; | 515 | 15.8k | cs->b[7] = buffer + av_clip(-5+6, 1, height-1)*stride; | 516 | 15.8k | cs->y = -5; | 517 | 15.8k | } |
dirac_dwt.c:spatial_compose_dd137i_init_12bit Line | Count | Source | 507 | 5.38k | { | 508 | 5.38k | cs->b[0] = buffer + av_clip(-5-1, 0, height-2)*stride; | 509 | 5.38k | cs->b[1] = buffer + av_clip(-5 , 1, height-1)*stride; | 510 | 5.38k | cs->b[2] = buffer + av_clip(-5+1, 0, height-2)*stride; | 511 | 5.38k | cs->b[3] = buffer + av_clip(-5+2, 1, height-1)*stride; | 512 | 5.38k | cs->b[4] = buffer + av_clip(-5+3, 0, height-2)*stride; | 513 | 5.38k | cs->b[5] = buffer + av_clip(-5+4, 1, height-1)*stride; | 514 | 5.38k | cs->b[6] = buffer + av_clip(-5+5, 0, height-2)*stride; | 515 | 5.38k | cs->b[7] = buffer + av_clip(-5+6, 1, height-1)*stride; | 516 | 5.38k | cs->y = -5; | 517 | 5.38k | } |
|
518 | | |
519 | | static int RENAME(spatial_idwt_init)(DWTContext *d, enum dwt_type type) |
520 | 102k | { |
521 | 102k | int level; |
522 | | |
523 | 102k | d->temp = (uint8_t *)(((TYPE *)d->temp) + 8); |
524 | | |
525 | 278k | for (level = d->decomposition_count - 1; level >= 0; level--){ |
526 | 176k | int hl = d->height >> level; |
527 | 176k | ptrdiff_t stride_l = d->stride << level; |
528 | | |
529 | 176k | switch(type){ |
530 | 29.1k | case DWT_DIRAC_DD9_7: |
531 | 29.1k | RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l); |
532 | 29.1k | break; |
533 | 15.5k | case DWT_DIRAC_LEGALL5_3: |
534 | 15.5k | RENAME(spatial_compose53i_init)(d->cs+level, d->buffer, hl, stride_l); |
535 | 15.5k | break; |
536 | 45.2k | case DWT_DIRAC_DD13_7: |
537 | 45.2k | RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l); |
538 | 45.2k | break; |
539 | 21.8k | case DWT_DIRAC_HAAR0: |
540 | 60.5k | case DWT_DIRAC_HAAR1: |
541 | 60.5k | d->cs[level].y = 1; |
542 | 60.5k | break; |
543 | 11.9k | case DWT_DIRAC_DAUB9_7: |
544 | 11.9k | RENAME(spatial_compose97i_init)(d->cs+level, d->buffer, hl, stride_l); |
545 | 11.9k | break; |
546 | 14.0k | default: |
547 | 14.0k | d->cs[level].y = 0; |
548 | 14.0k | break; |
549 | 176k | } |
550 | 176k | } |
551 | | |
552 | 102k | switch (type) { |
553 | 33.7k | case DWT_DIRAC_DD9_7: |
554 | 33.7k | d->spatial_compose = RENAME(spatial_compose_dd97i_dy); |
555 | 33.7k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); |
556 | 33.7k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); |
557 | 33.7k | d->horizontal_compose = RENAME(horizontal_compose_dd97i); |
558 | 33.7k | d->support = 7; |
559 | 33.7k | break; |
560 | 12.0k | case DWT_DIRAC_LEGALL5_3: |
561 | 12.0k | d->spatial_compose = RENAME(spatial_compose_dirac53i_dy); |
562 | 12.0k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); |
563 | 12.0k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_dirac53iH0); |
564 | 12.0k | d->horizontal_compose = RENAME(horizontal_compose_dirac53i); |
565 | 12.0k | d->support = 3; |
566 | 12.0k | break; |
567 | 24.2k | case DWT_DIRAC_DD13_7: |
568 | 24.2k | d->spatial_compose = RENAME(spatial_compose_dd137i_dy); |
569 | 24.2k | d->vertical_compose_l0.tap5 = RENAME(vertical_compose_dd137iL0); |
570 | 24.2k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); |
571 | 24.2k | d->horizontal_compose = RENAME(horizontal_compose_dd137i); |
572 | 24.2k | d->support = 7; |
573 | 24.2k | break; |
574 | 10.7k | case DWT_DIRAC_HAAR0: |
575 | 21.0k | case DWT_DIRAC_HAAR1: |
576 | 21.0k | d->spatial_compose = RENAME(spatial_compose_haari_dy); |
577 | 21.0k | d->vertical_compose = RENAME(vertical_compose_haar); |
578 | 21.0k | if (type == DWT_DIRAC_HAAR0) |
579 | 10.7k | d->horizontal_compose = RENAME(horizontal_compose_haar0i); |
580 | 10.3k | else |
581 | 10.3k | d->horizontal_compose = RENAME(horizontal_compose_haar1i); |
582 | 21.0k | d->support = 1; |
583 | 21.0k | break; |
584 | 7.00k | case DWT_DIRAC_FIDELITY: |
585 | 7.00k | d->spatial_compose = RENAME(spatial_compose_fidelity); |
586 | 7.00k | d->vertical_compose_l0.tap9 = RENAME(vertical_compose_fidelityiL0); |
587 | 7.00k | d->vertical_compose_h0.tap9 = RENAME(vertical_compose_fidelityiH0); |
588 | 7.00k | d->horizontal_compose = RENAME(horizontal_compose_fidelityi); |
589 | 7.00k | d->support = 0; // not really used |
590 | 7.00k | break; |
591 | 4.09k | case DWT_DIRAC_DAUB9_7: |
592 | 4.09k | d->spatial_compose = RENAME(spatial_compose_daub97i_dy); |
593 | 4.09k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose_daub97iL0); |
594 | 4.09k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_daub97iH0); |
595 | 4.09k | d->vertical_compose_l1 = RENAME(vertical_compose_daub97iL1); |
596 | 4.09k | d->vertical_compose_h1 = RENAME(vertical_compose_daub97iH1); |
597 | 4.09k | d->horizontal_compose = RENAME(horizontal_compose_daub97i); |
598 | 4.09k | d->support = 5; |
599 | 4.09k | break; |
600 | 0 | default: |
601 | 0 | return AVERROR_INVALIDDATA; |
602 | 102k | } |
603 | | |
604 | 102k | return 0; |
605 | 102k | } dirac_dwt.c:spatial_idwt_init_8bit Line | Count | Source | 520 | 44.9k | { | 521 | 44.9k | int level; | 522 | | | 523 | 44.9k | d->temp = (uint8_t *)(((TYPE *)d->temp) + 8); | 524 | | | 525 | 126k | for (level = d->decomposition_count - 1; level >= 0; level--){ | 526 | 81.9k | int hl = d->height >> level; | 527 | 81.9k | ptrdiff_t stride_l = d->stride << level; | 528 | | | 529 | 81.9k | switch(type){ | 530 | 12.0k | case DWT_DIRAC_DD9_7: | 531 | 12.0k | RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l); | 532 | 12.0k | break; | 533 | 9.32k | case DWT_DIRAC_LEGALL5_3: | 534 | 9.32k | RENAME(spatial_compose53i_init)(d->cs+level, d->buffer, hl, stride_l); | 535 | 9.32k | break; | 536 | 23.9k | case DWT_DIRAC_DD13_7: | 537 | 23.9k | RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l); | 538 | 23.9k | break; | 539 | 3.97k | case DWT_DIRAC_HAAR0: | 540 | 26.3k | case DWT_DIRAC_HAAR1: | 541 | 26.3k | d->cs[level].y = 1; | 542 | 26.3k | break; | 543 | 4.56k | case DWT_DIRAC_DAUB9_7: | 544 | 4.56k | RENAME(spatial_compose97i_init)(d->cs+level, d->buffer, hl, stride_l); | 545 | 4.56k | break; | 546 | 5.61k | default: | 547 | 5.61k | d->cs[level].y = 0; | 548 | 5.61k | break; | 549 | 81.9k | } | 550 | 81.9k | } | 551 | | | 552 | 44.9k | switch (type) { | 553 | 17.7k | case DWT_DIRAC_DD9_7: | 554 | 17.7k | d->spatial_compose = RENAME(spatial_compose_dd97i_dy); | 555 | 17.7k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 556 | 17.7k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 557 | 17.7k | d->horizontal_compose = RENAME(horizontal_compose_dd97i); | 558 | 17.7k | d->support = 7; | 559 | 17.7k | break; | 560 | 7.56k | case DWT_DIRAC_LEGALL5_3: | 561 | 7.56k | d->spatial_compose = RENAME(spatial_compose_dirac53i_dy); | 562 | 7.56k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 563 | 7.56k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_dirac53iH0); | 564 | 7.56k | d->horizontal_compose = RENAME(horizontal_compose_dirac53i); | 565 | 7.56k | d->support = 3; | 566 | 7.56k | break; | 567 | 7.66k | case DWT_DIRAC_DD13_7: | 568 | 7.66k | d->spatial_compose = RENAME(spatial_compose_dd137i_dy); | 569 | 7.66k | d->vertical_compose_l0.tap5 = RENAME(vertical_compose_dd137iL0); | 570 | 7.66k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 571 | 7.66k | d->horizontal_compose = RENAME(horizontal_compose_dd137i); | 572 | 7.66k | d->support = 7; | 573 | 7.66k | break; | 574 | 1.83k | case DWT_DIRAC_HAAR0: | 575 | 7.90k | case DWT_DIRAC_HAAR1: | 576 | 7.90k | d->spatial_compose = RENAME(spatial_compose_haari_dy); | 577 | 7.90k | d->vertical_compose = RENAME(vertical_compose_haar); | 578 | 7.90k | if (type == DWT_DIRAC_HAAR0) | 579 | 1.83k | d->horizontal_compose = RENAME(horizontal_compose_haar0i); | 580 | 6.07k | else | 581 | 6.07k | d->horizontal_compose = RENAME(horizontal_compose_haar1i); | 582 | 7.90k | d->support = 1; | 583 | 7.90k | break; | 584 | 2.76k | case DWT_DIRAC_FIDELITY: | 585 | 2.76k | d->spatial_compose = RENAME(spatial_compose_fidelity); | 586 | 2.76k | d->vertical_compose_l0.tap9 = RENAME(vertical_compose_fidelityiL0); | 587 | 2.76k | d->vertical_compose_h0.tap9 = RENAME(vertical_compose_fidelityiH0); | 588 | 2.76k | d->horizontal_compose = RENAME(horizontal_compose_fidelityi); | 589 | 2.76k | d->support = 0; // not really used | 590 | 2.76k | break; | 591 | 1.31k | case DWT_DIRAC_DAUB9_7: | 592 | 1.31k | d->spatial_compose = RENAME(spatial_compose_daub97i_dy); | 593 | 1.31k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose_daub97iL0); | 594 | 1.31k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_daub97iH0); | 595 | 1.31k | d->vertical_compose_l1 = RENAME(vertical_compose_daub97iL1); | 596 | 1.31k | d->vertical_compose_h1 = RENAME(vertical_compose_daub97iH1); | 597 | 1.31k | d->horizontal_compose = RENAME(horizontal_compose_daub97i); | 598 | 1.31k | d->support = 5; | 599 | 1.31k | break; | 600 | 0 | default: | 601 | 0 | return AVERROR_INVALIDDATA; | 602 | 44.9k | } | 603 | | | 604 | 44.9k | return 0; | 605 | 44.9k | } |
dirac_dwt.c:spatial_idwt_init_10bit Line | Count | Source | 520 | 37.8k | { | 521 | 37.8k | int level; | 522 | | | 523 | 37.8k | d->temp = (uint8_t *)(((TYPE *)d->temp) + 8); | 524 | | | 525 | 95.5k | for (level = d->decomposition_count - 1; level >= 0; level--){ | 526 | 57.6k | int hl = d->height >> level; | 527 | 57.6k | ptrdiff_t stride_l = d->stride << level; | 528 | | | 529 | 57.6k | switch(type){ | 530 | 8.74k | case DWT_DIRAC_DD9_7: | 531 | 8.74k | RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l); | 532 | 8.74k | break; | 533 | 3.59k | case DWT_DIRAC_LEGALL5_3: | 534 | 3.59k | RENAME(spatial_compose53i_init)(d->cs+level, d->buffer, hl, stride_l); | 535 | 3.59k | break; | 536 | 15.8k | case DWT_DIRAC_DD13_7: | 537 | 15.8k | RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l); | 538 | 15.8k | break; | 539 | 12.2k | case DWT_DIRAC_HAAR0: | 540 | 21.9k | case DWT_DIRAC_HAAR1: | 541 | 21.9k | d->cs[level].y = 1; | 542 | 21.9k | break; | 543 | 3.73k | case DWT_DIRAC_DAUB9_7: | 544 | 3.73k | RENAME(spatial_compose97i_init)(d->cs+level, d->buffer, hl, stride_l); | 545 | 3.73k | break; | 546 | 3.81k | default: | 547 | 3.81k | d->cs[level].y = 0; | 548 | 3.81k | break; | 549 | 57.6k | } | 550 | 57.6k | } | 551 | | | 552 | 37.8k | switch (type) { | 553 | 10.7k | case DWT_DIRAC_DD9_7: | 554 | 10.7k | d->spatial_compose = RENAME(spatial_compose_dd97i_dy); | 555 | 10.7k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 556 | 10.7k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 557 | 10.7k | d->horizontal_compose = RENAME(horizontal_compose_dd97i); | 558 | 10.7k | d->support = 7; | 559 | 10.7k | break; | 560 | 2.66k | case DWT_DIRAC_LEGALL5_3: | 561 | 2.66k | d->spatial_compose = RENAME(spatial_compose_dirac53i_dy); | 562 | 2.66k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 563 | 2.66k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_dirac53iH0); | 564 | 2.66k | d->horizontal_compose = RENAME(horizontal_compose_dirac53i); | 565 | 2.66k | d->support = 3; | 566 | 2.66k | break; | 567 | 12.8k | case DWT_DIRAC_DD13_7: | 568 | 12.8k | d->spatial_compose = RENAME(spatial_compose_dd137i_dy); | 569 | 12.8k | d->vertical_compose_l0.tap5 = RENAME(vertical_compose_dd137iL0); | 570 | 12.8k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 571 | 12.8k | d->horizontal_compose = RENAME(horizontal_compose_dd137i); | 572 | 12.8k | d->support = 7; | 573 | 12.8k | break; | 574 | 6.01k | case DWT_DIRAC_HAAR0: | 575 | 8.58k | case DWT_DIRAC_HAAR1: | 576 | 8.58k | d->spatial_compose = RENAME(spatial_compose_haari_dy); | 577 | 8.58k | d->vertical_compose = RENAME(vertical_compose_haar); | 578 | 8.58k | if (type == DWT_DIRAC_HAAR0) | 579 | 6.01k | d->horizontal_compose = RENAME(horizontal_compose_haar0i); | 580 | 2.56k | else | 581 | 2.56k | d->horizontal_compose = RENAME(horizontal_compose_haar1i); | 582 | 8.58k | d->support = 1; | 583 | 8.58k | break; | 584 | 1.62k | case DWT_DIRAC_FIDELITY: | 585 | 1.62k | d->spatial_compose = RENAME(spatial_compose_fidelity); | 586 | 1.62k | d->vertical_compose_l0.tap9 = RENAME(vertical_compose_fidelityiL0); | 587 | 1.62k | d->vertical_compose_h0.tap9 = RENAME(vertical_compose_fidelityiH0); | 588 | 1.62k | d->horizontal_compose = RENAME(horizontal_compose_fidelityi); | 589 | 1.62k | d->support = 0; // not really used | 590 | 1.62k | break; | 591 | 1.40k | case DWT_DIRAC_DAUB9_7: | 592 | 1.40k | d->spatial_compose = RENAME(spatial_compose_daub97i_dy); | 593 | 1.40k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose_daub97iL0); | 594 | 1.40k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_daub97iH0); | 595 | 1.40k | d->vertical_compose_l1 = RENAME(vertical_compose_daub97iL1); | 596 | 1.40k | d->vertical_compose_h1 = RENAME(vertical_compose_daub97iH1); | 597 | 1.40k | d->horizontal_compose = RENAME(horizontal_compose_daub97i); | 598 | 1.40k | d->support = 5; | 599 | 1.40k | break; | 600 | 0 | default: | 601 | 0 | return AVERROR_INVALIDDATA; | 602 | 37.8k | } | 603 | | | 604 | 37.8k | return 0; | 605 | 37.8k | } |
dirac_dwt.c:spatial_idwt_init_12bit Line | Count | Source | 520 | 19.3k | { | 521 | 19.3k | int level; | 522 | | | 523 | 19.3k | d->temp = (uint8_t *)(((TYPE *)d->temp) + 8); | 524 | | | 525 | 56.2k | for (level = d->decomposition_count - 1; level >= 0; level--){ | 526 | 36.8k | int hl = d->height >> level; | 527 | 36.8k | ptrdiff_t stride_l = d->stride << level; | 528 | | | 529 | 36.8k | switch(type){ | 530 | 8.39k | case DWT_DIRAC_DD9_7: | 531 | 8.39k | RENAME(spatial_compose_dd97i_init)(d->cs+level, d->buffer, hl, stride_l); | 532 | 8.39k | break; | 533 | 2.66k | case DWT_DIRAC_LEGALL5_3: | 534 | 2.66k | RENAME(spatial_compose53i_init)(d->cs+level, d->buffer, hl, stride_l); | 535 | 2.66k | break; | 536 | 5.38k | case DWT_DIRAC_DD13_7: | 537 | 5.38k | RENAME(spatial_compose_dd137i_init)(d->cs+level, d->buffer, hl, stride_l); | 538 | 5.38k | break; | 539 | 5.65k | case DWT_DIRAC_HAAR0: | 540 | 12.2k | case DWT_DIRAC_HAAR1: | 541 | 12.2k | d->cs[level].y = 1; | 542 | 12.2k | break; | 543 | 3.61k | case DWT_DIRAC_DAUB9_7: | 544 | 3.61k | RENAME(spatial_compose97i_init)(d->cs+level, d->buffer, hl, stride_l); | 545 | 3.61k | break; | 546 | 4.56k | default: | 547 | 4.56k | d->cs[level].y = 0; | 548 | 4.56k | break; | 549 | 36.8k | } | 550 | 36.8k | } | 551 | | | 552 | 19.3k | switch (type) { | 553 | 5.25k | case DWT_DIRAC_DD9_7: | 554 | 5.25k | d->spatial_compose = RENAME(spatial_compose_dd97i_dy); | 555 | 5.25k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 556 | 5.25k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 557 | 5.25k | d->horizontal_compose = RENAME(horizontal_compose_dd97i); | 558 | 5.25k | d->support = 7; | 559 | 5.25k | break; | 560 | 1.81k | case DWT_DIRAC_LEGALL5_3: | 561 | 1.81k | d->spatial_compose = RENAME(spatial_compose_dirac53i_dy); | 562 | 1.81k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose53iL0); | 563 | 1.81k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_dirac53iH0); | 564 | 1.81k | d->horizontal_compose = RENAME(horizontal_compose_dirac53i); | 565 | 1.81k | d->support = 3; | 566 | 1.81k | break; | 567 | 3.71k | case DWT_DIRAC_DD13_7: | 568 | 3.71k | d->spatial_compose = RENAME(spatial_compose_dd137i_dy); | 569 | 3.71k | d->vertical_compose_l0.tap5 = RENAME(vertical_compose_dd137iL0); | 570 | 3.71k | d->vertical_compose_h0.tap5 = RENAME(vertical_compose_dd97iH0); | 571 | 3.71k | d->horizontal_compose = RENAME(horizontal_compose_dd137i); | 572 | 3.71k | d->support = 7; | 573 | 3.71k | break; | 574 | 2.87k | case DWT_DIRAC_HAAR0: | 575 | 4.54k | case DWT_DIRAC_HAAR1: | 576 | 4.54k | d->spatial_compose = RENAME(spatial_compose_haari_dy); | 577 | 4.54k | d->vertical_compose = RENAME(vertical_compose_haar); | 578 | 4.54k | if (type == DWT_DIRAC_HAAR0) | 579 | 2.87k | d->horizontal_compose = RENAME(horizontal_compose_haar0i); | 580 | 1.67k | else | 581 | 1.67k | d->horizontal_compose = RENAME(horizontal_compose_haar1i); | 582 | 4.54k | d->support = 1; | 583 | 4.54k | break; | 584 | 2.61k | case DWT_DIRAC_FIDELITY: | 585 | 2.61k | d->spatial_compose = RENAME(spatial_compose_fidelity); | 586 | 2.61k | d->vertical_compose_l0.tap9 = RENAME(vertical_compose_fidelityiL0); | 587 | 2.61k | d->vertical_compose_h0.tap9 = RENAME(vertical_compose_fidelityiH0); | 588 | 2.61k | d->horizontal_compose = RENAME(horizontal_compose_fidelityi); | 589 | 2.61k | d->support = 0; // not really used | 590 | 2.61k | break; | 591 | 1.37k | case DWT_DIRAC_DAUB9_7: | 592 | 1.37k | d->spatial_compose = RENAME(spatial_compose_daub97i_dy); | 593 | 1.37k | d->vertical_compose_l0.tap3 = RENAME(vertical_compose_daub97iL0); | 594 | 1.37k | d->vertical_compose_h0.tap3 = RENAME(vertical_compose_daub97iH0); | 595 | 1.37k | d->vertical_compose_l1 = RENAME(vertical_compose_daub97iL1); | 596 | 1.37k | d->vertical_compose_h1 = RENAME(vertical_compose_daub97iH1); | 597 | 1.37k | d->horizontal_compose = RENAME(horizontal_compose_daub97i); | 598 | 1.37k | d->support = 5; | 599 | 1.37k | break; | 600 | 0 | default: | 601 | 0 | return AVERROR_INVALIDDATA; | 602 | 19.3k | } | 603 | | | 604 | 19.3k | return 0; | 605 | 19.3k | } |
|
606 | | |
607 | | #undef RENAME |
608 | | #undef TYPE |