Commit c1c3916c authored by Jai Luthra's avatar Jai Luthra Committed by Paul B Mahol

mlpenc: fix lossless check error in number_sbits

we need two bits instead of one bit to represent -1 in bitstream
Signed-off-by: 's avatarJai Luthra <me@jailuthra.in>
parent efee86fa
......@@ -466,7 +466,7 @@ static void default_decoding_params(MLPEncodeContext *ctx,
*/
static int inline number_sbits(int number)
{
if (number < 0)
if (number < -1)
number++;
return av_log2(FFABS(number)) + 1 + !!number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment