Commit Graph

1381 Commits

Author SHA1 Message Date
Jörg Müller
a217e043be Audaspace: porting PulseAudio fixes from upstream. 2021-08-18 22:22:21 +02:00
Sebastian Parborg
2946f72a2a VSE: Use lines to draw waveform
Refactor and improve waveform drawing.

Drawing now can use line strips to draw waveforms instead of only
triangle strips. This makes us able to properly visualize thin waveforms
as they would not be visible before. We now also draw the RMS value of
the waveform.

The waveform drawing is now also properly aligned to the screen pixels
to avoid flickering when transforming the strip.

Reviewed By: Richard Antalik

Differential Revision: https://developer.blender.org/D11184
2021-08-16 15:12:19 +02:00
Sebastian Parborg
ded68fb102 VSE: Fix audaspace not reading ffmpeg files with start offset correctly
The duration and start time for audio strips were not correctly read in
audaspace.

Some video files have a "lead in" section of audio that plays before the
video starts playing back. Before this patch, we would play this lead in
audio at the same time as the video started and thus the audio would not
be in sync anymore.

Now the lead in audio is cut off and the duration should be correctly
calculated with this in mind.

If the audio starts after the video, the audio strip is shifted to
account for this, but it will also lead to cut off audio which might not
be wanted. However we don't have a simple way to solve this at this
point.

Differential Revision: http://developer.blender.org/D11917
2021-08-16 15:10:58 +02:00
Ray Molenkamp
32c687b5ec Clean-up: Remove UTF8-BOM markers
Done at the request of Sergey.
2021-08-10 11:27:18 -06:00
Antonio Vazquez
335379d8fc Cleanup: Add missing newline at end of file 2021-08-06 15:32:28 +02:00
Antonio Vazquez
3fbe6f513d Move NanoSVG lib to extern
The library has some modifications and it has been included in a diff.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D12142

(Some minor changes done in the patch)
2021-08-06 15:29:54 +02:00
Campbell Barton
604ae5f7b6 Cleanup: tab indentation for CMake / GNUmakefile 2021-08-05 12:03:41 +10:00
Campbell Barton
c3a400b73f Cleanup: use single back-tick quoting in comments
While doxygen supports both, conform to our style guide.

Note that single back-tick's are already used in a majority of comments.
2021-07-20 22:58:14 +10:00
Ankit Meel
49b798ca7e macOS/glog: Silence syscall deprecation warning
Upstream will release the fix in 0.6 which will take time.
Silence two warnings.

Differential Revision: https://developer.blender.org/D11246
2021-07-15 15:23:06 +05:30
Jörg Müller
a112adf16a Audaspace: porting pulseaudio fixes from upstream. 2021-07-01 14:26:13 +02:00
Jörg Müller
19d19970e4 Fix T88887: Audio causes issues with Playback when PC put to Sleep, Hibernate or when Screensaver appears
Porting WASAPI device reinitialization from upstream.
2021-07-01 14:26:13 +02:00
Sebastián Barschkis
80bc819d50 Fluid: Clang-format cleanup
Updated fluid source files in extern with clang-format.
2021-06-18 12:28:17 +02:00
Sebastián Barschkis
adefdbc9df Fluid: Optimization for FLIP neighbor search radius
Contributed by @erik85 in D11400. The idea from this patch was placed in
a more generic context: A new FOR macro has been added that loops
over the neighbors of a cell within a given radius.
2021-06-18 12:18:21 +02:00
Jörg Müller
530f2994e9 Fix T88614: Mixdown crashes Blender 2.92.0 and 3.0.0 Alpha
The problem is caused by the most recent ffmpeg version (4.4) which
needs channels to be set when submitting a frame for encoding.
2021-05-27 19:05:17 +02:00
Sebastián Barschkis
8dd43ac23e Fluid: Updated Mantaflow source files
Includes update for OpenVDB file IO, i.e. fixes an issue with
compression flag combination that resulted in random segfaults.

Other changes: Cleanup and formatting.
2021-05-18 22:36:51 +02:00
Jeroen Bakker
718109e7f0 Remove SMAA generating message during compilation. 2021-04-28 08:38:10 +02:00
Jörg Müller
35cf34de6d Fix T86851: PulseAudio randomly asserts in background rendering
Upstream fix from Audaspace with simplified PulseAudio code.

Maniphest Tasks: T86851

Differential Revision: https://developer.blender.org/D10840
2021-03-29 12:16:01 +02:00
Habib Gahbiche
805d947810 Compositor: Add Anti-Aliasing node
This is an implementation of Enhanced Subpixel Morphological Antialiasing (SMAA)

The algorithm was proposed by:
  Jorge Jimenez, Jose I. Echevarria, Tiago Sousa, Diego Gutierrez

This node provides only SMAA 1x mode, so the operation will be done with no spatial
multisampling nor temporal supersampling. See Patch for comparisons.

The existing AA operation seems to be used only for binary images by some other nodes.
Using SMAA for binary images needs no important parameter such as "threshold", so we
perhaps can switch the operation to SMAA, though that changes existing behavior.

