summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-17 12:24:16 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-17 12:26:09 +0100
commit3e5833802ec711b2ffde3137374170a650d67abc (patch)
tree483c8ab0338a69b61ddab4898ff9d2cb13b253af /libavcodec/h264.c
parentbb3c0571d31a2aef2556050127b7b5f99298b237 (diff)
parent136034d86b5cb1819a2c3e6ecdfeb05dcba7140d (diff)
Merge commit '136034d86b5cb1819a2c3e6ecdfeb05dcba7140d'
* commit '136034d86b5cb1819a2c3e6ecdfeb05dcba7140d': h264: Remove MotionEstContext and move the relevant fields to H264Context Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a9ed4f78db..1a96520ff9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -386,17 +386,13 @@ static int alloc_scratch_buffers(H264Context *h, int linesize)
// edge emu needs blocksize + filter length - 1
// (= 21x21 for h264)
h->edge_emu_buffer = av_mallocz(alloc_size * 2 * 21);
- h->me.scratchpad = av_mallocz(alloc_size * 2 * 16 * 2);
- if (!h->bipred_scratchpad || !h->edge_emu_buffer || !h->me.scratchpad) {
+ if (!h->bipred_scratchpad || !h->edge_emu_buffer) {
av_freep(&h->bipred_scratchpad);
av_freep(&h->edge_emu_buffer);
- av_freep(&h->me.scratchpad);
return AVERROR(ENOMEM);
}
- h->me.temp = h->me.scratchpad;
-
return 0;
}
@@ -1252,7 +1248,6 @@ static void free_tables(H264Context *h, int free_rbsp)
av_freep(&hx->bipred_scratchpad);
av_freep(&hx->edge_emu_buffer);
av_freep(&hx->dc_val_base);
- av_freep(&hx->me.scratchpad);
av_freep(&hx->er.mb_index2xy);
av_freep(&hx->er.error_status_table);
av_freep(&hx->er.er_temp_buffer);
@@ -1424,7 +1419,6 @@ static void clone_tables(H264Context *dst, H264Context *src, int i)
dst->cur_pic = src->cur_pic;
dst->bipred_scratchpad = NULL;
dst->edge_emu_buffer = NULL;
- dst->me.scratchpad = NULL;
ff_h264_pred_init(&dst->hpc, src->avctx->codec_id, src->sps.bit_depth_luma,
src->sps.chroma_format_idc);
}
@@ -1809,7 +1803,6 @@ static int decode_update_thread_context(AVCodecContext *dst,
memset(h->pps_buffers, 0, sizeof(h->pps_buffers));
memset(&h->er, 0, sizeof(h->er));
- memset(&h->me, 0, sizeof(h->me));
memset(&h->mb, 0, sizeof(h->mb));
memset(&h->mb_luma_dc, 0, sizeof(h->mb_luma_dc));
memset(&h->mb_padding, 0, sizeof(h->mb_padding));
@@ -3499,8 +3492,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
int needs_reinit = 0;
int field_pic_flag, bottom_field_flag;
- h->me.qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
- h->me.qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab;
+ h->qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
+ h->qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab;
first_mb_in_slice = get_ue_golomb_long(&h->gb);