1 /* 2 * Copyright (c) 2023 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 11 #ifndef VPX_VP9_ENCODER_VP9_TPL_MODEL_H_ 12 #define VPX_VP9_ENCODER_VP9_TPL_MODEL_H_ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #ifndef M_LOG2_E 19 #define M_LOG2_E 0.693147180559945309417 20 #endif 21 #define log2f(x) (log(x) / (float)M_LOG2_E) 22 23 #define TPL_DEP_COST_SCALE_LOG2 4 24 25 typedef struct GF_PICTURE { 26 YV12_BUFFER_CONFIG *frame; 27 int ref_frame[3]; 28 FRAME_UPDATE_TYPE update_type; 29 } GF_PICTURE; 30 31 void vp9_init_tpl_buffer(VP9_COMP *cpi); 32 void vp9_setup_tpl_stats(VP9_COMP *cpi); 33 void vp9_free_tpl_buffer(VP9_COMP *cpi); 34 void vp9_estimate_tpl_qp_gop(VP9_COMP *cpi); 35 36 void vp9_wht_fwd_txfm(int16_t *src_diff, int bw, tran_low_t *coeff, 37 TX_SIZE tx_size); 38 #if CONFIG_VP9_HIGHBITDEPTH 39 void vp9_highbd_wht_fwd_txfm(int16_t *src_diff, int bw, tran_low_t *coeff, 40 TX_SIZE tx_size); 41 #endif 42 43 #ifdef __cplusplus 44 } // extern "C" 45 #endif 46 47 #endif // VPX_VP9_ENCODER_VP9_TPL_MODEL_H_ 48