From: Yaowu Xu Date: Mon, 18 Nov 2013 22:44:38 +0000 (-0800) Subject: Fixed a bug in commit a4a5a210 X-Git-Tag: v1.4.0~3015^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e63aaf9ad1021d7a12f6a3e12ac32742ebbf7dbe;p=libvpx Fixed a bug in commit a4a5a210 Commit a4a5a210 enabled lossless coding, but the commit incorrectly disabled the usage of skip in encoder even when skip should be used. This commit make sure that skip is enabled even in lossless mode. Change-Id: I276954f952c6ac68f17a316ebc72f09001228a08 --- diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index e6ec21d50..e92beb33a 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -612,8 +612,9 @@ static void block_yrd_txfm(int plane, int block, BLOCK_SIZE plane_bsize, // TODO(jingning): temporarily enabled only for luma component rd = MIN(rd1, rd2); - if (!xd->lossless && plane == 0) - x->zcoeff_blk[tx_size][block] = rd1 > rd2 || !xd->plane[plane].eobs[block]; + if (plane == 0) + x->zcoeff_blk[tx_size][block] = !xd->plane[plane].eobs[block] || + (rd1 > rd2 && !xd->lossless); args->this_rate += args->rate; args->this_dist += args->dist;