chromium/third_party/libvpx/source/libvpx/vpx_ports/mem.h

/*
 *  Copyright (c) 2010 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.
 */

#ifndef VPX_VPX_PORTS_MEM_H_
#define VPX_VPX_PORTS_MEM_H_

#include "vpx_config.h"
#include "vpx/vpx_integer.h"

#if defined(__GNUC__) || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n, typ, val)
#elif defined(_MSC_VER)
#define DECLARE_ALIGNED
#else
#warning No alignment directives known for this compiler.
#define DECLARE_ALIGNED
#endif

#if defined(__has_builtin)
#define VPX_HAS_BUILTIN(x)
#else
#define VPX_HAS_BUILTIN
#endif

#if !VPX_HAS_BUILTIN(__builtin_prefetch) && !defined(__GNUC__)
#define __builtin_prefetch
#endif

/* Shift down with rounding */
#define ROUND_POWER_OF_TWO(value, n)
#define ROUND64_POWER_OF_TWO(value, n)

#define ALIGN_POWER_OF_TWO(value, n)

#define CONVERT_TO_SHORTPTR(x)
#define CAST_TO_SHORTPTR(x)
#if CONFIG_VP9_HIGHBITDEPTH
#define CONVERT_TO_BYTEPTR(x)
#define CAST_TO_BYTEPTR(x)
#endif  // CONFIG_VP9_HIGHBITDEPTH

#endif  // VPX_VPX_PORTS_MEM_H_