]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agoffserver: allocate AVStream's internal too
Reynaldo H. Verdejo Pinochet [Mon, 14 Dec 2015 17:49:08 +0000 (09:49 -0800)]
ffserver: allocate AVStream's internal too

Avoids segfault at init_muxer() (mux.c) due to a
null pointer dereference on the recently
introduced AVStream->internal

Fixes: #5059 (https://trac.ffmpeg.org/ticket/5059)
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
8 years agomovenc: support cenc (common encryption)
erankor [Mon, 7 Dec 2015 10:01:09 +0000 (12:01 +0200)]
movenc: support cenc (common encryption)

support writing encrypted mp4 using aes-ctr, conforming to ISO/IEC
23001-7.

3 new parameters were added:
- encryption_scheme - allowed values are none (default) and cenc-aes-ctr
- encryption_key - 128 bit encryption key (hex)
- encryption_kid - 128 bit encryption key identifier (hex)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolibavutil: add aes-ctr support
erankor [Mon, 7 Dec 2015 09:58:41 +0000 (11:58 +0200)]
libavutil: add aes-ctr support

for supporting mp4 cenc encoding/decoding

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/vf_stereo3d: add direct (faster) path:
Paul B Mahol [Tue, 15 Dec 2015 10:11:41 +0000 (11:11 +0100)]
avfilter/vf_stereo3d: add direct (faster) path:

for above below and side by side to alternating format
for above below and side by side to mono format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoMerge commit 'e7078e842d93436edba1f30af1f9869d3913f7fe'
Hendrik Leppkes [Tue, 15 Dec 2015 09:46:21 +0000 (10:46 +0100)]
Merge commit 'e7078e842d93436edba1f30af1f9869d3913f7fe'

* commit 'e7078e842d93436edba1f30af1f9869d3913f7fe':
  hevcdsp: add x86 SIMD for MC

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '0cef06df073934ca08d0357fcbbbcf2bc9b2a0cd'
Hendrik Leppkes [Tue, 15 Dec 2015 09:45:06 +0000 (10:45 +0100)]
Merge commit '0cef06df073934ca08d0357fcbbbcf2bc9b2a0cd'

* commit '0cef06df073934ca08d0357fcbbbcf2bc9b2a0cd':
  checkasm: add HEVC MC tests

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit 'a853388d2fc5be848cca839a9fdf39a97c2d7b0e'
Hendrik Leppkes [Tue, 15 Dec 2015 09:43:54 +0000 (10:43 +0100)]
Merge commit 'a853388d2fc5be848cca839a9fdf39a97c2d7b0e'

* commit 'a853388d2fc5be848cca839a9fdf39a97c2d7b0e':
  hevc: change the stride of the MC buffer to be in bytes instead of elements

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '688417399c69aadd4c287bdb0dec82ef8799011c'
Hendrik Leppkes [Tue, 15 Dec 2015 09:43:06 +0000 (10:43 +0100)]
Merge commit '688417399c69aadd4c287bdb0dec82ef8799011c'

* commit '688417399c69aadd4c287bdb0dec82ef8799011c':
  hevcdsp: split the pred functions by width

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '818bfe7f0a3ff243deb63c4b146de2563f38ffd4'
Hendrik Leppkes [Tue, 15 Dec 2015 09:42:13 +0000 (10:42 +0100)]
Merge commit '818bfe7f0a3ff243deb63c4b146de2563f38ffd4'

* commit '818bfe7f0a3ff243deb63c4b146de2563f38ffd4':
  hevcdsp: split the epel functions by width

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agoMerge commit '1f821750f0b8d0c87cbf88a28ad699b92db5ec88'
Hendrik Leppkes [Tue, 15 Dec 2015 09:41:26 +0000 (10:41 +0100)]
Merge commit '1f821750f0b8d0c87cbf88a28ad699b92db5ec88'

* commit '1f821750f0b8d0c87cbf88a28ad699b92db5ec88':
  hevcdsp: split the qpel functions by width instead of by the subpixel fraction

Not merged, FFmpeg HEVC DSP has diverged substantially from Libav.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
8 years agolavc/utils: use AVPixFmtDescriptor to probe palette formats
Matthieu Bouron [Mon, 14 Dec 2015 16:49:48 +0000 (17:49 +0100)]
lavc/utils: use AVPixFmtDescriptor to probe palette formats

