GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
compression_shared.h
Go to the documentation of this file.
1// Copyright 2016 The Draco Authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15#ifndef DRACO_COMPRESSION_CONFIG_COMPRESSION_SHARED_H_
16#define DRACO_COMPRESSION_CONFIG_COMPRESSION_SHARED_H_
17
18#include <stdint.h>
19
20#include "draco/core/macros.h"
22
23namespace draco {
24
25// Latest Draco bit-stream version.
26static constexpr uint8_t kDracoPointCloudBitstreamVersionMajor = 2;
27static constexpr uint8_t kDracoPointCloudBitstreamVersionMinor = 3;
28static constexpr uint8_t kDracoMeshBitstreamVersionMajor = 2;
29static constexpr uint8_t kDracoMeshBitstreamVersionMinor = 2;
30
31// Concatenated latest bit-stream version.
32static constexpr uint16_t kDracoPointCloudBitstreamVersion =
33 DRACO_BITSTREAM_VERSION(kDracoPointCloudBitstreamVersionMajor,
34 kDracoPointCloudBitstreamVersionMinor);
35
36static constexpr uint16_t kDracoMeshBitstreamVersion = DRACO_BITSTREAM_VERSION(
37 kDracoMeshBitstreamVersionMajor, kDracoMeshBitstreamVersionMinor);
38
39// Currently, we support point cloud and triangular mesh encoding.
40// TODO(draco-eng) Convert enum to enum class (safety, not performance).
47
48// List of encoding methods for point clouds.
53
54// List of encoding methods for meshes.
59
60// List of various attribute encoders supported by our framework. The entries
61// are used as unique identifiers of the encoders and their values should not
62// be changed!
68
69// List of various sequential attribute encoder/decoders that can be used in our
70// pipeline. The values represent unique identifiers used by the decoder and
71// they should not be changed.
78
79// List of all prediction methods currently supported by our framework.
94
95// List of all prediction scheme transforms used by our framework.
98 // Basic delta transform where the prediction is computed as difference the
99 // predicted and original value.
101 // An improved delta transform where all computed delta values are wrapped
102 // around a fixed interval which lowers the entropy.
104 // Specialized transform for normal coordinates using inverted tiles.
106 // Specialized transform for normal coordinates using canonicalized inverted
107 // tiles.
109 // The number of valid (non-negative) prediction scheme transform types.
111};
112
113// List of all mesh traversal methods supported by Draco framework.
119
120// List of all variant of the edgebreaker method that is used for compression
121// of mesh connectivity.
127
128// Draco header V1
130 int8_t draco_string[5];
135 uint16_t flags;
136};
137
139 ONE_TRIANGLE = 0, // To be deprecated.
141};
142
143// Different methods used for symbol entropy encoding.
149
150// Mask for setting and getting the bit for metadata in |flags| of header.
151#define METADATA_FLAG_MASK 0x8000
152
153} // namespace draco
154
155#endif // DRACO_COMPRESSION_CONFIG_COMPRESSION_SHARED_H_
#define DRACO_BITSTREAM_VERSION(MAJOR, MINOR)
Definition macros.h:114
Definition attribute_octahedron_transform.cc:21
PointCloudEncodingMethod
Definition compression_shared.h:49
@ POINT_CLOUD_SEQUENTIAL_ENCODING
Definition compression_shared.h:50
@ POINT_CLOUD_KD_TREE_ENCODING
Definition compression_shared.h:51
NormalPredictionMode
Definition compression_shared.h:138
@ ONE_TRIANGLE
Definition compression_shared.h:139
@ TRIANGLE_AREA
Definition compression_shared.h:140
EncodedGeometryType
Definition compression_shared.h:41
@ TRIANGULAR_MESH
Definition compression_shared.h:44
@ INVALID_GEOMETRY_TYPE
Definition compression_shared.h:42
@ POINT_CLOUD
Definition compression_shared.h:43
@ NUM_ENCODED_GEOMETRY_TYPES
Definition compression_shared.h:45
MeshTraversalMethod
Definition compression_shared.h:114
@ MESH_TRAVERSAL_PREDICTION_DEGREE
Definition compression_shared.h:116
@ NUM_TRAVERSAL_METHODS
Definition compression_shared.h:117
@ MESH_TRAVERSAL_DEPTH_FIRST
Definition compression_shared.h:115
SequentialAttributeEncoderType
Definition compression_shared.h:72
@ SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC
Definition compression_shared.h:73
@ SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER
Definition compression_shared.h:74
@ SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION
Definition compression_shared.h:75
@ SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS
Definition compression_shared.h:76
MeshEncoderMethod
Definition compression_shared.h:55
@ MESH_SEQUENTIAL_ENCODING
Definition compression_shared.h:56
@ MESH_EDGEBREAKER_ENCODING
Definition compression_shared.h:57
PredictionSchemeTransformType
Definition compression_shared.h:96
@ NUM_PREDICTION_SCHEME_TRANSFORM_TYPES
Definition compression_shared.h:110
@ PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON_CANONICALIZED
Definition compression_shared.h:108
@ PREDICTION_TRANSFORM_WRAP
Definition compression_shared.h:103
@ PREDICTION_TRANSFORM_NONE
Definition compression_shared.h:97
@ PREDICTION_TRANSFORM_NORMAL_OCTAHEDRON
Definition compression_shared.h:105
@ PREDICTION_TRANSFORM_DELTA
Definition compression_shared.h:100
MeshEdgebreakerConnectivityEncodingMethod
Definition compression_shared.h:122
@ MESH_EDGEBREAKER_PREDICTIVE_ENCODING
Definition compression_shared.h:124
@ MESH_EDGEBREAKER_STANDARD_ENCODING
Definition compression_shared.h:123
@ MESH_EDGEBREAKER_VALENCE_ENCODING
Definition compression_shared.h:125
SymbolCodingMethod
Definition compression_shared.h:144
@ SYMBOL_CODING_TAGGED
Definition compression_shared.h:145
@ SYMBOL_CODING_RAW
Definition compression_shared.h:146
@ NUM_SYMBOL_CODING_METHODS
Definition compression_shared.h:147
PredictionSchemeMethod
Definition compression_shared.h:80
@ MESH_PREDICTION_PARALLELOGRAM
Definition compression_shared.h:86
@ PREDICTION_NONE
Definition compression_shared.h:82
@ MESH_PREDICTION_TEX_COORDS_DEPRECATED
Definition compression_shared.h:88
@ PREDICTION_UNDEFINED
Definition compression_shared.h:84
@ MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM
Definition compression_shared.h:89
@ MESH_PREDICTION_GEOMETRIC_NORMAL
Definition compression_shared.h:91
@ NUM_PREDICTION_SCHEMES
Definition compression_shared.h:92
@ MESH_PREDICTION_TEX_COORDS_PORTABLE
Definition compression_shared.h:90
@ MESH_PREDICTION_MULTI_PARALLELOGRAM
Definition compression_shared.h:87
@ PREDICTION_DIFFERENCE
Definition compression_shared.h:85
AttributeEncoderType
Definition compression_shared.h:63
@ KD_TREE_ATTRIBUTE_ENCODER
Definition compression_shared.h:66
@ MESH_TRAVERSAL_ATTRIBUTE_ENCODER
Definition compression_shared.h:65
@ BASIC_ATTRIBUTE_ENCODER
Definition compression_shared.h:64
Definition compression_shared.h:129
uint8_t encoder_method
Definition compression_shared.h:134
uint16_t flags
Definition compression_shared.h:135
uint8_t version_minor
Definition compression_shared.h:132
uint8_t encoder_type
Definition compression_shared.h:133
uint8_t version_major
Definition compression_shared.h:131
int8_t draco_string[5]
Definition compression_shared.h:130