cfl.h 1.14 KB
Newer Older
Luc Trudeau's avatar
Luc Trudeau committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
 * Copyright (c) 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.
 */

#ifndef AV1_COMMON_CFL_H_
#define AV1_COMMON_CFL_H_

15
#include "av1/common/blockd.h"
Luc Trudeau's avatar
Luc Trudeau committed
16

Luc Trudeau's avatar
Luc Trudeau committed
17
18
static INLINE int get_scaled_luma_q0(int alpha_q3, int16_t pred_buf_q3) {
  int scaled_luma_q6 = alpha_q3 * pred_buf_q3;
19
  return ROUND_POWER_OF_TWO_SIGNED(scaled_luma_q6, 6);
20
21
}

Luc Trudeau's avatar
Luc Trudeau committed
22
23
void cfl_predict_block(MACROBLOCKD *const xd, uint8_t *dst, int dst_stride,
                       int row, int col, TX_SIZE tx_size, int plane);
Luc Trudeau's avatar
Luc Trudeau committed
24

25
26
27
28
void cfl_store_block(MACROBLOCKD *const xd, BLOCK_SIZE bsize, TX_SIZE tx_size);

void cfl_store_tx(MACROBLOCKD *const xd, int row, int col, TX_SIZE tx_size,
                  BLOCK_SIZE bsize);
Luc Trudeau's avatar
Luc Trudeau committed
29
#endif  // AV1_COMMON_CFL_H_