Also use the input frame format instead of the AVCodecContext one according
to the documentation of AVCodecContext.get_buffer2().

8 years agolavfi: use a video frame pool for each link of the filtergraph
Matthieu Bouron [Fri, 11 Dec 2015 12:32:47 +0000 (13:32 +0100)]
lavfi: use a video frame pool for each link of the filtergraph

8 years agoavfilter/af_sofalizer: check av_fft_init return code
Paul B Mahol [Tue, 15 Dec 2015 09:03:05 +0000 (10:03 +0100)]
avfilter/af_sofalizer: check av_fft_init return code

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoswscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment...
Michael Niedermayer [Tue, 15 Dec 2015 01:50:20 +0000 (02:50 +0100)]
swscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment is insufficient for SSE*

This also as a sideeffect fixes the non aligned case

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoswscale/x86/rgb2rgb_template: Do not crash on misaligend stride
Michael Niedermayer [Tue, 15 Dec 2015 01:06:04 +0000 (02:06 +0100)]
swscale/x86/rgb2rgb_template: Do not crash on misaligend stride

Fixes Ticket5013

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/vf_decimate: fix typo in fraction
Michael Niedermayer [Mon, 14 Dec 2015 21:59:38 +0000 (22:59 +0100)]
avfilter/vf_decimate: fix typo in fraction

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoconfigure: add conditional library dependency for sofalizer and showfreqs
Paul B Mahol [Mon, 14 Dec 2015 21:41:52 +0000 (22:41 +0100)]
configure: add conditional library dependency for sofalizer and showfreqs

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter/af_sofalizer: add frequency domain processing and use it by default
Paul B Mahol [Sun, 13 Dec 2015 22:05:09 +0000 (23:05 +0100)]
avfilter/af_sofalizer: add frequency domain processing and use it by default

Code ported from SOFAlizer patch for VLC.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter/vf_decimate: Check that input parameters match
Michael Niedermayer [Mon, 14 Dec 2015 20:18:39 +0000 (21:18 +0100)]
avfilter/vf_decimate: Check that input parameters match

Fixes Ticket4964

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agogolomb: always check for invalid UE golomb codes in get_ue_golomb
Andreas Cadhalpun [Sun, 13 Dec 2015 20:02:16 +0000 (21:02 +0100)]
golomb: always check for invalid UE golomb codes in get_ue_golomb

Also correct the check to reject log < 7, because UPDATE_CACHE only
guarantees 25 meaningful bits.

This fixes undefined behavior:
runtime error: shift exponent is negative

Testing with START/STOP timers in get_ue_golomb, one for the first
branch (A) and one for the second (B), shows that there is practically no
slowdown, e.g. for the cavs decoder:

With the check in the B branch:
    629 decicycles in get_ue_golomb B, 4194260 runs,     44 skips
    433 decicycles in get_ue_golomb A,268434102 runs,   1354 skips

Without the check:
    624 decicycles in get_ue_golomb B, 4194273 runs,     31 skips
    433 decicycles in get_ue_golomb A,268434203 runs,   1253 skips

Since the B branch is executed far less often than the A branch, this
change is negligible, even more so for the h264 decoder, where the ratio
B/A is a lot smaller.

Fixes: mozilla bug 1230239
Fixes: fbeb8b2c7c996e9b91c6b1af319d7ebc/asan_heap-oob_195450f_2743_e8856ece4579ea486670be2b236099a0.bit
Found-by: Tyson Smith
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoavfilter/vf_decimate: change ts_unit to AVRational
Michael Niedermayer [Mon, 14 Dec 2015 19:24:21 +0000 (20:24 +0100)]
avfilter/vf_decimate: change ts_unit to AVRational

This might help with rounding differences between platforms

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/vf_mpdecimate: Add missing emms_c()
Michael Niedermayer [Mon, 14 Dec 2015 17:56:13 +0000 (18:56 +0100)]
avfilter/vf_mpdecimate: Add missing emms_c()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoaacenc: switch to using the RNG from libavutil
Rostislav Pehlivanov [Mon, 14 Dec 2015 18:53:09 +0000 (18:53 +0000)]
aacenc: switch to using the RNG from libavutil

PSNR doesn't change as expected. The AAC spec doesn't really say
anything about how exactly to generate noise.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
8 years agoavfilter/vf_delogo: fix show option when clipping
Jean Delvare [Mon, 14 Dec 2015 10:23:05 +0000 (11:23 +0100)]
avfilter/vf_delogo: fix show option when clipping

