diff --git a/docs/spec/core.functions.md b/docs/spec/core.functions.md index 47afd24..2d07a66 100644 --- a/docs/spec/core.functions.md +++ b/docs/spec/core.functions.md @@ -15,3 +15,42 @@ void DecodeVarint(out_val) { } ~~~~~ {:.draco-syntax } + + +### mem_get_le16 + +~~~~~ +uint32_t mem_get_le16(mem) { + val = mem[1] << 8; + val |= mem[0]; + return val; +} +~~~~~ +{:.draco-syntax } + + +### mem_get_le24 + +~~~~~ +uint32_t mem_get_le24(mem) { + val = mem[2] << 16; + val |= mem[1] << 8; + val |= mem[0]; + return val; +} +~~~~~ +{:.draco-syntax } + + +### mem_get_le32 + +~~~~~ +uint32_t mem_get_le32(mem) { + val = mem[3] << 24; + val |= mem[2] << 16; + val |= mem[1] << 8; + val |= mem[0]; + return val; +} +~~~~~ +{:.draco-syntax } diff --git a/docs/spec/metadata.decoder.md b/docs/spec/metadata.decoder.md index 86f0d54..e454944 100644 --- a/docs/spec/metadata.decoder.md +++ b/docs/spec/metadata.decoder.md @@ -4,7 +4,7 @@ ~~~~~ void DecodeMetadata() { - ParseMetedataCount(); + ParseMetadataCount(); for (i = 0; i < num_att_metadata; ++i) { ParseAttributeMetadataId(i); @@ -16,10 +16,10 @@ void DecodeMetadata() { {:.draco-syntax} -### ParseMetedataCount() +### ParseMetadataCount() ~~~~~ -void ParseMetedataCount() { +void ParseMetadataCount() { num_att_metadata varUI32 } ~~~~~ diff --git a/docs/spec/prediction.texcoords.decoder.md b/docs/spec/prediction.texcoords.decoder.md index 3f4054d..407d8cc 100644 --- a/docs/spec/prediction.texcoords.decoder.md +++ b/docs/spec/prediction.texcoords.decoder.md @@ -42,8 +42,8 @@ void GetPositionForEntryId(entry_id, pos) { ~~~~~ void GetTexCoordForEntryId(entry_id, data, tex_coords) { data_offset = entry_id * kTexCoordsNumComponents; - tex_coords->push_back(data[data_offset]); - tex_coords->push_back(data[data_offset + 1]); + tex_coords.push_back(data[data_offset]); + tex_coords.push_back(data[data_offset + 1]); } ~~~~~ {:.draco-syntax} diff --git a/docs/spec/rans.decoding.md b/docs/spec/rans.decoding.md index 6a85c43..911c5de 100644 --- a/docs/spec/rans.decoding.md +++ b/docs/spec/rans.decoding.md @@ -61,7 +61,6 @@ void DecodeTaggedSymbols(num_values, num_components, out_values) { rans_precision = 1 << rans_precision_bits_t; l_rans_base = rans_precision * 4; num_symbols_ varUI32 - ReadVarUI32(&num_symbols_); BuildSymbolTables(num_symbols_, lut_table_, probability_table_); bytes_encoded varUI64 encoded_data UI8[size] @@ -220,18 +219,18 @@ void fetch_sym(sym, rem, lut_table_, probability_table_) { ~~~~~ void RabsDescRead(ans, p0, out_val) { p = rabs_ans_p8_precision - p0; - if (ans->state < rabs_l_base) { - ans->state = ans->state * IO_BASE + ans->buf[--ans->buf_offset]; + if (ans.state < rabs_l_base) { + ans.state = ans.state * IO_BASE + ans.buf[--ans.buf_offset]; } - x = ans->state; + x = ans.state; quot = x / rabs_ans_p8_precision; rem = x % rabs_ans_p8_precision; xn = quot * p; val = rem < p; if (val) { - ans->state = xn + rem; + ans.state = xn + rem; } else { - ans->state = x - xn - p; + ans.state = x - xn - p; } out_val = val; } diff --git a/docs/spec/variable.descriptions.md b/docs/spec/variable.descriptions.md index 5224f10..19171ed 100644 --- a/docs/spec/variable.descriptions.md +++ b/docs/spec/variable.descriptions.md @@ -6,6 +6,9 @@ * 0: MESH_SEQUENTIAL_ENCODING * 1: MESH_EDGEBREAKER_ENCODING +* Metadata constants + * 32768: METADATA_FLAG_MASK + * Sequential attribute encoding methods * 0: SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC * 1: SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER