[FFmpeg-cvslog] avcodec/sgirledec: fix () in RBG323_TO_BGR8() macro

Michael Niedermayer git at videolan.org
Mon May 26 00:18:40 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 25 23:08:51 2014 +0200| [b0d0e29ffbd42f9feb358718cfe6a90608b69ecf] | committer: Michael Niedermayer

avcodec/sgirledec: fix () in RBG323_TO_BGR8() macro

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0d0e29ffbd42f9feb358718cfe6a90608b69ecf
---

 libavcodec/sgirledec.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/sgirledec.c b/libavcodec/sgirledec.c
index 5e2cd3a..69d012e 100644
--- a/libavcodec/sgirledec.c
+++ b/libavcodec/sgirledec.c
@@ -49,9 +49,9 @@ static av_cold int sgirle_decode_init(AVCodecContext *avctx)
  * Convert SGI RBG323 pixel into AV_PIX_FMT_BGR8
  * SGI RGB data is packed as 8bpp, (msb)3R 2B 3G(lsb)
  */
-#define RBG323_TO_BGR8(x) (((x << 3) & 0xC0) |                                \
-                           ((x << 3) & 0x38) |                                \
-                           ((x >> 5) & 7))
+#define RBG323_TO_BGR8(x) ((((x) << 3) & 0xC0) |                                \
+                           (((x) << 3) & 0x38) |                                \
+                           (((x) >> 5) & 7))
 static av_always_inline
 void rbg323_to_bgr8(uint8_t *dst, const uint8_t *src, int size)
 {



More information about the ffmpeg-cvslog mailing list