2 * Copyright (c) 2020 The WebM project authors. All Rights Reserved.
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.
11 #ifndef VPX_VP9_ENCODER_VP9_EXT_RATECTRL_H_
12 #define VPX_VP9_ENCODER_VP9_EXT_RATECTRL_H_
14 #include "vpx/vpx_ext_ratectrl.h"
15 #include "vp9/encoder/vp9_firstpass.h"
17 typedef struct EXT_RATECTRL {
21 vpx_rc_config_t ratectrl_config;
22 vpx_rc_firstpass_stats_t rc_firstpass_stats;
25 void vp9_extrc_init(EXT_RATECTRL *ext_ratectrl);
27 void vp9_extrc_create(vpx_rc_funcs_t funcs, vpx_rc_config_t ratectrl_config,
28 EXT_RATECTRL *ext_ratectrl);
30 void vp9_extrc_delete(EXT_RATECTRL *ext_ratectrl);
32 void vp9_extrc_send_firstpass_stats(EXT_RATECTRL *ext_ratectrl,
33 const FIRST_PASS_INFO *first_pass_info);
35 void vp9_extrc_get_encodeframe_decision(
36 EXT_RATECTRL *ext_ratectrl, const GF_GROUP *gf_group, int show_index,
37 int coding_index, vpx_rc_encodeframe_decision_t *encode_frame_decision);
39 void vp9_extrc_update_encodeframe_result(EXT_RATECTRL *ext_ratectrl,
41 const YV12_BUFFER_CONFIG *source_frame,
42 const YV12_BUFFER_CONFIG *coded_frame,
43 uint32_t input_bit_depth);
45 #endif // VPX_VP9_ENCODER_VP9_EXT_RATECTRL_H_