[FFmpeg-cvslog] Merge commit 'e3c9041cfe2e6526802255583d27abf9a921863e'

Clément Bœsch git at videolan.org
Tue Jun 21 11:29:45 CEST 2016


ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Tue Jun 21 10:28:14 2016 +0200| [dea0a2b69aefe2310bd92539dde596cc8fc195e2] | committer: Clément Bœsch

Merge commit 'e3c9041cfe2e6526802255583d27abf9a921863e'

* commit 'e3c9041cfe2e6526802255583d27abf9a921863e':
  h264: allocate some tables per slice contexts, not threads

Merged-by: Clément Bœsch <clement at stupeflix.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dea0a2b69aefe2310bd92539dde596cc8fc195e2
---

 libavcodec/h264.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9292168..067f132 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -180,7 +180,7 @@ 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 = 2*h->mb_stride*FFMAX(h->avctx->thread_count, 1);
+    const int row_mb_num = 2*h->mb_stride*FFMAX(h->nb_slice_ctx, 1);
     int x, y;
 
     FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->intra4x4_pred_mode,


======================================================================

diff --cc libavcodec/h264.c
index 9292168,efecabf..067f132
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@@ -180,11 -162,11 +180,11 @@@ 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 = 2*h->mb_stride*FFMAX(h->avctx->thread_count, 1);
 -    const int row_mb_num = h->mb_stride * 2 * h->nb_slice_ctx;
++    const int row_mb_num = 2*h->mb_stride*FFMAX(h->nb_slice_ctx, 1);
      int x, y;
  
 -    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,



More information about the ffmpeg-cvslog mailing list