comparison ffv1.c @ 2220:21947e176d4d libavcodec

get/set_sr_golomb() cleanup
author michael
date Fri, 10 Sep 2004 19:40:55 +0000
parents cff6c9b8ae57
children 37516ec97cd6
comparison
equal deleted inserted replaced
2219:9b6eb06cc184 2220:21947e176d4d
323 #else 323 #else
324 code= v ^ ((2*state->drift + state->count)>>31); 324 code= v ^ ((2*state->drift + state->count)>>31);
325 #endif 325 #endif
326 326
327 //printf("v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, state->bias, state->error_sum, state->drift, state->count, k); 327 //printf("v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, state->bias, state->error_sum, state->drift, state->count, k);
328 set_sr_golomb_ffv1(pb, code, k, 12, bits); 328 set_sr_golomb(pb, code, k, 12, bits);
329 329
330 update_vlc_state(state, v); 330 update_vlc_state(state, v);
331 } 331 }
332 332
333 static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int bits){ 333 static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int bits){
340 i += i; 340 i += i;
341 } 341 }
342 342
343 assert(k<=8); 343 assert(k<=8);
344 344
345 v= get_sr_golomb_ffv1(gb, k, 12, bits); 345 v= get_sr_golomb(gb, k, 12, bits);
346 //printf("v:%d bias:%d error:%d drift:%d count:%d k:%d", v, state->bias, state->error_sum, state->drift, state->count, k); 346 //printf("v:%d bias:%d error:%d drift:%d count:%d k:%d", v, state->bias, state->error_sum, state->drift, state->count, k);
347 347
348 #if 0 // JPEG LS 348 #if 0 // JPEG LS
349 if(k==0 && 2*state->drift <= - state->count) v ^= (-1); 349 if(k==0 && 2*state->drift <= - state->count) v ^= (-1);
350 #else 350 #else