]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agoavfilter/avf_showspectrum: add posibility to display phase
Paul B Mahol [Sun, 10 Jan 2016 13:20:59 +0000 (14:20 +0100)]
avfilter/avf_showspectrum: add posibility to display phase

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agolavf/mpjpegdec: Do not call av_log() while probing.
Carl Eugen Hoyos [Tue, 12 Jan 2016 19:35:03 +0000 (20:35 +0100)]
lavf/mpjpegdec: Do not call av_log() while probing.

8 years agoavformat/asfenc: Check pts
Michael Niedermayer [Tue, 12 Jan 2016 17:49:20 +0000 (18:49 +0100)]
avformat/asfenc: Check pts

Fixes integer overflow
Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/asfenc: Flush packet before duration becomes unrepresentable
Michael Niedermayer [Tue, 12 Jan 2016 17:26:34 +0000 (18:26 +0100)]
avformat/asfenc: Flush packet before duration becomes unrepresentable

Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/truemotion2: Cleanup in case of tm2_read_stream() failure
Michael Niedermayer [Tue, 12 Jan 2016 14:56:29 +0000 (15:56 +0100)]
avcodec/truemotion2: Cleanup in case of tm2_read_stream() failure

Fixes memleaks
Fixes: 245dae71bc28fe8f3f454300277e575a/signal_sigabrt_7ffff6ae7cb7_5062_f7d9dfa385454806586076f9db48c0bf.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavc/mjpeg2jpeg: Check for jpeg file header.
Carl Eugen Hoyos [Tue, 12 Jan 2016 15:13:27 +0000 (16:13 +0100)]
lavc/mjpeg2jpeg: Check for jpeg file header.

8 years agolavf/matroskadec: Use av_realloc() in get_qt_codec()
Mats Peterson [Mon, 11 Jan 2016 06:43:29 +0000 (07:43 +0100)]
lavf/matroskadec: Use av_realloc() in get_qt_codec()

Use av_realloc() rather than av_malloc() when normalizing noncompliant
private data in get_qt_codec().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoCorrect two build/built typos
Timothy Gu [Tue, 12 Jan 2016 04:51:03 +0000 (20:51 -0800)]
Correct two build/built typos

Found-by: Leo Izen <leo.izen@gmail.com> as thebombzen on IRC
Signed-off-by: Timothy Gu <timothygu99@gmail.com>
8 years agoavcodec/mpeg4video: Check time_incr
Michael Niedermayer [Tue, 12 Jan 2016 02:03:01 +0000 (03:03 +0100)]
avcodec/mpeg4video: Check time_incr

Fixes assertion failure
Fixes out of memory access

Fixes: test_casex.ivf
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agortmpdh: Initialize gcrypt before using it
Ricardo Constantino [Tue, 29 Dec 2015 21:40:14 +0000 (21:40 +0000)]
rtmpdh: Initialize gcrypt before using it

Either disabling or init'ing secure memory is required after the use
of gcry_check_version. From a look at the functions rtmpdh uses, I
noticed none require the use of secure memory, so we disable it [1][2].

This resolves some errors returned by rtmpdh code with uninitialized
gcrypt, especifically:
Fatal: failed to create the RNG lock: Invalid argument
FATAL: failed to acquire the FSM lock in libgrypt: Invalid argument

Version "1.5.4" was arbitrarily chosen. An older version probably works
as well, but I couldn't compile older versions to test on my machine.

[1]
https://gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html
[2]
https://www.gnupg.org/documentation/manuals/gcrypt/Controlling-the-library.html

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agodiracdec: fix idwt_stride calculation in bytes
Andreas Cadhalpun [Mon, 11 Jan 2016 22:19:40 +0000 (23:19 +0100)]
diracdec: fix idwt_stride calculation in bytes

The transformation to bytes must happen after alignment to get the same
resulting pointers as before.

This fixes segmentation faults in the assembler code.

The regression was introduced in commit 9553689.

Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agolavc/cbrt_tablegen: speed up tablegen
Ganesh Ajjanagadde [Mon, 11 Jan 2016 22:09:44 +0000 (17:09 -0500)]
lavc/cbrt_tablegen: speed up tablegen

This exploits an approach based on the sieve of Eratosthenes, a popular
method for generating prime numbers.

Tables are identical to previous ones.

Tested with FATE with/without --enable-hardcoded-tables.

Sample benchmark (Haswell, GNU/Linux+gcc):
prev:
7860100 decicycles in cbrt_tableinit,       1 runs,      0 skips
7777490 decicycles in cbrt_tableinit,       2 runs,      0 skips
[...]
7582339 decicycles in cbrt_tableinit,     256 runs,      0 skips
7563556 decicycles in cbrt_tableinit,     512 runs,      0 skips

new:
2099480 decicycles in cbrt_tableinit,       1 runs,      0 skips
2044470 decicycles in cbrt_tableinit,       2 runs,      0 skips
[...]
1796544 decicycles in cbrt_tableinit,     256 runs,      0 skips
1791631 decicycles in cbrt_tableinit,     512 runs,      0 skips

Both small and large run count given as this is called once so small run
count may give a better picture, small numbers are fairly consistent,
and there is a consistent downward trend from small to large runs,
at which point it stabilizes to a new value.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoffmdec: change type of len to ptrdiff_t
Andreas Cadhalpun [Sat, 2 Jan 2016 15:32:09 +0000 (16:32 +0100)]
ffmdec: change type of len to ptrdiff_t

It is used to store the difference between pointers, so ptrdiff_t is the
correct type.

This prevents potential overflows.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoqtpalette: make the color_* variables unsigned again
Andreas Cadhalpun [Sun, 10 Jan 2016 09:53:33 +0000 (10:53 +0100)]
qtpalette: make the color_* variables unsigned again

This fixes segmentation faults due to out of bounds writes, when
color_start is interpreted as negative number.

This regression was introduced in commit 57631f.

Reviewed-by: Mats Peterson <matsp888@yahoo.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoavcodec/wavpackenc: Check the number of channels
Michael Niedermayer [Mon, 11 Jan 2016 17:58:08 +0000 (18:58 +0100)]
avcodec/wavpackenc: Check the number of channels

They are stored in a byte, thus more than 255 is not possible

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/wavpackenc: Headers are per channel
Michael Niedermayer [Mon, 11 Jan 2016 17:32:32 +0000 (18:32 +0100)]
avcodec/wavpackenc: Headers are per channel

Fixes: 1b8b83a53bfa751f01b1daa65a4758db/signal_sigabrt_7ffff6ae7cb7_7488_403f71d1a2565b598d01b6cb110fac8f.aiff
Fixes: assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/dfa: Fix packet leak on error
Michael Niedermayer [Mon, 11 Jan 2016 16:08:07 +0000 (17:08 +0100)]
avformat/dfa: Fix packet leak on error

Fixes: 07fa81f300736485e585b63e7b1cd155/signal_sigabrt_7ffff6ae7cb7_16_94ee815791a1357826524072db5bc2dc.dfa
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf/matroskadec: Normalize noncompliant A_QUICKTIME/V_QUICKTIME private data
Mats Peterson [Sun, 10 Jan 2016 02:59:21 +0000 (03:59 +0100)]
lavf/matroskadec: Normalize noncompliant A_QUICKTIME/V_QUICKTIME private data

