2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2003-04-28 02:15:46 +00:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2008-04-16 22:40:48 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2003-04-28 02:15:46 +00:00
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-04-28 02:15:46 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
|
*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2003-04-28 02:15:46 +00:00
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:23:21 +00:00
|
|
|
/** \file blender/imbuf/intern/IMB_anim.h
|
|
|
|
|
* \ingroup imbuf
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __IMB_ANIM_H__
|
|
|
|
|
#define __IMB_ANIM_H__
|
2003-04-28 02:15:46 +00:00
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
2011-09-19 06:32:19 +00:00
|
|
|
# define INC_OLE2
|
|
|
|
|
# include <windows.h>
|
|
|
|
|
# include <windowsx.h>
|
|
|
|
|
# include <mmsystem.h>
|
|
|
|
|
# include <memory.h>
|
|
|
|
|
# include <commdlg.h>
|
|
|
|
|
|
|
|
|
|
# ifndef FREE_WINDOWS
|
|
|
|
|
# include <vfw.h>
|
|
|
|
|
# endif
|
2003-04-28 02:15:46 +00:00
|
|
|
|
2011-09-19 06:32:19 +00:00
|
|
|
# undef AVIIF_KEYFRAME // redefined in AVI_avi.h
|
|
|
|
|
# undef AVIIF_LIST // redefined in AVI_avi.h
|
2012-04-12 03:10:36 +00:00
|
|
|
#endif /* _WIN32 */
|
2003-04-28 02:15:46 +00:00
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <ctype.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdio.h>
|
2011-09-19 06:32:19 +00:00
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
# include <io.h>
|
2003-04-28 02:15:46 +00:00
|
|
|
#else
|
2011-09-19 06:32:19 +00:00
|
|
|
# include <dirent.h>
|
2003-04-28 02:15:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "imbuf.h"
|
|
|
|
|
|
|
|
|
|
#include "AVI_avi.h"
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_QUICKTIME
|
2011-09-19 06:32:19 +00:00
|
|
|
# if defined(_WIN32) || defined(__APPLE__)
|
|
|
|
|
# include "quicktime_import.h"
|
|
|
|
|
# endif /* _WIN32 || __APPLE__ */
|
2003-04-28 02:15:46 +00:00
|
|
|
#endif /* WITH_QUICKTIME */
|
|
|
|
|
|
2006-02-05 19:23:34 +00:00
|
|
|
#ifdef WITH_FFMPEG
|
2011-09-19 06:32:19 +00:00
|
|
|
# include <libavformat/avformat.h>
|
|
|
|
|
# include <libavcodec/avcodec.h>
|
|
|
|
|
# include <libswscale/swscale.h>
|
2006-02-05 19:23:34 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-06-02 21:35:57 +00:00
|
|
|
#ifdef WITH_REDCODE
|
2011-09-19 06:32:19 +00:00
|
|
|
# ifdef _WIN32 /* on windows we use the one in extern instead */
|
|
|
|
|
# include "libredcode/format.h"
|
|
|
|
|
# else
|
|
|
|
|
# include "libredcode/format.h"
|
|
|
|
|
# endif
|
2008-06-02 21:35:57 +00:00
|
|
|
#endif
|
|
|
|
|
|
2003-04-28 02:15:46 +00:00
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
|
|
|
|
|
#include "IMB_allocimbuf.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* actually hard coded endianness */
|
|
|
|
|
#define GET_BIG_LONG(x) (((uchar *) (x))[0] << 24 | ((uchar *) (x))[1] << 16 | ((uchar *) (x))[2] << 8 | ((uchar *) (x))[3])
|
|
|
|
|
#define GET_LITTLE_LONG(x) (((uchar *) (x))[3] << 24 | ((uchar *) (x))[2] << 16 | ((uchar *) (x))[1] << 8 | ((uchar *) (x))[0])
|
|
|
|
|
#define SWAP_L(x) (((x << 24) & 0xff000000) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) | ((x >> 24) & 0xff))
|
|
|
|
|
#define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff))
|
|
|
|
|
|
|
|
|
|
/* more endianness... should move to a separate file... */
|
2011-09-19 08:02:17 +00:00
|
|
|
#ifdef __BIG_ENDIAN__
|
|
|
|
|
# define GET_ID GET_BIG_LONG
|
|
|
|
|
# define LITTLE_LONG SWAP_LONG
|
2003-04-28 02:15:46 +00:00
|
|
|
#else
|
2011-09-19 08:02:17 +00:00
|
|
|
# define GET_ID GET_LITTLE_LONG
|
|
|
|
|
# define LITTLE_LONG ENDIAN_NOP
|
2003-04-28 02:15:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
2011-01-15 16:14:57 +00:00
|
|
|
/* anim.curtype, runtime only */
|
2012-05-16 09:26:37 +00:00
|
|
|
#define ANIM_NONE 0
|
|
|
|
|
#define ANIM_SEQUENCE (1 << 0)
|
|
|
|
|
#define ANIM_MOVIE (1 << 4)
|
|
|
|
|
#define ANIM_AVI (1 << 6)
|
|
|
|
|
#define ANIM_QTIME (1 << 7)
|
2011-01-15 16:14:57 +00:00
|
|
|
#define ANIM_FFMPEG (1 << 8)
|
|
|
|
|
#define ANIM_REDCODE (1 << 9)
|
2003-04-28 02:15:46 +00:00
|
|
|
|
2012-05-16 09:26:37 +00:00
|
|
|
#define MAXNUMSTREAMS 50
|
2003-04-28 02:15:46 +00:00
|
|
|
|
Merge image related changes from the render branch. This includes the image
tile cache code in imbuf, but it is not hooked up to the render engine.
Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).
* Added a ImFileType struct with callbacks to make adding an file format type,
or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
editing the code directly.
* Functions removed that were only used for sequencer plugin API:
IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
line utility 'exrheader'
For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
2010-05-07 15:18:04 +00:00
|
|
|
struct _AviMovie;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
struct anim_index;
|
Merge image related changes from the render branch. This includes the image
tile cache code in imbuf, but it is not hooked up to the render engine.
Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).
* Added a ImFileType struct with callbacks to make adding an file format type,
or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
editing the code directly.
* Functions removed that were only used for sequencer plugin API:
IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
line utility 'exrheader'
For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
2010-05-07 15:18:04 +00:00
|
|
|
|
2003-04-28 02:15:46 +00:00
|
|
|
struct anim {
|
|
|
|
|
int ib_flags;
|
|
|
|
|
int curtype;
|
2012-05-16 09:26:37 +00:00
|
|
|
int curposition; /* index 0 = 1e, 1 = 2e, enz. */
|
2003-04-28 02:15:46 +00:00
|
|
|
int duration;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
short frs_sec;
|
|
|
|
|
float frs_sec_base;
|
2003-04-28 02:15:46 +00:00
|
|
|
int x, y;
|
|
|
|
|
|
2012-07-06 23:56:59 +00:00
|
|
|
/* for number */
|
2012-01-21 14:54:53 +00:00
|
|
|
char name[1024];
|
2012-07-06 23:56:59 +00:00
|
|
|
/* for sequence */
|
2012-01-21 14:54:53 +00:00
|
|
|
char first[1024];
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-05-16 09:26:37 +00:00
|
|
|
/* movie */
|
2003-04-28 02:15:46 +00:00
|
|
|
void *movie;
|
|
|
|
|
void *track;
|
|
|
|
|
void *params;
|
|
|
|
|
int orientation;
|
|
|
|
|
size_t framesize;
|
|
|
|
|
int interlacing;
|
2006-03-07 20:01:12 +00:00
|
|
|
int preseek;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
int streamindex;
|
2003-04-28 02:15:46 +00:00
|
|
|
|
2012-05-16 09:26:37 +00:00
|
|
|
/* avi */
|
2003-04-28 02:15:46 +00:00
|
|
|
struct _AviMovie *avi;
|
|
|
|
|
|
|
|
|
|
#if defined(_WIN32) && !defined(FREE_WINDOWS)
|
2012-05-16 09:26:37 +00:00
|
|
|
/* windows avi */
|
2003-04-28 02:15:46 +00:00
|
|
|
int avistreams;
|
|
|
|
|
int firstvideo;
|
|
|
|
|
int pfileopen;
|
2012-05-16 09:26:37 +00:00
|
|
|
PAVIFILE pfile;
|
|
|
|
|
PAVISTREAM pavi[MAXNUMSTREAMS]; // the current streams
|
|
|
|
|
PGETFRAME pgf;
|
2003-04-28 02:15:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_QUICKTIME
|
2012-05-16 09:26:37 +00:00
|
|
|
/* quicktime */
|
2003-04-28 02:15:46 +00:00
|
|
|
struct _QuicktimeMovie *qtime;
|
|
|
|
|
#endif /* WITH_QUICKTIME */
|
2006-02-05 19:23:34 +00:00
|
|
|
|
|
|
|
|
#ifdef WITH_FFMPEG
|
|
|
|
|
AVFormatContext *pFormatCtx;
|
|
|
|
|
AVCodecContext *pCodecCtx;
|
|
|
|
|
AVCodec *pCodec;
|
2007-09-23 14:04:23 +00:00
|
|
|
AVFrame *pFrame;
|
2011-11-20 16:08:56 +00:00
|
|
|
int pFrameComplete;
|
2008-06-29 15:11:35 +00:00
|
|
|
AVFrame *pFrameRGB;
|
|
|
|
|
AVFrame *pFrameDeinterlaced;
|
2007-09-23 14:04:23 +00:00
|
|
|
struct SwsContext *img_convert_ctx;
|
2006-02-05 19:23:34 +00:00
|
|
|
int videoStream;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-05-16 09:26:37 +00:00
|
|
|
struct ImBuf *last_frame;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
int64_t last_pts;
|
|
|
|
|
int64_t next_pts;
|
|
|
|
|
AVPacket next_packet;
|
2006-02-05 19:23:34 +00:00
|
|
|
#endif
|
|
|
|
|
|
2008-06-02 21:35:57 +00:00
|
|
|
#ifdef WITH_REDCODE
|
2012-05-16 09:26:37 +00:00
|
|
|
struct redcode_handle *redcodeCtx;
|
2008-06-02 21:35:57 +00:00
|
|
|
#endif
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-01-21 14:54:53 +00:00
|
|
|
char index_dir[768];
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
|
|
|
|
int proxies_tried;
|
|
|
|
|
int indices_tried;
|
|
|
|
|
|
2012-05-16 09:26:37 +00:00
|
|
|
struct anim *proxy_anim[IMB_PROXY_MAX_SLOT];
|
|
|
|
|
struct anim_index *curr_idx[IMB_TC_MAX_SLOT];
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
char colorspace[64];
|
2003-04-28 02:15:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|