From 4c9af0232625d598889c4c4912f142e0dff14452 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 1 May 2015 20:03:57 -0700 Subject: [PATCH] dec_neon: add DC8uvNoTopLeft ~93% faster Change-Id: Icf0fd5f85ac53c306a1b69d84275023e5b24a602 --- src/dsp/dec_neon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index 86a830da..36283425 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -1425,8 +1425,10 @@ static WEBP_INLINE void DC8(uint8_t* dst, int do_top, int do_left) { dc0 = vrshrn_n_u16(sum, 4); } else if (do_top) { dc0 = vrshrn_n_u16(sum_top, 3); - } else { + } else if (do_left) { dc0 = vrshrn_n_u16(sum_left, 3); + } else { + dc0 = vdup_n_u8(0x80); } { @@ -1441,6 +1443,7 @@ static WEBP_INLINE void DC8(uint8_t* dst, int do_top, int do_left) { static void DC8uv(uint8_t* dst) { DC8(dst, 1, 1); } static void DC8uvNoTop(uint8_t* dst) { DC8(dst, 0, 1); } static void DC8uvNoLeft(uint8_t* dst) { DC8(dst, 1, 0); } +static void DC8uvNoTopLeft(uint8_t* dst) { DC8(dst, 0, 0); } static void TM8uv(uint8_t* dst) { TrueMotion(dst, 8); } @@ -1482,6 +1485,7 @@ WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitNEON(void) { VP8PredChroma8[1] = TM8uv; VP8PredChroma8[4] = DC8uvNoTop; VP8PredChroma8[5] = DC8uvNoLeft; + VP8PredChroma8[6] = DC8uvNoTopLeft; } #else // !WEBP_USE_NEON