This patch adds a new static function get_qt_codec() that takes care of
the initial retrieval of the fourcc and codec ID for A_QUICKTIME and
V_QUICKTIME. It also normalizes noncompliant private data found in some
older files that incorrectly starts with the fourcc by expanding/shifting
the data by 4 bytes, and storing the data size at the start. This is
necessary in order for the rest of the code in the A_QUICKTIME and
V_QUICKTIME blocks (and most likely other code as well) to correctly
parse the private data.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/ac3enc: Remove duplicate #include
Michael Niedermayer [Sun, 10 Jan 2016 21:12:36 +0000 (22:12 +0100)]
avcodec/ac3enc: Remove duplicate #include

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/aacdec_template: Check id_map
Michael Niedermayer [Sun, 10 Jan 2016 18:29:39 +0000 (19:29 +0100)]
avcodec/aacdec_template: Check id_map

Fixes index out of bounds error
Fixes: aac_index_out_of_bounds.wmv
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/dvdec: Fix "left shift of negative value -254"
Michael Niedermayer [Sun, 10 Jan 2016 16:43:56 +0000 (17:43 +0100)]
avcodec/dvdec: Fix "left shift of negative value -254"

Fixes: dvdec_left_shift.avi
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/g2meet: Check for ff_els_decode_bit() failure in epic_decode_run_length()
Michael Niedermayer [Sun, 10 Jan 2016 15:59:42 +0000 (16:59 +0100)]
avcodec/g2meet: Check for ff_els_decode_bit() failure in epic_decode_run_length()

Fixes invalid shift
Fixes: g2m_left_shift_2.wmv
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agofate: fix sub-cc font
Clément Bœsch [Sun, 10 Jan 2016 15:31:30 +0000 (16:31 +0100)]
fate: fix sub-cc font

8 years agolavc/ccaption_dec: improve default style
Clément Bœsch [Sun, 10 Jan 2016 15:19:50 +0000 (16:19 +0100)]
lavc/ccaption_dec: improve default style

Use monospaced font, and a black box outline.

8 years agoavcodec/mjpegdec: Fix negative shift
Michael Niedermayer [Sun, 10 Jan 2016 14:52:09 +0000 (15:52 +0100)]
avcodec/mjpegdec: Fix negative shift

Fixes: mjpeg_left_shift.avi
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavc/x264: Add compatibility values for coder options.
Carl Eugen Hoyos [Sun, 10 Jan 2016 13:25:56 +0000 (14:25 +0100)]
lavc/x264: Add compatibility values for coder options.

Fixes ticket #5142.

8 years agolavf/concatdec: do not access packet if av_read_frame returned error
Marton Balint [Sat, 28 Nov 2015 12:05:30 +0000 (13:05 +0100)]
lavf/concatdec: do not access packet if av_read_frame returned error

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
8 years agolavc/ccaption_dec: fix ASS tags
Clément Bœsch [Sun, 10 Jan 2016 13:01:14 +0000 (14:01 +0100)]
lavc/ccaption_dec: fix ASS tags

8 years agoavcodec/mss2: Check for repeat overflow
Michael Niedermayer [Sun, 10 Jan 2016 11:19:48 +0000 (12:19 +0100)]
avcodec/mss2: Check for repeat overflow

Fixes: mss2_left_shift.wmv
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/codec_desc: Add ff_aac_profiles to aac_latm
Michael Niedermayer [Fri, 1 Jan 2016 17:14:24 +0000 (18:14 +0100)]
avcodec/codec_desc: Add ff_aac_profiles to aac_latm

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavf_showspectrum: Silence "deprecated pixel format" warning
Timothy Gu [Sat, 9 Jan 2016 18:45:48 +0000 (10:45 -0800)]
avf_showspectrum: Silence "deprecated pixel format" warning

8 years agoavfilter/avf_showspectrum: set color range to frame
Paul B Mahol [Sat, 9 Jan 2016 19:09:52 +0000 (20:09 +0100)]
avfilter/avf_showspectrum: set color range to frame

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agolibvpx: Support setting color range for vp9.
Sasi Inguva [Sat, 9 Jan 2016 15:48:49 +0000 (12:48 -0300)]
libvpx: Support setting color range for vp9.

