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
2021-09-06Cleanup: use pre-calculated size variableCampbell Barton
Oversight in a0912ff5663b950222ef00485a3853bfb6001db4
2021-09-06ImBuf: add IMB_allocFromBufferOwn that takes ownership of the bufferCampbell Barton
Avoids duplicating the image buffer when saving thumbnails.
2021-09-06Cleanup: support passing in arbitrary buffers to IMB_allocFromBufferCampbell Barton
Also remove IB_metadata flag from the resulting imbuf as this image has no meta-data.
2021-09-06UI: Increase Size of Blend File ThumbnailsHarley Acheson
Increase effective resolution of blend preview images from 128x128 to 256x256 for versions saved in the file system thumbnail cache. See D10491 for details and examples. Differential Revision: https://developer.blender.org/D10491 Reviewed by Campbell Barton
2021-08-28Fix error scaling thumbnails to zero dimensionsCampbell Barton
Follow up to fix for T89868.
2021-08-26Cleanup: use C style comments for descriptive textCampbell Barton
2021-08-25Cleanup and remove SEQ_ALL_BEGIN macroSebastian Parborg
We now use a for_each function with callback to iterate through all sequences in the scene. This has the benefit that we now only loop over the sequences in the scene once. Before we would loop over them twice and allocate memory to store temporary data. The allocation of temporary data lead to unintentional memory leaks if the code used returns to exit out of the iteration loop. The new for_each callback method doesn't allocate any temporary data and only iterates though all sequences once. Reviewed By: Richard Antalik, Bastien Montagne Differential Revision: http://developer.blender.org/D12278
2021-08-25Cleanup: else-after-returnJacques Lucke
2021-08-25T90908: Reduce loading times when extracting thumbnails from Blendfiles.Jeroen Bakker
Previously when loading an thumbnails for an asset the whole file was read. Reason this was done was perhaps a future idea to load all thumbnails inside a blendfile in a single go. This was never implemented and currently unneeded disk and cpu cycles was spend with finding out what preview to load. This patch adds an early break when the thumbnail that the caller is interested in has been found. This improves the thumbnail extraction when looking into large files. Reviewed By: mont29 Maniphest Tasks: T90908 Differential Revision: https://developer.blender.org/D12312
2021-08-25Cleanup: separate IMB_thumb_load_blend in multiple functions.Jeroen Bakker
2021-08-16Fix T87967: M2T video seeking is brokenRichard Antalik
Bug caused by integer overflow in ffmpeg_generic_seek_workaround(). Function max_ii() was used to limit int_64tvalue. After fixing the issue there was another issue, where near-infinite loop was caused by requested_pos being very large and stream being cut in a way, that it was missing keyframe at beginning. This was fixed by checking if we are reading beyond file content. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D11888
2021-08-16VSE: Fix audaspace not reading ffmpeg files with start offset correctlySebastian Parborg
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-16VSE: Fix seeking issues.Sebastian Parborg
The seek pts was not correctly calculated. In addition to that we were not seeking in the video pts time base. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11921
2021-08-16VSE: Fix video strip duration calculationSebastian Parborg
The video duration was not read correctly from the video file. It would use the global duration of the file which does in some cases not line up with the actual duration of the video stream. Now we take the video stream duration and start time into account when calculating the strip duration. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11920
2021-08-12Cleanup: use C++ style comments for disabled codeCampbell Barton
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-08-04Cleanup: initialize variable to quiet warningJacques Lucke
2021-08-04Cleanup: use C comments for descriptive textCampbell Barton
2021-07-30Cleanup: clang-format (re-run after v12 version bump)Campbell Barton
2021-07-23Cleanup: code comments punctuation / spacingCampbell Barton
2021-07-20Cleanup: reserve C++ comments for disabled codeCampbell Barton
Use C comments for plain text.
2021-07-18Fix T89868: Crash showing thumbnail of wide-aspect imageJesse Yurkovich
Scaling down images could create images with a width or height of zero. Clamp at 1 to prevent a crash, also add an assert to scaling functions. Ref D11956
2021-07-16Fix T70356: Scaling up 1x1 pixel image reads past buffer boundsCampbell Barton
Also resolve a crash when when displaying thumbnails, see T89868.
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-13Cleanup: duplicate checks, unused initializationCampbell Barton
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Fix linking code after own recent commit.Bastien Montagne
More stupid mistake in recent enhanced reports for file load code, rB82c17082ba0e left some read-after-free situations.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-23Revert "Revert "Enhanced stats/reports for blendfile reading.""Bastien Montagne
This reverts commit rB3a48147b8ab92, and fixes the issues with linking etc. Change compared to previous buggy commit (rBf8d219dfd4c31) is that new `BlendFileReadReports` reports are now passed to the lowest level function generating the `FileData` (`filedata_new()`), which ensures (and asserts) that all code using it does have a valid non-NULL pointer to a `BlendFileReadReport` data. Sorry for the noise, it's always when you think a change is trivial and do not test it well enough that you end up doing those kind of mistakes...
2021-06-23Cleanup: reformat trailing comments that caused line wrappingCampbell Barton
2021-06-15BLI: use explicit task isolation, no longer part of parallel operationsBrecht Van Lommel
After looking into task isolation issues with Sergey, we couldn't find the reason behind the deadlocks that we are getting in T87938 and a Sprite Fright file involving motion blur renders. There is no apparent place where we adding or waiting on tasks in a task group from different isolation regions, which is what is known to cause problems. Yet it still hangs. Either we do not understand some limitation of TBB isolation, or there is a bug in TBB, but we could not figure it out. Instead the idea is to use isolation only where we know we need it: when holding a mutex lock and then doing some multithreaded operation within that locked region. Three places where we do this now: * Generated images * Cached BVH tree building * OpenVDB lazy grid loading Compared to the more automatic approach previously used, there is the downside that it is easy to miss places where we need isolation. Yet doing it more automatically is also causing unexpected issue and bugs that we found no solution for, so this seems better. Patch implemented by Sergey and me. Differential Revision: https://developer.blender.org/D11603
2021-06-14Fix: VSE seeking with proxy strips would fail on certain framesSebastian Parborg
If the last decoded frame had the same timestamp as the GOP current packet, then we would skip over this frame when fast forwarding and we would seek until the end of the file. This would could only be triggered reliably in single threaded mode. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11601
2021-06-14Error Messages Creating Thumbnail FoldersHarley Acheson
On the Windows platform there will be some errors printed to the console if the user's thumbnail cache folder doesn't already exist. While creating those folders there is an attempt to do so multiple times and so we get errors when trying to create when exists. This is caused by paths that have hard-coded forward slashes, which causes our path processing routines to not work correctly. This patch defines those paths using platform-varying separator characters. Differential Revision: https://developer.blender.org/D11505 Reviewed by Brecht Van Lommel
2021-06-11Performance: Use parallel range for ImBuf scanline processor.Jeroen Bakker
Scanline processor did its own heurestic what didn't scale well when having a multiple cores. In stead of using our own code this patch will leave it to TBB to determine how to split the scanlines over the available threads. Performance of the IMB_transform before this change was 0.002123s, with this change 0.001601s. This change increases performance in other areas as well including color management conversions. Reviewed By: zeddb Differential Revision: https://developer.blender.org/D11578
2021-06-11Fix: VSE search in mpegts files would failSebastian Parborg
ffmpeg_generic_seek_workaround did work properly and our start pts calculation was wrong. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11562
2021-06-11Fix: VSE indexer seeking not working correctlySebastian Parborg
Because of the added sanity checks in rB14508ef100c9 (D11492), seeking in proxies would not work correctly any more. This is because it wasn't working as intended before, but in most cases this wouldn't be noticeable. However now when the sanity checks are tripped it is very noticeable that something is wrong The indexer tried to use dts values for time stamps when we used pts in our decode functions to get the time positions. This would make it start in the wrong GOP frames when searching. Now that we enforce no crossing of GOP frames when decoding after seek, this would lead to issues. Now we correctly use pts (or dts if pts is not available) and thus we don't have any seeking issues because of time stamp format missmatch. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11561
2021-06-11Fix: VSE timecodes being used even when turned off.Sebastian Parborg
Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11567
2021-06-11Performance: Split ImBuf sampling.Jeroen Bakker
When sampling ImBuf can be a char or a float buffer. Current sampling functions added overhead by checking which kind of buffer was passed every pixel that was sampled. When performing image processing this check can be removed outside the inner loop adding 5% of performance increase in the `IMB_transform` operator.
2021-06-11Sequencer: Transform ImBuf Processor.Jeroen Bakker
Inside the sequencer the cropping and transform of images/buffers were implemented locally. This reduced the optimizations that a compiler could do and added confusing code styles. This patch adds `IMB_transform` to reduce the confusion and increases compiler optimizations as more code can be inlined and we can keep track of indices inside the inner loop. This increases end-user performance by 30% when playing back aa video in VSE. Reviewed By: ISS, zeddb Differential Revision: https://developer.blender.org/D11549
2021-06-10Cleanup: move endian values from BKE_global into BLI_endian_definesCampbell Barton
This change was prompted by D6408 which moves thumbnail extraction into a shared function that happens use these endian defines but only links blenlib. There is no need for these defines to be associated with globals so move into their own header.
2021-06-09Fix: Prevent small memory leak in VSE indexerSebastian Parborg
We need to unref the packet to tell ffmpeg it is ok to free it after use.
2021-06-08BLI: support disabling task isolation in task poolJacques Lucke
Under some circumstances using task isolation can cause deadlocks. Previously, our task pool implementation would run all tasks in an isolated region. Now using task isolation is optional and can be turned on/off for individual task pools. Task pools that spawn new tasks recursively should never enable task isolation. There is a new check that finds these cases at runtime. Right now this check is disabled, so that this commit is a pure refactor. It will be enabled in an upcoming commit. This fixes T88598. Differential Revision: https://developer.blender.org/D11415
2021-06-07Fix: Wrong logic for checking if we can reuse decoded frameSebastian Parborg
We should only check if the new pts value lies inside the duration of the current frame.
2021-06-05FFmpeg: Fix seeking not returning the correct frame when not using TC indexSebastian Parborg
Fixed the logic for seeking in ffmpeg video files. The main fix is that we now apply a small offset in ffmpeg_get_seek_pos to make sure we don't get the frame in front of the seek position when seeking backward. The rest of the changes is general cleanup and untangling code. Reviewed By: Richard Antalik Differential Revision: http://developer.blender.org/D11492
2021-06-03Cleanup: spelling in comments, correct outdated commentsCampbell Barton
2021-06-02Fix T57397: Movies are blurred after sws_scaleRichard Antalik
Images with 4:2:2 and 4:4:4 chroma subsampling were blurred when `SWS_FAST_BILINEAR` interpolation is set for `anim->img_convert_ctx`. Use `SWS_BILINEAR` interpolation for all movies, as performance is not impacted by this change. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11457