summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/YUVSynthesizer.h
blob: 4f856dd63784db18a9e713989a5e6f79da25607e (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:

        YUVSynthesizer.h

    Abstract:

        This file contains the definition of CYUVSynthesizer.

        A Base image synthesizer for all YUV formats.  It provides a YUV color
        palette and sets up cached gradient bars.

    History:

        created 4/14/2014

**************************************************************************/

#pragma once

/*************************************************

    CYUVSynthesizer

    Image synthesizer for YUV format.

*************************************************/


class CYUVSynthesizer :
    public CSynthesizer
{
protected:
    //
    //  GetPalette
    //
    //  Get a pointer to an array of palette colors.  Used mostly to handle
    //  different color primaries.  Location of the primary must agree with
    //  Commit().
    virtual
    const UCHAR4 *
    GetPalette();

    //
    // Initialize()
    //
    //  Initialize the Gradient bmp for YUV color space.
    //
    virtual
    BOOLEAN
    Initialize();

public:

    //Default constructor
    CYUVSynthesizer (
        const CHAR *Name="[Something YUV]",
        ULONG Width=0,
        ULONG Height=0
    )
        : CSynthesizer(Name, CHANNEL_YCrCb, Width, Height)
    {}
};