]> granicus.if.org Git - libvpx/commitdiff
Fix lossless coding
authorJingning Han <jingning@google.com>
Mon, 26 Oct 2015 19:32:30 +0000 (12:32 -0700)
committerJingning Han <jingning@google.com>
Mon, 26 Oct 2015 22:03:39 +0000 (22:03 +0000)
Use inter_block_yrd as rate-distortion optimization for lossless
coding. This fixes transform coefficient buffer swap use case and
resolves the unit test failure related to lossless coding.

Change-Id: I1512dab5ed5760c31f7de21a06e8d9ed1eb081fa

vp10/encoder/rdopt.c

index 738408454f0e7152c4b79687d629991dcd282ddf..e567d04c4f5e876386fb2f87ed3737c6675e10d1 100644 (file)
@@ -3483,7 +3483,7 @@ static int64_t handle_inter_mode(VP10_COMP *cpi, MACROBLOCK *x,
     // Y cost and distortion
     vp10_subtract_plane(x, bsize, 0);
 #if CONFIG_VAR_TX
-    if (cm->tx_mode == TX_MODE_SELECT) {
+    if (cm->tx_mode == TX_MODE_SELECT || xd->lossless[mbmi->segment_id]) {
       inter_block_yrd(cpi, x, rate_y, &distortion_y, &skippable_y, psse,
                       bsize, ref_best_rd);
     } else {