Commit Graph

616 Commits

Author SHA1 Message Date
1dd72692cd Code refactoring: move MD5 out of imbuf into blenlib. 2011-12-21 13:48:51 +00:00
994f4bb3f7 Code cleanup: fix a few warnings (>= 0 and == -1 tests on unsigned types). 2011-12-17 01:13:02 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
3f81d010e3 Free run no gaps time code implementation
This commit adds new timecode type which counts frames in gapless mode (counting
actually decoded frames instead of using pts to find frame number) which might
resolve issues with files which have got broken or incorrect base time value stored
in the header.

This timecode allows to deal with movies from #29388: Abnormal frame length on MP4 files
2011-12-15 12:18:09 +00:00
753bfe730a fix building on openbsd, also quiet some warnings. 2011-12-04 15:45:53 +00:00
6736576f6d replace FILE_MAXDIR + FILE_MAXFILE with FILE_MAX 2011-11-26 04:07:38 +00:00
7a2725048d - saving as a jpeg image would set the image as not having an alpha channel even when saving a copy.
- setting the color channels on save as would ignore the channel - BW/RGB/RGBA setting.
  now its used when available but still need to hide BW for formats blender can only write as color.
2011-11-24 06:30:37 +00:00
30fd1ab523 replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid confusion with ImageFormatData.depth 2011-11-21 20:47:19 +00:00
f8431e459f Fix #29295: Problem with Alpha Channel video in Sequencer and textures
Bug was caused by workaround for old versions of FFmpeg which aren't supported
anymore due to pts stuff.

Removing workarounds for alpha channels.
2011-11-20 16:26:37 +00:00
af66321f3b == Sequencer / FFMPEG ==
This fixed two issues:

* RAW DV-seeking has to be done using DTS. Sounds silly, but ffmpeg
  tracks internal state in RAW DV format decoder and runs mad, if
  we seek by byte. Don't know, why I haven't noticed that, when I
  added it.
  
* real fix(tm) for #29295
  problem was: we did AVFrame read ahead, and the pattern
  read_frame -> decode -> read_frame -> do color conversion of first frame
  works everywhere but RAW RGB-files which do some pointer shuffling
  within ffmpeg to save a memcpy...
  
  I removed read ahead completely, since it didn't work like originally
  intented. Might come back later, but the original purpose (making
  resyncing easier if we are completely lost in stream) it never
  fullfilled.
2011-11-20 16:08:56 +00:00
97808449e6 Fix #29321: Video does not display, gets frozen or flickers
Unfortunately, error was caused by own attempt to deal with some kind of broken
videos when was investigating crashes in sequencer. Issue discovered that time
was related on values stored in timecode index and using them as signed data type
later.

Trying to use unsigned value here leads to signed/unsigned check failures.

