mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-28 07:50:58 +02:00
libeplayer3-arm: Code formatting
Origin commit data
------------------
Branch: master
Commit: 06854b0e78
Author: max_10 <max_10@gmx.de>
Date: 2018-01-17 (Wed, 17 Jan 2018)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
154
libeplayer3-arm/external/ffmpeg/get_bits.h
vendored
154
libeplayer3-arm/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)
|
||||
#define BITS_AVAILABLE(name, gb) 1
|
||||
@@ -108,18 +108,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
|
||||
|
||||
@@ -142,10 +142,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)
|
||||
|
||||
@@ -383,7 +383,7 @@ static inline int check_marker(void *logctx, GetBitContext *s, const char *msg)
|
||||
* @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;
|
||||
@@ -411,7 +411,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;
|
||||
@@ -432,73 +432,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-arm/external/ffmpeg/mathops.h
vendored
2
libeplayer3-arm/external/ffmpeg/mathops.h
vendored
@@ -30,7 +30,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef NEG_SSR32
|
||||
# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s)))
|
||||
# define NEG_SSR32(a,s) (((int32_t)(a))>>(32-(s)))
|
||||
#endif
|
||||
|
||||
#ifndef sign_extend
|
||||
|
2
libeplayer3-arm/external/ffmpeg/mpeg4audio.h
vendored
2
libeplayer3-arm/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-arm/external/ffmpeg/put_bits.h
vendored
6
libeplayer3-arm/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)
|
||||
{
|
||||
@@ -70,7 +70,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);
|
||||
s->buf_end = buffer + buffer_size;
|
||||
@@ -136,7 +136,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.
|
||||
|
@@ -36,8 +36,7 @@ void avpriv_align_put_bits(PutBitContext *s)
|
||||
put_bits(s, s->bit_left & 7, 0);
|
||||
}
|
||||
|
||||
void avpriv_put_string(PutBitContext *pb, const char *string,
|
||||
int terminate_string)
|
||||
void avpriv_put_string(PutBitContext *pb, const char *string, int terminate_string)
|
||||
{
|
||||
while (*string)
|
||||
{
|
||||
|
12
libeplayer3-arm/external/ffmpeg/src/mpeg4audio.c
vendored
12
libeplayer3-arm/external/ffmpeg/src/mpeg4audio.c
vendored
@@ -72,11 +72,11 @@ static inline int get_sample_rate(GetBitContext *gb, int *index)
|
||||
{
|
||||
*index = get_bits(gb, 4);
|
||||
return *index == 0x0f ? get_bits(gb, 24) :
|
||||
avpriv_mpeg4audio_sample_rates[*index];
|
||||
avpriv_mpeg4audio_sample_rates[*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;
|
||||
@@ -93,8 +93,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;
|
||||
@@ -152,8 +152,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);
|
||||
|
@@ -129,10 +129,10 @@ static int write_pad_not_coded_frames(flv2mpeg4_CTX *pub_ctx, CONVCTX *c, BW *bw
|
||||
flash_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;
|
||||
}
|
||||
@@ -184,10 +184,10 @@ static int write_m4v_picture_frame(flv2mpeg4_CTX *pub_ctx, CONVCTX *c, BR *br, B
|
||||
flash_bw(bw);
|
||||
// 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;
|
||||
}
|
||||
|
@@ -109,8 +109,8 @@ static void __inline 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