From 24b91359da1c69ab3ba6d6f979cda737862a46b5 Mon Sep 17 00:00:00 2001 From: Frank Galligan Date: Fri, 20 Oct 2017 15:02:57 -0700 Subject: [PATCH] Spec: Add some named constants - Addresses a comment in KhronosGroup/glTF#1114 --- docs/spec/rans.decoding.md | 4 ++-- docs/spec/sequential.decoder.md | 4 ++-- docs/spec/variable.descriptions.md | 7 +++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/spec/rans.decoding.md b/docs/spec/rans.decoding.md index 696d47b..4ee00c3 100644 --- a/docs/spec/rans.decoding.md +++ b/docs/spec/rans.decoding.md @@ -6,9 +6,9 @@ ~~~~~ void DecodeSymbols(num_symbols, num_components, out_values) { scheme UI8 - if (scheme == 0) { + if (scheme == TAGGED_SYMBOLS) { DecodeTaggedSymbols(num_symbols, num_components, out_values); - } else if (scheme == 1) { + } else if (scheme == RAW_SYMBOLS) { DecodeRawSymbols(num_symbols, out_values); } } diff --git a/docs/spec/sequential.decoder.md b/docs/spec/sequential.decoder.md index c65a8d0..d94ffdd 100644 --- a/docs/spec/sequential.decoder.md +++ b/docs/spec/sequential.decoder.md @@ -114,9 +114,9 @@ void DecodeSequentialCompressedIndices() { ~~~~~ void DecodeSequentialConnectivityData() { ParseSequentialConnectivityData(); - if (connectivity_method == 0) { + if (connectivity_method == SEQUENTIAL_COMPRESSED_INDICES) { DecodeSequentialCompressedIndices(); - } else if (connectivity_method == 1) { + } else if (connectivity_method == SEQUENTIAL_UNCOMPRESSED_INDICES) { DecodeSequentialIndices(); } } diff --git a/docs/spec/variable.descriptions.md b/docs/spec/variable.descriptions.md index e1d8cde..19e3711 100644 --- a/docs/spec/variable.descriptions.md +++ b/docs/spec/variable.descriptions.md @@ -15,6 +15,10 @@ * 2: SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION * 3: SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS +* Sequential indices encoding methods + * 0: SEQUENTIAL_COMPRESSED_INDICES + * 1: SEQUENTIAL_UNCOMPRESSED_INDICES + * Prediction encoding methods * -2: PREDICTION_NONE * 0: PREDICTION_DIFFERENCE @@ -66,6 +70,9 @@ * 256: IO_BASE * 4096: L_RANS_BASE +* Symbol encoding methods + * 0: TAGGED_SYMBOLS + * 1: RAW_SYMBOLS ### Variables