The show option did not take clipping into account, so the borders on
the clipped side wouldn't show up. Fix it.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/nvenc: clamp initial qp value to [1, 51]
Agatha Hu [Mon, 14 Dec 2015 09:34:59 +0000 (10:34 +0100)]
avcodec/nvenc: clamp initial qp value to [1, 51]

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
8 years agoavcodec/nvenc: set slice number to 1 to improve encoding quality
Agatha Hu [Mon, 14 Dec 2015 09:27:36 +0000 (10:27 +0100)]
avcodec/nvenc: set slice number to 1 to improve encoding quality

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
8 years agoget_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL
Kieran Kunhya [Sun, 13 Dec 2015 18:01:50 +0000 (18:01 +0000)]
get_bits: Support max_depth > 2 in GET_RL_VLC_INTERNAL

8 years agofate: increase FUZZ by 1 for aac-tns-encode
Andreas Cadhalpun [Sun, 13 Dec 2015 21:11:00 +0000 (22:11 +0100)]
fate: increase FUZZ by 1 for aac-tns-encode

This should fix this test failing on kfreebsd, a regression since
6e5dbe7, which decreased the CMP_TARGET by 1.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoavfilter/af_sofalizer: switch comments positions to correct order
Paul B Mahol [Sun, 13 Dec 2015 17:49:29 +0000 (18:49 +0100)]
avfilter/af_sofalizer: switch comments positions to correct order

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agolavfi/ebur128: apply I dual mono correction only if I available
Clément Bœsch [Sun, 13 Dec 2015 17:20:42 +0000 (18:20 +0100)]
lavfi/ebur128: apply I dual mono correction only if I available

Spotted-by: jamrial & gcc 6
8 years agoavfilter/af_sofalizer: fix calculation of split point
Paul B Mahol [Sun, 13 Dec 2015 16:37:47 +0000 (17:37 +0100)]
avfilter/af_sofalizer: fix calculation of split point

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavformat/mxfenc: Do not crash if there is no packet in the first stream
Michael Niedermayer [Sun, 13 Dec 2015 15:13:22 +0000 (16:13 +0100)]
avformat/mxfenc: Do not crash if there is no packet in the first stream

Fixes: Ticket4914
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/af_sofalizer: remove reorder hack
Paul B Mahol [Sun, 13 Dec 2015 11:56:30 +0000 (12:56 +0100)]
avfilter/af_sofalizer: remove reorder hack

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter/af_sofalizer: move modulo operation out of loop
Paul B Mahol [Sun, 13 Dec 2015 10:52:23 +0000 (11:52 +0100)]
avfilter/af_sofalizer: move modulo operation out of loop

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agolavf/tee: fix side data double free.
Nicolas George [Sat, 10 Oct 2015 13:19:43 +0000 (15:19 +0200)]
lavf/tee: fix side data double free.

Similar to 33fefdb44.
Fix trac ticket #4921.

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/hlsenc: Check the return code of avformat_write_header()
Michael Niedermayer [Sun, 13 Dec 2015 01:28:13 +0000 (02:28 +0100)]
avformat/hlsenc: Check the return code of avformat_write_header()

Fixes: segfault
Fixes: Ticket5067
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/mov: Enable parser for mp3s by old HandBrake
Michael Niedermayer [Wed, 9 Dec 2015 20:45:07 +0000 (21:45 +0100)]
avformat/mov: Enable parser for mp3s by old HandBrake

Fixes Ticket5047

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/mxfenc: Fix integer overflow in length computation
Michael Niedermayer [Wed, 9 Dec 2015 17:13:25 +0000 (18:13 +0100)]
avformat/mxfenc: Fix integer overflow in length computation

Fixes: CID1341577
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/af_sofalizer: make it possible to configure speaker elevation
Paul B Mahol [Sun, 13 Dec 2015 00:11:26 +0000 (01:11 +0100)]
avfilter/af_sofalizer: make it possible to configure speaker elevation

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavformat/segment: Fix memory leak of cur_entry.filename
Lvqier [Tue, 8 Dec 2015 11:29:13 +0000 (19:29 +0800)]
avformat/segment: Fix memory leak of cur_entry.filename

