Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-13Cleanup: pass const args (mostly Scene & RenderData)Campbell Barton
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-08-01FFmpeg pixel format conversion improvementsSybren A. Stüvel
FFmpeg expects Blender to feed it pixels in the output pixel format. If the output pixel format is different than Blender's RGBA, a conversion is needed (via FFmpeg's `sws_scale()` function). There were a few issues with this conversion (and surrounding code) that are fixed in this commit: - When conversion was necessary a temporary buffer was allocated and deallocated for every frame. This is now allocated once and re-used. - Copying data to the buffer was done byte-for-byte. On little-endian machines it is now done line-by-line using `memcpy` for a little speedup. - The decision whether pixel format conversion is necessary is now correctly done based on the pixel format Blender is actually using. - The pixel format of the buffer sent to FFmpeg is no longer hard-coded incorrectly to a fixed pixel format, but uses the actual output pixel format. This is fixes T53058 properly, making RGB QTRLE export possible. - I added some comments to make it clear which pixel format is referred to (either Blender's internal format or the FFmpeg output format). Combined these improvements not only correct a bug (T53058) but also results in approximately 5% speed improvement (tested with a 117-frame shot from Spring, loaded as PNGs in the VSE, encoding to h.264 with preset 'realtime'). Reviewed By: brecht, sergey Differential Revision: https://developer.blender.org/D5174
2019-07-31Fix Visual Studio compatibility in writeffmpeg.cSybren A. Stüvel
This fixes an incompatibility with Visual Studio 2019 introduced in 631d5026c7bb34320c5d9b60afa5bc44b40fc5e4. It is likely caused by using `# ifdef` inside the use of the `ELEM()` macro.
2019-07-31FFmpeg: Added writing of WebM containersSybren A. Stüvel
This commit adds support for the WebM container. Previously we only supported the WebM/VP9 video codec, but still required that it was stored in a Matroska, MP4, or other compatible container format. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5156
2019-07-31FFmpeg: Added support for writing alpha values in WebM/VP9 videoSybren A. Stüvel
The VP9 video codec supports writing alpha values; now this is available in Blender too. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5156
2019-07-31Cleanup: Simplification of `BKE_ffmpeg_alpha_channel_is_supported()`Sybren A. Stüvel
Simplified `BKE_ffmpeg_alpha_channel_is_supported()` to use `ELEM()` instead of a row consecutive `if`-statements. No functional changes. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5156
2019-07-02Fix T53058: Crash when rendering to Quicktime RLE codecSybren A. Stüvel
The root cause seems to be an assumption in [generate_video_frame()](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/writeffmpeg.c) that we're always using 4 bytes per pixel. This is not true when using QTRLE in RGB mode, because that uses the RGB24 pixel format (so 3 bytes per pixel). Just updating the `linesize` property doesn't fix it though, but just creates a crash somewhere else. This at least fixes the crash by always forcing RGBA to be written, even when the user selects RGB.
2019-06-30Fixed compiler warningSybren A. Stüvel
`(1L << 31)` can cause an integer overflow on 32-bit systems, `(1UL << 31)` won't. Fixed as per LazyDodo's suggestion in https://developer.blender.org/rB956cb4f403dd3a6ddb379202dc1f2770b9820073#238718
2019-06-29Cleanup: Fix build warnings with MSVC.Ray Molenkamp
ffmpeg defines some of the math constants if they are not found before including any of its headers, this lead to a build warnings about M_E, M_LN2 and M_SQRT1_2 being redefined once BLI_math_base.h gets included.
2019-06-14Fix T65803: MPEG4 unsupported timebase denominatorSybren A. Stüvel
- MPEG4/DivX has a maximum value of 65535 for the timebase denominator. - MPEG1 and 2 have a list of supported frame rate ratios. These use ratios like 24000/1001 and need those exact numbers. This fixes an issue introduced in c5b1e7cd4e86f9aff010fa84192d783b895ce6c7 where the correct ratio was passed to FFmpeg, but not with the identical numbers FFmpeg has in a lookup table.
2019-06-11FFmpeg: Fix integer overflow when writing custom FPS with high denominatorSybren A. Stüvel
FFmpeg uses a fraction of integers to indicate the frame rate, whereas Blender uses `int / float`. When a custom frame rate is used with non-integer base, the FPS and Base settings were multiplied with 100000 before passing to FFmpeg as `int`. This could overflow when a high enough FPS setting was used, which is the case when importing a video of almost-but-not-quite-integer frame rate into the VSE. The overflow caused FFmpeg to return an error "The encoder timebase is not set", which is rather cryptic for users. The new solution is to take the max int and divide that by the frame rate, and use that ratio to pass to FFmpeg. This won't overflow, and thus allows exporting arbitrary frame rates.
2019-05-16Refactor: Simplify ID Property freeingJacques Lucke
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-12-11FFmpeg: enable multi-threaded encoding of multiple frames, for a ~20% speedup.Mal Duffin
This enables ffmpeg to encode each frame in its own thread. However in most cases Blender does not pass frames to ffmpeg fast enough to actually use the more than two threads. In some tests the speed was measured to be about 20%. If other parts of the video sequencer get optimized, this should improve. Differential Revision: https://developer.blender.org/D4031
2018-11-07Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'Bastien Montagne
That kind of implicit includes should really only be done when totally, absolutely necessary, and ideally only with rather simple 'second-level' headers. Otherwise not being explicit with includes always end up biting in unexpected ways...
2018-10-18Cleanup: Remove more #if 0 blocksJacques Lucke
Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808
2018-09-28Merge branch 'master' into blender2.8Sergey Sharybin
2018-09-28Fix T56905: unsupported channel layout error writing AAC audio.Brecht Van Lommel
This uses same mapping as Audaspace to specify channel layout, which was missing before.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-06-05Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/blendfile.c source/blender/blenloader/intern/readfile.h source/blender/blenloader/intern/versioning_250.c source/blender/blenloader/intern/versioning_260.c source/blender/blenloader/intern/versioning_270.c source/blender/blenloader/intern/versioning_legacy.c source/blender/editors/render/render_shading.c source/blender/makesrna/intern/rna_movieclip.c source/blender/render/intern/source/pipeline.c source/blender/render/intern/source/voxeldata.c
2018-06-05Cleanup: use new accessors to blendfile path (Main.name).Bastien Montagne
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-05-08Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/modifiers/intern/MOD_dynamicpaint.c source/blender/modifiers/intern/MOD_uvproject.c
2018-05-08Fix building with latest versions of ffmpeg.Bastien Montagne
Some years-old deprecated stuff has now been removed. Correct solution is probably to use valid defines etc. in own code, but this is more FFMEPG maintainer task (since it also may change how old FFMPEG we do support...).
2018-04-19Remove Blender Internal and legacy viewport from Blender 2.8.Ton Roosendaal
Brecht authored this commit, but he gave me the honours to actually do it. Here it goes; Blender Internal. Bye bye, you did great! * Point density, voxel data, ocean, environment map textures were removed, as these only worked within BI rendering. Note that the ocean modifier and the Cycles point density shader node continue to work. * Dynamic paint using material shading was removed, as this only worked with BI. If we ever wanted to support this again probably it should go through the baking API. * GPU shader export through the Python API was removed. This only worked for the old BI GLSL shaders, which no longer exists. Doing something similar for Eevee would be significantly more complicated because it uses a lot of multiplass rendering and logic outside the shader, it's probably impractical. * Collada material import / export code is mostly gone, as it only worked for BI materials. We need to add Cycles / Eevee material support at some point. * The mesh noise operator was removed since it only worked with BI material texture slots. A displacement modifier can be used instead. * The delete texture paint slot operator was removed since it only worked for BI material texture slots. Could be added back with node support. * Not all legacy viewport features are supported in the new viewport, but their code was removed. If we need to bring anything back we can look at older git revisions. * There is some legacy viewport code that I could not remove yet, and some that I probably missed. * Shader node execution code was left mostly intact, even though it is not used anywhere now. We may eventually use this to replace the texture nodes with Cycles / Eevee shader nodes. * The Cycles Bake panel now includes settings for baking multires normal and displacement maps. The underlying code needs to be merged properly, and we plan to add back support for multires AO baking and add support to Cycles baking for features like vertex color, displacement, and other missing baking features. * This commit removes DNA and the Python API for BI material, lamp, world and scene settings. This breaks a lot of addons. * There is more DNA that can be removed or renamed, where Cycles or Eevee are reusing some old BI properties but the names are not really correct anymore. * Texture slots for materials, lamps and world were removed. They remain for brushes, particles and freestyle linestyles. * 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and other renderers use this to find all panels to show, minus a few panels that they have their own replacement for.
2018-04-09Merge branch 'master' into blender2.8Sybren A. Stüvel
2018-04-09Added support for the WEBM/VP9 video codecSybren A. Stüvel
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8" is less efficient than VP9). WEBM/VP9 and h.264 both have options to control the file size versus compression time (e.g. fast but big, or slow and small, for the same output quality). Since WEBM/VP9 only has three choices, I've chosen to map those to 3 of the 9 possible choices of h.264: - BEST → SLOWER - GOOD → MEDIUM - REALTIME → SUPERFAST The VERYSLOW and ULTRAFAST options give very little extra benefit. Reviewed by: @Severin
2018-04-05Merge branch 'master' into blender2.8Sybren A. Stüvel
2018-04-05Write StampData metadata to video filesSybren A. Stüvel
This is currently only supported by FFmpeg (so not frameserver, AVI RAW, or AVI JPEG), and only seems to work when using Matroska or Ogg Theora containers. Only metadata that doesn't change from frame to frame is written to video files. This distinction is visible in the UI by looking at the stamp checkbox tooltips (they either mention "image" or "image/video"). Part of: https://developer.blender.org/D2273 Reviewed by: @campbellbarton
2018-01-16Merge branch 'master' into blender2.8Campbell Barton
2018-01-16Cleanup: indentationCampbell Barton
2017-10-17Merge branch 'master' into blender2.8Campbell Barton
2017-10-17Cleanup: use 'e' prefix for enum typedefsCampbell Barton
Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg).
2017-09-19Merge branch 'master' into blender2.8Sergey Sharybin
2017-09-19Fix T52811: At any framerate selected, video exported with 1000fpsSergey Sharybin
2017-08-18Audaspace: Moving audaspace 1.3 into extern.Jörg Müller
Deleting the old internal audaspace. Major changes from there are: - The whole library was refactored to use C++11. - Many stability and performance improvements. - Major Python API refactor: - Most requested: Play self generated sounds using numpy arrays. - For games: Sound list, random sounds and dynamic music. - Writing sounds to files. - Sequencing API. - Opening sound devices, eg. Jack. - Ability to choose different OpenAL devices in the user settings.
2017-03-12Cleanup: styleCampbell Barton
2017-01-11Cleanup: Use more meaningful constants other than 0Sergey Sharybin
2016-09-21FFmpeg interface improvementsSybren A. Stüvel
This patch changes a couple of things in the video output encoding. {F362527} - Clearer separation between container and codec. No more "format", as this is too ambiguous. As a result, codecs were removed from the container list. - Added FFmpeg speed presets, so the user can choosen from the range "Very slow" to "Ultra fast". By default no preset is used. - Added Constant Rate Factor (CRF) mode, which allows changing the bit-rate depending on the desired quality and the input. This generally produces the best quality videos, at the expense of not knowing the exact bit-rate and file size. - Added optional maximum of non-B-frames between B-frames (`max_b_frames`). - Presets were adjusted for these changes, and new presets added. One of the new presets is [recommended](https://trac.ffmpeg.org/wiki/Encode/VFX#H.264) for reviewing videos, as it allows players to scrub through it easily. Might be nice in weeklies. This preset also requires control over the `max_b_frames` setting. GUI-only changes: - Renamed "MPEG" in the output file format menu with "FFmpeg", as this is more accurate. After all, FFmpeg is used when this option is chosen, which can also output non-MPEG files. - Certain parts of the GUI are disabled when not in use: - bit rate options are not used when a constant rate factor is given. - audio bitrate & volume are not used when no audio is exported. Note that I did not touch `BKE_ffmpeg_preset_set()`. There are currently two preset systems for FFmpeg (`BKE_ffmpeg_preset_set()` and the Python preset system). Before we do more work on `BKE_ffmpeg_preset_set()`, I think it's a good idea to determine whether we want to keep it at all. After this patch has been accepted, I'd be happy to go through the code and remove any then-obsolete bits, such as the handling of "XVID" as a container format. Reviewers: sergey, mont29, brecht Subscribers: mpan3, Blendify, brecht, fsiddi Tags: #bf_blender Differential Revision: https://developer.blender.org/D2242
2016-08-16More fixes from coverity report.Bastien Montagne