Libyuv: Bug fix in format_conversion

Review URL: http://webrtc-codereview.appspot.com/215005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@24 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
mikhal@webrtc.org 2011-10-12 23:31:17 +00:00
parent ed6edcab8b
commit c27f2fb3b0

View File

@ -298,7 +298,7 @@ void BayerRGBToARGB(const uint8* src, int src_pitch, uint32 src_fourcc,
colours >>= 8;
Position pos = GetPosition(x1 + x2, y1 + y2, width, height);
const uint8* src_pixel = &src[y2 * src_pitch + x2];
const uint8* dst_pixel = &dst[y2 * dst_pitch + x2 * 4];
uint8* dst_pixel = &dst[y2 * dst_pitch + x2 * 4];
// Convert from Bayer RGB to regular RGB.
if (pos == MIDDLE) {
@ -319,10 +319,10 @@ void BayerRGBToARGB(const uint8* src, int src_pitch, uint32 src_fourcc,
}
// Store ARGB
dst[0] = b;
dst[1] = g;
dst[2] = r;
dst[3] = 255u;
dst_pixel[0] = b;
dst_pixel[1] = g;
dst_pixel[2] = r;
dst_pixel[3] = 255u;
}
}
src += 2;