Solution suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agodoc/general: add missing @tab for ADPCM VIMA
Paul B Mahol [Sat, 12 Dec 2015 20:56:57 +0000 (21:56 +0100)]
doc/general: add missing @tab for ADPCM VIMA

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter/af_sofalizer: display some info when loading sofa file
Paul B Mahol [Sat, 12 Dec 2015 20:31:18 +0000 (21:31 +0100)]
avfilter/af_sofalizer: display some info when loading sofa file

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agoavfilter: add SOFAlizer audio filter
Paul B Mahol [Wed, 9 Dec 2015 12:40:03 +0000 (13:40 +0100)]
avfilter: add SOFAlizer audio filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agomips: i6400 core does have an FPU, so not disable it
Vicente Olivert Riera [Thu, 3 Dec 2015 13:22:21 +0000 (13:22 +0000)]
mips: i6400 core does have an FPU, so not disable it

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agomips: add i6400 core optimizations
Vicente Olivert Riera [Thu, 3 Dec 2015 13:22:20 +0000 (13:22 +0000)]
mips: add i6400 core optimizations

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agomips: remove --mips64r6 configure option
Vicente Olivert Riera [Thu, 3 Dec 2015 13:22:19 +0000 (13:22 +0000)]
mips: remove --mips64r6 configure option

Having a configure option with the same name as a MIPS ISA is confusing,
so better to remove it. This option was being used to add some
optimizations to a specific core (i6400). We will add the optimizations
just when the i6400 core has been detected, in a later patch.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/aacsbr_template: Add Check to read_sbr_envelope()
Michael Niedermayer [Thu, 19 Nov 2015 13:06:57 +0000 (14:06 +0100)]
avcodec/aacsbr_template: Add Check to read_sbr_envelope()

The limit is a conservative guess, the spec does not seem to specify a limit

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavf/matroskadec: Set codec_tag also for audio codecs.
Carl Eugen Hoyos [Sat, 12 Dec 2015 17:21:45 +0000 (18:21 +0100)]
lavf/matroskadec: Set codec_tag also for audio codecs.

This was already done for "A_MS/ACM" mkv files and it is done
for mov files but was not done for A_QUICKTIME" mkv files.

8 years agoavfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components
Jean Delvare [Thu, 10 Dec 2015 14:25:57 +0000 (15:25 +0100)]
avfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components

Relying on AVPixFmtDescriptor.nb_components is cleaner and faster than
checking data and linesize for every possible plane.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavcodec/aarch64/neon.S: Update neon.s for transpose_4x4H
zjh8890 [Sat, 21 Nov 2015 16:07:35 +0000 (00:07 +0800)]
avcodec/aarch64/neon.S: Update neon.s for transpose_4x4H

The transpose_4x4H is wrong which cost me much time to find this bug. The orders of r2 and r3 are wrong,
this bug waste me much time while I make aarch64 arm instruction which used the function.

8 years agodoc: fix selectivecolor filter position
Clément Bœsch [Sat, 12 Dec 2015 13:00:10 +0000 (14:00 +0100)]
doc: fix selectivecolor filter position

8 years agoavcodec/aacsbr: Split the env_facs table
Michael Niedermayer [Thu, 19 Nov 2015 12:53:58 +0000 (13:53 +0100)]
avcodec/aacsbr: Split the env_facs table

This also removes a #ifdef and special case for the fixed point case

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavc: typo fix cliping -> clipping, saftey -> safety
Ganesh Ajjanagadde [Fri, 11 Dec 2015 20:13:49 +0000 (15:13 -0500)]
lavc: typo fix cliping -> clipping, saftey -> safety

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavformat/mpegtsenc: Add basic multi program support
Michael Niedermayer [Thu, 10 Dec 2015 20:02:29 +0000 (21:02 +0100)]
avformat/mpegtsenc: Add basic multi program support

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoffmpeg: Add basic support to mux multiple programs
Michael Niedermayer [Thu, 10 Dec 2015 20:01:19 +0000 (21:01 +0100)]
ffmpeg: Add basic support to mux multiple programs

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat: Add av_program_add_stream_index()
Michael Niedermayer [Thu, 10 Dec 2015 19:59:40 +0000 (20:59 +0100)]
avformat: Add av_program_add_stream_index()

This will be used by the subsequent commit(s)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agodoc/issue_tracker.txt: various updates
Lou Logan [Fri, 11 Dec 2015 20:33:29 +0000 (11:33 -0900)]
doc/issue_tracker.txt: various updates

Added missing components.
Fixed some nits.

