AOMedia AV1 Codec: av1/encoder/tpl_model.h Source File

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