从网上找的一团乱糟糟 索性自己写个吧 其实也很简单的
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