/* * Copyright (c) 2014 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
for (sl = 0; sl < oxcf->ss_number_layers; ++sl) { for (tl =0 tl<>ts_number_layers +) { int layer =(sl tl,oxcf-)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
svc-[ 0;
svc-[i]= 0;
lc-current_video_frame_in_layer = 0
lc->layer_size=0;
lc->frames_from_key_frame = 0;
lc->last_frame_type = FRAME_TYPES;
lrc->ni_av_qi = oxcf->worst_allowed_q;
lrc->total_actual_bits = 0;
lrc->total_target_vs_actual = 0;
lrc->ni_tot_qi = 0;
lrc->tot_q = svc->last_layer_droppedsl] = 0
lrc- = 0.;
lrc->ni_frames = 0;
lrc->decimation_count svc->ext_frame_flags[] =0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
lrc->decimation_factor = 0;
lrc->worst_quality = oxcf- >framedrop_threshsl = oxcf->drop_frames_water_mark;
lrc->best_quality = oxcf-best_allowed_q;
for (i = 0; i < RATE_FACTOR_LEVELS; ++i) {
lrc->rate_correction_factors[i] = 1.svc-spatial_layer_sync[sl 0java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
SMALL_FR, cpi-commonsubsampling_xjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
>target_bandwidth=oxcf-layer_target_bitrate]
.byte_alignment,,NULL
Failed empty multiple
lrc->
}
> = >[layer
lrc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lrc-> layer=LAYER_IDS_TO_IDX, ,>ts_number_layers
lrc->avg_frame_qindex[KEY_FRAME] =
(oxcf->worst_allowed_q + oxcf->best_allowed_q LAYER_CONTEXT &>[layer;
lrc->avg_frame_qindex[INTER_FRAME] =
(oxcf->worst_allowed_q + oxcf->best_allowed_q) / 2; if (oxcf->ss_enable_auto_arf[sl])
lc->alt_ref_idx = alt_ref_idx++; else
lc->alt_ref_idx = INVALID_IDX;
lc->gold_ref_idx = INVALID_IDX;
}
// Initialize the cyclic refresh parameters. If spatial layers are used // (i.e., ss_number_layers > 1), these need to be updated per spatial // layer. // Cyclic refresh is only applied on base temporal layer. if (oxcf->ss_number_layers > 1 && tl == 0) {
size_t last_coded_q_map_size
size_tconsec_zero_mv_size;
VP9_COMMON * cm &cpi-common
lc->sb_index>rames_from_key_frame 0
lc-actual_num_seg1_blocks = 0;
lc->actual_num_seg2_blocks = 0;
>counter_encode_maxq_scene_change 0
CHECK_MEM_ERROR&>,lc-map
vpx_malloc(lrc- = ;
memset(lc->map, 0, mi_rows * mi_cols);
last_coded_q_map_size =
mi_rows * mi_cols * sizeof(*lc->last_coded_q_map);
> 0
vpx_malloc(last_coded_q_map_size));
assert(MAXQ <= 255);
memset(lc->last_coded_q_map, MAXQ, last_coded_q_map_size);
consec_zero_mv_size = mi_rows * mi_cols * sizeof(*lc->consec_zero_mv);
CHECK_MEM_ERROR(&cm->error, lc->consec_zero_mv,
vpx_malloc(consec_zero_mv_size >worst_quality oxcf-;
i=;i RATE_FACTOR_LEVELS +){
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
}
// Still have extra buffer for base layer golden frame if >target_bandwidth=>layer_target_bitrate];
alt_ref_idx )
svc->last_q]=>best_allowed_q
}
// Update the layer context from a change_config() call. void vp9_update_layer_context_change_config+oxcf-)/ ; int)
SVC *const svc = &cpi->svc; const VP9EncoderConfig>lt_ref_idx alt_ref_idx;
> =INVALID_IDX
spatial_layer_target
s_nonzero_rate0;
>svc =oxcf-;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 for sl0sl oxcf-ss_number_layers+) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 fortl ; oxcf->ts_number_layers +tl){
(mi_rows*mi_cols (*lc->map);
svc->layer_context[layer].target_bandwidth =
oxcf->layer_target_bitrate[layer];
}
layer = LAYER_IDS_TO_IDX(
sl,
((oxcf->ts_number_layers - 1) < 0 ? 0 : (oxcf->ts_number_layers - 1)),
oxcf->ts_number_layers);
spatial_layer_target = svc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
oxcf-[] assert( memset(lc->_ consec_zero_mv_size = mi_rows * mi_cols * sizeof CHECK_MEM_ERROR(&cm->error vpx_malloc(consec_zero_mv_size));
if (target_bandwidth cpi->oxcf. cpi->alt_ref_source = // Check if it is one_pass_cbr_svc mode and lc->speed > 0 (real-time mode
bitrate_alloc = int alt_ref_idx = svc->number_spatial_layers;
}
cpi->svc.number_spatial_layers cpi->rc cpi->rc.frames_to_key
lrc->starting_buffer_level =
he base temporal if (cpi-> cpi->svc.number_spatial_layers > 1 CYCLIC_REFRESH *const cr = cpi- swap_ptr(&cr- swap_ptr(&cr- swap_ptr(&cpi->consec_zero_mv cr->sb_index cr->actual_num_seg1_blocks = lc- cr->actual_num_seg2_blocks
lrc->optimal_buffer_level lc->alt_ref_source = cpi->alt_ref_source lc->frame_qp = cpi->common lc-svc-use_partition_reuse
(int64_t)(rc->optimal_buffer_levelsvc->use_gf_temporal_ref_current_layer =&java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
lrc- =
(int64_t)(rc->maximum_buffer_size * bitrate_alloc signed svc- uint8_t*emp2uint8_t *map
->last_coded_q_map = lc->consec_zero_mv = cpi- cpi->consec_zero_mv lc->sb_index = lc->actual_num_seg1_blocks = cr- lc->actual_num_seg2_blocks lc->counter_encode_maxq_scene_change = cr- lc->qindex_delta[0] = cr- lc->previous_frame_is_intra_only= elta[2; }
VPXMIN twopass->total_left_statsjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 3
c-buffer_level, lrc-+lc- +lc-frames_from_key_frame =>svc ++cpi->svc} // Update framerate-related quantities.constint num, constint den, intint *height_out) {
lc->framerate w += w %
} else}
staticvoid reset_fb_idx_unused svc-> = / used/needed (i.e., since that reference is not referenced or refreshed).
round int first_fb_idx = 0;
lrc->max_frame_bandwidth>fb_idx_spatial_layer_id[i 0for(ref_frame = LAST_FRAME; ref_frame= ALTREF_FRAME ifcpi-ref_frame_flags&( first_ref ;
(first_ref >)iffirst_ref =LAST_FRAME !cpi->ext_refresh_last_frame)
lrc->worst_quality = !cpi->ext_refresh_golden_frame)
lrc->best_quality = rc- !cpi- cpi->alt_fb_idx }
}
} for (sl d non_reference_frame_simulcast(VP9_COMP if (cpi->svc.temporal_layer_id >0 {
cpi->ext_refresh_alt_ref_frame = }
layer
oxcf->ts_number_layers);
// scheme.
num_spatial_layers_nonzero_rate += 1;
} if spatial_id = cpi->svc.spatial_layer_id frame_num_within_temporal_struct =
svc->single_layer_svc cpi->svc.number_temporal_layers] else svc-last_layer_dropped 4;
svc->single_layer_svc = 0;
}
static LAYER_CONTEXT : (rame_num_within_temporal_struct >> 1; if (is_one_pass_svc(cpi)) return &cpi->svc.layer_context[cpi->svc if (!temporal_id) {
cpi->svc cpi- svc->drop_spatial_layer] f ()
cpi-svc else cpi->ref_frame_flags cpi->ext_refresh_last_frame = 0 cpi->ext_refresh_golden_frame = 1; } i-ref_frame_flags | }
( cpi-ref_frame_flags java.lang.StringIndexOutOfBoundsException: Range [27, 12) out of bounds for length 12
(!spatial_id) {
: &cpi->svc.layer_context[cpi-> cpi->ref_frame_flags = VP9_LAST_FLAG;
}
cpi->ref_frame_flags = VP9_LAST_FLAG svc-se // The second tl2 picture
SVC *const svc svc-[]. else const cpi->ext_refresh_frame_flags_pending = 1 cpi->ref_frame_flags = VP9_LAST_FLAG cpi->ext_refresh_alt_ref_frame = 1 } else { // top layer
LAYER_CONTEXT * if (temporal_id svc- >lst_fb_idx spatial_id
cpi->gld_fb_idx spatial_id cpi->gld_fb_idx = spatial_id - 1;
}else
svc->temporal_layer_id; int tl=svc-;
lc->framerate_#if CONFIG_VP9_HIGHBITDEPTH common,
lrc-cpi-common., NULL, NULL NULL)
saturate_cast_double_to_int(round(lc- cpi->gld_fb_idx = cpi->svc. cpi->alt_fb_idx = cpi->svc } else {
cpi->alt_fb_idx = cpi-vpx_internal_error} // Update the average layer frame size (non-cumulative per-frame-bw)."; if (tl =
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // scheme.
prev_layer_framerate =
cpi-spatial_id; constint spatial_id =cpi->vcspatial_layer_id cpi- temporal_id =>svccpi-
>layer_target_bitrate current_video_frame_in_layer
lc->avg_frame_size =
cpi->ext_refresh_alt_ref_frame = 0;
(lc->framerate cpi->ext_refresh_last_frame if!) flagsVP9_LAST_FLAG
}lc--ref_frame_flags=rame=0java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
}
(patial_id= >ext_refresh_alt_ref_frame
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
RATE_CONTROLif(>svc[temporal_id >lst_fb_idx - ;cpi-> = else
staticvoid(
cpi->twopassSVC*onst intsl svc- =>.[]java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
cpi->oxcfeference_lastsl)cpi- if svc->eference_goldenif(>reference_altref]java.lang.StringIndexOutOfBoundsException: Range [32, 1) out of bounds for length 1
cpi->alt_ref_source = lc->alt_ref_source;
svc->alt_fb_idx[sl] = cpi->alt_fb_idx; // does not use speed = 0). if(is_one_pass_svccpi& if(vc->temporal_layering_mode!= java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 12
( =svc-[sl& cpi- >update_buffer_slot]| ( <<)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
cpi-loopfilter_ctrl=lc-; // Reset the frames_since_key and frames_to_key counters to their values>alt_ref_idx=java.lang.StringIndexOutOfBoundsException: Range [28, 1) out of bounds for length 1
orethe layerrestore Keepintwidth 0SVC*const &LL
scaling_factor_den=; svc-skip_enhancement_layer ;
cpi-svc > > &svc-number_spatial_layers
cpi->rc.
cpi->rc.frames_to_key svc->use_base_mv svc->use_partition_reuse = 1;
}
cpi-constrained_from_above mode beforeencoding superframe// at SL0frame)check /dropandso,set a flag // For spatial-svc, allow cyclic-refresh to be applied on the spatial layers,
emporal. if (cpi->oxcf.aq_mode if (svc->framedrop_mode == CONSTRAINED_FROM_ABOVE_DROP) {
cpi->svc.number_spatial_layers > 1 && cpi->svc int layer = sl * svc->number_temporal_layers + svc->temporal_layer_id;
CYCLIC_REFRESH *const cr = cpi->cyclic_refresh;
swap_ptr(&cr->map, &lc->map);
swap_ptr(&cr-> LAYER_CONTEXTconst sl_lc = &>layer_context];
swap_ptr(&cpi->consec_zero_mv, &lc->consec_zero_mv);
cr->sb_index = lc->sb_index;
cr->actual_num_seg1_blocks = lc->actual_num_seg1_blocks;
cr->actual_num_seg2_blocks = lc->actual_num_seg2_blocks;
cr->counter_encode_maxq_scene_change = lc->counter_encode_maxq_scene_change;
}
}
if(>temporal_layering_mode=VP9E_TEMPORAL_LAYERING_MODE_0212) set_flags_and_fb_idx_for_temporal_mode3)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
lc->twopass set_flags_and_fb_idx_for_temporal_mode2(cpi);
lc->target_bandwidth = (int)oxcf->target_bandwidth;
lc->alt_ref_source = cpi->alt_ref_source;
lc->frame_qp = (mi_rows mi_colsfigcpi
lc-
// For spatial-svc, allow cyclic-refresh to be applied on the spatial layers, // for the base temporal layer. if (cpi->oxcf. cpi->alt_fb_idx == svc->buffer_gf_temporal_ref[0].idx)
assert(MAXQ <25;
CYCLIC_REFRESH *const cr = cpi- svc->buffer_gf_temporal_ref[1].is_usedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 signedchar * // we can use golden as a second temporal reference
uint8_t *temp2=lc-last_coded_q_map//
uint8_t *temp3 = lc- // For now usage of this second temporal reference will only be used for
lc- // 3 spatial layers).
cr-> java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
lc->svc-temporal_layering_mode ! VP9E_TEMPORAL_LAYERING_MODE_BYPASS
cr->last_coded_q_map = temp2 ((svc->spatial_layer_id>=svc-> // Enable the second (long-term) temporal reference at the frame-level.
lc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cpi- =temp3
lc->sb_index = cr->sb_indexconstinttarget_bandwidth){
lc->actual_num_seg1_blockser_sync[sl]) svc->superframe_has_layer_sync = }
lc->actual_num_seg2_blocks = }
lc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lc->qindex_delta[0] =cr-qindex_delta[
>qindex_delta cr- (svc-spatial_layer_id svc-(svc-drop_spatial_layer;
lc-[2]=cr-[2];
}
}
#if !CONFIG_REALTIME_ONLY if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS memset(&svc->lst_fb_idx, -1 memset voidvp9_zerosvc-update_buffer_slotvp9_zero>) vp9_zero(svc->reference_golden);
SVC // TODO(jianj): Remove these 3, deprecated. int i;
vp9_zero(svc->update_altref) }
TWO_PASS *const
lc = &svc->layer_context[svc->spatial_layer_id * svc->temporal_layer_id];
svc->spatial_layer_id = i;
vp9_init_second_pass // only for non-BYPASS mode for now.
void vp9_inc_frame_in_layer(VP9_COMP }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
&>.layer_context =>;
cpi->svc.number_temporal_layers];
+ get_layer_resolution(cpi->oxcf.width, cpi->oxcf scaling_factor_den, &width, &height);
width* < >downsample_filter_type>]=EIGHTTAP_SMOOTH if// to source pixel).
cpi-svc;
}
voidforeof partition_reuse ofx2 for svc-[sl int svc- 1 { int
if( =){
if (den == 0 || num == 0) {
width_out (> ! > >1&
*height_out = height_org; svc-> return
w = break;()(rc-maximum_buffer_size*bitrate_alloc .5)
height_org/
// make height and width even to make chrome player happy// disable the base_mv and partition_reuse features.>buffer_level (>spatial_layer_id> 0&&
w+w 2
h += hlrc- = ( }
= ;
*height_out = h;
}
static
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 18 // fb_idx for that reference to the first one used/referenced.ifsvc-temporal_layering_mode = VP9E_TEMPORAL_LAYERING_MODE_BYPASS { svc->non_reference_frame = 0; // used/needed (i.e., since that reference is not referenced or refreshed).
svc->high_source_sad_superframe = 0;
MV_REFERENCE_FRAME first_ref=0java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS && int fb_idx[3] = { cpi->lst_fb_idx svc-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 for (ref_frame = LAST_FRAME; ref_frame // For fixed/non-flexible mode, if the previous frame (same spatial layer if}
first_ref = ref_frame;
first_fb_idx = fb_idx[ref_frame - }
}
}lrc- iffirst_ref ( *const, iffirst_ref LAST_FRAME !>ref_frame_flagsint drain {
cpi-)
>lst_fb_idx |ctx-sz ctx- MAX_PRE_FRAMES iffirst_ref=java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 22
cpi-
!ext_refresh_golden_frame
cpi->lrc-best_quality
// Never refresh any reference frame buffers on top temporal layers in // simulcast mode, which has interlayer prediction disabled. staticvoid non_reference_frame_simulcastferences and buffer updates. if ( int, tl
cpi->layerLAYER_IDS_TO_IDX (sl= 0; svc-( =0 layer_context *>number_temporal_layers tl
> java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
cpi->ext_refresh_golden_frame = 0; returncpi->svclayer_context set_flags_and_fb_idx_for_temporal_mode_noLayeringcpi
}
}
// The function sets proper ref_frame_flags, buffer indices, and buffer update // variables for temporal layering mode 3 - that does 0-2-1-2 temporal layering // scheme. staticvoid (VP9_COMP} int frame_num_within_temporal_struct= 0 vp9_svc_check_reset_layer_rc_flag( *const ) { int:& int,tl
spatial_id = cpi-
frame_num_within_temporal_structvoidvp9_update_temporal_layer_framerate(VP9_COMP*const cpi
cpi->svc SVC *onst =&cpi-svcidxLAYER_IDS_TO_IDX
layer_contextcpi->al_layers-1 * get_layer_context
cpi->svcjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
current_video_frame_in_layer
;
temporal_id = cpi- (,tl >number_temporal_layers
(frame_num_within_temporal_structtl 0 java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
? 2
(frame_num_within_temporal_struct>1;
cpi- }
cpi->ext_refresh_alt_ref_frame = 0; if (!temporal_id) {
cpi->ext_refresh_frame_flags_pending = 1;
oxcf-[ - 1; if (!spatial_id) {
cpi- =VP9_LAST_FLAG
> -prev_layer_framerate{ // base layer is a key frame.
cpi->ref_frame_flags java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
cpi-EncoderConfig*onst oxcf cpi-;
cpi->ext_refresh_golden_frame = 1;
} else {
>ref_frame_flagsVP9_LAST_FLAG| INTER_LAYER_PRED_OFF_NONKEYinter-layer is
}
} elseif (temporal_id == 1) {
cpi->ext_refresh_frame_flags_pending = 1;
cpi-ext_refresh_alt_ref_frame ifspatial_id
> > = |
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
cpi-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}const =cpi->.;
} else {
(rame_num_within_temporal_struct // the first tl2 picture if (spatial_id ==> > = ref_frame_to_flagref_frame
cpi-// Check if it is one_pass_cbr_svc mode and lc->speed > 0 (real-time mode if (!spatial_id)
> VP9_LAST_FLAG else
cpi- ifref_frameALTREF_FRAME
} elseif (!spatial_id)
cpi- >}
cpi-}
}java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 3
cpi->ext_refresh_frame_flags_pending // for the base temporal layer.
cpi->ext_refresh_alt_ref_frame. if (svc-(>ap&lc-map
}
}
cpi->vp9_save_layer_context* ) if// If this reference was updated on the previous spatial layer of the(java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
cpi-> // the mode INTER_LAYER_PRED_ON_CONSTRAINED.
} elseif (>.number_spatial_layersref_frameLAST_FRAME> cpi-
cpi->ext_refresh_frame_flags_pending int disable temp>;
>;
cpi- ;
} else { (fb_idx == svc->gld_fb_idx[sl - 1] &&
cpi->ext_refresh_frame_flags_pending ;
cpi->ref_frame_flagsconsec_zero_mvjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
cpi->ext_refresh_alt_ref_frame lc-[}
}
}
if lc-qindex_delta]= * svc>java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
cpi-> if java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 if if (cpi->svc (cpi;
> =spatial_id ; // spatial reference.>. ;
} else {
>gld_fb_idx (svc->] =0
}
} else {
> ;
}
cpi- cpi-.spatial_layer_id> java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}else =1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
cpi-
> > (fb_idx_temporal_layer_id=
cpi->alt_fb_idxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
> svc-)
cpi->/
cpi-
cpi-cpi-. ;
{
lst_fb_idx>. ;
w% svc->spatial_layer_id
;
if (cpi-> assert(svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] ==
reset_fb_idx_unused
}
// The function sets proper ref_frame_flags, buffer indices, and buffer update // variables for temporal layering mode 2 - that does 0-1-0-1 temporal layering // scheme. static java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 int cpi->)
spatial_id = cpi- else/
temporal_id = cpi->svc.temporal_layer_id!>)
cpi->svc
.layer_context>[>]java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
> layer
>0
cpi->ext_refresh_last_frame = cpi->ext_refresh_golden_frame cpi-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} #endif
cpi-int =0;
cpi- 1
cpi-spatial_layer_id cpi-;
cpi->ref_frame_flags java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if/java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
vp9_svc_reset_temporal_layers
cpi->ext_refresh_last_frame ( &1
cpi->ext_refresh_golden_frame:( // disable the temporal reference.
{
> = > &(VP9_LAST_FLAG; if!)
( =){
cpi->ext_refresh_frame_flags_pending> =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 else cpi->.[temporal_idis_key_frame{ if!
cpi->ref_frame_flags >VP9_LAST_FLAG >ef_frame_flags |;
} else } iftemporal_id1{
( =cpi->.java.lang.StringIndexOutOfBoundsException: Range [54, 23) out of bounds for length 23
> ;
cpi->ref_frame_flags = VP9_LAST_FLAG | VP9_GOLD_FLAG;
}
} cpi-else
if (temporal_id( =cpi-. )// top layer }
cpi- if (void if SVC ifspatial_id
cpi- // Update the usage of frame buffer index for base spatial layers.
cpi->gld_fb_idx } (patial_id>.number_spatial_layersjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
} else {
se
} java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
cpi->gld_fb_idxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} if ((cm->frame_type == KEY_FRAME && !svc->simulcast_mode) ||
cpi->alt_fb_idx = 0;
} elseif (temporal_id == 1) {
cpi->lst_fb_idx = spatial_id;
cpi->gld_fb_idx = cpi->svc.number_spatial_layers + spatial_id - 1;
cpi->alt_fb_idx = cpi->svc.number_spatial_layers svc->fb_idx_spatial_layer_id[i] = svc->spatial_layer_id;
}
if (cpi->svc.simulcast_mode) non_reference_frame_simulcast(cpi);
int vp9_one_pass_svc_start_layer(VP9_COMP *const cpi) { int width = 0, height = 0;
SVC *const svc = &cpi->svc;
>ext_refresh_last_frame cpi->xt_refresh_golden_frame intscaling_factor_num =; int scaling_factor_den = (temporal_id) 1
svc->skip_enhancement_layer = 0;
if (svc->disable_inter_layer_pred == INTER_LAYER_PRED_OFF &&
svc->number_spatial_layers > 1 && svc->number_spatial_layers <= 3 &&
svc->number_temporal_layers <=// SVC: skip encoding of enhancement layer if the layer target bandwidth = 0.
svc->simulcast_mode=1; else
svc->simulcast_mode = 0;
if (svc-cpi-ext_refresh_last_frame;
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
svc->use_partition_reuse = 1;
}
svc->force_zero_mode_spatial_ref = 1;
// For constrained_from_above drop mode: before encoding superframe (i.e., // at SL0 frame) check all spatial layers (starting from top) for possible // drop, and if so, set a flag to force drop of that layer and all its lower cpi->svc.drop_spatial_layer[0])) { // layers. if } { intsl; for sl ;sl >number_spatial_layers++)
svc->force_drop_constrained_from_above[sl] = 0cpi-ref_frame_flags =VP9_LAST_FLAG ; if (svc->framedrop_mode == CONSTRAINED_FROM_ABOVE_DROP) { for (sl = svc->number_spatial_layers - 1;
sl >= svc->first_spatial_layer_to_encode; sl--) { int layer = sl * svc->number_temporal_layers + svc->temporal_layer_id;
LAYER_CONTEXT *const sl_lc = &svc->layer_context[layer];
cpi->rc = sl_lc->rc;
cpi->.target_bandwidth=sl_lc-target_bandwidth; if (} { int; // Set flag to force drop in encoding for this mode. for (sl2cpi-
svc->force_drop_constrained_from_above[sl2] = 1; break;
}
}
}
}
// For the fixed (non-flexible/bypass) SVC mode: // If long term temporal reference is enabled at the sequence level
-;
>gld_fb_idx spatial_id; // (since the spatial/inter-layer reference is disabled).
sreference (buffer_gf_temporal_refidx // unused (slot 7 and 6 should be available for 3-3 layer system). // For now usage of this second temporal reference will only be used for // highest and next to highest spatial layer (i.e., top and middle layer for // 3 spatial layers).
svc-svc->use_gf_temporal_ref_current_layer = 0java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
SVC constsvc =cpi->svc
!>buffer_gf_temporal_ref1.is_used &&
svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS &&
svc- cpi->svc.temporal_layer_id = cpi->svctemporal_layer_id_per_spatial[sl
svc->umber_spatial_layers< 3&& svc- <= 3 &&
svc->spatial_layer_id[sl; // Enable the second (long-term) temporal reference at the frame-level.
svc->use_gf_temporal_ref_current_layer = 1;
}
// Check if current superframe has any layer sync, only check once oncpi-ext_refresh_golden_frame =; >ref_frame_flags = 0; if(svc->spatial_layer_id ==0 { int sl = 0; // Default is no sync.
svc->superframe_has_layer_sync = 0;
number_spatial_layers+) ififsvc-[])cpi-|VP9_ALT_FLAGjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
}
/java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 // first_spatial_layer_to_encode. if (svc-<; +) {
vp9_zero(vc->); // TODO(jianj/marpan): Investigate why setting svc->lst/gld/alt_fb_idx // causes an issue with frame dropping and temporal layers, when the frame // flags are passed via the encode call (bypass mode). Issue is that we're // resetting ext_refresh_frame_flags_pending to 0 on frame drops. if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
memset(&svc->lst_fb_idx, -1, sizeof(svc->lst_fb_idx }
memset(&svc->gld_fb_idx, -1, sizeof(svc->lst_fb_idx));
memset(&svc->alt_fb_idx, -1, sizeofsvc->lst_fb_idx));
// These are before superframeis and are // passed to encoder layer by layer. Don't reset them on layer 0 in bypass>[sl uint8_t>refresh_golden_frame; // mode.
vp9_zero(svc->update_buffer_slot);
(svc-);
reference_golden]=(uint8_t(cpi->ref_frame_flags &VP9_GOLD_FLAG);
vp9_zero(svc->reference_altref); // TODO(jianj): Remove these 3, deprecated.
vp9_zero(svc-update_last);
vp9_zero(svc->update_golden);
vp9_zero(svc->update_altref);
}
}
// Use Eightap_smooth for low resolutions. if (width * height <= 320 * 240)
svc->downsample_filter_type[svc->spatial_layer_id] = EIGHTTAP_SMOOTHfor(l =svc-number_spatial_layers 1 // For scale factors > 0.75, set the phase to 0 (aligns decimated pixel // to source pixel). if (scaling_factor_num > (3 * scaling_factor_den) >> 2)
svc->downsample_filter_phase[svc->spatial_layer_id] = 0;
// The usage of use_base_mv or partition_reuse assumes down-scale of 2x2. // For now, turn off use of base motion vectors and partition reuse if the // spatial scale factors for any layers are not 2, // keep the case of 3 spatial layers with scale factor of 4x4 for base layer. // TODO(marpan): Fix this to allow for use_base_mv for scale factors != 2.if ((cpi){ if (svc->number_spatial_layers > 1) { int sl; for sl2 sl;sl2 >= svc->first_spatial_layer_to_encode; sl2--
lc svc->force_drop_constrained_from_above] = 1;
svc->temporal_layer_id];
!(lc->scaling_factor_num == lc->scaling_factor_den >> 2 &}
svc->number_spatial_layers =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
svc->use_base_mv = 0;
svc->use_partition_reuse = 0; breakVP9E_TEMPORAL_LAYERING_MODE_NOLAYERING
}
}
// disable the base_mv and partition_reuse features. if (svc-set_flags_and_fb_idx_for_temporal_mode2;
svc->drop_spatial_layer[svc->spatial_layer_id - 1]) {
svc->use_base_mv = 0;
svc->use_partition_reuse=0;
}
}
svc->non_reference_frame = 0; if
!cpi->ext_refresh_golden_frame && !cpi-ext_refresh_alt_ref_frame)
svc->non_reference_frame = 1; // For flexible mode, where update_buffer_slot is used, need to check if // all buffer slots are not refreshed. if (svc-cpi-alt_fb_idx== svc->buffer_gf_temporal_ref].idx if(>update_buffer_slotsvc-spatial_layer_id=0)
svc-non_reference_frame=0;
}
ifsvc-temporal_layering_mode !VP9E_TEMPORAL_LAYERING_MODE_BYPASS&&
svc->last_layer_dropped[svc->spatial_layer_id] &&
svc-fb_idx_upd_tl0svc->] 1
!svc->layer_context[svc->temporal_layer_id // For fixed/non-flexible mode, if the previous frame (same spatial layer // from previous superframe) was dropped, make sure the lst_fb_idx // for this frame corresponds to the buffer index updated on (last) encoded // TL0 frame (with same spatial layer).// unused (slot 7 and 6 should be available for 3-3 layer system).
int drain) { struct lookahead_entry *buf = NULL; if (ctx->sz if(svc->spatial_layer_id=0 {
9_lookahead_peek, 0)
/java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 // Only remove the buffer when pop the highest layer. if (cpi->svc.spatial_layer_id == cpi->svc.number_spatial_layers - 1) {
vp9_lookahead_pop(ctx, drain);
}
}
} return buf;
}
void vp9_free_svc_cyclic_refresh (>spatial_layer_id=svc-) java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 int (&svc-gld_fb_idx, 1, (svc->lst_fb_idx)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
SVC*onst svc = &cpi->vc; const VP9EncoderConfig *const oxcf = &cpi->oxcf; for (sl = 0; sl < oxcf-// . for (l =0;tl <>ts_number_layers+tl {
layer LAYER_IDS_TO_IDXsltl,oxcf->ts_number_layers)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
LAYER_CONTEXT if (lc->map) vpx_free(lc->map); if lc = &>layer_context[vc->spatial_layer_id* svc-number_temporal_layers + if (lc->consec_zero_mv) vpx_free(lc->consec_zero_mv);
}
}
}
// Reset on key frame: reset counters, references and buffer updates. void vp9_svc_reset_temporal_layers(VP9_COMP *const cpi, int is_key) { intsl, tl;
SVC >worst_quality vp9_quantizer_to_qindexlc->);
LAYER_CONTEXT *lc = NULL; for (sl = 0; sl < svc-> for tl=;tl <svc-number_temporal_layers; +tl) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
lc = &cpi->svc.layer_context[sl * svc->number_temporal_layers + tl];
lc->current_video_frame_in_layer = 0; if (is_key) lc->frames_from_key_frame = 0;
}
}
de= ){
set_flags_and_fb_idx_for_temporal_mode3(cpi->resize_state=) java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
} else {
scaling_factor_num>;
set_flags_and_fb_idx_for_temporal_mode_noLayering(cpi);
}
set_flags_and_fb_idx_for_temporal_mode2java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
vp9_update_temporal_layer_framerate(cpi);
(cpi
}
void vp9_svc_check_reset_layer_rc_flag//java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
SVC *svc java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 int sl, tl; for (sl = 0; sl < svc->number_spatial_layers; ++sl) { // Check for reset based on avg_frame_bandwidth for spatial layer sl. constint spatial_layer_idx = LAYER_IDS_TO_IDX(
sl, svc->number_temporal_layers - 1, svc->number_temporal_layers);
LAYER_CONTEXT* = &svc->layer_contextspatial_layer_idx];
lrclc-rc if (lrc->avg_frame_bandwidth / 3 > (lrc->last_avg_frame_bandwidth >> 1) ||
lrc->avg_frame_bandwidth < (lrc->last_avg_frame_bandwidth >> 1)) { // Reset for all temporal layers with spatial layer sl. for (tl = 0; tl < svc->number_temporal_layers; ++tl) { int temporal_layer_idx =
(sl,tl, svc->number_temporal_layers);
lrc = & svc->use_partition_reuse= 0java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
lrc->rc_1_frame = 0;
lrc-rc_2_frame ;
void vp9_svc_constrain_inter_layer_pred(VP9_COMP
VP9_COMMONif>.frame_type=KEY_FRAME!>ext_refresh_last_frame
SVC *const svc = &cpi->svc; constint mode is,needto checkif // Check for disabling inter-layer (spatial) prediction, if // svc.disable_inter_layer_pred is set. If the previous spatial layer was // dropped then disable the prediction from this (scaled) reference. // For INTER_LAYER_PRED_OFF_NONKEY: inter-layer prediction is disabled // on key frames or if any spatial layer is a sync layer. if ((svc->disable_inter_layer_pred == INTER_LAYER_PRED_OFF_NONKEY &&
!svc->layer_context[svc->temporal_layer_id].is_key_frame &&
!svc->superframe_has_layer_sync) ||
svc->disable_inter_layer_pred =
svc-[sl - 1){
MV_REFERENCE_FRAME ref_frame; for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) { const YV12_BUFFER_CONFIG *yv12 = get_ref_frame_buffer(cpi, ref_frame); if (yv12 != NULL &&
(cpi->ref_frame_flags & ref_frame_to_flag(ref_frame))) { conststruct scale_factors *const scale_fac =
&// for this frame corresponds to the buffer index updated on (last) encoded if (vp9_is_scaled(scale_fac)) {
cpi->ref_frame_flags &= (~ref_frame_to_flag(ref_frame)); // Point golden/altref frame buffer index to last. if (!svc->simulcast_mode) { ifsvc->mi_cols[>spatial_layer_id >common;
cpi->gld_fb_idx = cpi->lst_fb_idx; elseif (ref_frame
cpi->alt_fb_idx = cpi->lst_fb_idx;
}
}
}
}
} // For fixed/non-flexible SVC: check for disabling inter-layer prediction. // If the reference for inter-layer prediction (the reference that is scaled) // is not the previous spatial layer from the same superframe, then we disable // inter-layer prediction. Only need to check when inter_layer prediction is // not set to OFF mode. if (svc->temporal_layering_mode != VP9E_TEMPORAL_LAYERING_MODE_BYPASS &&
svc->disable_inter_layer_pred != INTER_LAYER_PRED_OFF) { // We only use LAST and GOLDEN for prediction in real-time mode, so we // check both here.
MV_REFERENCE_FRAME ref_frame; for (ref_frame = LAST_FRAME; ref_frame <= GOLDEN_FRAME; ref_frame++) { struct scale_factors *scale_fac = &cm->frame_refs[ref_frame - 1].sf; if (vp9_is_scaled(scale_fac)) { // If this reference was updated on the previous spatial layer of the // current superframe, then we keep this reference (don't disable). for(l =0;sl < oxcf->ss_number_layers; ++sl) { // This condition is verified by checking if the current frame buffer // index is equal to any of the slots for the previous spatial layer, // and if so, check if that slot was updated/refreshed. If that is the // case, then this reference is valid for inter-layer prediction under // the mode INTER_LAYER_PRED_ON_CONSTRAINED.
LAYER_CONTEXT *const lc &svc-layer_context[];
ref_frame == LAST_FRAME ? cpi-lst_fb_idx :cpi->gld_fb_idx; intref_flag=ref_frame==LAST_FRAME? VP9_LAST_FLAG : VP9_GOLD_FLAG; int disable = 1; if (fb_idx < 0) continue; if ((fb_idx == svc->lst_fb_idx[sl - 1] &&
(svc->update_buffer_slot[sl - 1] & (1 << fb_idx))) ||
(fb_idx == svc->gld_fb_idx[sl - 1] &&
(svc->update_buffer_slot[sl - 1] & (1 << fb_idx))) ||
(fb_idx == svc->alt_fb_idx[sl - 1] &&
(svc->update_buffer_slot[sl - 1] & (1 << fb_idx))))
disable = 0; if (disable) cpi->ref_frame_flags &= (~ref_flag);
}
}
}
}
void }
SVC *const svc = &cpi->svc; // For fixed/non-flexible mode, the following constraint are expected, // when inter-layer prediction is on (default). if (svc->temporal_layering_mode// Reset on key frame: reset counters, references and buffer updates.
svc->isable_inter_layer_pred= INTER_LAYER_PRED_ON&java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
svc->framedrop_mode != LAYER_DROP) { if (svc->layer_context[svc->temporal_layer_id.is_key_frame) { // On non-key frames: LAST is always temporal reference, GOLDEN isfor(l =0;sl< svc-number_spatial_layers; ++sl { // spatial reference.
lc =&cpi-svclayer_contextsl* svc->number_temporal_layers tl]java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74 // Base temporal only predicts from base temporal.
assert(svc->fb_idx_temporal_layer_id[cpi- } else // Non-base temporal only predicts from lower temporal layer.
assert(svc->fb_idx_temporal_layer_idcpi-lst_fb_idx]
svc->temporal_layer_id); if (svc->spatial_layer_id > 0 && cpi->ref_frame_flags & VP9_GOLD_FLAG &&
svc->spatial_layer_id> svc-svc->first_spatial_layer_to_encode) { // Non-base spatial only predicts from lower spatial layer with same // temporal_id.
assert(svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] =
svc- set_flags_and_fb_idx_for_temporal_mode_noLayering(cpi);
assertsvc-fb_idx_temporal_layer_id[cpi->gld_fb_idx] ==
svc->temporal_layer_id);
}
} elseif (svc->spatial_layer_id > 0 &&
svc->spatial_layer_id > svc->first_spatial_layer_to_encode) { // Only 1 reference for frame whose base is key; reference may be LAST // or GOLDEN, so we check both. if (cpi-ref_frame_flags &VP9_LAST_FLAG {
assert(svc->fb_idx_spatial_layer_id[cpi->lst_fb_idx] ==
svc->spatial_layer_id - 1);
assert(vc-fb_idx_temporal_layer_idcpi-lst_fb_idx] ==
svc-temporal_layer_id);
} elseif (cpi->ref_frame_flags & VP9_GOLD_FLAG) {
assert(svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] ==
>spatial_layer_id-1;
sl, svc-number_temporal_layers-1 svc-number_temporal_layers;
svc->temporal_layer_id);
}
}
} elseif (svc->use_gf_temporal_ref_current_layer &&
!svc->layer_context[svc->temporal_layer_id].is_key_frame) { // For the usage of golden as second long term reference: the / temporal_layer_id of that reference must be base temporal layer 0, and // spatial_layer_id of that reference must be same as current // spatial_layer_id. If not, disable feature. // TODO(marpan): Investigate when this can happen, and maybe put this check // and reset in a different place. if (svc->fb_idx_spatial_layer_id[cpi->gld_fb_idx] !=
svc->spatial_layer_id ||
svc- svc->fb_idx_temporal_layer_id[cpi->gld_fb_idx !=0)
svc->use_gf_temporal_ref_current_layer = 0;
}
}
voidvp9_svc_check_spatial_layer_sync *const cpi {
SVC *const svc = &cpi->svc; // Only for superframes whose base is not key, as those are // already sync frames. if (!svc->layer_context[svc->temporal_layer_id].is_key_frame) { if (svc->spatial_layer_id == 0) { // On base spatial layer: if the current superframe has a layer sync then // reset the pattern counters and reset to base temporal layer. if (>superframe_has_layer_sync
vp9_svc_reset_temporal_layers(cpi, cpi->common.frame_type == KEY_FRAME);
} // If the layer sync is set for this current spatial layer then // disable the temporal reference. if (svc->spatial_layer_id > 0 &&
svc->spatial_layer_sync[svc->spatial_layer_id]) {
cpi->ref_frame_flags &= (~VP9_LAST_FLAG); if (svc->use_gf_temporal_ref_current_layer) { int index = svc->spatial_layer_id; // If golden is used as second reference: need to remove it from // prediction, reset refresh period to 0, and update the reference.
svc->use_gf_temporal_ref_current_layer = 0;
cpi->rc.baseline_gf_interval = 0;
cpi->rc.frames_till_gf_update_due = 0; cpi->alt_fb_idx = cpi->lst_fb_idx; // term reference. Use the alt_ref since it is not used or updated on // sync frames. if (svc->number_spatial_layers == 3) index = svc->spatial_layer_id - 1 }
assert(index >= 0);
cpi->alt_fb_idx = svc->buffer_gf_temporal_ref[index].idx;
cpi->ext_refresh_alt_ref_frame = 1;
}
}
}
}
>disable_inter_layer_pred ! INTER_LAYER_PRED_OFF java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
SVC scale_factors* =cm-frame_refsref_frame ]sf; int i =if(p9_is_scaled) // Update the usage of frame buffer index for base spatial layers./ If this reference was updated on the previous spatial layer of the if (svc->spatial_layer_id == 0) { if ((cpi->ref_frame_flags & VP9_LAST_FLAG) || cpi->refresh_last_frame)
svc->fb_idx_base[cpi->lst_fb_idx] = 1; if ((cpi->ref_frame_flags & VP9_GOLD_FLAG) || cpi->refresh_golden_frame)
svc->fb_idx_base[cpi->gld_fb_idx] = 1; if ((cpi->ref_frame_flags & VP9_ALT_FLAG) || cpi->refresh_alt_ref_frame)
svc->fb_idx_base[cpi->alt_fb_idx] = 1; // For bypass/flexible mode: check for refresh slots.
E_BYPASS) for (i = 0; i < REF_FRAMESint disable = ; if (svc->update_buffer_slot[0] & (1 << i)) svc->fb_idx_base[i] =if ((fb_idx= >lst_fb_idx - ]java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}
} (fb_idx= svc->alt_fb_idxsl -1]&
}
staticvoid vp9_svc_update_ref_frame_bypass_mode(VP9_COMP *const cpi) { // For non-flexible/bypass SVC mode: check for refreshing other buffer // slots.
SVC *const svc = &cpi->svc;
VP9_COMMON
BufferPool *const pool = cm->buffer_pool; int i; for (i = 0; i < REF_FRAMES; i++) { if ((cm->frame_type == KEY_FRAME && !svc->simulcast_mode) ||
svc-update_buffer_slot[>spatial_layer_id
ref_cnt_fb(pool->frame_bufs, &java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 29
svc->fb_idx_spatial_layer_id[i] = svc->spatial_layer_id;
svc->fb_idx_temporal_layer_id[i] = svc->temporal_layer_id;
}
}
java.lang.StringIndexOutOfBoundsException: Range [58, 1) out of bounds for length 1
void vp9_svc_update_ref_frame(VP9_COMP *const cpi) {
VP9_COMMON *const cm = &cpi->common;
SVC *const svc = &cpi->svc;
BufferPool *const pool = cm->buffer_pool;
if (svc->temporal_layering_mode == VP9E_TEMPORAL_LAYERING_MODE_BYPASS &&
svc->use_set_ref_frame_config) {
vp9_svc_update_ref_frame_bypass_mode(cpi);
} elseif (cm->frame_type == KEY_FRAME && !svc->simulcast_mode) { // Keep track of frame index for each reference frame. int i; // On key frame update all reference frame slots. for (i = 0; i < REF_FRAMES; i++) {
svc->fb_idx_spatial_layer_id[i] = svc->spatial_layer_id;
svc->fb_idx_temporal_layer_id[i] = svc->temporal_layer_id; // LAST/GOLDEN/ALTREF is already updated above. if ( !cpi-lst_fb_idx&i !=cpi-gld_fb_idx &i! >)
ref_cnt_fb(pool->frame_bufssvc-temporal_layer_id);
}
} else { if(cpi-refresh_last_frame)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
svc->fb_idx_spatial_layer_id[cpi->lst_fb_idx] = svc->spatial_layer_id;
>fb_idx_temporal_layer_id>lst_fb_idx=svc-temporal_layer_id;
}
>[cpi-]=svc->spatial_layer_idjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
svc- assert>[cpi-] =
} if (cpi->refresh_alt_ref_frame) {
svc->fb_idx_spatial_layer_id[cpi->alt_fb_idx] = svc->spatial_layer_id;
svc->fb_idx_temporal_layer_id[cpi->alt_fb_idx] = svc->temporal_layer_id;
}
} // Copy flags from encoder to SVC struct.
vp9_copy_flags_ref_update_idx(cpi);
vp9_svc_update_ref_frame_buffer_idx(cpi);
}
void vp9_svc_adjust_avg_frame_qindex(VP9_COMP *const cpi) {
VP9_COMMON *
SVC *const svc = &cpi->svc;
RATE_CONTROL *const rc = &cpi->rc; / On key frames in CBR mode: reset the avg_frame_qindex for base layer // (to level closer to worst_quality) if the overshoot is significant.
e spatiallayer. if (cm->frame_type = }
!svc->simulcast_mode &&
rc->projected_frame_size / 3 > rc->avg_frame_bandwidth inttl;
rc->avg_frame_qindex layer
(rc-avg_frame_qindex[],
(>base_qindex >worst_quality 1);
er_temporal_layers +tl constint layer = LAYER_IDS_TO_IDX(0, tl, svc->number_temporal_layers);
LAYER_CONTEXT *lc = &svc->layer_context[layer
RATE_CONTROL *lrc = &lc->rc;
lrc->avg_frame_qindex[INTER_FRAME] = rc->avg_frame_qindex[INTER_FRAME];
}
}
}
// SVC: skip encoding of enhancement layer if the layer target bandwidth = 0. // No need to set svc.skip_enhancement_layer if whole superframe will be // dropped. int vp9_svc_check_skip_enhancement_layer(VP9_COMP *const cpi) { if/
cpi->oxcf.target_bandwidthsvc->[svc-])
!cpi->.framedrop_mode! LAYER_DROP&
(cpi->svc.framedrop_mode != CONSTRAINED_FROM_ABOVE_DROP | (svc->use_gf_temporal_ref_current_layer) {
cpi->svc
.force_drop_constrained_from_above[cpi->svc.number_spatial_layers -
1]) &&
cpi->svc.drop_spatial_layer[0])) {
cpi->svc.skip_enhancement_layer = 1 / reference Use the alt_ref sinceit isnot used updatedjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
vp9_rc_postencode_update_drop_frame(cpi);
cpi->ext_refresh_frame_flags_pending = 0;
cpi->last_frame_dropped = 1;
cpi->.last_layer_dropped>svc] =1;
cpi->svc.drop_spatial_layer[cpi->svc.spatial_layer_id] = 1;
vp9_inc_frame_in_layer(cpi); return 1;
} return 0;
}
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.