Pass through color range to vp9 encoder. Parse color range in libvpxdec.c.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agoavformat: Add integer fps from 31 to 60 to get_std_framerate()
Michael Niedermayer [Sat, 9 Jan 2016 09:49:23 +0000 (10:49 +0100)]
avformat: Add integer fps from 31 to 60 to get_std_framerate()

Fixes Ticket 5106

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agodoc/encoders: fix typo in AAC encoder documentation
Rostislav Pehlivanov [Sat, 9 Jan 2016 13:20:42 +0000 (13:20 +0000)]
doc/encoders: fix typo in AAC encoder documentation

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
8 years agolavc/ccaption_dec: simplify rollup cases
Clément Bœsch [Sat, 9 Jan 2016 11:44:10 +0000 (12:44 +0100)]
lavc/ccaption_dec: simplify rollup cases

8 years agolavc/ccaption_dec: check for bprint completeness outside the loop
Clément Bœsch [Sat, 9 Jan 2016 11:40:28 +0000 (12:40 +0100)]
lavc/ccaption_dec: check for bprint completeness outside the loop

8 years agolavc/ccaption_dec: mark row and font as const in capture_screen()
Clément Bœsch [Sat, 9 Jan 2016 11:38:36 +0000 (12:38 +0100)]
lavc/ccaption_dec: mark row and font as const in capture_screen()

8 years agolavc/ccaption_dec: fix mixed declarations and code warning
Clément Bœsch [Sat, 9 Jan 2016 11:37:30 +0000 (12:37 +0100)]
lavc/ccaption_dec: fix mixed declarations and code warning

8 years agolavc/ccaption_dec: check for bprint completeness only at the end
Clément Bœsch [Sat, 9 Jan 2016 11:37:11 +0000 (12:37 +0100)]
lavc/ccaption_dec: check for bprint completeness only at the end

8 years agolavc/ccaption_dec: implement font styles
Aman Gupta [Sat, 9 Jan 2016 03:52:09 +0000 (19:52 -0800)]
lavc/ccaption_dec: implement font styles

8 years agolavc/ccaption_dec: simplify by incrementing cursor_column inside write_char()
Aman Gupta [Sat, 9 Jan 2016 03:24:44 +0000 (19:24 -0800)]
lavc/ccaption_dec: simplify by incrementing cursor_column inside write_char()

8 years agolavc/ccaption_dec: simplify by passing screen into write_char()
Aman Gupta [Sat, 9 Jan 2016 03:21:16 +0000 (19:21 -0800)]
lavc/ccaption_dec: simplify by passing screen into write_char()

8 years agolavc/ccaption_dec: extract capture_screen() for future use
Aman Gupta [Sat, 9 Jan 2016 01:56:09 +0000 (17:56 -0800)]
lavc/ccaption_dec: extract capture_screen() for future use

unlike reap_screen(), capture_screen() can be used to populate buffer
without touching the timestamps. this is useful for upcoming commits
which implement a real time caption stream.

8 years agolavc/ccaption_dec: clear buffer before populating with screen contents
Aman Gupta [Sat, 9 Jan 2016 01:54:29 +0000 (17:54 -0800)]
lavc/ccaption_dec: clear buffer before populating with screen contents

8 years agolavc/ccaption_dec: centralize buffer_changed=1 into reap_screen
Aman Gupta [Sat, 9 Jan 2016 01:53:20 +0000 (17:53 -0800)]
lavc/ccaption_dec: centralize buffer_changed=1 into reap_screen

8 years agolavc/ccaption_dec: rename screen_changed to buffer_changed
Aman Gupta [Sat, 9 Jan 2016 01:51:32 +0000 (17:51 -0800)]
lavc/ccaption_dec: rename screen_changed to buffer_changed

8 years agolavc/ccaption_dec: extract ass time base into constant
Aman Gupta [Wed, 6 Jan 2016 06:55:18 +0000 (22:55 -0800)]
lavc/ccaption_dec: extract ass time base into constant

