Mercurial > libavcodec.hg
comparison h264.c @ 3955:051a9c8b257f libavcodec
5% faster get_cabac()
author | michael |
---|---|
date | Sun, 08 Oct 2006 11:24:37 +0000 |
parents | 00a12ef7d800 |
children | f5f1c9af095d |
comparison
equal
deleted
inserted
replaced
3954:00a12ef7d800 | 3955:051a9c8b257f |
---|---|
7397 pre = clip( ((cabac_context_init_I[i][0] * s->qscale) >>4 ) + cabac_context_init_I[i][1], 1, 126 ); | 7397 pre = clip( ((cabac_context_init_I[i][0] * s->qscale) >>4 ) + cabac_context_init_I[i][1], 1, 126 ); |
7398 else | 7398 else |
7399 pre = clip( ((cabac_context_init_PB[h->cabac_init_idc][i][0] * s->qscale) >>4 ) + cabac_context_init_PB[h->cabac_init_idc][i][1], 1, 126 ); | 7399 pre = clip( ((cabac_context_init_PB[h->cabac_init_idc][i][0] * s->qscale) >>4 ) + cabac_context_init_PB[h->cabac_init_idc][i][1], 1, 126 ); |
7400 | 7400 |
7401 if( pre <= 63 ) | 7401 if( pre <= 63 ) |
7402 h->cabac_state[i] = 2 * ( 63 - pre ) + 0; | 7402 h->cabac_state[i] = 2 * ( 63 - pre ) + 2; |
7403 else | 7403 else |
7404 h->cabac_state[i] = 2 * ( pre - 64 ) + 1; | 7404 h->cabac_state[i] = 2 * ( pre - 64 ) + 3; |
7405 } | 7405 } |
7406 | 7406 |
7407 for(;;){ | 7407 for(;;){ |
7408 int ret = decode_mb_cabac(h); | 7408 int ret = decode_mb_cabac(h); |
7409 int eos; | 7409 int eos; |