mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
- formatting code using astyle
Conflicts: libarmbox/dmx.cpp libgeneric-pc/video_lib.h libspark/dmx.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
154
libeplayer3/external/ffmpeg/get_bits.h
vendored
154
libeplayer3/external/ffmpeg/get_bits.h
vendored
@@ -97,8 +97,8 @@ typedef struct GetBitContext
|
||||
#endif
|
||||
|
||||
#define OPEN_READER_NOSIZE(name, gb) \
|
||||
unsigned int name ## _index = (gb)->index; \
|
||||
unsigned int av_unused name ## _cache
|
||||
unsigned int name ## _index = (gb)->index; \
|
||||
unsigned int av_unused name ## _cache
|
||||
|
||||
|
||||
#define OPEN_READER(name, gb) OPEN_READER_NOSIZE(name, gb)
|
||||
@@ -110,18 +110,18 @@ typedef struct GetBitContext
|
||||
# ifdef LONG_BITSTREAM_READER
|
||||
|
||||
# define UPDATE_CACHE_LE(name, gb) name ## _cache = \
|
||||
AV_RL64((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
|
||||
AV_RL64((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
|
||||
|
||||
# define UPDATE_CACHE_BE(name, gb) name ## _cache = \
|
||||
AV_RB64((gb)->buffer + (name ## _index >> 3)) >> (32 - (name ## _index & 7))
|
||||
AV_RB64((gb)->buffer + (name ## _index >> 3)) >> (32 - (name ## _index & 7))
|
||||
|
||||
#else
|
||||
|
||||
# define UPDATE_CACHE_LE(name, gb) name ## _cache = \
|
||||
AV_RL32((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
|
||||
AV_RL32((gb)->buffer + (name ## _index >> 3)) >> (name ## _index & 7)
|
||||
|
||||
# define UPDATE_CACHE_BE(name, gb) name ## _cache = \
|
||||
AV_RB32((gb)->buffer + (name ## _index >> 3)) << (name ## _index & 7)
|
||||
AV_RB32((gb)->buffer + (name ## _index >> 3)) << (name ## _index & 7)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -146,10 +146,10 @@ typedef struct GetBitContext
|
||||
#define BITS_LEFT(name, gb) ((int)((gb)->size_in_bits - name ## _index))
|
||||
|
||||
#define SKIP_BITS(name, gb, num) \
|
||||
do { \
|
||||
SKIP_CACHE(name, gb, num); \
|
||||
SKIP_COUNTER(name, gb, num); \
|
||||
} while (0)
|
||||
do { \
|
||||
SKIP_CACHE(name, gb, num); \
|
||||
SKIP_COUNTER(name, gb, num); \
|
||||
} while (0)
|
||||
|
||||
#define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num)
|
||||
|
||||
@@ -389,7 +389,7 @@ static inline int check_marker(void *logctx __attribute__((unused)), GetBitConte
|
||||
* @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
|
||||
*/
|
||||
static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
|
||||
int bit_size)
|
||||
int bit_size)
|
||||
{
|
||||
int buffer_size;
|
||||
int ret = 0;
|
||||
@@ -421,7 +421,7 @@ static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
|
||||
* @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
|
||||
*/
|
||||
static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer,
|
||||
int byte_size)
|
||||
int byte_size)
|
||||
{
|
||||
if (byte_size > INT_MAX / 8 || byte_size < 0)
|
||||
byte_size = -1;
|
||||
@@ -442,73 +442,73 @@ static inline const uint8_t *align_get_bits(GetBitContext *s)
|
||||
* is undefined.
|
||||
*/
|
||||
#define GET_VLC(code, name, gb, table, bits, max_depth) \
|
||||
do { \
|
||||
int n, nb_bits; \
|
||||
unsigned int index; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, bits); \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
\
|
||||
if (max_depth > 1 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, bits); \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + code; \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
if (max_depth > 2 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, nb_bits); \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + code; \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
} \
|
||||
} \
|
||||
SKIP_BITS(name, gb, n); \
|
||||
} while (0)
|
||||
do { \
|
||||
int n, nb_bits; \
|
||||
unsigned int index; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, bits); \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
\
|
||||
if (max_depth > 1 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, bits); \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + code; \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
if (max_depth > 2 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, nb_bits); \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + code; \
|
||||
code = table[index][0]; \
|
||||
n = table[index][1]; \
|
||||
} \
|
||||
} \
|
||||
SKIP_BITS(name, gb, n); \
|
||||
} while (0)
|
||||
|
||||
#define GET_RL_VLC(level, run, name, gb, table, bits, \
|
||||
max_depth, need_update) \
|
||||
do { \
|
||||
int n, nb_bits; \
|
||||
unsigned int index; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, bits); \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
\
|
||||
if (max_depth > 1 && n < 0) { \
|
||||
SKIP_BITS(name, gb, bits); \
|
||||
if (need_update) { \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
} \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + level; \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
if (max_depth > 2 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, nb_bits); \
|
||||
if (need_update) { \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
} \
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + level; \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
} \
|
||||
} \
|
||||
run = table[index].run; \
|
||||
SKIP_BITS(name, gb, n); \
|
||||
} while (0)
|
||||
max_depth, need_update) \
|
||||
do { \
|
||||
int n, nb_bits; \
|
||||
unsigned int index; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, bits); \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
\
|
||||
if (max_depth > 1 && n < 0) { \
|
||||
SKIP_BITS(name, gb, bits); \
|
||||
if (need_update) { \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
} \
|
||||
\
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + level; \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
if (max_depth > 2 && n < 0) { \
|
||||
LAST_SKIP_BITS(name, gb, nb_bits); \
|
||||
if (need_update) { \
|
||||
UPDATE_CACHE(name, gb); \
|
||||
} \
|
||||
nb_bits = -n; \
|
||||
\
|
||||
index = SHOW_UBITS(name, gb, nb_bits) + level; \
|
||||
level = table[index].level; \
|
||||
n = table[index].len; \
|
||||
} \
|
||||
} \
|
||||
run = table[index].run; \
|
||||
SKIP_BITS(name, gb, n); \
|
||||
} while (0)
|
||||
|
||||
|
||||
static inline int decode012(GetBitContext *gb)
|
||||
|
2
libeplayer3/external/ffmpeg/mpeg4audio.h
vendored
2
libeplayer3/external/ffmpeg/mpeg4audio.h
vendored
@@ -54,7 +54,7 @@ extern const uint8_t ff_mpeg4audio_channels[8];
|
||||
* @return On error -1 is returned, on success AudioSpecificConfig bit index in extradata.
|
||||
*/
|
||||
int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
|
||||
int bit_size, int sync_extension);
|
||||
int bit_size, int sync_extension);
|
||||
|
||||
enum AudioObjectType
|
||||
{
|
||||
|
6
libeplayer3/external/ffmpeg/put_bits.h
vendored
6
libeplayer3/external/ffmpeg/put_bits.h
vendored
@@ -47,7 +47,7 @@ typedef struct PutBitContext
|
||||
* @param buffer_size the size in bytes of buffer
|
||||
*/
|
||||
static inline void init_put_bits(PutBitContext *s, uint8_t *buffer,
|
||||
int buffer_size)
|
||||
int buffer_size)
|
||||
{
|
||||
if (buffer_size < 0)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ static inline void init_put_bits(PutBitContext *s, uint8_t *buffer,
|
||||
* must be larger than the previous size
|
||||
*/
|
||||
static inline void rebase_put_bits(PutBitContext *s, uint8_t *buffer,
|
||||
int buffer_size)
|
||||
int buffer_size)
|
||||
{
|
||||
av_assert0(8 * buffer_size > s->size_in_bits);
|
||||
|
||||
@@ -138,7 +138,7 @@ void avpriv_align_put_bits(PutBitContext *s);
|
||||
* @param terminate_string 0-terminates the written string if value is 1
|
||||
*/
|
||||
void avpriv_put_string(PutBitContext *pb, const char *string,
|
||||
int terminate_string);
|
||||
int terminate_string);
|
||||
|
||||
/**
|
||||
* Copy the content of src to the bitstream.
|
||||
|
10
libeplayer3/external/ffmpeg/src/mpeg4audio.c
vendored
10
libeplayer3/external/ffmpeg/src/mpeg4audio.c
vendored
@@ -80,7 +80,7 @@ static inline int get_sample_rate(GetBitContext *gb, int *index)
|
||||
}
|
||||
|
||||
int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
|
||||
int bit_size, int sync_extension)
|
||||
int bit_size, int sync_extension)
|
||||
{
|
||||
GetBitContext gb;
|
||||
int specific_config_bitindex, ret;
|
||||
@@ -100,8 +100,8 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
|
||||
c->sbr = -1;
|
||||
c->ps = -1;
|
||||
if (c->object_type == AOT_SBR || (c->object_type == AOT_PS &&
|
||||
// check for W6132 Annex YYYY draft MP3onMP4
|
||||
!(show_bits(&gb, 3) & 0x03 && !(show_bits(&gb, 9) & 0x3F))))
|
||||
// check for W6132 Annex YYYY draft MP3onMP4
|
||||
!(show_bits(&gb, 3) & 0x03 && !(show_bits(&gb, 9) & 0x3F))))
|
||||
{
|
||||
if (c->object_type == AOT_PS)
|
||||
c->ps = 1;
|
||||
@@ -165,8 +165,8 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf,
|
||||
}
|
||||
|
||||
static av_always_inline unsigned int copy_bits(PutBitContext *pb,
|
||||
GetBitContext *gb,
|
||||
int bits)
|
||||
GetBitContext *gb,
|
||||
int bits)
|
||||
{
|
||||
unsigned int el = get_bits(gb, bits);
|
||||
put_bits(pb, bits, el);
|
||||
|
16
libeplayer3/external/flv2mpeg4/src/flv2mpeg4.c
vendored
16
libeplayer3/external/flv2mpeg4/src/flv2mpeg4.c
vendored
@@ -139,10 +139,10 @@ static int write_pad_not_coded_frames(flv2mpeg4_CTX *pub_ctx, CONVCTX *c, BW *bw
|
||||
|
||||
// write frame
|
||||
if (pub_ctx->write_packet_cb(pub_ctx->usr_data,
|
||||
0,
|
||||
0,//c->frame,
|
||||
bw->buf,
|
||||
bw->pos) < 0)
|
||||
0,
|
||||
0,//c->frame,
|
||||
bw->buf,
|
||||
bw->pos) < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@@ -203,10 +203,10 @@ static int write_m4v_picture_frame(flv2mpeg4_CTX *pub_ctx, CONVCTX *c, BR *br, B
|
||||
|
||||
// write frame
|
||||
if (pub_ctx->write_packet_cb(pub_ctx->usr_data,
|
||||
vop.picture_type == M4V_I_TYPE,
|
||||
0,//c->frame,
|
||||
bw->buf,
|
||||
bw->pos) < 0)
|
||||
vop.picture_type == M4V_I_TYPE,
|
||||
0,//c->frame,
|
||||
bw->buf,
|
||||
bw->pos) < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@@ -115,8 +115,8 @@ static inline void encode_escape_3(BW *p, int last, int run, int level)
|
||||
{
|
||||
#if 0
|
||||
put_bits(p,
|
||||
7 + 2 + 1 + 6 + 1 + 12 + 1, //30bit
|
||||
(3 << 23) + (3 << 21) + (last << 20) + (run << 14) + (1 << 13) + (((level - 64) & 0xfff) << 1) + 1);
|
||||
7 + 2 + 1 + 6 + 1 + 12 + 1, //30bit
|
||||
(3 << 23) + (3 << 21) + (last << 20) + (run << 14) + (1 << 13) + (((level - 64) & 0xfff) << 1) + 1);
|
||||
#else
|
||||
put_bits(p, 7, 3); // escape
|
||||
put_bits(p, 2, 3); // escape3
|
||||
|
Reference in New Issue
Block a user