mirror of https://git.videolan.org/git/ffmpeg.git
avfilter/bwdifdsp: Avoid including ff_bwdif_filter_line3_c()
This function is used by the AARCH64 code to filter a few remaining lines in case the dimensions are not suitably aligned; it is furthermore also used by checkasm to actually test the AARCH64 code against. But it is normally not used and this patch therefore moves it in bwdifdsp.h as a static inline function so that it can be avoided if possible or inlined where necessary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
fa06f48371
commit
97cd698ee4
|
@ -143,31 +143,6 @@ void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, con
|
||||||
FILTER2()
|
FILTER2()
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NEXT_LINE()\
|
|
||||||
dst += d_stride; \
|
|
||||||
prev += prefs; \
|
|
||||||
cur += prefs; \
|
|
||||||
next += prefs;
|
|
||||||
|
|
||||||
void ff_bwdif_filter_line3_c(void * dst1, int d_stride,
|
|
||||||
const void * prev1, const void * cur1, const void * next1, int s_stride,
|
|
||||||
int w, int parity, int clip_max)
|
|
||||||
{
|
|
||||||
const int prefs = s_stride;
|
|
||||||
uint8_t * dst = dst1;
|
|
||||||
const uint8_t * prev = prev1;
|
|
||||||
const uint8_t * cur = cur1;
|
|
||||||
const uint8_t * next = next1;
|
|
||||||
|
|
||||||
ff_bwdif_filter_line_c(dst, prev, cur, next, w,
|
|
||||||
prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);
|
|
||||||
NEXT_LINE();
|
|
||||||
memcpy(dst, cur, w);
|
|
||||||
NEXT_LINE();
|
|
||||||
ff_bwdif_filter_line_c(dst, prev, cur, next, w,
|
|
||||||
prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1,
|
void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1,
|
||||||
int w, int prefs, int mrefs, int prefs2, int mrefs2,
|
int w, int prefs, int mrefs, int prefs2, int mrefs2,
|
||||||
int parity, int clip_max, int spat)
|
int parity, int clip_max, int spat)
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#ifndef AVFILTER_BWDIFDSP_H
|
#ifndef AVFILTER_BWDIFDSP_H
|
||||||
#define AVFILTER_BWDIFDSP_H
|
#define AVFILTER_BWDIFDSP_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
typedef struct BWDIFDSPContext {
|
typedef struct BWDIFDSPContext {
|
||||||
void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs,
|
void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs,
|
||||||
int prefs3, int mrefs3, int parity, int clip_max);
|
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
|
||||||
int prefs3, int mrefs3, int prefs4, int mrefs4,
|
int prefs3, int mrefs3, int prefs4, int mrefs4,
|
||||||
int parity, int clip_max);
|
int parity, int clip_max);
|
||||||
|
|
||||||
|
static inline
|
||||||
void ff_bwdif_filter_line3_c(void * dst1, int d_stride,
|
void ff_bwdif_filter_line3_c(void * dst1, int d_stride,
|
||||||
const void * prev1, const void * cur1, const void * next1, int s_stride,
|
const void * prev1, const void * cur1, const void * next1, int s_stride,
|
||||||
int w, int parity, int clip_max);
|
int w, int parity, int clip_max)
|
||||||
|
{
|
||||||
|
const int prefs = s_stride;
|
||||||
|
uint8_t * dst = dst1;
|
||||||
|
const uint8_t * prev = prev1;
|
||||||
|
const uint8_t * cur = cur1;
|
||||||
|
const uint8_t * next = next1;
|
||||||
|
|
||||||
|
ff_bwdif_filter_line_c(dst, prev, cur, next, w,
|
||||||
|
prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);
|
||||||
|
#define NEXT_LINE()\
|
||||||
|
dst += d_stride; \
|
||||||
|
prev += prefs; \
|
||||||
|
cur += prefs; \
|
||||||
|
next += prefs;
|
||||||
|
|
||||||
|
NEXT_LINE();
|
||||||
|
memcpy(dst, cur, w);
|
||||||
|
NEXT_LINE();
|
||||||
|
#undef NEXT_LINE
|
||||||
|
ff_bwdif_filter_line_c(dst, prev, cur, next, w,
|
||||||
|
prefs, -prefs, prefs * 2, - prefs * 2, prefs * 3, -prefs * 3, prefs * 4, -prefs * 4, parity, clip_max);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* AVFILTER_BWDIFDSP_H */
|
#endif /* AVFILTER_BWDIFDSP_H */
|
||||||
|
|
Loading…
Reference in New Issue