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
20
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/aom_tpl.h"
33#include "aom_scale/yv12config.h"
34#include "aom_util/aom_pthread.h"
35
36#include "av1/common/mv.h"
37#include "av1/common/scale.h"
38#include "av1/encoder/av1_ext_ratectrl.h"
39#include "av1/encoder/block.h"
40#include "av1/encoder/lookahead.h"
41#include "av1/encoder/ratectrl.h"
42
43static inline BLOCK_SIZE convert_length_to_bsize(int length) {
44 switch (length) {
45 case 64: return BLOCK_64X64;
46 case 32: return BLOCK_32X32;
47 case 16: return BLOCK_16X16;
48 case 8: return BLOCK_8X8;
49 case 4: return BLOCK_4X4;
50 default:
51 assert(0 && "Invalid block size for tpl model");
52 return BLOCK_16X16;
53 }
54}
55
56typedef struct AV1TplRowMultiThreadSync {
57#if CONFIG_MULTITHREAD
58 // Synchronization objects for top-right dependency.
59 pthread_mutex_t *mutex_;
60 pthread_cond_t *cond_;
61#endif
62 // Buffer to store the macroblock whose encoding is complete.
63 // num_finished_cols[i] stores the number of macroblocks which finished
64 // encoding in the ith macroblock row.
65 int *num_finished_cols;
66 // Number of extra macroblocks of the top row to be complete for encoding
67 // of the current macroblock to start. A value of 1 indicates top-right
68 // dependency.
69 int sync_range;
70 // Number of macroblock rows.
71 int rows;
72 // Number of threads processing the current tile.
73 int num_threads_working;
74} AV1TplRowMultiThreadSync;
75
76typedef struct AV1TplRowMultiThreadInfo {
77 // Initialized to false, set to true by the worker thread that encounters an
78 // error in order to abort the processing of other worker threads.
79 bool tpl_mt_exit;
80#if CONFIG_MULTITHREAD
81 // Mutex lock object used for error handling.
82 pthread_mutex_t *mutex_;
83#endif
84 // Row synchronization related function pointers.
85 void (*sync_read_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c);
86 void (*sync_write_ptr)(AV1TplRowMultiThreadSync *tpl_mt_sync, int r, int c,
87 int cols);
88} AV1TplRowMultiThreadInfo;
89
90// TODO(jingning): This needs to be cleaned up next.
91
92// TPL stats buffers are prepared for every frame in the GOP,
93// including (internal) overlays and (internal) arfs.
94// In addition, frames in the lookahead that are outside of the GOP
95// are also used.
96// Thus it should use
97// (gop_length) + (# overlays) + (MAX_LAG_BUFFERS - gop_len) =
98// MAX_LAG_BUFFERS + (# overlays)
99// 2 * MAX_LAG_BUFFERS is therefore a safe estimate.
100// TODO(bohanli): test setting it to 1.5 * MAX_LAG_BUFFER
101#define MAX_TPL_FRAME_IDX (2 * MAX_LAG_BUFFERS)
102// The first REF_FRAMES + 1 buffers are reserved.
103// tpl_data->tpl_frame starts after REF_FRAMES + 1
104#define MAX_LENGTH_TPL_FRAME_STATS (MAX_TPL_FRAME_IDX + REF_FRAMES + 1)
105#define TPL_DEP_COST_SCALE_LOG2 4
106
107#define TPL_EPSILON 0.0000001
108
109typedef struct TplTxfmStats {
110 int ready; // Whether abs_coeff_mean is ready
111 double abs_coeff_sum[256]; // Assume we are using 16x16 transform block
112 double abs_coeff_mean[256];
113 int txfm_block_count;
114 int coeff_num;
115} TplTxfmStats;
116
117typedef struct {
118 uint8_t *predictor8;
119 int16_t *src_diff;
120 tran_low_t *coeff;
121 tran_low_t *qcoeff;
122 tran_low_t *dqcoeff;
123} TplBuffers;
124
125typedef struct TplDepStats {
126 int64_t srcrf_sse;
127 int64_t srcrf_dist;
128 int64_t recrf_sse;
129 int64_t recrf_dist;
130 int64_t intra_sse;
131 int64_t intra_dist;
132 int64_t cmp_recrf_dist[2];
133 int64_t mc_dep_rate;
134 int64_t mc_dep_dist;
135 int64_t pred_error[INTER_REFS_PER_FRAME];
136 int32_t intra_cost;
137 int32_t inter_cost;
138 int32_t srcrf_rate;
139 int32_t recrf_rate;
140 int32_t intra_rate;
141 int32_t cmp_recrf_rate[2];
142 int_mv mv[INTER_REFS_PER_FRAME];
143 int8_t ref_frame_index[2];
144} TplDepStats;
145
146typedef struct TplDepFrame {
147 uint8_t is_valid;
148 TplDepStats *tpl_stats_ptr;
149 const YV12_BUFFER_CONFIG *gf_picture;
150 YV12_BUFFER_CONFIG *rec_picture;
151 int ref_map_index[REF_FRAMES];
152 int stride;
153 // width and height here is in the unit of 16x16 block.
154 int width;
155 int height;
156 int mi_rows;
157 int mi_cols;
158 int base_rdmult;
159 uint32_t frame_display_index;
160 // When set, SAD metric is used for intra and inter mode decision.
161 int use_pred_sad;
162} TplDepFrame;
163
168 typedef struct TplParams {
172 int ready;
173
177 uint8_t tpl_stats_block_mis_log2;
178
182 uint8_t tpl_bsize_1d;
183
189 TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS];
190
196 TplDepStats *tpl_stats_pool[MAX_LAG_BUFFERS];
197
204 TplTxfmStats *txfm_stats_list;
205
210 YV12_BUFFER_CONFIG tpl_rec_pool[MAX_LAG_BUFFERS];
211
215 TplDepFrame *tpl_frame;
216
220 struct scale_factors sf;
221
225 int frame_idx;
226
232 const YV12_BUFFER_CONFIG *src_ref_frame[INTER_REFS_PER_FRAME];
233
239 const YV12_BUFFER_CONFIG *ref_frame[INTER_REFS_PER_FRAME];
240
244 YV12_BUFFER_CONFIG prev_gop_arf_src;
245
249 int64_t prev_gop_arf_disp_order;
250
255 AV1TplRowMultiThreadSync tpl_mt_sync;
256
260 int border_in_pixels;
261
265 double r0_adjust_factor;
266} TplParams;
267
268#if CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
269#define VBR_RC_INFO_MAX_FRAMES 500
270#endif // CONFIG_BITRATE_ACCURACY || CONFIG_RATECTRL_LOG
271
272#if CONFIG_BITRATE_ACCURACY
273
278typedef struct {
279 int ready;
280 double total_bit_budget; // The total bit budget of the entire video
281 int show_frame_count; // Number of show frames in the entire video
282
283 int gop_showframe_count; // The number of show frames in the current gop
284 double gop_bit_budget; // The bitbudget for the current gop
285 double scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve the
286 // budget estimation
287 double mv_scale_factors[FRAME_UPDATE_TYPES]; // Scale factors to improve
288 // MV entropy estimation
289
290 // === Below this line are GOP related data that will be updated per GOP ===
291 int base_q_index; // Stores the base q index.
292 int q_index_list_ready;
293 int q_index_list[VBR_RC_INFO_MAX_FRAMES]; // q indices for the current
294 // GOP
295
296 // Array to store qstep_ratio for each frame in a GOP
297 double qstep_ratio_list[VBR_RC_INFO_MAX_FRAMES];
298
299#if CONFIG_THREE_PASS
300 TplTxfmStats txfm_stats_list[VBR_RC_INFO_MAX_FRAMES];
301 FRAME_UPDATE_TYPE update_type_list[VBR_RC_INFO_MAX_FRAMES];
302 int gop_start_idx_list[VBR_RC_INFO_MAX_FRAMES];
303 int gop_length_list[VBR_RC_INFO_MAX_FRAMES];
304 int cur_gop_idx;
305 int total_frame_count;
306 int gop_count;
307#endif // CONFIG_THREE_PASS
308} VBR_RATECTRL_INFO;
309
310static inline void vbr_rc_reset_gop_data(VBR_RATECTRL_INFO *vbr_rc_info) {
311 vbr_rc_info->q_index_list_ready = 0;
312 av1_zero(vbr_rc_info->q_index_list);
313}
314
315void av1_vbr_rc_init(VBR_RATECTRL_INFO *vbr_rc_info, double total_bit_budget,
316 int show_frame_count);
317
318int av1_vbr_rc_frame_coding_idx(const VBR_RATECTRL_INFO *vbr_rc_info,
319 int gf_frame_index);
320
321void av1_vbr_rc_append_tpl_info(VBR_RATECTRL_INFO *vbr_rc_info,
322 const struct TPL_INFO *tpl_info);
323
324void av1_vbr_rc_set_gop_bit_budget(VBR_RATECTRL_INFO *vbr_rc_info,
325 int gop_showframe_count);
326
327void av1_vbr_rc_compute_q_indices(int base_q_index, int frame_count,
328 const double *qstep_ratio_list,
329 aom_bit_depth_t bit_depth, int *q_index_list);
330
339void av1_vbr_rc_update_q_index_list(VBR_RATECTRL_INFO *vbr_rc_info,
340 const TplParams *tpl_data,
341 const struct GF_GROUP *gf_group,
342 aom_bit_depth_t bit_depth);
343/*
344 *!\brief Compute the number of bits needed to encode a GOP
345 *
346 * \param[in] base_q_index base layer q_index
347 * \param[in] bit_depth bit depth
348 * \param[in] update_type_scale_factors array of scale factors for each
349 * update_type
350 * \param[in] frame_count size of update_type_list,
351 * qstep_ratio_list stats_list,
352 * q_index_list and
353 * estimated_bitrate_byframe
354 * \param[in] update_type_list array of update_type, one per frame
355 * \param[in] qstep_ratio_list array of qstep_ratio, one per frame
356 * \param[in] stats_list array of transform stats, one per
357 * frame
358 * \param[out] q_index_list array of q_index, one per frame
359 * \param[out] estimated_bitrate_byframe array to keep track of frame
360 * bitrate
361 *
362 * \return The estimated GOP bitrate.
363 *
364 */
365double av1_vbr_rc_info_estimate_gop_bitrate(
366 int base_q_index, aom_bit_depth_t bit_depth,
367 const double *update_type_scale_factors, int frame_count,
368 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
369 const TplTxfmStats *stats_list, int *q_index_list,
370 double *estimated_bitrate_byframe);
371
393int av1_vbr_rc_info_estimate_base_q(
394 double bit_budget, aom_bit_depth_t bit_depth,
395 const double *update_type_scale_factors, int frame_count,
396 const FRAME_UPDATE_TYPE *update_type_list, const double *qstep_ratio_list,
397 const TplTxfmStats *stats_list, int *q_index_list,
398 double *estimated_bitrate_byframe);
399
400#endif // CONFIG_BITRATE_ACCURACY
401
402#if CONFIG_RD_COMMAND
403typedef enum {
404 RD_OPTION_NONE,
405 RD_OPTION_SET_Q,
406 RD_OPTION_SET_Q_RDMULT
407} RD_OPTION;
408
409typedef struct RD_COMMAND {
410 RD_OPTION option_ls[MAX_LENGTH_TPL_FRAME_STATS];
411 int q_index_ls[MAX_LENGTH_TPL_FRAME_STATS];
412 int rdmult_ls[MAX_LENGTH_TPL_FRAME_STATS];
413 int frame_count;
414 int frame_index;
415} RD_COMMAND;
416
417void av1_read_rd_command(const char *filepath, RD_COMMAND *rd_command);
418#endif // CONFIG_RD_COMMAND
419
420static inline bool av1_use_tpl_for_extrc(AOM_EXT_RATECTRL const *ext_rc) {
421 return ext_rc->ready && ext_rc->funcs.send_tpl_gop_stats != NULL;
422}
423
431
432void av1_setup_tpl_buffers(struct AV1_PRIMARY *const ppi,
433 CommonModeInfoParams *const mi_params, int width,
434 int height, int byte_alignment, int lag_in_frames);
435
436static inline void tpl_dealloc_temp_buffers(TplBuffers *tpl_tmp_buffers) {
437 aom_free(tpl_tmp_buffers->predictor8);
438 tpl_tmp_buffers->predictor8 = NULL;
439 aom_free(tpl_tmp_buffers->src_diff);
440 tpl_tmp_buffers->src_diff = NULL;
441 aom_free(tpl_tmp_buffers->coeff);
442 tpl_tmp_buffers->coeff = NULL;
443 aom_free(tpl_tmp_buffers->qcoeff);
444 tpl_tmp_buffers->qcoeff = NULL;
445 aom_free(tpl_tmp_buffers->dqcoeff);
446 tpl_tmp_buffers->dqcoeff = NULL;
447}
448
449static inline bool tpl_alloc_temp_buffers(TplBuffers *tpl_tmp_buffers,
450 uint8_t tpl_bsize_1d) {
451 // Number of pixels in a tpl block
452 const int tpl_block_pels = tpl_bsize_1d * tpl_bsize_1d;
453
454 // Allocate temporary buffers used in mode estimation.
455 tpl_tmp_buffers->predictor8 = (uint8_t *)aom_memalign(
456 32, tpl_block_pels * 2 * sizeof(*tpl_tmp_buffers->predictor8));
457 tpl_tmp_buffers->src_diff = (int16_t *)aom_memalign(
458 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->src_diff));
459 tpl_tmp_buffers->coeff = (tran_low_t *)aom_memalign(
460 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->coeff));
461 tpl_tmp_buffers->qcoeff = (tran_low_t *)aom_memalign(
462 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->qcoeff));
463 tpl_tmp_buffers->dqcoeff = (tran_low_t *)aom_memalign(
464 32, tpl_block_pels * sizeof(*tpl_tmp_buffers->dqcoeff));
465
466 if (!(tpl_tmp_buffers->predictor8 && tpl_tmp_buffers->src_diff &&
467 tpl_tmp_buffers->coeff && tpl_tmp_buffers->qcoeff &&
468 tpl_tmp_buffers->dqcoeff)) {
469 tpl_dealloc_temp_buffers(tpl_tmp_buffers);
470 return false;
471 }
472 return true;
473}
474
486 int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval,
487 const struct EncodeFrameParams *const frame_params);
488
490
491void av1_tpl_preload_rc_estimate(
492 struct AV1_COMP *cpi, const struct EncodeFrameParams *const frame_params);
493
494int av1_tpl_ptr_pos(int mi_row, int mi_col, int stride, uint8_t right_shift);
495
496void av1_init_tpl_stats(TplParams *const tpl_data);
497
498int av1_tpl_stats_ready(const TplParams *tpl_data, int gf_frame_index);
499
500void av1_tpl_rdmult_setup(struct AV1_COMP *cpi);
501
502void av1_tpl_rdmult_setup_sb(struct AV1_COMP *cpi, MACROBLOCK *const x,
503 BLOCK_SIZE sb_size, int mi_row, int mi_col);
504
505void av1_mc_flow_dispenser_row(struct AV1_COMP *cpi,
506 TplTxfmStats *tpl_txfm_stats,
507 TplBuffers *tpl_tmp_buffers, MACROBLOCK *x,
508 int mi_row, BLOCK_SIZE bsize, TX_SIZE tx_size);
509
522double av1_exponential_entropy(double q_step, double b);
523
537double av1_laplace_entropy(double q_step, double b, double zero_bin_ratio);
538
539#if CONFIG_BITRATE_ACCURACY
557double av1_laplace_estimate_frame_rate(int q_index, int block_count,
558 const double *abs_coeff_mean,
559 int coeff_num);
560#endif // CONFIG_BITRATE_ACCURACY
561
562/*
563 *!\brief Init TplTxfmStats
564 *
565 * \param[in] tpl_txfm_stats a structure for storing transform stats
566 *
567 */
568void av1_init_tpl_txfm_stats(TplTxfmStats *tpl_txfm_stats);
569
570#if CONFIG_BITRATE_ACCURACY
571/*
572 *!\brief Accumulate TplTxfmStats
573 *
574 * \param[in] sub_stats a structure for storing sub transform stats
575 * \param[out] accumulated_stats a structure for storing accumulated
576 *transform stats
577 *
578 */
579void av1_accumulate_tpl_txfm_stats(const TplTxfmStats *sub_stats,
580 TplTxfmStats *accumulated_stats);
581
582/*
583 *!\brief Record a transform block into TplTxfmStats
584 *
585 * \param[in] tpl_txfm_stats A structure for storing transform stats
586 * \param[out] coeff An array of transform coefficients. Its size
587 * should equal to tpl_txfm_stats.coeff_num.
588 *
589 */
590void av1_record_tpl_txfm_block(TplTxfmStats *tpl_txfm_stats,
591 const tran_low_t *coeff);
592
593/*
594 *!\brief Update abs_coeff_mean and ready of txfm_stats
595 * If txfm_block_count > 0, this function will use abs_coeff_sum and
596 * txfm_block_count to compute abs_coeff_mean. Moreover, reday flag
597 * will be set to one.
598 *
599 * \param[in] txfm_stats A structure for storing transform stats
600 */
601void av1_tpl_txfm_stats_update_abs_coeff_mean(TplTxfmStats *txfm_stats);
602#endif // CONFIG_BITRATE_ACCURACY
603
619double av1_estimate_coeff_entropy(double q_step, double b,
620 double zero_bin_ratio, int qcoeff);
621
622// TODO(angiebird): Add doxygen description here.
623int64_t av1_delta_rate_cost(int64_t delta_rate, int64_t recrf_dist,
624 int64_t srcrf_dist, int pix_num);
625
641int av1_get_overlap_area(int row_a, int col_a, int row_b, int col_b, int width,
642 int height);
643
653int av1_tpl_get_q_index(const TplParams *tpl_data, int gf_frame_index,
654 int leaf_qindex, aom_bit_depth_t bit_depth);
655
666double av1_tpl_get_qstep_ratio(const TplParams *tpl_data, int gf_frame_index);
667
676int av1_get_q_index_from_qstep_ratio(int leaf_qindex, double qstep_ratio,
677 aom_bit_depth_t bit_depth);
678
693int_mv av1_compute_mv_difference(const TplDepFrame *tpl_frame, int row, int col,
694 int step, int tpl_stride, int right_shift);
695
703double av1_tpl_compute_frame_mv_entropy(const TplDepFrame *tpl_frame,
704 uint8_t right_shift);
705
710void av1_free_tpl_gop_stats(AomTplGopStats *extrc_tpl_gop_stats);
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
740#if CONFIG_RATECTRL_LOG && CONFIG_THREE_PASS && CONFIG_BITRATE_ACCURACY
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#endif // CONFIG_RATECTRL_LOG && CONFIG_THREE_PASS && CONFIG_BITRATE_ACCURACY
757
758static inline void rc_log_frame_entropy(RATECTRL_LOG *rc_log, int coding_index,
759 double act_rate,
760 double act_coeff_rate) {
761 rc_log->act_rate_list[coding_index] = act_rate;
762 rc_log->act_coeff_rate_list[coding_index] = act_coeff_rate;
763}
764
765static inline void rc_log_record_chunk_info(RATECTRL_LOG *rc_log,
766 int base_q_index,
767 int coding_frame_count) {
768 rc_log->base_q_index = base_q_index;
769 rc_log->coding_frame_count = coding_frame_count;
770}
771
772static inline void rc_log_show(const RATECTRL_LOG *rc_log) {
773 printf("= chunk 1\n");
774 printf("coding_frame_count %d base_q_index %d\n", rc_log->coding_frame_count,
775 rc_log->base_q_index);
776 printf("= frame %d\n", rc_log->coding_frame_count);
777 for (int coding_idx = 0; coding_idx < rc_log->coding_frame_count;
778 coding_idx++) {
779 printf(
780 "coding_idx %d update_type %d q %d qstep_ratio %f est_coeff_rate %f "
781 "act_coeff_rate %f act_rate %f\n",
782 coding_idx, rc_log->update_type_list[coding_idx],
783 rc_log->q_index_list[coding_idx], rc_log->qstep_ratio_list[coding_idx],
784 rc_log->est_coeff_rate_list[coding_idx],
785 rc_log->act_coeff_rate_list[coding_idx],
786 rc_log->act_rate_list[coding_idx]);
787 }
788}
789#endif // CONFIG_RATECTRL_LOG
790
792#ifdef __cplusplus
793} // extern "C"
794#endif
795
796#endif // AOM_AV1_ENCODER_TPL_MODEL_H_
block.h
MACROBLOCK
struct macroblock MACROBLOCK
Encoder's parameters related to the current coding block.
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:2897
AV1_PRIMARY
Top level primary encoder structure.
Definition encoder.h:2590
CommonModeInfoParams
Params related to MB_MODE_INFO arrays and related info.
Definition av1_common_int.h:511
EncodeFrameInput
Input frames and last input frame.
Definition encoder.h:3735
EncodeFrameParams
contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_e...
Definition encoder.h:3747
GF_GROUP
Data related to the current GF/ARF group and the individual frames within the group.
Definition firstpass.h:343
TplParams
Params related to temporal dependency model.
Definition tpl_model.h:168
TplParams::src_ref_frame
const YV12_BUFFER_CONFIG * src_ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:232
TplParams::sf
struct scale_factors sf
Definition tpl_model.h:220
TplParams::ready
int ready
Definition tpl_model.h:172
TplParams::tpl_stats_buffer
TplDepFrame tpl_stats_buffer[MAX_LENGTH_TPL_FRAME_STATS]
Definition tpl_model.h:189
TplParams::prev_gop_arf_src
YV12_BUFFER_CONFIG prev_gop_arf_src
Definition tpl_model.h:244
TplParams::tpl_bsize_1d
uint8_t tpl_bsize_1d
Definition tpl_model.h:182
TplParams::tpl_mt_sync
AV1TplRowMultiThreadSync tpl_mt_sync
Definition tpl_model.h:255
TplParams::tpl_frame
TplDepFrame * tpl_frame
Definition tpl_model.h:215
TplParams::border_in_pixels
int border_in_pixels
Definition tpl_model.h:260
TplParams::tpl_stats_pool
TplDepStats * tpl_stats_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:196
TplParams::txfm_stats_list
TplTxfmStats * txfm_stats_list
Definition tpl_model.h:204
TplParams::prev_gop_arf_disp_order
int64_t prev_gop_arf_disp_order
Definition tpl_model.h:249
TplParams::tpl_rec_pool
YV12_BUFFER_CONFIG tpl_rec_pool[MAX_LAG_BUFFERS]
Definition tpl_model.h:210
TplParams::tpl_stats_block_mis_log2
uint8_t tpl_stats_block_mis_log2
Definition tpl_model.h:177
TplParams::frame_idx
int frame_idx
Definition tpl_model.h:225
TplParams::r0_adjust_factor
double r0_adjust_factor
Definition tpl_model.h:265
TplParams::ref_frame
const YV12_BUFFER_CONFIG * ref_frame[INTER_REFS_PER_FRAME]
Definition tpl_model.h:239