GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
prediction_scheme_encoder_interface.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_ATTRIBUTES_PREDICTION_SCHEMES_PREDICTION_SCHEME_ENCODER_INTERFACE_H_
16#define DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_PREDICTION_SCHEME_ENCODER_INTERFACE_H_
17
20
21// Prediction schemes can be used during encoding and decoding of attributes
22// to predict attribute values based on the previously encoded/decoded data.
23// See prediction_scheme.h for more details.
24namespace draco {
25
26// Abstract interface for all prediction schemes used during attribute encoding.
28 public:
29 // Method that can be used to encode any prediction scheme specific data
30 // into the output buffer.
31 virtual bool EncodePredictionData(EncoderBuffer *buffer) = 0;
32};
33
34// A specialized version of the prediction scheme interface for specific
35// input and output data types.
36// |entry_to_point_id_map| is the mapping between value entries to point ids
37// of the associated point cloud, where one entry is defined as |num_components|
38// values of the |in_data|.
39// DataTypeT is the data type of input and predicted values.
40// CorrTypeT is the data type used for storing corrected values.
41template <typename DataTypeT, typename CorrTypeT = DataTypeT>
44 public:
45 // Applies the prediction scheme when encoding the attribute.
46 // |in_data| contains value entries to be encoded.
47 // |out_corr| is an output array containing the to be encoded corrections.
49 const DataTypeT *in_data, CorrTypeT *out_corr, int size,
50 int num_components, const PointIndex *entry_to_point_id_map) = 0;
51};
52
53} // namespace draco
54
55#endif // DRACO_COMPRESSION_ATTRIBUTES_PREDICTION_SCHEMES_PREDICTION_SCHEME_ENCODER_INTERFACE_H_
Definition encoder_buffer.h:29
Definition prediction_scheme_encoder_interface.h:27
virtual bool EncodePredictionData(EncoderBuffer *buffer)=0
Definition prediction_scheme_interface.h:27
Definition prediction_scheme_encoder_interface.h:43
virtual bool ComputeCorrectionValues(const DataTypeT *in_data, CorrTypeT *out_corr, int size, int num_components, const PointIndex *entry_to_point_id_map)=0
n< br > font size
Definition meshpage.php:3536
Definition attribute_octahedron_transform.cc:21
Definition GameApi_pl.cc:29382