[FFmpeg-cvslog] h264: allocate some tables per slice contexts, not threads
Anton Khirnov
git at videolan.org
Tue Jun 21 11:29:45 CEST 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Apr 13 17:31:27 2016 +0200| [e3c9041cfe2e6526802255583d27abf9a921863e] | committer: Anton Khirnov
h264: allocate some tables per slice contexts, not threads
This is more correct and avoids wasting space when frame threading is
used.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3c9041cfe2e6526802255583d27abf9a921863e
---
libavcodec/h264.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b8dfbf6..efecabf 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -162,7 +162,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 = h->mb_stride * 2 * h->avctx->thread_count;
+ const int row_mb_num = h->mb_stride * 2 * h->nb_slice_ctx;
int x, y;
FF_ALLOCZ_OR_GOTO(h->avctx, h->intra4x4_pred_mode,
More information about the ffmpeg-cvslog
mailing list