mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-11 06:05:21 -05:00
Sync some changes found in ffmpeg plus a spelling correction I forgot to commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19503 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3615119ba
commit
e7afeff072
2 changed files with 11 additions and 11 deletions
|
|
@ -148,8 +148,8 @@ WMADecodeContext;
|
||||||
|
|
||||||
int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx);
|
int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx);
|
||||||
int wma_decode_superframe_init(WMADecodeContext* s,
|
int wma_decode_superframe_init(WMADecodeContext* s,
|
||||||
uint8_t *buf, int buf_size);
|
const uint8_t *buf, int buf_size);
|
||||||
int wma_decode_superframe_frame(WMADecodeContext* s,
|
int wma_decode_superframe_frame(WMADecodeContext* s,
|
||||||
int32_t *samples,
|
int32_t *samples,
|
||||||
uint8_t *buf, int buf_size);
|
const uint8_t *buf, int buf_size);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -987,12 +987,12 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
|
||||||
|
|
||||||
if (s->nb_channels == 2)
|
if (s->nb_channels == 2)
|
||||||
{
|
{
|
||||||
s->ms_stereo = get_bits(&s->gb, 1);
|
s->ms_stereo = get_bits1(&s->gb);
|
||||||
}
|
}
|
||||||
v = 0;
|
v = 0;
|
||||||
for (ch = 0; ch < s->nb_channels; ++ch)
|
for (ch = 0; ch < s->nb_channels; ++ch)
|
||||||
{
|
{
|
||||||
a = get_bits(&s->gb, 1);
|
a = get_bits1(&s->gb);
|
||||||
s->channel_coded[ch] = a;
|
s->channel_coded[ch] = a;
|
||||||
v |= a;
|
v |= a;
|
||||||
}
|
}
|
||||||
|
|
@ -1048,7 +1048,7 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
|
||||||
n = s->exponent_high_sizes[bsize];
|
n = s->exponent_high_sizes[bsize];
|
||||||
for(i=0;i<n;++i)
|
for(i=0;i<n;++i)
|
||||||
{
|
{
|
||||||
a = get_bits(&s->gb, 1);
|
a = get_bits1(&s->gb);
|
||||||
s->high_band_coded[ch][i] = a;
|
s->high_band_coded[ch][i] = a;
|
||||||
/* if noise coding, the coefficients are not transmitted */
|
/* if noise coding, the coefficients are not transmitted */
|
||||||
if (a)
|
if (a)
|
||||||
|
|
@ -1090,7 +1090,7 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* exponents can be reused in short blocks. */
|
/* exponents can be reused in short blocks. */
|
||||||
if ((s->block_len_bits == s->frame_len_bits) || get_bits(&s->gb, 1))
|
if ((s->block_len_bits == s->frame_len_bits) || get_bits1(&s->gb))
|
||||||
{
|
{
|
||||||
for(ch = 0; ch < s->nb_channels; ++ch)
|
for(ch = 0; ch < s->nb_channels; ++ch)
|
||||||
{
|
{
|
||||||
|
|
@ -1160,7 +1160,7 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
|
||||||
run = run_table[code];
|
run = run_table[code];
|
||||||
level = level_table[code];
|
level = level_table[code];
|
||||||
}
|
}
|
||||||
sign = get_bits(&s->gb, 1);
|
sign = get_bits1(&s->gb);
|
||||||
if (!sign)
|
if (!sign)
|
||||||
level = -level;
|
level = -level;
|
||||||
ptr += run;
|
ptr += run;
|
||||||
|
|
@ -1258,7 +1258,7 @@ static int wma_decode_block(WMADecodeContext *s, int32_t *scratch_buffer)
|
||||||
e2 = 0;
|
e2 = 0;
|
||||||
for(i = 0;i < n; ++i)
|
for(i = 0;i < n; ++i)
|
||||||
{
|
{
|
||||||
/*v is noramlized later on so its fixed format is irrelevant*/
|
/*v is normalized later on so its fixed format is irrelevant*/
|
||||||
v = exponents[i<<bsize>>esize]>>4;
|
v = exponents[i<<bsize>>esize]>>4;
|
||||||
e2 += fixmul32(v, v)>>3;
|
e2 += fixmul32(v, v)>>3;
|
||||||
}
|
}
|
||||||
|
|
@ -1484,7 +1484,7 @@ static int wma_decode_frame(WMADecodeContext *s, int32_t *samples)
|
||||||
/* Initialise the superframe decoding */
|
/* Initialise the superframe decoding */
|
||||||
|
|
||||||
int wma_decode_superframe_init(WMADecodeContext* s,
|
int wma_decode_superframe_init(WMADecodeContext* s,
|
||||||
uint8_t *buf, /*input*/
|
const uint8_t *buf, /*input*/
|
||||||
int buf_size)
|
int buf_size)
|
||||||
{
|
{
|
||||||
if (buf_size==0)
|
if (buf_size==0)
|
||||||
|
|
@ -1500,7 +1500,7 @@ int wma_decode_superframe_init(WMADecodeContext* s,
|
||||||
if (s->use_bit_reservoir)
|
if (s->use_bit_reservoir)
|
||||||
{
|
{
|
||||||
/* read super frame header */
|
/* read super frame header */
|
||||||
get_bits(&s->gb, 4); /* super frame index */
|
skip_bits(&s->gb, 4); /* super frame index */
|
||||||
s->nb_frames = get_bits(&s->gb, 4);
|
s->nb_frames = get_bits(&s->gb, 4);
|
||||||
|
|
||||||
if (s->last_superframe_len == 0)
|
if (s->last_superframe_len == 0)
|
||||||
|
|
@ -1523,7 +1523,7 @@ int wma_decode_superframe_init(WMADecodeContext* s,
|
||||||
|
|
||||||
int wma_decode_superframe_frame(WMADecodeContext* s,
|
int wma_decode_superframe_frame(WMADecodeContext* s,
|
||||||
int32_t* samples, /*output*/
|
int32_t* samples, /*output*/
|
||||||
uint8_t *buf, /*input*/
|
const uint8_t *buf, /*input*/
|
||||||
int buf_size)
|
int buf_size)
|
||||||
{
|
{
|
||||||
int pos, len;
|
int pos, len;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue