Merge commit '7d8154edd594981e7891d57de91f2260f8a62939'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 12:44:38 +0000 (13:44 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 12:44:38 +0000 (13:44 +0100)
* commit '7d8154edd594981e7891d57de91f2260f8a62939':
  h264: move intra4x4_pred_mode[_cache] into the per-slice context

Conflicts:
libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_mb.c
libavcodec/h264_mvpred.h
libavcodec/h264_slice.c
libavcodec/svq3.c

@@@ -427,11 -404,13 +427,13 @@@ void ff_h264_free_tables(H264Context *h
  int ff_h264_alloc_tables(H264Context *h)
  {
      const int big_mb_num = h->mb_stride * (h->mb_height + 1);
 -    const int row_mb_num = h->mb_stride * 2 * h->avctx->thread_count;
 +    const int row_mb_num = 2*h->mb_stride*FFMAX(h->avctx->thread_count, 1);
      int x, y, i;
  
 -    FF_ALLOCZ_OR_GOTO(h->avctx, h->intra4x4_pred_mode,
 -                      row_mb_num * 8 * sizeof(uint8_t), fail)
 +    FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->intra4x4_pred_mode,
 +                      row_mb_num, 8 * sizeof(uint8_t), fail)
+     h->slice_ctx[0].intra4x4_pred_mode = h->intra4x4_pred_mode;
      FF_ALLOCZ_OR_GOTO(h->avctx, h->non_zero_count,
                        big_mb_num * 48 * sizeof(uint8_t), fail)
      FF_ALLOCZ_OR_GOTO(h->avctx, h->slice_table_base,
Simple merge
Simple merge
Simple merge
@@@ -631,14 -631,9 +631,14 @@@ static av_always_inline void hl_decode_
              }
              for (i = 0; i < 16; i += 4) {
                  uint8_t *const ptr = dest_y + block_offset[i];
-                 const int dir      = h->intra4x4_pred_mode_cache[scan8[i]];
+                 const int dir      = sl->intra4x4_pred_mode_cache[scan8[i]];
                  if (transform_bypass && h->sps.profile_idc == 244 && dir <= 1) {
 -                    h->hpc.pred8x8l_add[dir](ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);
 +                    if (h->x264_build != -1) {
 +                        h->hpc.pred8x8l_add[dir](ptr, h->mb + (i * 16 + p * 256 << pixel_shift), linesize);
 +                    } else
 +                        h->hpc.pred8x8l_filter_add[dir](ptr, h->mb + (i * 16 + p * 256 << pixel_shift),
 +                                                        (h-> topleft_samples_available << i) & 0x8000,
 +                                                        (h->topright_samples_available << i) & 0x4000, linesize);
                  } else {
                      const int nnz = h->non_zero_count_cache[scan8[i + p * 16]];
                      h->hpc.pred8x8l[dir](ptr, (h->topleft_samples_available << i) & 0x8000,
Simple merge
Simple merge
Simple merge