[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61613] trunk/lib/ darwin-9.x.universal/openimageio: oiio 1.6.10
Martijn Berger
martijn.berger at gmail.com
Tue Feb 2 23:28:41 CET 2016
Revision: 61613
https://developer.blender.org/rBL61613
Author: juicyfruit
Date: 2016-02-02 22:28:40 +0000 (Tue, 02 Feb 2016)
Log Message:
-----------
oiio 1.6.10
Modified Paths:
--------------
trunk/lib/darwin-9.x.universal/openimageio/build.sh
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/SHA1.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/array_view.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/color.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/dassert.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/errorhandler.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filesystem.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/filter.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/fmath.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/hash.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/image_view.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagebuf.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagebufalgo.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagebufalgo_util.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imagecache.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/imageio.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/oiioversion.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/optparser.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/paramlist.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/plugin.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/pugixml.cpp
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/pugixml.hpp
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/refcnt.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/strided_ptr.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/string_view.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/strutil.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/sysutil.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/texture.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/thread.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/timer.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/typedesc.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/unordered_map_concurrent.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/ustring.h
trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/varyingref.h
trunk/lib/darwin-9.x.universal/openimageio/lib/libOpenImageIO.a
Modified: trunk/lib/darwin-9.x.universal/openimageio/build.sh
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/build.sh 2016-02-02 22:22:12 UTC (rev 61612)
+++ trunk/lib/darwin-9.x.universal/openimageio/build.sh 2016-02-02 22:28:40 UTC (rev 61613)
@@ -15,8 +15,6 @@
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.6 -stdlib=libstdc++" \
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform//Developer/SDKs/MacOSX10.9.sdk" \
-DILMBASE_HOME=$LIBDIR/openexr \
- -DILMBASE_INCLUDE_DIR=$LIBDIR/openexr/include \
- -DOPENEXR_INCLUDE_DIR=$LIBDIR/openexr/include \
-DOPENEXR_HOME=$LIBDIR/openexr \
-DLINKSTATIC=ON \
-DBUILDSTATIC=ON \
@@ -32,10 +30,11 @@
-DUSE_QT=OFF \
-DHIDE_SYMBOLS=OFF \
-DUSE_PYTHON=OFF \
+ -DUSE_SIMD=sse2 \
-DCMAKE_BUILD_TYPE=Release \
-DOIIO_BUILD_TESTS=OFF
-make -j12 install
+make -j4 install
cd ../..
@@ -52,8 +51,6 @@
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.6 -stdlib=libstdc++" \
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" \
-DILMBASE_HOME=$LIBDIR/openexr \
- -DILMBASE_INCLUDE_DIR=$LIBDIR/openexr/include \
- -DOPENEXR_INCLUDE_DIR=$LIBDIR/openexr/include \
-DOPENEXR_HOME=$LIBDIR/openexr \
-DLINKSTATIC=ON \
-DBUILDSTATIC=ON \
@@ -72,7 +69,7 @@
-DCMAKE_BUILD_TYPE=Release \
-DOIIO_BUILD_TESTS=OFF
-make -j12 install
+make -j4 install
cd ../..
Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/SHA1.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/SHA1.h 2016-02-02 22:22:12 UTC (rev 61612)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/SHA1.h 2016-02-02 22:28:40 UTC (rev 61613)
@@ -74,8 +74,11 @@
#ifndef ___SHA1_HDR___
#define ___SHA1_HDR___
+#include <climits>
+
#include "export.h"
#include "oiioversion.h"
+#include "platform.h"
#if !defined(SHA1_UTILITY_FUNCTIONS) && !defined(SHA1_NO_UTILITY_FUNCTIONS)
#define SHA1_UTILITY_FUNCTIONS
@@ -152,47 +155,16 @@
///////////////////////////////////////////////////////////////////////////
// Define variable types
-#ifndef UINT_8
-#ifdef _MSC_VER // Compiling with Microsoft compiler
-#define UINT_8 unsigned __int8
-#else // !_MSC_VER
-#define UINT_8 unsigned char
-#endif // _MSC_VER
-#endif
+#define UINT_8 uint8_t
+#define UINT_32 uint32_t
+#define UINT_64 uint64_t
+#define INT_64 int64_t
-#ifndef UINT_32
-#ifdef _MSC_VER // Compiling with Microsoft compiler
-#define UINT_32 unsigned __int32
-#else // !_MSC_VER
-#if (ULONG_MAX == 0xFFFFFFFF)
-#define UINT_32 unsigned long
-#else
-#define UINT_32 unsigned int
-#endif
-#endif // _MSC_VER
-#endif // UINT_32
-#ifndef INT_64
-#ifdef _MSC_VER // Compiling with Microsoft compiler
-#define INT_64 __int64
-#else // !_MSC_VER
-#define INT_64 long long
-#endif // _MSC_VER
-#endif // INT_64
-
-#ifndef UINT_64
-#ifdef _MSC_VER // Compiling with Microsoft compiler
-#define UINT_64 unsigned __int64
-#else // !_MSC_VER
-#define UINT_64 unsigned long long
-#endif // _MSC_VER
-#endif // UINT_64
-
///////////////////////////////////////////////////////////////////////////
// Declare SHA-1 workspace
-OIIO_NAMESPACE_ENTER
-{
+OIIO_NAMESPACE_BEGIN
typedef union
{
@@ -257,7 +229,6 @@
SHA1_WORKSPACE_BLOCK* m_block; // SHA1 pointer to the byte array above
};
-}
-OIIO_NAMESPACE_EXIT
+OIIO_NAMESPACE_END
#endif // ___SHA1_HDR___
Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h 2016-02-02 22:22:12 UTC (rev 61612)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/argparse.h 2016-02-02 22:28:40 UTC (rev 61613)
@@ -50,8 +50,7 @@
#include "tinyformat.h"
-OIIO_NAMESPACE_ENTER
-{
+OIIO_NAMESPACE_BEGIN
class ArgOption; // Forward declaration
@@ -171,6 +170,11 @@
/// description arguments passed to parse().
void usage () const;
+ /// Print a brief usage message to stdout. The usage message is
+ /// generated and formatted automatically based on the command and
+ /// description arguments passed to parse().
+ void briefusage () const;
+
/// Return the entire command-line as one string.
///
std::string command_line () const;
@@ -192,8 +196,13 @@
};
-}
-OIIO_NAMESPACE_EXIT
+// Define symbols that let client applications determine if newly added
+// features are supported.
+#define OIIO_ARGPARSE_SUPPORTS_BRIEFUSAGE 1
+
+OIIO_NAMESPACE_END
+
+
#endif // OPENIMAGEIO_ARGPARSE_H
Modified: trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/array_view.h
===================================================================
--- trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/array_view.h 2016-02-02 22:22:12 UTC (rev 61612)
+++ trunk/lib/darwin-9.x.universal/openimageio/include/OpenImageIO/array_view.h 2016-02-02 22:28:40 UTC (rev 61613)
@@ -1,7 +1,6 @@
/*
- Copyright 2014 Larry Gritz and the other authors and contributors.
+ Copyright 2015 Larry Gritz and the other authors and contributors.
All Rights Reserved.
- Based on BSD-licensed software Copyright 2004 NVIDIA Corp.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -34,17 +33,41 @@
#include <vector>
#include <stdexcept>
+#include <iostream>
+#if OIIO_CPLUSPLUS_VERSION >= 11
+# include <initializer_list>
+# include <type_traits>
+#else /* FIXME(C++11): this case can go away when C++11 is our minimum */
+# include <boost/type_traits.hpp>
+#endif
+
#include "oiioversion.h"
-#include "strided_ptr.h"
+#include "platform.h"
+#include "dassert.h"
+#include "coordinate.h"
+OIIO_NAMESPACE_BEGIN
-OIIO_NAMESPACE_ENTER {
+#if OIIO_CPLUSPLUS_VERSION >= 11
+using std::remove_const;
+using std::is_array;
+#else /* FIXME(C++11): this case can go away when C++11 is our minimum */
+using boost::remove_const;
+using boost::is_array;
+#endif
-/// array_view : a non-owning reference to a contiguous array with known
-/// length. An array_view<T> is mutable (the values in the array may be
-/// modified), whereas an array_view<const T> is not mutable.
+template <typename T, size_t Rank> class array_view;
+template <typename T, size_t Rank> class array_view_strided;
+
+
+
+
+/// array_view<T,Rank> : a non-owning reference to a contiguous array with
+/// known length. If Rank > 1, it's multi-dimensional. An array_view<T> is
+/// mutable (the values in the array may be modified), whereas an
+/// array_view<const T> is not mutable.
///
/// Background: Functions whose input requires a set of contiguous values
/// (an array) are faced with a dilemma. If the caller passes just a
@@ -60,130 +83,119 @@
/// is transparently and automatically computed without additional user
/// code).
-template <typename T>
+template <typename T, size_t Rank=1>
class array_view {
+ OIIO_STATIC_ASSERT (Rank >= 1);
+ OIIO_STATIC_ASSERT (is_array<T>::value == false);
public:
+#if OIIO_CPLUSPLUS_VERSION >= 11
+ // using iterator = bounds_iterator<Rank>;
+ // using const_iterator = bounds_iterator<Rank>;
+ static OIIO_CONSTEXPR_OR_CONST size_t rank = Rank;
+ using offset_type = offset<Rank>;
+ using bounds_type = OIIO::bounds<Rank>;
+ using stride_type = offset<Rank>;
+ using size_type = size_t;
+ using value_type = T;
+ using pointer = T*;
+ using const_pointer = const T*;
+ using reference = T&;
+#else
+ static const size_t rank = Rank;
+ typedef offset<Rank> offset_type;
+ typedef OIIO::bounds<Rank> bounds_type;
+ typedef offset<Rank> stride_type;
+ typedef size_t size_type;
typedef T value_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
- typedef const T& const_reference;
- typedef const_pointer const_iterator;
- typedef const_iterator iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef const_reverse_iterator reverse_iterator;
- typedef size_t size_type;
- typedef ptrdiff_t difference_type;
- static const size_type npos = ~size_type(0);
+#endif
/// Default ctr -- points to nothing
- array_view () : m_data(NULL), m_len(0) {}
+ array_view () : m_data(NULL) { }
/// Copy constructor
array_view (const array_view ©)
- : m_data(copy.data()), m_len(copy.size()) {}
+ : m_data(copy.data()), m_bounds(copy.bounds()) {}
/// Construct from T* and length.
- array_view (T *data, size_t len) : m_data(data), m_len(len) {}
+ array_view (pointer data, bounds_type bounds)
+ : m_data(data), m_bounds(bounds) { }
/// Construct from a single T&.
- array_view (T &data) : m_data(&data), m_len(1) {}
+ array_view (T &data) : m_data(&data), m_bounds(1) { }
- /// Construct from a range (begin and end pointers).
- array_view (T *begin, T *end)
- : m_data(begin), m_len(end-begin) {}
-
/// Construct from a fixed-length C array. Template magic automatically
/// finds the length from the declared type of the array.
template<size_t N>
- array_view (T (&data)[N]) : m_data(data), m_len(N) {}
+ array_view (T (&data)[N]) : m_data(data), m_bounds(N) {
+ DASSERT (Rank == 1);
+ }
/// Construct from std::vector<T>.
array_view (std::vector<T> &v)
- : m_data(v.size() ? &v[0] : NULL), m_len(v.size()) {}
+ : m_data(v.size() ? &v[0] : NULL), m_bounds(v.size()) {
+ DASSERT (Rank == 1);
+ }
+ /// Construct from const std::vector<T>.
+ /// This turns const std::vector<T> into an array_view<const T> (the
+ /// array_view isn't const, but the data it points to will be).
+ array_view (const std::vector<typename remove_const<T>::type> &v)
+ : m_data(v.size() ? &v[0] : NULL), m_bounds(v.size()) {
+ DASSERT (Rank == 1);
+ }
+
// assignments
array_view& operator= (const array_view ©) {
m_data = copy.data();
- m_len = copy.size();
+ m_bounds = copy.bounds();
return *this;
}
- // iterators
- iterator begin() const { return m_data; }
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list