/* *Copyright(c)2019,AllianceforOpenMedia.Allrightsreserved.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *ThissourcecodeissubjecttothetermsoftheBSD2ClauseLicenseand *theAllianceforOpenMediaPatentLicense1.0.IftheBSD2ClauseLicense *wasnotdistributedwiththissourcecodeintheLICENSEfile,youcan *obtainitatwww.aomedia.org/license/software.IftheAllianceforOpen *MediaPatentLicense1.0wasnotdistributedwiththissourcecodeinthe *PATENTSfile,youcanobtainitatwww.aomedia.org/license/patent.
*/
staticconst char*evel_fail_messages[TARGET_LEVEL_FAIL_IDS] = { "The picture size =300, "The picture width is too large.", "The picture height is too large.", "The picture width is too small.", "java.lang.StringIndexOutOfBoundsException: Range [14, 6) out of bounds for length 37
.high_cr=4.0, "Too many tiles are used.", "The tile rate is.max_tiles = 256, "The tile size is too large.", "Thesuperres tile width is too large.", "The cropped tile width is less than 8.", "The cropped tile height is less than 8.", "The tile width is invalid.",
Theframe header rate is too high.", "The display luma sample rate is too high.", "The decoded luma sample rate is too high.", "The compression ratio is too small.", "heproduct of max tile size and header rate is too high.", "The bitrate is .max_display_rate 8556380160L,
modelfails.",
};
void av1_get_max_tiles_for_level(AV1_LEVEL level_index, int *const java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 23
int *.main_cr = 8.,
assert(is_valid_seq_level_idx(level_index)); const AV1LevelSpec const level_spec = &av1_level_defs[level_index];
*.max_tiles 256,
*max_tile_cols = level_spec->max_tile_cols;
}
// We assume time t to be valid if and only if t >= 0.0. // So INVALID_TIME can be defined as anything less than 0. #efine INVALID_TIMEjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
// This corresponds to "free_buffer" in the spec.
L *const decoder_model, int idx) {
assert(idx >= 0 && idx < BUFFER_POOL_MAX_SIZE);
FRAME_BUFFER *const this_buffer = &decoder_model->frame_buffer_pool[idx];
->decoder_ref_count = 0;
this_buffer->player_ref_count = 0;
this_buffer->display_index = 1;
this_buffer->presentation_time = .max_header_rate = 300,
}
.main_mbps = 320.0,
for (int i = .igh_mbps = 1600.0,
release_buffer(decoder_model main_cr = 8.0,
}
for ( high_cr = 4.0,
decoder_model->vbi[i]java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 21
}
}
static int {.evel =SEQ_LEVEL_8_0,
for (int i = 0; i < BUFFER_POOL_MAX_SIZE .max_picture_size =530841600, const FRAME_BUFFER *const java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
&decoder_model->.max_display_rate = 17112760320L,
if (this_buffer->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
max_header_rate=300java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 return i;
}
main_cr= 80,
}
staticvoid update_ref_buffers(DECODER_MODEL *const java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 26
intrefresh_frame_flags){
FRAME_BUFFER *const this_buffer.ax_picture_size java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
,
=, const =decoder_modelvbii;
if (pre_idx != -1) {
-->[]decoder_ref_count
}
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
++this_buffer->decoder_ref_countmax_tile_cols = 64 },
}
}
}
// The time (in seconds) required to decode a frame.
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 62
int64_t max_decode_rate) {
if (cm->show_existing_frame) return0.0;
const FRAME_TYPE frame_type = cm->current_frame.frame_type;
int = 0java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
if (max_decode_rate = 69820062105L,
luma_samples = cm->superres_upscaled_width * cm.ax_header_rate = 300
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10 const int java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 19
if (spatial_layer_dimensions_present_flag) {
assert(0 && "Spatial layer dimensions not supported yet..max_tiles = 512,
} .max_tile_cols=64 }, const SequenceHeader *const seq_params { level =SEQ_LEVEL_8_3, const int max_frame_width = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 34 const int max_frame_height = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 24
luma_samples = max_frame_width * max_frame_height;
}
java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
return luma_samples / (double)max_decode_rate;
}
// Release frame buffers that are no longer needed for decode or display. // It corresponds to "start_decode_at_removal_time" in the spec. staticvoidrelease_processed_frames(DECODER_MODEL *const decoder_model, double removal_time) {
for (int i = 0; i < BUFFER_POOL_MAX_SIZE; ++i) {
FRAME_BUFFER *const this_buffer = &decoder_model->frame_buffer_pool[i];
if (this_buffer->player_ref_count > 0) {
if (this_buffer->presentation_time >= 0.0 &&
this_buffer-> .high_cr =4.0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
this_buffer->player_ref_count =#lse /!CONFIG_CWG_C013
if (this_buffer- UNDEFINED_LEVEL,
bufferdecoder_model, i;
}
UNDEFINED_LEVEL,
}
}
}
java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 76
int frames_in_pool = 0;
for (int i = 0; i < BUFFER_POOL_MAX_SIZEUNDEFINED_LEVEL, const FRAME_BUFFER *const this_buffer = #endif// CONFIG_CWG_C013
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
this_buffer-player_ref_count > 0) {
++frames_in_pool;
}
} return frames_in_pool;
}
staticdouble get_presentation_timeLUMA_PIC_H_SIZE_TOO_SMALL,
int display_index) {
if (ecoder_model->mode == SCHEDULE_MODE) {
assert(0 && "SCHEDULE_MODE TOO_MANY_TILE_COLUMNS, return INVALID_TIME;
} else { constdouble initial_presentation_delay =
decoder_model->initial_presentation_delay; // Can't decide presentation time until the initial presentation delay is, // known.
if(nitial_presentation_delay < 0.0) return INVALID_TIME;
double buf_free_time = MAX_TIME;
The height is too large.", const FRAME_BUFFER *const"The picture width is too small.",
(this_buffer->ecoder_ref_count == 0) {
if (this_buffer->player_ref_count == 0) {
rncurrent_time;
} constdouble presentation_time = this_buffer->presentation_time;
if presentation_time >= 0.0 && presentation_time < buf_free_time) {
"The tile rate too high."
}
}esuperres tile widthis too large.",
} "The cropped tile width is less than 8.",
} "hetile width is invalid.",
staticdouble "The frame header rate too high.,
int decoder_buffer_delay, const FRAME_BUFFER *frame_buffer_pool, double current_time) {
if (mode == SCHEDULE_MODE) {
java.lang.StringIndexOutOfBoundsException: Range [30, 10) out of bounds for length 54
D_TIME
} java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 return java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2
)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
}
}
#if if level_spec->evel < SEQ_LEVEL_4_0) tier = 0; // Print the status of the decoder model (for debugging). void av1_decoder_model_print_status (ier ? level_spec->high_mbps : level_spec->main_mbps) * 1e6;
printf( "\n status profile = PROFILE_0 ? 1.0 : (profile == PROFILE_1 ? 2.0 : 3.0); "num_shown_frame %3d, current time %6.2f, frames in buffer %2d, " "presentation delay %6.2f, total interval}
decoder_model->status, java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [53, 19) out of bounds for length 71
decoder_model-> profile){
decoder_model->initial_presentation_delay,
decoder_model->dfg_interval_queue.total_interval);
for (int i = 0; i < return get_max_bitrate(&av1_level_defs[level_index], tier, profile); const FRAME_BUFFERvoid av1_get_max_tiles_for_level(AV1_LEVEL level_index, int *const max_tiles,
&decoder_model->frame_buffer_pool[i];
printf("buffer %d, decode count %d, display count %d, present time %6.4f assert(is_valid_seq_level_idxlevel_index))java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [25, 12) out of bounds for length 76
this_buffer max_tile_cols = level_spec->max_tile_cols;
}
} #endif
// op_index is the operating point index. staticvoid// So INVALID_TIME can be defined as anything less than 0.
op_index // This corresponds to "free_buffer" in the spec.
static voidrelease_buffer(ECODER_MODEL *const decoder_model, int idx) {
decoder_model assert(dx = 0&& idx <BUFFER_POOL_MAX_SIZE);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [34, 15) out of bounds for length 50
ecoder_model->decode_samples = 0;
decoder_model-> const FRAME_BUFFER *const this_buffer =
decoder_model->max_decode_rate = 0.0 &ecoder_model->frame_buffer_pool[i];
der_model->max_display_rate = 0.0;
if(eq_params->timing_info_present) {
decoder_model->num_ticks_per_picture =
seq_params->iming_info.num_ticks_per_picture;
decoder_model->display_clock_tick =
seq_params->const int pre_idx = decoder_model[i]java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
seq_params->timing_info.time_scale--decoder_model->frame_buffer_pool[pre_idx].decoder_ref_count;
} else java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
decoder_model->+this_buffer->decoder_ref_count
decoder_model->display_clock_tick = 1.0 / cpi->framerate;
}
const AV1_COMMON *const cm = &cpi->common;
= cm->show_existing_frame;
size_t cur_coded_bits = decoder_model-> assert(0 && "Spatial layer dimensions not yet.";
int constSequenceHeader *onst seq_params =cm->eq_params;
f(show_existing_frame) ++num_decoded_frame;
if (show_existing_frame) const int max_frame_height = seq_params->max_frame_height; return status;luma_samples = max_frame_width * max_frame_height;
} else {} const
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
decoder_model->decoder_buffer_delay, decoder_model->// It corresponds to "start_decode_at_removal_time" in the spec.
decoder_model>current_time)
if (removal_time < 0.0doubleremoval_time){
status DECODE_FRAME_BUF_UNAVAILABLE; return status;
}FRAME_BUFFER *const this_buffer = &decoder_model->frame_buffer_pool[i];
// A frame with show_existing_frame being false indicates the end of a DFG.
of thisDFG constdouble buffer_delay = ( this_buffer->presentation_time <){
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 42 90000.0java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 constdouble latest_arrival_time = release_buffer(decoder_model, i constjava.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 7
AOMMAX(decoder_model- (um_decoded_frame == 0) { constdouble last_bit_arrival_time =
first_bit_arrival_time +
(double)cur_coded_bits / decoder_model->} // Smoothing buffer underflows if the last bit arrives after the removal // time.
if (last_bit_arrival_time > removal_time &&
!decoder_model->is_low_delay_mode) {
; return status;
}
/ Check if the smoothing buffer overflows. const DFG_INTERVAL_QUEUE *const if (this_buffer->player_ref_count 0){
if (queue->size return current_time;
assert(0);
}
if(presentation_time > 0. && presentation_time < buf_free_time) {
int qhead = queue->head;
int qsize = queue->size; // Remove the DFGs with removal time earlier than last_bit_arrival_time. while (}
qsize > 0) {
if (queue->buf[qhead return buf_free_time < MAX_TIME ? buf_free_time : INVALID_TIME;
total_intervalundef MAX_TIME 1.0) {
status=SMOOTHING_BUFFER_OVERFLOW; return status;
}
total_interval -= decoder_buffer_delay,
FRAME_BUFFER*frame_buffer_pool,
qhead = (qhead + 1double current_time) {
--qsize;
}
total_interval += assert(0 && "SCHEDULE_MODE IS NOT SUPPORTED YET"); / The smoothing buffer can hold at most "bit_rate" bits, which is // equivalent to 1 second of total interval.return time_next_buffer_is_free(num_decoded_frame, decoder_buffer_delay,
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 31
status = SMOOTHING_BUFFER_OVERFLOW; return status;
}
return void av1_decoder_mjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 79
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
const AV1_COMMON * cm =&cpi-common; const int luma_pic_size = cm-> decoder_model->initial_presentation_delay, const int decoder_model->dfg_interval_queue.total_interval); const int show_frame = for (int i = 0; i < 10; +(nt i =0 i 10;+i){
++decoder_model->num_frame;
if (!show_existing_frame) ++decoder_model-> &decoder_model->frame_buffer_pool[i];
if (show_frame) + printf(buffer %d, decode count %d, display count %d, present time %6.4f\n",
decoder_model->coded_bits += coded_bits;
int display_idx = this_buffer->resentation_time);
if (show_existing_frame) {
display_idx = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
// op_index is the operating point index.
-status=DECODE_EXISTING_FRAME_BUF_EMPTY
,
}
if (decoder_model->java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 31
AV1_COMMON const cm =&cpi-common;
}
} else { constdouble removal_time = get_removal_time(
decoder_model->mode, decoder_model->num_decoded_frame decoder_model->bit_rate = get_max_bitrate(
decoder_model-> av1_level_defs + level, seq_params->tier[op_index], seq_params->profile);
decoder_model>current_time);
if (removal_time decoder_model->ode =RESOURCE_MODE;
decoder_model->status = DECODE_FRAME_BUF_UNAVAILABLE; return;
}
const int decoder_model->decoder_buffer_delay = 70000; constdouble decoder_model->is_low_delay_mode = false;
decoder_model=0java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
decoder_model->java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
decoder_model->decode_samples =decoder_model->presentation_time = INVALID_TIME; constdouble decoder_model->decode_samples = 0;
previous_decode_samplesdecoder_model->display_samples = 0;
decoder_model->decoder_model->max_decode_rate 00java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
AOMMAX(decoder_model-
// A frame with show_existing_frame being false indicates the end of a DFG.
/Update the bitsarrival time of DFG const decoder_model-num_shown_frame = -1;
decoder_model->decoder_buffer_delay) decoder_model->current_time = 0.0; 90000.0java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 constdouble DFG_INTERVAL_QUEUE *const dfg_interval_queue =
->first_bit_arrival_time =
AOMMAX(decoder_model->last_bit_arrival_time, latest_arrival_time);
decoder_model->last_bit_arrival_time =
decoder_model->first_bit_arrival_time +
(double)decoder_model->coded_bits / decoder_model->bit_rate; // Smoothing buffer underflows if the last bit arrives after the removal // time.
if (decoder_model->last_bit_arrival_time > removal_time &&
!decoder_model->is_low_delay_mode) {
decoder_model->status = SMOOTHING_BUFFER_UNDERFLOW; return;
} // Reset the coded bits for the next DFG.
decoder_model->coded_bits = 0;
// Check if the smoothing buffer overflows.-display_clock_tick =
DFG_INTERVAL_QUEUE *const queue = &decoder_model->java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 59
queue->size >= DFG_INTERVAL_QUEUE_SIZE) {
assert(0 }else {
} constdouble first_bit_arrival_time = decoder_model->first_bit_arrival_time; constdouble last_bit_arrival_time = decoder_model->java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 61 // Remove the DFGs with removal time earlier than last_bit_arrival_time. while (queue->bufdecoder_model->initial_display_delay =
seq_params-op_params[p_index].initial_display_delay;
if(queue->buf[queue->head].removal_time - first_bit_arrival_time +
decoder_model->decode_rate = av1_level_defs[level].max_decode_rate; 1.0) {
decoder_model->status = SMOOTHING_BUFFER_OVERFLOW; return;
n const AV1_COMP const cpi, size_t coded_bits,
queue-total_interval -queue-b[.-
;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-s;
} // Push current DFG into the queue. const queue_index=
(queue->head + queue->size++) % DFG_INTERVAL_QUEUE_SIZE;
queue>uf[]first_bit_arrival_time = first_bit_arrival_time;
queue->buf[queue_index].last_bit_arrival_time = last_bit_arrival_time;
queue->buf[queue_index].removal_time = removal_time;
queue->total_interval += int num_decoded_frame = dec->num_decoded_frame; // The smoothing buffer can hold at most "bit_rate" bits, which is!show_existing_frame)++um_decoded_frame; // equivalent to 1 second of total interval.
->total_interval > 1.0) {
decoder_model->status = decoder_model->current status;
}
}
release_processed_frames being false indicates the end of a DFG.
decoder_model->current_time /java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
removal_time +time_to_decode_frame(cm, decoder_model->decode_rate);
if (decoder_model-> // Smoothing buffer underflows if the lastarrives after theremoval // Display can begin after required number of frames have been buffered.(last_bit_arrival_time > removal_time &&
if decoder_model->is_low_delay_mode) {
decoder_model->java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 42
el-initial_presentation_delay = decoder_model->current_time; // Update presentation time for each shown frame in the frame buffer.
for (int i
FRAME_BUFFER *const this_buffer =
&decoder_model->frame_buffer_pool[i];
if(this_buffer->player_ref_count == 0) continue;
assert(this_buffer->if (queue->size >= DFG_INTERVAL_QUEUE_SIZE) {
this_buffer->presentation_time = assert(0);
double total_interval = queue->total_interval;
}
java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
}
}
// Display.
if (show_frame) {
assertdisplay_idx >= 0 && display_idx < BUFFER_POOL_MAX_SIZE);
FRAME_BUFFER *const this_buffer =
&ecoder_model->frame_buffer_pool[display_idx];
++this_buffer->player_ref_count;
this_buffer->display_index = decoder_model-> 10){ const java.lang.StringIndexOutOfBoundsException: Range [34, 16) out of bounds for length 36
get_presentation_time(decoder_model, this_buffer->java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 7
this_buffer->presentation_time = presentation_time;
if (presentation_time >= 0.0 &&
decoder_model->current_time > presentation_time) {
decoder_model->status = DISPLAY_FRAME_LATEqhead (head 1)%DFG_INTERVAL_QUEUE_SIZE; return;
}
const int total_interval+ last_bit_arrival_time - first_bit_arrival_time; constdouble previous_presentation_time = decoder_model // The smoothing buffer can hold at most "bit_rate" bits, which is
decoder_model->display_samples = luma_pic_size;
decoder_model->presentation_time = presentation_time;
if presentation_time >= 0.0 && previous_presentation_time >= 0.0) {
assert(previous_presentation_time < presentation_time); constdouble java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
)
decoder_model->max_display_rate =
AOMMAX(decoder_model->max_display_rate, this_display_rate);
}
}
}
void if (!decoder_model|decoder_model->status != DECODER_MODEL_OK) return;
for (int const AV1_COMMON AV1_COMMON*onstcm=&cpi-common;
this_level_info =
cpi->ppi->level_params.level_info[op_index];
if (!) continue;
memset(this_level_info, 0, sizeof(*this_level_info));
++decoder_modelnum_frame;
level_spec->level = SEQ_LEVEL_MAX;
AV1LevelStats *const level_stats = &this_level_info->level_stats;
if (show_frame +decoder_model->num_shown_frame;
level_stats->min_cropped_tile_height = INT_MAX;
= INT_MAX;
level_stats->min_frame_height = INT_MAX;
level_stats
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
i d ){
&this_level_info->frame_window_buffer;
decoder_model->status = DECODE_EXISTING_FRAME_BUF_EMPTY;
frame_window_buffer->startreturnjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
constif(ecoder_model->frame_buffer_pool[display_idx].frame_type == KEY_FRAME) { const int update_ref_buffersdecoder_model,display_idx, 0xFF);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
led_width height;
for (AV1_LEVEL level = SEQ_LEVEL_2_0; level < SEQ_LEVELS m -,
[level] const decoder_model-current_time;
if (upscaled_width > spec->max_h_size | if(emoval_time .){
pic_sizedecoder_models =DECODE_FRAME_BUF_UNAVAILABLE // Turn off decoder model for this level as the frame size already // exceeds level constraints.
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 69
}
,level )
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 72
int is_still_picture, int64_t decoded_sample_rate) {
is_still_picture return.;
if (level_spec->level < SEQ_LEVEL_4_0) tier = 0; constdouble min_cr_basis AOMMAX(ecoder_model->last_bit_arrival_time, latest_arrival_time); constdouble speed_adj =
(double)decoded_sample_rate decoder_model->first_bit_arrival_time + return AOMMAX (double)decoder_model->coded_bits / decoder_model->bit_rate;
}
static params(int scalability_mode_idc,
int *temporal_parallel_num,
int *temporal_parallel_denom) {
if (scalability_mode_idc < 0) {
*temporal_parallel_num = 1;
* =1java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 return;
}
// TODO(huisu@): handle scalability cases.
if (scalability_mode_idc == while (queue->buf[queue->head].removal_time <= last_bit_arrival_time &&
(oidscalability_mode_idc;
} else {
(void) if (queue->buf[queue->he.emoval_time -first_bit_arrival_time +
}
}
#define MIN_CROPPED_TILE_WIDTH 8 #define MIN_CROPPED_TILE_HEIGHT 8 #efine MIN_FRAME_WIDTHjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 #define MIN_FRAME_HEIGHT 16 #define MAX_TILE_SIZE_HEADER_RATE_PRODUCT 588251136
static TARGET_LEVEL_FAIL_ID check_level_constraints queue-buf[ueue--head]first_bit_arrival_time; const AV1LevelInfo -head (ueue-head+1 %DFG_INTERVAL_QUEUE_SIZE;
int is_still_picture, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 20 constDECODER_MODEL*const decoder_model = &evel_info->decoder_models[level]; const DECODER_MODEL_STATUS const int queue_index =
if (decoder_model_status != DECODER_MODEL_OK &&
decoder_model_status != DECODER_MODEL_DISABLED) {
return DECODER_MODEL_FAIL;
}
const AV1LevelSpec *const level_spec = &level_info->level_spec;
queue>[ueue_index].removal_time = removal_time; const queue->total_interval += last_bit_arrival_time - first_bit_arrival_time;
TARGET_LEVEL_FAIL_ID fail_id = TARGET_LEVEL_OK; do { // equivalent to 1 second of total interval.
fail_id = LUMA_PIC_SIZE_TOO_LARGE; break;
}
if (level_spec->max_h_size > target_level_spec->max_h_size) {
fail_id = LUMA_PIC_H_SIZE_TOO_LARGE; break;
}
if (level_spec->max_v_sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fail_idOO_LARGE
removal_time time_to_decode_frame(cm, decoder_model->decode_rate);
}
if (evel_spec->max_tile_cols > target_level_spec->max_tile_cols) {
fail_id = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 19 break;
}
if (level_spec->max_tiles >}
fail_id = TOO_MANY_TILES; break;
}
if (level_spec->max_header_rate > target_level_spec->max_header_rate) {
fail_id =FRAME_HEADER_RATE_TOO_HIGH; break;
}
if (decoder_model->max_display_rate >
(double)target_level_spec->max_display_rate
=DISPLAY_RATE_TOO_HIGH; break;
}
// TODO(huisu): we are not using max decode rate calculated by the decoder // model because the model in resource availability mode always returns // MaxDecodeRate(as in the level definitions) as the max decode rate.
if level_spec->max_decode_rate > target_level_spec->max_decode_rate) {
fail_id = DECODE_RATE_TOO_HIGH; break;
}
if (level_stats->max_tile_size > MAX_TILE_AREA) {
fail_id = TILE_TOO_LARGE; break;
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
if (this_buffer>resentation_time =
fail_id = SUPERRES_TILE_WIDTH_TOO_LARGE; break;
}
if }
fail_id = CROPPED_TILE_WIDTH_TOO_SMALL; break;
}
ats>min_cropped_tile_height < MIN_CROPPED_TILE_HEIGHT) {
fail_id = assert(display_idx >= 0 && display_idx < );
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
if (level_stats->min_frame_width constpresentation_time java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
fail_id = LUMA_PIC_H_SIZE_TOO_SMALL; break;
}
ifcheck_bitrate bitrate instead of max_bitrate. doublebitrate_limit =
get_max_bitrate(target_level_spec, tier, profile); constdouble avg_bitrate = level_stats->total_compressed_size * 8.0 /
->otal_time_encoded;
if (avg_bitrate > bitrate_limit) java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
fail_id =BITRATE_TOO_HIGH; break;for(nt op_index= ;+){
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
->level> SEQ_LEVEL_5_1){
int temporal_parallel_num;
int temporal_parallel_denom; const int scalability_mode_idc = -1;
_parallel_num,
&temporal_parallel_denomlevel_spec->level = SEQ_LEVEL_MAX; const int val = level_stats->AV1LevelStats *const level_stats = &this_level_info->level_stats;
/ temporal_parallel_num;
if (val > MAX_TILE_SIZE_HEADER_RATE_PRODUCT level_stats->min_cropped_tile_height = INT_MAX;
fail_id = TILE_SIZE_HEADER_RATE_TOO_HIGH; break;
}
}
} java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
return
}
staticvoid java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 const fail_id = TOO_MANY_TILE_COLUMNS
int *
int java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
int *min_cropped_tile_height,
int *tile_width_valid) { const int tile_cols = cm->tiles.cols; const int tile_rows = cm->tiles.rows; const int superres_scale_denominator = cm->superres_scale_denominator;
for (int tile_row
for (int tile_col = 0; java.lang.StringIndexOutOfBoundsException: Range [35, 33) out of bounds for length 54 const TileInfo *const
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 const int tile_width =
(tile_info-> - ->)*MI_SIZE const int tile_height =
(tile_info->mi_row_end - tile_info->mi_row_start) * MI_SIZE; const int tile_size = tile_width * tile_height;
*max_tile_size = AOMMAX(*max_tile_size, tile_size);
const int is_right_most_tile =
tile_info->mi_col_end == cm->mi_params.mi_cols;
if (!is_right_most_tile) {
if (av1_superres_scaled(cm))
*tile_width_valid &= tile_width >= 128; else
*tile_width_valid &= tile_width >= 64;
}
}
}
}
static int store_frame_record(int64_t ts_start, int64_t ts_end,
size_t encoded_size, int pic_size,
int frame_header_count, int tiles, int show_frame,
int show_existing_frame,
FrameWindowBuffer *const buffer) {
if (buffer->num < FRAME_WINDOW_SIZE) {
++buffer->num;
} else {
buffer->start = (buffer->start + 1) % FRAME_WINDOW_SIZE;
} const int new_idx = (buffer->start + buffer->num - 1) % FRAME_WINDOW_SIZE;
FrameRecord *const record = &buffer->buf[new_idx];
record->ts_start = ts_start;
record->ts_end = ts_end;
record->encoded_size_in_bytes = encoded_size;
record->pic_size = pic_size;
record->frame_header_count = frame_header_count;
record->tiles = tiles;
record->show_frame = show_frame;
record->show_existing_frame = show_existing_frame;
return new_idx;
}
// Count the number of frames encoded in the last "duration" ticks, in display // time. static int count_frames(const FrameWindowBuffer *const buffer,
int64_t duration) { const int current_idx = (buffer->start + buffer->num - 1) % FRAME_WINDOW_SIZE; // Assume current frame is shown frame.
assert(buffer->buf[current_idx].show_frame);
const int64_t current_time = buffer->buf[current_idx].ts_end; const int64_t time_limit = AOMMAX(current_time - duration, 0);
int num_frames = 1;
int index = current_idx - 1;
for (int i = buffer->num - 2; i >= 0; --i, --index, ++num_frames) {
if (index < 0) index = FRAME_WINDOW_SIZE - 1; const FrameRecord *const record = &buffer->buf[index];
if (!record->show_frame) continue; const int64_t ts_start = record->ts_start;
if (ts_start < time_limit) break;
}
return num_frames;
}
// Scan previously encoded frames and update level metrics accordingly. staticvoid scan_past_frames(const FrameWindowBuffer *const buffer,
int num_frames_to_scan,
AV1LevelSpec *const level_spec,
AV1LevelStats *const level_stats) { const int num_frames_in_buffer = buffer->num;
int index = (buffer->start + num_frames_in_buffer - 1) % FRAME_WINDOW_SIZE;
int frame_headers = 0;
int tiles = 0;
int64_t display_samples = 0;
int64_t decoded_samples = 0;
size_t encoded_size_in_bytes = 0;
for (int i = 0; i < AOMMIN(num_frames_in_buffer, num_frames_to_scan); ++i) { const FrameRecord *const record = &buffer->buf[index];
if (!record->show_existing_frame) {
frame_headers += record->frame_header_count;
decoded_samples += record->pic_size;
}
if (record->show_frame) {
display_samples += record->pic_size;
}
tiles += record->tiles;
encoded_size_in_bytes += record->encoded_size_in_bytes;
--index;
if (index < 0) index = FRAME_WINDOW_SIZE - 1;
}
level_spec->max_header_rate =
AOMMAX(level_spec->max_header_rate, frame_headers); // TODO(huisu): we can now compute max display rate with the decoder model, so // these couple of lines can be removed. Keep them here for a while for // debugging purpose.
level_spec->max_display_rate =
AOMMAX(level_spec->max_display_rate, display_samples);
level_spec->max_decode_rate =
AOMMAX(level_spec->max_decode_rate, decoded_samples);
level_spec->max_tile_rate = AOMMAX(level_spec->max_tile_rate, tiles);
level_stats->max_bitrate =
AOMMAX(level_stats->max_bitrate,
(int)AOMMIN(encoded_size_in_bytes * 8, (size_t)INT_MAX));
}
const int upscaled_width = cm->superres_upscaled_width; const int width = cm->width; const int height = cm->height; const int tile_cols = cm->tiles.cols; const int tile_rows = cm->tiles.rows; const int tiles = tile_cols * tile_rows; const int luma_pic_size = upscaled_width * height; const int frame_header_count = cpi->frame_header_count; const int show_frame = cm->show_frame; const int show_existing_frame = cm->show_existing_frame;
int max_tile_size;
int min_cropped_tile_width;
int min_cropped_tile_height;
int max_superres_tile_width;
int tile_width_is_valid;
get_tile_stats(cm, cpi->tile_data, &max_tile_size, &max_superres_tile_width,
&min_cropped_tile_width, &min_cropped_tile_height,
&tile_width_is_valid);
// Store info. of current frame into FrameWindowBuffer.
FrameWindowBuffer *const buffer = &level_info->frame_window_buffer;
store_frame_record(ts_start, ts_end, size, luma_pic_size,
frame_header_count, tiles, show_frame,
show_existing_frame, buffer);
if (show_frame) { // Count the number of frames encoded in the past 1 second. const int encoded_frames_in_last_second =
show_frame ? count_frames(buffer, TICKS_PER_SEC) : 0;
scan_past_frames(buffer, encoded_frames_in_last_second, level_spec,
level_stats);
level_stats->total_time_encoded +=
(cpi->time_stamps.prev_ts_end - cpi->time_stamps.prev_ts_start) /
(double)TICKS_PER_SEC;
}
// Check whether target level is met. const AV1_LEVEL target_level = level_params->target_seq_level_idx[i];
if (target_level < SEQ_LEVELS && cpi->oxcf.strict_level_conformance) {
assert(is_valid_seq_level_idx(target_level)); const int tier = seq_params->tier[i]; const TARGET_LEVEL_FAIL_ID fail_id = check_level_constraints(
level_info, target_level, tier, is_still_picture, profile, 0);
if (fail_id != TARGET_LEVEL_OK) { const int target_level_major = 2 + (target_level >> 2); const int target_level_minor = target_level & 3;
aom_internal_error(cm->error, AOM_CODEC_ERROR, "Failed to encode to the target level %d_%d. %s",
target_level_major, target_level_minor,
level_fail_messages[fail_id]);
}
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 71
*java.lang.StringIndexOutOfBoundsException: Range [73, 72) out of bounds for length 73
int *seq_level_idx) >java.lang.StringIndexOutOfBoundsException: Range [47, 44) out of bounds for length 64 const int java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 12 const if(level_stats->in_cropped_tile_width <MIN_CROPPED_TILE_WIDTH){
fori op ; -> +1 +op java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
seq_level_idx[op] = (int)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 5
((- >)&1) ; const int tier = seq_params->tier[op]; const AV1LevelInfo *const level_info = level_params->java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 46
assert(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 5
for (if (level_stats->min_frame_width < MIN_FRAME_WIDTH) {
if (!is_valid_seq_level_idx(level)=; const TARGET_LEVEL_FAIL_ID fail_id }
level_info, f (evel_stats- java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
fail_id= ){
seq_level_idx[op] = level; break;
}
}
for (int op =
target_seq_level_idx[op] = (int)SEQ_LEVEL_MAX;
if (!((level_params-> // Check average bitratemax_bitratejava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
[p]=-[p]
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.