Clean up the included sample code
This commit is contained in:
Родитель
90d5a306b0
Коммит
0b559a1ab5
|
@ -6,7 +6,6 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <atlbase.h> // Contains the declaration of CComPtr.
|
#include <atlbase.h> // Contains the declaration of CComPtr.
|
||||||
|
|
||||||
|
|
||||||
PCWSTR szTitle = L"BasicPlayback";
|
PCWSTR szTitle = L"BasicPlayback";
|
||||||
PCWSTR szWindowClass = L"MFBASICPLAYBACK";
|
PCWSTR szWindowClass = L"MFBASICPLAYBACK";
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ LearningModel SegmentModel::GetForeground(long n, long c, long h, long w)
|
||||||
return builder.CreateModel();
|
return builder.CreateModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
LearningModel SegmentModel::Normalize0_1ThenZScore(long h, long w, long c, const std::vector<float>& means, const std::vector<float>& stddev)
|
LearningModel SegmentModel::Normalize0_1ThenZScore(long h, long w, long c, const std::array<float, 3>& means, const std::array<float, 3>& stddev)
|
||||||
{
|
{
|
||||||
assert(means.size() == c);
|
assert(means.size() == c);
|
||||||
assert(stddev.size() == c);
|
assert(stddev.size() == c);
|
||||||
|
@ -286,7 +286,7 @@ LearningModel SegmentModel::ReshapeFlatBufferToNCHW(long n, long c, long h, long
|
||||||
{
|
{
|
||||||
auto builder = LearningModelBuilder::Create(11)
|
auto builder = LearningModelBuilder::Create(11)
|
||||||
// Loading in buffers and reshape
|
// Loading in buffers and reshape
|
||||||
.Inputs().Add(LearningModelBuilder::CreateTensorFeatureDescriptor(L"Input", TensorKind::UInt8, ({ 1, n * c * h * w })))
|
.Inputs().Add(LearningModelBuilder::CreateTensorFeatureDescriptor(L"Input", TensorKind::UInt8, { 1, n * c * h * w }))
|
||||||
.Outputs().Add(LearningModelBuilder::CreateTensorFeatureDescriptor(L"Output", TensorKind::Float, {n, c, h, w}))
|
.Outputs().Add(LearningModelBuilder::CreateTensorFeatureDescriptor(L"Output", TensorKind::Float, {n, c, h, w}))
|
||||||
.Operators().Add(LearningModelOperator((L"Cast"))
|
.Operators().Add(LearningModelOperator((L"Cast"))
|
||||||
.SetInput(L"input", L"Input")
|
.SetInput(L"input", L"Input")
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "TransformBlur.h"
|
#include "TransformBlur.h"
|
||||||
|
|
||||||
|
|
||||||
#define CHECK_HR(hr) if (FAILED(hr)) { goto done; }
|
#define CHECK_HR(hr) if (FAILED(hr)) { goto done; }
|
||||||
// Video FOURCC codes.
|
// Video FOURCC codes.
|
||||||
const FOURCC FOURCC_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2');
|
const FOURCC FOURCC_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2');
|
||||||
|
@ -90,7 +89,6 @@ TransformBlur::~TransformBlur()
|
||||||
m_pD3DDeviceManager->CloseDeviceHandle(m_pHandle);
|
m_pD3DDeviceManager->CloseDeviceHandle(m_pHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// IUnknown methods
|
// IUnknown methods
|
||||||
ULONG TransformBlur::AddRef()
|
ULONG TransformBlur::AddRef()
|
||||||
{
|
{
|
||||||
|
|
|
@ -115,15 +115,9 @@ bool AreComObjectsEqual(T1 *p1, T2 *p2)
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "mfutils.h"
|
|
||||||
#include "asyncCB.h"
|
#include "asyncCB.h"
|
||||||
#include "BufferLock.h"
|
#include "BufferLock.h"
|
||||||
//#include "ClassFactory.h"
|
|
||||||
#include "critsec.h"
|
#include "critsec.h"
|
||||||
//#include "GrowArray.h"
|
|
||||||
//#include "linklist.h"
|
|
||||||
#include "mediatype.h"
|
#include "mediatype.h"
|
||||||
//#include "propvar.h"
|
|
||||||
//#include "TinyMap.h"
|
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
#include "logmediatype.h"
|
#include "logmediatype.h"
|
Загрузка…
Ссылка в новой задаче