Mercurial > libavcodec.hg
changeset 1298:5bc3184810dc libavcodec
cleanup
author | michaelni |
---|---|
date | Fri, 06 Jun 2003 10:04:15 +0000 |
parents | 1db67cd7808a |
children | 9c3bfa79631f |
files | cabac.c cabac.h |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cabac.c Thu Jun 05 14:30:52 2003 +0000 +++ b/cabac.c Fri Jun 06 10:04:15 2003 +0000 @@ -158,7 +158,7 @@ for(i=0; i<SIZE; i++){ START_TIMER - put_cabac_ueg(&c, state, r[i], 0, 3, 0, 1, 2); + put_cabac_ueg(&c, state, r[i], 3, 0, 1, 2); STOP_TIMER("put_cabac_ueg") }
--- a/cabac.h Thu Jun 05 14:30:52 2003 +0000 +++ b/cabac.h Fri Jun 06 10:04:15 2003 +0000 @@ -199,12 +199,16 @@ /** * put unary exp golomb k-th order binarization. */ -static inline void put_cabac_ueg(CABACContext *c, uint8_t * state, int v, int sign, int max, int is_signed, int k, int max_index){ +static inline void put_cabac_ueg(CABACContext *c, uint8_t * state, int v, int max, int is_signed, int k, int max_index){ int i; if(v==0) put_cabac(c, state, 0); else{ + const int sign= v < 0; + + if(is_signed) v= ABS(v); + if(v<max){ for(i=0; i<v; i++){ put_cabac(c, state, 1);