GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
symbol_encoding.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_ENTROPY_SYMBOL_ENCODING_H_
16#define DRACO_COMPRESSION_ENTROPY_SYMBOL_ENCODING_H_
17
20#include "draco/core/options.h"
21
22namespace draco {
23
24// Encodes an array of symbols using an entropy coding. This function
25// automatically decides whether to encode the symbol values using bit
26// length tags (see EncodeTaggedSymbols), or whether to encode them directly
27// (see EncodeRawSymbols). The symbols can be grouped into separate components
28// that can be used for better compression. |options| is an optional parameter
29// that allows more direct control over various stages of the symbol encoding
30// (see below for functions that are used to set valid options).
31// Returns false on error.
32bool EncodeSymbols(const uint32_t *symbols, int num_values, int num_components,
33 const Options *options, EncoderBuffer *target_buffer);
34
35// Sets an option that forces symbol encoder to use the specified encoding
36// method.
38
39// Sets the desired compression level for symbol encoding in range <0, 10> where
40// 0 is the worst but fastest compression and 10 is the best but slowest
41// compression. If the option is not set, default value of 7 is used.
42// Returns false if an invalid level has been set.
43bool SetSymbolEncodingCompressionLevel(Options *options, int compression_level);
44
45} // namespace draco
46
47#endif // DRACO_COMPRESSION_ENTROPY_SYMBOL_ENCODING_H_
Definition encoder_buffer.h:29
Definition options.h:30
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition meshpage.php:1181
Definition attribute_octahedron_transform.cc:21
bool SetSymbolEncodingCompressionLevel(Options *options, int compression_level)
Definition symbol_encoding.cc:39
bool EncodeSymbols(const uint32_t *symbols, int num_values, int num_components, const Options *options, EncoderBuffer *target_buffer)
Definition symbol_encoding.cc:118
SymbolCodingMethod
Definition compression_shared.h:144
void SetSymbolEncodingMethod(Options *options, SymbolCodingMethod method)
Definition symbol_encoding.cc:35