|
19 | 19 | #ifndef AVFILTER_BWDIFDSP_H
|
20 | 20 | #define AVFILTER_BWDIFDSP_H
|
21 | 21 |
|
| 22 | +#include <stdint.h> |
| 23 | +#include <string.h> |
| 24 | + |
22 | 25 | typedef struct BWDIFDSPContext {
|
23 | 26 | void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs,
|
24 | 27 | int prefs3, int mrefs3, int parity, int clip_max);
|
@@ -50,8 +53,33 @@ void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, con
|
50 | 53 | int prefs3, int mrefs3, int prefs4, int mrefs4,
|
51 | 54 | int parity, int clip_max);
|
52 | 55 |
|
| 56 | +static inline |
53 | 57 | void ff_bwdif_filter_line3_c(void * dst1, int d_stride,
|
54 | 58 | const void * prev1, const void * cur1, const void * next1, int s_stride,
|
55 |
| - int w, int parity, int clip_max); |
| 59 | + int w, int parity, int clip_max) |
| 60 | +{ |
| 61 | + const int prefs = s_stride; |
| 62 | + uint8_t * dst = dst1; |
| 63 | + const uint8_t * prev = prev1; |
| 64 | + const uint8_t * cur = cur1; |
| 65 | + const uint8_t * next = next1; |
| 66 | + |
| 67 | + ff_bwdif_filter_line_c(dst, prev, cur, next, w, |
| 68 | + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); |
| 69 | +#define NEXT_LINE()\ |
| 70 | + dst += d_stride; \ |
| 71 | + prev += prefs; \ |
| 72 | + cur += prefs; \ |
| 73 | + next += prefs; |
| 74 | + |
| 75 | + NEXT_LINE(); |
| 76 | + memcpy(dst, cur, w); |
| 77 | + NEXT_LINE(); |
| 78 | +#undef NEXT_LINE |
| 79 | + ff_bwdif_filter_line_c(dst, prev, cur, next, w, |
| 80 | + prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max); |
| 81 | +} |
| 82 | + |
| 83 | + |
56 | 84 |
|
57 | 85 | #endif /* AVFILTER_BWDIFDSP_H */
|
0 commit comments