From 05f6fe24c31f4ada113cc92c786c5f1c211a7caa Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 6 Dec 2017 16:03:32 -0800 Subject: [PATCH] upsampling: rm asserts w/REDUCE_CSP+OMIT_C_CODE with WEBP_NEON_OMIT_C_CODE the default _C functions won't be set and with WEBP_REDUCE_CSP the NEON functions won't be either triggering an assert for an empty table member. BUG=chromium:792627 Change-Id: I8d2d430eaa37bb92885b61a3dd39f961924a8def --- src/dsp/upsampling.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dsp/upsampling.c b/src/dsp/upsampling.c index c94c3cdc..ddfd1925 100644 --- a/src/dsp/upsampling.c +++ b/src/dsp/upsampling.c @@ -322,6 +322,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { assert(WebPUpsamplers[MODE_BGRA] != NULL); assert(WebPUpsamplers[MODE_rgbA] != NULL); assert(WebPUpsamplers[MODE_bgrA] != NULL); +#if !defined(WEBP_REDUCE_CSP) || !WEBP_NEON_OMIT_C_CODE assert(WebPUpsamplers[MODE_RGB] != NULL); assert(WebPUpsamplers[MODE_BGR] != NULL); assert(WebPUpsamplers[MODE_ARGB] != NULL); @@ -329,6 +330,7 @@ WEBP_TSAN_IGNORE_FUNCTION void WebPInitUpsamplers(void) { assert(WebPUpsamplers[MODE_RGB_565] != NULL); assert(WebPUpsamplers[MODE_Argb] != NULL); assert(WebPUpsamplers[MODE_rgbA_4444] != NULL); +#endif #endif // FANCY_UPSAMPLING upsampling_last_cpuinfo_used2 = VP8GetCPUInfo;