OSDN Git Service
Chih-Wei Huang [Sat, 9 Sep 2017 15:52:35 +0000 (23:52 +0800)]
Fix building issues of Android 8.0
Chih-Wei Huang [Wed, 23 Aug 2017 03:42:21 +0000 (11:42 +0800)]
android: simplify makefiles
Use the variables that have already been defined as possible.
Chih-Wei Huang [Wed, 7 Jun 2017 15:43:27 +0000 (23:43 +0800)]
android: update configs to ffmpeg master branch
Re-generate the configs by gen-android-configs.
Chih-Wei Huang [Wed, 10 May 2017 05:13:02 +0000 (13:13 +0800)]
android: clean up makefiles
Move common variables to the top makefile. No need to define them
on including each time.
Export ffmpeg include paths by LOCAL_EXPORT_C_INCLUDE_DIRS.
Use LOCAL_PROPRIETARY_MODULE to put libraries to /vendor.
Chih-Wei Huang [Tue, 9 May 2017 09:00:19 +0000 (17:00 +0800)]
android: quiet some warnings
Chih-Wei Huang [Tue, 9 May 2017 08:18:22 +0000 (16:18 +0800)]
android: update rules for ffmpeg master branch
Chih-Wei Huang [Tue, 9 May 2017 07:43:03 +0000 (15:43 +0800)]
android: use AOSP's rules to build asm
AOSP has rules to build asm since Lollipop. Switch to AOSP's rules
to simplify the makefile.
Chih-Wei Huang [Mon, 8 May 2017 07:01:35 +0000 (15:01 +0800)]
android: add ff_android_protocol
It's initialized and used by stagefright-plugins.
Chih-Wei Huang [Wed, 3 May 2017 11:13:10 +0000 (19:13 +0800)]
configure: android: enable vaapi hwaccel
Chih-Wei Huang [Tue, 2 May 2017 08:59:20 +0000 (16:59 +0800)]
gen-android-configs: set target-os to android
Modify configure to avoid generating verbose variables which are not
used by Android build system.
Chih-Wei Huang [Tue, 2 May 2017 08:35:42 +0000 (16:35 +0800)]
android: update generated files
Chih-Wei Huang [Tue, 2 May 2017 08:30:47 +0000 (16:30 +0800)]
gen-android-configs: move generated files to android folder
Chih-Wei Huang [Tue, 2 May 2017 08:17:03 +0000 (16:17 +0800)]
gen-android-configs: support x86_64 multilib build
Copy the x86(_64) files to the correct locations.
Chih-Wei Huang [Thu, 27 Apr 2017 10:17:11 +0000 (18:17 +0800)]
android: enable vaapi support
Only link libva if CONFIG_VAAPI=yes.
Hack ffmpeg_vaapi.c to avoid linking errors.
Chih-Wei Huang [Thu, 27 Apr 2017 10:01:29 +0000 (18:01 +0800)]
android: link shared libraries defined in *_FFLIBS
This is a cleanup to follow new *_FFLIBS variable defined in
config-*.mk.
Chih-Wei Huang [Thu, 27 Apr 2017 08:55:47 +0000 (16:55 +0800)]
android: remove the usage of copy headers
It's deprecated and unnecessary.
Chih-Wei Huang [Fri, 14 Apr 2017 07:56:22 +0000 (15:56 +0800)]
configure: android: don't use compat/strtod.c
Now bionic supports strtod.
Steve Kondik [Wed, 5 Oct 2016 19:36:26 +0000 (12:36 -0700)]
ffmpeg: Adjust build hacks
* The wmalosslessdec hack is no longer needed for arm/arm64
* vp9dsp_8bpp is crashing SDCLANG at O2 and O3. No need to
disable SDCLANG entirely, just drop it to O1.
Change-Id: Ie97a5baed67ca98cc375a8ef7750c1d012ea0b25
Steve Kondik [Sun, 2 Oct 2016 02:33:03 +0000 (19:33 -0700)]
android: Don't use Snapdragon LLVM when building
* SDLLVM throws an internal compiler error when building the vp9
decoder. Disable use of SDLLVM for now until the issue is resolved.
Change-Id: Ifd92aa54446f518bcf8821af2625772adbb6a5af
Steve Kondik [Tue, 6 Sep 2016 03:22:26 +0000 (20:22 -0700)]
ffmpeg: Update build flags
* Reduce noise
Change-Id: I57e425179631f7f041b589b9c13a630c93272ae2
Jaap Jan Meijer [Sun, 7 Aug 2016 23:11:42 +0000 (01:11 +0200)]
android: add missing includes
Change-Id: I97c95c1c5f0d0c5ceb27d80c7915c2c5a8927bb1
Jaap Jan Meijer [Mon, 4 Jul 2016 17:14:30 +0000 (19:14 +0200)]
Include and link against libva
Change-Id: Iba7201ddafbd637d229f0d03b81fb56fc4d3f863
WuZhen [Fri, 4 Mar 2016 09:41:52 +0000 (17:41 +0800)]
support building for x86_64 multilib build
This commit adds support for building x86-64 version
of ffmpeg. rename arch dependant config files to
distinguish x86 and x86-64 targets
Change-Id: Iabecf7eb4c9b2572a8272add44612e85fd7ea999
Arnav Gupta [Wed, 10 Feb 2016 00:06:59 +0000 (05:36 +0530)]
libavutil: fix old style function definition warnings
Change-Id: I879cef5a97542bba4a0923a79b94d044d62fcb7d
Signed-off-by: Arnav Gupta <championswimmer@gmail.com>
artefvck [Mon, 8 Feb 2016 02:49:58 +0000 (18:49 -0800)]
fix invalid linked for target atom , move x86-atom to atom
from android_build we don't find target arch for x86-atom , so we move linked here
Change-Id: I94edfe54f34a6311aac93771270f418143d0cd76
Steve Kondik [Mon, 15 Feb 2016 16:53:59 +0000 (11:53 -0500)]
ffmpeg: Update configs and makefiles for FFMPEG 3.0
Change-Id: If99ca4a37ff6c1781acaa0f7d57dead7b54a5931
Ricardo Cerqueira [Tue, 22 Dec 2015 15:16:24 +0000 (15:16 +0000)]
Add MODULE_LICENSE and NOTICE files
Addresses CYNGNOS-1477
Change-Id: Ie08dcea95298a45ac66556e2425e49cb0ed82a01
Steve Kondik [Sun, 29 Nov 2015 12:39:12 +0000 (04:39 -0800)]
ffmpeg: Enable the vectorizer
* EXPERIMENTAL.
* Also needs benchmarks.
* gcc-4.8 in 12.1 was generating bogus code with the vectorizer
enabled, but 4.9 and Clang both seem to do fine with it.
Change-Id: Ia0fe8e5506149b063ff8f8e84209a52098d2c458
Steve Kondik [Wed, 4 Nov 2015 12:37:47 +0000 (04:37 -0800)]
ffmpeg: Don't use Clang's integrated assembler
* It barfs on some of the GAS-specific directives in ASM.
* ..and enable building with Clang.
Change-Id: Ib3bfeefd40666e616ce4738a63bc780d51b7567b
Steve Kondik [Sun, 1 Nov 2015 12:05:08 +0000 (04:05 -0800)]
ffmpeg: Don't build with Clang for now
* Need to sort out issues in the assembly bits
Change-Id: I1242342f1befae02b7b9346a54cbcff11c25cf96
Steve Kondik [Tue, 27 Oct 2015 23:37:23 +0000 (16:37 -0700)]
ffmpeg: Install binaries to /vendor
Change-Id: I54593a526d781c153649bd2286ca91e1824b5b0a
Steve Kondik [Sat, 17 Oct 2015 21:38:57 +0000 (14:38 -0700)]
avutil: Fix a warning when building with clang
Change-Id: I06ca735264723826a589b5a4ab4dc2642d0352d0
Steve Kondik [Tue, 13 Oct 2015 03:19:42 +0000 (17:19 -1000)]
ffmpeg: Update configurations for FFMPEG 2.8
Change-Id: I438bab0cbb26dfd2fa196fd242b29e76b7a3b312
Steve Kondik [Tue, 13 Oct 2015 03:19:28 +0000 (17:19 -1000)]
Update gen-android-configs for new GCC versions
Change-Id: Ibb24fa1f27d7e70f66f9e7c82de38051084395b1
dhacker29 [Sun, 21 Jun 2015 05:37:40 +0000 (01:37 -0400)]
ffmpeg: Set cpu arch for silvermont config
Change-Id: I770ccc6c28e015bdb13e652fb23343c960561555
Steve Kondik [Sun, 21 Jun 2015 05:17:32 +0000 (22:17 -0700)]
ffmpeg: Readd missing X86 fixups
* These detect wrongly during configure with the bundled GCC.
* Add fixups to the generator script to adjust for X86.
Change-Id: I637b348372a1f34118dd08d893d83b50027447ca
Steve Kondik [Sun, 14 Jun 2015 11:01:49 +0000 (04:01 -0700)]
ffmpeg: Regenerate configurations for FFMPEG 2.7
Change-Id: I210330a653e1e63233f8c67c99c480f738f54f14
Steve Kondik [Sun, 14 Jun 2015 11:00:45 +0000 (04:00 -0700)]
ffmpeg: Add script to regenerate the configs
* Run gen-android-configs to regenerate the configurations for
all buildable architectures.
* New architectures can also be easily added in this script.
Change-Id: I250642f01cb7bd8f2c96317d9f4c5a6e4e9af7a7
Steve Kondik [Sat, 9 May 2015 06:48:05 +0000 (23:48 -0700)]
ffmpeg: Update Android build configuration
Change-Id: I2c59c9b50553b0d33a684c1484fc377fabd38d92
dhacker29 [Tue, 7 Apr 2015 05:14:12 +0000 (01:14 -0400)]
x86: Use yasm from prebuilts and don't depend on host install
Change-Id: I88016039ba8727eba72eabc49c90379211f77dd2
Howard M. Harte [Fri, 30 Jan 2015 01:37:01 +0000 (17:37 -0800)]
Add configuration for silvermont CPU based on Atom.
Change-Id: Id13d2cd559ba533782669bea02c4922be8a72ce1
Chris Sarbora [Sat, 17 Jan 2015 17:39:50 +0000 (09:39 -0800)]
Get ffmpeg building for emulatorx86
NOTE: Had to manually edit android/include/config-x86.h after generating it with ./configure
HAVE_EBP_AVAILABLE needs to be set to 0, not 1 (like configure autodetects)
Change-Id: I31b8a009385b8f364692cb203ac726b00748249b
Steve Kondik [Thu, 25 Dec 2014 10:45:00 +0000 (02:45 -0800)]
ffmpeg: Fix variable collisions
* We need some undefs here because FFMPEG wants these values to equal
either 1 or 0, while Bionic just defines it to nothing.
Change-Id: I2505d4c077db41b3fa61af5a9b2c83491f0b9b88
Ricardo Cerqueira [Wed, 24 Dec 2014 22:49:27 +0000 (22:49 +0000)]
build: Use ARM mode for arm32 builds
thumb mode does NOT work on some codecs. ARM all the way
Change-Id: Ib92d9fc718388e5e0340534cef1eeba986587653
Ricardo Cerqueira [Wed, 24 Dec 2014 03:08:50 +0000 (03:08 +0000)]
Fixup armv8-a building, and make multiarch builds work
Change-Id: Ica6c855a77cb14a2c96682f6c7bf5bdae9a06970
Steve Kondik [Tue, 16 Dec 2014 09:37:57 +0000 (01:37 -0800)]
avutil: Use _SC_NPROCESSORS_CONF
* On most Android devices, CPUs can appear and disappear due to hotplug
or CPU cluster management. Use the total number of CPUs instead so
that multithreaded decoding is properly optimized.
Change-Id: I1cbf000a1bda7b3abf0a84e971e752f176857385
Steve Kondik [Fri, 12 Dec 2014 21:00:03 +0000 (13:00 -0800)]
Update Android build for FFMPEG 2.5
Change-Id: I4500c0f580a3f2f8b3cc9101400f68ef7db34e61
Chih-Wei Huang [Sat, 2 Nov 2013 16:08:04 +0000 (00:08 +0800)]
Android porting for ffmpeg 2.1 release
Add Android.mk to build ffmpeg libraries with AOSP tree.
Based on the nice work of Chia-I Wu (olv):
git://gitorious.org/~olvaffe/ffmpeg/ffmpeg-android
Tested built OK on Android 4.3 for x86, mips, armv7-a and armv7-a-neon.
Change-Id: Id97768f8716f7933078fa0b6c936bd2ae20c090a
wm4 [Tue, 23 May 2017 11:36:38 +0000 (13:36 +0200)]
lavf: consider codec framerate for framerate detection
Fixes detection of some TV sample as 24.5 FPS. With the patch applied,
it's detected as 25 FPS.
This is enabled for mpegts only.
Tyler Jones [Tue, 6 Jun 2017 14:06:38 +0000 (08:06 -0600)]
vorbisenc: Fix memory leak on errors
Switches temporary samples for processing to be stored in the encoder's
context, avoids memory leaks if any errors occur while encoding a frame.
Fixes CID1412026
Signed-off-by: Tyler Jones <tdjones879@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Kevin Mark [Tue, 6 Jun 2017 04:43:13 +0000 (00:43 -0400)]
libavutil/eval: Add round function to expression parser
We have floor, ceil, and trunc. Let's add round.
Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 00:25:46 +0000 (02:25 +0200)]
avformat/utils: Slightly un-clutter code in determinable_frame_size() by using a switch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Vittorio Giovara [Mon, 5 Jun 2017 20:05:11 +0000 (16:05 -0400)]
vf_colorspace: Add support for gbr color space
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Michael Niedermayer [Tue, 6 Jun 2017 14:28:57 +0000 (16:28 +0200)]
avcodec/mpeg4videodec: Fix runtime error: signed integer overflow: 53098 * 40448 cannot be represented in type 'int'
Fixes: 2106/clusterfuzz-testcase-minimized-
6136503639998464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 6 Jun 2017 14:21:37 +0000 (16:21 +0200)]
avcodec/pafvideo: Fix assertion failure
Fixes: 2100/clusterfuzz-testcase-minimized-
4522961547558912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Tue, 6 Jun 2017 14:01:16 +0000 (16:01 +0200)]
avcodec/takdec: Fix multiple runtime error: signed integer overflow: 637072 * 4096 cannot be represented in type 'int'
Fixes: 2079/clusterfuzz-testcase-minimized-
5345861779324928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ilia Valiakhmetov [Sun, 4 Jun 2017 17:52:27 +0000 (00:52 +0700)]
libavcodec/vp9: ipred_dl_32x32_16 avx2 implementation
vp9_diag_downleft_32x32_8bpp_c: 580.2
vp9_diag_downleft_32x32_8bpp_sse2: 75.6
vp9_diag_downleft_32x32_8bpp_ssse3: 73.7
vp9_diag_downleft_32x32_8bpp_avx: 72.7
vp9_diag_downleft_32x32_10bpp_c: 1101.2
vp9_diag_downleft_32x32_10bpp_sse2: 145.4
vp9_diag_downleft_32x32_10bpp_ssse3: 137.5
vp9_diag_downleft_32x32_10bpp_avx: 134.8
vp9_diag_downleft_32x32_10bpp_avx2: 94.0
vp9_diag_downleft_32x32_12bpp_c: 1108.5
vp9_diag_downleft_32x32_12bpp_sse2: 145.5
vp9_diag_downleft_32x32_12bpp_ssse3: 137.3
vp9_diag_downleft_32x32_12bpp_avx: 135.2
vp9_diag_downleft_32x32_12bpp_avx2: 94.0
~30% faster than avx implementation
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Stefano Sabatini [Tue, 23 May 2017 10:22:41 +0000 (12:22 +0200)]
lavc/mpegvideo_enc: allow low_delay for non MPEG2 codecs depending on strict_std_compliance
Forcing low_delay can be useful, even if not officially supported.
James Almer [Mon, 5 Jun 2017 23:21:24 +0000 (20:21 -0300)]
fate: add fate-adts-id3v1-demux
This test the demuxer discarding non ADTS frames at the beginning and
end of the input.
As a side effect, this commit also enables fate-adts-demux, which was
accidentally disabled in
324f0fbff1245f9e9e1dda29ecb03138a2de287d.
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Michael Niedermayer [Mon, 5 Jun 2017 20:23:15 +0000 (22:23 +0200)]
avcodec/mjpegdec: Check that reference frame matches the current frame
Fixes: out of array read
Fixes: 2097/clusterfuzz-testcase-minimized-
5036861833609216
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 5 Jun 2017 18:39:21 +0000 (20:39 +0200)]
avcodec/tiff: Avoid loosing allocated geotag values
Fixes memleak
Fixes: 2076/clusterfuzz-testcase-minimized-
6542640243802112
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 5 Jun 2017 17:33:56 +0000 (19:33 +0200)]
avcodec/cavs: Fix runtime error: signed integer overflow: -
12648062 * 256 cannot be represented in type 'int'
Fixes: 2067/clusterfuzz-testcase-minimized-
5578430902960128
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Vittorio Giovara [Thu, 1 Jun 2017 19:18:37 +0000 (15:18 -0400)]
ffprobe: Use pixdesc API to provide color space names
This API is more up-to-date, provides names compatible with filters
and external encoders, and is consistent with the other color
property variables.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Rostislav Pehlivanov [Mon, 5 Jun 2017 15:51:08 +0000 (16:51 +0100)]
vorbisenc: signal samples to skip
The encoder never actually signalled how many samples to skip.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Tyler Jones [Tue, 30 May 2017 17:28:16 +0000 (11:28 -0600)]
avcodec/vorbisenc: Use a bufqueue in encoding with smaller lengths
Switching the vorbis encoder to use a buffer queue for input frames allows
saving lookahead samples more easily and safely for psychoacoustic systems,
requiring less pointer arithmetic in the case of transient windows.
Tyler Jones [Tue, 30 May 2017 17:28:04 +0000 (11:28 -0600)]
avcodec/vorbisenc: Include bufqueue and afqueue
Tyler Jones [Tue, 30 May 2017 15:14:36 +0000 (09:14 -0600)]
avcodec/vorbisenc: Use fdsp for applying windows
Using fdsp improves readability and allows using architecture-specific
optimizations.
Signed-off-by: Tyler Jones <tdjones879@gmail.com>
Tyler Jones [Tue, 30 May 2017 15:14:17 +0000 (09:14 -0600)]
avcodec/vorbisenc: Include fdsp
Signed-off-by: Tyler Jones <tdjones879@gmail.com>
Michael Niedermayer [Sat, 3 Jun 2017 19:20:04 +0000 (21:20 +0200)]
avformat/hls: Check local file extensions
This reduces the attack surface of local file-system
information leaking.
It prevents the existing exploit leading to an information leak. As
well as similar hypothetical attacks.
Leaks of information from files and symlinks ending in common multimedia extensions
are still possible. But files with sensitive information like private keys and passwords
generally do not use common multimedia filename extensions.
It does not stop leaks via remote addresses in the LAN.
The existing exploit depends on a specific decoder as well.
It does appear though that the exploit should be possible with any decoder.
The problem is that as long as sensitive information gets into the decoder,
the output of the decoder becomes sensitive as well.
The only obvious solution is to prevent access to sensitive information. Or to
disable hls or possibly some of its feature. More complex solutions like
checking the path to limit access to only subdirectories of the hls path may
work as an alternative. But such solutions are fragile and tricky to implement
portably and would not stop every possible attack nor would they work with all
valid hls files.
Developers have expressed their dislike / objected to disabling hls by default as well
as disabling hls with local files. There also where objections against restricting
remote url file extensions. This here is a less robust but also lower
inconvenience solution.
It can be applied stand alone or together with other solutions.
limiting the check to local files was suggested by nevcairiel
This recommits the security fix without the author name joke which was
originally requested by Nicolas.
Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Mon, 5 Jun 2017 11:24:36 +0000 (13:24 +0200)]
Revert "avformat/hls: Check local file extensions"
Requested-by: Paul B Mahol <onemda@gmail.com>
This reverts commit
caf7d6178a4d5f24c915da48410a9790b21703aa.
Rostislav Pehlivanov [Sun, 4 Jun 2017 17:03:05 +0000 (18:03 +0100)]
fate: add test for the Dirac low delay profile
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
James Almer [Mon, 5 Jun 2017 02:29:56 +0000 (23:29 -0300)]
x86/aacpsdsp: optimize ff_ps_mul_pair_single_sse
~2% faster.
Sysiphus [Sat, 3 Jun 2017 19:20:04 +0000 (21:20 +0200)]
avformat/hls: Check local file extensions
This reduces the attack surface of local file-system
information leaking.
It prevents the existing exploit leading to an information leak. As
well as similar hypothetical attacks.
Leaks of information from files and symlinks ending in common multimedia extensions
are still possible. But files with sensitive information like private keys and passwords
generally do not use common multimedia filename extensions.
It does not stop leaks via remote addresses in the LAN.
The existing exploit depends on a specific decoder as well.
It does appear though that the exploit should be possible with any decoder.
The problem is that as long as sensitive information gets into the decoder,
the output of the decoder becomes sensitive as well.
The only obvious solution is to prevent access to sensitive information. Or to
disable hls or possibly some of its feature. More complex solutions like
checking the path to limit access to only subdirectories of the hls path may
work as an alternative. But such solutions are fragile and tricky to implement
portably and would not stop every possible attack nor would they work with all
valid hls files.
Developers have expressed their dislike / objected to disabling hls by default as well
as disabling hls with local files. There also where objections against restricting
remote url file extensions. This here is a less robust but also lower
inconvenience solution.
It can be applied stand alone or together with other solutions.
limiting the check to local files was suggested by nevcairiel
Found-by: Emil Lerner and Pavel Cheremushkin
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Kevin Mark [Sun, 4 Jun 2017 07:53:31 +0000 (03:53 -0400)]
FATE: Add test for libavfilter/scale2ref
This new FATE test for the scale2ref filter makes use of the recently
added scale2ref-specific variables to maintain the aspect ratio of a
test input.
Filtergraph explanation:
[main] has an AR of 4:3. [ref] has an AR of 16:9.
640 / 4 = 160. So the new width for [main] is 160.
160 / ((320 / 240) * (1 / 1)) = 160 / (4 / 3) = 120. So the new
height for [main] is 120.
160 / 120 = 4 / 3 so [main]'s aspect ratio has been maintained while
using [ref]'s width as a reference point.
[ref] is nullsink'd since it is left unchanged by scale2ref (and so
shouldn't need to be tested).
If we were to use "iw/4:-1" in place of "iw/4:ow/mdar":
640 / 4 = 160. So the new width for [main] would be 160.
360 / 4 = 90. So the new height for [main] would be 90.
160 / 90 = 16 / 9 so [main] now has the same aspect ratio as [ref]
which is probably what you do not want.
This is currently the only test for scale2ref.
Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 19:37:47 +0000 (21:37 +0200)]
avcodec/qdrw: Fix null pointer dereference
The RGB555 PACKBITSRGN case tries to read a palette, if such
palette is actually stored then it accesses a null pointer.
All 16bit samples i could find use DIRECTBITSRGN.
Fixes: 2065/clusterfuzz-testcase-minimized-
6298930457346048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 18:54:44 +0000 (20:54 +0200)]
avcodec/sbrdsp_fixed: Fix assertion failure in sbr_sum_square_c()
This also increases the range of input values supported as well as
decreasing the operation dependencies in the main loop, improving
speed on modern CPUs.
Fixes part of: 2045/clusterfuzz-testcase-minimized-
6751255865065472
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 18:45:09 +0000 (20:45 +0200)]
avutil/softfloat: Fix sign error in and improve documentation of av_int2sf()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Paul B Mahol [Sun, 4 Jun 2017 20:51:57 +0000 (22:51 +0200)]
avfilter/af_afftfilt: fix memory leaks
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Michael Niedermayer [Sun, 4 Jun 2017 15:14:13 +0000 (17:14 +0200)]
avcodec/wavpack: Fix runtime error: signed integer overflow:
2081021665 - -
130689706 cannot be represented in type 'int'
Fixes: 2038/clusterfuzz-testcase-minimized-
4521466148159488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 15:06:27 +0000 (17:06 +0200)]
avcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t [32]'
Fixes: 2010/clusterfuzz-testcase-minimized-
6209288450080768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 13:41:18 +0000 (15:41 +0200)]
avcodec/dxv: Check remaining bytes in dxv_decompress_raw()
Fixes: Timeout
Fixes: 2006/clusterfuzz-testcase-minimized-
5766515037044736
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Fri, 2 Jun 2017 23:34:24 +0000 (20:34 -0300)]
avformat/aacdec: add a custom read_packet function
Atempt to read and propagate only full ADTS frames and not other data,
like id3v1 or APETags at the end of the file.
Fixes ticket #6437.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
Paul B Mahol [Sat, 3 Jun 2017 20:44:08 +0000 (22:44 +0200)]
avfilter/af_surround: add support for some upmixing of 3.0, 2.1 and 5.1 channel layout
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Marton Balint [Fri, 2 Jun 2017 20:45:02 +0000 (22:45 +0200)]
avformat/utils: change bitrate to int64_t in av_find_best_stream
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
Marton Balint [Fri, 2 Jun 2017 19:52:13 +0000 (21:52 +0200)]
avformat/utils: return impaired streams in av_find_best_stream if only those exist
Fixes ticket #6397.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
Michael Niedermayer [Sun, 4 Jun 2017 11:38:02 +0000 (13:38 +0200)]
avcodec/pafvideo: Check packet size and frame code before ff_reget_buffer()
Fixes 1745/clusterfuzz-testcase-minimized-
6160693365571584
Fixes: Timeout
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sun, 4 Jun 2017 11:02:51 +0000 (13:02 +0200)]
avcodec/ac3dec_fixed: Fix runtime error: left shift of 419 by 23 places cannot be represented in type 'int'
Fixes: 1352/clusterfuzz-testcase-minimized-
5757565017260032
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 3 Jun 2017 22:25:09 +0000 (00:25 +0200)]
avcodec/tiff: Clear deinvert_buf_size on deallocation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 3 Jun 2017 21:57:58 +0000 (23:57 +0200)]
avcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()
Fixes: Timeout
Fixes: 1213/clusterfuzz-testcase-minimized-
6022987469815808
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Sat, 20 May 2017 21:01:04 +0000 (23:01 +0200)]
avcodec/mlpdec: Check quant_step_size against huff_lsbs
This reorders the operations so as to avoid computations with the above arguments
before they have been initialized.
Fixes part of 1708/clusterfuzz-testcase-minimized-
5035111957397504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Fri, 2 Jun 2017 12:47:16 +0000 (14:47 +0200)]
avformat/options: log filename on open
The loglevel is choosen so that the main filename and any images of
multi image sequences are shown only at debug level to avoid
clutter.
This makes exploits in playlists more visible. As they would show
accesses to private/sensitive files
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Kevin Mark [Sat, 3 Jun 2017 09:04:19 +0000 (05:04 -0400)]
libavfilter/scale2ref: Fix out-of-bounds array access
ff_scale_eval_dimensions blindly assumes that two inputs are always
available as of
3385989b98be7940044e4f0a6b431a0a00abf2fa. This is
notably not the case when the function is called for the scale
filter. With the scale filter inputs[1] does not exist.
ff_scale_eval_dimensions now has an updated scale2ref check that
makes certain two inputs are actually available before attempting to
access the second one.
Thanks to James Almer for reporting this bug. This should fix the 820
Valgrind tests I single-handedly managed to break.
Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
James Almer [Fri, 2 Jun 2017 22:17:28 +0000 (19:17 -0300)]
x86/aacpsdsp: optimize ff_ps_stereo_interpolate_sse3
Move the unpacking outside of the loop. 5% to 10% faster.
Suggested-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
James Almer [Fri, 2 Jun 2017 02:42:05 +0000 (23:42 -0300)]
avformat/matroskaenc: also write chapters when output is WebM
WebM supports a subset of elements from the Chapters master.
See https://www.webmproject.org/docs/container/#chapters
Addresses ticket #6425
Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Michael Niedermayer [Fri, 2 Jun 2017 20:31:02 +0000 (22:31 +0200)]
avcodec/aacps: Fix runtime error: left shift of
1073741824 by 1 places cannot be represented in type 'INTFLOAT' (aka 'int')
Fixes: 2005/clusterfuzz-testcase-minimized-
5744226438479872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Michael Niedermayer [Fri, 2 Jun 2017 16:13:20 +0000 (18:13 +0200)]
avcodec/snowdec: Fix runtime error: signed integer overflow: 1404 *
8388608 cannot be represented in type 'int'
Fixes: 2004/clusterfuzz-testcase-minimized-
5533262866808832
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Shivraj Patil [Thu, 1 Jun 2017 08:37:19 +0000 (14:07 +0530)]
Disable MSA optimization for big endian arch
The current upstreamed code has been written and tested for Little Endian systems.
We do have plans to add the Big Endian support in near future, but till that time, need to disable all to avoid its usage and failures.
Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Ganapathy Kasi [Wed, 31 May 2017 02:03:14 +0000 (19:03 -0700)]
avcodec/nvenc: fix hw accelerated transcode with bframes
hw accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was
broken after the filtergraph initialization was changed to intialize decoder
first followed by encoder (commit
af1761f7b5b1b72197dc40934953b775c2d951cc).
During initialzing encoder with bframes, local buffers are allocated
internally in encoder which fails since no cuda context is available. Now
pushing the correct cuda context before encoder initialization fixes the issue.
Also adding push/pop cuda ctx during create/destroy/map/unmap resources and
destroy encoder session.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
James Almer [Tue, 23 May 2017 18:19:39 +0000 (15:19 -0300)]
x86/aacps: add ff_ps_stereo_interpolate_ipdopd_sse3()
About 2x faster than the c version.
Signed-off-by: James Almer <jamrial@gmail.com>
Kevin Mark [Tue, 30 May 2017 17:34:29 +0000 (13:34 -0400)]
libavfilter/scale2ref: Add constants for the primary input
Variables pertaining to the main video are now available when
using the scale2ref filter. This allows, as an example, scaling a
video with another as a reference point while maintaining the
original aspect ratio of the primary/non-reference video.
Consider the following graph: scale2ref=iw/6:-1 [main][ref]
This will scale [main] to 1/6 the width of [ref] while maintaining
the aspect ratio. This works well when the AR of [ref] is equal to
the AR of [main] only. What the above filter really does is
maintain the AR of [ref] when scaling [main]. So in all non-same-AR
situations [main] will appear stretched or compressed to conform to
the same AR of the reference video. Without doing this calculation
externally there is no way to scale in reference to another input
while maintaining AR in libavfilter.
To make this possible, we introduce eight new constants to be used
in the w and h expressions only in the scale2ref filter:
* main_w/main_h: width/height of the main input video
* main_a: aspect ratio of the main input video
* main_sar: sample aspect ratio of the main input video
* main_dar: display aspect ratio of the main input video
* main_hsub/main_vsub: horiz/vert chroma subsample vals of main
* mdar: a shorthand alias of main_dar
Of course, not all of these constants are needed for maintaining the
AR, but adding additional constants in line of what is available for
in/out allows for other scaling possibilities I have not imagined.
So to now scale a video to 1/6 the size of another video using the
width and maintaining its own aspect ratio you can do this:
scale2ref=iw/6:ow/mdar [main][ref]
This is ideal for picture-in-picture configurations where you could
have a square or 4:3 video overlaid on a corner of a larger 16:9
feed all while keeping the scaled video in the corner at its correct
aspect ratio and always the same size relative to the larger video.
I've tried to re-use as much code as possible. I could not find a way
to avoid duplication of the var_names array. It must now be kept in
sync with the other (the normal one and the scale2ref one) for
everything to work which does not seem ideal. For every new variable
introduced/removed into/from the normal scale filter one must be
added/removed to/from the scale2ref version. Suggestions on how to
avoid var_names duplication are welcome.
var_values has been increased to always be large enough for the
additional scale2ref variables. I do not forsee this being a problem
as the names variable will always be the correct size. From my
understanding of av_expr_parse_and_eval it will stop processing
variables when it runs out of names even though there may be
additional (potentially uninitialized) entries in the values array.
The ideal solution here would be using a variable-length array but
that is unsupported in C90.
This patch does not remove any functionality and is strictly a
feature patch. There are no API changes. Behavior does not change for
any previously valid inputs.
The applicable documentation has also been updated.
Signed-off-by: Kevin Mark <kmark937@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>