summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-04-13 17:31:27 +0200
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:25 +0200
commite3c9041cfe2e6526802255583d27abf9a921863e (patch)
treec75ccf52039dba5962dc9c30008ee8dfee5089ac /libavcodec
parente0652795292223f8bc8e5bac019c1fca7323d23c (diff)
h264: allocate some tables per slice contexts, not threads
This is more correct and avoids wasting space when frame threading is used.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b8dfbf6874..efecabf8b6 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,