Commit Graph

150 Commits

Author SHA1 Message Date
397da50002 style cleanup: switch statements, include break statements within braces & indent.
also indent case's within the switch (we already did both of these almost everywhere)
2013-07-19 15:23:42 +00:00
cda5770160 code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds. 2013-06-13 11:59:28 +00:00
349b71fd02 Bring back support of FFmpeg >= 0.7
After planar codecs support minimal FFmpeg was
bumped to 0.10 which was not so much nice because
it was only released only later last year.

Didn't find a way to make compatibility code local
in ffmpeg_compat, so there're some ifdefs in
audaspace and writeffmpeg.

Not entirely happy, but having a bit of ifdefs in
code better than lots of real PITA for platform
maintainers.
2013-04-19 17:23:08 +00:00
7164596891 Fix #34956: rendering animation with audio would crash with an older ffmpeg
after recent changes.

New ffmpeg versions accept align = 0 as a parameter and will set it to 1
automatically, but older ones need to pass align = 1.
2013-04-11 14:46:41 +00:00
ff7b353ce6 style cleanup 2013-04-03 01:36:00 +00:00
07d027b102 Fix FFMPEG build error with older versions after planar formats commit. 2013-04-01 20:51:52 +00:00
8588fec935 FFMPEG: adding support for ffmpeg planar formats also to writeffmpeg.c. 2013-04-01 15:31:27 +00:00
ffc8ecc587 use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
2013-03-14 10:39:18 +00:00
153b63e0fd style cleanup 2013-03-12 21:46:33 +00:00
e6cdee370e Patch #34204: [Render Animation] Fails with "Error: Specified sample_fmt is not supported" with ogg vorbis
Patch by Jehan Pages (pardon for mis-typing, emacs-nox works not so good with
urf-8 buffers here), with some own modifications. Thanks!

From the patch tracker:

The problem is because of several versions of ffmpeg, but even more because of
the fork situation libav/ffmpeg. So there are some installed versions out there
where you *must* use a float sample for some codec; whereas oppositely on some
other installations, you *must* use the int sample. So for some people, one
works not the other, and reciprocally.

As a consequence, you can't just have a switch codec-based, like in current
code, which decides on the float or int implementation, you must necessarily
have a runtime test because you won't know until then if ogg vorbis will use
one or another sample (note: that's true also for AC3 as I fixed the exact same
bug in DVDStyler for AC3 encoding a few months ago; and I guess it would be same
for AAC).

Some notes from self:
- New FFmpeg requires using FLTP for AAC, AC3 and Vorbis, it's not supported
  by audaspace and result in this case would be just wrong. Throw an error
  in cases FLTP is trying to be used.
- Moved strict_std_compliance a bit upper. When we'll support FLTP both
  FLT and FLTP for AAC would need to be using FF_COMPLIANCE_EXPERIMENTAL.
- It is nice to have such check of supported by codec formats anyway.
2013-03-12 16:57:14 +00:00
d0af1101fb Patch #34569: Enable PNG Codec for video output
By Gottfried Hofmann, thanks!
2013-03-12 16:09:23 +00:00
e84153a91c Fix compilation error after recent changes to strict gcc flags
Dudes, please try building blender with all default features
before doing such a commits. It helps just a lot when bisecting
issues later.

Also solved const qualifier discard happens in recent monofont
commit.
2013-03-12 08:24:36 +00:00
28857e8c9e Fix #34511: Invalid Audio/Video codec combination produces hung filehandle 2013-03-11 11:09:57 +00:00
aab01c86cf Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg
and libav libraries, mainly by getting rid of deprecated API.

Original patch by Campbell Barton with own modifications to
support compilation with older ffmpeg versions.

This patch could break compatibility of FFV1 videos playing
back in older players, mainly because of alpha support changes.
Preserving compatibility with such players became a headache
and think it's high time to get rid of workarounds here.
2013-01-12 12:51:10 +00:00
debe07d9e4 Fix #33586: Encoding to mpeg4 makes first frame(s) blocky
Issue was caused by rc_initial_buffer_occupancy being set for context
Commented this option for now -- it's not used in ffmpeg.c.

Now encoding seems to be working nice for MPEG4 and other codecs as well.

However, if there're some gurus around please check :)
2012-12-18 17:46:59 +00:00
fde8b0f7bc Patch #33242: ffmpeg AAC/AC3 encoding
Patch by David M (erwin94), thanks!

Also made Vorbis codec using float sample_fmt, otherwise it didn't work
with new FFmpeg.

