diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-10-10 10:23:06 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-10-10 10:31:37 +0200 |
commit | 394106a1384574d9dcb74c5dd5172bbc0508fa53 (patch) | |
tree | 182dc7cada454925cab2bf6c6b2d90eca64e7dbe /libavcodec/mlpenc.c | |
parent | 9c1294eaddb88cb0e044c675ccae059a85fc9c6c (diff) |
avcodec/mlpenc: fix regression in encoding only zeroes
Previously it would use more bits than neccessary.
Diffstat (limited to 'libavcodec/mlpenc.c')
-rw-r--r-- | libavcodec/mlpenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index 60a8abe929..46f6c4127a 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -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 { |