blob: ce32fb47e624010c3be7b0cc153cfbb499f3c015 [file] [log] [blame]
Yaowu Xuc27fc142016-08-22 16:08:15 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Yaowu Xuc27fc142016-08-22 16:08:15 -07003 *
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07004 * 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.
Yaowu Xuc27fc142016-08-22 16:08:15 -070010 */
11
James Zerne1cbb132018-08-22 14:10:36 -070012#ifndef AOM_AV1_ENCODER_ENCODEFRAME_H_
13#define AOM_AV1_ENCODER_ENCODEFRAME_H_
Yaowu Xuc27fc142016-08-22 16:08:15 -070014
Yaowu Xuf883b422016-08-30 14:01:10 -070015#include "aom/aom_integer.h"
Angie Chiangb14b73f2017-04-13 16:26:00 -070016#include "av1/common/blockd.h"
17#include "av1/common/enums.h"
Yaowu Xuc27fc142016-08-22 16:08:15 -070018
Remya1a090d52020-05-04 11:52:10 +053019#include "av1/encoder/global_motion.h"
20
Yaowu Xuc27fc142016-08-22 16:08:15 -070021#ifdef __cplusplus
22extern "C" {
23#endif
24
Debargha Mukherjee4fef7a52019-04-04 01:02:06 -070025#define DELTA_Q_PERCEPTUAL_MODULATION \
26 1 // 0: variance based
27 // 1: wavelet AC energy based
Yue Chen2dbdbc92018-05-24 09:54:01 -070028
Yaowu Xuc27fc142016-08-22 16:08:15 -070029struct macroblock;
30struct yv12_buffer_config;
Yaowu Xuf883b422016-08-30 14:01:10 -070031struct AV1_COMP;
Yaowu Xuc27fc142016-08-22 16:08:15 -070032struct ThreadData;
33
Marco Paniconi60e4e242022-07-24 23:32:02 -070034void av1_init_rtc_counters(struct macroblock *const x);
35
36void av1_accumulate_rtc_counters(struct AV1_COMP *cpi,
37 const struct macroblock *const x);
38
Yaowu Xuf883b422016-08-30 14:01:10 -070039void av1_setup_src_planes(struct macroblock *x,
40 const struct yv12_buffer_config *src, int mi_row,
Ravi Chaudhary5396fc82018-10-24 12:47:25 +053041 int mi_col, const int num_planes, BLOCK_SIZE bsize);
Yaowu Xuc27fc142016-08-22 16:08:15 -070042
Yaowu Xuf883b422016-08-30 14:01:10 -070043void av1_encode_frame(struct AV1_COMP *cpi);
Yaowu Xuc27fc142016-08-22 16:08:15 -070044
Ravi Chaudharya497eb42018-09-07 12:38:08 +053045void av1_alloc_tile_data(struct AV1_COMP *cpi);
Yaowu Xuf883b422016-08-30 14:01:10 -070046void av1_init_tile_data(struct AV1_COMP *cpi);
47void av1_encode_tile(struct AV1_COMP *cpi, struct ThreadData *td, int tile_row,
48 int tile_col);
Ravi Chaudharya497eb42018-09-07 12:38:08 +053049void av1_encode_sb_row(struct AV1_COMP *cpi, struct ThreadData *td,
50 int tile_row, int tile_col, int mi_row);
Yaowu Xuc27fc142016-08-22 16:08:15 -070051#ifdef __cplusplus
52} // extern "C"
53#endif
54
James Zerne1cbb132018-08-22 14:10:36 -070055#endif // AOM_AV1_ENCODER_ENCODEFRAME_H_