]> granicus.if.org Git - libvpx/commitdiff
Fix merge defects
authorYaowu Xu <yaowu@google.com>
Thu, 22 Oct 2015 19:18:52 +0000 (12:18 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 23 Oct 2015 01:25:41 +0000 (18:25 -0700)
This commit fixes the merge conflicts between master and nextgenv2 and
disable early termination in choose_tx_size() to avoid failure in test.

The test failures are pre-existing, some of the issue were fixed in
masterbase already, so will have another merge to introduce the fixes.

Change-Id: Ib71889661955e73aedbb4db49d8be70425281dcb

configure
vp10/common/blockd.h
vp10/common/entropymode.c
vp10/common/onyxc_int.h
vp10/encoder/encodemb.c
vp10/encoder/rdopt.c

index 5c0ed959ea4110e325671515c211a453c97dbc32..54816560e458ccb231be9c50b0078c1978e61adb 100755 (executable)
--- a/configure
+++ b/configure
@@ -267,6 +267,7 @@ EXPERIMENT_LIST="
     var_tx
     ext_tx
     misc_fixes
+    ext_intra
     universal_hp
 "
 CONFIG_LIST="
index 57c4321c136bbea4cf1d47cbfd63e60ed4b858f4..392b5d233fddf33a3928b7e5b4f94d9e48607a0f 100644 (file)
@@ -257,7 +257,7 @@ static INLINE TX_TYPE get_tx_type(PLANE_TYPE plane_type,
   const MB_MODE_INFO *const mbmi = &mi->mbmi;
 
 #if CONFIG_EXT_TX
-  if (xd->lossless || tx_size >= TX_32X32)
+  if ( xd->lossless[mbmi->segment_id] || tx_size >= TX_32X32)
     return DCT_DCT;
   if (mbmi->sb_type >= BLOCK_8X8) {
     if (plane_type == PLANE_TYPE_Y || is_inter_block(mbmi))
index d8874c5a9f1f55cbe6b49bf6a63f4c2cac42a34b..e2cecbfdd80ac27bb86b6a0141671e8ad70105d0 100644 (file)
@@ -973,6 +973,7 @@ void vp10_adapt_intra_frame_probs(VP10_COMMON *cm) {
 
 #if CONFIG_EXT_TX
   for (i = TX_4X4; i <= TX_16X16; ++i) {
+    int j;
     vpx_tree_merge_probs(vp10_tx_type_tree, pre_fc->inter_tx_type_prob[i],
                          counts->inter_tx_type[i], fc->inter_tx_type_prob[i]);
 
index aa62042263914e93d8e35d4ccd0c3539926d9f2a..681413377845485443bc767087852a4ec96fb70b 100644 (file)
@@ -379,14 +379,6 @@ static INLINE int frame_is_intra_only(const VP10_COMMON *const cm) {
   return cm->frame_type == KEY_FRAME || cm->intra_only;
 }
 
-static INLINE void set_partition_probs(const VP10_COMMON *const cm,
-                                       MACROBLOCKD *const xd) {
-  xd->partition_probs =
-      frame_is_intra_only(cm) ?
-          &vp10_kf_partition_probs[0] :
-          (const vpx_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
-}
-
 static INLINE void vp10_init_macroblockd(VP10_COMMON *cm, MACROBLOCKD *xd,
                                         tran_low_t *dqcoeff) {
   int i;
@@ -407,13 +399,6 @@ static INLINE void vp10_init_macroblockd(VP10_COMMON *cm, MACROBLOCKD *xd,
   xd->above_seg_context = cm->above_seg_context;
   xd->mi_stride = cm->mi_stride;
   xd->error_info = &cm->error;
-
-  set_partition_probs(cm, xd);
-}
-
-static INLINE const vpx_prob* get_partition_probs(const MACROBLOCKD *xd,
-                                                  int ctx) {
-  return xd->partition_probs[ctx];
 }
 
 static INLINE void set_skip_context(MACROBLOCKD *xd, int mi_row, int mi_col) {
index d37b5e80230ede2b42b120fc06633e80c6938732..5f0bc49d5d6d0165de8681f3a16f00a3008e3523 100644 (file)
@@ -1132,7 +1132,7 @@ void vp10_xform_quant_fp(MACROBLOCK *x, int plane, int block,
         break;
       case TX_4X4:
         vp10_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type,
-                                 xd->lossless);
+                                 xd->lossless[mbmi->segment_id]);
         vp10_highbd_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp,
                                 p->quant_fp, p->quant_shift, qcoeff, dqcoeff,
                                 pd->dequant, eob,
@@ -1220,7 +1220,7 @@ void vp10_xform_quant_dc(MACROBLOCK *x, int plane, int block,
         break;
       case TX_4X4:
         vp10_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type,
-                                 xd->lossless);
+                                 xd->lossless[xd->mi[0]->mbmi.segment_id]);
         vpx_highbd_quantize_dc(coeff, 16, x->skip_block, p->round,
                                p->quant_fp[0], qcoeff, dqcoeff,
                                pd->dequant[0], eob);
@@ -1592,7 +1592,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
   if (p->eobs[block] > 0) {
 #if CONFIG_VP9_HIGHBITDEPTH
     if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
-      if (xd->lossless) {
+      if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
         vp10_highbd_iwht4x4_add(dqcoeff, dst, pd->dst.stride,
                                 p->eobs[block], xd->bd);
       } else {
@@ -1602,7 +1602,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
       return;
     }
 #endif  // CONFIG_VP9_HIGHBITDEPTH
-    if (xd->lossless) {
+    if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
       vp10_iwht4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
     } else {
       vp10_idct4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
index 525e0345a7275da047afa3bea510012796dffec6..d0b2f6b1a875abbc4c42558312935fb58d27b2e9 100644 (file)
@@ -637,7 +637,8 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x,
 
   mbmi->tx_size = VPXMIN(max_tx_size, largest_tx_size);
 #if CONFIG_EXT_TX
-  if (is_inter_block(mbmi) && bs >= BLOCK_8X8 && !xd->lossless) {
+  if (is_inter_block(mbmi) && bs >= BLOCK_8X8 &&
+      !xd->lossless[mbmi->segment_id]) {
     for (tx_type = DCT_DCT; tx_type < TX_TYPES - 1; ++tx_type) {
       if (mbmi->tx_type >= DST_ADST && mbmi->tx_type < IDTX &&
           best_tx_type == DCT_DCT) {
@@ -666,7 +667,7 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x,
         this_rd = RDCOST(x->rdmult, x->rddiv, s1, psse);
       else
         this_rd = RDCOST(x->rdmult, x->rddiv, r + s0, d);
-      if (is_inter_block(mbmi) && !xd->lossless && !s)
+      if (is_inter_block(mbmi) && !xd->lossless[mbmi->segment_id] && !s)
         this_rd = VPXMIN(this_rd, RDCOST(x->rdmult, x->rddiv, s1, psse));
 
       if (this_rd < ((best_tx_type == DCT_DCT) ? ext_tx_th : 1) * best_rd) {
@@ -685,7 +686,7 @@ static void choose_largest_tx_size(VP10_COMP *cpi, MACROBLOCK *x,
 
 #if CONFIG_EXT_TX
   if (bs >= BLOCK_8X8 && mbmi->tx_size <= TX_16X16 &&
-      !xd->lossless && *rate != INT_MAX) {
+      !xd->lossless[mbmi->segment_id] && *rate != INT_MAX) {
     if (is_inter_block(mbmi))
       *rate += cpi->inter_tx_type_costs[mbmi->tx_size][mbmi->tx_type];
     else
@@ -758,7 +759,7 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x,
 
 #if CONFIG_EXT_TX
   start_tx_type = DCT_DCT;
-  if (bs >= BLOCK_8X8 && !xd->lossless)
+  if (bs >= BLOCK_8X8 && !xd->lossless[mbmi->segment_id])
     end_tx_type = TX_TYPES - 1;
   else
     end_tx_type = DCT_DCT;
@@ -791,7 +792,8 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x,
                        &sse, ref_best_rd, 0, bs, n,
                        cpi->sf.use_fast_coef_costing);
 #if CONFIG_EXT_TX
-      if (bs >= BLOCK_8X8 && !xd->lossless && r != INT_MAX && n < TX_32X32) {
+      if (bs >= BLOCK_8X8 && !xd->lossless[mbmi->segment_id] &&
+          r != INT_MAX && n < TX_32X32) {
         if (is_inter_block(mbmi))
           r += cpi->inter_tx_type_costs[n][mbmi->tx_type];
         else
@@ -817,11 +819,11 @@ static void choose_tx_size_from_rd(VP10_COMP *cpi, MACROBLOCK *x,
         rd = RDCOST(x->rdmult, x->rddiv, r + s0, d);
       }
 
-      if (is_inter_block(mbmi) && !xd->lossless && !s)
+      if (is_inter_block(mbmi) && !xd->lossless[mbmi->segment_id] && !s)
         rd = VPXMIN(rd, RDCOST(x->rdmult, x->rddiv, s1, sse));
 
       // Early termination in transform size search.
-      if (cpi->sf.tx_size_search_breakout &&
+      if (0 && cpi->sf.tx_size_search_breakout &&
           (rd== INT64_MAX ||
               (n < (int) max_tx_size && rd > last_rd) ||
               s == 1))