8 years agolavc/ccaption_dec: combine ROLLUP modes as they are identical
Aman Gupta [Wed, 6 Jan 2016 05:41:03 +0000 (21:41 -0800)]
lavc/ccaption_dec: combine ROLLUP modes as they are identical

8 years agoRevert "lavc/ccaption_dec: reap_screen() is responsible for clearing output buffer...
Aman Gupta [Sat, 9 Jan 2016 01:40:22 +0000 (17:40 -0800)]
Revert "lavc/ccaption_dec: reap_screen() is responsible for clearing output buffer and signaling screen_changed"

This reverts commit 53ee84f811c3a3e55c688116d41310e76d285d9e.

8 years agoRevert "lavc/ccaption_dec: implement "erase non displayed memory""
Aman Gupta [Sat, 9 Jan 2016 01:40:11 +0000 (17:40 -0800)]
Revert "lavc/ccaption_dec: implement "erase non displayed memory""

This reverts commit 26abdd61a39735c7907297e9b5c8bfe5255be555.

8 years agoRevert "lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer"
Aman Gupta [Sat, 9 Jan 2016 01:40:04 +0000 (17:40 -0800)]
Revert "lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer"

This reverts commit fe225b113b0553cdcf1a1d2fbdbe37c467d7951b.

8 years agolavc/libvpxenc: Improve documentation for option cpu-used.
Carl Eugen Hoyos [Sat, 9 Jan 2016 09:53:22 +0000 (10:53 +0100)]
lavc/libvpxenc: Improve documentation for option cpu-used.

Fixes ticket #5140.
Reviewed-by: James Zern
8 years agoavformat/movenc: Check that pkt duration is within 32bit range
Michael Niedermayer [Sat, 9 Jan 2016 02:36:19 +0000 (03:36 +0100)]
avformat/movenc: Check that pkt duration is within 32bit range

Durations outside are not supported

Fixes Ticket5114
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoconfigure: Use libgcrypt-config's cflags
Ricardo Constantino [Fri, 8 Jan 2016 23:40:50 +0000 (23:40 +0000)]
configure: Use libgcrypt-config's cflags

Signed-off-by: James Almer <jamrial@gmail.com>
8 years agoavformat/ivfenc: fix division by zero
Michael Niedermayer [Fri, 8 Jan 2016 22:01:30 +0000 (23:01 +0100)]
avformat/ivfenc: fix division by zero

Fixes Ticket 5115

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer
Aman Gupta [Tue, 5 Jan 2016 23:06:02 +0000 (15:06 -0800)]
lavc/ccaption_dec: reap_screen is not necessary when clearing screen or buffer

8 years agoconfigure: Use libgcrypt-config if available
Ricardo Constantino [Tue, 29 Dec 2015 22:47:05 +0000 (22:47 +0000)]
configure: Use libgcrypt-config if available

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavc/ccaption_dec: implement "erase non displayed memory"
Aman Gupta [Tue, 5 Jan 2016 22:54:54 +0000 (14:54 -0800)]
lavc/ccaption_dec: implement "erase non displayed memory"

8 years agolavc/ccaption_dec: reap_screen() is responsible for clearing output buffer and signal...
Aman Gupta [Tue, 5 Jan 2016 22:53:29 +0000 (14:53 -0800)]
lavc/ccaption_dec: reap_screen() is responsible for clearing output buffer and signaling screen_changed

moves the screen_changed bit and the bprint_clear into reap_screen() so
the logic is centralized and callers do not need to touch the bit or the
buffer before calling reap_screen()

