Commit Graph

563 Commits

Author SHA1 Message Date
3fc293cd57 Fix T39141: Video Sequencer Proxies don't take into account Strip Input Offset (or strip modifiers)
Basically issue was caused by the fact that strip for proxy has been
post-processed but proxy files were considered pre-processed. This lead
to situation of postprocessing being applied twice.
2014-03-20 15:09:45 +06:00
930765faa8 Fix T39208: Adding scene to another scene's VSE causes audio and video to be unsynchronized
Audio of 'linked' scene has to be offset by the startframe of that scene, else it behaves as if 'linked' scene always started at frame 1...
2014-03-16 20:22:13 +01:00
b3bc9e4f77 Fix T38598: RGBA images don't blend well in VSE with Cross Effect Strip
The issue was caused by the fact that sequencer used to cross-over effect
result with strips used for this effect, which is really stupid.

Now made it so strips which are used for effect inputs are not in the
render stack to be sure they would only be used by effect itself and
wouldn't be blended in any other way.
2014-02-21 14:03:33 +06:00
0a50757a59 Fix null-pointer dereference in previous sequencer commit 2014-02-11 19:29:17 +06:00
23fe23f951 Fix T38557: VSE clips with Alpha Over against a transparent background fail to reflect opacity changes 2014-02-11 16:03:56 +06:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
456dc16e4a Fix currently harmless issue with converting ImBuf from sequencer space 2014-01-24 14:29:50 +06:00
f6624b84cf Send sequencer render context as const pointer rather than as value
No functional changes just creepy to send rather huge structure by value.
2014-01-19 00:18:36 +06:00
c9c8872da0 Sequencer: don't cache frames during proxy rebuild job 2014-01-17 20:04:47 +06:00
b243b4fe40 Fix for inorrect use of BLI_utf8_invalid_strip, add assert to prevent it happening again. 2014-01-08 14:46:06 +11:00
709041ed0b Threaded object update and EvaluationContext
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.

Technical details:

- Uses task scheduler which was recently committed to trunk
  (that one which Brecht ported from Cycles).

- Added two utility functions to dependency graph:
  * DAG_threaded_update_begin, which is called to  initialize threaded
    objects update. It will also schedule root DAG node to the queue,
    hence starting evaluation process.

    Initialization will calculate how much parents are to be evaluation
    before current DAG node can be scheduled. This value is used by task
    threads for faster detecting which nodes might be scheduled.

  * DAG_threaded_update_handle_node_updated which is  called from task
    thread function when node was fully handled.

	This function decreases num_pending_parents of node children and
	schedules children with zero valency.

    As it might have become clear, task thread receives DAG nodes and
    decides which callback to call for it.

    Currently only BKE_object_handle_update is called for object nodes.

    In the future it'll call node->callback() from Ali's new DAG.

- This required adding some workarounds to the render pipeline.
  Mainly to stop using get_object_dm() from modifiers' apply callback.
  Such a call was only a workaround for dependency graph glitch when
  rendering scene with, say, boolean modifiers before displaying
  this scene.

  Such change moves workaround from one place to another, so overall
  hackentropy remains the same.

- Added paradigm of EvaluaitonContext. Currently it's more like just a
  more reliable replacement for G.is_rendering which fails in some
  circumstances.

  Future idea of this context is to also store all the local data needed
  for objects evaluation such as local time, Copy-on-Write data and so.

  There're two types of EvaluationContext:

  * Context used for viewport updated and owned by Main. In the future
    this context might be easily moved to Window or Screen to allo
    per-window/per-screen local time.

  * Context used by render engines to evaluate objects for render purposes.
    Render engine is an owner of this context.

  This context is passed to all object update routines.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: lukastoenne

Differential Revision: https://developer.blender.org/D94
2013-12-26 17:24:42 +06:00
dcfb858a76 Fix #37395: Rendering with a movie strip behind a scene shows inconsistent results
For now just make sure conversion to sequencer space will ensure imbuf's
color space names is set properly.

