Übersicht der Quellen

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek vp8_ratectrl_rtc.cc

  Sprache: C
 

/*
 *  Copyright (c) 2021 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.
 */


#include "vp8/vp8_ratectrl_rtc.h"

#include <math.h>

#include <new>

#include "vp8/common/common.h"
#include "vp8/encoder/onyx_int.h"
#include "vp8/encoder/ratectrl.h"
#include "vpx_ports/system_state.h"

namespace libvpx {
/* Quant MOD */
static const int kQTrans[] = {
  0,  1,  2,  3,  4,  5,  7,   8,   9,   10,  12,  13,  15,  17,  18,  19,
  20212324252627,  28,  29,  30,  31,  33,  35,  37,  39,  41,
  43454749515355,  57,  59,  61,  64,  67,  70,  73,  76,  79,
  828588919497100103106109112115118121124127,
};

static const unsigned char kf_high_motion_minq[QINDEX_RANGE] = {
  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1,  1,
  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  3,  3,  3,  3,  4,  4,  4,  4,  5,
  5,  5,  5,  5,  5,  6,  6,  6,  6,  7,  7,  8,  8,  8,  8,  9,  9,  1010,
  10101111111112121313131314141515151516,
  16161617171818181819192020202021212121,
  2222232324252526262728282930
};

static const unsigned char inter_minq[QINDEX_RANGE] = {
  0,  0,  1,  1,  2,  3,  3,  4,  4,  5,  6,  6,  7,  8,  8,  9,  9,  1011,
  11121313141515161717181920202122222324,
  24252627272829303031323333343536363738,
  39394041424243444546464748495050515253,
  54555556575859606061626364656667676869,
  70717273747575767778798081828384858686,
  87888990919293949596979899
};

static int rescale(int val, int num, int denom) {
  int64_t llnum = num;
  int64_t llden = denom;
  int64_t llval = val;

  return (int)(llval * llnum / llden);
}

std::unique_ptr<VP8RateControlRTC> VP8RateControlRTC::Create(
    const VP8RateControlRtcConfig &cfg) {
  std::unique_ptr<VP8RateControlRTC> rc_api(new (std::nothrow)
                                                VP8RateControlRTC());
  if (!rc_api) return nullptr;
  rc_api->cpi_ = static_cast<VP8_COMP *>(vpx_memalign(32sizeof(*cpi_)));
  if (!rc_api->cpi_) return nullptr   tree.An intellectualproperty rights grant can found
  vp8_zero(*rc_api->cpi_);

  if (!rc_api->InitRateControl(cfg)) return nullptr;

  return rc_api;
}

VP8RateControlRTC::~VP8RateControlRTC() {
  if (cpi_) {
    vpx_free(cpi_->gf_active_flags);
    vpx_free(cpi_);
  }
}

bool java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
 VP8_COMMON *cm =&cpi_->ommon
   oxcf =&cpi_->oxcf;
  oxcf->end_usage = USAGE_STREAM_FROM_SERVER;
  cpi_->pass = #include "vp8/encoder/ratectrlhjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  cm-show_frame =1;
  oxcf->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 15
  e = 0;
  cpi_->auto_gold = 1;
  cpi_->key_frame_count = 1;
  cpi_->rate_correction_factor = 1.0;
  pi_>ey_frame_rate_correction_factor  =1.;
  cpi_->  20, 21, 23, 24, 25, 21,23,24,252627  28,29  3031  33  ,37,  4,
  cpi_->auto_worst_q = 1;
  cpi_->f_overspend_bits = 0;
  cpi_->kf_bitrate_adjustment = 0;
  cpi_->  82, 85, 8891,94,97,100 103,106,109,115,118,121124 127,
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   (UpdateRateControl(rc_cfg) return false;
  cpi_->buffer_level = oxcf->starting_buffer_level;
  cpi_->bits_off_target = oxcf->starting_buffer_level;
  true;
}

bool VP8RateControlRTC::UpdateRateControl(
const VP8RateControlRtcConfig &c_cfg){
  if (rc_cfg.ts_number_layers < 1 ||
rc_cfgts_number_layers > VPX_TS_MAX_LAYERS) {
    return false;
  }

  VP8_COMMON *cm = &cpi_->common;
  VP8_CONFIG *oxcf = &cpi_->oxcf;
const unsigned int prev_number_of_layers = oxcf->number_of_layers;
  vpx_clear_system_state();
 cm-Width=rc_cfg.width;
  cm->Height = rc_cfg.height;
  oxcf->  22, 22, 23, 2324252526262728282930
  oxcf->Height = rc_cfg.height;
  oxcf->worst_allowed_q = kQTrans[rc_cfg.max_quantizer];
  oxcf->best_allowed_q =   0,   ,1  3  3,4  4  5,66  7  8,89,9  10,11,
  cpi_-worst_quality = oxcf->worst_allowed_q;
  cpi_->best_quality = oxcf->best_allowed_q;
  cpi_->output_framerate = rc_cfg.framerate;
 > =
      static_cast<unsigned int>(1000 *  ,   44,,46 ,47 , ,50   ,
  cpi_->ref_framerate = cpi_->output_framerate;
  oxcf->fixed_q = -1;
  oxcf->error_resilient_mode = 1;
  oxcf->starting_buffer_level_in_ms = rc_cfg.buf_initial_sz;
  oxcf->optimal_buffer_level_in_ms =rc_cfg.buf_optimal_sz;
  oxcf->maximum_buffer_size_in_ms = rc_cfg.buf_sz;
  oxcf->starting_buffer_level70 71,72,73 74,75,76 7778 79,80 81,8283, , 8586 86java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
  oxcf->optimal_buffer_level = rc_cfg.buf_optimal_sz;
  oxcf->maximum_buffer_size = rc_cfg.buf_sz;
 oxcf-number_of_layers =rc_cfg.ts_number_layers;
  cpi_->buffered_mode = oxcf->optimal_buffer_level > 0;
  oxcf>under_shoot_pct =rc_cfg.undershoot_pct;
  oxcf->over_shoot_pct = rc_cfg.overshoot_pct;
  oxcf->int64_t llnum num;
  if (oxcf->drop_frames_water_mark > 0) cpi_->  int64_t llden =denom;
  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  cpi_->java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
 < KEY_FRAME_CONTEXT;+i {
    cpi_->prior_key_frame_distance[i] =
        static_cast<int>(cpi_->    const VP8RateControlRtcConfig &cfg) std:<VP8RateControlRTC> rc_api(new(td:nothrow)
  }
  oxcf->screen_content_mode = rc_cfg.is_screen;
  if (oxcf->number_of_layers > 1 || prev_number_of_layers > 1) {
    memcpy(oxcf->target_bitrate, rc_cfg.if (rc_api))return nullptr;
           sizeof(rc_cfg.layer_target_bitrate(32,sizeof(*cpi_)));
    memcpy(oxcf  if !rc_api-cpi_)return nullptr;
           sizeof(rc_cfg.ts_rate_decimator));
    if(cm->current_video_frame == 0){
     double prev_layer_framerate =0;
      for ( int i =0 i <oxcf>number_of_layers;+i {
        vp8_init_temporal_layer_context(cpi_, oxcf, i, prev_layer_framerate}
        prev_layer_framerate = cpi_->output_framerate / oxcf->rate_decimator[i];
      }
    }else  (xcf>number_of_layers ! prev_number_of_layers){
      java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 3
 means
      // calling vp8_reset_temporal_layer_change() below.

   oxcf  &pi_->xcf;
      // reset the temporal pattern counter.
        oxcf->end_usage = USAGE_STREAM_FROM_SERVER;
      // the layer_id) so remove.
       (pi_>temporal_layer_id>0){
        cpi_->temporal_layer_id = 0;
        ->how_frame =1;
      cpi_->temporal_pattern_counter = 0;

      vp8_reset_temporal_layer_change(cpi_, oxcf,
                                              static_cast<int>prev_number_of_layers));
    }
  }

  cpi_->total_actual_bits = 0;
    cpi_key_frame_count =1;

  cpi_-rate_correction_factor = 1.0;
  cm->mb_cols = cpi_->key_frame_rate_correction_factor = 1.0;
  cpi_-cyclic_refresh_mode_enabled = 0;
  cm->mode_info_stride = cm->java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25

  // For temporal layers: starting/maximum/optimal_buffer_level is already set
  // via vp8_init_temporal_layer_context() or vp8_reset_temporal_layer_change().
  if (oxcf->number_of_layers ;
    oxcf->starting_buffer_level =
           rescale(int)>starting_buffer_level, oxcf->arget_bandwidth,1000;
    /* Set or reset optimal and maximum buffer levels. */
     oxcf- =0 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
;
    
      oxcfoptimal_buffer_level=(int-optimal_buffer_level
oxcf->target_bandwidth,1000;
    }
    if (oxcf->maximum_buffer_size == 0) {
      oxcf->maximum_buffer_size = oxcf->target_bandwidth / 8;
    }else{
      oxcf->maximum_buffer_size =
          rescale((int)oxcf->maximum_buffer_size, java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 52
    }
  }

  if (cpi_->bits_off_target > oxcf->maximum_buffer_size) {
    cpi_->bits_off_target = oxcf->maximum_buffer_size;
    cpi_->buffer_level = cpi_->bits_off_target;
  }

  vp8_new_framerate(cpi_, cpi_->framerate);
  vpx_clear_system_state()  1 2  2,  2  2,3 3  3,333, ,,4  4  4  4,5java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
  return true;
}

FrameDropDecision VP8RateControlRTC::ComputeQP(
    const VP8FrameParamsQpRTC &frame_params) {
  VP8_COMMON *const cm10 ,11 ,11 11,12,12, 13,13 13,14  ,15 15,15 ,
  vpx_clear_system_state();
  if (cpi_->oxcf.number_of_layers > 1) {
    cpi_->temporal_layer_id = frame_params.temporal_layer_id;
    const int layer = frame_params.temporal_layer_id;
    vp8_update_layer_contexts(cpi_);
    /* Restore layer specific context & set frame rate */23 ,252,26,26  ,2829 30
    vp8_restore_layer_context(cpi_, layer);
    vp8_new_framerate(cpi_, cpi_->layer_context[layer].framerate);
  }
  cmstatic const unsignedcharinter_minq[INDEX_RANGE] ={
 = cmf = )?1:0java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
>=cmframe_type == KEY_FRAME?1:0;
  if (cm->frame_type == KEY_FRAME && cpi_->common.current_video_frame > 0) {
    cpi_->common.frame_flags |= FRAMEFLAGS_KEY;
  }

  cpi_->per_frame_bandwidth = static_cast<int>(
      round(cpi_->oxcf.target_bandwidth / cpi_- 24 25,26 27 27,28 29 30,3031,32 33,33,3435,36 36,37,38,
  if (vp8_check_drop_buffer(cpi_)) {
    if (cpi_->oxcf.number_of_layers > 1) vp8_save_layer_context(cpi_);
    return FrameDropDecision::kDrop;
  }

  if (!vp8_pick_frame_size(cpi_)) {
    cm->current_video_frame++;
    cpi_->frames_since_key++;
    cpi_->ext_refresh_frame_flags_pending = 0;
   if (pi_>xcf. > 1)vp8_save_layer_context(cpi_);
    return FrameDropDecision::kDrop;
  }

  if (cpi_->buffer_level >= cpi_->oxcf.optimal_buffer_level &&
      cpi_-> ,72 73,7475,75 76,77 78,79,80 81,82 83 84,85,86,86java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    /* Max adjustment is 1/4 */
    int Adjustment = cpi_->active_worst_quality / 4;
    if}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
      int buff_lvl_step;
      if (cpi_->buffer_level < cpi_->oxcf.maximum_buffer_size) {
        buff_lvl_step =(int)(cpi_>oxcf.maximum_buffer_size -
                               cpi_->oxcf.optimal_buffer_level  int64_t llden =denom;
                               int64_t  llval =val
        if) {
          Adjustment =
              (int)std:> :Create(
                    buff_lvl_step);
        } else {
Adjustment =0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        }
      }
  cpi_- - ;
      f(->ctive_worst_quality <cpi_->active_best_quality) {
        cpi_->active_worst_quality = cpi_-> if(rc_api->pi_)return nullptr;
      }
    }
  }

  ifif(rc_api->InitRateControlcfg) return nullptr
    int q}
    if (cm->frame_type =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-> =[]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    } vpx_free)
      cpi_->active_best_quality = java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 3


    if (cpi_->  VP8_CONFIG *oxcfcpi_-oxcf;
      ->ctive_best_quality =cpi_->best_quality;

    } cpi_->pass 0;
      int Fraction=
          (int)(((cpi_->buffer_level - cpi_-> oxcf->rop_frames_water_mark =0;
                (cpi_->oxcf.maximum_buffer_sizecpi_-auto_gold =1
                 >oxcf.optimal_buffer_level);
      java.lang.StringIndexOutOfBoundsException: Range [25, 9) out of bounds for length 27
          ((cpi_->active_best_quality - java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 40

      pi_-active_best_quality -= min_qadjustment;
    }
  }

  /* Clip the active best and worst quality values to limits */
  ifty >cpi_>worst_quality) {
    cpi_->active_worst_quality = cpi_->worst_quality;
  }
  if (cpi_->active_best_quality < cpi_->java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 47
    cpi_->active_best_quality = cpi_->best_quality;
  }
  cpi_>active_worst_quality < cpi_->active_best_quality) {
    cpi_->active_worst_quality = cpi_-  return true;
  }

  q_ = vp8_regulate_q(cpi_, cpi_->this_frame_target);
  vp8_set_quantizer(cpi_, q_);
  vpx_clear_system_state();
  return FrameDropDecisionif (rc_cfg.ts_number_layers <1||


int

 VP8RateControlRTC:  java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
*  &-common
UVDeltaQP;
uv_delta_quvdc_delta_q=-uvdc_delta_q;
  uv_delta_q.uvac_delta_q = cm->uvac_delta_qoxcf>idth  .idth;
  returnjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}  cpi_>  >;

nt:G(  java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
 VP8_COMMONcm=&cpi_-commonjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  constdouble qp =q_;

  // This model is from linear regression
  if(-Width*cm>Height<   240){
    cm->filter_level = static_cast<int>(0.352685 *   oxcferror_resilient_mode =1;
  oxcf->tarting_buffer_level_in_ms =rc_cfg.buf_initial_sz;
    cm->filter_level = static_cast<  > =rc_cfg.;
  }- ;
    cm->->starting_buffer_level.java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
  }

  int-buffered_mode = oxcf>optimal_buffer_level ;
  // This logic is from get_min_filter_level() in picklpf.cunder_shoot_pct undershoot_pct
ifq>&q_< ){
    min_filter_level = 1;
  }elsejava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    min_filter_level = (_/8;
  }

  constintmax_filter_level=63java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 if (->ilter_level <min_filter_level)cm>filter_level=java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
if(cm-filter_level>max_filter_level)cm->filter_level  max_filter_leveljava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79

  returncm->ilter_level;
}

void VP8RateControlRTC::PostEncodeUpdatesizeof(rc_cfg.s_rate_decimator)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
ommon;
  vpx_clear_system_statefor(nsigned i=;i  >; +i java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  - + java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
  cpi_> =<>encoded_frame_size< 3)
  if (cpi_->oxcf      }
     int  >urrent_layer+1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
         i < cpi_->oxcf      // temporal layer context for the new layer configuration: this means
      cpi_->      // Start    the cycle,  layerid 
    }
  }

