File: color_context.hh

package info (click to toggle)
lepton 1.2.1+20170405-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 53,248 kB
  • ctags: 3,431
  • sloc: cpp: 24,345; ansic: 7,872; python: 330; makefile: 246; sh: 92; perl: 30
file content (25 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (2)
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
#ifndef _COLOR_CONTEXT_HH_
#define _COLOR_CONTEXT_HH_

enum class BlockType { Y, Cb, Cr
#ifdef ALLOW_FOUR_COLORS
        , Ck
#endif
        };

class AlignedBlock;

struct BlockColorContext {
    uint8_t color; // 0 for Y 1 for Cb and 2 for Cr, 3 for (K in CMYK)
#ifdef USE_COLOR_VALUES
    const AlignedBlock *luminance[2][2];
    const AlignedBlock *chroma;
#endif
};
struct BlockColorContextIndices {
#ifdef USE_COLOR_VALUES
    Optional<std::pair<int, int> > luminanceIndex[2][2];
    Optional<std::pair<int, int> > chromaIndex;
#endif
};
#endif