lc->twopass.stats_in = lc->twopass.stats_in_start;
lc->twopass.stats_in_end =
lc->twopass.stats_in_start + packets_in_layer - 1;
+ fps_init_first_pass_info(&lc->twopass.first_pass_info,
+ lc->rc_twopass_stats_in.buf,
+ packets_in_layer);
stats_copy[layer_id] = lc->rc_twopass_stats_in.buf;
}
}
cpi->twopass.stats_in_start = oxcf->two_pass_stats_in.buf;
cpi->twopass.stats_in = cpi->twopass.stats_in_start;
cpi->twopass.stats_in_end = &cpi->twopass.stats_in[packets - 1];
+ fps_init_first_pass_info(&cpi->twopass.first_pass_info,
+ oxcf->two_pass_stats_in.buf, packets);
vp9_init_second_pass(cpi);
}
int group_noise_energy;
} GF_GROUP;
+typedef struct {
+ const FIRSTPASS_STATS *stats;
+ int num_frames;
+} FIRST_PASS_INFO;
+
+static INLINE void fps_init_first_pass_info(FIRST_PASS_INFO *first_pass_info,
+ const FIRSTPASS_STATS *stats,
+ int num_frames) {
+ first_pass_info->stats = stats;
+ first_pass_info->num_frames = num_frames;
+}
+
typedef struct {
unsigned int section_intra_rating;
unsigned int key_frame_section_intra_rating;
const FIRSTPASS_STATS *stats_in;
const FIRSTPASS_STATS *stats_in_start;
const FIRSTPASS_STATS *stats_in_end;
+ FIRST_PASS_INFO first_pass_info;
FIRSTPASS_STATS total_left_stats;
int first_pass_done;
int64_t bits_left;