diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-06-06 10:04:15 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-06-06 10:04:15 +0000 |
commit | 8f8c0800f82f7ba958183b288a7253c97463b5e5 (patch) | |
tree | bdae1d00d25efbebbe9f9867234ea442213fd312 | |
parent | bc634f6fc2e89890b99cd20d8349046ffc0d4bfe (diff) | |
download | ffmpeg-streaming-8f8c0800f82f7ba958183b288a7253c97463b5e5.zip ffmpeg-streaming-8f8c0800f82f7ba958183b288a7253c97463b5e5.tar.gz |
cleanup
Originally committed as revision 1932 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/cabac.c | 2 | ||||
-rw-r--r-- | libavcodec/cabac.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c index c4bd274..4e05e68 100644 --- a/libavcodec/cabac.c +++ b/libavcodec/cabac.c @@ -158,7 +158,7 @@ STOP_TIMER("put_cabac_u") 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") } diff --git a/libavcodec/cabac.h b/libavcodec/cabac.h index 1377c61..7ac18cc 100644 --- a/libavcodec/cabac.h +++ b/libavcodec/cabac.h @@ -199,12 +199,16 @@ static inline void put_cabac_u(CABACContext *c, uint8_t * state, int v, int max, /** * 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); |