summaryrefslogtreecommitdiffstats
path: root/media/libvpx/libvpx/vpx_dsp/mips/common_dspr2.c
blob: b22f084a02319a79f626f86b760797d903e10fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 *  Copyright (c) 2015 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE 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.
 */

#include "vpx_dsp/mips/common_dspr2.h"

#if HAVE_DSPR2
uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
uint8_t *vpx_ff_cropTbl;

void vpx_dsputil_static_init(void) {
  int i;

  for (i = 0; i < 256; i++) vpx_ff_cropTbl_a[i + CROP_WIDTH] = i;

  for (i = 0; i < CROP_WIDTH; i++) {
    vpx_ff_cropTbl_a[i] = 0;
    vpx_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
  }

  vpx_ff_cropTbl = &vpx_ff_cropTbl_a[CROP_WIDTH];
}

#endif