2011-11-07 13:55:18 +01:00
|
|
|
/*
|
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 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,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
2012-03-04 21:23:50 +01:00
|
|
|
* The Original Code is Copyright (C) 2011 Blender Foundation.
|
2011-11-07 13:55:18 +01:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation,
|
|
|
|
* Sergey Sharybin
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file DNA_movieclip_types.h
|
|
|
|
* \ingroup DNA
|
|
|
|
* \since may-2011
|
|
|
|
* \author Sergey Sharybin
|
|
|
|
*/
|
|
|
|
|
2012-02-17 19:59:41 +01:00
|
|
|
#ifndef __DNA_MOVIECLIP_TYPES_H__
|
|
|
|
#define __DNA_MOVIECLIP_TYPES_H__
|
2011-12-30 08:25:49 +01:00
|
|
|
|
2011-11-07 13:55:18 +01:00
|
|
|
#include "DNA_ID.h"
|
|
|
|
#include "DNA_tracking_types.h"
|
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 12:05:07 +02:00
|
|
|
#include "DNA_color_types.h" /* for color management */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
struct anim;
|
2012-02-17 09:13:45 +01:00
|
|
|
struct AnimData;
|
2011-11-07 13:55:18 +01:00
|
|
|
struct bGPdata;
|
|
|
|
struct ImBuf;
|
|
|
|
struct MovieClipProxy;
|
|
|
|
struct MovieTrackingTrack;
|
|
|
|
struct MovieTrackingMarker;
|
|
|
|
|
|
|
|
typedef struct MovieClipUser {
|
2012-06-10 21:59:02 +02:00
|
|
|
int framenr; /* current frame number */
|
|
|
|
short render_size, render_flag; /* proxy render size */
|
2011-11-07 13:55:18 +01:00
|
|
|
} MovieClipUser;
|
|
|
|
|
|
|
|
typedef struct MovieClipProxy {
|
2012-06-10 21:59:02 +02:00
|
|
|
char dir[768]; /* 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy) */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
short tc; /* time code in use */
|
|
|
|
short quality; /* proxy build quality */
|
|
|
|
short build_size_flag; /* size flags (see below) of all proxies to build */
|
|
|
|
short build_tc_flag; /* time code flags (see below) of all tc indices to build */
|
2011-11-07 13:55:18 +01:00
|
|
|
} MovieClipProxy;
|
|
|
|
|
|
|
|
typedef struct MovieClip {
|
|
|
|
ID id;
|
2012-06-10 21:59:02 +02:00
|
|
|
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
char name[1024]; /* file path, 1024 = FILE_MAX */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
int source; /* sequence or movie */
|
|
|
|
int lastframe; /* last accessed frame number */
|
|
|
|
int lastsize[2]; /* size of last accessed frame */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
float aspx, aspy; /* display aspect */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
struct anim *anim; /* movie source data */
|
|
|
|
struct MovieClipCache *cache; /* cache for different stuff, not in file */
|
|
|
|
struct bGPdata *gpd; /* grease pencil data */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
struct MovieTracking tracking; /* data for SfM tracking */
|
|
|
|
void *tracking_context; /* context of tracking job
|
|
|
|
* used to synchronize data like framenumber
|
|
|
|
* in SpaceClip clip user */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
struct MovieClipProxy proxy; /* proxy to clip data */
|
2012-03-26 15:30:53 +02:00
|
|
|
int flag;
|
|
|
|
|
2012-06-10 21:59:02 +02:00
|
|
|
int len; /* length of movie */
|
2012-06-05 20:38:09 +02:00
|
|
|
|
2012-06-12 23:25:23 +02:00
|
|
|
int start_frame; /* scene frame number footage starts playing at */
|
|
|
|
/* affects all data which is associated with a clip */
|
|
|
|
/* such as motion tracking, camera reconstruciton and so */
|
|
|
|
|
|
|
|
int frame_offset; /* offset which is adding to a file number when reading frame */
|
|
|
|
/* from a file. affects only a way how scene frame is mapping */
|
|
|
|
/* to a file name and not touches other data associated with */
|
|
|
|
/* a clip */
|
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 12:05:07 +02:00
|
|
|
|
|
|
|
/* color management */
|
|
|
|
ColorManagedColorspaceSettings colorspace_settings;
|
2011-11-07 13:55:18 +01:00
|
|
|
} MovieClip;
|
|
|
|
|
|
|
|
typedef struct MovieClipScopes {
|
2012-06-12 13:13:53 +02:00
|
|
|
short ok; /* 1 means scopes are ok and recalculation is unneeded */
|
|
|
|
short use_track_mask; /* whether track's mask should be applied on preview */
|
2012-06-10 21:59:02 +02:00
|
|
|
int track_preview_height; /* height of track preview widget */
|
|
|
|
int frame_width, frame_height; /* width and height of frame for which scopes are calculated */
|
|
|
|
struct MovieTrackingMarker undist_marker; /* undistorted position of marker used for pattern sampling */
|
|
|
|
struct ImBuf *track_search; /* search area of a track */
|
|
|
|
struct ImBuf *track_preview; /* ImBuf displayed in track preview */
|
|
|
|
float track_pos[2]; /* sub-pizel position of marker in track ImBuf */
|
|
|
|
short track_disabled; /* active track is disabled, special notifier should be drawn */
|
2012-06-12 13:13:53 +02:00
|
|
|
short track_locked; /* active track is locked, no transformation should be allowed */
|
2012-06-10 21:59:02 +02:00
|
|
|
int framenr; /* frame number scopes are created for */
|
|
|
|
struct MovieTrackingTrack *track; /* track scopes are created for */
|
|
|
|
struct MovieTrackingMarker *marker; /* marker scopes are created for */
|
|
|
|
float slide_scale[2]; /* scale used for sliding from previewe area */
|
2011-11-07 13:55:18 +01:00
|
|
|
} MovieClipScopes;
|
|
|
|
|
2012-02-01 19:08:37 +01:00
|
|
|
/* MovieClipProxy->build_size_flag */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_PROXY_SIZE_25 = (1 << 0),
|
|
|
|
MCLIP_PROXY_SIZE_50 = (1 << 1),
|
|
|
|
MCLIP_PROXY_SIZE_75 = (1 << 2),
|
|
|
|
MCLIP_PROXY_SIZE_100 = (1 << 3),
|
|
|
|
MCLIP_PROXY_UNDISTORTED_SIZE_25 = (1 << 4),
|
|
|
|
MCLIP_PROXY_UNDISTORTED_SIZE_50 = (1 << 5),
|
|
|
|
MCLIP_PROXY_UNDISTORTED_SIZE_75 = (1 << 6),
|
|
|
|
MCLIP_PROXY_UNDISTORTED_SIZE_100 = (1 << 7)
|
|
|
|
};
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
/* MovieClip->source */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_SRC_SEQUENCE = 1,
|
|
|
|
MCLIP_SRC_MOVIE = 2
|
|
|
|
};
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
/* MovieClip->selection types */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_SEL_NONE = 0,
|
|
|
|
MCLIP_SEL_TRACK = 1
|
|
|
|
};
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
/* MovieClip->flag */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_USE_PROXY = (1 << 0),
|
|
|
|
MCLIP_USE_PROXY_CUSTOM_DIR = (1 << 1),
|
|
|
|
/* MCLIP_CUSTOM_START_FRAME = (1<<2), */ /* UNUSED */
|
2011-11-07 13:55:18 +01:00
|
|
|
|
2012-11-05 10:40:00 +01:00
|
|
|
MCLIP_TIMECODE_FLAGS = (MCLIP_USE_PROXY | MCLIP_USE_PROXY_CUSTOM_DIR)
|
|
|
|
};
|
2011-12-27 12:09:06 +01:00
|
|
|
|
2011-11-07 13:55:18 +01:00
|
|
|
/* MovieClip->render_size */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_PROXY_RENDER_SIZE_FULL = 0,
|
|
|
|
MCLIP_PROXY_RENDER_SIZE_25 = 1,
|
|
|
|
MCLIP_PROXY_RENDER_SIZE_50 = 2,
|
|
|
|
MCLIP_PROXY_RENDER_SIZE_75 = 3,
|
|
|
|
MCLIP_PROXY_RENDER_SIZE_100 = 4
|
|
|
|
};
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
/* MovieClip->render_flag */
|
2012-11-05 10:40:00 +01:00
|
|
|
enum {
|
|
|
|
MCLIP_PROXY_RENDER_UNDISTORT = 1
|
|
|
|
};
|
2011-11-07 13:55:18 +01:00
|
|
|
|
|
|
|
#endif
|