die("Failed to initialize encoder\n");
#if OUTPUT_RC_STATS
+ rc.window_count = 1;
rc.window_size = 15; // Silence a static analysis warning.
+ rc.avg_st_encoding_bitrate = 0.0;
+ rc.variance_st_encoding_bitrate = 0.0;
if (svc_ctx.output_rc_stat) {
set_rate_control_stats(&rc, &enc_cfg);
framerate = enc_cfg.g_timebase.den / enc_cfg.g_timebase.num;
++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
layer_id.temporal_layer_id];
}
+ } else {
+ // For the fixed pattern SVC, temporal layer is given by superframe count.
+ unsigned int tl = 0;
+ if (enc_cfg.ts_number_layers == 2)
+ tl = (frame_cnt % 2 != 0);
+ else if (enc_cfg.ts_number_layers == 3) {
+ if (frame_cnt % 2 != 0) tl = 2;
+ if ((frame_cnt > 1) && ((frame_cnt - 2) % 4 == 0)) tl = 1;
+ }
+ for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl)
+ ++rc.layer_input_frames[sl * enc_cfg.ts_number_layers + tl];
}
vpx_usec_timer_start(&timer);
VP9E_TEMPORAL_LAYERING_MODE_BYPASS) {
int num_layers_encoded = 0;
for (sl = 0; sl < enc_cfg.ss_number_layers; ++sl) {
- ++rc.layer_input_frames[sl * enc_cfg.ts_number_layers +
- layer_id.temporal_layer_id];
sizes[sl] = 0;
if (cx_pkt->data.frame.spatial_layer_encoded[sl]) {
sizes[sl] = sizes_parsed[num_layers_encoded];