1 /* 2 * Copyright (c) 2016, 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_COMMON_TIMING_H_ 13 #define AOM_AV1_COMMON_TIMING_H_ 14 15 #include "aom/aom_integer.h" 16 #include "av1/common/enums.h" 17 18 #define MAX_NUM_OP_POINTS 32 19 20 typedef struct aom_timing { 21 uint32_t num_units_in_display_tick; 22 uint32_t time_scale; 23 int equal_picture_interval; 24 uint32_t num_ticks_per_picture; 25 } aom_timing_info_t; 26 27 typedef struct aom_dec_model_info { 28 uint32_t num_units_in_decoding_tick; 29 int encoder_decoder_buffer_delay_length; 30 int buffer_removal_time_length; 31 int frame_presentation_time_length; 32 } aom_dec_model_info_t; 33 34 typedef struct aom_dec_model_op_parameters { 35 int decoder_model_param_present_flag; 36 int64_t bitrate; 37 int64_t buffer_size; 38 uint32_t decoder_buffer_delay; 39 uint32_t encoder_buffer_delay; 40 int low_delay_mode_flag; 41 int display_model_param_present_flag; 42 int initial_display_delay; 43 } aom_dec_model_op_parameters_t; 44 45 void av1_set_aom_dec_model_info(aom_dec_model_info_t *decoder_model); 46 47 void av1_set_dec_model_op_parameters(aom_dec_model_op_parameters_t *op_params); 48 49 void av1_set_resource_availability_parameters( 50 aom_dec_model_op_parameters_t *op_params); 51 52 int64_t av1_max_level_bitrate(BITSTREAM_PROFILE seq_profile, int seq_level_idx, 53 int seq_tier); 54 55 #endif // AOM_AV1_COMMON_TIMING_H_ 56