Differential D9642 Diff 31697 extern/draco/draco/src/draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_shared.h
Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/draco/src/draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_shared.h
- This file was moved from extern/draco/dracoenc/src/draco/compression/attributes/prediction_schemes/mesh_prediction_scheme_parallelogram_shared.h.
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| // Function returns false when the prediction couldn't be computed, e.g. because | // Function returns false when the prediction couldn't be computed, e.g. because | ||||
| // not all entry points were available. | // not all entry points were available. | ||||
| template <class CornerTableT, typename DataTypeT> | template <class CornerTableT, typename DataTypeT> | ||||
| inline bool ComputeParallelogramPrediction( | inline bool ComputeParallelogramPrediction( | ||||
| int data_entry_id, const CornerIndex ci, const CornerTableT *table, | int data_entry_id, const CornerIndex ci, const CornerTableT *table, | ||||
| const std::vector<int32_t> &vertex_to_data_map, const DataTypeT *in_data, | const std::vector<int32_t> &vertex_to_data_map, const DataTypeT *in_data, | ||||
| int num_components, DataTypeT *out_prediction) { | int num_components, DataTypeT *out_prediction) { | ||||
| const CornerIndex oci = table->Opposite(ci); | const CornerIndex oci = table->Opposite(ci); | ||||
| if (oci == kInvalidCornerIndex) | if (oci == kInvalidCornerIndex) { | ||||
| return false; | return false; | ||||
| } | |||||
| int vert_opp, vert_next, vert_prev; | int vert_opp, vert_next, vert_prev; | ||||
| GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map, | GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map, | ||||
| &vert_opp, &vert_next, &vert_prev); | &vert_opp, &vert_next, &vert_prev); | ||||
| if (vert_opp < data_entry_id && vert_next < data_entry_id && | if (vert_opp < data_entry_id && vert_next < data_entry_id && | ||||
| vert_prev < data_entry_id) { | vert_prev < data_entry_id) { | ||||
| // Apply the parallelogram prediction. | // Apply the parallelogram prediction. | ||||
| const int v_opp_off = vert_opp * num_components; | const int v_opp_off = vert_opp * num_components; | ||||
| const int v_next_off = vert_next * num_components; | const int v_next_off = vert_next * num_components; | ||||
| Show All 13 Lines | |||||