summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2013-12-05 13:41:18 -0800
committerYaowu Xu <yaowu@google.com>2013-12-06 13:37:55 -0800
commitf8c06fb2accc4dfad363547a752a3be210ede0f8 (patch)
treed4cdd573dac0d876a2231d9d92af8bb1e615d802 /vp9/encoder/vp9_encodeframe.c
parent6df9ec52a08733af1117f271dc5b7773208860cd (diff)
downloadlibvpx-f8c06fb2accc4dfad363547a752a3be210ede0f8.tar
libvpx-f8c06fb2accc4dfad363547a752a3be210ede0f8.tar.gz
libvpx-f8c06fb2accc4dfad363547a752a3be210ede0f8.tar.bz2
libvpx-f8c06fb2accc4dfad363547a752a3be210ede0f8.zip
Disable early exit based on distortion in lossless
In lossless coding, distortion is always 0. Early exit based on this metric was incorrect. This CL also changed to use best_rd instead of distortion as the metric for easly exit as requested by Jim. Change-Id: I8ef3e407ac03b4abc3283b273f936a68fad5c2ab
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index f53c3c962..8dcec7937 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1640,7 +1640,8 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
}
sum_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_dist);
if (sum_rd < best_rd) {
- int64_t stop_thresh = 2048;
+ int64_t stop_thresh = 4096;
+ int64_t stop_thresh_rd;
best_rate = this_rate;
best_dist = this_dist;
@@ -1652,9 +1653,10 @@ static void rd_pick_partition(VP9_COMP *cpi, const TileInfo *const tile,
stop_thresh >>= 8 - (b_width_log2_lookup[bsize] +
b_height_log2_lookup[bsize]);
+ stop_thresh_rd = RDCOST(x->rdmult, x->rddiv, 0, stop_thresh);
// If obtained distortion is very small, choose current partition
// and stop splitting.
- if (this_dist < stop_thresh) {
+ if (!x->e_mbd.lossless && best_rd < stop_thresh_rd) {
do_split = 0;
do_rect = 0;
}