aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-27 14:21:09 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:14 +0100
commit404a416d4b1fcbf9db5569481d8181f296c01ea9 (patch)
tree8cf1be8bf8b3aa19b5937d7bf732982b4672365f /libavcodec/h264.c
parent7bbc254d646ed9cf6deffc3fda75ae6729f95979 (diff)
downloadffmpeg-404a416d4b1fcbf9db5569481d8181f296c01ea9.tar.gz
h264: remove some remnants of data partitioning
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 13f3aa4eca..a2e3e0156f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -221,7 +221,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
{
int i, si, di;
uint8_t *dst;
- int bufidx;
// src[0]&0x80; // forbidden bit
h->nal_ref_idc = src[0] >> 5;
@@ -283,11 +282,9 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
return src;
}
- // use second escape buffer for inter data
- bufidx = h->nal_unit_type == NAL_DPC ? 1 : 0;
- av_fast_malloc(&h->rbsp_buffer[bufidx], &h->rbsp_buffer_size[bufidx],
+ av_fast_malloc(&h->rbsp_buffer, &h->rbsp_buffer_size,
length + FF_INPUT_BUFFER_PADDING_SIZE);
- dst = h->rbsp_buffer[bufidx];
+ dst = h->rbsp_buffer;
if (!dst)
return NULL;
@@ -394,10 +391,8 @@ void ff_h264_free_tables(H264Context *h, int free_rbsp)
av_freep(&hx->er.mbskip_table);
if (free_rbsp) {
- av_freep(&hx->rbsp_buffer[1]);
- av_freep(&hx->rbsp_buffer[0]);
- hx->rbsp_buffer_size[0] = 0;
- hx->rbsp_buffer_size[1] = 0;
+ av_freep(&hx->rbsp_buffer);
+ hx->rbsp_buffer_size = 0;
}
if (i)
av_freep(&h->thread_context[i]);
@@ -717,10 +712,8 @@ static int decode_init_thread_copy(AVCodecContext *avctx)
h->slice_ctx[i].h264 = h;
h->avctx = avctx;
- h->rbsp_buffer[0] = NULL;
- h->rbsp_buffer[1] = NULL;
- h->rbsp_buffer_size[0] = 0;
- h->rbsp_buffer_size[1] = 0;
+ h->rbsp_buffer = NULL;
+ h->rbsp_buffer_size = 0;
h->context_initialized = 0;
return 0;
@@ -1535,8 +1528,6 @@ again:
idr(h); // FIXME ensure we don't lose some frames if there is reordering
case NAL_SLICE:
init_get_bits(&hx->gb, ptr, bit_length);
- hx->intra_gb_ptr =
- hx->inter_gb_ptr = &hx->gb;
if ((err = ff_h264_decode_slice_header(hx, sl, h)))
break;