8 years agox86/float_dsp: zero extend offset from ff_scalarproduct_float_sse
James Almer [Fri, 8 Jan 2016 15:08:56 +0000 (12:08 -0300)]
x86/float_dsp: zero extend offset from ff_scalarproduct_float_sse

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agox86/float_dsp: zero extend len from ff_butterflies_float_sse implicitly
James Almer [Fri, 8 Jan 2016 15:08:42 +0000 (12:08 -0300)]
x86/float_dsp: zero extend len from ff_butterflies_float_sse implicitly

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agox86/float_dsp: remove len check from ff_butterflies_float_sse
James Almer [Fri, 8 Jan 2016 15:08:23 +0000 (12:08 -0300)]
x86/float_dsp: remove len check from ff_butterflies_float_sse

The function documentation explicitly mentions it needs to be a multiple of 4.

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agolavc/ccaption_dec: remove unused return value from internal functions
Aman Gupta [Tue, 5 Jan 2016 22:50:45 +0000 (14:50 -0800)]
lavc/ccaption_dec: remove unused return value from internal functions

8 years agolavc/ccaption_dec: clean up whitespace
Aman Gupta [Tue, 5 Jan 2016 23:18:09 +0000 (15:18 -0800)]
lavc/ccaption_dec: clean up whitespace

8 years agoavfilter/avf_showspectrum: add cool color map
Paul B Mahol [Fri, 8 Jan 2016 16:09:46 +0000 (17:09 +0100)]
avfilter/avf_showspectrum: add cool color map

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter/avf_showfreqs: fix possible null pointer dereference
Paul B Mahol [Fri, 8 Jan 2016 13:56:15 +0000 (14:56 +0100)]
avfilter/avf_showfreqs: fix possible null pointer dereference

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavformat/mov: Simplify format checking code
Michael Niedermayer [Fri, 8 Jan 2016 13:23:11 +0000 (14:23 +0100)]
avformat/mov: Simplify format checking code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf/matroskadec: A_QUICKTIME and fourcc 0x00000000
Mats Peterson [Fri, 8 Jan 2016 11:55:59 +0000 (12:55 +0100)]
lavf/matroskadec: A_QUICKTIME and fourcc 0x00000000

In many older QuickTime files, the audio format, or "fourcc", is
0x00000000. The QuickTime File Format Specification states the following
regarding this situation:

"This format descriptor should not be used, but may be found in some
files. Samples are assumed to be stored in either 'raw ' or 'twos'
format, depending on the sample size field in the sound description."

MPlayer handles this logic by itself, but FFmpeg/FFplay currently does
not.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf/mov: Audio and fourcc 0x00000000
Mats Peterson [Fri, 8 Jan 2016 11:59:13 +0000 (12:59 +0100)]
lavf/mov: Audio and fourcc 0x00000000

In many older QuickTime files, the audio format, or "fourcc", is
0x00000000. The QuickTime File Format Specification states the following
regarding this situation:

"This format descriptor should not be used, but may be found in some
files. Samples are assumed to be stored in either 'raw ' or 'twos'
format, depending on the sample size field in the sound description."

MPlayer handles this logic by itself, but FFmpeg/FFplay currently does
not.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agox86/vf_w3fdif: 32-bit compatibility for w3fdif_simple_high
Hendrik Leppkes [Thu, 7 Jan 2016 02:29:21 +0000 (03:29 +0100)]
x86/vf_w3fdif: 32-bit compatibility for w3fdif_simple_high

8 years agoavfilter/avf_showspectrum: add option to draw legend
Paul B Mahol [Sat, 2 Jan 2016 22:01:25 +0000 (23:01 +0100)]
avfilter/avf_showspectrum: add option to draw legend

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoffmpeg: check fclose return values
Ganesh Ajjanagadde [Thu, 7 Jan 2016 04:57:47 +0000 (20:57 -0800)]
ffmpeg: check fclose return values

In the spirit of commit a956840cbc. Simple method to reproduce:
pass -vstats_file /dev/full to ffmpeg.

All raw fclose usages in ffmpeg.c taken care of here.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))
Ganesh Ajjanagadde [Tue, 5 Jan 2016 02:37:16 +0000 (18:37 -0800)]
lavfi/avf_showspectrum: replace pow(x, 0.25) by sqrt(sqrt(x))

