Mercurial > libavcodec.hg
comparison h264_cabac.c @ 11166:5bd834bd759b libavcodec
Remove slice_table checks from decode_cabac_mb_cbp_luma() and set left/top_cbp so
these checks arent needed.
author | michael |
---|---|
date | Sun, 14 Feb 2010 02:08:48 +0000 |
parents | 1c3b1752d6d6 |
children | c163ffa8c59e |
comparison
equal
deleted
inserted
replaced
11165:0f74d7b5a49f | 11166:5bd834bd759b |
---|---|
865 } | 865 } |
866 | 866 |
867 static int decode_cabac_mb_cbp_luma( H264Context *h) { | 867 static int decode_cabac_mb_cbp_luma( H264Context *h) { |
868 int cbp_b, cbp_a, ctx, cbp = 0; | 868 int cbp_b, cbp_a, ctx, cbp = 0; |
869 | 869 |
870 cbp_a = h->slice_table[h->left_mb_xy[0]] == h->slice_num ? h->left_cbp : -1; | 870 cbp_a = h->left_cbp; |
871 cbp_b = h->slice_table[h->top_mb_xy] == h->slice_num ? h->top_cbp : -1; | 871 cbp_b = h->top_cbp; |
872 | 872 |
873 ctx = !(cbp_a & 0x02) + 2 * !(cbp_b & 0x04); | 873 ctx = !(cbp_a & 0x02) + 2 * !(cbp_b & 0x04); |
874 cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]); | 874 cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]); |
875 ctx = !(cbp & 0x01) + 2 * !(cbp_b & 0x08); | 875 ctx = !(cbp & 0x01) + 2 * !(cbp_b & 0x08); |
876 cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1; | 876 cbp |= get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1; |