Spec: Small cleanup

- Addresses a comment in KhronosGroup/glTF#1114
This commit is contained in:
Frank Galligan 2017-10-20 14:39:02 -07:00
parent 308b812c2c
commit 8dbbf79ae1
4 changed files with 20 additions and 20 deletions

View File

@ -7,7 +7,7 @@ void DecodeAttributeSeams() {
for (a = 0; a < num_attributes_decoders - 1; ++a) {
AnsDecoder ans_decoder_;
RansInitDecoder(ans_decoder_,
attribute_connectivity_decoders_buffer[a].data(),
attribute_connectivity_decoders_buffer[a],
attribute_connectivity_decoders_size[a], L_RANS_BASE);
ans_decoders.push_back(ans_decoder_);
is_edge_on_seam_[a].assign(face_to_vertex[0].size() * 3, false);

View File

@ -69,7 +69,7 @@ void ProcessSplitData() {
last_id = 0;
for (i = 0; i < source_id_delta.size(); ++i) {
source_symbol_id[i] = source_id_delta[i] + last_id;
split_symbol_id.[i] = source_symbol_id[i] - split_id_delta[i];
split_symbol_id[i] = source_symbol_id[i] - split_id_delta[i];
last_id = source_symbol_id[i];
}
}
@ -159,9 +159,9 @@ void NewActiveCornerReached(new_corner, symbol_id) {
SetOppositeCorners(corner_b, new_corner + 2);
active_corner_stack.back() = new_corner;
}
vert = CornerToVert(Next(corner_a));
next = CornerToVert(Next(corner_b));
prev = CornerToVert(Previous(corner_a));
vert = CornerToVert(curr_att_dec, Next(corner_a));
next = CornerToVert(curr_att_dec, Next(corner_b));
prev = CornerToVert(curr_att_dec, Previous(corner_a));
if (edgebreaker_traversal_type == VALENCE_EDGEBREAKER) {
vertex_valences_[next] += 1;
vertex_valences_[prev] += 1;
@ -188,14 +188,14 @@ void NewActiveCornerReached(new_corner, symbol_id) {
active_corner_stack.back() = new_corner;
}
vert = CornerToVert(Previous(corner_a));
next = CornerToVert(Next(corner_a));
prev = CornerToVert(Previous(corner_b));
vert = CornerToVert(curr_att_dec, Previous(corner_a));
next = CornerToVert(curr_att_dec, Next(corner_a));
prev = CornerToVert(curr_att_dec, Previous(corner_b));
MapCornerToVertex(new_corner, vert);
MapCornerToVertex(new_corner + 1, next);
MapCornerToVertex(new_corner + 2, prev);
corner_n = Next(corner_b);
vertex_n = CornerToVert(corner_n);
vertex_n = CornerToVert(curr_att_dec, corner_n);
if (edgebreaker_traversal_type == VALENCE_EDGEBREAKER) {
vertex_valences_[vert] += vertex_valences_[vertex_n];
}
@ -218,8 +218,8 @@ void NewActiveCornerReached(new_corner, symbol_id) {
active_corner_stack.back() = new_corner;
}
check_topology_split = true;
vert = CornerToVert(Previous(corner_a));
next = CornerToVert(Next(corner_a));
vert = CornerToVert(curr_att_dec, Previous(corner_a));
next = CornerToVert(curr_att_dec, Next(corner_a));
prev = ++last_vert_added;
if (edgebreaker_traversal_type == VALENCE_EDGEBREAKER) {
vertex_valences_[vert] += 1;
@ -243,8 +243,8 @@ void NewActiveCornerReached(new_corner, symbol_id) {
active_corner_stack.back() = new_corner;
}
check_topology_split = true;
vert = CornerToVert(Previous(corner_a));
next = CornerToVert(Next(corner_a));
vert = CornerToVert(curr_att_dec, Previous(corner_a));
next = CornerToVert(curr_att_dec, Next(corner_a));
prev = ++last_vert_added;
if (edgebreaker_traversal_type == VALENCE_EDGEBREAKER) {
vertex_valences_[vert] += 1;
@ -336,9 +336,9 @@ void ParseEdgebreakerStandardSymbol() {
~~~~~
void EdgebreakerDecodeSymbol() {
if (edgebreaker_traversal_type == VALENCE_EDGEBREAKER) {
EdgebreakerValenceDecodeSymbol(sym);
EdgebreakerValenceDecodeSymbol();
} else if (edgebreaker_traversal_type == STANDARD_EDGEBREAKER) {
ParseEdgebreakerStandardSymbol(sym);
ParseEdgebreakerStandardSymbol();
}
}
~~~~~

View File

@ -114,7 +114,7 @@ void DecodePredictionData_ConstrainedMulti() {
ParseConstrainedMultiNumFlags();
if (constrained_multi_num_flags > 0) {
ParsePredictionRansData();
RansInitDecoder(ans_decoder_, data.data() + pos,
RansInitDecoder(ans_decoder_, data + pos,
prediction_rans_data_size, L_RANS_BASE);
for (j = 0; j < constrained_multi_num_flags; ++j) {
RabsDescRead(&ans_decoder_, prediction_rans_prob_zero, &val);
@ -144,7 +144,7 @@ void ParseTexCoordsNumOrientations() {
void DecodePredictionData_TexCoords() {
ParseTexCoordsNumOrientations();
ParsePredictionRansData();
RansInitDecoder(ans_decoder_, data.data() + pos,
RansInitDecoder(ans_decoder_, data + pos,
prediction_rans_data_size, L_RANS_BASE);
last_orientation = true;
for (i = 0; i < tex_coords_num_orientations; ++i) {
@ -164,7 +164,7 @@ void DecodePredictionData_TexCoords() {
~~~~~
void DecodePredictionData_GeometricNormal() {
ParsePredictionRansData();
RansInitDecoder(ans_decoder_, data.data() + pos,
RansInitDecoder(ans_decoder_, data + pos,
prediction_rans_data_size, L_RANS_BASE);
num_values = att_dec_num_values_to_decode[curr_att_dec][curr_att];
for (i = 0; i < num_values; ++i) {

View File

@ -12,7 +12,7 @@ void MeshPredictionSchemeConstrainedMultiParallelogramDecoder_ComputeOriginalVal
}
out_values = signed_values;
PredictionSchemeTransform_ComputeOriginalValue(
pred_vals[0].data(), &signed_values[0], &out_values[0]);
pred_vals[0], &signed_values[0], &out_values[0]);
is_crease_edge_pos.assign(kMaxNumParallelograms, 0);
corner_map_size = num_values;
for (p = 1; p < corner_map_size; ++p) {
@ -65,7 +65,7 @@ void MeshPredictionSchemeConstrainedMultiParallelogramDecoder_ComputeOriginalVal
for (c = 0; c < num_components; ++c) {
multi_pred_vals[c] /= num_used_parallelograms;
}
PredictionSchemeTransform_ComputeOriginalValue(multi_pred_vals.data(), &signed_values[dst_offset], &out_values[dst_offset]);
PredictionSchemeTransform_ComputeOriginalValue(multi_pred_vals, &signed_values[dst_offset], &out_values[dst_offset]);
}
}
seq_int_att_dec_original_values[curr_att_dec][curr_att] = out_values;