Commit e739cbb2 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/cabac: remove START/STOP_TIMER debug/benchmark code

Found-by: 's avatarJames Almer <jamrial@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent edbb9b5e
...@@ -188,15 +188,11 @@ int main(void){ ...@@ -188,15 +188,11 @@ int main(void){
} }
for(i=0; i<SIZE; i++){ for(i=0; i<SIZE; i++){
START_TIMER
put_cabac_bypass(&c, r[i]&1); put_cabac_bypass(&c, r[i]&1);
STOP_TIMER("put_cabac_bypass")
} }
for(i=0; i<SIZE; i++){ for(i=0; i<SIZE; i++){
START_TIMER
put_cabac(&c, state, r[i]&1); put_cabac(&c, state, r[i]&1);
STOP_TIMER("put_cabac")
} }
put_cabac_terminate(&c, 1); put_cabac_terminate(&c, 1);
...@@ -206,21 +202,17 @@ STOP_TIMER("put_cabac") ...@@ -206,21 +202,17 @@ STOP_TIMER("put_cabac")
memset(state, 0, sizeof(state)); memset(state, 0, sizeof(state));
for(i=0; i<SIZE; i++){ for(i=0; i<SIZE; i++){
START_TIMER
if( (r[i]&1) != get_cabac_bypass(&c) ) { if( (r[i]&1) != get_cabac_bypass(&c) ) {
av_log(NULL, AV_LOG_ERROR, "CABAC bypass failure at %d\n", i); av_log(NULL, AV_LOG_ERROR, "CABAC bypass failure at %d\n", i);
ret = 1; ret = 1;
} }
STOP_TIMER("get_cabac_bypass")
} }
for(i=0; i<SIZE; i++){ for(i=0; i<SIZE; i++){
START_TIMER
if( (r[i]&1) != get_cabac_noinline(&c, state) ) { if( (r[i]&1) != get_cabac_noinline(&c, state) ) {
av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i); av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i);
ret = 1; ret = 1;
} }
STOP_TIMER("get_cabac")
} }
if(!get_cabac_terminate(&c)) { if(!get_cabac_terminate(&c)) {
av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n"); av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment