message: vertexcodec: Use parallelogram prediction for vertex data
  Using the prediction data, we use byte-wise parallelogram prediction to
  estimate vertex components and encode deltas.
  This results in smaller deltas, making them more compressible - on
  nyra.obj this reduces size from 70.6 bpv to 66.0 bpv.
diff: #include <assert.h>
  #include <string.h>
  +#include <stdio.h>
  +
  // This work is based on:
  // TODO: references
  namespace meshopt
  @@ -13,8 +15,6 @@ const size_t kVertexBlockSize = 256;
  static unsigned char* encodeVertexBlock(unsigned char* data, const unsigned char* vertex_data, size_t vertex_count, size_t vertex_size, const unsigned int* prediction)
  {
  - (void)prediction;
  -
  assert(vertex_count > 0 && vertex_count <= 256);
  *data++ = static_cast<unsigned char>(vertex_count - 1);
  @@ -26,12 +26,30 @@ static unsigned char* encodeVertexBlock(unsigned char* data, const unsigned char
  for (size_t k = 0; k < vertex_size; ++k)
  {
  - size_t vertex_offset = k;
  + size_t vertex_offset = k + vertex_size;
  for (size_t i = 1; i < vertex_count; ++i)
  {
  - *data++ = vertex_data[vertex_offset + vertex_size] - vertex_data[vertex_offset];
  + unsigned char p = vertex_data[vertex_offset - vertex_size];
  +
  + if (prediction[i])
  + {
  + unsigned char pa = prediction[i] >> 16;
  + unsigned char pb = prediction[i] >> 8;
  + unsigned char pc = prediction[i] >> 0;
  + assert(pa > 0 && pb > 0 && pc > 0);
  +
  + if (pa <= i && pb <= i && pc <= i)
  + {
  + unsigned char va = vertex_data[vertex_offset - pa * vertex_size];
  + unsigned char vb = vertex_data[vertex_offset - pb * vertex_size];
  + unsigned char vc = vertex_data[vertex_offset - pc * vertex_size];
  +
  + p = va + vb - vc;
  + }
  + }
  + *data++ = vertex_data[vertex_offset] - p;
  vertex_offset += vertex_size;
  }
  }
  