Commit 970e9457 authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review

Merge changes I8eda5762,Ia2ffca07

* changes:
  Removing unused switchable_interp_count[] field from VP9_COMP.
  Using clamp() function instead of the same raw code.
parents b53113c3 0a74236b
......@@ -1933,12 +1933,9 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// Allocate bits to a normal frame that is neither a gf an arf or a key frame.
static void assign_std_frame_bits(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
int target_frame_size;
double modified_err;
double err_fraction;
// Max for a single frame.
int max_bits = frame_max_bits(cpi);
const int max_bits = frame_max_bits(cpi); // Max for a single frame.
// Calculate modified prediction error used in bit allocation.
modified_err = calculate_modified_err(cpi, this_frame);
......@@ -1954,15 +1951,8 @@ static void assign_std_frame_bits(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// Clip target size to 0 - max_bits (or cpi->twopass.gf_group_bits) at
// the top end.
if (target_frame_size < 0) {
target_frame_size = 0;
} else {
if (target_frame_size > max_bits)
target_frame_size = max_bits;
if (target_frame_size > cpi->twopass.gf_group_bits)
target_frame_size = (int)cpi->twopass.gf_group_bits;
}
target_frame_size = clamp(target_frame_size, 0,
MIN(max_bits, (int)cpi->twopass.gf_group_bits));
// Adjust error and bits remaining.
cpi->twopass.gf_group_error_left -= (int64_t)modified_err;
......
......@@ -739,9 +739,6 @@ typedef struct VP9_COMP {
int dummy_packing; /* flag to indicate if packing is dummy */
unsigned int switchable_interp_count[SWITCHABLE_FILTER_CONTEXTS]
[SWITCHABLE_FILTERS];
unsigned int tx_stepdown_count[TX_SIZES];
int initial_width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment