Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: third_party/libwebp/dsp/filters_neon.c

Issue 2663073003: libwebp: upgrade from 0.6.0-rc1 to 0.6.0-final (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | third_party/libwebp/webp/mux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/dsp/filters_neon.c
diff --git a/third_party/libwebp/dsp/filters_neon.c b/third_party/libwebp/dsp/filters_neon.c
index 7e1338fc835a522e8c139bbd172863dc49401e58..4d6e50cc764106d1a6099199b9e53bc8ab4bfb7b 100644
--- a/third_party/libwebp/dsp/filters_neon.c
+++ b/third_party/libwebp/dsp/filters_neon.c
@@ -248,6 +248,12 @@ static void VerticalUnfilter_NEON(const uint8_t* prev, const uint8_t* in,
}
}
+// GradientUnfilter_NEON is correct but slower than the C-version,
+// at least on ARM64. For armv7, it's a wash.
+// So best is to disable it for now, but keep the idea around...
+// #define USE_GRADIENT_UNFILTER
+
+#if defined(USE_GRADIENT_UNFILTER)
#define GRAD_PROCESS_LANE(L) do { \
const uint8x8_t tmp1 = ROTATE_RIGHT_N(pred, 1); /* rotate predictor in */ \
const int16x8_t tmp2 = vaddq_s16(BC, U8_TO_S16(tmp1)); \
@@ -295,6 +301,8 @@ static void GradientUnfilter_NEON(const uint8_t* prev, const uint8_t* in,
}
}
+#endif // USE_GRADIENT_UNFILTER
+
//------------------------------------------------------------------------------
// Entry point
@@ -303,7 +311,9 @@ extern void VP8FiltersInitNEON(void);
WEBP_TSAN_IGNORE_FUNCTION void VP8FiltersInitNEON(void) {
WebPUnfilters[WEBP_FILTER_HORIZONTAL] = HorizontalUnfilter_NEON;
WebPUnfilters[WEBP_FILTER_VERTICAL] = VerticalUnfilter_NEON;
+#if defined(USE_GRADIENT_UNFILTER)
WebPUnfilters[WEBP_FILTER_GRADIENT] = GradientUnfilter_NEON;
+#endif
WebPFilters[WEBP_FILTER_HORIZONTAL] = HorizontalFilter_NEON;
WebPFilters[WEBP_FILTER_VERTICAL] = VerticalFilter_NEON;
« no previous file with comments | « third_party/libwebp/README.chromium ('k') | third_party/libwebp/webp/mux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698