Debian Codegraph @

src/LercLib/fpl_Predictor.h

raw symbols SCIP
1 /*
2 Copyright 2021 - 2026 Esri
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 A local copy of the license and additional notices are located with the
17 source distribution at:
18
19 http://github.com/Esri/lerc/
20
21 Analytical Raster Compression.
22 Original coding 2021 Yuriy Yakimenko
23 */
24
25 #ifndef FPL_PREDICTOR_H
26 #define FPL_PREDICTOR_H
27
28 #include "Defines.h"
29
30 NAMESPACE_LERC_START
31
32 #define MAX_DELTA 5
33
34 enum PredictorType { PREDICTOR_UNKNOWN = -1, PREDICTOR_NONE = 0, PREDICTOR_DELTA1 = 1, PREDICTOR_ROWS_COLS = 2 };
35
36 struct Predictor
37 {
38 static int getMaxByteDelta (const PredictorType p);
39
40 static PredictorType getType (const char code);
41
42 static unsigned char getCode (const PredictorType p);
43
44 static int getIntDelta (const PredictorType p);
45
46 static PredictorType fromDeltaAndCross (int delta, bool cross);
47 };
48
49 NAMESPACE_LERC_END
50 #endif