Merge commit '0b41eeac45fb7f7ad6d3f4fc846b00d108824b0b' into release/2.4
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Nov 2014 12:06:25 +0000 (13:06 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Nov 2014 12:06:25 +0000 (13:06 +0100)
* commit '0b41eeac45fb7f7ad6d3f4fc846b00d108824b0b':
  hevc_mvs: make sure to always initialize the temporal MV fully

Conflicts:
libavcodec/hevc_mvs.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/hevc_mvs.c

@@@ -416,15 -478,13 +416,11 @@@ static void derive_spatial_merge_candid
                                                         0, &mv_l1_col, 1) : 0;
  
          if (available_l0 || available_l1) {
 -            mergecandlist[nb_merge_cand].is_intra     = 0;
 -            mergecandlist[nb_merge_cand].pred_flag[0] = available_l0;
 -            mergecandlist[nb_merge_cand].pred_flag[1] = available_l1;
 +            mergecandlist[nb_merge_cand].pred_flag = available_l0 + (available_l1 << 1);
-             if (available_l0) {
-                 mergecandlist[nb_merge_cand].mv[0]      = mv_l0_col;
-                 mergecandlist[nb_merge_cand].ref_idx[0] = 0;
-             }
-             if (available_l1) {
-                 mergecandlist[nb_merge_cand].mv[1]      = mv_l1_col;
-                 mergecandlist[nb_merge_cand].ref_idx[1] = 0;
-             }
+             AV_ZERO16(mergecandlist[nb_merge_cand].ref_idx);
+             mergecandlist[nb_merge_cand].mv[0]      = mv_l0_col;
+             mergecandlist[nb_merge_cand].mv[1]      = mv_l1_col;
              if (merge_idx == nb_merge_cand)
                  return;
              nb_merge_cand++;
@@@ -488,10 -552,8 +484,8 @@@ void ff_hevc_luma_mv_merge_mode(HEVCCon
      LOCAL_ALIGNED(4, MvField, mergecand_list, [MRG_MAX_NUM_CANDS]);
      int nPbW2 = nPbW;
      int nPbH2 = nPbH;
 -    HEVCLocalContext *lc = &s->HEVClc;
 +    HEVCLocalContext *lc = s->HEVClc;
  
-     memset(mergecand_list, 0, MRG_MAX_NUM_CANDS * sizeof(*mergecand_list));
      if (s->pps->log2_parallel_merge_level > 2 && nCS == 8) {
          singleMCLFlag = 1;
          x0            = lc->cu.x;