Perhaps we can make it more clear by explicitly separating audio_input_buffer
for float and integer buffers, but as far as it works i'm not so fussed about
this atm.
2012-11-21 11:57:35 +00:00
d0a7259837 Improved FFmpeg error reports when audio stream failed to be allocated
Also fixed crash using --debug-ffmpeg caused by BLI_vsnprintf modifies
va_list -- need to create copy of list if this list is gonna to be reused.
2012-11-19 17:22:40 +00:00
d25b13d13f code cleanup: double promotion warnings, also allow cmake to build SDL without audaspace. 2012-11-09 16:15:00 +00:00
26d0492653 A final bunch of UI messages fixes and tweaks, and some BKE_report()<->BKE_reportf() fixes. 2012-10-21 14:02:30 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
c56a911cd9 style cleanup: comments 2012-10-20 20:20:02 +00:00
dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
86dd087057 fix [#32475] Enabled audio lets blender crash with autosplit option for movie output 2012-09-06 03:08:47 +00:00
3bfe4520ae Style cleanup: whitespace 2012-08-26 11:01:18 +00:00
1b487e9948 Some FFmpeg changes
- Make FFmpeg initialization called from creator, not from functions
  which requires FFmpeg. Makes it easier to follow when initialization
  should happen.

- Enable DNxHD codec. It was commented a while ago due to some strange
  behavior on some platforms. Re-tested it on Linux and Windows and
  it seemd to be working quite nice. Would let it be tested further,
  if it wouldn't be stable enough, easy to comment it again.

- Make non-error messages from writeffmpeg.c printed only if ffmpeg
  debug argument was passed to blender. Reduces console pollution
  with messages which are not useful for general troubleshooting.
  Error messages would still be printed to the console.

- Show FFmpeg error message when video stream failed to allocate.
  makes it easier to understand what exactly is wrong from Blender
  interface, no need to restart blender with FFmpeg debug flag and
  check for console messages.

  Used custom log callback for this which stores last error message
  in static variable. This is not thread safe, but with current
  design FFmpeg routines could not be called form several threads
  anyway, so think it's fine solution/
2012-08-26 11:01:14 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
32478997ec style cleanup 2012-06-27 18:29:47 +00:00
4b877e1f8b Some options used for "expert" x264 setup were removed from FFmpeg 0.11
Prevent crashes in cases when option can't be found.
2012-06-18 15:42:23 +00:00
0d64e050ea Reduce amount of deprecated symbols used from FFmpeg
This switches some areas of Blender which are related on FFmpeg stuff
from deprecated symbols to currently supported one.

Pretty straightforward changes based on documentation of FFmpeg's
API which symbols should be now used.

This should make Blender compatible with recent FFmpeg 0.11.

Should be no functional changes.
2012-06-18 10:29:11 +00:00
5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
53ee7908d6 style cleanup: whitespace 2012-05-12 16:11:34 +00:00
d20c129a9c style cleanup: whitespace/operators 2012-05-09 09:24:15 +00:00
69fc654f94 Style cleanup: change ffmpeg, avi and frame server api to rna-ish naming style 2012-05-07 09:30:15 +00:00
112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
ae38adbf55 Blender should now compile fine with older FFmpeg libraries used. 2012-02-24 15:34:57 +00:00
dd0f151ba9 Changes in FFV1 codec settings
Since FFmpeg 0.10 release FFV1 codec supports alpha channel which is getting
enabled when using PIX_FMT_RGB32 pixel format. This leads to incompatibility of
videos rendered in Blender with almost all external players (especially in OSX).

Seems that PIX_FMT_BGR0 is recommended to be used to make videos compatible with
older players which doesn't support alpha channel in FFV1.

Also added an option to switch to RGBA rendering if FFV1 codec is used and if RGBA
rendering is used FFV1 will be using PIX_FMT_RGB32 format which supports alpha channel.
2012-02-24 09:49:44 +00:00
42e50719df ffmpeg: take back 44142, conditional was wrong 2012-02-16 11:52:02 +00:00
f047d90a0e ffmpeg: only suppress loopfilter for .mov ( compatibility ), but keep for .avi (quality ) 2012-02-16 08:48:28 +00:00
2cf28ab2bc ffmpeg: don't use flags:loop for .h264, this allows to see the video in OSX quickview and Quicktimeplayer( windows ? ) 2012-02-14 12:24:17 +00:00
67e32b4a7b Fix for wrong pixel format used for qtrle 2012-02-07 20:39:40 +00:00
dc72e79274 FFmpeg output fixes and small improvement
Most part of this commit fixes issues with FFmpeg output with
currently supported codecs:

- avcodec_encode_video might return zero which doesn't mean error
  happened, but blender will handle this as error and will stop
  rendering to video file.
- Changing output video codec wouldn't update "expert" options
  set for video output which leads to some sideeffects like
  ignored Lossless option for x264 codec.

This fixes allowed to add QTRLE codec easily.
2012-02-07 17:11:56 +00:00