mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avcodec/mlpenc: fix regression in encoding only zeroes
Previously it would use more bits than neccessary.
This commit is contained in:
parent
9c1294eadd
commit
394106a138
@ -452,7 +452,7 @@ static void default_decoding_params(MLPEncodeContext *ctx, DecodingParams *decod
|
||||
*/
|
||||
static int inline number_sbits(int32_t n)
|
||||
{
|
||||
return 33 - ff_clz(FFABS(n)|1);
|
||||
return 33 - ff_clz(FFABS(n)|1) - !n;
|
||||
}
|
||||
|
||||
enum InputBitDepth {
|
||||
|
Loading…
x
Reference in New Issue
Block a user