comparison golomb.h @ 2905:926ea374947f libavcodec

set_se_golomb can only write 16bits, add a note about this (ok, maybe it's brain dead using it with more than 16bits, but..)
author alex
date Wed, 12 Oct 2005 22:43:12 +0000
parents b47af698085e
children ef2149182f1c
comparison
equal deleted inserted replaced
2904:84404858c529 2905:926ea374947f
389 if(range==2) put_bits(pb, 1, i^1); 389 if(range==2) put_bits(pb, 1, i^1);
390 else set_ue_golomb(pb, i); 390 else set_ue_golomb(pb, i);
391 } 391 }
392 392
393 /** 393 /**
394 * write signed exp golomb code. 394 * write signed exp golomb code. 16 bits at most.
395 */ 395 */
396 static inline void set_se_golomb(PutBitContext *pb, int i){ 396 static inline void set_se_golomb(PutBitContext *pb, int i){
397 // if (i>32767 || i<-32767)
398 // av_log(NULL,AV_LOG_ERROR,"value out of range %d\n", i);
397 #if 0 399 #if 0
398 if(i<=0) i= -2*i; 400 if(i<=0) i= -2*i;
399 else i= 2*i-1; 401 else i= 2*i-1;
400 #elif 1 402 #elif 1
401 i= 2*i-1; 403 i= 2*i-1;