Differential D9642 Diff 31697 extern/draco/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_encoder_factory.cc
Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/compression/attributes/prediction_schemes/prediction_scheme_encoder_factory.cc
- This file was moved from extern/draco/dracoenc/src/draco/compression/attributes/prediction_schemes/prediction_scheme_encoder_factory.cc.
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | #endif | ||||
| return PREDICTION_DIFFERENCE; | return PREDICTION_DIFFERENCE; | ||||
| } | } | ||||
| // Returns the preferred prediction scheme based on the encoder options. | // Returns the preferred prediction scheme based on the encoder options. | ||||
| PredictionSchemeMethod GetPredictionMethodFromOptions( | PredictionSchemeMethod GetPredictionMethodFromOptions( | ||||
| int att_id, const EncoderOptions &options) { | int att_id, const EncoderOptions &options) { | ||||
| const int pred_type = | const int pred_type = | ||||
| options.GetAttributeInt(att_id, "prediction_scheme", -1); | options.GetAttributeInt(att_id, "prediction_scheme", -1); | ||||
| if (pred_type == -1) | if (pred_type == -1) { | ||||
| return PREDICTION_UNDEFINED; | return PREDICTION_UNDEFINED; | ||||
| if (pred_type < 0 || pred_type >= NUM_PREDICTION_SCHEMES) | } | ||||
| if (pred_type < 0 || pred_type >= NUM_PREDICTION_SCHEMES) { | |||||
| return PREDICTION_NONE; | return PREDICTION_NONE; | ||||
| } | |||||
| return static_cast<PredictionSchemeMethod>(pred_type); | return static_cast<PredictionSchemeMethod>(pred_type); | ||||
| } | } | ||||
| } // namespace draco | } // namespace draco | ||||