int transient_pos[WMALL_MAX_CHANNELS];
int seekable_tile;
- int ave_sum[WMALL_MAX_CHANNELS];
+ unsigned ave_sum[WMALL_MAX_CHANNELS];
int channel_residues[WMALL_MAX_CHANNELS][WMALL_BLOCK_MAX_SIZE];
av_assert0(avctx->channels >= 0);
if (avctx->channels > WMALL_MAX_CHANNELS) {
avpriv_request_sample(avctx,
- "More than %d channels", WMALL_MAX_CHANNELS);
+ "More than " AV_STRINGIFY(WMALL_MAX_CHANNELS) " channels");
return AVERROR_PATCHWELCOME;
}
i++;
}
for (; i < tile_size; i++) {
- int quo = 0, rem, rem_bits, residue;
+ int rem, rem_bits;
+ unsigned quo = 0, residue;
while(get_bits1(&s->gb)) {
quo++;
if (get_bits_left(&s->gb) <= 0)
s->cdlms[ch][ilms].recent, \
FFALIGN(s->cdlms[ch][ilms].order, ROUND), \
WMASIGN(residue)); \
- input = residue + (pred >> s->cdlms[ch][ilms].scaling); \
+ input = residue + (unsigned)(pred >> s->cdlms[ch][ilms].scaling); \
lms_update ## bits(s, ch, ilms, input); \
s->channel_residues[ch][icoef] = input; \
} \
pred >>= scaling;
s->channel_residues[ich][i] += (unsigned)pred;
}
- for (j = 0; j < order; j++)
- prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];
+ for (j = order - 1; j >= 0; j--)
+ if (tile_size <= j) {
+ prevvalues[j] = prevvalues[j - tile_size];
+ }else
+ prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];
}
}
if (s->bits_per_sample == 16) {
*s->samples_16[c]++ = (int16_t) s->channel_residues[c][j] * (1 << padding_zeroes);
} else {
- *s->samples_32[c]++ = s->channel_residues[c][j] * (256 << padding_zeroes);
+ *s->samples_32[c]++ = s->channel_residues[c][j] * (256U << padding_zeroes);
}
}
}