Commit 72a62010 authored by Paul Wilkins's avatar Paul Wilkins Committed by Gerrit Code Review
Browse files

Merge "Added stricter Q control flag." into experimental

parents f4e383f3 db6ad013
......@@ -2845,7 +2845,15 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
cpi->active_best_quality * 15 / 16;
}
} else {
#ifdef ONE_SHOT_Q_ESTIMATE
#ifdef STRICT_ONE_SHOT_Q
cpi->active_best_quality = Q;
#else
cpi->active_best_quality = inter_minq[Q];
#endif
#else
cpi->active_best_quality = inter_minq[Q];
#endif
// For the constant/constrained quality mode we dont want
// q to fall below the cq level.
......
......@@ -31,6 +31,7 @@
// Experimental rate control switches
// #define ONE_SHOT_Q_ESTIMATE 1
// #define STRICT_ONE_SHOT_Q 1
// #define DISABLE_RC_LONG_TERM_MEM 1
// #define SPEEDSTATS 1
......
......@@ -120,11 +120,14 @@ int vp9_bits_per_mb(FRAME_TYPE frame_type, int qindex,
double q = vp9_convert_qindex_to_q(qindex);
if (frame_type == KEY_FRAME) {
enumerator = 4500000;
enumerator = 4000000;
} else {
enumerator = 2850000;
enumerator = 2500000;
}
// Q based adjustment to baseline enumberator
enumerator += (int)(enumerator * q) >> 12;
return (int)(0.5 + (enumerator * correction_factor / q));
}
......
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