Replace MathUtil::Clamp with its std counterpart
This commit is contained in:
parent
14878a17d9
commit
7a3e126a4f
17 changed files with 49 additions and 72 deletions
|
@ -5,7 +5,6 @@
|
|||
#include <cstring>
|
||||
#include <QImage>
|
||||
#include "citra_qt/camera/camera_util.h"
|
||||
#include "common/math_util.h"
|
||||
#include "core/frontend/camera/factory.h"
|
||||
#include "core/frontend/camera/interface.h"
|
||||
|
||||
|
@ -191,9 +190,10 @@ std::vector<u16> Rgb2Yuv(const QImage& source, int width, int height) {
|
|||
if (write) {
|
||||
pu = (pu + u) / 2;
|
||||
pv = (pv + v) / 2;
|
||||
using MathUtil::Clamp;
|
||||
*(dest++) = static_cast<u16>(Clamp(py, 0, 0xFF) | (Clamp(pu, 0, 0xFF) << 8));
|
||||
*(dest++) = static_cast<u16>(Clamp(y, 0, 0xFF) | (Clamp(pv, 0, 0xFF) << 8));
|
||||
*(dest++) =
|
||||
static_cast<u16>(std::clamp(py, 0, 0xFF) | (std::clamp(pu, 0, 0xFF) << 8));
|
||||
*(dest++) =
|
||||
static_cast<u16>(std::clamp(y, 0, 0xFF) | (std::clamp(pv, 0, 0xFF) << 8));
|
||||
} else {
|
||||
py = y;
|
||||
pu = u;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue