summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-10 22:35:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-10 22:37:35 +0200
commit3e56ae67d300f0eed2b9040fcc7c5e3229f0cde1 (patch)
tree4977c332470b4c7fc57c6a55c3663d8666b19e55 /libavcodec/h264.c
parent7258b5eb65d880e4f7c22ab68b0df3881b97b54f (diff)
avcodec/h264: Use FF_ALLOCZ_ARRAY_OR_GOTO()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 4b7ce9c7cb..69fb047d5a 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -431,8 +431,8 @@ int ff_h264_alloc_tables(H264Context *h)
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)
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,
@@ -441,10 +441,10 @@ int ff_h264_alloc_tables(H264Context *h)
big_mb_num * sizeof(uint16_t), fail)
FF_ALLOCZ_OR_GOTO(h->avctx, h->chroma_pred_mode_table,
big_mb_num * sizeof(uint8_t), fail)
- FF_ALLOCZ_OR_GOTO(h->avctx, h->mvd_table[0],
- 16 * row_mb_num * sizeof(uint8_t), fail);
- FF_ALLOCZ_OR_GOTO(h->avctx, h->mvd_table[1],
- 16 * row_mb_num * sizeof(uint8_t), fail);
+ FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->mvd_table[0],
+ row_mb_num, 16 * sizeof(uint8_t), fail);
+ FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->mvd_table[1],
+ row_mb_num, 16 * sizeof(uint8_t), fail);
FF_ALLOCZ_OR_GOTO(h->avctx, h->direct_table,
4 * big_mb_num * sizeof(uint8_t), fail);
FF_ALLOCZ_OR_GOTO(h->avctx, h->list_counts,
@@ -499,10 +499,10 @@ int ff_h264_context_init(H264Context *h)
int yc_size = y_size + 2 * c_size;
int x, y, i;
- FF_ALLOCZ_OR_GOTO(h->avctx, h->top_borders[0],
- h->mb_width * 16 * 3 * sizeof(uint8_t) * 2, fail)
- FF_ALLOCZ_OR_GOTO(h->avctx, h->top_borders[1],
- h->mb_width * 16 * 3 * sizeof(uint8_t) * 2, fail)
+ FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->top_borders[0],
+ h->mb_width, 16 * 3 * sizeof(uint8_t) * 2, fail)
+ FF_ALLOCZ_ARRAY_OR_GOTO(h->avctx, h->top_borders[1],
+ h->mb_width, 16 * 3 * sizeof(uint8_t) * 2, fail)
h->ref_cache[0][scan8[5] + 1] =
h->ref_cache[0][scan8[7] + 1] =