Revision 5806e8cd libavcodec/h264_cabac.c
libavcodec/h264_cabac.c | ||
---|---|---|
722 | 722 |
int mb_type; |
723 | 723 |
|
724 | 724 |
if(intra_slice){ |
725 |
MpegEncContext * const s = &h->s; |
|
726 |
const int mba_xy = h->left_mb_xy[0]; |
|
727 |
const int mbb_xy = h->top_mb_xy; |
|
728 | 725 |
int ctx=0; |
729 |
if( h->slice_table[mba_xy] == h->slice_num && !IS_INTRA4x4( s->current_picture.mb_type[mba_xy] ) )
|
|
726 |
if( h->left_type[0] && !IS_INTRA4x4(h->left_type[0]))
|
|
730 | 727 |
ctx++; |
731 |
if( h->slice_table[mbb_xy] == h->slice_num && !IS_INTRA4x4( s->current_picture.mb_type[mbb_xy] ) )
|
|
728 |
if( h->top_type && !IS_INTRA4x4(h->top_type) )
|
|
732 | 729 |
ctx++; |
733 | 730 |
if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 ) |
734 | 731 |
return 0; /* I4x4 */ |
... | ... | |
806 | 803 |
int ctx = 0; |
807 | 804 |
|
808 | 805 |
/* No need to test for IS_INTRA4x4 and IS_INTRA16x16, as we set chroma_pred_mode_table to 0 */ |
809 |
if( h->slice_table[mba_xy] == h->slice_num && h->chroma_pred_mode_table[mba_xy] != 0 )
|
|
806 |
if( h->left_type[0] && h->chroma_pred_mode_table[mba_xy] != 0 )
|
|
810 | 807 |
ctx++; |
811 | 808 |
|
812 |
if( h->slice_table[mbb_xy] == h->slice_num && h->chroma_pred_mode_table[mbb_xy] != 0 )
|
|
809 |
if( h->top_type && h->chroma_pred_mode_table[mbb_xy] != 0 )
|
|
813 | 810 |
ctx++; |
814 | 811 |
|
815 | 812 |
if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+ctx] ) == 0 ) |
... | ... | |
1234 | 1231 |
fill_decode_neighbors(h, -(MB_FIELD)); |
1235 | 1232 |
|
1236 | 1233 |
if( h->slice_type_nos == FF_B_TYPE ) { |
1237 |
const int mba_xy = h->left_mb_xy[0]; |
|
1238 |
const int mbb_xy = h->top_mb_xy; |
|
1239 | 1234 |
int ctx = 0; |
1240 | 1235 |
assert(h->slice_type_nos == FF_B_TYPE); |
1241 | 1236 |
|
1242 |
if( h->slice_table[mba_xy] == h->slice_num && !IS_DIRECT( s->current_picture.mb_type[mba_xy] ) )
|
|
1237 |
if( !IS_DIRECT( h->left_type[0]-1 ) )
|
|
1243 | 1238 |
ctx++; |
1244 |
if( h->slice_table[mbb_xy] == h->slice_num && !IS_DIRECT( s->current_picture.mb_type[mbb_xy] ) )
|
|
1239 |
if( !IS_DIRECT( h->top_type-1 ) )
|
|
1245 | 1240 |
ctx++; |
1246 | 1241 |
|
1247 | 1242 |
if( !get_cabac_noinline( &h->cabac, &h->cabac_state[27+ctx] ) ){ |
Also available in: Unified diff