Commit c27f2fb3 authored by mikhal@webrtc.org's avatar mikhal@webrtc.org

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
parent ed6edcab
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment