@@ -3133,15 +3133,15 @@ static void JPEGPixelRGB(uint32_t *pDest, int iY, int iCb, int iCr)
31333133 i32 = ((iCBB + iY) >> 12 );
31343134 if (i32 < 0 ) i32 = 0 ;
31353135 else if (i32 > 255 ) i32 = 255 ;
3136- u32Pixel |= (uint32_t )i32 ; // blue
3136+ u32Pixel |= (uint32_t )( i32 << 16 ) ; // blue
31373137 i32 = ((iCBG + iCRG + iY) >> 12 ); // green pixel
31383138 if (i32 < 0 ) i32 = 0 ;
31393139 else if (i32 > 255 ) i32 = 255 ;
31403140 u32Pixel |= (uint32_t )(i32 << 8 );
31413141 i32 = ((iCRR + iY) >> 12 ); // red pixel
31423142 if (i32 < 0 ) i32 = 0 ;
31433143 else if (i32 > 255 ) i32 = 255 ;
3144- u32Pixel |= (uint32_t )(i32 << 16 );
3144+ u32Pixel |= (uint32_t )(i32 );
31453145 pDest[0 ] = u32Pixel;
31463146} /* JPEGPixelRGB() */
31473147
@@ -3221,28 +3221,28 @@ static void JPEGPixel2RGB(uint32_t *pDest, int32_t iY1, int32_t iY2, int32_t iCb
32213221 if (i32 < 0 ) i32 = 0 ;
32223222 else if (i32 > 255 ) i32 = 255 ;
32233223 u32Pixel1 = u32Pixel2 = 0xff000000 ; // Alpha = 255
3224- u32Pixel1 |= (uint32_t )i32 ; // blue
3224+ u32Pixel1 |= (uint32_t )( i32 << 16 ) ; // blue
32253225 i32 = ((iCBG + iCRG + iY1) >> 12 ); // green pixel
32263226 if (i32 < 0 ) i32 = 0 ;
32273227 else if (i32 > 255 ) i32 = 255 ;
32283228 u32Pixel1 |= (uint32_t )(i32 << 8 ); // green
32293229 i32 = ((iCRR + iY1) >> 12 ); // red pixel
32303230 if (i32 < 0 ) i32 = 0 ;
32313231 else if (i32 > 255 ) i32 = 255 ;
3232- u32Pixel1 |= (uint32_t )( i32 << 16 ) ; // red
3232+ u32Pixel1 |= (uint32_t )i32 ; // red
32333233
32343234 i32 = ((iCBB + iY2) >> 12 ); // blue pixel
32353235 if (i32 < 0 ) i32 = 0 ;
32363236 else if (i32 > 255 ) i32 = 255 ;
3237- u32Pixel2 |= (uint32_t )i32 ;
3237+ u32Pixel2 |= (uint32_t )( i32 << 16 ) ;
32383238 i32 = ((iCBG + iCRG + iY2) >> 12 ); // green pixel
32393239 if (i32 < 0 ) i32 = 0 ;
32403240 else if (i32 > 255 ) i32 = 255 ;
32413241 u32Pixel2 |= (uint32_t )(i32 << 8 );
32423242 i32 = ((iCRR + iY2) >> 12 ); // red pixel
32433243 if (i32 < 0 ) i32 = 0 ;
32443244 else if (i32 > 255 ) i32 = 255 ;
3245- u32Pixel2 |= (uint32_t )( i32 << 16 ) ;
3245+ u32Pixel2 |= (uint32_t )i32 ;
32463246 pDest[0 ] = u32Pixel1;
32473247 pDest[1 ] = u32Pixel2;
32483248} /* JPEGPixel2RGB() */
0 commit comments