Signed-off-by: Lou Logan <lou@lrcd.com>
8 years agolavc/mdct_template: use lrint instead of floor hack
Ganesh Ajjanagadde [Wed, 25 Nov 2015 23:08:45 +0000 (18:08 -0500)]
lavc/mdct_template: use lrint instead of floor hack

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavc/dcaenc: avoid wasteful cos calls
Ganesh Ajjanagadde [Wed, 9 Dec 2015 23:19:33 +0000 (18:19 -0500)]
lavc/dcaenc: avoid wasteful cos calls

cos has symmetry; use this.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavc/nellymoserdec: replace pow by exp2
Ganesh Ajjanagadde [Thu, 10 Dec 2015 00:00:22 +0000 (19:00 -0500)]
lavc/nellymoserdec: replace pow by exp2

exp2 suffices here.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/formats: fix segfault when allocation fails
Ganesh Ajjanagadde [Sat, 5 Dec 2015 18:09:24 +0000 (13:09 -0500)]
lavfi/formats: fix segfault when allocation fails

This is a somewhat subtle failure that can occur when the realloc_array
fails in FORMATS_REF.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoffmpeg: change command line option -dump to work without -loglevel debug
Tom Marecek [Thu, 10 Dec 2015 18:54:09 +0000 (18:54 +0000)]
ffmpeg: change command line option -dump to work without -loglevel debug

-hex and -dump command line options do nothing unless -loglevel debug is set.

-dump by itself is useful for monitoring live streams (to get the current PTS for example)  however when it is used with -loglevel debug for an RTMP stream, librtmp also dumps the packet data which makes the output too noisy.

do_pkt_dump is only set in check_keyboard_interaction or by the -dump command line option so this change should have no effect on any other parts of the code..

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/softfloat: Assert that the exponent did not overflow the legal range in av_nor...
Michael Niedermayer [Sun, 8 Nov 2015 12:41:58 +0000 (13:41 +0100)]
avutil/softfloat: Assert that the exponent did not overflow the legal range in av_normalize1_sf()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavfilter/af_aemphasis: more declarations above
Paul B Mahol [Thu, 10 Dec 2015 23:13:45 +0000 (00:13 +0100)]
avfilter/af_aemphasis: more declarations above

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agosbr_qmf_analysis: sanitize input for 32-bit imdct
Andreas Cadhalpun [Wed, 18 Nov 2015 12:43:01 +0000 (13:43 +0100)]
sbr_qmf_analysis: sanitize input for 32-bit imdct

If the input contains too many too large values, the imdct can overflow.
Even if it didn't, the output would be larger than the valid range of 29
bits.

Note that this is a very delicate limit: Allowing values up to 1<<25
does not prevent input larger than 1<<29 from arriving at
sbr_sum_square, while limiting values to 1<<23 breaks the
fate-aac-fixed-al_sbr_hq_cm_48_5.1 test.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agosbrdsp_fixed: assert that input values are in the valid range
Andreas Cadhalpun [Tue, 17 Nov 2015 21:58:27 +0000 (22:58 +0100)]
sbrdsp_fixed: assert that input values are in the valid range

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agoaacsbr: ensure strictly monotone time borders
Andreas Cadhalpun [Sun, 8 Nov 2015 18:31:00 +0000 (19:31 +0100)]
aacsbr: ensure strictly monotone time borders

This fixes a division by zero in the aac_fixed decoder.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodiracdec: remove duplicate codeblock decoding
Rostislav Pehlivanov [Thu, 10 Dec 2015 22:50:58 +0000 (22:50 +0000)]
diracdec: remove duplicate codeblock decoding

Broken by commit 7424a6d0a589d31100d6067ebcb47236c00f4b36

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
8 years agodiracdec: Fix FPE on invalid low_delay data
Kieran Kunhya [Wed, 9 Dec 2015 00:56:02 +0000 (00:56 +0000)]
diracdec: Fix FPE on invalid low_delay data

8 years agodiracdec: Replace dirac parse codes with better ones
Kieran Kunhya [Wed, 9 Dec 2015 13:45:23 +0000 (13:45 +0000)]
diracdec: Replace dirac parse codes with better ones

8 years agodiracdec: Read picture types by using parse_code
Kieran Kunhya [Wed, 9 Dec 2015 00:05:36 +0000 (00:05 +0000)]
diracdec: Read picture types by using parse_code

