ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@gmail.com> | Sat Jul 20 15:51:25 2019 +0200| [b56031b992abc9953d8a774faa1ed36cf599162d] | committer: Michael Niedermayer
vp3data: Make some arrays unsigned to prevent overflow Some of the VP3 arrays (namely vp31_intra_y_dequant, vp31_intra_c_dequant and vp31_inter_dequant) are currently declared as array of (const) int8_t despite them being only used to directly initialize an array of uint8_t. vp31_inter_dequant even contains the value 128 which is not representible in int8_t and might generate overflow warnings by compilers. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> Reviewed-by: Peter Ross <pr...@xvid.org> Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b56031b992abc9953d8a774faa1ed36cf599162d --- libavcodec/vp3data.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp3data.h b/libavcodec/vp3data.h index d520a10c76..3f24d5f7f6 100644 --- a/libavcodec/vp3data.h +++ b/libavcodec/vp3data.h @@ -26,7 +26,7 @@ /* these coefficients dequantize intraframe Y plane coefficients * (note: same as JPEG) */ -static const int8_t vp31_intra_y_dequant[64] = { +static const uint8_t vp31_intra_y_dequant[64] = { 16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, @@ -39,7 +39,7 @@ static const int8_t vp31_intra_y_dequant[64] = { /* these coefficients dequantize intraframe C plane coefficients * (note: same as JPEG) */ -static const int8_t vp31_intra_c_dequant[64] = { +static const uint8_t vp31_intra_c_dequant[64] = { 17, 18, 24, 47, 99, 99, 99, 99, 18, 21, 26, 66, 99, 99, 99, 99, 24, 26, 56, 99, 99, 99, 99, 99, @@ -51,7 +51,7 @@ static const int8_t vp31_intra_c_dequant[64] = { }; /* these coefficients dequantize interframe coefficients (all planes) */ -static const int8_t vp31_inter_dequant[64] = { +static const uint8_t vp31_inter_dequant[64] = { 16, 16, 16, 20, 24, 28, 32, 40, 16, 16, 20, 24, 28, 32, 40, 48, 16, 20, 24, 28, 32, 40, 48, 64, _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".