chromium/third_party/libaom/source/libaom/aom_dsp/odintrin.h

/*
 * Copyright (c) 2001-2016, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

/* clang-format off */

#ifndef AOM_AOM_DSP_ODINTRIN_H_
#define AOM_AOM_DSP_ODINTRIN_H_

#include <stdlib.h>
#include <string.h>

#include "aom/aom_integer.h"
#include "aom_dsp/aom_dsp_common.h"
#include "aom_ports/bitops.h"

#ifdef __cplusplus
extern "C" {
#endif

od_coeff;

#define OD_DIVU_DMAX

extern uint32_t OD_DIVU_SMALL_CONSTS[OD_DIVU_DMAX][2];

/*Translate unsigned division by small divisors into multiplications.*/
#define OD_DIVU_SMALL(_x, _d)

#define OD_DIVU(_x, _d)

#define OD_MINI
#define OD_MAXI
#define OD_CLAMPI(min, val, max)

/*Integer logarithm (base 2) of a nonzero unsigned 32-bit integer.
  OD_ILOG_NZ(x) = (int)floor(log2(x)) + 1.*/
#define OD_ILOG_NZ(x)

/*Enable special features for gcc and compatible compilers.*/
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
#define OD_GNUC_PREREQ(maj, min, pat)
#else
#define OD_GNUC_PREREQ
#endif

#if OD_GNUC_PREREQ(3, 4, 0)
#define OD_WARN_UNUSED_RESULT
#else
#define OD_WARN_UNUSED_RESULT
#endif

#if OD_GNUC_PREREQ(3, 4, 0)
#define OD_ARG_NONNULL(x)
#else
#define OD_ARG_NONNULL
#endif

/*All of these macros should expect floats as arguments.*/
#define OD_SIGNMASK(a)
#define OD_FLIPSIGNI(a, b)

#ifdef __cplusplus
}  // extern "C"
#endif

#endif  // AOM_AOM_DSP_ODINTRIN_H_