Unified · Split
| @@ -24,14 +24,14 @@ · 23 unmodified lines | ||
| 24 | 24 | #include "libavfilter/bwdifdsp.h" |
| 25 | 25 | #include "libavutil/aarch64/cpu.h" |
| 26 | 26 | |
| 27 | −void ff_bwdif_filter_edge_neon(void *dst1, void *prev1, void *cur1, void *next1, | |
| 27 | +void ff_bwdif_filter_edge_neon(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 28 | 28 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 29 | 29 | int parity, int clip_max, int spat); |
| 30 | 30 | |
| 31 | −void ff_bwdif_filter_intra_neon(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 31 | +void ff_bwdif_filter_intra_neon(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 32 | 32 | int prefs3, int mrefs3, int parity, int clip_max); |
| 33 | 33 | |
| 34 | −void ff_bwdif_filter_line_neon(void *dst1, void *prev1, void *cur1, void *next1, | |
| 34 | +void ff_bwdif_filter_line_neon(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 35 | 35 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 36 | 36 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 37 | 37 | int parity, int clip_max); |
| @@ -64,7 +64,7 @@ static void filter_line3_helper(void * dst1, int d_stride, · 26 unmodified lines | ||
| 64 | 64 | w - w0, parity, clip_max); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | −static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1, | |
| 67 | +static void filter_line_helper(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 68 | 68 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 69 | 69 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 70 | 70 | int parity, int clip_max) |
| @@ -79,7 +79,7 @@ static void filter_line_helper(void *dst1, void *prev1, void *cur1, void *next1, · 8 unmodified lines | ||
| 79 | 79 | w - w0, prefs, mrefs, prefs2, mrefs2, prefs3, mrefs3, prefs4, mrefs4, parity, clip_max); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | −static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1, | |
| 82 | +static void filter_edge_helper(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 83 | 83 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 84 | 84 | int parity, int clip_max, int spat) |
| 85 | 85 | { |
| @@ -94,7 +94,7 @@ static void filter_edge_helper(void *dst1, void *prev1, void *cur1, void *next1, · 8 unmodified lines | ||
| 94 | 94 | parity, clip_max, spat); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | −static void filter_intra_helper(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 97 | +static void filter_intra_helper(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 98 | 98 | int prefs3, int mrefs3, int parity, int clip_max) |
| 99 | 99 | { |
| 100 | 100 | const int w0 = clip_max != 255 ? 0 : w & ~15; |
| @@ -115,27 +115,27 @@ static const uint16_t coef_sp[2] = { 5077, 981 }; · 114 unmodified lines | ||
| 115 | 115 | next2++; \ |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | −void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 118 | +void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 119 | 119 | int prefs3, int mrefs3, int parity, int clip_max) |
| 120 | 120 | { |
| 121 | 121 | uint8_t *dst = dst1; |
| 122 | − uint8_t *cur = cur1; | |
| 122 | + const uint8_t *cur = cur1; | |
| 123 | 123 | int interpol, x; |
| 124 | 124 | |
| 125 | 125 | FILTER_INTRA() |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | −void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, | |
| 128 | +void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 129 | 129 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 130 | 130 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 131 | 131 | int parity, int clip_max) |
| 132 | 132 | { |
| 133 | 133 | uint8_t *dst = dst1; |
| 134 | − uint8_t *prev = prev1; | |
| 135 | − uint8_t *cur = cur1; | |
| 136 | − uint8_t *next = next1; | |
| 137 | − uint8_t *prev2 = parity ? prev : cur ; | |
| 138 | − uint8_t *next2 = parity ? cur : next; | |
| 134 | + const uint8_t *prev = prev1; | |
| 135 | + const uint8_t *cur = cur1; | |
| 136 | + const uint8_t *next = next1; | |
| 137 | + const uint8_t *prev2 = parity ? prev : cur ; | |
| 138 | + const uint8_t *next2 = parity ? cur : next; | |
| 139 | 139 | int interpol, x; |
| 140 | 140 | |
| 141 | 141 | FILTER1() |
| @@ -159,25 +159,25 @@ void ff_bwdif_filter_line3_c(void * dst1, int d_stride, · 17 unmodified lines | ||
| 159 | 159 | const uint8_t * cur = cur1; |
| 160 | 160 | const uint8_t * next = next1; |
| 161 | 161 | |
| 162 | − ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, | |
| 162 | + ff_bwdif_filter_line_c(dst, prev, cur, next, w, | |
| 163 | 163 | prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); |
| 164 | 164 | NEXT_LINE(); |
| 165 | 165 | memcpy(dst, cur, w); |
| 166 | 166 | NEXT_LINE(); |
| 167 | − ff_bwdif_filter_line_c(dst, (void*)prev, (void*)cur, (void*)next, w, | |
| 167 | + ff_bwdif_filter_line_c(dst, prev, cur, next, w, | |
| 168 | 168 | prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | −void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, | |
| 171 | +void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 172 | 172 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 173 | 173 | int parity, int clip_max, int spat) |
| 174 | 174 | { |
| 175 | 175 | uint8_t *dst = dst1; |
| 176 | − uint8_t *prev = prev1; | |
| 177 | − uint8_t *cur = cur1; | |
| 178 | − uint8_t *next = next1; | |
| 179 | − uint8_t *prev2 = parity ? prev : cur ; | |
| 180 | − uint8_t *next2 = parity ? cur : next; | |
| 176 | + const uint8_t *prev = prev1; | |
| 177 | + const uint8_t *cur = cur1; | |
| 178 | + const uint8_t *next = next1; | |
| 179 | + const uint8_t *prev2 = parity ? prev : cur ; | |
| 180 | + const uint8_t *next2 = parity ? cur : next; | |
| 181 | 181 | int interpol, x; |
| 182 | 182 | |
| 183 | 183 | FILTER1() |
| @@ -185,27 +185,27 @@ void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, · 1 unmodified line | ||
| 185 | 185 | FILTER2() |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | −static void filter_intra_16bit(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 188 | +static void filter_intra_16bit(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 189 | 189 | int prefs3, int mrefs3, int parity, int clip_max) |
| 190 | 190 | { |
| 191 | 191 | uint16_t *dst = dst1; |
| 192 | − uint16_t *cur = cur1; | |
| 192 | + const uint16_t *cur = cur1; | |
| 193 | 193 | int interpol, x; |
| 194 | 194 | |
| 195 | 195 | FILTER_INTRA() |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | −static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1, | |
| 198 | +static void filter_line_c_16bit(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 199 | 199 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 200 | 200 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 201 | 201 | int parity, int clip_max) |
| 202 | 202 | { |
| 203 | 203 | uint16_t *dst = dst1; |
| 204 | − uint16_t *prev = prev1; | |
| 205 | − uint16_t *cur = cur1; | |
| 206 | − uint16_t *next = next1; | |
| 207 | − uint16_t *prev2 = parity ? prev : cur ; | |
| 208 | − uint16_t *next2 = parity ? cur : next; | |
| 204 | + const uint16_t *prev = prev1; | |
| 205 | + const uint16_t *cur = cur1; | |
| 206 | + const uint16_t *next = next1; | |
| 207 | + const uint16_t *prev2 = parity ? prev : cur ; | |
| 208 | + const uint16_t *next2 = parity ? cur : next; | |
| 209 | 209 | int interpol, x; |
| 210 | 210 | |
| 211 | 211 | FILTER1() |
| @@ -213,16 +213,16 @@ static void filter_line_c_16bit(void *dst1, void *prev1, void *cur1, void *next1 · 1 unmodified line | ||
| 213 | 213 | FILTER2() |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | −static void filter_edge_16bit(void *dst1, void *prev1, void *cur1, void *next1, | |
| 216 | +static void filter_edge_16bit(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 217 | 217 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 218 | 218 | int parity, int clip_max, int spat) |
| 219 | 219 | { |
| 220 | 220 | uint16_t *dst = dst1; |
| 221 | − uint16_t *prev = prev1; | |
| 222 | − uint16_t *cur = cur1; | |
| 223 | − uint16_t *next = next1; | |
| 224 | − uint16_t *prev2 = parity ? prev : cur ; | |
| 225 | − uint16_t *next2 = parity ? cur : next; | |
| 221 | + const uint16_t *prev = prev1; | |
| 222 | + const uint16_t *cur = cur1; | |
| 223 | + const uint16_t *next = next1; | |
| 224 | + const uint16_t *prev2 = parity ? prev : cur ; | |
| 225 | + const uint16_t *next2 = parity ? cur : next; | |
| 226 | 226 | int interpol, x; |
| 227 | 227 | |
| 228 | 228 | FILTER1() |
| @@ -20,13 +20,13 @@ · 19 unmodified lines | ||
| 20 | 20 | #define AVFILTER_BWDIFDSP_H |
| 21 | 21 | |
| 22 | 22 | typedef struct BWDIFDSPContext { |
| 23 | − void (*filter_intra)(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 23 | + void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 24 | 24 | int prefs3, int mrefs3, int parity, int clip_max); |
| 25 | − void (*filter_line)(void *dst, void *prev, void *cur, void *next, | |
| 25 | + void (*filter_line)(void *dst, const void *prev, const void *cur, const void *next, | |
| 26 | 26 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 27 | 27 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 28 | 28 | int parity, int clip_max); |
| 29 | − void (*filter_edge)(void *dst, void *prev, void *cur, void *next, | |
| 29 | + void (*filter_edge)(void *dst, const void *prev, const void *cur, const void *next, | |
| 30 | 30 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 31 | 31 | int parity, int clip_max, int spat); |
| 32 | 32 | void (*filter_line3)(void *dst, int dstride, |
| @@ -38,14 +38,14 @@ void ff_bwdif_init_filter_line(BWDIFDSPContext *bwdif, int bit_depth); · 5 unmodified lines | ||
| 38 | 38 | void ff_bwdif_init_x86(BWDIFDSPContext *bwdif, int bit_depth); |
| 39 | 39 | void ff_bwdif_init_aarch64(BWDIFDSPContext *bwdif, int bit_depth); |
| 40 | 40 | |
| 41 | −void ff_bwdif_filter_edge_c(void *dst1, void *prev1, void *cur1, void *next1, | |
| 41 | +void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 42 | 42 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 43 | 43 | int parity, int clip_max, int spat); |
| 44 | 44 | |
| 45 | −void ff_bwdif_filter_intra_c(void *dst1, void *cur1, int w, int prefs, int mrefs, | |
| 45 | +void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs, | |
| 46 | 46 | int prefs3, int mrefs3, int parity, int clip_max); |
| 47 | 47 | |
| 48 | −void ff_bwdif_filter_line_c(void *dst1, void *prev1, void *cur1, void *next1, | |
| 48 | +void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1, | |
| 49 | 49 | int w, int prefs, int mrefs, int prefs2, int mrefs2, |
| 50 | 50 | int prefs3, int mrefs3, int prefs4, int mrefs4, |
| 51 | 51 | int parity, int clip_max); |
| @@ -24,28 +24,28 @@ · 23 unmodified lines | ||
| 24 | 24 | #include "libavutil/x86/cpu.h" |
| 25 | 25 | #include "libavfilter/bwdifdsp.h" |
| 26 | 26 | |
| 27 | −void ff_bwdif_filter_line_sse2(void *dst, void *prev, void *cur, void *next, | |
| 27 | +void ff_bwdif_filter_line_sse2(void *dst, const void *prev, const void *cur, const void *next, | |
| 28 | 28 | int w, int prefs, int mrefs, int prefs2, |
| 29 | 29 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 30 | 30 | int mrefs4, int parity, int clip_max); |
| 31 | −void ff_bwdif_filter_line_ssse3(void *dst, void *prev, void *cur, void *next, | |
| 31 | +void ff_bwdif_filter_line_ssse3(void *dst, const void *prev, const void *cur, const void *next, | |
| 32 | 32 | int w, int prefs, int mrefs, int prefs2, |
| 33 | 33 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 34 | 34 | int mrefs4, int parity, int clip_max); |
| 35 | −void ff_bwdif_filter_line_avx2(void *dst, void *prev, void *cur, void *next, | |
| 35 | +void ff_bwdif_filter_line_avx2(void *dst, const void *prev, const void *cur, const void *next, | |
| 36 | 36 | int w, int prefs, int mrefs, int prefs2, |
| 37 | 37 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 38 | 38 | int mrefs4, int parity, int clip_max); |
| 39 | 39 | |
| 40 | −void ff_bwdif_filter_line_12bit_sse2(void *dst, void *prev, void *cur, void *next, | |
| 40 | +void ff_bwdif_filter_line_12bit_sse2(void *dst, const void *prev, const void *cur, const void *next, | |
| 41 | 41 | int w, int prefs, int mrefs, int prefs2, |
| 42 | 42 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 43 | 43 | int mrefs4, int parity, int clip_max); |
| 44 | −void ff_bwdif_filter_line_12bit_ssse3(void *dst, void *prev, void *cur, void *next, | |
| 44 | +void ff_bwdif_filter_line_12bit_ssse3(void *dst, const void *prev, const void *cur, const void *next, | |
| 45 | 45 | int w, int prefs, int mrefs, int prefs2, |
| 46 | 46 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 47 | 47 | int mrefs4, int parity, int clip_max); |
| 48 | −void ff_bwdif_filter_line_12bit_avx2(void *dst, void *prev, void *cur, void *next, | |
| 48 | +void ff_bwdif_filter_line_12bit_avx2(void *dst, const void *prev, const void *cur, const void *next, | |
| 49 | 49 | int w, int prefs, int mrefs, int prefs2, |
| 50 | 50 | int mrefs2, int prefs3, int mrefs3, int prefs4, |
| 51 | 51 | int mrefs4, int parity, int clip_max); |