Blame src/dsp/rescaler_mips_dsp_r2.c

Packit 9c6abc
// Copyright 2014 Google Inc. All Rights Reserved.
Packit 9c6abc
//
Packit 9c6abc
// Use of this source code is governed by a BSD-style license
Packit 9c6abc
// that can be found in the COPYING file in the root of the source
Packit 9c6abc
// tree. An additional intellectual property rights grant can be found
Packit 9c6abc
// in the file PATENTS. All contributing project authors may
Packit 9c6abc
// be found in the AUTHORS file in the root of the source tree.
Packit 9c6abc
// -----------------------------------------------------------------------------
Packit 9c6abc
//
Packit 9c6abc
// MIPS version of rescaling functions
Packit 9c6abc
//
Packit 9c6abc
// Author(s): Djordje Pesut (djordje.pesut@imgtec.com)
Packit 9c6abc
Packit 9c6abc
#include "src/dsp/dsp.h"
Packit 9c6abc
Packit 9c6abc
#if defined(WEBP_USE_MIPS_DSP_R2) && !defined(WEBP_REDUCE_SIZE)
Packit 9c6abc
Packit 9c6abc
#include <assert.h>
Packit 9c6abc
#include "src/utils/rescaler_utils.h"
Packit 9c6abc
Packit 9c6abc
#define ROUNDER (WEBP_RESCALER_ONE >> 1)
Packit 9c6abc
#define MULT_FIX(x, y) (((uint64_t)(x) * (y) + ROUNDER) >> WEBP_RESCALER_RFIX)
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Row export
Packit 9c6abc
Packit 9c6abc
static void ExportRowShrink_MIPSdspR2(WebPRescaler* const wrk) {
Packit 9c6abc
  int i;
Packit 9c6abc
  const int x_out_max = wrk->dst_width * wrk->num_channels;
Packit 9c6abc
  uint8_t* dst = wrk->dst;
Packit 9c6abc
  rescaler_t* irow = wrk->irow;
Packit 9c6abc
  const rescaler_t* frow = wrk->frow;
Packit 9c6abc
  const int yscale = wrk->fy_scale * (-wrk->y_accum);
Packit 9c6abc
  int temp0, temp1, temp2, temp3, temp4, temp5, loop_end;
Packit 9c6abc
  const int temp7 = (int)wrk->fxy_scale;
Packit 9c6abc
  const int temp6 = (x_out_max & ~0x3) << 2;
Packit 9c6abc
  assert(!WebPRescalerOutputDone(wrk));
Packit 9c6abc
  assert(wrk->y_accum <= 0);
Packit 9c6abc
  assert(!wrk->y_expand);
Packit 9c6abc
  assert(wrk->fxy_scale != 0);
Packit 9c6abc
  if (yscale) {
Packit 9c6abc
    if (x_out_max >= 4) {
Packit 9c6abc
      int temp8, temp9, temp10, temp11;
Packit 9c6abc
      __asm__ volatile (
Packit 9c6abc
        "li       %[temp3],    0x10000                    \n\t"
Packit 9c6abc
        "li       %[temp4],    0x8000                     \n\t"
Packit 9c6abc
        "addu     %[loop_end], %[frow],     %[temp6]      \n\t"
Packit 9c6abc
      "1:                                                 \n\t"
Packit 9c6abc
        "lw       %[temp0],    0(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp1],    4(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp2],    8(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp5],    12(%[frow])                \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[temp0],    %[yscale]     \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[temp1],    %[yscale]     \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[temp2],    %[yscale]     \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[temp5],    %[yscale]     \n\t"
Packit 9c6abc
        "addiu    %[frow],     %[frow],     16            \n\t"
Packit 9c6abc
        "mfhi     %[temp0],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp1],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp2],    $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp5],    $ac3                       \n\t"
Packit 9c6abc
        "lw       %[temp8],    0(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp9],    4(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp10],   8(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp11],   12(%[irow])                \n\t"
Packit 9c6abc
        "addiu    %[dst],      %[dst],      4             \n\t"
Packit 9c6abc
        "addiu    %[irow],     %[irow],     16            \n\t"
Packit 9c6abc
        "subu     %[temp8],    %[temp8],    %[temp0]      \n\t"
Packit 9c6abc
        "subu     %[temp9],    %[temp9],    %[temp1]      \n\t"
Packit 9c6abc
        "subu     %[temp10],   %[temp10],   %[temp2]      \n\t"
Packit 9c6abc
        "subu     %[temp11],   %[temp11],   %[temp5]      \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[temp8],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[temp9],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[temp10],   %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[temp11],   %[temp7]      \n\t"
Packit 9c6abc
        "mfhi     %[temp8],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp9],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp10],   $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp11],   $ac3                       \n\t"
Packit 9c6abc
        "sw       %[temp0],    -16(%[irow])               \n\t"
Packit 9c6abc
        "sw       %[temp1],    -12(%[irow])               \n\t"
Packit 9c6abc
        "sw       %[temp2],    -8(%[irow])                \n\t"
Packit 9c6abc
        "sw       %[temp5],    -4(%[irow])                \n\t"
Packit 9c6abc
        "sb       %[temp8],    -4(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp9],    -3(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp10],   -2(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp11],   -1(%[dst])                 \n\t"
Packit 9c6abc
        "bne      %[frow],     %[loop_end], 1b            \n\t"
Packit 9c6abc
        : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3),
Packit 9c6abc
          [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow),
Packit 9c6abc
          [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end),
Packit 9c6abc
          [temp8]"=&r"(temp8), [temp9]"=&r"(temp9), [temp10]"=&r"(temp10),
Packit 9c6abc
          [temp11]"=&r"(temp11), [temp2]"=&r"(temp2)
Packit 9c6abc
        : [temp7]"r"(temp7), [yscale]"r"(yscale), [temp6]"r"(temp6)
Packit 9c6abc
        : "memory", "hi", "lo", "$ac1hi", "$ac1lo",
Packit 9c6abc
          "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
Packit 9c6abc
      );
Packit 9c6abc
    }
Packit 9c6abc
    for (i = 0; i < (x_out_max & 0x3); ++i) {
Packit 9c6abc
      const uint32_t frac = (uint32_t)MULT_FIX(*frow++, yscale);
Packit 9c6abc
      const int v = (int)MULT_FIX(*irow - frac, wrk->fxy_scale);
Packit 9c6abc
      assert(v >= 0 && v <= 255);
Packit 9c6abc
      *dst++ = v;
Packit 9c6abc
      *irow++ = frac;   // new fractional start
Packit 9c6abc
    }
Packit 9c6abc
  } else {
Packit 9c6abc
    if (x_out_max >= 4) {
Packit 9c6abc
      __asm__ volatile (
Packit 9c6abc
        "li       %[temp3],    0x10000                    \n\t"
Packit 9c6abc
        "li       %[temp4],    0x8000                     \n\t"
Packit 9c6abc
        "addu     %[loop_end], %[irow],     %[temp6]      \n\t"
Packit 9c6abc
      "1:                                                 \n\t"
Packit 9c6abc
        "lw       %[temp0],    0(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp1],    4(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp2],    8(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp5],    12(%[irow])                \n\t"
Packit 9c6abc
        "addiu    %[dst],      %[dst],      4             \n\t"
Packit 9c6abc
        "addiu    %[irow],     %[irow],     16            \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[temp0],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[temp1],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[temp2],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp3],    %[temp4]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[temp5],    %[temp7]      \n\t"
Packit 9c6abc
        "mfhi     %[temp0],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp1],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp2],    $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp5],    $ac3                       \n\t"
Packit 9c6abc
        "sw       $zero,       -16(%[irow])               \n\t"
Packit 9c6abc
        "sw       $zero,       -12(%[irow])               \n\t"
Packit 9c6abc
        "sw       $zero,       -8(%[irow])                \n\t"
Packit 9c6abc
        "sw       $zero,       -4(%[irow])                \n\t"
Packit 9c6abc
        "sb       %[temp0],    -4(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp1],    -3(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp2],    -2(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp5],    -1(%[dst])                 \n\t"
Packit 9c6abc
        "bne      %[irow],     %[loop_end], 1b            \n\t"
Packit 9c6abc
        : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3),
Packit 9c6abc
          [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [irow]"+r"(irow),
Packit 9c6abc
          [dst]"+r"(dst), [loop_end]"=&r"(loop_end), [temp2]"=&r"(temp2)
Packit 9c6abc
        : [temp7]"r"(temp7), [temp6]"r"(temp6)
Packit 9c6abc
        : "memory", "hi", "lo", "$ac1hi", "$ac1lo",
Packit 9c6abc
          "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
Packit 9c6abc
      );
Packit 9c6abc
    }
Packit 9c6abc
    for (i = 0; i < (x_out_max & 0x3); ++i) {
Packit 9c6abc
      const int v = (int)MULT_FIX(*irow, wrk->fxy_scale);
Packit 9c6abc
      assert(v >= 0 && v <= 255);
Packit 9c6abc
      *dst++ = v;
Packit 9c6abc
      *irow++ = 0;
Packit 9c6abc
    }
Packit 9c6abc
  }
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
static void ExportRowExpand_MIPSdspR2(WebPRescaler* const wrk) {
Packit 9c6abc
  int i;
Packit 9c6abc
  uint8_t* dst = wrk->dst;
Packit 9c6abc
  rescaler_t* irow = wrk->irow;
Packit 9c6abc
  const int x_out_max = wrk->dst_width * wrk->num_channels;
Packit 9c6abc
  const rescaler_t* frow = wrk->frow;
Packit 9c6abc
  int temp0, temp1, temp2, temp3, temp4, temp5, loop_end;
Packit 9c6abc
  const int temp6 = (x_out_max & ~0x3) << 2;
Packit 9c6abc
  const int temp7 = (int)wrk->fy_scale;
Packit 9c6abc
  assert(!WebPRescalerOutputDone(wrk));
Packit 9c6abc
  assert(wrk->y_accum <= 0);
Packit 9c6abc
  assert(wrk->y_expand);
Packit 9c6abc
  assert(wrk->y_sub != 0);
Packit 9c6abc
  if (wrk->y_accum == 0) {
Packit 9c6abc
    if (x_out_max >= 4) {
Packit 9c6abc
      __asm__ volatile (
Packit 9c6abc
        "li       %[temp4],    0x10000                    \n\t"
Packit 9c6abc
        "li       %[temp5],    0x8000                     \n\t"
Packit 9c6abc
        "addu     %[loop_end], %[frow],     %[temp6]      \n\t"
Packit 9c6abc
      "1:                                                 \n\t"
Packit 9c6abc
        "lw       %[temp0],    0(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp1],    4(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp2],    8(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp3],    12(%[frow])                \n\t"
Packit 9c6abc
        "addiu    %[dst],      %[dst],      4             \n\t"
Packit 9c6abc
        "addiu    %[frow],     %[frow],     16            \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp4],    %[temp5]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[temp0],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp4],    %[temp5]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[temp1],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp4],    %[temp5]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[temp2],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp4],    %[temp5]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[temp3],    %[temp7]      \n\t"
Packit 9c6abc
        "mfhi     %[temp0],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp1],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp2],    $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp3],    $ac3                       \n\t"
Packit 9c6abc
        "sb       %[temp0],    -4(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp1],    -3(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp2],    -2(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp3],    -1(%[dst])                 \n\t"
Packit 9c6abc
        "bne      %[frow],     %[loop_end], 1b            \n\t"
Packit 9c6abc
        : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3),
Packit 9c6abc
          [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow),
Packit 9c6abc
          [dst]"+r"(dst), [loop_end]"=&r"(loop_end), [temp2]"=&r"(temp2)
Packit 9c6abc
        : [temp7]"r"(temp7), [temp6]"r"(temp6)
Packit 9c6abc
        : "memory", "hi", "lo", "$ac1hi", "$ac1lo",
Packit 9c6abc
          "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
Packit 9c6abc
      );
Packit 9c6abc
    }
Packit 9c6abc
    for (i = 0; i < (x_out_max & 0x3); ++i) {
Packit 9c6abc
      const uint32_t J = *frow++;
Packit 9c6abc
      const int v = (int)MULT_FIX(J, wrk->fy_scale);
Packit 9c6abc
      assert(v >= 0 && v <= 255);
Packit 9c6abc
      *dst++ = v;
Packit 9c6abc
    }
Packit 9c6abc
  } else {
Packit 9c6abc
    const uint32_t B = WEBP_RESCALER_FRAC(-wrk->y_accum, wrk->y_sub);
Packit 9c6abc
    const uint32_t A = (uint32_t)(WEBP_RESCALER_ONE - B);
Packit 9c6abc
    if (x_out_max >= 4) {
Packit 9c6abc
      int temp8, temp9, temp10, temp11;
Packit 9c6abc
      __asm__ volatile (
Packit 9c6abc
        "li       %[temp8],    0x10000                    \n\t"
Packit 9c6abc
        "li       %[temp9],    0x8000                     \n\t"
Packit 9c6abc
        "addu     %[loop_end], %[frow],     %[temp6]      \n\t"
Packit 9c6abc
      "1:                                                 \n\t"
Packit 9c6abc
        "lw       %[temp0],    0(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp1],    4(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp2],    8(%[frow])                 \n\t"
Packit 9c6abc
        "lw       %[temp3],    12(%[frow])                \n\t"
Packit 9c6abc
        "lw       %[temp4],    0(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp5],    4(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp10],   8(%[irow])                 \n\t"
Packit 9c6abc
        "lw       %[temp11],   12(%[irow])                \n\t"
Packit 9c6abc
        "addiu    %[dst],      %[dst],      4             \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[A],        %[temp0]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[B],        %[temp4]      \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[A],        %[temp1]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[B],        %[temp5]      \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[A],        %[temp2]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[B],        %[temp10]     \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[A],        %[temp3]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[B],        %[temp11]     \n\t"
Packit 9c6abc
        "addiu    %[frow],     %[frow],     16            \n\t"
Packit 9c6abc
        "addiu    %[irow],     %[irow],     16            \n\t"
Packit 9c6abc
        "mfhi     %[temp0],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp1],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp2],    $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp3],    $ac3                       \n\t"
Packit 9c6abc
        "mult     $ac0,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac0,        %[temp0],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac1,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac1,        %[temp1],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac2,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac2,        %[temp2],    %[temp7]      \n\t"
Packit 9c6abc
        "mult     $ac3,        %[temp8],    %[temp9]      \n\t"
Packit 9c6abc
        "maddu    $ac3,        %[temp3],    %[temp7]      \n\t"
Packit 9c6abc
        "mfhi     %[temp0],    $ac0                       \n\t"
Packit 9c6abc
        "mfhi     %[temp1],    $ac1                       \n\t"
Packit 9c6abc
        "mfhi     %[temp2],    $ac2                       \n\t"
Packit 9c6abc
        "mfhi     %[temp3],    $ac3                       \n\t"
Packit 9c6abc
        "sb       %[temp0],    -4(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp1],    -3(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp2],    -2(%[dst])                 \n\t"
Packit 9c6abc
        "sb       %[temp3],    -1(%[dst])                 \n\t"
Packit 9c6abc
        "bne      %[frow],     %[loop_end], 1b            \n\t"
Packit 9c6abc
        : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp3]"=&r"(temp3),
Packit 9c6abc
          [temp4]"=&r"(temp4), [temp5]"=&r"(temp5), [frow]"+r"(frow),
Packit 9c6abc
          [irow]"+r"(irow), [dst]"+r"(dst), [loop_end]"=&r"(loop_end),
Packit 9c6abc
          [temp8]"=&r"(temp8), [temp9]"=&r"(temp9), [temp10]"=&r"(temp10),
Packit 9c6abc
          [temp11]"=&r"(temp11), [temp2]"=&r"(temp2)
Packit 9c6abc
        : [temp7]"r"(temp7), [temp6]"r"(temp6), [A]"r"(A), [B]"r"(B)
Packit 9c6abc
        : "memory", "hi", "lo", "$ac1hi", "$ac1lo",
Packit 9c6abc
          "$ac2hi", "$ac2lo", "$ac3hi", "$ac3lo"
Packit 9c6abc
      );
Packit 9c6abc
    }
