Merge "Removing unused fields from twopass_rc struct."
This commit is contained in:
commit
a822a2a566
@ -1008,25 +1008,6 @@ void vp9_init_second_pass(VP9_COMP *cpi) {
|
|||||||
// This variable monitors how far behind the second ref update is lagging.
|
// This variable monitors how far behind the second ref update is lagging.
|
||||||
twopass->sr_update_lag = 1;
|
twopass->sr_update_lag = 1;
|
||||||
|
|
||||||
// Scan the first pass file and calculate an average Intra / Inter error
|
|
||||||
// score ratio for the sequence.
|
|
||||||
{
|
|
||||||
const FIRSTPASS_STATS *const start_pos = twopass->stats_in;
|
|
||||||
FIRSTPASS_STATS this_frame;
|
|
||||||
double sum_iiratio = 0.0;
|
|
||||||
|
|
||||||
while (input_stats(twopass, &this_frame) != EOF) {
|
|
||||||
const double iiratio = this_frame.intra_error /
|
|
||||||
DOUBLE_DIVIDE_CHECK(this_frame.coded_error);
|
|
||||||
sum_iiratio += fclamp(iiratio, 1.0, 20.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
twopass->avg_iiratio = sum_iiratio /
|
|
||||||
DOUBLE_DIVIDE_CHECK((double)stats->count);
|
|
||||||
|
|
||||||
reset_fpf_position(twopass, start_pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Scan the first pass file and calculate a modified total error based upon
|
// Scan the first pass file and calculate a modified total error based upon
|
||||||
// the bias/power function used to allocate bits.
|
// the bias/power function used to allocate bits.
|
||||||
{
|
{
|
||||||
@ -2149,8 +2130,6 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
|
|||||||
FIRSTPASS_STATS this_frame;
|
FIRSTPASS_STATS this_frame;
|
||||||
FIRSTPASS_STATS this_frame_copy;
|
FIRSTPASS_STATS this_frame_copy;
|
||||||
|
|
||||||
double this_frame_intra_error;
|
|
||||||
double this_frame_coded_error;
|
|
||||||
int target;
|
int target;
|
||||||
LAYER_CONTEXT *lc = NULL;
|
LAYER_CONTEXT *lc = NULL;
|
||||||
const int is_spatial_svc = (cpi->use_svc &&
|
const int is_spatial_svc = (cpi->use_svc &&
|
||||||
@ -2204,9 +2183,6 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
|
|||||||
if (EOF == input_stats(twopass, &this_frame))
|
if (EOF == input_stats(twopass, &this_frame))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this_frame_intra_error = this_frame.intra_error;
|
|
||||||
this_frame_coded_error = this_frame.coded_error;
|
|
||||||
|
|
||||||
// Keyframe and section processing.
|
// Keyframe and section processing.
|
||||||
if (rc->frames_to_key == 0 ||
|
if (rc->frames_to_key == 0 ||
|
||||||
(cpi->frame_flags & FRAMEFLAGS_KEY)) {
|
(cpi->frame_flags & FRAMEFLAGS_KEY)) {
|
||||||
@ -2261,9 +2237,6 @@ void vp9_rc_get_second_pass_params(VP9_COMP *cpi) {
|
|||||||
assign_std_frame_bits(cpi, &this_frame_copy);
|
assign_std_frame_bits(cpi, &this_frame_copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep a globally available copy of this and the next frame's iiratio.
|
|
||||||
twopass->this_iiratio = (int)(this_frame_intra_error /
|
|
||||||
DOUBLE_DIVIDE_CHECK(this_frame_coded_error));
|
|
||||||
{
|
{
|
||||||
FIRSTPASS_STATS next_frame;
|
FIRSTPASS_STATS next_frame;
|
||||||
if (lookup_next_frame_stats(twopass, &next_frame) != EOF) {
|
if (lookup_next_frame_stats(twopass, &next_frame) != EOF) {
|
||||||
|
@ -41,7 +41,6 @@ typedef struct {
|
|||||||
struct twopass_rc {
|
struct twopass_rc {
|
||||||
unsigned int section_intra_rating;
|
unsigned int section_intra_rating;
|
||||||
unsigned int next_iiratio;
|
unsigned int next_iiratio;
|
||||||
unsigned int this_iiratio;
|
|
||||||
FIRSTPASS_STATS total_stats;
|
FIRSTPASS_STATS total_stats;
|
||||||
FIRSTPASS_STATS this_frame_stats;
|
FIRSTPASS_STATS this_frame_stats;
|
||||||
const FIRSTPASS_STATS *stats_in;
|
const FIRSTPASS_STATS *stats_in;
|
||||||
@ -50,8 +49,6 @@ struct twopass_rc {
|
|||||||
FIRSTPASS_STATS total_left_stats;
|
FIRSTPASS_STATS total_left_stats;
|
||||||
int first_pass_done;
|
int first_pass_done;
|
||||||
int64_t bits_left;
|
int64_t bits_left;
|
||||||
int64_t clip_bits_total;
|
|
||||||
double avg_iiratio;
|
|
||||||
double modified_error_min;
|
double modified_error_min;
|
||||||
double modified_error_max;
|
double modified_error_max;
|
||||||
double modified_error_total;
|
double modified_error_total;
|
||||||
@ -72,7 +69,6 @@ struct twopass_rc {
|
|||||||
int64_t gf_group_bits;
|
int64_t gf_group_bits;
|
||||||
// Bits for the golden frame or ARF - 2 pass only
|
// Bits for the golden frame or ARF - 2 pass only
|
||||||
int gf_bits;
|
int gf_bits;
|
||||||
int alt_extra_bits;
|
|
||||||
|
|
||||||
int sr_update_lag;
|
int sr_update_lag;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user