mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-02 05:56:46 +08:00
Add a get_sbits_long() function.
Originally committed as revision 17740 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -33,6 +33,7 @@
|
|||||||
#include "libavutil/common.h"
|
#include "libavutil/common.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/log.h"
|
#include "libavutil/log.h"
|
||||||
|
#include "mathops.h"
|
||||||
|
|
||||||
#if defined(ALT_BITSTREAM_READER_LE) && !defined(ALT_BITSTREAM_READER)
|
#if defined(ALT_BITSTREAM_READER_LE) && !defined(ALT_BITSTREAM_READER)
|
||||||
# define ALT_BITSTREAM_READER
|
# define ALT_BITSTREAM_READER
|
||||||
@ -706,6 +707,13 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* reads 0-32 bits as a signed integer.
|
||||||
|
*/
|
||||||
|
static inline int get_sbits_long(GetBitContext *s, int n) {
|
||||||
|
return sign_extend(get_bits_long(s, n), n);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shows 0-32 bits.
|
* shows 0-32 bits.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user