diff --git a/docs/_site/assets/css/spec-style.css b/docs/_site/assets/css/spec-style.css index 513a264..16d916f 100644 --- a/docs/_site/assets/css/spec-style.css +++ b/docs/_site/assets/css/spec-style.css @@ -1 +1 @@ -@import url("https://fonts.googleapis.com/css?family=Inconsolata");body{font-family:Arial,sans-serif;margin:10% 25% 10% 10%;line-height:1.3}a{color:navy;text-decoration:none}a:visited{color:navy;text-decoration:none}a:hover{text-decoration:underline}pre{font-family:"Inconsolata",monospace;border:2px solid #ddd;padding:1em;margin-left:1em;overflow-x:auto}code{font-family:"Inconsolata",monospace}table{border-collapse:collapse;min-width:50%;margin-left:1em}th,td{border:2px solid #ccc;padding:.5em}th{background-color:#333;color:#fff}table.terms th{display:none}table.terms td{vertical-align:top}table.conventions th{display:none}table.conventions td{vertical-align:top}table.conventions td:first-child{white-space:nowrap}table.nohead th{display:none}table.xyhead th,table.xyhead td:first-child{background-color:#9bbb59}table.xyhead th{color:#000;font-weight:normal}figure.highlight{background-color:#f2f2f2;padding-left:1em;padding-right:1em;border:2px solid #ccc}div.syntax{background-color:#fff;background-image:linear-gradient(90deg, transparent 540px, #abced4 540px, #abced4 542px, transparent 542px),linear-gradient(#ddd .1em, transparent .1em);background-size:100% 1.3em;border-left:2px solid #ddd;border-right:2px solid #ddd;border-bottom:2px solid #ddd;white-space:pre;font-family:"Inconsolata",monospace;font-size:1em;padding-left:1em;margin-left:1em;width:720px} +@import url("https://fonts.googleapis.com/css?family=Inconsolata");body{font-family:Arial,sans-serif;margin:10% 25% 10% 10%;line-height:1.3}a{color:navy;text-decoration:none}a:visited{color:navy;text-decoration:none}a:hover{text-decoration:underline}code{font-family:"Inconsolata",monospace}table{border-collapse:collapse;min-width:50%;margin-left:1em}th,td{border:2px solid #ccc;padding:.5em}th{background-color:#333;color:#fff}table.terms th{display:none}table.terms td{vertical-align:top}table.conventions th{display:none}table.conventions td{vertical-align:top}table.conventions td:first-child{white-space:nowrap}table.nohead th{display:none}table.xyhead th,table.xyhead td:first-child{background-color:#9bbb59}table.xyhead th{color:#000;font-weight:normal}figure.highlight{background-color:#f2f2f2;padding-left:1em;padding-right:1em;border:2px solid #ccc}div.draco-syntax pre{background-color:#fff;background-image:linear-gradient(90deg, transparent 580px, #abced4 580px, #abced4 582px, transparent 582px),linear-gradient(#ddd .1em, transparent .1em);background-size:100% 1.3em;border-left:2px solid #ddd;border-right:2px solid #ddd;border-bottom:2px solid #ddd;white-space:pre;font-family:"Inconsolata",monospace;font-size:1em;padding-left:1em;margin-left:1em;width:720px} diff --git a/docs/_site/spec/00.00.03.last.modified.html b/docs/_site/spec/00.00.03.last.modified.html index c73c61d..e39e03d 100644 --- a/docs/_site/spec/00.00.03.last.modified.html +++ b/docs/_site/spec/00.00.03.last.modified.html @@ -1,2 +1,2 @@ -
Last modified: 2017-07-10 14:30:06 -0700
+Last modified: 2017-07-12 15:15:50 -0700
diff --git a/docs/_site/spec/04.00.00.conventions.html b/docs/_site/spec/04.00.00.conventions.html index 80fc2b5..0248e19 100644 --- a/docs/_site/spec/04.00.00.conventions.html +++ b/docs/_site/spec/04.00.00.conventions.html @@ -1,5 +1,7 @@When bit reading is finished it will always pad the read to the current @@ -40,3 +42,51 @@ first, then the connectivity section, and then the attribute section.
decoded.FIXME: This section is borrowed from AV1, and should be modified for the Draco +spec.
+ +The description style of the syntax is similar to the C++ programming language. +Syntax elements in the bitstream are represented in bold type. Each syntax +element is described by its name (using only lower case letters with +underscore characters) and a descriptor for its method of coded +representation. The decoding process behaves according to the value of the +syntax element and to the values of previously decoded syntax elements. When a +value of a syntax element is used in the syntax tables or the text, it appears +in regular (i.e. not bold) type. If the value of a syntax element is being +computed (e.g. being written with a default value instead of being coded in +the bitstream), it also appears in regular type.
+ +In some cases the syntax tables may use the values of other variables derived +from syntax elements values. Such variables appear in the syntax tables, or +text, named by a mixture of lower case and upper case letter and without any +underscore characters. Variables starting with an upper case letter are +derived for the decoding of the current syntax structure and all depending +syntax structures. These variables may be used in the decoding process for +later syntax structures. Variables starting with a lower case letter are only +used within the process from which they are derived.
+ +Constant values appear in all upper case letters with underscore characters.
+ +Constant lookup tables appear in all lower case letters with underscore +characters.
+ +Hexadecimal notation, indicated by prefixing the hexadecimal number by 0x
,
+may be used when the number of bits is an integer multiple of 4. For example,
+0x1a
represents a bit string 0001 1010
.
Binary notation is indicated by prefixing the binary number by 0b
. For
+example, 0b00011010
represents a bit string 0001 1010
. Binary numbers may
+include underscore characters to enhance readability. If present, the
+underscore characters appear every 4 binary digits starting from the LSB. For
+example, 0b11010
may also be written as 0b1_1010
.
A value equal to 0 represents a FALSE condition in a test statement. The +value TRUE is represented by any value not equal to 0.
+ +The following table lists examples of the syntax specification format. When
+syntax_element
appears (with bold face font), it specifies that this syntax
+element is parsed from the bitstream.
Decode() {
DecodeHeader()
DecodeConnectivityData()
DecodeAttributeData()}
-
+
DecodeHeader() {
+ draco_string UI8[5]
+ major_version UI8
+ minor_version UI8
+ encoder_type UI8
+ encoder_method UI8
flags
}
-
+
DecodeAttributeData() {
+ num_attributes_decoders UI8
for (i = 0; i < num_attributes_decoders; ++i) {
CreateAttributesDecoder(i);
}
@@ -40,4 +37,5 @@ DecodeAttributeData() { Type
InitializeDecoder() {
+ edgebreaker_decoder_type UI8
}
-
+
DecodeConnectivity() {
+ num_new_verts UI32
+ num_encoded_vertices UI32
+ num_faces UI32
+ num_attribute_data I8
+ num_encoded_symbols UI32
+ num_encoded_split_symbols UI32
+ encoded_connectivity_size UI32
+ // file pointer must be set to current position
+ // + encoded_connectivity_size
hole_and_split_bytes = DecodeHoleAndTopologySplitEvents()
// file pointer must be set to old current position
EdgeBreakerTraversalValence_Start()
@@ -46,13 +45,12 @@ DecodeConnectivity() { Type
AssignPointsToCorners() {
decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
if (attribute_data_.size() == 0) {
for (f = 0; f < decoder_->mesh()->num_faces(); ++f) {
@@ -123,13 +121,12 @@ AssignPointsToCorners() { Type
DecodeConnectivity(num_symbols) {
for (i = 0; i < num_symbols; ++i) {
symbol = TraversalValence_DecodeSymbol()
corner = 3 * num_faces++
@@ -184,13 +181,12 @@ DecodeConnectivity(num_symbols) { Type
UpdateCornerTableForSymbolC(corner) {
corner_a = active_corner_stack.back();
corner_b = corner_table_->Previous(corner_a);
while (corner_table_->Opposite(corner_b) >= 0) {
@@ -206,13 +202,12 @@ UpdateCornerTableForSymbolC(corner) { Type
UpdateCornerTableForSymbolLR(corner, symbol) {
if (symbol == TOPOLOGY_R) {
opp_corner = corner + 2;
} else {
@@ -227,13 +222,12 @@ UpdateCornerTableForSymbolLR(corner, symbol) { Type
HandleSymbolS(corner) {
corner_b = active_corner_stack.pop_back();
it = topology_split_active_corners.find(symbol_id);
if (it != topology_split_active_corners.end()) {
@@ -258,24 +252,22 @@ HandleSymbolS(corner) { Type
UpdateCornerTableForSymbolE() {
corner_table_->MapCornerToVertex(corner, num_vertices++);
corner_table_->MapCornerToVertex(corner + 1, num_vertices++);
corner_table_->MapCornerToVertex(corner + 2, num_vertices++);
}
-
+
UpdateCornerTableForInteriorFace() {
corner_b = corner_table_->Previous(corner);
while (corner_table_->Opposite(corner_b) >= 0) {
corner_b = corner_table_->Previous(corner_table_->Opposite(corner_b));
@@ -292,14 +284,12 @@ UpdateCornerTableForInteriorFace() { Type
IsTopologySplit(encoder_symbol_id, *out_face_edge,
*out_encoder_split_symbol_id) {
if (topology_split_data_.size() == 0)
return false;
@@ -311,13 +301,12 @@ IsTopologySplit(encoder_symbol_id, *out_face_edge, Type
DecodeAttributeConnectivitiesOnFace(corner) {
corners[3] = {corner, corner_table_->Next(corner),
corner_table_->Previous(corner)}
for (c = 0; c < 3; ++c) {
@@ -336,15 +325,14 @@ DecodeAttributeConnectivitiesOnFace(corner) { Type
SetOppositeCorners(corner_0, corner_1) {
corner_table_->SetOppositeCorner(corner_0, corner_1);
corner_table_->SetOppositeCorner(corner_1, corner_0);
}
-
+
Last modified: 2017-07-10 14:30:06 -0700
+Last modified: 2017-07-12 15:15:50 -0700
When bit reading is finished it will always pad the read to the current @@ -307,37 +313,81 @@ decoded.
FIXME: This section is borrowed from AV1, and should be modified for the Draco +spec.
+ +The description style of the syntax is similar to the C++ programming language. +Syntax elements in the bitstream are represented in bold type. Each syntax +element is described by its name (using only lower case letters with +underscore characters) and a descriptor for its method of coded +representation. The decoding process behaves according to the value of the +syntax element and to the values of previously decoded syntax elements. When a +value of a syntax element is used in the syntax tables or the text, it appears +in regular (i.e. not bold) type. If the value of a syntax element is being +computed (e.g. being written with a default value instead of being coded in +the bitstream), it also appears in regular type.
+ +In some cases the syntax tables may use the values of other variables derived +from syntax elements values. Such variables appear in the syntax tables, or +text, named by a mixture of lower case and upper case letter and without any +underscore characters. Variables starting with an upper case letter are +derived for the decoding of the current syntax structure and all depending +syntax structures. These variables may be used in the decoding process for +later syntax structures. Variables starting with a lower case letter are only +used within the process from which they are derived.
+ +Constant values appear in all upper case letters with underscore characters.
+ +Constant lookup tables appear in all lower case letters with underscore +characters.
+ +Hexadecimal notation, indicated by prefixing the hexadecimal number by 0x
,
+may be used when the number of bits is an integer multiple of 4. For example,
+0x1a
represents a bit string 0001 1010
.
Binary notation is indicated by prefixing the binary number by 0b
. For
+example, 0b00011010
represents a bit string 0001 1010
. Binary numbers may
+include underscore characters to enhance readability. If present, the
+underscore characters appear every 4 binary digits starting from the LSB. For
+example, 0b11010
may also be written as 0b1_1010
.
A value equal to 0 represents a FALSE condition in a test statement. The +value TRUE is represented by any value not equal to 0.
+ +The following table lists examples of the syntax specification format. When
+syntax_element
appears (with bold face font), it specifies that this syntax
+element is parsed from the bitstream.
Decode() {
DecodeHeader()
DecodeConnectivityData()
DecodeAttributeData()}
-
+
DecodeHeader() {
+ draco_string UI8[5]
+ major_version UI8
+ minor_version UI8
+ encoder_type UI8
+ encoder_method UI8
flags
}
-
+
DecodeAttributeData() {
+ num_attributes_decoders UI8
for (i = 0; i < num_attributes_decoders; ++i) {
CreateAttributesDecoder(i);
}
@@ -349,43 +399,42 @@ DecodeAttributeData() { Type
DecodeConnectivityData()
InitializeDecoder()
DecodeConnectivity()
}
-
+
InitializeDecoder() {
+ edgebreaker_decoder_type UI8
}
-
+
DecodeConnectivity() {
+ num_new_verts UI32
+ num_encoded_vertices UI32
+ num_faces UI32
+ num_attribute_data I8
+ num_encoded_symbols UI32
+ num_encoded_split_symbols UI32
+ encoded_connectivity_size UI32
+ // file pointer must be set to current position
+ // + encoded_connectivity_size
hole_and_split_bytes = DecodeHoleAndTopologySplitEvents()
// file pointer must be set to old current position
EdgeBreakerTraversalValence_Start()
@@ -411,13 +460,12 @@ DecodeConnectivity() { Type
AssignPointsToCorners() {
decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
if (attribute_data_.size() == 0) {
for (f = 0; f < decoder_->mesh()->num_faces(); ++f) {
@@ -488,13 +536,12 @@ AssignPointsToCorners() { Type
DecodeConnectivity(num_symbols) {
for (i = 0; i < num_symbols; ++i) {
symbol = TraversalValence_DecodeSymbol()
corner = 3 * num_faces++
@@ -549,13 +596,12 @@ DecodeConnectivity(num_symbols) { Type
UpdateCornerTableForSymbolC(corner) {
corner_a = active_corner_stack.back();
corner_b = corner_table_->Previous(corner_a);
while (corner_table_->Opposite(corner_b) >= 0) {
@@ -571,13 +617,12 @@ UpdateCornerTableForSymbolC(corner) { Type
UpdateCornerTableForSymbolLR(corner, symbol) {
if (symbol == TOPOLOGY_R) {
opp_corner = corner + 2;
} else {
@@ -592,13 +637,12 @@ UpdateCornerTableForSymbolLR(corner, symbol) { Type
HandleSymbolS(corner) {
corner_b = active_corner_stack.pop_back();
it = topology_split_active_corners.find(symbol_id);
if (it != topology_split_active_corners.end()) {
@@ -623,24 +667,22 @@ HandleSymbolS(corner) { Type
UpdateCornerTableForSymbolE() {
corner_table_->MapCornerToVertex(corner, num_vertices++);
corner_table_->MapCornerToVertex(corner + 1, num_vertices++);
corner_table_->MapCornerToVertex(corner + 2, num_vertices++);
}
-
+
UpdateCornerTableForInteriorFace() {
corner_b = corner_table_->Previous(corner);
while (corner_table_->Opposite(corner_b) >= 0) {
corner_b = corner_table_->Previous(corner_table_->Opposite(corner_b));
@@ -657,14 +699,12 @@ UpdateCornerTableForInteriorFace() { Type
IsTopologySplit(encoder_symbol_id, *out_face_edge,
*out_encoder_split_symbol_id) {
if (topology_split_data_.size() == 0)
return false;
@@ -676,13 +716,12 @@ IsTopologySplit(encoder_symbol_id, *out_face_edge, Type
DecodeAttributeConnectivitiesOnFace(corner) {
corners[3] = {corner, corner_table_->Next(corner),
corner_table_->Previous(corner)}
for (c = 0; c < 3; ++c) {
@@ -701,75 +740,68 @@ DecodeAttributeConnectivitiesOnFace(corner) { Type
SetOppositeCorners(corner_0, corner_1) {
corner_table_->SetOppositeCorner(corner_0, corner_1);
corner_table_->SetOppositeCorner(corner_1, corner_0);
}
-
+
FIXME: Escaping angle brackets
- -DecodeHoleAndTopologySplitEvents() {
+ num_topologoy_splits UI32
source_symbol_id = 0
for (i = 0; i < num_topologoy_splits; ++i) {
- DecodeVarint\<UI32\>(&delta)
+ DecodeVarint<UI32>(&delta)
split_data[i].source_symbol_id = delta + source_symbol_id
- DecodeVarint\<UI32\>(&delta)
+ DecodeVarint<UI32>(&delta)
split_data[i].split_symbol_id = source_symbol_id - delta
}
for (i = 0; i < num_topologoy_splits; ++i) {
- split_data[i].split_edge bits1
- split_data[i].source_edge bits1
+ split_data[i].split_edge bits1
+ split_data[i].source_edge bits1
}
- num_hole_events UI32
+ num_hole_events UI32
symbol_id = 0
for (i = 0; i < num_hole_events; ++i) {
- DecodeVarint\<UI32\>(&delta)
+ DecodeVarint<UI32>(&delta)
hole_data[i].symbol_id = delta + symbol_id
}
return bytes_decoded;
}
-
+
FIXME: Escaping angle brackets
- -CreateAttributesDecoder() {
+ att_data_id I8
+ decoder_type UI8
if (att_data_id >= 0) {
attribute_data_[att_data_id].decoder_id = att_decoder_id;
}
- traversal_method_encoded UI8
+ traversal_method_encoded UI8
if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
if (att_data_id < 0) {
- encoding_data = &pos_encoding_data_;
+ encoding_data = &pos_encoding_data_;
} else {
encoding_data = &attribute_data_[att_data_id].encoding_data;
attribute_data_[att_data_id].is_connectivity_used = false;
}
if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
- typedef EdgeBreakerTraverser\<AttProcessor, AttObserver\> AttTraverser;
- sequencer = CreateVertexTraversalSequencer\<AttTraverser\>(encoding_data);
+ typedef EdgeBreakerTraverser<AttProcessor, AttObserver> AttTraverser;
+ sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
} else if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
- typedef PredictionDegreeTraverser\<AttProcessor, AttObserver\> AttTraverser;
- sequencer = CreateVertexTraversalSequencer\<AttTraverser\>(encoding_data);
+ typedef PredictionDegreeTraverser<AttProcessor, AttObserver> AttTraverser;
+ sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
}
} else {
// TODO
@@ -777,19 +809,18 @@ CreateAttributesDecoder() { Type
EdgebreakerTraversal_Start() {
+ size UI64
+ symbol_buffer_ size * UI8
+ size UI64
+ start_face_buffer_ size * UI8
if (num_attribute_data_ > 0) {
attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
new BinaryDecoder[num_attribute_data_]);
@@ -798,15 +829,15 @@ EdgebreakerTraversal_Start() { Type
Traversal_DecodeSymbol() {
- symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol); bits1
+Traversal_DecodeSymbol() {
+ symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol); bits1
if (symbol != TOPOLOGY_C) {
- symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix); bits2
+ symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix); bits2
symbol |= (symbol_suffix << 1);
}
return symbol
@@ -816,7 +847,7 @@ EdgebreakerTraversal_Start() { TypeDecodeAttributeSeam()
-DecodeAttributeSeam(int attribute) {
+DecodeAttributeSeam(int attribute) {
return attribute_connectivity_decoders_[attribute].DecodeNextBit();
}
@@ -826,10 +857,10 @@ EdgebreakerTraversal_Start() { TypeEdgeBreakerTraversalValence_Start()
-EdgeBreakerTraversalValence_Start(num_vertices, num_attribute_data) {
+EdgeBreakerTraversalValence_Start(num_vertices, num_attribute_data) {
out_buffer = EdgebreakerTraversal_Start()
- num_split_symbols I32
- mode == 0 I8
+ num_split_symbols I32
+ mode == 0 I8
num_vertices_ += num_split_symbols
vertex_valences_ init to 0
vertex_valences_.resize(num_vertices_, 0);
@@ -850,10 +881,10 @@ EdgebreakerTraversal_Start() { TypeTraversalValence_DecodeSymbol()
-TraversalValence_DecodeSymbol() {
+TraversalValence_DecodeSymbol() {
if (active_context_ != -1) {
symbol_id = context_symbols_[active_context_]
- [--context_counters_[active_context_]]
+ [--context_counters_[active_context_]]
last_symbol_ = edge_breaker_symbol_to_topology_id[symbol_id]
} else {
last_symbol_ = Traversal_DecodeSymbol()
@@ -865,7 +896,7 @@ EdgebreakerTraversal_Start() { TypeTraversalValence_NewActiveCornerReached()
-TraversalValence_NewActiveCornerReached(corner) {
+TraversalValence_NewActiveCornerReached(corner) {
switch (last_symbol_) {
case TOPOLOGY_C:
case TOPOLOGY_S:
@@ -898,7 +929,7 @@ EdgebreakerTraversal_Start() { TypeTraversalValence_MergeVertices()
-TraversalValence_MergeVertices(dest, source) {
+TraversalValence_MergeVertices(dest, source) {
vertex_valences_[dest] += vertex_valences_[source];
}
@@ -908,15 +939,15 @@ EdgebreakerTraversal_Start() { TypeDecodeAttributesDecoderData()
-DecodeAttributesDecoderData(buffer) {
- num_attributes I32
+DecodeAttributesDecoderData(buffer) {
+ num_attributes I32
point_attribute_ids_.resize(num_attributes);
for (i = 0; i < num_attributes; ++i) {
- att_type UI8
- data_type UI8
- components_count UI8
- normalized UI8
- custom_id UI16
+ att_type UI8
+ data_type UI8
+ components_count UI8
+ normalized UI8
+ custom_id UI16
Initialize GeometryAttribute ga
att_id = pc->AddAttribute(new PointAttribute(ga));
point_attribute_ids_[i] = att_id;
@@ -928,11 +959,11 @@ EdgebreakerTraversal_Start() { TypeDecodeAttributesDecoderData()
-DecodeAttributesDecoderData(buffer) {
+DecodeAttributesDecoderData(buffer) {
AttributesDecoder_DecodeAttributesDecoderData(buffer)
sequential_decoders_.resize(num_attributes());
for (i = 0; i < num_attributes(); ++i) {
- decoder_type UI8
+ decoder_type UI8
sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
sequential_decoders_[i]->Initialize(decoder(), GetAttributeId(i))
}
@@ -941,7 +972,7 @@ EdgebreakerTraversal_Start() { TypeDecodeAttributes()
-DecodeAttributes(buffer) {
+DecodeAttributes(buffer) {
sequencer_->GenerateSequence(&point_ids_)
for (i = 0; i < num_attributes(); ++i) {
pa = decoder()->point_cloud()->attribute(GetAttributeId(i));
@@ -957,7 +988,7 @@ EdgebreakerTraversal_Start() { TypeCreateSequentialDecoder()
-CreateSequentialDecoder(type) {
+CreateSequentialDecoder(type) {
switch (type) {
case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
return new SequentialAttributeDecoder()
@@ -974,7 +1005,7 @@ EdgebreakerTraversal_Start() { TypeSequential Attribute Decoder
-Initialize(...) {
+Initialize(...) {
// Init some members
}
@@ -982,13 +1013,13 @@ EdgebreakerTraversal_Start() { TypeDecodeValues()
-DecodeValues(const std::vector<PointIndex> &point_ids) {
+DecodeValues(const std::vector<PointIndex> &point_ids) {
num_values = point_ids.size();
entry_size = attribute_->byte_stride();
std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
out_byte_pos = 0;
for (i = 0; i < num_values; ++i) {
- value_data UI8 * entry_size
+ value_data UI8 * entry_size
attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
out_byte_pos += entry_size;
}
@@ -998,7 +1029,7 @@ EdgebreakerTraversal_Start() { TypeSequential Integer Attribute Decoder
-Initialize(...) {
+Initialize(...) {
SequentialAttributeDecoder_Initialize()
}
@@ -1006,10 +1037,10 @@ EdgebreakerTraversal_Start() { TypeDecodeValues()
-DecodeValues(point_ids) {
- prediction_scheme_method I8
+DecodeValues(point_ids) {
+ prediction_scheme_method I8
if (prediction_scheme_method != PREDICTION_NONE) {
- prediction_transform_type I8
+ prediction_transform_type I8
prediction_scheme_ = CreateIntPredictionScheme(...)
}
if (prediction_scheme_) {
@@ -1024,8 +1055,8 @@ EdgebreakerTraversal_Start() { TypeDecodeIntegerValues()
-DecodeIntegerValues(point_ids) {
- compressed UI8
+DecodeIntegerValues(point_ids) {
+ compressed UI8
if (compressed) {
DecodeSymbols(..., values_.data())
} else {
@@ -1039,7 +1070,7 @@ EdgebreakerTraversal_Start() { Type
@@ -1047,7 +1078,7 @@ EdgebreakerTraversal_Start() { TypeSequential Quantization Attribute Decoder
-Initialize(...) {
+Initialize(...) {
SequentialIntegerAttributeDecoder_Initialize()
}
@@ -1055,14 +1086,14 @@ EdgebreakerTraversal_Start() { TypeDecodeIntegerValues()
-DecodeIntegerValues(point_ids) {
+DecodeIntegerValues(point_ids) {
// DecodeQuantizedDataInfo()
num_components = attribute()->components_count();
for (i = 0; i < num_components; ++i) {
- min_value_[i] F32
+ min_value_[i] F32
}
- max_value_dif_ F32
- quantization_bits_ UI8
+ max_value_dif_ F32
+ quantization_bits_ UI8
SequentialIntegerAttributeDecoder::DecodeIntegerValues()
}
@@ -1070,7 +1101,7 @@ EdgebreakerTraversal_Start() { TypeDequantizeValues()
-DequantizeValues(num_values) {
+DequantizeValues(num_values) {
max_quantized_value = (1 << (quantization_bits_)) - 1;
num_components = attribute()->components_count();
entry_size = sizeof(float) * num_components;
@@ -1093,9 +1124,9 @@ EdgebreakerTraversal_Start() { TypeComputeOriginalValue()
-ComputeOriginalValue(const DataTypeT *predicted_vals,
- const CorrTypeT *corr_vals,
- DataTypeT *out_original_vals, int val_id) {
+ComputeOriginalValue(const DataTypeT *predicted_vals,
+ const CorrTypeT *corr_vals,
+ DataTypeT *out_original_vals, int val_id) {
for (i = 0; i < num_components_; ++i) {
out_original_vals[i] = predicted_vals[i] + corr_vals[val_id + i];
}
@@ -1107,18 +1138,18 @@ EdgebreakerTraversal_Start() { TypeDecodeTransformData()
-DecodeTransformData(buffer) {
- min_value_ DT
- max_value_ DT
+DecodeTransformData(buffer) {
+ min_value_ DT
+ max_value_ DT
}
ComputeOriginalValue()
-ComputeOriginalValue(const DataTypeT *predicted_vals,
- const CorrTypeT *corr_vals,
- DataTypeT *out_original_vals, int val_id) {
+ComputeOriginalValue(const DataTypeT *predicted_vals,
+ const CorrTypeT *corr_vals,
+ DataTypeT *out_original_vals, int val_id) {
clamped_vals = ClampPredictedValue(predicted_vals);
ComputeOriginalValue(clamped_vals, corr_vals, out_original_vals, val_id)
// PredictionSchemeTransform_ComputeOriginalValue()
@@ -1134,7 +1165,7 @@ EdgebreakerTraversal_Start() { TypeClampPredictedValue()
-ClampPredictedValue(const DataTypeT *predicted_val) {
+ClampPredictedValue(const DataTypeT *predicted_val) {
for (i = 0; i < this->num_components(); ++i) {
clamped_value_[i] = min(predicted_val[i], max_value_)
clamped_value_[i] = max(predicted_val[i], min_value_)
@@ -1148,11 +1179,11 @@ EdgebreakerTraversal_Start() { TypeDecode()
-Decode(...) {
+Decode(...) {
this->transform().InitializeDecoding(num_components);
// restore the first value
this->transform().ComputeOriginalValue(pred_vals.get(),
- in_corr, out_data, 0);
+ in_corr, out_data, 0);
// PredictionSchemeWrapTransform_ComputeOriginalValue()
corner_map_size = this->mesh_data().data_to_corner_map()->size();
for (p = 1; p < corner_map_size; ++p) {
@@ -1178,9 +1209,11 @@ EdgebreakerTraversal_Start() { TypeMeshPredictionSchemeParallelogramShared
+FIXME: ^^^ Heading level?
+
ComputeParallelogramPrediction()
-ComputeParallelogramPrediction(...) {
+ComputeParallelogramPrediction(...) {
oci = table->Opposite(ci);
vert_opp = vertex_to_data_map[table->Vertex(ci)];
vert_next = vertex_to_data_map[table->Vertex(table->Next(ci))];
@@ -1205,7 +1238,7 @@ EdgebreakerTraversal_Start() { TypeIsFaceVisited()
-IsFaceVisited(corner_id) {
+IsFaceVisited(corner_id) {
if (corner_id < 0)
return true
return is_face_visited_[corner_id / 3];
@@ -1215,7 +1248,7 @@ EdgebreakerTraversal_Start() { TypeMarkFaceVisited()
-MarkFaceVisited(face_id) {
+MarkFaceVisited(face_id) {
is_face_visited_[face_id] = true;
}
@@ -1223,7 +1256,7 @@ EdgebreakerTraversal_Start() { TypeIsVertexVisited()
-IsVertexVisited(vert_id) {
+IsVertexVisited(vert_id) {
return is_vertex_visited_[vert_id];
}
@@ -1231,7 +1264,7 @@ EdgebreakerTraversal_Start() { TypeMarkVertexVisited()
-MarkVertexVisited(vert_id) {
+MarkVertexVisited(vert_id) {
is_vertex_visited_[vert_id] = true;
}
@@ -1241,7 +1274,7 @@ EdgebreakerTraversal_Start() { TypeOnNewVertexVisited()
-OnNewVertexVisited(vertex, corner) {
+OnNewVertexVisited(vertex, corner) {
point_id = mesh_->face(corner / 3)[corner % 3];
sequencer_->AddPointId(point_id);
// Keep track of visited corners.
@@ -1258,7 +1291,7 @@ EdgebreakerTraversal_Start() { TypeTraverseFromCorner()
-TraverseFromCorner(corner_id) {
+TraverseFromCorner(corner_id) {
if (processor_.IsFaceVisited(corner_id))
return
corner_traversal_stack_.clear();
@@ -1328,7 +1361,7 @@ EdgebreakerTraversal_Start() { TypeGenerateSequenceInternal()
-GenerateSequenceInternal() {
+GenerateSequenceInternal() {
traverser_.OnTraversalStart();
If (corner_order_) {
// TODO
@@ -1345,7 +1378,7 @@ EdgebreakerTraversal_Start() { TypeProcessCorner()
-ProcessCorner(corner_id) {
+ProcessCorner(corner_id) {
traverser_.TraverseFromCorner(corner_id);
}
@@ -1353,7 +1386,7 @@ EdgebreakerTraversal_Start() { TypeUpdatePointToAttributeIndexMapping()
-UpdatePointToAttributeIndexMapping(PointAttribute *attribute) {
+UpdatePointToAttributeIndexMapping(PointAttribute *attribute) {
corner_table = traverser_.corner_table();
attribute->SetExplicitMapping(mesh_->num_points());
num_faces = mesh_->num_faces();
@@ -1375,9 +1408,11 @@ EdgebreakerTraversal_Start() { TypePointsSequencer
+FIXME: ^^^ Heading level?
+
AddPointId()
-AddPointId(point_id) {
+AddPointId(point_id) {
out_point_ids_->push_back(point_id);
}
@@ -1387,7 +1422,7 @@ EdgebreakerTraversal_Start() { TypeOpposite()
-Opposite(corner) {
+Opposite(corner) {
return opposite_corners_[corner];
}
@@ -1395,7 +1430,7 @@ EdgebreakerTraversal_Start() { TypeNext()
-Next(corner) {
+Next(corner) {
return LocalIndex(++corner) ? corner : corner - 3;
}
@@ -1403,7 +1438,7 @@ EdgebreakerTraversal_Start() { TypePrevious()
-Previous(corner) {
+Previous(corner) {
return LocalIndex(corner) ? corner - 1 : corner + 2;
}
@@ -1411,7 +1446,7 @@ EdgebreakerTraversal_Start() { TypeVertex()
-Vertex(corner) {
+Vertex(corner) {
faces_[Face(corner)][LocalIndex(corner)];
}
@@ -1419,7 +1454,7 @@ EdgebreakerTraversal_Start() { TypeFace()
-Face(corner) {
+Face(corner) {
return corner / 3;
}
@@ -1427,7 +1462,7 @@ EdgebreakerTraversal_Start() { TypeLocalIndex()
-LocalIndex(corner) {
+LocalIndex(corner) {
return corner % 3;
}
@@ -1435,7 +1470,7 @@ EdgebreakerTraversal_Start() { Typenum_vertices()
-num_vertices() {
+num_vertices() {
return vertex_corners_.size();
}
@@ -1443,7 +1478,7 @@ EdgebreakerTraversal_Start() { Typenum_corners()
-num_corners() {
+num_corners() {
return faces_.size() * 3;
}
@@ -1451,7 +1486,7 @@ EdgebreakerTraversal_Start() { Typenum_faces()
-num_faces() {
+