You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if there is a bug in libyuv yet, but filing one anyway
via WebRtc, the following produces too little data.
Note that a unittest converts from I420 to 565 and back ok.
The source to I420ToRGB565 looks ok. Is stride passed in correctly?
#include "common_video/libyuv/include/libyuv.h"
const static int width = 176;
const static int height = 144;
int main(int argc, char** argv) {
printf("-----main-----\n");
uint8_t src[width * height / 2 * 3];
uint8_t dst[width * height * 2];
FILE * fp;
// read yuv
fp = fopen("out.yuv", "r");
if (!fp) {
printf("fopen yuv error\n");
fclose(fp);
return 0;
}
fread(src, width*height*1.5, sizeof(char), fp);
int ret;
ret = webrtc::ConvertI420ToRGB565(src, dst, width, height);
//ret = webrtc::ConvertI420ToARGB4444(src, dst, width, height, width\
);
if (ret < 0)
printf("error\n");
// dump 565
fp = fopen("out.565", "w");
if (!fp) {
printf("fopen 565 error\n");
fclose(fp);
return 0;
}
fwrite(dst, width*height*2, sizeof(char), fp);
fclose(fp);
}
Original issue reported on code.google.com by fbarch...@google.com on 26 Apr 2012 at 1:57
The text was updated successfully, but these errors were encountered:
Hi Frank, I didn't notice you already filed one, please close issue 32, I copy
it here.
What version of the product are you using? On what operating system?
r216. I tested on android with neon code and c code, both don't work correctly.
I'm pretty sure it's a bug either in webrtc libyuv wrapper or libyuv.
The following code works fairly good,
http://blog.tomgibara.com/post/132956174/yuv420-to-rgb565-conversion-in-android.
Original comment by leozw...@google.com on 26 Apr 2012 at 5:58
Original issue reported on code.google.com by
fbarch...@google.com
on 26 Apr 2012 at 1:57The text was updated successfully, but these errors were encountered: