Revision 6041c217

View differences:

libavcodec/cabac.c
150 150

  
151 151
#if 0 //selftest
152 152
#define SIZE 10240
153

  
154
#include "avcodec.h"
155

  
153 156
int main(){
154 157
    CABACContext c;
155 158
    uint8_t b[9*SIZE];
......
197 200
    for(i=0; i<SIZE; i++){
198 201
START_TIMER
199 202
        if( (r[i]&1) != get_cabac_bypass(&c) )
200
            printf("CABAC bypass failure at %d\n", i);
203
            av_log(NULL, AV_LOG_ERROR, "CABAC bypass failure at %d\n", i);
201 204
STOP_TIMER("get_cabac_bypass")
202 205
    }
203 206
    
204 207
    for(i=0; i<SIZE; i++){
205 208
START_TIMER
206 209
        if( (r[i]&1) != get_cabac(&c, state) )
207
            printf("CABAC failure at %d\n", i);
210
            av_log(NULL, AV_LOG_ERROR, "CABAC failure at %d\n", i);
208 211
STOP_TIMER("get_cabac")
209 212
    }
210

  
213
#if 0
211 214
    for(i=0; i<SIZE; i++){
212 215
START_TIMER
213 216
        if( r[i] != get_cabac_u(&c, state, (i&1) ? 6 : 7, 3, i&1) )
214
            printf("CABAC unary (truncated) binarization failure at %d\n", i);
217
            av_log(NULL, AV_LOG_ERROR, "CABAC unary (truncated) binarization failure at %d\n", i);
215 218
STOP_TIMER("get_cabac_u")
216 219
    }
217 220

  
218 221
    for(i=0; i<SIZE; i++){
219 222
START_TIMER
220 223
        if( r[i] != get_cabac_ueg(&c, state, 3, 0, 1, 2))
221
            printf("CABAC unary (truncated) binarization failure at %d\n", i);
224
            av_log(NULL, AV_LOG_ERROR, "CABAC unary (truncated) binarization failure at %d\n", i);
222 225
STOP_TIMER("get_cabac_ueg")
223 226
    }
224

  
227
#endif
225 228
    if(!get_cabac_terminate(&c))
226
        printf("where's the Terminator?\n");
229
        av_log(NULL, AV_LOG_ERROR, "where's the Terminator?\n");
227 230
    
228 231
    return 0;
229 232
}

Also available in: Unified diff