[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41660] trunk/lib/windows/gcc: MinGW libs for OpenImageIO

Antony Riakiotakis kalast at gmail.com
Tue Nov 8 15:42:11 CET 2011


Revision: 41660
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41660
Author:   psy-fi
Date:     2011-11-08 14:42:11 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
MinGW libs for OpenImageIO

Added Paths:
-----------
    trunk/lib/windows/gcc/openimageio/
    trunk/lib/windows/gcc/openimageio/include/
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/argparse.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/colortransfer.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/dassert.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/errorhandler.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/export.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/filesystem.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/filter.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/fmath.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/hash.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/imagebuf.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/imagebufalgo.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/imagecache.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/imageio.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/osdep.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/paramlist.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/pugiconfig.hpp
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/pugixml.hpp
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/refcnt.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/strutil.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/sysutil.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/texture.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/thread.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/timer.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/typedesc.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/ustring.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/varyingref.h
    trunk/lib/windows/gcc/openimageio/include/OpenImageIO/version.h
    trunk/lib/windows/gcc/openimageio/lib/
    trunk/lib/windows/gcc/openimageio/lib/libOpenImageIO.a
    trunk/lib/windows/gcc/openimageio/oiio-build.bat
    trunk/lib/windows/gcc/openimageio/patch.diff

Added: trunk/lib/windows/gcc/openimageio/include/OpenImageIO/argparse.h
===================================================================
--- trunk/lib/windows/gcc/openimageio/include/OpenImageIO/argparse.h	                        (rev 0)
+++ trunk/lib/windows/gcc/openimageio/include/OpenImageIO/argparse.h	2011-11-08 14:42:11 UTC (rev 41660)
@@ -0,0 +1,184 @@
+/*
+  Copyright 2008 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
+  met:
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+  * Neither the name of the software's owners nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  (This is the Modified BSD License)
+*/
+
+
+/// \file
+/// \brief Simple parsing of program command-line arguments.
+
+
+#ifndef OPENIMAGEIO_ARGPARSE_H
+#define OPENIMAGEIO_ARGPARSE_H
+
+#include <vector>
+
+#include "export.h"
+#include "version.h"
+
+#ifndef OPENIMAGEIO_PRINTF_ARGS  /* See comments in strutil.h */
+#   ifndef __GNUC__
+#       define __attribute__(x)
+#   endif
+#   define OPENIMAGEIO_PRINTF_ARGS(fmtarg_pos, vararg_pos) \
+        __attribute__ ((format (printf, fmtarg_pos, vararg_pos) ))
+#endif
+
+
+OIIO_NAMESPACE_ENTER
+{
+
+
+class ArgOption;   // Forward declaration
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+///
+/// \class ArgParse
+///
+/// Argument Parsing
+///
+/// The parse function takes a list of options and variables or functions
+/// for storing option values and return <0 on failure:
+///
+/// \code
+///    static int
+///    parse_files (int argc, const char *argv[])
+///    {
+///        for (int i = 0;  i < argc;  i++)
+///            filenames.push_back (argv[i]);
+///        return 0;
+///    }
+/// 
+///    ...
+///
+///    ArgParse ap;
+///
+///    ap.options ("Usage: myapp [options] filename...",
+///            "%*", parse_objects, "",
+///            "-camera %f %f %f", &camera[0], &camera[1], &camera[2],
+///                  "set the camera position",
+///            "-lookat %f %f %f", &lx, &ly, &lz,
+///                  "set the position of interest",
+///            "-oversampling %d", &oversampling,  "oversamping rate",
+///            "-passes %d", &passes, "number of passes",
+///            "-lens %f %f %f", &aperture, &focalDistance, &focalLength,
+///                   "set aperture, focal distance, focal length",
+///            "-format %d %d %f", &width, &height, &aspect,
+///                   "set width, height, aspect ratio",
+///            "-v", &flag, "verbose output",
+///            NULL);
+///
+///    if (ap.parse (argc, argv) < 0) {
+///        std::cerr << ap.geterror() << std::endl;
+///        ap.usage ();
+///        return EXIT_FAILURE;
+///    }
+/// \endcode
+///
+/// The available argument types are:
+///    - no \% argument - bool flag
+///    - \%d - 32bit integer
+///    - \%f - 32bit float
+///    - \%F - 64bit float (double)
+///    - \%s - std::string
+///    - \%L - std::vector<std::string>  (takes 1 arg, appends to list)
+///    - \%* - catch all non-options and pass individually as an (argc,argv) 
+///            sublist to a callback, each immediately after it's found
+///
+/// There are several special format tokens:
+///    - "<SEPARATOR>" - not an option at all, just a description to print
+///                     in the usage output.
+///
+/// Notes:
+///   - If an option doesn't have any arguments, a flag argument is assumed.
+///   - Flags are initialized to false.  No other variables are initialized.
+///   - The empty string, "", is used as a global sublist (ie. "%*").
+///   - Sublist functions are all of the form "int func(int argc, char **argv)".
+///   - If a sublist function returns -1, parse() will terminate early.
+///
+/////////////////////////////////////////////////////////////////////////////
+
+
+class DLLPUBLIC ArgParse {
+public:
+    ArgParse (int argc=0, const char **argv=NULL);
+    ~ArgParse ();
+
+    /// Declare the command line options.  After the introductory
+    /// message, parameters are a set of format strings and variable
+    /// pointers.  Each string contains an option name and a scanf-like
+    /// format string to enumerate the arguments of that option
+    /// (eg. "-option %d %f %s").  The format string is followed by a
+    /// list of pointers to the argument variables, just like scanf.  A
+    /// NULL terminates the list.
+    int options (const char *intro, ...);
+
+    /// With the options already set up, parse the command line.
+    /// Return 0 if ok, -1 if it's a malformed command line.
+    int parse (int argc, const char **argv);
+
+    /// Return any error messages generated during the course of parse()
+    /// (and clear any error flags).  If no error has occurred since the
+    /// last time geterror() was called, it will return an empty string.
+    std::string geterror () const;
+    
+    /// Deprecated
+    ///
+    std::string error_message () const { return geterror (); }
+
+    /// Print the usage message to stdout.  The usage message is
+    /// generated and formatted automatically based on the command and
+    /// description arguments passed to parse().
+    void usage () const;
+
+    /// Return the entire command-line as one string.
+    ///
+    std::string command_line () const;
+
+private:
+    int m_argc;                           // a copy of the command line argc
+    const char **m_argv;                  // a copy of the command line argv
+    mutable std::string m_errmessage;     // error message
+    ArgOption *m_global;                  // option for extra cmd line arguments
+    std::string m_intro;
+    std::vector<ArgOption *> m_option;
+
+    ArgOption *find_option(const char *name);
+    void error (const char *format, ...) OPENIMAGEIO_PRINTF_ARGS(2,3);
+    int found (const char *option);      // number of times option was parsed
+};
+
+
+}
+OIIO_NAMESPACE_EXIT
+
+
+#endif // OPENIMAGEIO_ARGPARSE_H

Added: trunk/lib/windows/gcc/openimageio/include/OpenImageIO/colortransfer.h
===================================================================
--- trunk/lib/windows/gcc/openimageio/include/OpenImageIO/colortransfer.h	                        (rev 0)
+++ trunk/lib/windows/gcc/openimageio/include/OpenImageIO/colortransfer.h	2011-11-08 14:42:11 UTC (rev 41660)
@@ -0,0 +1,90 @@
+/*
+  Copyright 2010 Larry Gritz and the other authors and contributors.
+  All Rights Reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions are
+  met:
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+  * Neither the name of the software's owners nor the names of its
+    contributors may be used to endorse or promote products derived from
+    this software without specific prior written permission.
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+  (This is the Modified BSD License)
+*/
+
+#ifndef OPENIMAGEIO_COLORTRANSFER_H
+#define OPENIMAGEIO_COLORTRANSFER_H
+
+#include "export.h"
+#include "version.h"
+
+OIIO_NAMESPACE_ENTER
+{
+
+/// Base class a functor that remaps values accorrding to a color
+/// transfer function.
+class DLLPUBLIC ColorTransfer {
+public:
+    ColorTransfer (std::string name_) { m_name = name_; };
+    virtual ~ColorTransfer (void) { };
+    
+    /// Return the name of the color transfer function, e.g., "sRGB_to_linear",
+    /// "linear_to_Rec709", etc.
+    const std::string name (void) { return m_name; };
+    
+    /// Return a vector of transfer paramater names
+    ///
+    const std::vector<std::string> & paramaters (void) { return m_params; };
+    
+    /// Set a transfer function paramater If the name is not recognized,
+    /// return false.
+    virtual bool set (std::string name_, float param);
+    
+    /// Get a transfer function paramater
+    /// If the name is not recognized, return false.
+    virtual bool get (std::string name_, float &param);
+    
+    /// Evalutate the transfer function.
+    virtual float operator() (float x) = 0;
+    

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list