C89 and 16-bit fixes
This commit is contained in:
parent
54669dc89b
commit
5a70097d79
2 changed files with 12 additions and 8 deletions
|
@ -619,7 +619,9 @@ void quant_bands_stereo(const CELTMode *m, celt_norm_t * restrict X, celt_norm_t
|
||||||
/* If pitch isn't available, use intra-frame prediction */
|
/* If pitch isn't available, use intra-frame prediction */
|
||||||
if ((eBands[i] >= m->pitchEnd && fold) || (q1+q2)<=0)
|
if ((eBands[i] >= m->pitchEnd && fold) || (q1+q2)<=0)
|
||||||
{
|
{
|
||||||
int K[2] = {q1, q2};
|
int K[2];
|
||||||
|
K[0] = q1;
|
||||||
|
K[1] = q2;
|
||||||
intra_fold(m, X+C*eBands[i], eBands[i+1]-eBands[i], K, norm, P+C*eBands[i], eBands[i], B);
|
intra_fold(m, X+C*eBands[i], eBands[i+1]-eBands[i], K, norm, P+C*eBands[i], eBands[i], B);
|
||||||
deinterleave(P+C*eBands[i], C*N);
|
deinterleave(P+C*eBands[i], C*N);
|
||||||
} else if (pitch_used && eBands[i] < m->pitchEnd) {
|
} else if (pitch_used && eBands[i] < m->pitchEnd) {
|
||||||
|
@ -890,7 +892,9 @@ void unquant_bands_stereo(const CELTMode *m, celt_norm_t * restrict X, celt_norm
|
||||||
/* If pitch isn't available, use intra-frame prediction */
|
/* If pitch isn't available, use intra-frame prediction */
|
||||||
if ((eBands[i] >= m->pitchEnd && fold) || (q1+q2)<=0)
|
if ((eBands[i] >= m->pitchEnd && fold) || (q1+q2)<=0)
|
||||||
{
|
{
|
||||||
int K[2] = {q1, q2};
|
int K[2];
|
||||||
|
K[0] = q1;
|
||||||
|
K[1] = q2;
|
||||||
intra_fold(m, X+C*eBands[i], eBands[i+1]-eBands[i], K, norm, P+C*eBands[i], eBands[i], B);
|
intra_fold(m, X+C*eBands[i], eBands[i+1]-eBands[i], K, norm, P+C*eBands[i], eBands[i], B);
|
||||||
deinterleave(P+C*eBands[i], C*N);
|
deinterleave(P+C*eBands[i], C*N);
|
||||||
} else if (pitch_used && eBands[i] < m->pitchEnd) {
|
} else if (pitch_used && eBands[i] < m->pitchEnd) {
|
||||||
|
|
|
@ -426,13 +426,13 @@ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig_t
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FLAG_NONE 0
|
#define FLAG_NONE 0
|
||||||
#define FLAG_INTRA 1U<<16
|
#define FLAG_INTRA (1U<<13)
|
||||||
#define FLAG_PITCH 1U<<15
|
#define FLAG_PITCH (1U<<12)
|
||||||
#define FLAG_SHORT 1U<<14
|
#define FLAG_SHORT (1U<<11)
|
||||||
#define FLAG_FOLD 1U<<13
|
#define FLAG_FOLD (1U<<10)
|
||||||
#define FLAG_MASK (FLAG_INTRA|FLAG_PITCH|FLAG_SHORT|FLAG_FOLD)
|
#define FLAG_MASK (FLAG_INTRA|FLAG_PITCH|FLAG_SHORT|FLAG_FOLD)
|
||||||
|
|
||||||
celt_int32_t flaglist[8] = {
|
int flaglist[8] = {
|
||||||
0 /*00 */ | FLAG_FOLD,
|
0 /*00 */ | FLAG_FOLD,
|
||||||
1 /*01 */ | FLAG_PITCH|FLAG_FOLD,
|
1 /*01 */ | FLAG_PITCH|FLAG_FOLD,
|
||||||
8 /*1000*/ | FLAG_NONE,
|
8 /*1000*/ | FLAG_NONE,
|
||||||
|
@ -1034,7 +1034,7 @@ int celt_encoder_ctl(CELTEncoder * restrict st, int request, ...)
|
||||||
break;
|
break;
|
||||||
case CELT_SET_VBR_RATE_REQUEST:
|
case CELT_SET_VBR_RATE_REQUEST:
|
||||||
{
|
{
|
||||||
int value = va_arg(ap, celt_int32_t);
|
celt_int32_t value = va_arg(ap, celt_int32_t);
|
||||||
if (value<0)
|
if (value<0)
|
||||||
goto bad_arg;
|
goto bad_arg;
|
||||||
if (value>3072000)
|
if (value>3072000)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue