Fix ConvertI420ToRGB565 bug
BUG= TEST=test on android Review URL: https://webrtc-codereview.appspot.com/541005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2150 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
e7ac5fde72
commit
85b089a0ca
@ -165,13 +165,13 @@ int ConvertI420ToRGB565(const uint8_t* src_frame,
|
||||
int width, int height) {
|
||||
int abs_height = (height < 0) ? -height : height;
|
||||
const uint8_t* yplane = src_frame;
|
||||
const uint8_t* uplane = src_frame + width * abs_height;
|
||||
const uint8_t* vplane = uplane + (width * abs_height / 4);
|
||||
const uint8_t* uplane = yplane + width * abs_height;
|
||||
const uint8_t* vplane = uplane + (width + 1) / 2 * (abs_height + 1) / 2;
|
||||
|
||||
return libyuv::I420ToRGB565(yplane, width,
|
||||
uplane, width / 2,
|
||||
vplane, width / 2,
|
||||
dst_frame, width,
|
||||
uplane, (width + 1) / 2,
|
||||
vplane, (width + 1) / 2,
|
||||
dst_frame, width * 2,
|
||||
width, height);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user