ref: 583859d7395ca70c3b1ca0acc1258a720470a807
parent: 74c890b98ba0ee3b7bcb77ce2656cd5d17f6a80b
parent: 60f9cf29204bb798654939ae497d16c5376e5fb9
author: Marco Paniconi <marpan@google.com>
date: Mon Jun 25 14:30:18 EDT 2018
Merge "vp9: Fixes for lossless mode for real-time mode."
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -429,6 +429,7 @@
int thresh_low_motion = (cm->width < 720) ? 55 : 20;
cr->apply_cyclic_refresh = 1;
if (cm->frame_type == KEY_FRAME || cpi->svc.temporal_layer_id > 0 ||
+ is_lossless_requested(&cpi->oxcf) ||
(cpi->use_svc &&
cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame) ||
(!cpi->use_svc && rc->avg_frame_low_motion < thresh_low_motion &&
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2431,7 +2431,7 @@
}
x->skip = ctx->skip;
- x->skip_txfm[0] = mi->segment_id ? 0 : ctx->skip_txfm[0];
+ x->skip_txfm[0] = (mi->segment_id || xd->lossless) ? 0 : ctx->skip_txfm[0];
}
static void encode_b_rt(VP9_COMP *cpi, ThreadData *td,
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -2218,7 +2218,7 @@
// Skipping checking: test to see if this block can be reconstructed by
// prediction only.
- if (cpi->allow_encode_breakout) {
+ if (cpi->allow_encode_breakout && !xd->lossless) {
encode_breakout_test(cpi, x, bsize, mi_row, mi_col, ref_frame, this_mode,
var_y, sse_y, yv12_mb, &this_rdc.rate,
&this_rdc.dist, flag_preduv_computed);