summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-04-17 01:55:42 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-07-29 19:48:28 -0700
commit8189733b0c9825b0ad6e38126f8b386c45a8d91e (patch)
treec4bb1277b695965a923ff974b5c20846c46fe73a
parent26920748f71e1b2a7786cbdb44ad2a66a474d012 (diff)
downloadsbc-8189733b0c9825b0ad6e38126f8b386c45a8d91e.tar.gz
sbc: Do some coding style cleanups
-rw-r--r--sbc/sbc.c28
-rw-r--r--sbc/sbc.h12
2 files changed, 16 insertions, 24 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 67681f0..a6b6563 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -360,7 +360,7 @@ static void sbc_calculate_bits(const struct sbc_frame *frame, int (*bits)[8])
* -4 Bitpool value out of bounds
*/
static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
- size_t len)
+ size_t len)
{
unsigned int consumed;
/* Will copy the parts of the header that are relevant to crc
@@ -522,7 +522,7 @@ static int sbc_unpack_frame(const uint8_t *data, struct sbc_frame *frame,
}
static void sbc_decoder_init(struct sbc_decoder_state *state,
- const struct sbc_frame *frame)
+ const struct sbc_frame *frame)
{
int i, ch;
@@ -623,7 +623,7 @@ static inline void sbc_synthesize_eight(struct sbc_decoder_state *state,
}
static int sbc_synthesize_audio(struct sbc_decoder_state *state,
- struct sbc_frame *frame)
+ struct sbc_frame *frame)
{
int ch, blk;
@@ -648,7 +648,7 @@ static int sbc_synthesize_audio(struct sbc_decoder_state *state,
}
static int sbc_analyze_audio(struct sbc_encoder_state *state,
- struct sbc_frame *frame)
+ struct sbc_frame *frame)
{
int ch, blk;
int16_t *x;
@@ -732,9 +732,9 @@ static int sbc_analyze_audio(struct sbc_encoder_state *state,
* -99 not implemented
*/
-static SBC_ALWAYS_INLINE int sbc_pack_frame_internal(
- uint8_t *data, struct sbc_frame *frame, size_t len,
- int frame_subbands, int frame_channels)
+static SBC_ALWAYS_INLINE int sbc_pack_frame_internal(uint8_t *data,
+ struct sbc_frame *frame, size_t len,
+ int frame_subbands, int frame_channels)
{
/* Bitstream writer starts from the fourth byte */
uint8_t *data_ptr = data + 4;
@@ -921,7 +921,7 @@ static int sbc_pack_frame(uint8_t *data, struct sbc_frame *frame, size_t len)
}
static void sbc_encoder_init(struct sbc_encoder_state *state,
- const struct sbc_frame *frame)
+ const struct sbc_frame *frame)
{
memset(&state->X, 0, sizeof(state->X));
state->position = (SBC_X_BUFFER_SIZE - frame->subbands * 9) & ~7;
@@ -978,10 +978,8 @@ ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len)
return sbc_decode(sbc, input, input_len, NULL, 0, NULL);
}
-ssize_t sbc_decode(sbc_t *sbc,
- const void *input, size_t input_len,
- void *output, size_t output_len,
- size_t *written)
+ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
+ void *output, size_t output_len, size_t *written)
{
struct sbc_priv *priv;
char *ptr;
@@ -1046,10 +1044,8 @@ ssize_t sbc_decode(sbc_t *sbc,
return framelen;
}
-ssize_t sbc_encode(sbc_t *sbc,
- const void *input, size_t input_len,
- void *output, size_t output_len,
- size_t *written)
+ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len,
+ void *output, size_t output_len, size_t *written)
{
struct sbc_priv *priv;
int framelen, samples;
diff --git a/sbc/sbc.h b/sbc/sbc.h
index 9c1ebbd..0d834d6 100644
--- a/sbc/sbc.h
+++ b/sbc/sbc.h
@@ -86,16 +86,12 @@ int sbc_reinit(sbc_t *sbc, unsigned long flags);
ssize_t sbc_parse(sbc_t *sbc, const void *input, size_t input_len);
/* Decodes ONE input block into ONE output block */
-ssize_t sbc_decode(sbc_t *sbc,
- const void *input, size_t input_len,
- void *output, size_t output_len,
- size_t *written);
+ssize_t sbc_decode(sbc_t *sbc, const void *input, size_t input_len,
+ void *output, size_t output_len, size_t *written);
/* Encodes ONE input block into ONE output block */
-ssize_t sbc_encode(sbc_t *sbc,
- const void *input, size_t input_len,
- void *output, size_t output_len,
- size_t *written);
+ssize_t sbc_encode(sbc_t *sbc, const void *input, size_t input_len,
+ void *output, size_t output_len, size_t *written);
/* Returns the output block size in bytes */
size_t sbc_get_frame_length(sbc_t *sbc);