vp9/encoder/vp9_firstpass.c
// Used in corpus vbr: Calculates the total normalized group complexity score
// for a given number of frames starting at the current position in the stats
// file.
Used in corpus vbr: Calculates the total normalized group complexity score
for a given number of frames starting at the current position in the stats
file.
Used in corpus vbr : Calculates the total normalized group complexity score for a given number of frames starting at the current position in the stats file .
static double calculate_group_score(VP9_COMP *cpi, double av_score,
                                    int frame_count) {
  VP9EncoderConfig *const oxcf = &cpi->oxcf;
  TWO_PASS *const twopass = &cpi->twopass;
  const FIRSTPASS_STATS *s = twopass->stats_in;
  double score_total = 0.0;
  int i = 0;
  if (frame_count == 0) return 1.0;
  while ((i < frame_count) && (s < twopass->stats_in_end)) {
    score_total += calculate_norm_frame_score(cpi, twopass, oxcf, s, av_score);
    ++s;
    ++i;
  }
  assert(i == frame_count);
  return score_total;
}
static double calculate_group_score ( VP9_COMP * cpi , double av_score , int frame_count ) { VP9EncoderConfig * const oxcf = & cpi -> oxcf ; TWO_PASS * const twopass = & cpi -> twopass ; const FIRSTPASS_STATS * s = twopass -> stats_in ; double score_total = 0.0 ; int i = 0 ; if ( frame_count == 0 ) return 1.0 ; while ( ( i < frame_count ) && ( s < twopass -> stats_in_end ) ) { score_total += calculate_norm_frame_score ( cpi , twopass , oxcf , s , av_score ) ; ++ s ; ++ i ; } assert ( i == frame_count ) ; return score_total ; }
Used in corpus vbr: Calculates the total normalized group complexity score
for a given number of frames starting at the current position in the stats
file.
Used in corpus vbr : Calculates the total normalized group complexity score for a given number of frames starting at the current position in the stats file .
// We dont ever want to return a 0 score here.