| /* |
| * Copyright (c) 2017, 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. |
| */ |
| |
| #include "./aom_dsp_rtcd.h" |
| #include "av1/common/av1_txfm.h" |
| |
| void av1_round_shift_array_c(int32_t *arr, int size, int bit) { |
| int i; |
| if (bit == 0) { |
| return; |
| } else { |
| if (bit > 0) { |
| for (i = 0; i < size; i++) { |
| arr[i] = round_shift(arr[i], bit); |
| } |
| } else { |
| for (i = 0; i < size; i++) { |
| arr[i] = arr[i] * (1 << (-bit)); |
| } |
| } |
| } |
| } |