• Dmitry Kovalev's avatar
    Moving pass from VP9_COMP to VP9EncoderConfig. · 91c2f1e4
    Dmitry Kovalev authored
    We had a very complicated way to initialize cpi->pass from
    cfg->g_pass:
    switch (cfg->g_pass) {
      case VPX_RC_ONE_PASS:
        oxcf->mode = ONE_PASS_GOOD;
        break;
      case VPX_RC_FIRST_PASS:
        oxcf->mode = TWO_PASS_FIRST;
        break;
      case VPX_RC_LAST_PASS:
        oxcf->mode = TWO_PASS_SECOND_BEST;
        break;
    }
    
    cpi->pass = get_pass(oxcf->mode).
    
    Now pass is moved to VP9EncoderConfig and initialization is simple:
    switch (cfg->g_pass) {
      case VPX_RC_ONE_PASS:
        oxcf->pass = 0;
        break;
      case VPX_RC_FIRST_PASS:
        oxcf->pass = 1;
        break;
      case VPX_RC_LAST_PASS:
        oxcf->pass = 2;
        break;
    }
    
    Change-Id: I8f582203a4575f5e39b071598484a8ad2b72e0d9
    91c2f1e4
vp9_speed_features.c 15.3 KB