ref: f01ad926d0b2b5c7f79f39f05168d6837cfd54a7
parent: 9f81a50c853c902f575dbff4f0e61db7ebfa12fa
author: Jingning Han <jingning@google.com>
date: Mon Dec 2 13:44:08 EST 2013
Fix intra prediction ref selection in skip_encode This commit fixes the intra prediction reference source selection in the settings of skip_encode. Use original boundary pixels as prediction reference, when the inverse transform and reconstruction are skipped in the per block size rate-distortion optimization loop. Change-Id: I36081aa30aa46e203e0e6f4e8a420fd08269469a
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -559,8 +559,9 @@
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 6;
vp9_predict_intra_block(xd, block, bwl, TX_32X32, mode,
- dst, pd->dst.stride, dst, pd->dst.stride);
-
+ x->skip_encode ? src : dst,
+ x->skip_encode ? p->src.stride : pd->dst.stride,
+ dst, pd->dst.stride);
if (!x->skip_recode) {
vp9_subtract_block(32, 32, src_diff, diff_stride,
src, p->src.stride, dst, pd->dst.stride);
@@ -582,7 +583,9 @@
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 4;
vp9_predict_intra_block(xd, block, bwl, TX_16X16, mode,
- dst, pd->dst.stride, dst, pd->dst.stride);
+ x->skip_encode ? src : dst,
+ x->skip_encode ? p->src.stride : pd->dst.stride,
+ dst, pd->dst.stride);
if (!x->skip_recode) {
vp9_subtract_block(16, 16, src_diff, diff_stride,
src, p->src.stride, dst, pd->dst.stride);
@@ -600,7 +603,9 @@
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
block >>= 2;
vp9_predict_intra_block(xd, block, bwl, TX_8X8, mode,
- dst, pd->dst.stride, dst, pd->dst.stride);
+ x->skip_encode ? src : dst,
+ x->skip_encode ? p->src.stride : pd->dst.stride,
+ dst, pd->dst.stride);
if (!x->skip_recode) {
vp9_subtract_block(8, 8, src_diff, diff_stride,
src, p->src.stride, dst, pd->dst.stride);
@@ -621,7 +626,9 @@
mode = plane == 0 ? mbmi->mode : mbmi->uv_mode;
vp9_predict_intra_block(xd, block, bwl, TX_4X4, mode,
- dst, pd->dst.stride, dst, pd->dst.stride);
+ x->skip_encode ? src : dst,
+ x->skip_encode ? p->src.stride : pd->dst.stride,
+ dst, pd->dst.stride);
if (!x->skip_recode) {
vp9_subtract_block(4, 4, src_diff, diff_stride,
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -786,7 +786,7 @@
sf->last_partitioning_redo_frequency = 3;
sf->use_uv_intra_rd_estimate = 1;
- sf->skip_encode_sb = 0;
+ sf->skip_encode_sb = 1;
sf->use_lp32x32fdct = 1;
sf->subpel_iters_per_step = 1;
sf->use_fast_coef_updates = 2;
@@ -819,7 +819,7 @@
sf->last_partitioning_redo_frequency = 3;
sf->use_uv_intra_rd_estimate = 1;
- sf->skip_encode_sb = 0;
+ sf->skip_encode_sb = 1;
sf->use_lp32x32fdct = 1;
sf->subpel_iters_per_step = 1;
sf->use_fast_coef_updates = 2;
--
⑨