Logo Search packages:      
Sourcecode: blender version File versions

static int put_cabac_terminate ( CABACContext *  c,
int  bit 
) [inline, static]

Returns:
the number of bytes written

Definition at line 151 of file cabac.h.

                                                               {
    c->range -= 2;

    if(!bit){
        renorm_cabac_encoder(c);
    }else{
        c->low += c->range;
        c->range= 2;

        renorm_cabac_encoder(c);

        assert(c->low <= 0x1FF);
        put_cabac_bit(c, c->low>>9);
        put_bits(&c->pb, 2, ((c->low>>7)&3)|1);

        flush_put_bits(&c->pb); //FIXME FIXME FIXME XXX wrong
    }

#ifdef STRICT_LIMITS
    c->symCount++;
#endif

    return (put_bits_count(&c->pb)+7)>>3;
}


Generated by  Doxygen 1.6.0   Back to index