godot/thirdparty/libwebp/src/dsp/yuv_mips_dsp_r2.c

// Copyright 2014 Google Inc. All Rights Reserved.
//
// 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.
// -----------------------------------------------------------------------------
//
// MIPS DSPr2 version of YUV to RGB upsampling functions.
//
// Author(s):  Branimir Vasic ([email protected])
//             Djordje Pesut  ([email protected])

#include "src/dsp/dsp.h"

#if defined(WEBP_USE_MIPS_DSP_R2)

#include "src/dsp/yuv.h"

//------------------------------------------------------------------------------
// simple point-sampling

#define ROW_FUNC_PART_1          \

#define ROW_FUNC_PART_2          \

#define ASM_CLOBBER_LIST                                                       \

#define ROW_FUNC

ROW_FUNC(YuvToRgbRow_MIPSdspR2,      3, 0, 1, 2, 0)
ROW_FUNC(YuvToRgbaRow_MIPSdspR2,     4, 0, 1, 2, 3)
ROW_FUNC(YuvToBgrRow_MIPSdspR2,      3, 2, 1, 0, 0)
ROW_FUNC(YuvToBgraRow_MIPSdspR2,     4, 2, 1, 0, 3)

#undef ROW_FUNC
#undef ASM_CLOBBER_LIST
#undef ROW_FUNC_PART_2
#undef ROW_FUNC_PART_1

//------------------------------------------------------------------------------
// Entry point

extern void WebPInitSamplersMIPSdspR2(void);

WEBP_TSAN_IGNORE_FUNCTION void WebPInitSamplersMIPSdspR2(void) {
  WebPSamplers[MODE_RGB]  = YuvToRgbRow_MIPSdspR2;
  WebPSamplers[MODE_RGBA] = YuvToRgbaRow_MIPSdspR2;
  WebPSamplers[MODE_BGR]  = YuvToBgrRow_MIPSdspR2;
  WebPSamplers[MODE_BGRA] = YuvToBgraRow_MIPSdspR2;
}

#else  // !WEBP_USE_MIPS_DSP_R2

WEBP_DSP_INIT_STUB(WebPInitSamplersMIPSdspR2)

#endif  // WEBP_USE_MIPS_DSP_R2