From: Jingning Han Date: Mon, 12 May 2014 17:55:14 +0000 (-0700) Subject: Tune minq index table for P frames in one_pass_cbr coding mode X-Git-Tag: v1.4.0~1588^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f96081a15093604f9eca116c9e7a9493db37253;p=libvpx Tune minq index table for P frames in one_pass_cbr coding mode Allow slightly larger minq-maxq range for P frames. This improves the compression performance of speed -5 for rtc set by 2.7% in psnr. Change-Id: I438653d52d0fe51111509c6092e2334bac2de0cf --- diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 0f4c4da13..124e926ec 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -48,6 +48,7 @@ static int kf_high_motion_minq[QINDEX_RANGE]; static int arfgf_low_motion_minq[QINDEX_RANGE]; static int arfgf_high_motion_minq[QINDEX_RANGE]; static int inter_minq[QINDEX_RANGE]; +static int rtc_minq[QINDEX_RANGE]; static int gf_high = 2000; static int gf_low = 400; static int kf_high = 5000; @@ -84,6 +85,7 @@ void vp9_rc_init_minq_luts() { arfgf_low_motion_minq[i] = get_minq_index(maxq, 0.0000015, -0.0009, 0.30); arfgf_high_motion_minq[i] = get_minq_index(maxq, 0.0000021, -0.00125, 0.50); inter_minq[i] = get_minq_index(maxq, 0.00000271, -0.00113, 0.90); + rtc_minq[i] = get_minq_index(maxq, 0.00000271, -0.00113, 0.70); } } @@ -549,14 +551,14 @@ static int rc_pick_q_and_bounds_one_pass_cbr(const VP9_COMP *cpi, // Use the lower of active_worst_quality and recent/average Q. if (cm->current_video_frame > 1) { if (rc->avg_frame_qindex[INTER_FRAME] < active_worst_quality) - active_best_quality = inter_minq[rc->avg_frame_qindex[INTER_FRAME]]; + active_best_quality = rtc_minq[rc->avg_frame_qindex[INTER_FRAME]]; else - active_best_quality = inter_minq[active_worst_quality]; + active_best_quality = rtc_minq[active_worst_quality]; } else { if (rc->avg_frame_qindex[KEY_FRAME] < active_worst_quality) - active_best_quality = inter_minq[rc->avg_frame_qindex[KEY_FRAME]]; + active_best_quality = rtc_minq[rc->avg_frame_qindex[KEY_FRAME]]; else - active_best_quality = inter_minq[active_worst_quality]; + active_best_quality = rtc_minq[active_worst_quality]; } }