diff mbox series

[FFmpeg-devel,32/41] avcodec/adpcm_data: Fix type mismatch for ff_adpcm_afc_coeffs

Message ID VI1PR0301MB2159E69A8F3C7DAD56768E6C8F0E9@VI1PR0301MB2159.eurprd03.prod.outlook.com
State Accepted
Commit ac5bd4e41a01eb45c2909e98d68a434ac58a32e5
Headers show
Series [FFmpeg-devel,01/41] avformat/Makefile: Add missing rawdec dependency for IPU demuxer | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt June 17, 2021, 2:31 a.m. UTC
According to the header it is an array of int16_t, yet it is declared as
uint16_t. Fix this by using int16_t troughout and convert the definition
to use values in the range of int16_t.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/adpcm_data.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/adpcm_data.c b/libavcodec/adpcm_data.c
index 768a18a378..4c81799bd0 100644
--- a/libavcodec/adpcm_data.c
+++ b/libavcodec/adpcm_data.c
@@ -106,9 +106,9 @@  const int8_t ff_adpcm_yamaha_difflookup[] = {
     -1, -3, -5, -7, -9, -11, -13, -15
 };
 
-const uint16_t ff_adpcm_afc_coeffs[2][16] = {
-    { 0, 2048, 0, 1024, 4096, 3584, 3072, 4608, 4200, 4800, 5120, 2048, 1024, 64512, 64512, 63488 },
-    { 0, 0, 2048, 1024, 63488, 64000, 64512, 62976, 63288, 63236, 62464, 63488, 64512, 1024, 0, 0 }
+const int16_t ff_adpcm_afc_coeffs[2][16] = {
+    { 0, 2048, 0, 1024, 4096, 3584, 3072, 4608, 4200, 4800, 5120, 2048, 1024, -1024, -1024, -2048 },
+    { 0, 0, 2048, 1024, -2048, -1536, -1024, -2560, -2248, -2300, -3072, -2048, -1024, 1024, 0, 0 }
 };
 
 const int16_t ff_adpcm_mtaf_stepsize[32][16] = {