2012-01-06 23:49:06 +01:00
|
|
|
// Copyright 2011 Google Inc. All Rights Reserved.
|
2011-09-02 23:30:08 +02:00
|
|
|
//
|
2013-06-07 08:05:58 +02:00
|
|
|
// Use of this source code is governed by a BSD-style license
|
|
|
|
// that can be found in the COPYING file in the root of the source
|
|
|
|
// tree. An additional intellectual property rights grant can be found
|
|
|
|
// in the file PATENTS. All contributing project authors may
|
|
|
|
// be found in the AUTHORS file in the root of the source tree.
|
2011-09-02 23:30:08 +02:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// YUV to RGB upsampling functions.
|
|
|
|
//
|
|
|
|
// Author: somnath@google.com (Somnath Banerjee)
|
|
|
|
|
2017-10-07 23:15:11 +02:00
|
|
|
#include "src/dsp/dsp.h"
|
|
|
|
#include "src/dsp/yuv.h"
|
2011-09-02 23:30:08 +02:00
|
|
|
|
2013-08-19 21:40:25 +02:00
|
|
|
#include <assert.h>
|
|
|
|
|
2011-09-02 23:30:08 +02:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Fancy upsampler
|
|
|
|
|
|
|
|
#ifdef FANCY_UPSAMPLING
|
|
|
|
|
|
|
|
// Fancy upsampling functions to convert YUV to RGB
|
|
|
|
WebPUpsampleLinePairFunc WebPUpsamplers[MODE_LAST];
|
|
|
|
|
|
|
|
// Given samples laid out in a square as:
|
|
|
|
// [a b]
|
|
|
|
// [c d]
|
|
|
|
// we interpolate u/v as:
|
|
|
|
// ([9*a + 3*b + 3*c + d 3*a + 9*b + 3*c + d] + [8 8]) / 16
|
|
|
|
// ([3*a + b + 9*c + 3*d a + 3*b + 3*c + 9*d] [8 8]) / 16
|
|
|
|
|
|
|
|
// We process u and v together stashed into 32bit (16bit each).
|
2013-03-29 22:20:52 +01:00
|
|
|
#define LOAD_UV(u, v) ((u) | ((v) << 16))
|
2011-09-02 23:30:08 +02:00
|
|
|
|
|
|
|
#define UPSAMPLE_FUNC(FUNC_NAME, FUNC, XSTEP) \
|
|
|
|
static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bottom_y, \
|
|
|
|
const uint8_t* top_u, const uint8_t* top_v, \
|
|
|
|
const uint8_t* cur_u, const uint8_t* cur_v, \
|
|
|
|
uint8_t* top_dst, uint8_t* bottom_dst, int len) { \
|
|
|
|
int x; \
|
|
|
|
const int last_pixel_pair = (len - 1) >> 1; \
|
|
|
|
uint32_t tl_uv = LOAD_UV(top_u[0], top_v[0]); /* top-left sample */ \
|
|
|
|
uint32_t l_uv = LOAD_UV(cur_u[0], cur_v[0]); /* left-sample */ \
|
2013-08-19 21:40:25 +02:00
|
|
|
assert(top_y != NULL); \
|
|
|
|
{ \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \
|
|
|
|
FUNC(top_y[0], uv0 & 0xff, (uv0 >> 16), top_dst); \
|
|
|
|
} \
|
2013-08-19 21:40:25 +02:00
|
|
|
if (bottom_y != NULL) { \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \
|
|
|
|
FUNC(bottom_y[0], uv0 & 0xff, (uv0 >> 16), bottom_dst); \
|
|
|
|
} \
|
|
|
|
for (x = 1; x <= last_pixel_pair; ++x) { \
|
|
|
|
const uint32_t t_uv = LOAD_UV(top_u[x], top_v[x]); /* top sample */ \
|
|
|
|
const uint32_t uv = LOAD_UV(cur_u[x], cur_v[x]); /* sample */ \
|
|
|
|
/* precompute invariant values associated with first and second diagonals*/\
|
|
|
|
const uint32_t avg = tl_uv + t_uv + l_uv + uv + 0x00080008u; \
|
|
|
|
const uint32_t diag_12 = (avg + 2 * (t_uv + l_uv)) >> 3; \
|
|
|
|
const uint32_t diag_03 = (avg + 2 * (tl_uv + uv)) >> 3; \
|
2013-08-19 21:40:25 +02:00
|
|
|
{ \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (diag_12 + tl_uv) >> 1; \
|
|
|
|
const uint32_t uv1 = (diag_03 + t_uv) >> 1; \
|
|
|
|
FUNC(top_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
top_dst + (2 * x - 1) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
FUNC(top_y[2 * x - 0], uv1 & 0xff, (uv1 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
top_dst + (2 * x - 0) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
} \
|
2013-08-19 21:40:25 +02:00
|
|
|
if (bottom_y != NULL) { \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (diag_03 + l_uv) >> 1; \
|
|
|
|
const uint32_t uv1 = (diag_12 + uv) >> 1; \
|
|
|
|
FUNC(bottom_y[2 * x - 1], uv0 & 0xff, (uv0 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
bottom_dst + (2 * x - 1) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
FUNC(bottom_y[2 * x + 0], uv1 & 0xff, (uv1 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
bottom_dst + (2 * x + 0) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
} \
|
|
|
|
tl_uv = t_uv; \
|
|
|
|
l_uv = uv; \
|
|
|
|
} \
|
|
|
|
if (!(len & 1)) { \
|
2013-08-19 21:40:25 +02:00
|
|
|
{ \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (3 * tl_uv + l_uv + 0x00020002u) >> 2; \
|
|
|
|
FUNC(top_y[len - 1], uv0 & 0xff, (uv0 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
top_dst + (len - 1) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
} \
|
2013-08-19 21:40:25 +02:00
|
|
|
if (bottom_y != NULL) { \
|
2011-09-02 23:30:08 +02:00
|
|
|
const uint32_t uv0 = (3 * l_uv + tl_uv + 0x00020002u) >> 2; \
|
|
|
|
FUNC(bottom_y[len - 1], uv0 & 0xff, (uv0 >> 16), \
|
2017-08-05 02:00:55 +02:00
|
|
|
bottom_dst + (len - 1) * (XSTEP)); \
|
2011-09-02 23:30:08 +02:00
|
|
|
} \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
// All variants implemented.
|
2017-10-27 05:31:27 +02:00
|
|
|
#if !WEBP_NEON_OMIT_C_CODE
|
2017-04-21 09:45:27 +02:00
|
|
|
UPSAMPLE_FUNC(UpsampleRgbaLinePair_C, VP8YuvToRgba, 4)
|
|
|
|
UPSAMPLE_FUNC(UpsampleBgraLinePair_C, VP8YuvToBgra, 4)
|
2017-11-23 08:51:19 +01:00
|
|
|
#if !defined(WEBP_REDUCE_CSP)
|
2017-04-21 09:45:27 +02:00
|
|
|
UPSAMPLE_FUNC(UpsampleArgbLinePair_C, VP8YuvToArgb, 4)
|
2017-11-23 08:51:19 +01:00
|
|
|
UPSAMPLE_FUNC(UpsampleRgbLinePair_C, VP8YuvToRgb, 3)
|
|
|
|
UPSAMPLE_FUNC(UpsampleBgrLinePair_C, VP8YuvToBgr, 3)
|
2017-04-21 09:45:27 +02:00
|
|
|
UPSAMPLE_FUNC(UpsampleRgba4444LinePair_C, VP8YuvToRgba4444, 2)
|
|
|
|
UPSAMPLE_FUNC(UpsampleRgb565LinePair_C, VP8YuvToRgb565, 2)
|
2017-11-23 08:51:19 +01:00
|
|
|
#else
|
|
|
|
static void EmptyUpsampleFunc(const uint8_t* top_y, const uint8_t* bottom_y,
|
|
|
|
const uint8_t* top_u, const uint8_t* top_v,
|
|
|
|
const uint8_t* cur_u, const uint8_t* cur_v,
|
|
|
|
uint8_t* top_dst, uint8_t* bottom_dst, int len) {
|
|
|
|
(void)top_y;
|
|
|
|
(void)bottom_y;
|
|
|
|
(void)top_u;
|
|
|
|
(void)top_v;
|
|
|
|
(void)cur_u;
|
|
|
|
(void)cur_v;
|
|
|
|
(void)top_dst;
|
|
|
|
(void)bottom_dst;
|
|
|
|
(void)len;
|
|
|
|
assert(0); // COLORSPACE SUPPORT NOT COMPILED
|
|
|
|
}
|
|
|
|
#define UpsampleArgbLinePair_C EmptyUpsampleFunc
|
|
|
|
#define UpsampleRgbLinePair_C EmptyUpsampleFunc
|
|
|
|
#define UpsampleBgrLinePair_C EmptyUpsampleFunc
|
|
|
|
#define UpsampleRgba4444LinePair_C EmptyUpsampleFunc
|
|
|
|
#define UpsampleRgb565LinePair_C EmptyUpsampleFunc
|
|
|
|
#endif // WEBP_REDUCE_CSP
|
|
|
|
|
2017-10-27 05:31:27 +02:00
|
|
|
#endif
|
2011-09-02 23:30:08 +02:00
|
|
|
|
|
|
|
#undef LOAD_UV
|
|
|
|
#undef UPSAMPLE_FUNC
|
|
|
|
|
|
|
|
#endif // FANCY_UPSAMPLING
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
2012-06-28 09:34:23 +02:00
|
|
|
|
|
|
|
#if !defined(FANCY_UPSAMPLING)
|
|
|
|
#define DUAL_SAMPLE_FUNC(FUNC_NAME, FUNC) \
|
|
|
|
static void FUNC_NAME(const uint8_t* top_y, const uint8_t* bot_y, \
|
|
|
|
const uint8_t* top_u, const uint8_t* top_v, \
|
|
|
|
const uint8_t* bot_u, const uint8_t* bot_v, \
|
|
|
|
uint8_t* top_dst, uint8_t* bot_dst, int len) { \
|
|
|
|
const int half_len = len >> 1; \
|
|
|
|
int x; \
|
2013-08-19 21:40:25 +02:00
|
|
|
assert(top_dst != NULL); \
|
|
|
|
{ \
|
2012-06-28 09:34:23 +02:00
|
|
|
for (x = 0; x < half_len; ++x) { \
|
|
|
|
FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x + 0); \
|
|
|
|
FUNC(top_y[2 * x + 1], top_u[x], top_v[x], top_dst + 8 * x + 4); \
|
|
|
|
} \
|
|
|
|
if (len & 1) FUNC(top_y[2 * x + 0], top_u[x], top_v[x], top_dst + 8 * x); \
|
|
|
|
} \
|
|
|
|
if (bot_dst != NULL) { \
|
|
|
|
for (x = 0; x < half_len; ++x) { \
|
|
|
|
FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x + 0); \
|
|
|
|
FUNC(bot_y[2 * x + 1], bot_u[x], bot_v[x], bot_dst + 8 * x + 4); \
|
|
|
|
} \
|
|
|
|
if (len & 1) FUNC(bot_y[2 * x + 0], bot_u[x], bot_v[x], bot_dst + 8 * x); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
DUAL_SAMPLE_FUNC(DualLineSamplerBGRA, VP8YuvToBgra)
|
|
|
|
DUAL_SAMPLE_FUNC(DualLineSamplerARGB, VP8YuvToArgb)
|
|
|
|
#undef DUAL_SAMPLE_FUNC
|
|
|
|
|
|
|
|
#endif // !FANCY_UPSAMPLING
|
|
|
|
|
|
|
|
WebPUpsampleLinePairFunc WebPGetLinePairConverter(int alpha_is_last) {
|
|
|
|
WebPInitUpsamplers();
|
|
|
|
#ifdef FANCY_UPSAMPLING
|
|
|
|
return WebPUpsamplers[alpha_is_last ? MODE_BGRA : MODE_ARGB];
|
|
|
|
#else
|
|
|
|
return (alpha_is_last ? DualLineSamplerBGRA : DualLineSamplerARGB);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
2011-09-02 23:30:08 +02:00
|
|
|
// YUV444 converter
|
|
|
|
|
|
|
|
#define YUV444_FUNC(FUNC_NAME, FUNC, XSTEP) \
|
2015-08-18 06:15:37 +02:00
|
|
|
extern void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \
|
|
|
|
uint8_t* dst, int len); \
|
|
|
|
void FUNC_NAME(const uint8_t* y, const uint8_t* u, const uint8_t* v, \
|
|
|
|
uint8_t* dst, int len) { \
|
2011-09-02 23:30:08 +02:00
|
|
|
int i; \
|
2017-08-05 02:00:55 +02:00
|
|
|
for (i = 0; i < len; ++i) FUNC(y[i], u[i], v[i], &dst[i * (XSTEP)]); \
|
2011-09-02 23:30:08 +02:00
|
|
|
}
|
|
|
|
|
2017-04-21 09:45:27 +02:00
|
|
|
YUV444_FUNC(WebPYuv444ToRgba_C, VP8YuvToRgba, 4)
|
|
|
|
YUV444_FUNC(WebPYuv444ToBgra_C, VP8YuvToBgra, 4)
|
2017-11-23 08:51:19 +01:00
|
|
|
#if !defined(WEBP_REDUCE_CSP)
|
|
|
|
YUV444_FUNC(WebPYuv444ToRgb_C, VP8YuvToRgb, 3)
|
|
|
|
YUV444_FUNC(WebPYuv444ToBgr_C, VP8YuvToBgr, 3)
|
2017-04-21 09:45:27 +02:00
|
|
|
YUV444_FUNC(WebPYuv444ToArgb_C, VP8YuvToArgb, 4)
|
|
|
|
YUV444_FUNC(WebPYuv444ToRgba4444_C, VP8YuvToRgba4444, 2)
|
|
|
|
YUV444_FUNC(WebPYuv444ToRgb565_C, VP8YuvToRgb565, 2)
|
2017-11-23 08:51:19 +01:00
|
|
|
#else
|
|
|
|
static void EmptyYuv444Func(const uint8_t* y,
|
|
|
|
const uint8_t* u, const uint8_t* v,
|
|
|
|
uint8_t* dst, int len) {
|
|
|
|
(void)y;
|
|
|
|
(void)u;
|
|
|
|
(void)v;
|
|
|
|
(void)dst;
|
|
|
|
(void)len;
|
|
|
|
}
|
|
|
|
#define WebPYuv444ToRgb_C EmptyYuv444Func
|
|
|
|
#define WebPYuv444ToBgr_C EmptyYuv444Func
|
|
|
|
#define WebPYuv444ToArgb_C EmptyYuv444Func
|
|
|
|
#define WebPYuv444ToRgba4444_C EmptyYuv444Func
|
|
|
|
#define WebPYuv444ToRgb565_C EmptyYuv444Func
|
|
|
|
#endif // WEBP_REDUCE_CSP
|
2011-09-02 23:30:08 +02:00
|
|
|
|
|
|
|
#undef YUV444_FUNC
|
|
|
|
|
2014-08-27 16:55:34 +02:00
|
|
|
WebPYUV444Converter WebPYUV444Converters[MODE_LAST];
|
|
|
|
|
2015-02-13 09:24:25 +01:00
|
|
|
extern void WebPInitYUV444ConvertersMIPSdspR2(void);
|
2015-08-18 06:15:37 +02:00
|
|
|
extern void WebPInitYUV444ConvertersSSE2(void);
|
2017-12-04 21:47:03 +01:00
|
|
|
extern void WebPInitYUV444ConvertersSSE41(void);
|
2014-08-27 16:55:34 +02:00
|
|
|
|
2018-04-17 05:19:54 +02:00
|
|
|
WEBP_DSP_INIT_FUNC(WebPInitYUV444Converters) {
|
2017-04-21 09:45:27 +02:00
|
|
|
WebPYUV444Converters[MODE_RGBA] = WebPYuv444ToRgba_C;
|
|
|
|
WebPYUV444Converters[MODE_BGRA] = WebPYuv444ToBgra_C;
|
2017-11-23 08:51:19 +01:00
|
|
|
WebPYUV444Converters[MODE_RGB] = WebPYuv444ToRgb_C;
|
|
|
|
WebPYUV444Converters[MODE_BGR] = WebPYuv444ToBgr_C;
|
2017-04-21 09:45:27 +02:00
|
|
|
WebPYUV444Converters[MODE_ARGB] = WebPYuv444ToArgb_C;
|
|
|
|
WebPYUV444Converters[MODE_RGBA_4444] = WebPYuv444ToRgba4444_C;
|
|
|
|
WebPYUV444Converters[MODE_RGB_565] = WebPYuv444ToRgb565_C;
|
|
|
|
WebPYUV444Converters[MODE_rgbA] = WebPYuv444ToRgba_C;
|
|
|
|
WebPYUV444Converters[MODE_bgrA] = WebPYuv444ToBgra_C;
|
|
|
|
WebPYUV444Converters[MODE_Argb] = WebPYuv444ToArgb_C;
|
|
|
|
WebPYUV444Converters[MODE_rgbA_4444] = WebPYuv444ToRgba4444_C;
|
2014-08-27 16:55:34 +02:00
|
|
|
|
|
|
|
if (VP8GetCPUInfo != NULL) {
|
2015-08-18 06:15:37 +02:00
|
|
|
#if defined(WEBP_USE_SSE2)
|
|
|
|
if (VP8GetCPUInfo(kSSE2)) {
|
|
|
|
WebPInitYUV444ConvertersSSE2();
|
|
|
|
}
|
|
|
|
#endif
|
2017-12-04 21:47:03 +01:00
|
|
|
#if defined(WEBP_USE_SSE41)
|
|
|
|
if (VP8GetCPUInfo(kSSE4_1)) {
|
|
|
|
WebPInitYUV444ConvertersSSE41();
|
|
|
|
}
|
|
|
|
#endif
|
2014-08-27 16:55:34 +02:00
|
|
|
#if defined(WEBP_USE_MIPS_DSP_R2)
|
|
|
|
if (VP8GetCPUInfo(kMIPSdspR2)) {
|
|
|
|
WebPInitYUV444ConvertersMIPSdspR2();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
2011-09-02 23:30:08 +02:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
2014-05-22 09:49:42 +02:00
|
|
|
// Main calls
|
|
|
|
|
2015-02-13 09:24:25 +01:00
|
|
|
extern void WebPInitUpsamplersSSE2(void);
|
2017-12-04 21:47:03 +01:00
|
|
|
extern void WebPInitUpsamplersSSE41(void);
|
2015-02-13 09:24:25 +01:00
|
|
|
extern void WebPInitUpsamplersNEON(void);
|
|
|
|
extern void WebPInitUpsamplersMIPSdspR2(void);
|
2016-07-21 16:30:44 +02:00
|
|
|
extern void WebPInitUpsamplersMSA(void);
|
2011-09-02 23:30:08 +02:00
|
|
|
|
2018-04-17 05:19:54 +02:00
|
|
|
WEBP_DSP_INIT_FUNC(WebPInitUpsamplers) {
|
2011-09-02 23:30:08 +02:00
|
|
|
#ifdef FANCY_UPSAMPLING
|
2017-10-27 05:31:27 +02:00
|
|
|
#if !WEBP_NEON_OMIT_C_CODE
|
2017-04-21 09:45:27 +02:00
|
|
|
WebPUpsamplers[MODE_RGBA] = UpsampleRgbaLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_BGRA] = UpsampleBgraLinePair_C;
|
2017-11-23 08:51:19 +01:00
|
|
|
WebPUpsamplers[MODE_rgbA] = UpsampleRgbaLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_bgrA] = UpsampleBgraLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_RGB] = UpsampleRgbLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_BGR] = UpsampleBgrLinePair_C;
|
2017-04-21 09:45:27 +02:00
|
|
|
WebPUpsamplers[MODE_ARGB] = UpsampleArgbLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_RGBA_4444] = UpsampleRgba4444LinePair_C;
|
|
|
|
WebPUpsamplers[MODE_RGB_565] = UpsampleRgb565LinePair_C;
|
|
|
|
WebPUpsamplers[MODE_Argb] = UpsampleArgbLinePair_C;
|
|
|
|
WebPUpsamplers[MODE_rgbA_4444] = UpsampleRgba4444LinePair_C;
|
2017-10-27 05:31:27 +02:00
|
|
|
#endif
|
2012-06-04 16:40:32 +02:00
|
|
|
|
2014-05-26 18:05:03 +02:00
|
|
|
// If defined, use CPUInfo() to overwrite some pointers with faster versions.
|
2012-06-04 16:40:32 +02:00
|
|
|
if (VP8GetCPUInfo != NULL) {
|
|
|
|
#if defined(WEBP_USE_SSE2)
|
|
|
|
if (VP8GetCPUInfo(kSSE2)) {
|
2014-05-26 18:05:03 +02:00
|
|
|
WebPInitUpsamplersSSE2();
|
2012-06-04 16:40:32 +02:00
|
|
|
}
|
2013-01-18 03:06:26 +01:00
|
|
|
#endif
|
2017-12-04 21:47:03 +01:00
|
|
|
#if defined(WEBP_USE_SSE41)
|
|
|
|
if (VP8GetCPUInfo(kSSE4_1)) {
|
|
|
|
WebPInitUpsamplersSSE41();
|
|
|
|
}
|
|
|
|
#endif
|
2014-08-15 11:00:32 +02:00
|
|
|
#if defined(WEBP_USE_MIPS_DSP_R2)
|
|
|
|
if (VP8GetCPUInfo(kMIPSdspR2)) {
|
|
|
|
WebPInitUpsamplersMIPSdspR2();
|
|
|
|
}
|
2016-07-21 16:30:44 +02:00
|
|
|
#endif
|
|
|
|
#if defined(WEBP_USE_MSA)
|
|
|
|
if (VP8GetCPUInfo(kMSA)) {
|
|
|
|
WebPInitUpsamplersMSA();
|
|
|
|
}
|
2014-08-15 11:00:32 +02:00
|
|
|
#endif
|
|
|
|
}
|
2017-10-27 05:31:27 +02:00
|
|
|
|
|
|
|
#if defined(WEBP_USE_NEON)
|
|
|
|
if (WEBP_NEON_OMIT_C_CODE ||
|
|
|
|
(VP8GetCPUInfo != NULL && VP8GetCPUInfo(kNEON))) {
|
|
|
|
WebPInitUpsamplersNEON();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
assert(WebPUpsamplers[MODE_RGBA] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_BGRA] != NULL);
|
2017-11-23 08:51:19 +01:00
|
|
|
assert(WebPUpsamplers[MODE_rgbA] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_bgrA] != NULL);
|
2017-12-07 01:03:32 +01:00
|
|
|
#if !defined(WEBP_REDUCE_CSP) || !WEBP_NEON_OMIT_C_CODE
|
2017-11-23 08:51:19 +01:00
|
|
|
assert(WebPUpsamplers[MODE_RGB] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_BGR] != NULL);
|
2017-10-27 05:31:27 +02:00
|
|
|
assert(WebPUpsamplers[MODE_ARGB] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_RGBA_4444] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_RGB_565] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_Argb] != NULL);
|
|
|
|
assert(WebPUpsamplers[MODE_rgbA_4444] != NULL);
|
2017-12-07 01:03:32 +01:00
|
|
|
#endif
|
2017-10-27 05:31:27 +02:00
|
|
|
|
2014-08-27 16:55:34 +02:00
|
|
|
#endif // FANCY_UPSAMPLING
|
2012-06-04 16:40:32 +02:00
|
|
|
}
|
2014-05-22 09:49:42 +02:00
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|