blob: 5a5d8f709e8e7e2bf6d53c06d724adbb56044ea7 (
plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/**************************************************************************
A/V Stream Camera Sample
Copyright (c) 2014, Microsoft Corporation.
File:
RGB24Synthesizer.h
Abstract:
This file contains the definition of CRGB24Synthesizer.
CRGB24Synthesizer is derived from CXRGBSynthesizer. It uses the RGB
color space and defines a Commit() function that reformats pixels into
the RGB24 format. RGB24 uses 8 bits per primary and 3 bytes per pixel
in a single plane.
History:
created 4/14/2014
**************************************************************************/
/*************************************************
CRGB24Synthesizer
Image synthesizer for RGB24 format.
*************************************************/
class CRGB24Synthesizer
: public CXRGBSynthesizer
{
public:
//
// Default constructor
//
CRGB24Synthesizer(
LONG Width=0,
LONG Height=0
)
: CXRGBSynthesizer(Width, Height)
{
// Round up to the next full dword for a row on output.
m_OutputStride = (( Width * 3 ) + 3) & ((LONG) ~3);
m_FormatName = "RGB24";
}
//
// Commit
//
// Copy (and reformat, if necessary) pixels from the internal scratch
// buffer. If the output format decimates chrominance, do it here.
//
virtual
_Success_(return > 0)
ULONG
Commit(
_Out_writes_bytes_(Size)
PUCHAR Buffer,
_In_ ULONG Size,
_In_ ULONG Stride
);
};
|