common_dspr2.c 836 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2015 The WebM project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #include "vpx_dsp/mips/common_dspr2.h"
  11. #if HAVE_DSPR2
  12. uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
  13. uint8_t *vpx_ff_cropTbl;
  14. void vpx_dsputil_static_init(void) {
  15. int i;
  16. for (i = 0; i < 256; i++) vpx_ff_cropTbl_a[i + CROP_WIDTH] = i;
  17. for (i = 0; i < CROP_WIDTH; i++) {
  18. vpx_ff_cropTbl_a[i] = 0;
  19. vpx_ff_cropTbl_a[i + CROP_WIDTH + 256] = 255;
  20. }
  21. vpx_ff_cropTbl = &vpx_ff_cropTbl_a[CROP_WIDTH];
  22. }
  23. #endif