Packit 9c6abc
    for (i = 0; i < (x_out_max & 0x3); ++i) {
Packit 9c6abc
      const uint64_t I = (uint64_t)A * *frow++
Packit 9c6abc
                       + (uint64_t)B * *irow++;
Packit 9c6abc
      const uint32_t J = (uint32_t)((I + ROUNDER) >> WEBP_RESCALER_RFIX);
Packit 9c6abc
      const int v = (int)MULT_FIX(J, wrk->fy_scale);
Packit 9c6abc
      assert(v >= 0 && v <= 255);
Packit 9c6abc
      *dst++ = v;
Packit 9c6abc
    }
Packit 9c6abc
  }
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
#undef MULT_FIX
Packit 9c6abc
#undef ROUNDER
Packit 9c6abc
Packit 9c6abc
//------------------------------------------------------------------------------
Packit 9c6abc
// Entry point
Packit 9c6abc
Packit 9c6abc
extern void WebPRescalerDspInitMIPSdspR2(void);
Packit 9c6abc
Packit 9c6abc
WEBP_TSAN_IGNORE_FUNCTION void WebPRescalerDspInitMIPSdspR2(void) {
Packit 9c6abc
  WebPRescalerExportRowExpand = ExportRowExpand_MIPSdspR2;
Packit 9c6abc
  WebPRescalerExportRowShrink = ExportRowShrink_MIPSdspR2;
Packit 9c6abc
}
Packit 9c6abc
Packit 9c6abc
#else  // !WEBP_USE_MIPS_DSP_R2
Packit 9c6abc
Packit 9c6abc
WEBP_DSP_INIT_STUB(WebPRescalerDspInitMIPSdspR2)
Packit 9c6abc
Packit 9c6abc
#endif  // WEBP_USE_MIPS_DSP_R2