Clean up the included sample code

This commit is contained in:
Linnea May 2021-11-17 12:37:20 -08:00
Родитель 90d5a306b0
Коммит 0b559a1ab5
4 изменённых файлов: 2 добавлений и 11 удалений

Просмотреть файл

@ -6,7 +6,6 @@
#include <vector>
#include <atlbase.h> // Contains the declaration of CComPtr.
PCWSTR szTitle = L"BasicPlayback";
PCWSTR szWindowClass = L"MFBASICPLAYBACK";

Просмотреть файл

@ -251,7 +251,7 @@ LearningModel SegmentModel::GetForeground(long n, long c, long h, long w)
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(stddev.size() == c);
@ -286,7 +286,7 @@ LearningModel SegmentModel::ReshapeFlatBufferToNCHW(long n, long c, long h, long
{
auto builder = LearningModelBuilder::Create(11)
// 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}))
.Operators().Add(LearningModelOperator((L"Cast"))
.SetInput(L"input", L"Input")

Просмотреть файл

@ -1,6 +1,5 @@
#include "TransformBlur.h"
#define CHECK_HR(hr) if (FAILED(hr)) { goto done; }
// Video FOURCC codes.
const FOURCC FOURCC_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2');
@ -90,7 +89,6 @@ TransformBlur::~TransformBlur()
m_pD3DDeviceManager->CloseDeviceHandle(m_pHandle);
}
// IUnknown methods
ULONG TransformBlur::AddRef()
{

Просмотреть файл

@ -115,15 +115,9 @@ bool AreComObjectsEqual(T1 *p1, T2 *p2)
#include <assert.h>
#include "mfutils.h"
#include "asyncCB.h"
#include "BufferLock.h"
//#include "ClassFactory.h"
#include "critsec.h"
//#include "GrowArray.h"
//#include "linklist.h"
#include "mediatype.h"
//#include "propvar.h"
//#include "TinyMap.h"
#include "trace.h"
#include "logmediatype.h"