This is faster; precision assured as result is a float.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoconfigure: remove unused bulitin check
James Almer [Thu, 7 Jan 2016 23:11:00 +0000 (20:11 -0300)]
configure: remove unused bulitin check

Signed-off-by: James Almer <jamrial@gmail.com>
8 years agolavu: rename and move ff_parity to av_parity
James Almer [Thu, 7 Jan 2016 22:59:03 +0000 (19:59 -0300)]
lavu: rename and move ff_parity to av_parity

av_popcount is not defined in intmath.h.

Reviewed-by: ubitux
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agolavc/g729dec: use ff_parity()
Clément Bœsch [Sun, 3 Jan 2016 19:14:57 +0000 (20:14 +0100)]
lavc/g729dec: use ff_parity()

8 years agolavc/ccaption_dec: use ff_parity()
Clément Bœsch [Sun, 3 Jan 2016 17:31:54 +0000 (18:31 +0100)]
lavc/ccaption_dec: use ff_parity()

8 years agolavu: add ff_parity()
Clément Bœsch [Sun, 3 Jan 2016 19:14:37 +0000 (20:14 +0100)]
lavu: add ff_parity()

8 years agolavc/ccaption_dec: fix always true condition
Clément Bœsch [Tue, 5 Jan 2016 20:54:28 +0000 (21:54 +0100)]
lavc/ccaption_dec: fix always true condition

No idea why this wasn't ever detected by a static analyzer.

8 years agolavu/common: add an explanation to FF_CEIL_RSHIFT()
Clément Bœsch [Thu, 7 Jan 2016 21:34:04 +0000 (22:34 +0100)]
lavu/common: add an explanation to FF_CEIL_RSHIFT()

8 years agolavf/uncodedframecrcenc: use FF_CEIL_RSHIFT()
Clément Bœsch [Thu, 7 Jan 2016 21:28:08 +0000 (22:28 +0100)]
lavf/uncodedframecrcenc: use FF_CEIL_RSHIFT()

8 years agolavfi/deshake: use FF_CEIL_RSHIFT()
Clément Bœsch [Thu, 7 Jan 2016 21:27:54 +0000 (22:27 +0100)]
lavfi/deshake: use FF_CEIL_RSHIFT()

8 years agolavu/common: fix FF_CEIL_RSHIFT() range comment
Clément Bœsch [Thu, 7 Jan 2016 21:20:22 +0000 (22:20 +0100)]
lavu/common: fix FF_CEIL_RSHIFT() range comment

8 years agox86/intmath: add sse optimized av_clipf and av_clipd
James Almer [Thu, 7 Jan 2016 03:31:56 +0000 (00:31 -0300)]
x86/intmath: add sse optimized av_clipf and av_clipd

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years agoavfilter/formats: fix leak of formats on error
Paul B Mahol [Sat, 2 Jan 2016 20:05:40 +0000 (21:05 +0100)]
avfilter/formats: fix leak of formats on error

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoffmpeg: replace log2 by av_log2
Ganesh Ajjanagadde [Wed, 30 Dec 2015 03:35:56 +0000 (19:35 -0800)]
ffmpeg: replace log2 by av_log2

Slight change in output deemed irrelevant here.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavcodec/utils: Check bits_per_raw_sample on video encoder open
Michael Niedermayer [Wed, 6 Jan 2016 23:48:22 +0000 (00:48 +0100)]
avcodec/utils: Check bits_per_raw_sample on video encoder open

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/mpegvideo_enc: Clip bits_per_raw_sample within valid range
Michael Niedermayer [Wed, 6 Jan 2016 23:22:56 +0000 (00:22 +0100)]
avcodec/mpegvideo_enc: Clip bits_per_raw_sample within valid range