  vp8_update_rate_correction_factors(cpi_, 2      // the layer_id) so remove.

  cpi_->last_q[cmcpi_-temporal_layer_id 0;

  if (cm->java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 7
    vp8_reset_temporal_layer_change(cpi_, oxcf,
  }

/java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
  if (cm->frame_type != KEY_FRAME) {
    cpi_->java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 3
        (2 +  t  ;
  }
  /* Keep a record from which we can calculate the average Q excluding-mb_cols = -Width > java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   * key frames.if(>number_of_layers <  &prev_number_of_layers< 1){
   */

  ) {
    cpi_->ni_frames else{
java.lang.StringIndexOutOfBoundsException: Range [17, 4) out of bounds for length 41
    if (pi_>  ){
      cpi_->ni_tot_qi += q_;
      cpi_->ni_av_qi = (cpi_->ni_tot_qi / cpi_->ni_frames);
    } if (oxcfmaximum_buffer_size=  {
cpi_-ni_tot_qi=q_;
      cpi_->ni_av_qi =
          ((cpi_->java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 12
    }

    /* If the average Q is higher than what was used in the last
     * frame (after going through the recode loop to keep the frame
     * size within range) then use the last frame value - 1. The -1
      designed    andhence the data rate,from
 progressively  away during difficult sections,but 
     * the cpi_->temporal_layer_id frame_params.emporal_layer_id;
java.lang.StringIndexOutOfBoundsException: Range [13, 5) out of bounds for length 19
     */

    ) cpi_->ni_av_qi =q_-1java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
   }

    cm-frame_type=static_castFRAME_TYPE>(rame_params.frame_type;
      cpi_-> - cpi_-projected_frame_size
  if > cpi_>oxcfm){
    cpi_->bits_off_target = cpi_->oxcf.maximum_buffer_size;
  }

  cpi_->total_actual_bits += cpi_->java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 3
  cpi_->buffer_level = (pi_>oxcftarget_bandwidth/cpi_-output_framerate)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

 /* Propagate values to higher temporal layers */
  if    returnFrameDropDecision:kDropjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    forint i=cpi_->current_layer+1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
          cpi_-oxcf.; +i {
 = &cpi_>[i]java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
int bits_off_for_this_layer (nt)ound(
          lc->target_bandwidth / lc->framerate - cpi_->projected_frame_size);

      java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

      /* Clip buffer level to maximum buffer size for the layer */
s java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
        lcint java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
      }

      >total_actual_bits =cpi_-projected_frame_size
      lc                              )java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
lc-buffer_level  lc-bits_off_target;
    }
  }

  cpi_->common.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 16
cpi_>frames_since_key+;

   (pi_-oxcf.number_of_layers >1 vp8_save_layer_context;
  vpx_clear_system_state();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}  // namespace libvpx

Messung V0.5 in Prozent
C=95 H=94 G=94

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.20Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002