comparison bitstream.h @ 3760:dbe7b99efdbf libavcodec

Fix get_bits_long to work with ALT_BITSTREAM_READER_LE. Gives the same result as get_bits_long_le in vorbis.c instead of some wild big-/little-endian mixture.
author reimar
date Mon, 25 Sep 2006 22:47:55 +0000
parents c537a97eec66
children c8c591fe26f8
comparison
equal deleted inserted replaced
3759:64642d08db1b 3760:dbe7b99efdbf
723 * reads 0-32 bits. 723 * reads 0-32 bits.
724 */ 724 */
725 static inline unsigned int get_bits_long(GetBitContext *s, int n){ 725 static inline unsigned int get_bits_long(GetBitContext *s, int n){
726 if(n<=17) return get_bits(s, n); 726 if(n<=17) return get_bits(s, n);
727 else{ 727 else{
728 #ifdef ALT_BITSTREAM_READER_LE
729 int ret= get_bits(s, 16);
730 return ret | (get_bits(s, n-16) << 16);
731 #else
728 int ret= get_bits(s, 16) << (n-16); 732 int ret= get_bits(s, 16) << (n-16);
729 return ret | get_bits(s, n-16); 733 return ret | get_bits(s, n-16);
734 #endif
730 } 735 }
731 } 736 }
732 737
733 /** 738 /**
734 * shows 0-32 bits. 739 * shows 0-32 bits.