Commit Graph

114 Commits

Author SHA1 Message Date
6747dec926 style cleanup 2013-01-07 03:24:22 +00:00
93f78ac1e1 Removed byte glow effect from sequencer in favor of float one.
Byte glow was disabled in previous commit and code is removed now
in separate commit for easier revert if that'd be needed.
2012-12-31 13:52:26 +00:00
08cea96ab0 Alpha premul pipeline cleanup
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
  assumptions.
- There's an input image setting to say whether it's stored with
  straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
  deliver straight alpha.

Some implementation details:

- Removed scene's color unpremultiply setting, which was very
  much confusing and was wrong for default settings.
  Now all renderers assumes to deliver premultiplied alpha.

- IMB_buffer_byte_from_float will now linearize alpha when
  converting from buffer.

- Sequencer's effects were changed to assume bytes have got
  straight alpha. Most of effects will work with bytes still,
  however for glow it was more tricky to avoid data loss, so
  there's a commented out glow implementation which converts
  byte buffer to floats first, operates on floats and returns
  bytes back. It's slower and not sure if it should actually
  be used -- who're using glow on alpha anyway?

- Sequencer modifiers should also be working nice with straight
  bytes now.

- GLSL preview will predivide float textures to make nice shading,
  shading with byte textures worked nice (GLSL was assuming straight
  alpha).

- Blender Internal will set alpha=1 to the whole sky. The same
  happens in Cycles and there's no way to avoid this -- sky is
  neither straight nor premul and doesn't fit color pipeline well.

- Straight alpha mode for render result was also eliminated.

- Conversion to correct alpha need to be done before linearizing
  float buffer.

- TIFF will now load and save files with proper alpha mode setting
  in file meta data header.

- Remove Use Alpha from texture mapping and replaced with image
  datablock setting.

  Behaves much more predictable and clear from code point of view
  and solves possible regressions when non-premultiplied images were
  used as textures with ignoring alpha channel.
2012-12-31 13:52:13 +00:00
5943c81a93 code cleanup: neareast -> nearest 2012-12-11 14:19:41 +00:00
7ea3c5ed6d Fix #33252: VSE preview displays wrong color space
Early output was not setting image buffer float color space
2012-11-21 10:13:52 +00:00
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
bc8f602601 style cleanup 2012-10-20 18:46:57 +00:00
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
a73dd3476e 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
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
fa5b0e1d0f Sequencer: typo fix 2012-08-26 19:36:56 +00:00
246c86c926 Silencing compiler warnings 2012-08-18 04:50:20 +00:00
a794e19346 Sequencer: support for masked color balance
This implements option which could be used to color balance only
specified area. Currently done by adding Mask input to Adjustment
effect. Affects on color balance and multiply settings.

Supporting masked saturation control is in the list, not supported
in this commit.

Also show value slider in the right of color wheel.
2012-08-11 14:37:58 +00:00
2a1b7f7f8e Fix infinite recursion when using adjustment strip placed to channel 1 2012-08-10 15:30:38 +00:00
7483429e62 Sequencer: initial implementation of multithreaded effects
Added a framework to run effects in several threads. Port most
of effects to this new framework.

Still some work to be done here (some effects are not so easy to port)
2012-08-08 16:46:45 +00:00
ac2b6e23eb Code cleanup: use defines instead of magic constants 2012-08-08 16:46:44 +00:00
1bf893e9c8 Code cleanup: BKE_ prefix for public sequencer functions 2012-08-08 11:15:40 +00:00
03a3e4f165 Code cleanup: remove redundant struct and some space cleanup 2012-08-08 11:15:38 +00:00
0b31218c85 Style cleanup: white space 2012-08-08 11:15:36 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
186f542b79 remove casts to short when allocating new imbufs. 2012-06-07 18:33:36 +00:00
105b1031dd code cleanup: rename sequencer types to SEQ_TYPE_*** and use enums rather then defines. 2012-06-07 15:49:02 +00:00
0b7593a3dc finish cleanup for plugins 2012-05-29 10:31:42 +00:00
16117143d8 Massive Code cleanup:
* Remove all code for Texture and Sequencer plugin system, this never worked in 2.5x / 2.6x and is therefore not needed anymore.

* DNA structures are kept, all read/writefile code is gone.
2012-05-29 10:21:07 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
857dedbc58 style cleanup 2012-05-27 00:36:50 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
5fe5a8c283 style cleanup: function definitions 2012-05-17 23:21:11 +00:00
d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +00:00
7a4ad3aaae style cleanup: seqeffects 2012-05-08 09:31:25 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
7ff77ed4ea code cleanup: use zero_v3 2012-03-23 20:18:09 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
02b28e9162 replace MIN2 / MAX2 with minf / maxf to avoid calling functions multiple times. 2012-02-19 05:11:24 +00:00
deec4ce0bc Code Cleanup: avoid double promotion. 2012-02-04 06:55:29 +00:00
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
667ae778b9 Fix #29743: Video sequencer wipe effect bug
Blur width used to be calculated quite strange depending on current angle.
Also, it used to be using wrong formula to calculate distance between
current point and boundary line which made blur width almost useless.

Now actual blur width is doesn't depend on angle and use corrected formula
for distance calculation which makes blur width slider behaves more
predictable.

This commit might make old files using wipe+blur be rendered a bit differently,
but don't think it's indeed issue because old behavior was crappy to setup
something useful so don't think this setup was used a lot.
2012-01-06 10:08:46 +00:00
fc72660bed Fix #27622: Sequencer Wipe Angle Incorrect
Made wipe angle be real angle instead of making some ease effects which can be reached by animation curves.
2011-12-06 15:32:10 +00:00