8 years agodiracdec: Store version major/minor flags
Kieran Kunhya [Wed, 9 Dec 2015 00:05:35 +0000 (00:05 +0000)]
diracdec: Store version major/minor flags

8 years agodiracdec: Support new extended quantiser range
Kieran Kunhya [Wed, 9 Dec 2015 00:05:34 +0000 (00:05 +0000)]
diracdec: Support new extended quantiser range

8 years agodiracdec: Extract version parameters
Kieran Kunhya [Wed, 9 Dec 2015 00:05:31 +0000 (00:05 +0000)]
diracdec: Extract version parameters

8 years agodiracdec: Make slice parameters common between lowdelay and future hq profile
Kieran Kunhya [Wed, 9 Dec 2015 00:05:30 +0000 (00:05 +0000)]
diracdec: Make slice parameters common between lowdelay and future hq profile

8 years agodiracdec: Rename lowdelay_subband to decode_subband because it is shared with HQ...
Kieran Kunhya [Wed, 9 Dec 2015 00:05:29 +0000 (00:05 +0000)]
diracdec: Rename lowdelay_subband to decode_subband because it is shared with HQ profile

8 years agodiracdec: Template DSP functions adding 10-bit versions
Kieran Kunhya [Wed, 9 Dec 2015 08:24:36 +0000 (08:24 +0000)]
diracdec: Template DSP functions adding 10-bit versions

8 years agodiracdec: Move strides to bytes, and pointer types to uint8_t.
Kieran Kunhya [Wed, 9 Dec 2015 13:43:29 +0000 (13:43 +0000)]
diracdec: Move strides to bytes, and pointer types to uint8_t.

Start templating functions for move to support 10-bit
Parts of this patch were written by Rostislav Pehlivanov

8 years agolavfi/vf_alphamerge: fix unitialized pointers
Ganesh Ajjanagadde [Thu, 10 Dec 2015 12:57:41 +0000 (07:57 -0500)]
lavfi/vf_alphamerge: fix unitialized pointers

Missed in commit 31f0d555e07797df1a0a141fa5e022648d480a49.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/vf_overlay: fix unitialized pointers
Ganesh Ajjanagadde [Thu, 10 Dec 2015 12:52:19 +0000 (07:52 -0500)]
lavfi/vf_overlay: fix unitialized pointers

Missed in commit 301c2784b35036945cd9a7049808deecce149916.

Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavfilter/x86/vf_maskedmerge: move %define out of .nextrow
Paul B Mahol [Sun, 6 Dec 2015 12:07:24 +0000 (13:07 +0100)]
avfilter/x86/vf_maskedmerge: move %define out of .nextrow

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agodoc/developer: misc minor fixes
Ganesh Ajjanagadde [Thu, 22 Oct 2015 23:37:32 +0000 (19:37 -0400)]
doc/developer: misc minor fixes

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavfilter/avf_showfreqs: avoid wasteful pow
Ganesh Ajjanagadde [Wed, 9 Dec 2015 23:02:22 +0000 (18:02 -0500)]
avfilter/avf_showfreqs: avoid wasteful pow

pow is a ridiculous function for computing a simple Gaussian.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoAAC encoder: fix OOB access in search_for_pns
Claudio Freire [Wed, 9 Dec 2015 20:36:32 +0000 (17:36 -0300)]
AAC encoder: fix OOB access in search_for_pns

Fix OOB access in search_for_pns which was using
w2 outside the window group loop, and fix a typo
in which it was checking sf_idx instead of band_type

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agolavf/mpjpegdec: Fixed dereference after null check
Alex Agranovsky [Wed, 9 Dec 2015 17:48:20 +0000 (12:48 -0500)]
lavf/mpjpegdec: Fixed dereference after null check

Fixes Coverity CID 1341576

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/rmdec: Fix use of uninitialized variable
Michael Niedermayer [Wed, 9 Dec 2015 17:17:47 +0000 (18:17 +0100)]
avformat/rmdec: Fix use of uninitialized variable

Fixes: CID1341580
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavutil/mathematics: Fix division by 0
Michael Niedermayer [Wed, 9 Dec 2015 16:39:38 +0000 (17:39 +0100)]
avutil/mathematics: Fix division by 0

Fixes: CID1341571
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/flacdec: remove unused return code assignment
Michael Niedermayer [Wed, 9 Dec 2015 15:47:55 +0000 (16:47 +0100)]
avformat/flacdec: remove unused return code assignment

