Mercurial > libavcodec.hg
comparison mpegvideo.c @ 1802:e91dbb5b1a8d libavcodec
activate the memcpy special case for the byte aligned case in ff_copy_bits(), wasnt working before because of a incorrectly used pbBufPtr()
author | michael |
---|---|
date | Fri, 13 Feb 2004 21:07:31 +0000 |
parents | 3f26dfb3eba4 |
children | f100993b9b5a |
comparison
equal
deleted
inserted
replaced
1801:3f26dfb3eba4 | 1802:e91dbb5b1a8d |
---|---|
3736 int bits= length&15; | 3736 int bits= length&15; |
3737 int i; | 3737 int i; |
3738 | 3738 |
3739 if(length==0) return; | 3739 if(length==0) return; |
3740 | 3740 |
3741 // if(put_bits_count(pb)&7){ //FIXME | 3741 if(put_bits_count(pb)&7){ |
3742 for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(((uint16_t*)src)[i])); | 3742 for(i=0; i<words; i++) put_bits(pb, 16, be2me_16(((uint16_t*)src)[i])); |
3743 /* }else{ | 3743 }else{ |
3744 flush_put_bits(pb); | 3744 flush_put_bits(pb); |
3745 memcpy(pbBufPtr(pb), src, 2*words); | 3745 memcpy(pbBufPtr(pb), src, 2*words); |
3746 skip_put_bytes(pb, 2*words); | 3746 skip_put_bytes(pb, 2*words); |
3747 }*/ | 3747 } |
3748 | 3748 |
3749 put_bits(pb, bits, be2me_16(((uint16_t*)src)[words])>>(16-bits)); | 3749 put_bits(pb, bits, be2me_16(((uint16_t*)src)[words])>>(16-bits)); |
3750 } | 3750 } |
3751 | 3751 |
3752 static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext *s, int type){ | 3752 static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext *s, int type){ |