Differential D6342 Diff 20011 extern/draco/dracoenc/src/draco/compression/attributes/sequential_attribute_encoders_controller.cc
Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/dracoenc/src/draco/compression/attributes/sequential_attribute_encoders_controller.cc
| Context not available. | |||||
| // limitations under the License. | // limitations under the License. | ||||
| // | // | ||||
| #include "draco/compression/attributes/sequential_attribute_encoders_controller.h" | #include "draco/compression/attributes/sequential_attribute_encoders_controller.h" | ||||
| #ifdef DRACO_NORMAL_ENCODING_SUPPORTED | |||||
| #include "draco/compression/attributes/sequential_normal_attribute_encoder.h" | #include "draco/compression/attributes/sequential_normal_attribute_encoder.h" | ||||
| #endif | |||||
| #include "draco/compression/attributes/sequential_quantization_attribute_encoder.h" | #include "draco/compression/attributes/sequential_quantization_attribute_encoder.h" | ||||
| #include "draco/compression/point_cloud/point_cloud_encoder.h" | #include "draco/compression/point_cloud/point_cloud_encoder.h" | ||||
| Context not available. | |||||
| case DT_FLOAT32: | case DT_FLOAT32: | ||||
| if (encoder()->options()->GetAttributeInt(att_id, "quantization_bits", | if (encoder()->options()->GetAttributeInt(att_id, "quantization_bits", | ||||
| -1) > 0) { | -1) > 0) { | ||||
| #ifdef DRACO_NORMAL_ENCODING_SUPPORTED | |||||
| if (att->attribute_type() == GeometryAttribute::NORMAL) { | if (att->attribute_type() == GeometryAttribute::NORMAL) { | ||||
| // We currently only support normals with float coordinates | // We currently only support normals with float coordinates | ||||
| // and must be quantized. | // and must be quantized. | ||||
| return std::unique_ptr<SequentialAttributeEncoder>( | return std::unique_ptr<SequentialAttributeEncoder>( | ||||
| new SequentialNormalAttributeEncoder()); | new SequentialNormalAttributeEncoder()); | ||||
| } else { | } else { | ||||
| #endif | |||||
| return std::unique_ptr<SequentialAttributeEncoder>( | return std::unique_ptr<SequentialAttributeEncoder>( | ||||
| new SequentialQuantizationAttributeEncoder()); | new SequentialQuantizationAttributeEncoder()); | ||||
| #ifdef DRACO_NORMAL_ENCODING_SUPPORTED | |||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| break; | break; | ||||
| default: | default: | ||||
| Context not available. | |||||