Might be some further changes needed to make colorspace flow more clear
in sequencer, but that's for later.
2013-11-11 12:08:31 +00:00
8f747c4923 Code cleanup: use bool instead of int in mask module 2013-10-29 18:46:45 +00:00
52296b941e code cleanup: remove duplicate assignments 2013-10-14 07:15:59 +00:00
ab31941874 Fix [#36422] Trimmed audio files (hard cut only) in a metastrip have their trim removed
Meta sound update (seq_update_sound_bounds_recursive_rec) was not taking into account hard trim (anim_startofs) when setting sound's start, while default sound strip update (sound_move_scene_sound_defaults) did... This could use some refactor, though, with a single func used in both cases, to avoid such issue.

Also added soft trim to sound panel, only hard one was available.
2013-09-30 20:53:53 +00:00
d4b8a6cb85 Code cleanup: use boolean instead of int for colormanagement 2013-09-05 17:13:43 +00:00
15fc16a49b fix for missing NULL check before calling BKE_sequencer_imbuf_to_sequencer_space(). 2013-09-03 21:54:17 +00:00
529c6d0eeb Fix #36124: VSE - Input Color option does not work for video files
Byte images and movies will now fully follow input color space.
Before this non-sRGB input colorspace for byte images and movies
behave really doggy (results in preview and final render were
totally different).

To prevent data loss, if byte image is set not stored in sequencer's
space it'll be internally converted to float buffer.

In theory some setups might be rendering a bit different now, but
new behavior is totally expected and someone used non-sRGB input
space for byte images/movies had Convert Float enabled anyway.
2013-09-02 13:54:12 +00:00
4d83f957b5 fix [#36570] Changing the filename of a image strip doesnt refresh sequencer
was casting a StripElem as a Sequencer struct.
2013-08-29 04:08:44 +00:00
8ef934c73f ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it takes a key as an arg and isnt popping any element from the hash as you might expect).
add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
2013-08-26 23:37:08 +00:00
89c7cf1a49 style cleanup: also use ARRAY_HAS_ITEM macro for mempool check 2013-08-21 02:29:13 +00:00
aa10489a0d Fix [#36351] Changing the Frame Rate value doesnt adjust audio strip length.
Simply recalc sequence len for audio (and meta!) strips when modifying fps value. Note start, startofs and endofs are also updated, to try to keep final pos and length as consistent as possible.
2013-08-20 19:50:31 +00:00
57a4070b9d sequencer: replace warning message with assert, was printing when copying masks and movieclips but went by unnoticed. 2013-07-24 07:11:00 +00:00
576161b186 fix [#36262] Paste strip with video or sound content from another file crashes Blender
existing code was very stupid.

- all ID pointers for clipboard strips are handled uniformly.
- clipboard stores a duplicate ID pointer which are restored on paste.
- restoring pointers...
-- use ID's that are still in the database (copy&paste within the same file).
-- fallback to name lookup.
-- fallback to loading them from the original filepath (movie-clip and sound only).

also fix bug pasting where initialing the sound wasn't done if there was no frame-offset.
2013-07-24 06:51:04 +00:00
4e1afbe7cd fix [#36218] Crash attempting to delete right side of hard cut in VSE on movie strip
deleting a strip would try free the anim membe twice.
2013-07-19 08:04:05 +00:00
8a2a323991 fix for sequence strips being given non utf8 names, where the filepath wasn't utf8.
also correct bad assumption in BKE_image_load_exists() that all paths are relative to the current blend file.
2013-07-15 11:26:43 +00:00
c0b28134cb Fix #36124: VSE - Input Color doesn't invalidate cache properly for movies
Animation structure holds some buffers inside,
so for proper cache invalidation we need to
re-open the animation.
2013-07-15 07:58:15 +00:00
e85a39b747 Sequencer: fix names when adding several video (or audio) files at once (all strips were getting the same, annoying ;) ). 2013-06-20 13:52:58 +00:00
0807c976f4 code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
2013-03-15 10:48:48 +00:00
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
221a383366 use 'bool' for BLI_/BKE_ functions. 2013-03-09 05:35:49 +00:00
c36f20a7d2 style cleanup 2013-03-08 04:00:06 +00:00
5cb22bbedf Fix sequencer crash when pasteing strips after creating new file
Issue happened for scene. movie clip and mask strips, which contains
pointers to datablocks which are freeing on loading new file.

Also, scene strip would crash when pasted from clipboard after scene
was unlinked from file.
2013-02-28 14:25:09 +00:00
fefc684036 Fix #34439: Strip modifier - Mask multiply failure 2013-02-27 09:58:40 +00:00
e5a135e0b2 Fixes for alpha mode do_versions code
Before this change only old flag "Premultiply" was used to
detect alpha mode, which is not enough actually.

Now the logic here is:

- If "Premultiply" was enabled it is likely float image with
  straight alpha, which shall be premultiplied before usage.

  In this case image/sequence Alpha Mode is set to Straight.

- Otherwise use default alpha mode for image format based on
  an extension. This could fail in some cases like TIFF, but
  this wasn't handled fully correct in older blender anyway.

Initial discovered issue was that EXR images saved in older
Blender versions were set to Straight alpha mode, which is
obviously a straight way to lots of headache.
2013-02-19 08:37:08 +00:00
1ba194aedd [#34013] [video sequence editor] Offset and crop of strips are wrong
Applied patch by jehan after confirming the issue.

Thanks for the patch!
2013-02-10 21:01:30 +00:00
95bca1c6bc Small UI annoyance: proxy build progress could is incorrect in some cases 2013-02-07 14:15:30 +00:00
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
fa0805e287 Changes for opengl render to reflect new alpha premul pipeline
without hurting quick texture painting

- ED_view3d_draw_offscreen will now output buffer with
  transparent alpha, if sky needed it should be alpha-undered
  later.

- ED_view3d_draw_offscreen_imbuf now accepts alpha mode as an
  argument which could be either R_ADDSKY or R_PREMULALPHA

- OpenGL render and sequencer's opengl preview will now reflect
  scene's Alpha Mode

- Quick Edit will use OpenGL with transparent alpha mode
2013-01-05 15:33:18 +00:00
821d481f53 Correction for rev53555 which was obviously wrong -- always setting alpha to premul
Also optimized it a bit by skipping byte/float buffer allocation.
2013-01-04 13:19:57 +00:00
1022151d6e fix for missing NULL check in BKE_sequence_init_colorspace(). 2013-01-04 11:02:35 +00:00
ea2224e28d changes needed for EDL import to work again.
- add sequence.update(data=False) function.
- made some sequence vars editable.
- correct some comments.

also rename rna function sequence.getStripElem() --> strip_elem_from_frame()
2013-01-02 16:15:45 +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
4a427d8e0d style cleanup 2012-12-29 01:54:58 +00:00
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
8a4ba61786 Fix part #33534: Building proxies will remove strip animation 2012-12-17 08:45:44 +00:00
dd0e554d9e Sequencer: add textured solid option for opengl preview 2012-12-12 12:42:12 +00:00