tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

av1_inv_txfm1d.h (2625B)


      1 /*
      2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
      3 *
      4 * This source code is subject to the terms of the BSD 2 Clause License and
      5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
      6 * was not distributed with this source code in the LICENSE file, you can
      7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
      8 * Media Patent License 1.0 was not distributed with this source code in the
      9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
     10 */
     11 
     12 #ifndef AOM_AV1_COMMON_AV1_INV_TXFM1D_H_
     13 #define AOM_AV1_COMMON_AV1_INV_TXFM1D_H_
     14 
     15 #include "av1/common/av1_txfm.h"
     16 
     17 #ifdef __cplusplus
     18 extern "C" {
     19 #endif
     20 
     21 static inline int32_t clamp_value(int32_t value, int8_t bit) {
     22  if (bit <= 0) return value;  // Do nothing for invalid clamp bit.
     23  const int64_t max_value = (1LL << (bit - 1)) - 1;
     24  const int64_t min_value = -(1LL << (bit - 1));
     25  return (int32_t)clamp64(value, min_value, max_value);
     26 }
     27 
     28 static inline void clamp_buf(int32_t *buf, int32_t size, int8_t bit) {
     29  for (int i = 0; i < size; ++i) buf[i] = clamp_value(buf[i], bit);
     30 }
     31 
     32 void av1_idct4(const int32_t *input, int32_t *output, int8_t cos_bit,
     33               const int8_t *stage_range);
     34 void av1_idct8(const int32_t *input, int32_t *output, int8_t cos_bit,
     35               const int8_t *stage_range);
     36 void av1_idct16(const int32_t *input, int32_t *output, int8_t cos_bit,
     37                const int8_t *stage_range);
     38 void av1_idct32(const int32_t *input, int32_t *output, int8_t cos_bit,
     39                const int8_t *stage_range);
     40 void av1_idct64(const int32_t *input, int32_t *output, int8_t cos_bit,
     41                const int8_t *stage_range);
     42 void av1_iadst4(const int32_t *input, int32_t *output, int8_t cos_bit,
     43                const int8_t *stage_range);
     44 void av1_iadst8(const int32_t *input, int32_t *output, int8_t cos_bit,
     45                const int8_t *stage_range);
     46 void av1_iadst16(const int32_t *input, int32_t *output, int8_t cos_bit,
     47                 const int8_t *stage_range);
     48 void av1_iidentity4_c(const int32_t *input, int32_t *output, int8_t cos_bit,
     49                      const int8_t *stage_range);
     50 void av1_iidentity8_c(const int32_t *input, int32_t *output, int8_t cos_bit,
     51                      const int8_t *stage_range);
     52 void av1_iidentity16_c(const int32_t *input, int32_t *output, int8_t cos_bit,
     53                       const int8_t *stage_range);
     54 void av1_iidentity32_c(const int32_t *input, int32_t *output, int8_t cos_bit,
     55                       const int8_t *stage_range);
     56 
     57 #ifdef __cplusplus
     58 }
     59 #endif
     60 
     61 #endif  // AOM_AV1_COMMON_AV1_INV_TXFM1D_H_