FFmpeg
bwdifdsp.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVFILTER_BWDIFDSP_H
20 #define AVFILTER_BWDIFDSP_H
21 
22 #include <stdint.h>
23 #include <string.h>
24 
25 typedef struct BWDIFDSPContext {
26  void (*filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs,
27  int prefs3, int mrefs3, int parity, int clip_max);
28  void (*filter_line)(void *dst, const void *prev, const void *cur, const void *next,
29  int w, int prefs, int mrefs, int prefs2, int mrefs2,
30  int prefs3, int mrefs3, int prefs4, int mrefs4,
31  int parity, int clip_max);
32  void (*filter_edge)(void *dst, const void *prev, const void *cur, const void *next,
33  int w, int prefs, int mrefs, int prefs2, int mrefs2,
34  int parity, int clip_max, int spat);
35  void (*filter_line3)(void *dst, int dstride,
36  const void *prev, const void *cur, const void *next, int prefs,
37  int w, int parity, int clip_max);
39 
43 
44 void ff_bwdif_filter_edge_c(void *dst1, const void *prev1, const void *cur1, const void *next1,
45  int w, int prefs, int mrefs, int prefs2, int mrefs2,
46  int parity, int clip_max, int spat);
47 
48 void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs,
49  int prefs3, int mrefs3, int parity, int clip_max);
50 
51 void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1,
52  int w, int prefs, int mrefs, int prefs2, int mrefs2,
53  int prefs3, int mrefs3, int prefs4, int mrefs4,
54  int parity, int clip_max);
55 
56 static inline
57 void ff_bwdif_filter_line3_c(void * dst1, int d_stride,
58  const void * prev1, const void * cur1, const void * next1, int s_stride,
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 
84 
85 #endif /* AVFILTER_BWDIFDSP_H */
ff_bwdif_filter_edge_c
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 parity, int clip_max, int spat)
Definition: bwdifdsp.c:146
ff_bwdif_filter_line3_c
static 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)
Definition: bwdifdsp.h:57
w
uint8_t w
Definition: llviddspenc.c:38
bit_depth
static void bit_depth(AudioStatsContext *s, const uint64_t *const mask, uint8_t *depth)
Definition: af_astats.c:245
BWDIFDSPContext::filter_intra
void(* filter_intra)(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max)
Definition: bwdifdsp.h:26
ff_bwdif_filter_line_c
void ff_bwdif_filter_line_c(void *dst1, const void *prev1, const void *cur1, const void *next1, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max)
Definition: bwdifdsp.c:128
BWDIFDSPContext
Definition: bwdifdsp.h:25
parity
mcdeint parity
Definition: vf_mcdeint.c:281
NEXT_LINE
#define NEXT_LINE()
BWDIFDSPContext::filter_line
void(* filter_line)(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int prefs3, int mrefs3, int prefs4, int mrefs4, int parity, int clip_max)
Definition: bwdifdsp.h:28
ff_bwdif_init_filter_line
void ff_bwdif_init_filter_line(BWDIFDSPContext *bwdif, int bit_depth)
Definition: bwdifdsp.c:208
BWDIFDSPContext::filter_line3
void(* filter_line3)(void *dst, int dstride, const void *prev, const void *cur, const void *next, int prefs, int w, int parity, int clip_max)
Definition: bwdifdsp.h:35
ff_bwdif_init_x86
void ff_bwdif_init_x86(BWDIFDSPContext *bwdif, int bit_depth)
Definition: vf_bwdif_init.c:53
BWDIFDSPContext::filter_edge
void(* filter_edge)(void *dst, const void *prev, const void *cur, const void *next, int w, int prefs, int mrefs, int prefs2, int mrefs2, int parity, int clip_max, int spat)
Definition: bwdifdsp.h:32
ff_bwdif_init_aarch64
void ff_bwdif_init_aarch64(BWDIFDSPContext *bwdif, int bit_depth)
Definition: vf_bwdif_init_aarch64.c:110
ff_bwdif_filter_intra_c
void ff_bwdif_filter_intra_c(void *dst1, const void *cur1, int w, int prefs, int mrefs, int prefs3, int mrefs3, int parity, int clip_max)
Definition: bwdifdsp.c:118