diff mbox series

[FFmpeg-devel,6/7] avcodec/pgxdec: Use unsigned types for unsigned values

Message ID AS8PR01MB794483BCE05AC5494E0836428FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com
State Accepted
Commit a655b0a50656326d9b0bcec9df3b5a0f4c32da15
Headers show
Series [FFmpeg-devel,1/7] avcodec/pgxdec: Make better use of size check | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 24, 2022, 4:42 a.m. UTC
Both AV_PIX_FMT_GRAY8 and AV_PIX_FMT_GRAY16 use unsigned values,
not signed ones. The fact that the input might be signed
in some cases in the original format doesn't change this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/pgxdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol April 24, 2022, 11:16 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavcodec/pgxdec.c b/libavcodec/pgxdec.c
index 29de103167..52e2c2a36c 100644
--- a/libavcodec/pgxdec.c
+++ b/libavcodec/pgxdec.c
@@ -107,8 +107,8 @@  error:
         }                                                                                   \
     }                                                                                       \
 
-WRITE_FRAME(8, int8_t, byte)
-WRITE_FRAME(16, int16_t, be16)
+WRITE_FRAME(8, uint8_t, byte)
+WRITE_FRAME(16, uint16_t, be16)
 
 static int pgx_decode_frame(AVCodecContext *avctx, AVFrame *p,
                             int *got_frame, AVPacket *avpkt)