From cab8c5f8e140c96ba3725ab709d823abfd1e31a5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 11 Aug 2013 12:14:44 +0200 Subject: h264: do not reinitialize the global cabac tables at each slice header --- libavcodec/h264.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 274c738c5d..5ff55ceccb 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1548,6 +1548,8 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) ff_h264_decode_init_vlc(); + ff_init_cabac_states(); + h->pixel_shift = 0; h->sps.bit_depth_luma = avctx->bits_per_raw_sample = 8; @@ -4244,7 +4246,6 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) align_get_bits(&h->gb); /* init cabac */ - ff_init_cabac_states(); ff_init_cabac_decoder(&h->cabac, h->gb.buffer + get_bits_count(&h->gb) / 8, (get_bits_left(&h->gb) + 7) / 8); -- cgit v1.2.1