Notes:
1. The program code assumes the screen coordinates are DirectX style that the
   vertical direction is upside-down, so "top" and "bottom" actually represent bottom
   and top, respectively.

Thanks for Habib Gahbiche (zazizizou) to polish and finalize this patch.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D2411
2021-03-29 07:56:58 +02:00
Jörg Müller
250a69ee82 Fix T86728: Blender freezes when playhead is dragged in this .blend
Porting the deadlock bugfix in WASAPI from upstream Audaspace.
2021-03-19 21:42:55 +01:00
Jörg Müller
de06cb8559 Bugfix: properly rename Null audio device to None 2021-03-16 23:45:49 +01:00
Jörg Müller
12c08ceee3 Audaspace: add support for CoreAudio on macOS
This adds CoreAudio as audio backend on macOS.
CoreAudio is the standard audio API on macOS.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller
bc57985306 Audaspace: add support for WASAPI on Windows
This adds WASAPI as audio backend on Windows.
WASAPI is the modern standard audio API on
Windows introduced with Windows Vista.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller
d33339ebf4 Audaspace: add support for PulseAudio on Linux
This adds PulseAudio as audio backend on Linux.
PulseAudio is the main audio engine used on most,
if not all, Linux distributions today.

Ref T86590
2021-03-16 23:21:45 +01:00
Jörg Müller
7b8fc307dc Audaspace: porting minor improvements from upstream
- NullDevice is now called None
- Automatic choice of best available device.
- Minor formatting, documentation and cmake fixes.
2021-03-16 23:21:45 +01:00
Sebastián Barschkis
d518b0fda5 Fluid: Updated hidden symbol visibility comment
It turns out that on official arm64 devices (not DevKit) the linker
warnings still show up. So just leaving this as is.

Ref D9002
2021-03-11 16:15:45 +01:00
Ray Molenkamp
af824b09c7 MSVC: Suppress C4251 in OpenVDB/Mantaflow
All headers in the svn libraries should be
building with /W0 however MSVC 16.8/16.9
has broken this functionality making OpenVDB
emit lots of warnings.

The breakage was reported [1] in august to MS
but they still have not gotten around to
addressing the issue.

This change explicitly suppresses C4251 in the
module that emitted these warnings. As the warning
is useful in other parts of blender a localized
approach is taken rather than a global suppression.

[1] https://developercommunity.visualstudio.com/content/problem/1167590/bug.html
2021-02-17 12:23:01 -07:00
Brecht Van Lommel
677e63d518 TBB: fix deprecation warnings with newer TBB versions
* USD and OpenVDB headers use deprecated TBB headers, suppress all deprecation
  warnings there since we have no control over them.
* For our own TBB includes, use the individual headers rather than the tbb.h that
  includes everything to avoid warnings, rather than suppressing all.

This is in anticipation of the TBB 2020 upgrade in D10359. Ref D10361.
2021-02-10 19:32:24 +01:00
Sebastián Barschkis
e8a5744cda Merge branch 'blender-v2.92-release' 2021-02-05 16:24:03 +01:00
Sebastián Barschkis
a563775649 Fluid: Updated Mantaflow source files
This updates fixes the following issues (critical for 2.92):

- Issue that prevented dense 'int' grids from being exported (incorrect clip value)
- Issue with particles outside out of domain bounds (position between -1 and 0) not being deleted
2021-02-05 16:23:02 +01:00
Campbell Barton
7e850ffa73 Cleanup: cmake indentation, white-space 2021-02-05 09:45:16 +11:00
Sebastián Barschkis
9ad828dbad Fluid: Updated Mantaflow source files
Includes improvements for the file IO. Namely, more meta data will be written from now on.

This change is required to prevent IO issues (e.g. T84649) that arised through the use of sparse grids caching (introduced in 2.92).
2021-02-02 17:46:48 +01:00
Sebastián Barschkis
0b711e6758 Fluid: Updated Mantaflow source files
Includes minor fixes / cleanups from the viscosity plugin.
2021-01-13 09:49:38 +01:00
Sebastián Barschkis
5b90ed6c06 Fluid: Fix cache saving issue with OpenVDB IO
Fixes issue where files would not be written when 'resumable' option was checked.
2021-01-10 19:16:44 +01:00
Jörg Müller
58c697a9ec Audaspace: port accuracy improvement from upstream. 2020-12-24 10:42:16 +01:00
Jörg Müller
83ad35cb9c Fix T83997: Duplicated audio does not sound the same
The issue was that sounds were always faded from 0 volume when they
started and depending on the currently used buffer size, the fading took
longer or shorter.

The solution stores whether the sound has ever been played back and
consequently does not fade when starting to play back.
2020-12-24 10:42:16 +01:00
Sebastián Barschkis
635694c0ff Fluid: Added new viscosity solver
Mainly updated the Mantaflow version. It includes the new viscosity solver plugin based on the method from 'Accurate Viscous Free Surfaces for Buckling, Coiling, and Rotating Liquids' (Batty & Bridson).