Fixes CID1271811

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoavformat/matroskaenc: Check codecdelay before use
Michael Niedermayer [Wed, 9 Dec 2015 15:16:46 +0000 (16:16 +0100)]
avformat/matroskaenc: Check codecdelay before use

Fixes CID1238790

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agolavfi/af_amix: fix memory leak
Ganesh Ajjanagadde [Fri, 4 Dec 2015 07:04:46 +0000 (02:04 -0500)]
lavfi/af_amix: fix memory leak

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1250334.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/af_channelmap: fix memory leak
Ganesh Ajjanagadde [Fri, 4 Dec 2015 05:49:55 +0000 (00:49 -0500)]
lavfi/af_channelmap: fix memory leak

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338330.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/vf_alphamerge: fix memory leaks
Ganesh Ajjanagadde [Fri, 4 Dec 2015 05:37:19 +0000 (00:37 -0500)]
lavfi/vf_alphamerge: fix memory leaks

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338326, 1338329.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/vf_overlay: fix memory leaks
Ganesh Ajjanagadde [Fri, 4 Dec 2015 05:20:24 +0000 (00:20 -0500)]
lavfi/vf_overlay: fix memory leaks

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1338327.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agolavfi/show_palette: fix memory leak
Ganesh Ajjanagadde [Fri, 4 Dec 2015 06:46:07 +0000 (01:46 -0500)]
lavfi/show_palette: fix memory leak

Recent commits 6aaac24d72a7da631173209841a3944fcb4a3309 and
3835554bf8ed78539a3492c239f979c0ab03a15f made progress towards cleaning
up usage of the formats API, and in particular fixed possible NULL pointer
dereferences.

This commit addresses the issue of possible resource leaks when some intermediate
call fails. Unfortunately, even leaving aside this subtle intermediate
failure aspect, commit 8087632027d755cd32ccc9e91ea025e276197055 was only
partially successful in addressing memleaks. Hopefully, this commit
fixes the issue completely.

Tested with valgrind --leak-check=full --show-leak-kinds=all, and manual simulation
of malloc/realloc failures.

Fixes: CID 1270818.
Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavcodec/aacsbr_tablegen: always initialize tables at runtime
Ganesh Ajjanagadde [Mon, 30 Nov 2015 03:35:00 +0000 (22:35 -0500)]
avcodec/aacsbr_tablegen: always initialize tables at runtime

This gets rid of virtually useless hardcoded tables hackery. The reason
it is useless is that a 320 element lut is anyway placed regardless of
--enable-hardcoded-tables, from which all necessary tables are trivially
derived at runtime at very low cost:

sample benchmark (x86-64, Haswell, GNU/Linux, single run is really
what is relevant here since looping drastically changes the bench). Fluctuations
are on the order of 10% for the single run test:
39400 decicycles in aacsbr_tableinit,       1 runs,      0 skips
25325 decicycles in aacsbr_tableinit,       2 runs,      0 skips
18475 decicycles in aacsbr_tableinit,       4 runs,      0 skips
15008 decicycles in aacsbr_tableinit,       8 runs,      0 skips
13016 decicycles in aacsbr_tableinit,      16 runs,      0 skips
12005 decicycles in aacsbr_tableinit,      32 runs,      0 skips
11546 decicycles in aacsbr_tableinit,      64 runs,      0 skips
11506 decicycles in aacsbr_tableinit,     128 runs,      0 skips
11500 decicycles in aacsbr_tableinit,     256 runs,      0 skips
11183 decicycles in aacsbr_tableinit,     509 runs,      3 skips

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

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavfilter/vf_delogo: round to the closest value
Jean Delvare [Wed, 9 Dec 2015 11:07:47 +0000 (12:07 +0100)]
avfilter/vf_delogo: round to the closest value

When the interpolated value is divided by the sum of weights, no
rounding is done, which means the value is truncated. This results in
a slight bias towards dark green in the interpolated area. Rounding
properly removes the bias.

I measured this change to reduce the interpolation error by 1 to 2 %
on average on a number of sample input and logo area combinations.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agoswscale/utils: replace pow by exp2
Ganesh Ajjanagadde [Tue, 8 Dec 2015 04:05:05 +0000 (23:05 -0500)]
swscale/utils: replace pow by exp2

