Commit Graph

54 Commits

Author SHA1 Message Date
Sebastian Parborg be636f72dc Cleanup: Remove LibAV support
Ubuntu and Debian dropped libav in 2015 in favor of ffmpeg.
Development stopped of libav in 2018, so it should be save to remove.
2021-02-05 14:30:35 +01:00
Brecht Van Lommel 532ac1163c Tests: bundle tests for some modules in their own executables
The ffmpeg, guardedalloc and blenlib are quite isolated and putting them in
their own executable separate from blender_test is faster for development than
linking the entire blender_tests executable.

For Cycles, this also bundles all the unit tests into one executable.

Ref T79958

Differential Revision: https://developer.blender.org/D8714
2020-09-17 12:29:19 +02:00
Sergey Sharybin 1b8778e314 Cleanup: Strict compiler flags
Mainly caused by moving tests to source folder, which brings
new compiler flags.

Also, no need to extend include directories (to the non-existing paths,
btw) since this is done by the CmakeList.txt which is in the blenlib folder.
2020-08-11 12:48:33 +02:00
Brecht Van Lommel 53d203dea8 Tests: move remaining gtests into their own module folders
And make them part of the blender_test runner. The one exception is blenlib
performance tests, which we don't want to run by default. They remain in their
own executable.

Differential Revision: https://developer.blender.org/D8498
2020-08-10 18:14:00 +02:00
Dalai Felinto 2d1cce8331 Cleanup: `make format` after SortedIncludes change 2020-03-19 09:33:58 +01:00
Sybren A. Stüvel fba35aa8c5 Use FFmpeg's own `av_guess_frame_rate()` function instead of guessing ourselves
This was introduced in FFmpeg lavf 55.1.100 in 2013. For systems that are
still on LibAV or older FFmpeg there is a fallback implementation that
performs the same guess as we did before in `av_get_r_frame_rate_compat()`.
2019-09-19 15:12:53 +02:00
Campbell Barton ac646bc20d Cleanup: spelling 2019-08-31 01:21:42 +10:00
Campbell Barton 177a0ca131 Cleanup: comments (long lines) in various intern/ libs 2019-05-01 21:00:56 +10:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
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-04-17 06:21:24 +02:00
Campbell Barton 65ec7ec524 Cleanup: remove redundant, invalid info from headers
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.
2019-02-02 01:36:28 +11:00
Sergey Sharybin 9770d071ff Fix T54834: VSE can't import OGG Theora video 2019-01-23 17:16:17 +01:00
Bastien Montagne 4e4a93bc45 Fix building with latest versions of ffmpeg.
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-05-08 16:00:52 +02:00
Sergey Sharybin 370a2d6917 Fix T53857: Incorrect framerate for videos imported from OBS
This is an issue with which value to trust: fps vs. tbr. They both cam be
somewhat broken. Currently the idea is:

- If file was saved with FFmpeg AND we are decoding with FFmpeg we trust tbr.
- If we are decoding with Libav we use fps (there does not seem to be tbr in
  Libav, unless i'm missing something).
- All other cases we use fps.

Seems to work all good for files from T53857, T54148 and T51153. Ideally we
would need to collect some amount of regression files to make further tweaks
more scientific.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3083
2018-03-09 10:32:17 +01:00
Sergey Sharybin 8ca9fa5fd3 Fix T51153: Video duration is detected wrong after FFmpeg update
The issue was caused by stupid workaorund for libav. Now things works for
FFmpeg. There might need some tweaks needed for Libav, but that one is
not really priority for support.
2017-05-12 16:43:36 +02:00
Sergey Sharybin 3623f32b48 FFmpeg: Update for the deprecated API in 3.2.x
Should be no functional changes.
2017-03-06 10:34:57 +01:00
Sergey Sharybin 7c76479d5f Fix compilation error with FFmpeg and Ubuntu Trusty
Seems this is a confusion between Libav which was silently used
by Ubuntu instead of FFmpeg.
2016-02-19 22:05:06 +01:00
Sergey Sharybin 4431caae1a Some more tweaks to make linking to a shared FFmpeg-3.0 happy 2016-02-17 10:48:46 +01:00
Sergey Sharybin 0b03785eb5 Make Blender compilable with FFmpeg-3.0
While it's not something we'll be using for the official release,
it's nice to support new libraries at least on "it compiles" level,
so it's not that many frustrated developers around.

Nexyon, please have a look into Audaspace changes :)
2016-02-16 12:34:15 +01:00
Sergey Sharybin 0c51010c67 Fix video FFmpeg nt being able to produce video files due to usage of deprecated settings 2014-04-15 00:15:09 +06:00
Sergey Sharybin bcf6eedc48 Make blender compilable with FFmpeg-0.8.1
Needed for some own tests.
2014-03-27 19:12:21 +06:00
Sergey Sharybin 9c587ae8a0 Fix wrong animation duration when using older Libav 2014-02-06 15:57:32 +06:00
Sergey Sharybin 9bec4f7779 Fix T38455: Blenderplayer is not working
Was a regression since avg_frame_rate changes.

Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.
2014-02-03 17:25:47 +06:00
Sergey Sharybin 790e30af67 Code cleanup: indentation of interior preprocessor 2014-01-28 14:33:42 +06:00
Anton Khirnov 2b858b45c2 audaspace: use new libavcodec audio encoding API where available 2014-01-28 14:25:40 +06:00
Anton Khirnov f99e581ae1 libavformat API usage: use avformat_close_input() instead of av_close_input_file() 2014-01-28 14:20:22 +06:00
Anton Khirnov b7f8bfef25 libavcodec API usage: use new video encoding API
avcodec_encode_video() has been replaced with avcodec_encode_video2()
in new libavcodec versions.
2014-01-28 14:17:50 +06:00
Anton Khirnov 8c3b27ce27 Change libavcodec CODEC_ID_* to AV_CODEC_ID_*
CODEC_ID_* have been replaced with AV_CODEC_ID_* in new libavcodec
versions.

