提交 5290004d 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!105 gralloc:rgb_to_yv12

Merge pull request !105 from 赵鹏元/master
......@@ -96,8 +96,8 @@ void rgb565_to_yv12(char *dest, char *src, int width, int height, int left, int
yv12_y[i] = clamp_rgb((77 * R + 150 * G + 29 * B) >> 8);
bool ieven = (i & 1) == 0;
if (jeven && ieven) {
yv12_u[i] = clamp_rgb(((-43 * R - 85 * G + 128 * B) >> 8) + 128);
yv12_v[i] = clamp_rgb(((128 * R - 107 * G - 21 * B) >> 8) + 128);
yv12_u[i/2] = clamp_rgb(((-43 * R - 85 * G + 128 * B) >> 8) + 128);
yv12_v[i/2] = clamp_rgb(((128 * R - 107 * G - 21 * B) >> 8) + 128);
}
}
}
......@@ -132,8 +132,8 @@ void rgb888_to_yv12(char *dest, char *src, int width, int height, int left, int
yv12_y[i] = clamp_rgb((77 * R + 150 * G + 29 * B) >> 8);
bool ieven = (i & 1) == 0;
if (jeven && ieven) {
yv12_u[i] = clamp_rgb(((-43 * R - 85 * G + 128 * B) >> 8) + 128);
yv12_v[i] = clamp_rgb(((128 * R - 107 * G - 21 * B) >> 8) + 128);
yv12_u[i/2] = clamp_rgb(((-43 * R - 85 * G + 128 * B) >> 8) + 128);
yv12_v[i/2] = clamp_rgb(((128 * R - 107 * G - 21 * B) >> 8) + 128);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册