forked from microsoft/WPF-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathycbcrpixelformatconverter.h
44 lines (39 loc) · 1.62 KB
/
ycbcrpixelformatconverter.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//----------------------------------------------------------------------------------------
// THIS CODE AND INFORMATION IS PROVIDED "AS-IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// Description: Declaration of YCbCrPixelFormatConverter
//----------------------------------------------------------------------------------------
#pragma once
extern const GUID CLSID_YCbCrPixelFormatConverter;
class YCbCrPixelFormatConverter : public BasePixelFormatConverter
{
public:
YCbCrPixelFormatConverter();
STDMETHOD(CanConvert)(
/* [in] */ REFWICPixelFormatGUID srcPixelFormat,
/* [in] */ REFWICPixelFormatGUID dstPixelFormat,
/* [out] */ BOOL *pfCanConvert);
STDMETHOD(CopyPixels)(
/* [in] */ const WICRect *prc,
/* [in] */ UINT cbStride,
/* [in] */ UINT cbPixelsSize,
/* [out] */ BYTE *pbPixels);
//Additional Functions
private :
HRESULT ConvertYCbCrToRgb(
/* [in] */ const WICRect *prc,
/* [in] */ UINT cbStride,
/* [in] */ UINT cbPixelsSize,
/* [out] */ BYTE *pbPixels);
HRESULT ConvertRgbToYCbCr(
/* [in] */ const WICRect *prc,
/* [in] */ UINT cbStride,
/* [in] */ UINT cbPixelsSize,
/* [out] */ BYTE *pbPixels);
};