You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
ape: Use unsigned integer maths
This involves a division that should be a shift. Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
committed by
Diego Biurrun
parent
cbc7d60afa
commit
706b998cdc
@ -393,7 +393,7 @@ static inline int range_get_symbol(APEContext *ctx,
|
|||||||
}
|
}
|
||||||
/** @} */ // group rangecoder
|
/** @} */ // group rangecoder
|
||||||
|
|
||||||
static inline void update_rice(APERice *rice, int x)
|
static inline void update_rice(APERice *rice, unsigned int x)
|
||||||
{
|
{
|
||||||
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
|
int lim = rice->k ? (1 << (rice->k + 4)) : 0;
|
||||||
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
|
rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
|
||||||
@ -406,7 +406,7 @@ static inline void update_rice(APERice *rice, int x)
|
|||||||
|
|
||||||
static inline int ape_decode_value(APEContext *ctx, APERice *rice)
|
static inline int ape_decode_value(APEContext *ctx, APERice *rice)
|
||||||
{
|
{
|
||||||
int x, overflow;
|
unsigned int x, overflow;
|
||||||
|
|
||||||
if (ctx->fileversion < 3990) {
|
if (ctx->fileversion < 3990) {
|
||||||
int tmpk;
|
int tmpk;
|
||||||
|
Reference in New Issue
Block a user