Merge commit '4aa80808bcc2a30fcd7ce5b38594319df3a85b36'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Jul 2014 11:35:51 +0000 (13:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 28 Jul 2014 11:54:51 +0000 (13:54 +0200)
* commit '4aa80808bcc2a30fcd7ce5b38594319df3a85b36':
  hevc: eliminate unnecessary cbf_c{b,r} arrays

Conflicts:
libavcodec/hevc.c

See: 77ef9fd1e938010600620c1d32cabd15e7d5b853
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/hevc.c

@@@ -859,11 -1233,10 +859,12 @@@ static int hls_cross_component_pred(HEV
  static int hls_transform_unit(HEVCContext *s, int x0, int y0,
                                int xBase, int yBase, int cb_xBase, int cb_yBase,
                                int log2_cb_size, int log2_trafo_size,
-                               int trafo_depth, int blk_idx, int *cbf_cb, int *cbf_cr)
+                               int trafo_depth, int blk_idx,
 -                              int cbf_cb, int cbf_cr)
++                              int *cbf_cb, int *cbf_cr)
  {
 -    HEVCLocalContext *lc = &s->HEVClc;
 +    HEVCLocalContext *lc = s->HEVClc;
 +    const int log2_trafo_size_c = log2_trafo_size - s->sps->hshift[1];
 +    int i;
  
      if (lc->cu.pred_mode == MODE_INTRA) {
          int trafo_size = 1 << log2_trafo_size;
@@@ -1081,34 -1335,18 +1082,35 @@@ static void set_deblocking_bypass(HEVCC
  static int hls_transform_tree(HEVCContext *s, int x0, int y0,
                                int xBase, int yBase, int cb_xBase, int cb_yBase,
                                int log2_cb_size, int log2_trafo_size,
-                               int trafo_depth, int blk_idx, int *base_cbf_cb, int *base_cbf_cr)
+                               int trafo_depth, int blk_idx,
 -                              int cbf_cb, int cbf_cr)
++                              int *base_cbf_cb, int *base_cbf_cr)
  {
 -    HEVCLocalContext *lc = &s->HEVClc;
 +    HEVCLocalContext *lc = s->HEVClc;
      uint8_t split_transform_flag;
 +    int cbf_cb[2];
 +    int cbf_cr[2];
      int ret;
  
 +    cbf_cb[0] = base_cbf_cb[0];
 +    cbf_cb[1] = base_cbf_cb[1];
 +    cbf_cr[0] = base_cbf_cr[0];
 +    cbf_cr[1] = base_cbf_cr[1];
 +
      if (lc->cu.intra_split_flag) {
 -        if (trafo_depth == 1)
 -            lc->tu.cur_intra_pred_mode = lc->pu.intra_pred_mode[blk_idx];
 +        if (trafo_depth == 1) {
 +            lc->tu.intra_pred_mode   = lc->pu.intra_pred_mode[blk_idx];
 +            if (s->sps->chroma_format_idc == 3) {
 +                lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[blk_idx];
 +                lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[blk_idx];
 +            } else {
 +                lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];
 +                lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[0];
 +            }
 +        }
      } else {
 -        lc->tu.cur_intra_pred_mode = lc->pu.intra_pred_mode[0];
 +        lc->tu.intra_pred_mode   = lc->pu.intra_pred_mode[0];
 +        lc->tu.intra_pred_mode_c = lc->pu.intra_pred_mode_c[0];
 +        lc->tu.chroma_mode_c     = lc->pu.chroma_mode_c[0];
      }
  
      lc->tt.cbf_luma = 1;