Fixes out of array read
Fixes: test_case-mdc.264 (b47be15a120979f5a1a945c938cbef33)
Found-by: Tyson Smith <twsmith@mozilla.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolibavcodec/ccaption_dec: rewrite packet handler as case statement; remove COR3 macro
Aman Gupta [Tue, 5 Jan 2016 03:28:03 +0000 (19:28 -0800)]
libavcodec/ccaption_dec: rewrite packet handler as case statement; remove COR3 macro

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolibavcodec/ccaption_dec: clean up and standardize white space
Aman Gupta [Tue, 5 Jan 2016 03:28:02 +0000 (19:28 -0800)]
libavcodec/ccaption_dec: clean up and standardize white space

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoconfigure: use warn() for mips unknown cpu warning
Michael Niedermayer [Wed, 6 Jan 2016 20:54:35 +0000 (21:54 +0100)]
configure: use warn() for mips unknown cpu warning

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agomips: display a warning message when using an unknown CPU
Vicente Olivert Riera [Wed, 6 Jan 2016 16:55:29 +0000 (16:55 +0000)]
mips: display a warning message when using an unknown CPU

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec: Remove libstagefright
Derek Buitenhuis [Sun, 3 Jan 2016 18:22:03 +0000 (13:22 -0500)]
avcodec: Remove libstagefright

It serves absolutely no purpose other than to confuse potentional
Android developers about how to use hardware acceleration properly
on the the platform. The stagefright "API" is not public, and the
MediaCodec API is the proper way to do this.

Furthermore, stagefright support in avcodec needs a series of
magic incantations and version-specific stuff, such that
using it actually provides downsides compared just using the actual
Android frameworks properly, in that it is a lot more work and confusion
to get it even running. It also leads to a lot of misinformation, like
these sorts of comments (in [1]) that are absolutely incorrect.

[1] http://stackoverflow.com/a/29362353/3115956

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
8 years agoavfilter/vf_pad: fix direct padding
Andrey Turkin [Wed, 6 Jan 2016 12:51:49 +0000 (13:51 +0100)]
avfilter/vf_pad: fix direct padding

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agolavf/matroskadec: correct codec_tag for "SMI" SVQ3 files
Mats Peterson [Wed, 6 Jan 2016 03:16:32 +0000 (04:16 +0100)]
lavf/matroskadec: correct codec_tag for "SMI" SVQ3 files

This corrects the codec_tag for some SVQ3 files

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavfi/af_compensationdelay: replace pow(x,0.5) by sqrt(x)
Ganesh Ajjanagadde [Tue, 5 Jan 2016 02:40:19 +0000 (18:40 -0800)]
lavfi/af_compensationdelay: replace pow(x,0.5) by sqrt(x)

sqrt is faster, and is sometimes more accurate depending on the libm.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoffmpeg: check return value of avio_closep for progress report
Ganesh Ajjanagadde [Tue, 5 Jan 2016 03:33:50 +0000 (19:33 -0800)]
ffmpeg: check return value of avio_closep for progress report

avio_closep is not guaranteed to succeed, and its return value can
contain information regarding failure of preceding writes and silent
loss of data (man 2 close, man fclose). Users should know when the
progress was not successfully logged, and so a diagnostic is printed
here.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavpacket: fix size check in packet_alloc
Andreas Cadhalpun [Tue, 5 Jan 2016 12:01:53 +0000 (13:01 +0100)]
avpacket: fix size check in packet_alloc

The previous check only caught sizes from -AV_INPUT_BUFFER_PADDING_SIZE
to -1.

This fixes ubsan runtime error: signed integer overflow: 2147483647 + 32
cannot be represented in type 'int'

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoparser: add av_assert1 to make sure the codec matches
Andreas Cadhalpun [Mon, 4 Jan 2016 22:52:20 +0000 (23:52 +0100)]
parser: add av_assert1 to make sure the codec matches

Otherwise this can have some surprising effects (crashes), so let's
better not allow it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>