};
#define EXPVLCBITS 8
-#define EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS)
+#define EXPMAX ((19 + EXPVLCBITS - 1) / EXPVLCBITS)
#define HGAINVLCBITS 9
-#define HGAINMAX ((13+HGAINVLCBITS-1)/HGAINVLCBITS)
+#define HGAINMAX ((13 + HGAINVLCBITS - 1) / HGAINVLCBITS)
#define VLCBITS 9
-#define VLCMAX ((22+VLCBITS-1)/VLCBITS)
+#define VLCMAX ((22 + VLCBITS - 1)/VLCBITS)
DECLARE_ALIGNED(16, float, ff_sine_128[128]);
DECLARE_ALIGNED(16, float, ff_sine_256[256]);
if ((s->block_pos + s->block_len) > s->frame_len)
return -E_INCOHERENT_BLOCK_LEN;
- if (s->ahi.channels == 2) {
+ if (s->ahi.channels == 2)
s->ms_stereo = get_bits1(&s->gb);
- }
v = 0;
for (ch = 0; ch < s->ahi.channels; ch++) {
int a = get_bits1(&s->gb);
}
/* Decode a frame of frame_len samples. */
-static int wma_decode_frame(struct private_wmadec_data *s, int16_t * samples)
+static int wma_decode_frame(struct private_wmadec_data *s, int16_t *samples)
{
int ret, i, n, ch, incr;
int16_t *ptr;
*q++ = get_bits(&s->gb, 8);
len -= 8;
}
- if (len > 0) {
+ if (len > 0)
*q++ = get_bits(&s->gb, len) << (8 - len);
- }
/* XXX: bit_offset bits into last frame */
init_get_bits(&s->gb, s->last_superframe,
pos >>= 3;
len = buf_size - pos;
ret = -E_WMA_BAD_SUPERFRAME;
- if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) {
+ if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0)
goto fail;
- }
s->last_superframe_len = len;
memcpy(s->last_superframe, buf + pos, len);
} else {
static void wmadec_close(struct filter_node *fn)
{
struct private_wmadec_data *pwd = fn->private_data;
+
if (!pwd)
return;
wmadec_cleanup(pwd);