• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2013 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 
11 #ifndef VPX_COMMON_MIPS_DSPR2_H_
12 #define VPX_COMMON_MIPS_DSPR2_H_
13 
14 #include <assert.h>
15 #include "./vpx_config.h"
16 #include "vpx/vpx_integer.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 #if HAVE_DSPR2
22 #define CROP_WIDTH 512
23 
24 extern uint8_t *vpx_ff_cropTbl;  // From "vpx_dsp/mips/intrapred4_dspr2.c"
25 
prefetch_load(const unsigned char * src)26 static INLINE void prefetch_load(const unsigned char *src) {
27   __asm__ __volatile__("pref   0,  0(%[src])   \n\t" : : [src] "r"(src));
28 }
29 
30 /* prefetch data for store */
prefetch_store(unsigned char * dst)31 static INLINE void prefetch_store(unsigned char *dst) {
32   __asm__ __volatile__("pref   1,  0(%[dst])   \n\t" : : [dst] "r"(dst));
33 }
34 
prefetch_load_streamed(const unsigned char * src)35 static INLINE void prefetch_load_streamed(const unsigned char *src) {
36   __asm__ __volatile__("pref   4,  0(%[src])   \n\t" : : [src] "r"(src));
37 }
38 
39 /* prefetch data for store */
prefetch_store_streamed(unsigned char * dst)40 static INLINE void prefetch_store_streamed(unsigned char *dst) {
41   __asm__ __volatile__("pref   5,  0(%[dst])   \n\t" : : [dst] "r"(dst));
42 }
43 #endif  // #if HAVE_DSPR2
44 #ifdef __cplusplus
45 }  // extern "C"
46 #endif
47 
48 #endif  // VPX_COMMON_MIPS_DSPR2_H_
49