26 lines
703 B
C
26 lines
703 B
C
#ifndef MEDIA_H
|
|
#define MEDIA_H
|
|
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <QImage>
|
|
#include <QLabel>
|
|
#include <QDebug>
|
|
|
|
#include "../RecvDataHandler/RecvDataHandler.h"
|
|
#include "../RecvDataHandler/SerialRecvDataHandler.h"
|
|
|
|
#define YUV420 1
|
|
#define YUV422 2
|
|
|
|
// YUV 转换为 RGB 的辅助函数
|
|
void yuvToRgb(int y, int u, int v, int& r, int& g, int& b);
|
|
|
|
QByteArray convertQImageToYUV422(const QImage& image);
|
|
QByteArray convertQImageToYUV420(const QImage& image);
|
|
// 转换YUV422
|
|
QImage convertYUV422ToQImage(const QByteArray& yuv422Data, int width, int height);
|
|
QImage convertYUV420ToQImage(const QByteArray& yuv420Data, int width, int height);
|
|
|
|
#endif // MEDIA_H
|