Lines Matching refs:cabac
2 * H.26L/H.264/AVC/JVT/14496-10/... cabac decoding
24 * H.264 / AVC / MPEG4 part10 cabac decoding.
31 #include "cabac.h"
1292 return get_cabac_noinline( &h->cabac, &(h->cabac_state+70)[ctx] );
1305 if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 )
1309 if( get_cabac_noinline( &h->cabac, state ) == 0 )
1313 if( get_cabac_terminate( &h->cabac ) )
1317 mb_type += 12 * get_cabac_noinline( &h->cabac, &state[1] ); /* cbp_luma != 0 */
1318 if( get_cabac_noinline( &h->cabac, &state[2] ) ) /* cbp_chroma */
1319 mb_type += 4 + 4 * get_cabac_noinline( &h->cabac, &state[2+intra_slice] );
1320 mb_type += 2 * get_cabac_noinline( &h->cabac, &state[3+intra_slice] );
1321 mb_type += 1 * get_cabac_noinline( &h->cabac, &state[3+2*intra_slice] );
1358 return get_cabac_noinline( &h->cabac, &h->cabac_state[11+ctx] );
1364 if( get_cabac( &h->cabac, &h->cabac_state[68] ) )
1367 mode += 1 * get_cabac( &h->cabac, &h->cabac_state[69] );
1368 mode += 2 * get_cabac( &h->cabac, &h->cabac_state[69] );
1369 mode += 4 * get_cabac( &h->cabac, &h->cabac_state[69] );
1387 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+ctx] ) == 0 )
1390 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+3] ) == 0 )
1392 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+3] ) == 0 )
1405 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]);
1407 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1;
1409 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 2;
1411 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 3;
1424 if( get_cabac_noinline( &h->cabac, &h->cabac_state[77 + ctx] ) == 0 )
1430 return 1 + get_cabac_noinline( &h->cabac, &h->cabac_state[77 + ctx] );
1434 if( get_cabac( &h->cabac, &h->cabac_state[21] ) )
1436 if( !get_cabac( &h->cabac, &h->cabac_state[22] ) )
1438 if( get_cabac( &h->cabac, &h->cabac_state[23] ) )
1444 if( !get_cabac( &h->cabac, &h->cabac_state[36] ) )
1446 if( !get_cabac( &h->cabac, &h->cabac_state[37] ) )
1447 return 1 + get_cabac( &h->cabac, &h->cabac_state[39] ); /* B_L0_8x8, B_L1_8x8 */
1449 if( get_cabac( &h->cabac, &h->cabac_state[38] ) ) {
1450 if( get_cabac( &h->cabac, &h->cabac_state[39] ) )
1451 return 11 + get_cabac( &h->cabac, &h->cabac_state[39] ); /* B_L1_4x4, B_Bi_4x4 */
1454 type += 2*get_cabac( &h->cabac, &h->cabac_state[39] );
1455 type += get_cabac( &h->cabac, &h->cabac_state[39] );
1477 while( get_cabac( &h->cabac, &h->cabac_state[54+ctx] ) ) {
1490 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+((amvd-3)>>(INT_BIT-1))+((amvd-33)>>(INT_BIT-1))+2])){
1491 // if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){
1498 while( mvd < 9 && get_cabac( &h->cabac, &h->cabac_state[ctxbase] ) ) {
1506 while( get_cabac_bypass( &h->cabac ) ) {
1515 mvd += get_cabac_bypass( &h->cabac )<<k;
1520 return get_cabac_bypass_sign( &h->cabac, -mvd );
1600 * map node ctx => cabac ctx for level=1 */
1602 /* map node ctx => cabac ctx for level>1 */
1630 cc.range = h->cabac.range;
1631 cc.low = h->cabac.low;
1632 cc.bytestream= h->cabac.bytestream;
1634 #define CC &h->cabac
1747 h->cabac.range = cc.range ;
1748 h->cabac.low = cc.low ;
1749 h->cabac.bytestream= cc.bytestream;
1783 if( get_cabac( &h->cabac, &h->cabac_state[get_cabac_cbf_ctx( h, cat, n, max_coeff, 1 ) ] ) == 0 ) {
1796 if (get_cabac(&h->cabac, &h->cabac_state[get_cabac_cbf_ctx(h, cat, n, max_coeff, 1)]) == 0) {
1805 if( (cat != 5 || CHROMA444) && get_cabac( &h->cabac, &h->cabac_state[get_cabac_cbf_ctx( h, cat, n, max_coeff, 0 ) ] ) == 0 ) {
1926 if( !get_cabac_noinline( &h->cabac, &h->cabac_state[27+ctx] ) ){
1928 }else if( !get_cabac_noinline( &h->cabac, &h->cabac_state[27+3] ) ) {
1929 mb_type= 1 + get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ); /* B_L[01]_16x16 */
1932 bits = get_cabac_noinline( &h->cabac, &h->cabac_state[27+4] ) << 3;
1933 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 2;
1934 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 1;
1935 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
1946 bits= ( bits<<1 ) + get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
1953 if( get_cabac_noinline( &h->cabac, &h->cabac_state[14] ) == 0 ) {
1955 if( get_cabac_noinline( &h->cabac, &h->cabac_state[15] ) == 0 ) {
1957 mb_type= 3 * get_cabac_noinline( &h->cabac, &h->cabac_state[16] );
1960 mb_type= 2 - get_cabac_noinline( &h->cabac, &h->cabac_state[17] );
1990 // FIXME The two following lines get the bitstream position in the cabac
1991 // decode, I think it should be done by a function in cabac.h (or cabac.c).
1992 ptr= h->cabac.bytestream;
1993 if(h->cabac.low&0x1) ptr--;
1995 if(h->cabac.low&0x1FF) ptr--;
1999 if ((int) (h->cabac.bytestream_end - ptr) < mb_size)
2003 ff_init_cabac_decoder(&h->cabac, ptr, h->cabac.bytestream_end - ptr);
2027 if( dct8x8_allowed && get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] ) ) {
2284 mb_type |= MB_TYPE_8x8DCT * get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] );
2324 if(get_cabac_noinline( &h->cabac, &h->cabac_state[60 + (h->last_qscale_diff != 0)])){
2329 while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) {
2333 av_log(h->s.avctx, AV_LOG_ERROR, "cabac decode of qscale diff failed at %d %d\n", s->mb_x, s->mb_y);