AOMedia AV1 Codec
tpl_model.h
1/*
2 * Copyright (c) 2019, Alliance for Open Media. All rights reserved
3 *
4 * 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.
10 */
11
12#ifndef AOM_AV1_ENCODER_TPL_MODEL_H_
13#define AOM_AV1_ENCODER_TPL_MODEL_H_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
21struct AV1_PRIMARY;
22struct AV1_COMP;
23struct AV1_SEQ_CODING_TOOLS;
25struct EncodeFrameInput;
26struct GF_GROUP;
27struct ThreadData;
28struct TPL_INFO;
29
30#include "config/aom_config.h"
31
32#include "aom_scale/yv12config.h"
33#include "aom_util/aom_pthread.h"
34
35#include "av1/common/mv.h"
36#include "av1/common/scale.h"
37#include "av1/encoder/block.h"
39#include "av1/encoder/ratectrl.h"
40
41static INLINE BLOCK_SIZE convert_length_to_bsize(int length) {
42 switch (length) {
43 case 64: return BLOCK_64X64;
44 case 32: return BLOCK_32X32;
45 case 16: return BLOCK_16X16;
46 case 8: return BLOCK_8X8;
47 case 4: return BLOCK_4X4;
48 default:
49 assert(0 && "Invalid block size for tpl model");
50 return BLOCK_16X16;
51 }
52}
53
54typedef struct AV1TplRowMultiThreadSync {
55#if CONFIG_MULTITHREAD
56 // Synchronization objects for top-right dependency.
57 pthread_mutex_t *mutex_;
58 pthread_cond_t *cond_;
59#endif
60 // Buffer to store the macroblock whose encoding is complete.
61 // num_finished_cols[i] stores the number of macroblocks which finished
62 // encoding in the ith macroblock row.
63 int *num_finished_cols;
64 // Number of extra macroblocks of the top row to be complete for encoding
65 // of the current macroblock to start. A value of 1 indicates top-right
66 // dependency.
67 int sync_range;
68 // Number of macroblock rows.
69 int rows;
70 // Number of threads processing the current tile.
71 int num_threads_working;
72} AV1TplRowMultiThreadSync;
73
74typedef struct AV1TplRowMultiThreadInfo {
75 // Initialized to false, set to true by the worker thread that encounters an
76 // error in order to abort the processing of other worker threads.
77 bool tpl_mt_exit;
78#if CONFIG_MULTITHREAD
79 // Mutex lock object used for error handling.
80 pthread_mutex_t *mutex_;
81#endif
82 // Row synchronization related function pointers.
83 void (*sync_read_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c);
84 void (*sync_write_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c,
85 int cols);
86} AV1TplRowMultiThreadInfo;
87
88// TODO(jingning): This needs to be cleaned up next.
89
90// TPL stats buffers are prepared for every frame in the GOP,
91// including (internal) overlays and (internal) arfs.
92// In addition, frames in the lookahead that are outside of the GOP
93// are also used.
94// Thus it should use
95// (gop_length) + (# overlays) + (MAX_LAG_BUFFERS - gop_len) =
96// MAX_LAG_BUFFERS + (# overlays)
97// 2 * MAX_LAG_BUFFERS is therefore a safe estimate.
98// TODO(bohanli): test setting it to 1.5 * MAX_LAG_BUFFER
99#define MAX_TPL_FRAME_IDX (2 * MAX_LAG_BUFFERS)
100// The first REF_FRAMES + 1 buffers are reserved.
101// tpl_data->tpl_frame starts after REF_FRAMES + 1
102#define MAX_LENGTH_TPL_FRAME_STATS (MAX_TPL_FRAME_IDX + REF_FRAMES + 1)
103#define TPL_DEP_COST_SCALE_LOG2 4
104
105#define TPL_EPSILON 0.0000001
106
107typedef struct TplTxfmStats {
108 int ready; // Whether abs_coeff_mean is ready
109 double abs_coeff_sum[256]; // Assume we are using 16x16 transform block
110 double abs_coeff_mean[256];
111 int txfm_block_count;
112 int coeff_num;
113} TplTxfmStats;
114
115typedef struct {
116 uint8_t *predictor8;
117 int16_t *src_diff;
118 tran_low_t *coeff;
119 tran_low_t *qcoeff;
120 tran_low_t *dqcoeff;
121} TplBuffers;
122
123typedef struct TplDepStats {
124 int64_t srcrf_sse;
125 int64_t srcrf_dist;
126 int64_t recrf_sse;
127 int64_t recrf_dist;
128 int64_t intra_sse;
129 int64_t intra_dist;
130 int64_t cmp_recrf_dist[2];
131 int64_t mc_dep_rate;
132 int64_t mc_dep_dist;
133 int64_t pred_error[INTER_REFS_PER_FRAME];
134 int32_t intra_cost;
135 int32_t inter_cost;
136 int32_t srcrf_rate;
137 int32_t recrf_rate;
138 int32_t intra_rate;
139 int32_t cmp_recrf_rate[2];
140 int_mv mv[INTER_REFS_PER_FRAME];
141 int8_t ref_frame_index[2];
142} TplDepStats;
143
144typedef struct TplDepFrame {
145 uint8_t is_valid;
146 TplDepStats *tpl_stats_ptr;
147 const YV12_BUFFER_CONFIG *gf_picture;
148 YV12_BUFFER_CONFIG *rec_picture;
149 int ref_map_index[REF_FRAMES];
150 int stride;
151 int width;
152 int height;
153 int mi_rows;
154 int mi_cols;
155 int base_rdmult;
156 uint32_t frame_display_index;
157 // When set, SAD metric is used for intra and inter mode decision.
158 int use_pred_sad;
159} TplDepFrame;
160
165typedef struct TplParams {
169 int ready;
170
175
180
186 TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS];
187
193 TplDepStats *tpl_stats_pool[MAX_LAG_BUFFERS];
194
201 TplTxfmStats *txfm_stats_list;
202
208
212 TplDepFrame *tpl_frame;
213
217 struct scale_factors sf;
218
223
229 const YV12_BUFFER_CONFIG *src_ref_frame[INTER_REFS_PER_FRAME];
230
236 const YV12_BUFFER_CONFIG *ref_frame[INTER_REFS_PER_FRAME];
237
242 AV1TplRowMultiThreadSync tpl_mt_sync;
243
248
253} TplParams;
254
255#if CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
256#define VBR_RC_INFO_MAX_FRAMES 500
257#endif // CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
258
259#if CONFIG_BITRATE_ACCURACY
260
265typedef struct {
266 int ready;
267 double total_bit_budget; // The total bit budget of the entire video
268 int show_frame_count; // Number of show frames in the entire video
269
270 int gop_showframe_count; // The number of show frames in the current gop
271 double gop_bit_budget; // The bitbudget for the current gop
272 double scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve the
273 // budget estimation
274 double mv_scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve
275 // MV entropy estimation
276
277 // === Below this line are GOP related data that will be updated per GOP ===
278 int base_q_index; // Stores the base q index.
279 int q_index_list_ready;
280 int q_index_list[VBR_RC_INFO_MAX_FRAMES]; // q indices for the current
281 // GOP
282
283 // Array to store qstep_ratio for each frame in a GOP
284 double qstep_ratio_list[VBR_RC_INFO_MAX_FRAMES];
285
286#if CONFIG_THREE_PASS
287 TplTxfmStats txfm_stats_list[VBR_RC_INFO_MAX_FRAMES];
288 FRAME_UPDATE_TYPE update_type_list[VBR_RC_INFO_MAX_FRAMES];
289 int gop_start_idx_list[VBR_RC_INFO_MAX_FRAMES];
290 int gop_length_list[VBR_RC_INFO_MAX_FRAMES];
291 int cur_gop_idx;
292 int total_frame_count;
293 int gop_count;
294#endif // CONFIG_THREE_PASS
295} VBR_RATECTRL_INFO;
296
297static INLINE void vbr_rc_reset_gop_data(VBR_RATECTRL_INFO *vbr_rc_info) {
298 vbr_rc_info->q_index_list_ready = 0;
299 av1_zero(vbr_rc_info->q_index_list);
300}
301
302void av1_vbr_rc_init(VBR_RATECTRL_INFO *vbr_rc_info, double total_bit_budget,
303 int show_frame_count);
304
305int av1_vbr_rc_frame_coding_idx(const VBR_RATECTRL_INFO *vbr_rc_info,
306 int gf_frame_index);
307
308void av1_vbr_rc_append_tpl_info(VBR_RATECTRL_INFO *vbr_rc_info,
309 const struct TPL_INFO *tpl_info);
310
311void av1_vbr_rc_set_gop_bit_budget(VBR_RATECTRL_INFO *vbr_rc_info,
312 int gop_showframe_count);
313
314void av1_vbr_rc_compute_q_indices(int base_q_index, int frame_count,
315 const double *qstep_ratio_list,
316 aom_bit_depth_t bit_depth, int *q_index_list);
317
326void av1_vbr_rc_update_q_index_list(VBR_RATECTRL_INFO *vbr_rc_info,
327 const TplParams *tpl_data,
328 const struct GF_GROUP *gf_group,
329 aom_bit_depth_t bit_depth);
330/*
331 *!\brief Compute the number of bits needed to encode a GOP
332 *
333 * \param[in] base_q_index base layer q_index
334 * \param[in] bit_depth bit depth
335 * \param[in] update_type_scale_factors array of scale factors for each
336 * update_type
337 * \param[in] frame_count size of update_type_list,
338 * qstep_ratio_list stats_list,
339 * q_index_list and
340 * estimated_bitrate_byframe
341 * \param[in] update_type_list array of update_type, one per frame
342 * \param[in] qstep_ratio_list array of qstep_ratio, one per frame
343 * \param[in] stats_list array of transform stats, one per
344 * frame
345 * \param[out] q_index_list array of q_index, one per frame
346 * \param[out] estimated_bitrate_byframe array to keep track of frame
347 * bitrate
348 *
349 * \return The estimated GOP bitrate.
350 *
351 */
352double av1_vbr_rc_info_estimate_gop_bitrate(
353 int base_q_index, aom_bit_depth_t bit_depth,
354 const double *update_type_scale_factors, int frame_count,
355 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
356 const TplTxfmStats *stats_list, int *q_index_list,
357 double *estimated_bitrate_byframe);
358
380int av1_vbr_rc_info_estimate_base_q(
381 double bit_budget, aom_bit_depth_t bit_depth,
382 const double *update_type_scale_factors, int frame_count,
383 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
384 const TplTxfmStats *stats_list, int *q_index_list,
385 double *estimated_bitrate_byframe);
386
387#endif // CONFIG_BITRATE_ACCURACY
388
389#if CONFIG_RD_COMMAND
390typedef enum {
391 RD_OPTION_NONE,
392 RD_OPTION_SET_Q,
393 RD_OPTION_SET_Q_RDMULT
394} RD_OPTION;
395
396typedef struct RD_COMMAND {
397 RD_OPTION option_ls[MAX_LENGTH_TPL_FRAME_STATS];
398 int q_index_ls[MAX_LENGTH_TPL_FRAME_STATS];
399 int rdmult_ls[MAX_LENGTH_TPL_FRAME_STATS];
400 int frame_count;
401 int frame_index;
402} RD_COMMAND;
403
404void av1_read_rd_command(const char *filepath, RD_COMMAND *rd_command);
405#endif // CONFIG_RD_COMMAND
406
415void av1_setup_tpl_buffers(struct AV1_PRIMARY *const ppi,
416 CommonModeInfoParams *const mi_params, int width,
417 int height, int byte_alignment, int lag_in_frames);
418
419static AOM_INLINE void tpl_dealloc_temp_buffers(TplBuffers *tpl_tmp_buffers) {
420 aom_free(tpl_tmp_buffers->predictor8);
421 tpl_tmp_buffers->predictor8 = NULL;
422 aom_free(tpl_tmp_buffers->src_diff);
423 tpl_tmp_buffers->src_diff = NULL;
424 aom_free(tpl_tmp_buffers->coeff);
425 tpl_tmp_buffers->coeff = NULL;
426 aom_free(tpl_tmp_buffers->qcoeff);
427 tpl_tmp_buffers->qcoeff = NULL;
428 aom_free(tpl_tmp_buffers->dqcoeff);
429 tpl_tmp_buffers->dqcoeff = NULL;
430}
431
432static AOM_INLINE bool tpl_alloc_temp_buffers(TplBuffers *tpl_tmp_buffers,
433 uint8_t tpl_bsize_1d) {
434 // Number of pixels in a tpl block
435 const int tpl_block_pels = tpl_bsize_1d * tpl_bsize_1d;
436
437 // Allocate temporary buffers used in mode estimation.
438 tpl_tmp_buffers->predictor8 = (uint8_t *)aom_memalign(
439 32, tpl_block_pels * 2 * sizeof(*tpl_tmp_buffers->predictor8));
440 tpl_tmp_buffers->src_diff = (int16_t *)aom_memalign(
441 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->src_diff));
442 tpl_tmp_buffers->coeff = (tran_low_t *)aom_memalign(
443 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->coeff));
444 tpl_tmp_buffers->qcoeff = (tran_low_t *)aom_memalign(
445 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->qcoeff));
446 tpl_tmp_buffers->dqcoeff = (tran_low_t *)aom_memalign(
447 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->dqcoeff));
448
449 if (!(tpl_tmp_buffers->predictor8 && tpl_tmp_buffers->src_diff &&
450 tpl_tmp_buffers->coeff && tpl_tmp_buffers->qcoeff &&
451 tpl_tmp_buffers->dqcoeff)) {
452 tpl_dealloc_temp_buffers(tpl_tmp_buffers);
453 return false;
454 }
455 return true;
456}
457
469int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval,
470 const struct EncodeFrameParams *const frame_params);
471
474void av1_tpl_preload_rc_estimate(
475 struct AV1_COMP *cpi, const struct EncodeFrameParams *const frame_params);
476
477int av1_tpl_ptr_pos(int mi_row, int mi_col, int stride, uint8_t right_shift);
478
479void av1_init_tpl_stats(TplParams *const tpl_data);
480
481int av1_tpl_stats_ready(const TplParams *tpl_data, int gf_frame_index);
482
483void av1_tpl_rdmult_setup(struct AV1_COMP *cpi);
484
485void av1_tpl_rdmult_setup_sb(struct AV1_COMP *cpi, MACROBLOCK *const x,
486 BLOCK_SIZE sb_size, int mi_row, int mi_col);
487
488void av1_mc_flow_dispenser_row(struct AV1_COMP *cpi,
489 TplTxfmStats *tpl_txfm_stats,
490 TplBuffers *tpl_tmp_buffers, MACROBLOCK *x,
491 int mi_row, BLOCK_SIZE bsize, TX_SIZE tx_size);
492
505double av1_exponential_entropy(double q_step, double b);
506
520double av1_laplace_entropy(double q_step, double b, double zero_bin_ratio);
521
539double av1_laplace_estimate_frame_rate(int q_index, int block_count,
540 const double *abs_coeff_mean,
541 int coeff_num);
542
543/*
544 *!\brief Init TplTxfmStats
545 *
546 * \param[in] tpl_txfm_stats a structure for storing transform stats
547 *
548 */
549void av1_init_tpl_txfm_stats(TplTxfmStats *tpl_txfm_stats);
550
551#if CONFIG_BITRATE_ACCURACY
552/*
553 *!\brief Accumulate TplTxfmStats
554 *
555 * \param[in] sub_stats a structure for storing sub transform stats
556 * \param[out] accumulated_stats a structure for storing accumulated
557 *transform stats
558 *
559 */
560void av1_accumulate_tpl_txfm_stats(const TplTxfmStats *sub_stats,
561 TplTxfmStats *accumulated_stats);
562
563/*
564 *!\brief Record a transform block into TplTxfmStats
565 *
566 * \param[in] tpl_txfm_stats A structure for storing transform stats
567 * \param[out] coeff An array of transform coefficients. Its size
568 * should equal to tpl_txfm_stats.coeff_num.
569 *
570 */
571void av1_record_tpl_txfm_block(TplTxfmStats *tpl_txfm_stats,
572 const tran_low_t *coeff);
573
574/*
575 *!\brief Update abs_coeff_mean and ready of txfm_stats
576 * If txfm_block_count > 0, this function will use abs_coeff_sum and
577 * txfm_block_count to compute abs_coeff_mean. Moreover, reday flag
578 * will be set to one.
579 *
580 * \param[in] txfm_stats A structure for storing transform stats
581 */
582void av1_tpl_txfm_stats_update_abs_coeff_mean(TplTxfmStats *txfm_stats);
583#endif // CONFIG_BITRATE_ACCURACY
584
600double av1_estimate_coeff_entropy(double q_step, double b,
601 double zero_bin_ratio, int qcoeff);
602
615double av1_estimate_txfm_block_entropy(int q_index,
616 const double *abs_coeff_mean,
617 int *qcoeff_arr, int coeff_num);
618
619// TODO(angiebird): Add doxygen description here.
620int64_t av1_delta_rate_cost(int64_t delta_rate, int64_t recrf_dist,
621 int64_t srcrf_dist, int pix_num);
622
638int av1_get_overlap_area(int row_a, int col_a, int row_b, int col_b, int width,
639 int height);
640
650int av1_tpl_get_q_index(const TplParams *tpl_data, int gf_frame_index,
651 int leaf_qindex, aom_bit_depth_t bit_depth);
652
660double av1_tpl_get_frame_importance(const TplParams *tpl_data,
661 int gf_frame_index);
662
673double av1_tpl_get_qstep_ratio(const TplParams *tpl_data, int gf_frame_index);
674
683int av1_get_q_index_from_qstep_ratio(int leaf_qindex, double qstep_ratio,
684 aom_bit_depth_t bit_depth);
685
700int_mv av1_compute_mv_difference(const TplDepFrame *tpl_frame, int row, int col,
701 int step, int tpl_stride, int right_shift);
702
710double av1_tpl_compute_frame_mv_entropy(const TplDepFrame *tpl_frame,
711 uint8_t right_shift);
712
713#if CONFIG_RATECTRL_LOG
714typedef struct {
715 int coding_frame_count;
716 int base_q_index;
717
718 // Encode decision
719 int q_index_list[VBR_RC_INFO_MAX_FRAMES];
720 double qstep_ratio_list[VBR_RC_INFO_MAX_FRAMES];
721 FRAME_UPDATE_TYPE update_type_list[VBR_RC_INFO_MAX_FRAMES];
722
723 // Frame stats
724 TplTxfmStats txfm_stats_list[VBR_RC_INFO_MAX_FRAMES];
725
726 // Estimated encode results
727 double est_coeff_rate_list[VBR_RC_INFO_MAX_FRAMES];
728
729 // Actual encode results
730 double act_rate_list[VBR_RC_INFO_MAX_FRAMES];
731 double act_coeff_rate_list[VBR_RC_INFO_MAX_FRAMES];
732} RATECTRL_LOG;
733
734static INLINE void rc_log_init(RATECTRL_LOG *rc_log) { av1_zero(*rc_log); }
735
736static INLINE void rc_log_frame_stats(RATECTRL_LOG *rc_log, int coding_index,
737 const TplTxfmStats *txfm_stats) {
738 rc_log->txfm_stats_list[coding_index] = *txfm_stats;
739}
740
741static INLINE void rc_log_frame_encode_param(RATECTRL_LOG *rc_log,
742 int coding_index,
743 double qstep_ratio, int q_index,
744 FRAME_UPDATE_TYPE update_type) {
745 rc_log->qstep_ratio_list[coding_index] = qstep_ratio;
746 rc_log->q_index_list[coding_index] = q_index;
747 rc_log->update_type_list[coding_index] = update_type;
748 const TplTxfmStats *txfm_stats = &rc_log->txfm_stats_list[coding_index];
749 rc_log->est_coeff_rate_list[coding_index] = 0;
750 if (txfm_stats->ready) {
751 rc_log->est_coeff_rate_list[coding_index] = av1_laplace_estimate_frame_rate(
752 q_index, txfm_stats->txfm_block_count, txfm_stats->abs_coeff_mean,
753 txfm_stats->coeff_num);
754 }
755}
756
757static INLINE void rc_log_frame_entropy(RATECTRL_LOG *rc_log, int coding_index,
758 double act_rate,
759 double act_coeff_rate) {
760 rc_log->act_rate_list[coding_index] = act_rate;
761 rc_log->act_coeff_rate_list[coding_index] = act_coeff_rate;
762}
763
764static INLINE void rc_log_record_chunk_info(RATECTRL_LOG *rc_log,
765 int base_q_index,
766 int coding_frame_count) {
767 rc_log->base_q_index = base_q_index;
768 rc_log->coding_frame_count = coding_frame_count;
769}
770
771static INLINE void rc_log_show(const RATECTRL_LOG *rc_log) {
772 printf("= chunk 1\n");
773 printf("coding_frame_count %d base_q_index %d\n", rc_log->coding_frame_count,
774 rc_log->base_q_index);
775 printf("= frame %d\n", rc_log->coding_frame_count);
776 for (int coding_idx = 0; coding_idx < rc_log->coding_frame_count;
777 coding_idx++) {
778 printf(
779 "coding_idx %d update_type %d q %d qstep_ratio %f est_coeff_rate %f "
780 "act_coeff_rate %f act_rate %f\n",
781 coding_idx, rc_log->update_type_list[coding_idx],
782 rc_log->q_index_list[coding_idx], rc_log->qstep_ratio_list[coding_idx],
783 rc_log->est_coeff_rate_list[coding_idx],
784 rc_log->act_coeff_rate_list[coding_idx],
785 rc_log->act_rate_list[coding_idx]);
786 }
787}
788#endif // CONFIG_RATECTRL_LOG
789
791#ifdef __cplusplus
792} // extern "C"
793#endif
794
795#endif // AOM_AV1_ENCODER_TPL_MODEL_H_
enum aom_bit_depth aom_bit_depth_t
Bit depth for codecThis enumeration determines the bit depth of the codec.
int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval, const struct EncodeFrameParams *const frame_params)
Implements temporal dependency modelling for a GOP (GF/ARF group) and selects between 16 and 32 frame...
Describes look ahead buffer operations.
Top level encoder structure.
Definition encoder.h:2866
Top level primary encoder structure.
Definition encoder.h:2570
Params related to MB_MODE_INFO arrays and related info.
Definition av1_common_int.h:503
Input frames and last input frame.
Definition encoder.h:3668
contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_e...
Definition encoder.h:3680
Data related to the current GF/ARF group and the individual frames within the group.
Definition firstpass.h:354
Params related to temporal dependency model.
Definition tpl_model.h:165
const YV12_BUFFER_CONFIG * src_ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:229
struct scale_factors sf
Definition tpl_model.h:217
int ready
Definition tpl_model.h:169
TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS]
Definition tpl_model.h:186
uint8_t tpl_bsize_1d
Definition tpl_model.h:179
AV1TplRowMultiThreadSync tpl_mt_sync
Definition tpl_model.h:242
TplDepFrame * tpl_frame
Definition tpl_model.h:212
int border_in_pixels
Definition tpl_model.h:247
TplDepStats * tpl_stats_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:193
TplTxfmStats * txfm_stats_list
Definition tpl_model.h:201
YV12_BUFFER_CONFIG tpl_rec_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:207
uint8_t tpl_stats_block_mis_log2
Definition tpl_model.h:174
int frame_idx
Definition tpl_model.h:222
double r0_adjust_factor
Definition tpl_model.h:252
const YV12_BUFFER_CONFIG * ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:236
Encoder's parameters related to the current coding block.
Definition block.h:878
YV12 frame buffer data structure.
Definition yv12config.h:46