Removing some warnings
This commit is contained in:
parent
a01106587c
commit
a57e924f2e
3 changed files with 14 additions and 10 deletions
|
@ -469,7 +469,7 @@ static void haar1(celt_norm *X, int N0, int stride)
|
||||||
in two and transmit the energy difference with the two half-bands. It
|
in two and transmit the energy difference with the two half-bands. It
|
||||||
can be called recursively so bands can end up being split in 8 parts. */
|
can be called recursively so bands can end up being split in 8 parts. */
|
||||||
static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_norm *Y,
|
static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_norm *Y,
|
||||||
int N, int b, int spread, int tf_change, celt_norm *lowband, int resynth, ec_enc *ec,
|
int N, int b, int spread, int tf_change, celt_norm *lowband, int resynth, void *ec,
|
||||||
celt_int32 *remaining_bits, int LM, celt_norm *lowband_out, const celt_ener *bandE, int level)
|
celt_int32 *remaining_bits, int LM, celt_norm *lowband_out, const celt_ener *bandE, int level)
|
||||||
{
|
{
|
||||||
int q;
|
int q;
|
||||||
|
@ -502,7 +502,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
if (encode)
|
if (encode)
|
||||||
{
|
{
|
||||||
sign = x[0]<0;
|
sign = x[0]<0;
|
||||||
ec_enc_bits(ec, sign, 1);
|
ec_enc_bits((ec_enc*)ec, sign, 1);
|
||||||
} else {
|
} else {
|
||||||
sign = ec_dec_bits((ec_dec*)ec, 1);
|
sign = ec_dec_bits((ec_dec*)ec, 1);
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
if (stereo || qb>9 || spread>1)
|
if (stereo || qb>9 || spread>1)
|
||||||
{
|
{
|
||||||
if (encode)
|
if (encode)
|
||||||
ec_enc_uint(ec, itheta, (1<<qb)+1);
|
ec_enc_uint((ec_enc*)ec, itheta, (1<<qb)+1);
|
||||||
else
|
else
|
||||||
itheta = ec_dec_uint((ec_dec*)ec, (1<<qb)+1);
|
itheta = ec_dec_uint((ec_dec*)ec, (1<<qb)+1);
|
||||||
qalloc = log2_frac((1<<qb)+1,BITRES);
|
qalloc = log2_frac((1<<qb)+1,BITRES);
|
||||||
|
@ -655,7 +655,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
fs--;
|
fs--;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
ec_encode(ec, fl, fl+fs, ft);
|
ec_encode((ec_enc*)ec, fl, fl+fs, ft);
|
||||||
} else {
|
} else {
|
||||||
int fl=0;
|
int fl=0;
|
||||||
int j, fm;
|
int j, fm;
|
||||||
|
@ -744,7 +744,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
{
|
{
|
||||||
if (encode)
|
if (encode)
|
||||||
{
|
{
|
||||||
ec_enc_bits(ec, sign==1, 1);
|
ec_enc_bits((ec_enc*)ec, sign==1, 1);
|
||||||
} else {
|
} else {
|
||||||
sign = 2*ec_dec_bits((ec_dec*)ec, 1)-1;
|
sign = 2*ec_dec_bits((ec_dec*)ec, 1)-1;
|
||||||
}
|
}
|
||||||
|
@ -811,7 +811,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encode)
|
if (encode)
|
||||||
alg_quant(X, N, q, spread, lowband, resynth, ec);
|
alg_quant(X, N, q, spread, lowband, resynth, (ec_enc*)ec);
|
||||||
else
|
else
|
||||||
alg_unquant(X, N, q, spread, lowband, (ec_dec*)ec);
|
alg_unquant(X, N, q, spread, lowband, (ec_dec*)ec);
|
||||||
}
|
}
|
||||||
|
@ -884,7 +884,7 @@ static void quant_band(int encode, const CELTMode *m, int i, celt_norm *X, celt_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void quant_all_bands(int encode, const CELTMode *m, int start, celt_norm *_X, celt_norm *_Y, const celt_ener *bandE, int *pulses, int shortBlocks, int fold, int *tf_res, int resynth, int total_bits, ec_enc *ec, int LM)
|
void quant_all_bands(int encode, const CELTMode *m, int start, celt_norm *_X, celt_norm *_Y, const celt_ener *bandE, int *pulses, int shortBlocks, int fold, int *tf_res, int resynth, int total_bits, void *ec, int LM)
|
||||||
{
|
{
|
||||||
int i, remaining_bits, balance;
|
int i, remaining_bits, balance;
|
||||||
const celt_int16 * restrict eBands = m->eBands;
|
const celt_int16 * restrict eBands = m->eBands;
|
||||||
|
@ -922,7 +922,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, celt_norm *_X, ce
|
||||||
Y = NULL;
|
Y = NULL;
|
||||||
N = M*eBands[i+1]-M*eBands[i];
|
N = M*eBands[i+1]-M*eBands[i];
|
||||||
if (encode)
|
if (encode)
|
||||||
tell = ec_enc_tell(ec, BITRES);
|
tell = ec_enc_tell((ec_enc*)ec, BITRES);
|
||||||
else
|
else
|
||||||
tell = ec_dec_tell((ec_dec*)ec, BITRES);
|
tell = ec_dec_tell((ec_dec*)ec, BITRES);
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ int folding_decision(const CELTMode *m, celt_norm *X, celt_word16 *average, int
|
||||||
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
|
* @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
|
||||||
* @param enc Entropy encoder
|
* @param enc Entropy encoder
|
||||||
*/
|
*/
|
||||||
void quant_all_bands(int encode, const CELTMode *m, int start, celt_norm * X, celt_norm * Y, const celt_ener *bandE, int *pulses, int time_domain, int fold, int *tf_res, int resynth, int total_bits, ec_enc *enc, int M);
|
void quant_all_bands(int encode, const CELTMode *m, int start, celt_norm * X, celt_norm * Y, const celt_ener *bandE, int *pulses, int time_domain, int fold, int *tf_res, int resynth, int total_bits, void *enc, int M);
|
||||||
|
|
||||||
|
|
||||||
void stereo_decision(const CELTMode *m, celt_norm * restrict X, int *stereo_mode, int len, int M);
|
void stereo_decision(const CELTMode *m, celt_norm * restrict X, int *stereo_mode, int len, int M);
|
||||||
|
|
|
@ -455,10 +455,14 @@ static void encode_flags(ec_enc *enc, int intra_ener, int has_pitch, int shortBl
|
||||||
flags |= shortBlocks ? FLAG_SHORT : 0;
|
flags |= shortBlocks ? FLAG_SHORT : 0;
|
||||||
flags |= has_fold ? FLAG_FOLD : 0;
|
flags |= has_fold ? FLAG_FOLD : 0;
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
|
{
|
||||||
if (flags == (flaglist[i]&FLAG_MASK))
|
if (flags == (flaglist[i]&FLAG_MASK))
|
||||||
|
{
|
||||||
|
flag_bits = flaglist[i]&0xf;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
celt_assert(i<8);
|
celt_assert(i<8);
|
||||||
flag_bits = flaglist[i]&0xf;
|
|
||||||
/*printf ("enc %d: %d %d %d %d\n", flag_bits, intra_ener, has_pitch, shortBlocks, has_fold);*/
|
/*printf ("enc %d: %d %d %d %d\n", flag_bits, intra_ener, has_pitch, shortBlocks, has_fold);*/
|
||||||
if (i<2)
|
if (i<2)
|
||||||
ec_enc_uint(enc, flag_bits, 4);
|
ec_enc_uint(enc, flag_bits, 4);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue