Merge changes I8eda5762,Ia2ffca07

* changes:
  Removing unused switchable_interp_count[] field from VP9_COMP.
  Using clamp() function instead of the same raw code.
This commit is contained in:
Dmitry Kovalev 2014-01-14 14:46:07 -08:00 коммит произвёл Gerrit Code Review
Родитель b53113c3ca 0a74236bd4
Коммит 970e945795
2 изменённых файлов: 3 добавлений и 16 удалений

Просмотреть файл

@ -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;