magewell_helpers.cpp 580 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm

#include "magewell_helpers.hpp"

#include "MWFOURCC.h"

namespace VideoStitch {
namespace Magewell {

DWORD xiColorFormat(const PixelFormat& pixelFormat) {
  switch (pixelFormat) {
    case PixelFormat::BGRU:
      return MWFOURCC_BGRA;
    case PixelFormat::BGR:
      return MWFOURCC_BGR24;
    case PixelFormat::UYVY:
      return MWFOURCC_UYVY;
    case PixelFormat::YUY2:
      return MWFOURCC_YUYV;
    default:
      return MWFOURCC_UNK;
  }
}

}  // namespace Magewell
}  // namespace VideoStitch