Move intra prediction functions from vp9/common/ to vpx_dsp/
[aom.git] / vpx_dsp / mips / common_dspr2.h
blob7a10bf1c4050719bec76e0fef47d88d47ce86f01
1 /*
2 * Copyright (c) 2013 The WebM project authors. All Rights Reserved.
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 */
11 #ifndef VPX_COMMON_MIPS_DSPR2_H_
12 #define VPX_COMMON_MIPS_DSPR2_H_
14 #include <assert.h>
15 #include "./vpx_config.h"
16 #include "vpx/vpx_integer.h"
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 #if HAVE_DSPR2
22 #define CROP_WIDTH 512
24 extern uint8_t *vpx_ff_cropTbl; // From "vpx_dsp/mips/intrapred4_dspr2.c"
26 static INLINE void prefetch_load(const unsigned char *src) {
27 __asm__ __volatile__ (
28 "pref 0, 0(%[src]) \n\t"
30 : [src] "r" (src)
34 /* prefetch data for store */
35 static INLINE void prefetch_store(unsigned char *dst) {
36 __asm__ __volatile__ (
37 "pref 1, 0(%[dst]) \n\t"
39 : [dst] "r" (dst)
43 static INLINE void prefetch_load_streamed(const unsigned char *src) {
44 __asm__ __volatile__ (
45 "pref 4, 0(%[src]) \n\t"
47 : [src] "r" (src)
51 /* prefetch data for store */
52 static INLINE void prefetch_store_streamed(unsigned char *dst) {
53 __asm__ __volatile__ (
54 "pref 5, 0(%[dst]) \n\t"
56 : [dst] "r" (dst)
59 #endif // #if HAVE_DSPR2
60 #ifdef __cplusplus
61 } // extern "C"
62 #endif
64 #endif // VPX_COMMON_MIPS_DSPR2_H_