summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-06-18 10:50:38 -0700
committerJingning Han <jingning@google.com>2014-06-18 10:50:38 -0700
commit7c45dc98a8c80030c7f2994ab749d779b55b3047 (patch)
treeae856d1dc11a8823c8e97802db3a2ca8a8aaa903 /vp9/encoder
parentbf46feb379cdd672df6bc08ac84c9f40519b1016 (diff)
downloadlibvpx-7c45dc98a8c80030c7f2994ab749d779b55b3047.tar
libvpx-7c45dc98a8c80030c7f2994ab749d779b55b3047.tar.gz
libvpx-7c45dc98a8c80030c7f2994ab749d779b55b3047.tar.bz2
libvpx-7c45dc98a8c80030c7f2994ab749d779b55b3047.zip
Separate rate-distortion modeling for DC and AC coefficients
This is the first step to rework the rate-distortion modeling used in rtc coding mode. The overall goal is to make the modeling customized for the statistics encountered in the rtc coding. This commit makes encoder to perform rate-distortion modeling for DC and AC coefficients separately. No speed changes observed. The coding performance for pedestrian_area_1080p is largely improved: speed -5, from 79558 b/f, 37.871 dB -> 79598 b/f, 38.600 dB speed -6, from 79515 b/f, 37.822 dB -> 79544 b/f, 38.130 dB Overall performance for rtc set at speed -6 is improved by 0.67%. Change-Id: I9153444567e5f75ccdcaac043c2365992c005c0c
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_pickmode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 3f4fcd1e1..ed42a10d8 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -172,15 +172,15 @@ static void model_rd_for_sb_y(VP9_COMP *cpi, BLOCK_SIZE bsize,
else
x->skip_txfm = 0;
- // TODO(jingning) This is a temporary solution to account for frames with
- // light changes. Need to customize the rate-distortion modeling for non-RD
- // mode decision.
- if ((sse >> 3) > var)
- sse = var;
- vp9_model_rd_from_var_lapndz(var + sse, 1 << num_pels_log2_lookup[bsize],
- ac_quant >> 3, &rate, &dist);
- *out_rate_sum = rate;
+ vp9_model_rd_from_var_lapndz(sse - var, 1 << num_pels_log2_lookup[bsize],
+ dc_quant >> 3, &rate, &dist);
+ *out_rate_sum = rate >> 1;
*out_dist_sum = dist << 3;
+
+ vp9_model_rd_from_var_lapndz(var, 1 << num_pels_log2_lookup[bsize],
+ ac_quant >> 3, &rate, &dist);
+ *out_rate_sum += rate;
+ *out_dist_sum += dist << 4;
}
// TODO(jingning) placeholder for inter-frame non-RD mode decision.