diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 0a61c805b73f45bf353758efd0ccb6722d72ba02..4cf61d6f1bd406c653585ea0b34480ff68af22fb 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -269,6 +269,14 @@ static inline unsigned int get_bits(GetBitContext *s, int n) return tmp; } +/** + * Read 0-25 bits. + */ +static av_always_inline int get_bitsz(GetBitContext *s, int n) +{ + return n ? get_bits(s, n) : 0; +} + static inline unsigned int get_bits_le(GetBitContext *s, int n) { register int tmp; diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index d2420c1386c97fe7dd41a35dcdddb9c9d651e088..5e3fe7e986f6f9482229b31881ce8bb67b91b6d3 100644 --- a/libavcodec/mpegaudiodec_template.c +++ b/libavcodec/mpegaudiodec_template.c @@ -816,13 +816,6 @@ static void exponents_from_scale_factors(MPADecodeContext *s, GranuleDef *g, } } -/* handle n = 0 too */ -static inline int get_bitsz(GetBitContext *s, int n) -{ - return n ? get_bits(s, n) : 0; -} - - static void switch_buffer(MPADecodeContext *s, int *pos, int *end_pos, int *end_pos2) {