mirror of https://git.ffmpeg.org/ffmpeg.git
* removing casualties of battle of the wits and English language
Originally committed as revision 2902 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7976241aef
commit
5825425795
|
@ -281,6 +281,7 @@ struct PutBitContext;
|
||||||
|
|
||||||
typedef void (*WriteDataFunc)(void *, uint8_t *, int);
|
typedef void (*WriteDataFunc)(void *, uint8_t *, int);
|
||||||
|
|
||||||
|
/* buf and buf_end must be present and used by every alternative writer. */
|
||||||
typedef struct PutBitContext {
|
typedef struct PutBitContext {
|
||||||
#ifdef ALT_BITSTREAM_WRITER
|
#ifdef ALT_BITSTREAM_WRITER
|
||||||
uint8_t *buf, *buf_end;
|
uint8_t *buf, *buf_end;
|
||||||
|
@ -317,11 +318,6 @@ static inline int put_bits_count(PutBitContext *s)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int put_bits_left(PutBitContext* s)
|
|
||||||
{
|
|
||||||
return (s->buf_end - s->buf) * 8 - put_bits_count(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pad the end of the output stream with zeros */
|
/* pad the end of the output stream with zeros */
|
||||||
static inline void flush_put_bits(PutBitContext *s)
|
static inline void flush_put_bits(PutBitContext *s)
|
||||||
{
|
{
|
||||||
|
@ -344,7 +340,7 @@ void align_put_bits(PutBitContext *s);
|
||||||
void put_string(PutBitContext * pbc, char *s, int put_zero);
|
void put_string(PutBitContext * pbc, char *s, int put_zero);
|
||||||
|
|
||||||
/* bit input */
|
/* bit input */
|
||||||
|
/* buffer, buffer_end and size_in_bits must be present and used by every reader */
|
||||||
typedef struct GetBitContext {
|
typedef struct GetBitContext {
|
||||||
const uint8_t *buffer, *buffer_end;
|
const uint8_t *buffer, *buffer_end;
|
||||||
#ifdef ALT_BITSTREAM_READER
|
#ifdef ALT_BITSTREAM_READER
|
||||||
|
@ -914,16 +910,6 @@ static inline void init_get_bits(GetBitContext *s,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int get_bits_left(GetBitContext *s)
|
|
||||||
{
|
|
||||||
return s->size_in_bits - get_bits_count(s);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int get_bits_size(GetBitContext *s)
|
|
||||||
{
|
|
||||||
return s->size_in_bits;
|
|
||||||
}
|
|
||||||
|
|
||||||
int check_marker(GetBitContext *s, const char *msg);
|
int check_marker(GetBitContext *s, const char *msg);
|
||||||
void align_get_bits(GetBitContext *s);
|
void align_get_bits(GetBitContext *s);
|
||||||
int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
|
int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
|
||||||
|
|
|
@ -240,6 +240,21 @@ static const int mb_area_start[5] = { 1, 6, 21, 43, 64 };
|
||||||
#warning only works with ALT_BITSTREAM_READER
|
#warning only works with ALT_BITSTREAM_READER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static inline int get_bits_left(GetBitContext *s)
|
||||||
|
{
|
||||||
|
return s->size_in_bits - get_bits_count(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int get_bits_size(GetBitContext *s)
|
||||||
|
{
|
||||||
|
return s->size_in_bits;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int put_bits_left(PutBitContext* s)
|
||||||
|
{
|
||||||
|
return (s->buf_end - s->buf) * 8 - put_bits_count(s);
|
||||||
|
}
|
||||||
|
|
||||||
/* decode ac coefs */
|
/* decode ac coefs */
|
||||||
static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
|
static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue