Lines Matching refs:cabac
2 * H.26L/H.264/AVC/JVT/14496-10/... cabac decoding
24 * H.264 / AVC / MPEG4 part10 cabac decoding.
35 #include "cabac.h"
1291 return get_cabac_noinline( &h->cabac, &(h->cabac_state+70)[ctx] );
1304 if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 )
1308 if( get_cabac_noinline( &h->cabac, state ) == 0 )
1312 if( get_cabac_terminate( &h->cabac ) )
1316 mb_type += 12 * get_cabac_noinline( &h->cabac, &state[1] ); /* cbp_luma != 0 */
1317 if( get_cabac_noinline( &h->cabac, &state[2] ) ) /* cbp_chroma */
1318 mb_type += 4 + 4 * get_cabac_noinline( &h->cabac, &state[2+intra_slice] );
1319 mb_type += 2 * get_cabac_noinline( &h->cabac, &state[3+intra_slice] );
1320 mb_type += 1 * get_cabac_noinline( &h->cabac, &state[3+2*intra_slice] );
1356 return get_cabac_noinline( &h->cabac, &h->cabac_state[11+ctx] );
1362 if( get_cabac( &h->cabac, &h->cabac_state[68] ) )
1365 mode += 1 * get_cabac( &h->cabac, &h->cabac_state[69] );
1366 mode += 2 * get_cabac( &h->cabac, &h->cabac_state[69] );
1367 mode += 4 * get_cabac( &h->cabac, &h->cabac_state[69] );
1385 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+ctx] ) == 0 )
1388 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+3] ) == 0 )
1390 if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+3] ) == 0 )
1403 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]);
1405 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 1;
1407 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 2;
1409 cbp += get_cabac_noinline(&h->cabac, &h->cabac_state[73 + ctx]) << 3;
1422 if( get_cabac_noinline( &h->cabac, &h->cabac_state[77 + ctx] ) == 0 )
1428 return 1 + get_cabac_noinline( &h->cabac, &h->cabac_state[77 + ctx] );
1432 if( get_cabac( &h->cabac, &h->cabac_state[21] ) )
1434 if( !get_cabac( &h->cabac, &h->cabac_state[22] ) )
1436 if( get_cabac( &h->cabac, &h->cabac_state[23] ) )
1442 if( !get_cabac( &h->cabac, &h->cabac_state[36] ) )
1444 if( !get_cabac( &h->cabac, &h->cabac_state[37] ) )
1445 return 1 + get_cabac( &h->cabac, &h->cabac_state[39] ); /* B_L0_8x8, B_L1_8x8 */
1447 if( get_cabac( &h->cabac, &h->cabac_state[38] ) ) {
1448 if( get_cabac( &h->cabac, &h->cabac_state[39] ) )
1449 return 11 + get_cabac( &h->cabac, &h->cabac_state[39] ); /* B_L1_4x4, B_Bi_4x4 */
1452 type += 2*get_cabac( &h->cabac, &h->cabac_state[39] );
1453 type += get_cabac( &h->cabac, &h->cabac_state[39] );
1475 while( get_cabac( &h->cabac, &h->cabac_state[54+ctx] ) ) {
1488 if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+((amvd-3)>>(INT_BIT-1))+((amvd-33)>>(INT_BIT-1))+2])){
1489 // if(!get_cabac(&h->cabac, &h->cabac_state[ctxbase+(amvd>2)+(amvd>32)])){
1496 while( mvd < 9 && get_cabac( &h->cabac, &h->cabac_state[ctxbase] ) ) {
1504 while( get_cabac_bypass( &h->cabac ) ) {
1513 mvd += get_cabac_bypass( &h->cabac )<<k;
1518 return get_cabac_bypass_sign( &h->cabac, -mvd );
1591 * map node ctx => cabac ctx for level=1 */
1593 /* map node ctx => cabac ctx for level>1 */
1621 cc.range = h->cabac.range;
1622 cc.low = h->cabac.low;
1623 cc.bytestream= h->cabac.bytestream;
1625 cc.bytestream_end = h->cabac.bytestream_end;
1628 #define CC &h->cabac
1741 h->cabac.range = cc.range ;
1742 h->cabac.low = cc.low ;
1743 h->cabac.bytestream= cc.bytestream;
1795 if( get_cabac( &h->cabac, &h->cabac_state[get_cabac_cbf_ctx( h, cat, n, max_coeff, 1 ) ] ) == 0 ) {
1808 if (get_cabac(&h->cabac, &h->cabac_state[get_cabac_cbf_ctx(h, cat, n, max_coeff, 1)]) == 0) {
1823 if( (cat != 5 || CHROMA444(h)) && get_cabac( &h->cabac, &h->cabac_state[get_cabac_cbf_ctx( h, cat, n, max_coeff, 0 ) ] ) == 0 ) {
1940 if( !get_cabac_noinline( &h->cabac, &h->cabac_state[27+ctx] ) ){
1942 }else if( !get_cabac_noinline( &h->cabac, &h->cabac_state[27+3] ) ) {
1943 mb_type= 1 + get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ); /* B_L[01]_16x16 */
1946 bits = get_cabac_noinline( &h->cabac, &h->cabac_state[27+4] ) << 3;
1947 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 2;
1948 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] ) << 1;
1949 bits+= get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
1960 bits= ( bits<<1 ) + get_cabac_noinline( &h->cabac, &h->cabac_state[27+5] );
1967 if( get_cabac_noinline( &h->cabac, &h->cabac_state[14] ) == 0 ) {
1969 if( get_cabac_noinline( &h->cabac, &h->cabac_state[15] ) == 0 ) {
1971 mb_type= 3 * get_cabac_noinline( &h->cabac, &h->cabac_state[16] );
1974 mb_type= 2 - get_cabac_noinline( &h->cabac, &h->cabac_state[17] );
2004 // FIXME The two following lines get the bitstream position in the cabac
2005 // decode, I think it should be done by a function in cabac.h (or cabac.c).
2006 ptr= h->cabac.bytestream;
2007 if(h->cabac.low&0x1) ptr--;
2009 if(h->cabac.low&0x1FF) ptr--;
2013 if ((int) (h->cabac.bytestream_end - ptr) < mb_size)
2018 ff_init_cabac_decoder(&h->cabac, ptr, h->cabac.bytestream_end - ptr);
2040 if( dct8x8_allowed && get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] ) ) {
2303 mb_type |= MB_TYPE_8x8DCT * get_cabac_noinline( &h->cabac, &h->cabac_state[399 + h->neighbor_transform_size] );
2343 if(get_cabac_noinline( &h->cabac, &h->cabac_state[60 + (h->last_qscale_diff != 0)])){
2348 while( get_cabac_noinline( &h->cabac, &h->cabac_state[60 + ctx] ) ) {
2352 av_log(h->avctx, AV_LOG_ERROR, "cabac decode of qscale diff failed at %d %d\n", h->mb_x, h->mb_y);