summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorDeb Mukherjee <debargha@google.com>2013-09-10 11:16:47 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-09-10 11:16:47 -0700
commit3d22d3ae0c77dbb529040aa7674a3799e201ba81 (patch)
treef930fcc18f6496c4df697c5c1d66a1f0c63c0d70 /vp9/encoder
parent0607abc3dd26e6782ad9577765f9aeef311b0de9 (diff)
parent09830aa0ea00b21abe38aafe1e05a5c7305fe763 (diff)
downloadlibvpx-3d22d3ae0c77dbb529040aa7674a3799e201ba81.tar
libvpx-3d22d3ae0c77dbb529040aa7674a3799e201ba81.tar.gz
libvpx-3d22d3ae0c77dbb529040aa7674a3799e201ba81.tar.bz2
libvpx-3d22d3ae0c77dbb529040aa7674a3799e201ba81.zip
Merge "Small tweaks on the constant quality mode"
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_onyx_if.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index d53d2f26f..f47025325 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2811,28 +2811,17 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
// TODO(debargha): Refine the logic below
if (cpi->oxcf.end_usage == USAGE_CONSTANT_QUALITY) {
if (!cpi->refresh_alt_ref_frame) {
- if (cpi->gfu_boost > high) {
- cpi->active_best_quality = cpi->cq_target_quality * 14 / 16;
- } else if (cpi->gfu_boost < low) {
- cpi->active_best_quality = cpi->cq_target_quality;
- } else {
- const int gap = high - low;
- const int offset = high - cpi->gfu_boost;
- const int qdiff = cpi->cq_target_quality * 2 / 16;
- const int adjustment = ((offset * qdiff) + (gap >> 1)) / gap;
- cpi->active_best_quality = cpi->cq_target_quality * 14 / 16
- + adjustment;
- }
+ cpi->active_best_quality = cpi->cq_target_quality;
} else {
if (cpi->frames_since_key > 1) {
if (cpi->gfu_boost > high) {
cpi->active_best_quality = cpi->cq_target_quality * 6 / 16;
} else if (cpi->gfu_boost < low) {
- cpi->active_best_quality = cpi->cq_target_quality * 10 / 16;
+ cpi->active_best_quality = cpi->cq_target_quality * 11 / 16;
} else {
const int gap = high - low;
const int offset = high - cpi->gfu_boost;
- const int qdiff = cpi->cq_target_quality * 4 / 16;
+ const int qdiff = cpi->cq_target_quality * 5 / 16;
const int adjustment = ((offset * qdiff) + (gap >> 1)) / gap;
cpi->active_best_quality = cpi->cq_target_quality * 6 / 16
+ adjustment;
@@ -2867,11 +2856,6 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
cpi->active_best_quality = cpi->cq_target_quality;
}
}
- /*
- if (cm->current_video_frame == 1)
- printf("q/active_best/worst_quality = %d %d %d\n",
- q, cpi->active_best_quality, cpi->active_worst_quality);
- */
}
// Clip the active best and worst quality values to limits
@@ -3394,7 +3378,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
// in this frame.
// update_base_skip_probs(cpi);
-#if 0 // CONFIG_INTERNAL_STATS
+#if CONFIG_INTERNAL_STATS
{
FILE *f = fopen("tmp.stt", cm->current_video_frame ? "a" : "w");
int recon_err;