message: gltfpack: Move round functions slightly higher in the file
  This makes sure we can use them from Basisu encoder, since we're moving
  a lot of things around in this change anyway this will help subsequent
  changes.
diff: @@ -248,6 +248,31 @@ static bool getDimensions(const std::string& data, const char* mime_type, int& w
  return false;
  }
  +static int roundPow2(int value)
  +{
  + int result = 1;
  +
  + while (result < value)
  + result <<= 1;
  +
  + // to prevent odd texture sizes from increasing the size too much, we round to nearest power of 2 above a certain size
  + if (value > 128 && result * 3 / 4 > value)
  + result >>= 1;
  +
  + return result;
  +}
  +
  +static int roundBlock(int value, bool pow2)
  +{
  + if (value == 0)
  + return 4;
  +
  + if (pow2 && value > 4)
  + return roundPow2(value);
  +
  + return (value + 3) & ~3;
  +}
  +
  #ifdef __wasi__
  static int execute(const char* cmd, bool ignore_stdout, bool ignore_stderr)
  {
  @@ -383,31 +408,6 @@ bool checkKtx(bool verbose)
  return rc == 0;
  }
  -static int roundPow2(int value)
  -{
  - int result = 1;
  -
  - while (result < value)
  - result <<= 1;
  -
  - // to prevent odd texture sizes from increasing the size too much, we round to nearest power of 2 above a certain size
  - if (value > 128 && result * 3 / 4 > value)
  - result >>= 1;
  -
  - return result;
  -}
  -
  -static int roundBlock(int value, bool pow2)
  -{
  - if (value == 0)
  - return 4;
  -
  - if (pow2 && value > 4)
  - return roundPow2(value);
  -
  - return (value + 3) & ~3;
  -}
  -
  bool encodeKtx(const std::string& data, const char* mime_type, std::string& result, const ImageInfo& info, const Settings& settings)
  {
  int width = 0, height = 0;
  