1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Found-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-18 17:31:29 +02:00
parent edbb9b5e8f
commit e739cbb2bb

View File

@ -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")
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");