diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-08-01 10:47:07 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-08-02 09:31:54 +0200 |
commit | 131d2a3e1cd2b7687e8cf751214c3884be4c154b (patch) | |
tree | ca0d8d833b86ed8f62b2ccdf739d75b003ef44ed /libavcodec | |
parent | f7e35c81636399c8caa6e3f18f33f149a944fb7c (diff) | |
download | ffmpeg-131d2a3e1cd2b7687e8cf751214c3884be4c154b.tar.gz |
avcodec/cfhd: improve decompanding quality with reference implementation
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cfhd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index aa6e2ebee7..0327b456ac 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -117,8 +117,8 @@ static inline int dequant_and_decompand(int level, int quantisation, int codeboo { if (codebook == 0 || codebook == 1) { int64_t abslevel = abs(level); - if (level < 264) - return (abslevel + ((768 * abslevel * abslevel * abslevel) / (255 * 255 * 255))) * + if (abslevel < 256) + return (abslevel + ((768 * abslevel * abslevel * abslevel) / (256 * 256 * 256))) * FFSIGN(level) * quantisation; else return level * quantisation; |