从网上找的一团乱糟糟 索性自己写个吧 其实也很简单的
class yuv420_rotate
{
public:
yuv420_rotate(void);
~yuv420_rotate(void);
public:
//rotate clockwise
static void yuv_rotate_90(BYTE *des,BYTE *src,int width,int height);
static void yuv_rotate_180(BYTE *des,BYTE *src,int width,int height);
static void yuv_rotate_270(BYTE *des,BYTE *src,int width,int height);
//flip
static void yuv_flip_horizontal(BYTE *des,BYTE *src,int width,int height);
static void yuv_flip_vertical(BYTE *des,BYTE *src,int width,int height);
};
yuv420_rotate::yuv420_rotate(void)
{
}
yuv420_rotate::~yuv420_rotate(void)
{
}
void yuv420_rotate::yuv_rotate_90(BYTE *des,BYTE *src,int width,int height)
{
int n = 0;
int hw = width / 2;
int hh = height / 2;
//copy y
for(int j = 0; j < width;j++)
{
for(int i = height - 1; i >= 0; i--)
{
des[n++] = src[width *

本文详细介绍了如何处理YUV420p格式的图像旋转,通过自编代码实现图像的旋转操作,揭示其实现过程并不复杂。
最低0.47元/天 解锁文章
1475

被折叠的 条评论
为什么被折叠?



