av1/encoder/ratectrl.c
// Update the buffer level for higher temporal layers, given the encoded current
// temporal layer.
Update the buffer level for higher temporal layers, given the encoded current
temporal layer.
Update the buffer level for higher temporal layers given the encoded current temporal layer .
static void update_layer_buffer_level(SVC *svc, int encoded_frame_size) {
  const int current_temporal_layer = svc->temporal_layer_id;
  for (int i = current_temporal_layer + 1; i < svc->number_temporal_layers;
       ++i) {
    const int layer =
        LAYER_IDS_TO_IDX(svc->spatial_layer_id, i, svc->number_temporal_layers);
    LAYER_CONTEXT *lc = &svc->layer_context[layer];
    RATE_CONTROL *lrc = &lc->rc;
    lrc->bits_off_target +=
        (int)(lc->target_bandwidth / lc->framerate) - encoded_frame_size;
    lrc->bits_off_target =
        AOMMIN(lrc->bits_off_target, lrc->maximum_buffer_size);
    lrc->buffer_level = lrc->bits_off_target;
  }
}
static void update_layer_buffer_level ( SVC * svc , int encoded_frame_size ) { const int current_temporal_layer = svc -> temporal_layer_id ; for ( int i = current_temporal_layer + 1 ; i < svc -> number_temporal_layers ; ++ i ) { const int layer = LAYER_IDS_TO_IDX ( svc -> spatial_layer_id , i , svc -> number_temporal_layers ) ; LAYER_CONTEXT * lc = & svc -> layer_context [ layer ] ; RATE_CONTROL * lrc = & lc -> rc ; lrc -> bits_off_target += ( int ) ( lc -> target_bandwidth / lc -> framerate ) - encoded_frame_size ; lrc -> bits_off_target = AOMMIN ( lrc -> bits_off_target , lrc -> maximum_buffer_size ) ; lrc -> buffer_level = lrc -> bits_off_target ; } }
Update the buffer level for higher temporal layers, given the encoded current
temporal layer.
Update the buffer level for higher temporal layers given the encoded current temporal layer .
// Clip buffer level to maximum buffer size for the layer.