Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2018-10-25 20:22:59 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-10-29 19:16:56 +0300
commit8007c79fee9bf1745c3e789b5123c42d470b20e2 (patch)
tree2866954a54bd194f1c79455b446902983a75416c /src/cdef.h
parentba08e37cd28515055edd42d092835ac142ca8114 (diff)
Simplify/rewrite cdef filtering code
Diffstat (limited to 'src/cdef.h')
-rw-r--r--src/cdef.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cdef.h b/src/cdef.h
index 642d125..1a080e2 100644
--- a/src/cdef.h
+++ b/src/cdef.h
@@ -40,14 +40,21 @@ enum CdefEdgeFlags {
HAVE_BOTTOM = 1 << 3,
};
+#ifdef BITDEPTH
+typedef const pixel (*const_left_pixel_row_2px)[2];
+#else
+typedef const void *const_left_pixel_row_2px;
+#endif
+
// CDEF operates entirely on pre-filter data; if bottom/right edges are
// present (according to $edges), then the pre-filter data is located in
// $dst. However, the edge pixels above $dst may be post-filter, so in
// order to get access to pre-filter top pixels, use $top.
-typedef void (*cdef_fn)(pixel *dst, ptrdiff_t stride,
- /*const*/ pixel *const top[2],
- int pri_strength, int sec_strength,
- int dir, int damping, enum CdefEdgeFlags edges);
+#define decl_cdef_fn(name) \
+void (name)(pixel *dst, ptrdiff_t stride, const_left_pixel_row_2px left, \
+ /*const*/ pixel *const top[2], int pri_strength, int sec_strength, \
+ int dir, int damping, enum CdefEdgeFlags edges)
+typedef decl_cdef_fn(*cdef_fn);
#define decl_cdef_dir_fn(name) \
int (name)(const pixel *dst, ptrdiff_t dst_stride, unsigned *var)