Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
- index cda14e7ac1..fbcee94195 100644
- --- a/libavcodec/mlpenc.c
- +++ b/libavcodec/mlpenc.c
- @@ -1249,7 +1249,7 @@ static void input_data_internal(MLPEncodeContext *ctx, const uint8_t *samples,
- uint32_t abs_sample;
- int32_t sample;
- - sample = is24 ? *samples_32++ >> 8 : *samples_16++ * 256U;
- + sample = is24 ? *samples_32++ >> 8 : *samples_16++ * 256;
- /* TODO Find out if number_sbits can be used for negative values. */
- abs_sample = FFABS(sample);
- @@ -1611,7 +1611,7 @@ static void no_codebook_bits(MLPEncodeContext *ctx,
- /* If all samples are the same (lsb_bits == 0), offset must be
- * adjusted because of sign_shift. */
- - offset = min + diff / 2 + !!lsb_bits;
- + offset = min + (int)(diff / 2) + !!lsb_bits;
- bo->offset = offset;
- bo->lsb_bits = lsb_bits;
- @@ -1792,7 +1792,7 @@ static void determine_bits(MLPEncodeContext *ctx)
- #define SAMPLE_MAX(bitdepth) ((1 << (bitdepth - 1)) - 1)
- #define SAMPLE_MIN(bitdepth) (~SAMPLE_MAX(bitdepth))
- -#define MSB_MASK(bits) (-(1u << (bits)))
- +#define MSB_MASK(bits) (-(int)(1u << (bits)))
- /** Applies the filter to the current samples, and saves the residual back
- * into the samples buffer. If the filter is too bad and overflows the
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement