Mercurial > libavcodec.hg
comparison bitstream.c @ 5230:2a340aea762d libavcodec
simplify ff_copy_bits: merge 2 test branches
| author | aurel |
|---|---|
| date | Fri, 06 Jul 2007 14:14:41 +0000 |
| parents | 604a09d6cf2e |
| children | 32b69770ae23 |
comparison
equal
deleted
inserted
replaced
| 5229:604a09d6cf2e | 5230:2a340aea762d |
|---|---|
| 67 int bits= length&15; | 67 int bits= length&15; |
| 68 int i; | 68 int i; |
| 69 | 69 |
| 70 if(length==0) return; | 70 if(length==0) return; |
| 71 | 71 |
| 72 if(words < 16){ | 72 if(words < 16 || put_bits_count(pb)&7){ |
| 73 for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i])); | |
| 74 }else if(put_bits_count(pb)&7){ | |
| 75 for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i])); | 73 for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(srcw[i])); |
| 76 }else{ | 74 }else{ |
| 77 for(i=0; put_bits_count(pb)&31; i++) | 75 for(i=0; put_bits_count(pb)&31; i++) |
| 78 put_bits(pb, 8, src[i]); | 76 put_bits(pb, 8, src[i]); |
| 79 flush_put_bits(pb); | 77 flush_put_bits(pb); |