Update the code to use those new identifiers.

Added a compatibility code to ffmpeg_compat.h
2014-01-28 14:00:31 +06:00
Sergey Sharybin b53bc572fd Attempt to fix compilation against libav-0.8.9 2013-12-11 22:40:45 +06:00
Campbell Barton beae4f498d code cleanup: spelling 2013-10-31 14:10:01 +00:00
Brecht Van Lommel aa2a0e4ab0 More build fixes for visual studio 2012.
Patch #35019, #35131 and #35152 by Jurgen Herrmann.
2013-04-29 19:15:56 +00:00
Sergey Sharybin 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
Sergey Sharybin 427f56f1f0 Fix compilation with current FFmpeg trunk
AVCODEC_MAX_AUDIO_FRAME_SIZE was deprecated and
finally removed from current trunk.

Initial patch by Lawrence D'Oliveiro (ldo) with
own modification, Thanks!
2013-04-15 11:08:02 +00:00
Peter Schlaile 1166609cd3 == FFMPEG / Canon DSLR footage workaround ==
The latest ffmpeg versions include a workaround to deal with a certain
pecularity in Canon DSLR footage: instead of decoding pictures with the
proper resolution of 1920x1080 they decode it with 1920x1088 and add a
black bar at the bottom.

Needless to say, that this screws up things in a lot of areas within blender
(proxy indices, mask animations etc.)

Since all blender versions besides Linux x86 32bit seem still to include
older ffmpeg versions which still contain this bug, this patch adds
a workaround for older versions until we have all versions on all platforms
up to date.

See also: http://git.libav.org/?p=libav.git;a=commit;h=30f515091c323da59c0f1b533703dedca2f4b95d
2013-04-14 13:44:04 +00:00
Brecht Van Lommel 07d027b102 Fix FFMPEG build error with older versions after planar formats commit. 2013-04-01 20:51:52 +00:00
Sergey Sharybin 547342bf73 Hopefully compilation with FFmpeg 0.10 works fine now. 2013-04-01 10:53:29 +00:00
Sergey Sharybin d7e427beff Fix/workaround for newer FFmpeg 1.1.3 and MP3 decoder
FFmpeg is now using S16P sampler for MP3 which is not actually
supported by audaspace, so request for S16 sampler instead.
2013-02-28 18:28:08 +00:00
Sergey Sharybin f102953634 Further tweaks to support libav from wheezy 2013-01-13 17:54:09 +00:00
Sergey Sharybin 21e5451c3b Tweak to ffmpeg compatibility layer to support debian's wheezy libav 2013-01-13 17:10:10 +00:00
Sergey Sharybin 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
Campbell Barton 25591e958d style cleanup: tabs & whitespace 2012-11-03 15:35:03 +00:00
Sergey Sharybin 49e0175e40 Use own version of ff_update_cur_dts for FFmpeg >= 0.11, seems
linking against function which isn't public in API gives error
when met some circumstances.
2012-06-25 07:14:21 +00:00
Sergey Sharybin 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
Sergey Sharybin ae38adbf55 Blender should now compile fine with older FFmpeg libraries used. 2012-02-24 15:34:57 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Sergey Sharybin e19d78178d Possible fix for implicit declaration of av_rescale_q on some platforms. 2012-01-26 11:16:49 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 67e744ccf0 fix some typo's 2011-10-23 15:27:36 +00:00
Campbell Barton f260a878e4 give a more useful error when building with an old ffmpeg. 2011-09-25 04:17:00 +00:00
Peter Schlaile c07bd1439a == Sequencer ==
This patch adds:

* support for proxy building again (missing feature from Blender 2.49)
  additionally to the way, Blender 2.49 worked, you can select several
  strips at once and make Blender build proxies in the background (using
  the job system)
  Also a new thing: movie proxies are now build into AVI files, and
  the proxy system is moved into ImBuf-library, so that other parts
  of blender can also benefit from it.
  
* Timecode support: to fix seeking issues with files, that have
  a) varying frame rates
  b) very large GOP lengths
  c) are broken inbetween
  d) use different time code tracks
  
  the proxy builder can now also build timecode indices, which are
  used (optionally) for seeking.
  
  For the first time, it is possible, to do frame exact seeking on
  all file types.
  
* Support for different video-streams in one video file (can be
  selected in sequencer, other parts of blender can also use it,
  but UI has to be added accordingly)

* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
  older versions don't support the pkt_pts field, that is essential
  for building timecode indices.
  
  Windows and Mac libs are already updated, Linux-users have to build
  their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
Jiri Hnidek 8c11a26285 Fixed compile error on Fedora 15, when FFMPEG was enabled. 2011-07-17 10:28:31 +00:00