In the UI, this update adds a new 'Viscosity' section to the fluid modifier UI (liquid domains only). For now, there is a single 'strength' value to control the viscosity of liquids.
2020-12-23 15:48:38 +01:00
Bastien Montagne
010f44b855 Fix several issues with handling of numpy in CMake.
Issues were:
* Abusing of `WITH_PYTHON_INSTALL_NUMPY` by both Audaspace and
  Mantaflow.
    - `PYTHON_INSTALL` options only decide whether we copy python (and
      some extra modules) in our Blender installation. On linux it
      makes much more sense to use global python installation.
    - Now we have instead a proper `WITH_PYTHON_NUMPY`
* Bad assumptions regarding path of headers relative to path of python
  module.
    - In current Debian testing, modules are under `python3.9`
      directory, while headers are under `python3` directory.
    - Now we properly `find_path` for headers as well, modifying
      `find_python_package` to take an optional argument for headers.

Note that the required changes done to `extern` libraries are in
blender-specific files that do not exist upstream.

Differential Revision: https://developer.blender.org/D9773
2020-12-14 16:44:55 +01:00
Bastien Montagne
551856ed32 Revert "Fix several issues with handling of numpy in CMake."
This reverts commit 5d570c875eda8fb9aa3635f7f4edac0dc1eaedc8.

Buildbots are still borken, need more time to investigate.
2020-12-14 12:29:34 +01:00
Bastien Montagne
5d570c875e Fix several issues with handling of numpy in CMake.
Issues were:
* Abusing of `WITH_PYTHON_INSTALL_NUMPY` by both Audaspace and
  Mantaflow.
    - `PYTHON_INSTALL` options only decide whether we copy python (and
      some extra modules) in our Blender installation. On linux it
      makes much more sense to use global python installation.
    - Now we have instead a proper `WITH_PYTHON_NUMPY`
* Bad assumptions regarding path of headers relative to path of python
  module.
    - In current Debian testing, modules are under `python3.9`
      directory, while headers are under `python3` directory.
    - Now we properly `find_path` for headers as well, modifying
      `find_python_package` to take an optional argument for headers.

Note that the required changes done to `extern` libraries are in
blender-specific files that do not exist upstream.

Differential Revision: https://developer.blender.org/D9773
2020-12-14 11:00:28 +01:00
Dalai Felinto
cef5d0923b Readme file to extern libraries about the attribution document 2020-12-11 18:53:22 +01:00
Campbell Barton
8cc951d2ae Cleanup: trailing space 2020-12-11 15:32:14 +11:00
Dalai Felinto
46e66d154c Missing README.blender license files + New BSD cases
I also changed New BSD to BSD 3 Clause.

Differential Revision: https://developer.blender.org/D9791
2020-12-08 18:51:14 +01:00
Jim Eckerlein
3012446f02 glTF: update Draco library to new version
To support decoding and enhanced encoding of Draco compressed glTF files.

Differential Revision: https://developer.blender.org/D9642
2020-12-07 17:09:34 +01:00
Sebastián Barschkis
6f22a536e6 Fluid: Updated Mantaflow source files
Includes outflow optimization - might have been the cause of instabilities.
2020-12-06 21:56:43 +01:00
Ankit Meel
176324aa5c QuadriFlow: Fix std::allocator deprecation warnings
https://en.cppreference.com/w/cpp/memory/allocator/construct
"(deprecated in C++17) (removed in C++20)"
Same for `destroy`.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D9657
2020-11-30 00:46:27 +05:30
Sebastián Barschkis
e09d0c0d07 Fluid: Updated Mantaflow source files
This update introduces two improvements from the Mantaflow repository:

(1) Improved particle sampling:
- Liquid and secondary particles are sampled more predictably. With all parameters being equal, baked particles will be computed at the exact same position during every bake.
- Before, this was not guaranteed.

(2) Sparse grid caching:
- While saving grid data to disk, grids will from now on be saved in a sparse structure whenever possible (e.g. density, flame but not levelsets).
- With the sparse optimization grid cells with a value under the 'Empty Space' value (already present in domain settings) will not be cached.
- The main benefits of this optimization are: Smaller cache sizes and faster playback of simulation data in the viewport.
- This optimization works 'out-of-the-box'. There is no option in the UI to enable it.
- For now, only smoke simulation grids will take advantage of this optimization.
2020-11-25 23:18:12 +01:00
Sergey Sharybin
75ea4b8a1f Ceres: Update to upstream version 2.0.0
We already were using one of earlier RC of the library, so there is no
expected big changes. Just making the update official, using official
version and stating it in the readme file.
2020-11-13 11:52:59 +01:00
Sebastián Barschkis
311031ecd0 Cleanup: Use nullptr everywhere in fluid code
Switched from NULL to nullptr.
2020-11-06 12:06:05 +01:00
Campbell Barton
2bd8f7e059 Cleanup: use string APPEND/PREPEND
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
2020-11-06 12:32:54 +11:00
Sebastián Barschkis
e3858f4716 Fluid: Updated APIC plugin
Updated version of APIC plugin in order to resolve ASAN issues.
2020-11-03 19:34:31 +01:00