Coverage Report

Created: 2025-07-16 07:53

/usr/local/include/OpenEXR/ImfTileDescription.h
Line
Count
Source (jump to first uncovered line)
1
//
2
// SPDX-License-Identifier: BSD-3-Clause
3
// Copyright (c) Contributors to the OpenEXR Project.
4
//
5
6
#ifndef INCLUDED_IMF_TILE_DESCRIPTION_H
7
#define INCLUDED_IMF_TILE_DESCRIPTION_H
8
9
//-----------------------------------------------------------------------------
10
//
11
//  class TileDescription and enum LevelMode
12
//
13
//-----------------------------------------------------------------------------
14
#include "ImfExport.h"
15
#include "ImfNamespace.h"
16
17
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
18
19
enum IMF_EXPORT_ENUM LevelMode
20
{
21
    ONE_LEVEL     = 0,
22
    MIPMAP_LEVELS = 1,
23
    RIPMAP_LEVELS = 2,
24
25
    NUM_LEVELMODES // number of different level modes
26
};
27
28
enum IMF_EXPORT_ENUM LevelRoundingMode
29
{
30
    ROUND_DOWN = 0,
31
    ROUND_UP   = 1,
32
33
    NUM_ROUNDINGMODES // number of different rounding modes
34
};
35
36
class IMF_EXPORT_TYPE TileDescription
37
{
38
public:
39
    unsigned int      xSize; // size of a tile in the x dimension
40
    unsigned int      ySize; // size of a tile in the y dimension
41
    LevelMode         mode;
42
    LevelRoundingMode roundingMode;
43
44
    TileDescription (
45
        unsigned int      xs = 32,
46
        unsigned int      ys = 32,
47
        LevelMode         m  = ONE_LEVEL,
48
        LevelRoundingMode r  = ROUND_DOWN)
49
        : xSize (xs), ySize (ys), mode (m), roundingMode (r)
50
    {
51
        // empty
52
    }
53
54
    bool operator== (const TileDescription& other) const
55
0
    {
56
0
        return xSize == other.xSize && ySize == other.ySize &&
57
0
               mode == other.mode && roundingMode == other.roundingMode;
58
0
    }
59
};
60
61
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
62
63
#endif