Prefer just to pre-process that kind of videos i've been trying to deal with
rather than making more global changes during BCON3.
2011-11-18 20:55:06 +00:00
3dcc9aef96 merge mempool changes from bmesh (adds mempool iterator). 2011-11-16 19:31:42 +00:00
8a0da0b59e Fix #29202: Crash - VSE Cross strip probably leads to this
Crash was caused by several conditions:
- Frame which failed to decode tried to be converted to RGB colorspace
  and some filters like deinterlacing used to be applied as well
  (it's avscale stuff sws_scale where crash happened).
- In some cases it happened reading of freed memory when calling
  sws_scale function. Looks like it happened because of freeing
  packet on which decoding of frame finished and reading next packet.

Solved this two issues by making YUV->RGB conversion as soon as
frame was decoded in ffmpeg_decode_video_frame (such postprocessing
used to happen in callee of this function ffmpeg_fetchibuf), so now
sws_scale would be called before freeing packet on which decoding of
frame finished and it wouldn't be called in cases when decoding of
frame failed.

If decoding of frame failed, it'll be black ibuf returned to the sequencer.
2011-11-15 07:00:01 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
e0030d6c1c - Fixed typo in KLT description tooltip
- Fixed inconsistent data type used for pts number in ffmpeg_fetchibuf
  and stored in timecode structure. Not really issue for "correct" movie files,
  but probably can help for "broken" one
2011-11-08 10:17:50 +00:00
057bf2a02b misc doc edits
- remove recently added sphinx reference workaround.
- tested doxygen, correct some warnings, set tab width and added pymathutils group.
- added convenience target 'make doc_doxy'
2011-11-05 01:48:10 +00:00
665f602f15 python string conversion
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly 
- use const char
2011-11-03 14:09:18 +00:00
fa6e6e7fc0 pass image description to image loading functions for more useful error than 'Unknown fileformat'. 2011-10-27 04:24:34 +00:00
ba0ef7a592 Fix #29030: render operator only used scene property if layers was used, now it
is possible to specify the scene without the layer too.
2011-10-26 14:05:01 +00:00
675076a06e cmake macro to set less strict flags per file - remove_strict_flags_file(file, file...)
this way we can avoid removing strict flags for all files in blenkernel.
2011-10-25 11:06:52 +00:00
5b6224c847 Remove currently unused IMB_cache_limiter_* function.
Would be replaced with movie cache soon.
2011-10-24 17:26:24 +00:00
3cbadbf895 MovieCache implementation
Implementation of cache for general movie-related areas
such as sequencer and clip editor (in the future)

Some changes in limiter were necessary:
- Limiter counted mapped memory twice when was checking how many memory is used.
- It was using "global" memory usage not memory usage by cached elements.
  It will cause big problems when there's large mesh or plenty of undo steps are
  in memory nothing would be cached in sequencer.
- To solve this problem introduced "callback" to measure cached element size.
  It could be not very accurate in general, but it works well for image buffers.
  And if this callback isn't set old-school memory usage check would be used.
- The whole cache used to get freed when memory limit exceeded, now it'll drop only
  as much elements as necessary to reduce memory usage.

Seqcache is switched to use this new cache code.
2011-10-24 17:12:28 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
e417e011d5 Code cleanup: file operations merged into single header, some function names
made less cryptic and changed to indicate if they work on files or directories.
2011-10-22 15:35:49 +00:00
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
a828845f27 reverting 41124, maybe better solution is to enforce linear space in generated float images 2011-10-20 12:15:39 +00:00
8d6a554d75 - add BLI_string_utf8.h for unicode functions.
- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
2011-10-20 09:47:05 +00:00
5cf593a778 strcpy() --> BLI_strncpy(), where source strings are not fixed and target size is known. 2011-10-19 23:10:54 +00:00
364fcde86d #fix: Saving OpenEXR images as floats ignores color profile. This was not noticable in renderer because it works in linear color space. Painting on the image editor, saving and reloading was problematic though. 2011-10-19 23:04:48 +00:00
61389bba41 fix spelling mistakes in comments (and in some python error messages), nothing to effect translations. 2011-10-17 06:39:13 +00:00
05b47c28fa Revert part of recent fix for movie resolution.
It helped to make things works better for some movies but it
didn't help proxies to work properly. Correct fix seems a bit larger
and better not be made atm, so to keep behavior of proxies and
original movie consistent keep resolution behaves like it was before
recent changes,
2011-10-13 08:56:21 +00:00
cfebab7715 quiet compiler warnings for string formatting in ffmpeg logging 2011-10-12 22:00:53 +00:00
c6f253f8a6 Compile fix for some platforms (like linux release build environment) 2011-10-12 18:56:55 +00:00
5a3540f4d8 Fixes for #26837: MPEG Preseek does not work for some h264 files.
- Display running job template in all sequencer modes
  It was displayed only for sequencer mode without preview.
- Fixed proxy rebuild progress indicator
  It was alsways zero because of incorrect rounding.
- Fixed timecode saving on windows (and probably some other platforms)
  It was caused by incorrect opening file for writting -- it should
  be opened in binary format "wb". This error caused incorrect
  movie duration detection on windows.
- Fixed movie resolution detection for some movies.
  In file attached to report, Blender detected resolution 1920x1088
  instead of 1920x1080. Not sure if this fix is correct or it's
  issue in FFmpeg, but it's something what mplayer using: store
  width/height before running avcodec_open().
- Fixed frame number calculation when building timecodes.
  It was rounding error caused some frames be positioned incorrect
  in several cases (that each 6th frame rendered as next frame
  from report).
2011-10-12 12:49:45 +00:00
c27926896f spaces -> tabs (whitespace only changes) 2011-10-06 22:04:01 +00:00
35f881b44d Commented and tagged some unused vars, added some var init (gcc warnings...) 2011-09-28 15:22:13 +00:00
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
86d528afa7 comment some unused vars / assignments. 2011-09-22 03:14:50 +00:00
4b449aefea remove support for irix 2011-09-21 08:40:30 +00:00
d78231734d attempt to fix windows/scons issue I caused in a recent commit. 2011-09-19 15:18:58 +00:00
4e9ab6d04c replace WORDS_BIGENDIAN with __BIG_ENDIAN__ 2011-09-19 08:11:30 +00:00
83a2f02a78 cleanup endian handling
- define __BIG_ENDIAN__ or __LITTLE_ENDIAN__ with cmake & scons.
- ENDIAN_ORDER is now a define rather than a global short.
- replace checks like this with single ifdef: #if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- remove BKE_endian.h which isn't used
2011-09-19 08:02:17 +00:00
425a81a29b remove WITH_* defines from image formats, instead just dont build the files at all. 2011-09-19 06:32:19 +00:00
2222f536f8 use replace 0 with NULL for pointers, set some functions static
also fixed own errors in recent static check commit.
2011-09-16 08:20:21 +00:00
0abe1911d5 - fix for access past the buffer size (paint / sculpt used some 2d vecs as 3d)
- remove redundant NULL checks on old code where it would crash if the result was NULL later on.
- add some missing NULL checks.
2011-09-16 06:47:01 +00:00
a6d9a5a972 Code cleanup: warning fixes. 2011-09-05 19:27:21 +00:00
00143a3d55 spaces -> tabs (configure you're editors right!) 2011-09-01 01:48:50 +00:00
79249f8aed fix [#28430] Image with Stampinfo does not get saved correctly with alpha 2011-08-31 01:05:40 +00:00
c58a0c5eb8 catch exception and report an error when failing to write exr files - was crashing with debug builds. 2011-08-30 23:08:38 +00:00