exp2 is a faster function.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoavcodec/jpeg2000: replace naive pow call with smarter exp2fi
Ganesh Ajjanagadde [Tue, 8 Dec 2015 02:31:41 +0000 (21:31 -0500)]
avcodec/jpeg2000: replace naive pow call with smarter exp2fi

pow is a very wasteful function for this purpose. A low hanging fruit
would be simply to replace with exp2f, and that does yield some speedup.
However, there are 2 drawbacks of this:
1. It does not exploit the integer nature of the argument.
2. (minor) Some platforms lack a proper exp2f routine, making benefits available
only to non broken libm.
3. exp2f does not solve the same issue that plagues pow, namely terrible
worst case performance. This is a fundamental issue known as the
"table-maker's dilemma" recognized by Prof. Kahan himself and
subsequently elaborated and researched by many others. All this is clear from benchmarks below.

This exploits the IEEE-754 format to get very good performance even in
the worst case for integer powers of 2. This solves all the issues noted
above. Function tested with clang usan over [-1000, 1000] (beyond range of
relevance for this, which is [-255, 255]), patch itself with FATE.

Benchmarks obtained on x86-64, Haswell, GNU-Linux via 10^5 iterations of
the pow call, START/STOP, and command ffplay ~/samples/jpeg2000/chiens_dcinema2K.mxf.
Low number of runs also given to prove the point about worst case:

pow:
 216270 decicycles in pow,       1 runs,      0 skips
 110175 decicycles in pow,       2 runs,      0 skips
  56085 decicycles in pow,       4 runs,      0 skips
  29013 decicycles in pow,       8 runs,      0 skips
  15472 decicycles in pow,      16 runs,      0 skips
   8689 decicycles in pow,      32 runs,      0 skips
   5295 decicycles in pow,      64 runs,      0 skips
   3599 decicycles in pow,     128 runs,      0 skips
   2748 decicycles in pow,     256 runs,      0 skips
   2304 decicycles in pow,     511 runs,      1 skips
   2072 decicycles in pow,    1022 runs,      2 skips
   1963 decicycles in pow,    2044 runs,      4 skips
   1894 decicycles in pow,    4091 runs,      5 skips
   1860 decicycles in pow,    8184 runs,      8 skips

exp2f:
 134140 decicycles in pow,       1 runs,      0 skips
  68110 decicycles in pow,       2 runs,      0 skips
  34530 decicycles in pow,       4 runs,      0 skips
  17677 decicycles in pow,       8 runs,      0 skips
   9175 decicycles in pow,      16 runs,      0 skips
   4931 decicycles in pow,      32 runs,      0 skips
   2808 decicycles in pow,      64 runs,      0 skips
   1747 decicycles in pow,     128 runs,      0 skips
   1208 decicycles in pow,     256 runs,      0 skips
    952 decicycles in pow,     512 runs,      0 skips
    822 decicycles in pow,    1024 runs,      0 skips
    765 decicycles in pow,    2047 runs,      1 skips
    722 decicycles in pow,    4094 runs,      2 skips
    693 decicycles in pow,    8190 runs,      2 skips

exp2fi:
   2740 decicycles in pow,       1 runs,      0 skips
   1530 decicycles in pow,       2 runs,      0 skips
    955 decicycles in pow,       4 runs,      0 skips
    622 decicycles in pow,       8 runs,      0 skips
    477 decicycles in pow,      16 runs,      0 skips
    368 decicycles in pow,      32 runs,      0 skips
    317 decicycles in pow,      64 runs,      0 skips
    291 decicycles in pow,     128 runs,      0 skips
    277 decicycles in pow,     256 runs,      0 skips
    268 decicycles in pow,     512 runs,      0 skips
    265 decicycles in pow,    1024 runs,      0 skips
    263 decicycles in pow,    2048 runs,      0 skips
    263 decicycles in pow,    4095 runs,      1 skips
    260 decicycles in pow,    8191 runs,      1 skips

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
8 years agoaacenc: update max_sfb when num_swb changes
Andreas Cadhalpun [Sun, 6 Dec 2015 20:35:08 +0000 (21:35 +0100)]
aacenc: update max_sfb when num_swb changes

This fixes out-of-bounds reads in avoid_clipping.

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agofate/api-jpeg-codec-param: rename to api-mjpeg-codec-param
Matthieu Bouron [Mon, 7 Dec 2015 09:40:03 +0000 (10:40 +0100)]
fate/api-jpeg-codec-param: rename to api-mjpeg-codec-param