blob: 6526d2bba9390b9f0ee079d29b24cd6d670648fd [file] [log] [blame]
Jingning Han3ee6db62015-08-05 19:00:31 -07001/*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Yaowu Xu2dcefd92015-08-13 09:25:39 -070011#ifndef VP10_ENCODER_RDOPT_H_
12#define VP10_ENCODER_RDOPT_H_
Jingning Han3ee6db62015-08-05 19:00:31 -070013
Jingning Han54d66ef2015-08-06 21:14:07 -070014#include "vp10/common/blockd.h"
Jingning Han3ee6db62015-08-05 19:00:31 -070015
Jingning Han54d66ef2015-08-06 21:14:07 -070016#include "vp10/encoder/block.h"
17#include "vp10/encoder/context_tree.h"
Jingning Han3ee6db62015-08-05 19:00:31 -070018
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23struct TileInfo;
Yaowu Xu26a9afc2015-08-13 09:42:27 -070024struct VP10_COMP;
Jingning Han3ee6db62015-08-05 19:00:31 -070025struct macroblock;
26struct RD_COST;
27
Yaowu Xu26a9afc2015-08-13 09:42:27 -070028void vp10_rd_pick_intra_mode_sb(struct VP10_COMP *cpi, struct macroblock *x,
Jingning Han3ee6db62015-08-05 19:00:31 -070029 struct RD_COST *rd_cost, BLOCK_SIZE bsize,
30 PICK_MODE_CONTEXT *ctx, int64_t best_rd);
31
Yaowu Xu26a9afc2015-08-13 09:42:27 -070032unsigned int vp10_get_sby_perpixel_variance(VP10_COMP *cpi,
Jingning Han3ee6db62015-08-05 19:00:31 -070033 const struct buf_2d *ref,
34 BLOCK_SIZE bs);
Yaowu Xu3246fc02016-01-20 16:13:04 -080035#if CONFIG_VPX_HIGHBITDEPTH
Yaowu Xu26a9afc2015-08-13 09:42:27 -070036unsigned int vp10_high_get_sby_perpixel_variance(VP10_COMP *cpi,
Jingning Han3ee6db62015-08-05 19:00:31 -070037 const struct buf_2d *ref,
38 BLOCK_SIZE bs, int bd);
39#endif
40
Yaowu Xu26a9afc2015-08-13 09:42:27 -070041void vp10_rd_pick_inter_mode_sb(struct VP10_COMP *cpi,
Jingning Han3ee6db62015-08-05 19:00:31 -070042 struct TileDataEnc *tile_data,
43 struct macroblock *x,
44 int mi_row, int mi_col,
45 struct RD_COST *rd_cost,
46 BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx,
47 int64_t best_rd_so_far);
48
Yaowu Xu26a9afc2015-08-13 09:42:27 -070049void vp10_rd_pick_inter_mode_sb_seg_skip(struct VP10_COMP *cpi,
Jingning Han3ee6db62015-08-05 19:00:31 -070050 struct TileDataEnc *tile_data,
51 struct macroblock *x,
52 struct RD_COST *rd_cost,
53 BLOCK_SIZE bsize,
54 PICK_MODE_CONTEXT *ctx,
55 int64_t best_rd_so_far);
56
Yaowu Xu26a9afc2015-08-13 09:42:27 -070057int vp10_internal_image_edge(struct VP10_COMP *cpi);
58int vp10_active_h_edge(struct VP10_COMP *cpi, int mi_row, int mi_step);
59int vp10_active_v_edge(struct VP10_COMP *cpi, int mi_col, int mi_step);
60int vp10_active_edge_sb(struct VP10_COMP *cpi, int mi_row, int mi_col);
Jingning Han3ee6db62015-08-05 19:00:31 -070061
Yaowu Xu26a9afc2015-08-13 09:42:27 -070062void vp10_rd_pick_inter_mode_sub8x8(struct VP10_COMP *cpi,
Jingning Han3ee6db62015-08-05 19:00:31 -070063 struct TileDataEnc *tile_data,
64 struct macroblock *x,
65 int mi_row, int mi_col,
66 struct RD_COST *rd_cost,
67 BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx,
68 int64_t best_rd_so_far);
69
70#ifdef __cplusplus
71} // extern "C"
72#endif
73
Yaowu Xu2dcefd92015-08-13 09:25:39 -070074#endif // VP10_ENCODER_RDOPT_H_