summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/common/av1_txfm.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/av1/common/av1_txfm.h')
-rw-r--r--third_party/aom/av1/common/av1_txfm.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/third_party/aom/av1/common/av1_txfm.h b/third_party/aom/av1/common/av1_txfm.h
index b341cb73d..269ef5705 100644
--- a/third_party/aom/av1/common/av1_txfm.h
+++ b/third_party/aom/av1/common/av1_txfm.h
@@ -120,11 +120,12 @@ static INLINE int get_max_bit(int x) {
}
// TODO(angiebird): implement SSE
-static INLINE void clamp_block(int16_t *block, int block_size, int stride,
- int low, int high) {
+static INLINE void clamp_block(int16_t *block, int block_size_row,
+ int block_size_col, int stride, int low,
+ int high) {
int i, j;
- for (i = 0; i < block_size; ++i) {
- for (j = 0; j < block_size; ++j) {
+ for (i = 0; i < block_size_row; ++i) {
+ for (j = 0; j < block_size_col; ++j) {
block[i * stride + j] = clamp(block[i * stride + j], low, high);
}
}
@@ -208,6 +209,16 @@ static INLINE void set_flip_cfg(int tx_type, TXFM_2D_FLIP_CFG *cfg) {
}
}
+#if CONFIG_MRC_TX
+static INLINE void get_mrc_mask(const uint8_t *pred, int pred_stride, int *mask,
+ int mask_stride, int width, int height) {
+ for (int i = 0; i < height; ++i) {
+ for (int j = 0; j < width; ++j)
+ mask[i * mask_stride + j] = pred[i * pred_stride + j] > 100 ? 1 : 0;
+ }
+}
+#endif // CONFIG_MRC_TX
+
#ifdef __cplusplus
extern "C" {
#endif