ffmpeg.git
5 years agoavcodec/mpegvideo_parser: Fix integer overflow
Michael Niedermayer [Wed, 2 Sep 2015 18:54:42 +0000 (20:54 +0200)]
avcodec/mpegvideo_parser: Fix integer overflow

Fixes: signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/truemotion1: Fix undefined behavior (left shift of negative value)
Michael Niedermayer [Wed, 2 Sep 2015 18:43:25 +0000 (20:43 +0200)]
avcodec/truemotion1: Fix undefined behavior (left shift of negative value)

Fixes: asan_heap-oob_26f6853_862_cov_585961513_sonic3dblast_intro-partial.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec: loongson optimize mpeg2 dct unquantize intra and denoise dct
周晓勇 [Wed, 2 Sep 2015 10:01:00 +0000 (18:01 +0800)]
avcodec: loongson optimize mpeg2 dct unquantize intra and denoise dct

Change-Id: I2f391ae912a079fb32f0703841dca86358aac72a
Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/colormatrix: Add a bt601 alias
Vittorio Giovara [Wed, 2 Sep 2015 13:05:29 +0000 (15:05 +0200)]
lavfi/colormatrix: Add a bt601 alias

Matches what av_get_colorspace_name() and av_color_space_name() report.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffmpeg: Improve help text for -target.
Carl Eugen Hoyos [Wed, 2 Sep 2015 12:32:06 +0000 (14:32 +0200)]
ffmpeg: Improve help text for -target.

Fixes ticket #1057.

5 years agoavcodec/mips/aaccoder_mips: disable optimizatios which break fate-aac-pns-encode
Michael Niedermayer [Wed, 2 Sep 2015 10:39:38 +0000 (12:39 +0200)]
avcodec/mips/aaccoder_mips: disable optimizatios which break fate-aac-pns-encode

These should be re enabled once the issue is fixed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofate: increase fuzziness for the AAC encoder prediction test
Rostislav Pehlivanov [Wed, 2 Sep 2015 07:36:53 +0000 (08:36 +0100)]
fate: increase fuzziness for the AAC encoder prediction test

Fails on x86_64 using ICC 13.1.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agofate: add fuzziness to the AAC Encode prediction test
Rostislav Pehlivanov [Wed, 2 Sep 2015 06:15:42 +0000 (07:15 +0100)]
fate: add fuzziness to the AAC Encode prediction test

Fails on ppc64 architecture under Ubuntu.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agofate: update AAC encoder tests
Rostislav Pehlivanov [Wed, 2 Sep 2015 05:39:59 +0000 (06:39 +0100)]
fate: update AAC encoder tests

TNS had both IS and PNS switched on when it makes more sense
to have them both off.

Prediction had a redundant argument.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: reorder coding tools
Rostislav Pehlivanov [Wed, 2 Sep 2015 05:26:45 +0000 (06:26 +0100)]
aacenc: reorder coding tools

This commit reorders the coding tools such that they're doing what
the decoder does in reverse order. The very first thing the decoder
does is to decode M/S stereo if that's signalled, then prediction,
IS, and finally TNS and PNS in another function.
adjust_frame_information()'s application of IS and M/S was taken
out into two separate functions since prediction doesn't expect
to get the raw coefficients but rathe the coefficients at that
part of the encoding process.

The results show a much better PSNR when any combination of
Intensity Stereo, Mid/Side stereo and Prediction is used, which
is a sign of an increased encoder efficiency as well as the fact
that the decoder gets what it expects.

Otherwise, with only IS, PNS or prediction there are neither
regressions nor improvements except in the case of IS, which
now by itself (or with PNS) is less prone to artifacts. Enabling
M/S (using stereo_mode) as well will also reduce stereo artifacts
induced by IS, so in the very near future M/S may be enabled
by default.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavformat/hlsenc: add a use_localtime option to expand the segment filename with localtime
LiuQi [Mon, 31 Aug 2015 20:10:15 +0000 (04:10 +0800)]
avformat/hlsenc: add a use_localtime option to expand the segment filename with localtime

test examples:

./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8

[StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll test-*.ts
test-1441052221.ts
test-1441052231.ts
test-1441052235.ts
test-1441052243.ts
test-1441052249.ts
-rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:15 test-1441052131.ts
-rw-r--r--  1 StevenLiu  staff   495192  9  1 04:15 test-1441052141.ts
-rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:17 test-1441052212.ts
-rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:17 test-1441052221.ts
-rw-r--r--  1 StevenLiu  staff   235564  9  1 04:17 test-1441052231.ts
-rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:17 test-1441052235.ts
-rw-r--r--  1 StevenLiu  staff   694848  9  1 04:17 test-1441052243.ts
-rw-r--r--  1 StevenLiu  staff   526588  9  1 04:17 test-1441052249.ts
[StevenLiu@localhost ffmpeg]$

./ffmpeg -re -i ~/Movies/objectC/facebook.mp4 -v verbose -c copy -f hls -hls_segment_filename test-%s.ts -use_localtime 1 -bsf:v h264_mp4toannexb aaa.m3u8

[StevenLiu@localhost ffmpeg]$ cat aaa.m3u8;ll aaa-*.ts
aaa-1441052417.ts
aaa-1441052427.ts
aaa-1441052437.ts
aaa-1441052440.ts
aaa-1441052449.ts
-rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:19 aaa-1441052382.ts
-rw-r--r--  1 StevenLiu  staff   277300  9  1 04:19 aaa-1441052392.ts
-rw-r--r--  1 StevenLiu  staff  1310736  9  1 04:20 aaa-1441052417.ts
-rw-r--r--  1 StevenLiu  staff  1067840  9  1 04:20 aaa-1441052427.ts
-rw-r--r--  1 StevenLiu  staff   235564  9  1 04:20 aaa-1441052437.ts
-rw-r--r--  1 StevenLiu  staff  1187220  9  1 04:20 aaa-1441052440.ts
-rw-r--r--  1 StevenLiu  staff   338776  9  1 04:20 aaa-1441052449.ts
[StevenLiu@localhost ffmpeg]$

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/hevc_parser: fix split function of parser
Rainer Hochecker [Tue, 1 Sep 2015 14:27:02 +0000 (16:27 +0200)]
avcodec/hevc_parser: fix split function of parser

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ffv1dec: Print CRCs at picture debug level
Michael Niedermayer [Wed, 2 Sep 2015 00:11:43 +0000 (02:11 +0200)]
avcodec/ffv1dec: Print CRCs at picture debug level

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ffv1dec: Check that there is enough space for the CRC in the global header
Michael Niedermayer [Wed, 2 Sep 2015 00:10:31 +0000 (02:10 +0200)]
avcodec/ffv1dec: Check that there is enough space for the CRC in the global header

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/h264_slice: replace assert by normal error check
Michael Niedermayer [Tue, 1 Sep 2015 22:44:28 +0000 (00:44 +0200)]
avcodec/h264_slice: replace assert by normal error check

Fixes assertion failure
Fixes: c6075771557e4f3b7b74e63d2d24fb01/signal_sigabrt_7ffff6ac8cc9_133_cov_2853689970_CREDITS.FST

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/dv: Do not return EIO for every error (like EOF).
Carl Eugen Hoyos [Tue, 1 Sep 2015 22:58:13 +0000 (00:58 +0200)]
lavf/dv: Do not return EIO for every error (like EOF).

Fixes ticket #4818.

Reviewed-by: Ronald S. Bultje
Reviewed-by: Paul B Mahol
5 years agoavfilter/vf_subtitles: allow setting fonts directory
Ricardo Constantino [Sun, 30 Aug 2015 22:52:10 +0000 (23:52 +0100)]
avfilter/vf_subtitles: allow setting fonts directory

This is mostly useful if libass was compiled with a font provider
other than fontconfig, but is still useful in that case.

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
5 years agoavcodec/version: Minor version bump due to 5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8
Michael Niedermayer [Tue, 1 Sep 2015 21:02:15 +0000 (23:02 +0200)]
avcodec/version: Minor version bump due to 5d12d7de2ce548a3c9f5c175a9d1c5bfbdbcbfa8

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mxg: Use memmove()
Michael Niedermayer [Tue, 1 Sep 2015 20:45:07 +0000 (22:45 +0200)]
avformat/mxg: Use memmove()

Fixes undefined behavior
Fixes: 1700002963a49da13542e0726b7bb758/unknown_unknown_292_658_cov_2141972066_m1.mxg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agompegts: demux BluRay text subtitles
Petri Hintukainen [Tue, 1 Sep 2015 08:56:21 +0000 (11:56 +0300)]
mpegts: demux BluRay text subtitles

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agompegts: fix demuxing PES private stream 2
Petri Hintukainen [Mon, 31 Aug 2015 09:06:16 +0000 (12:06 +0300)]
mpegts: fix demuxing PES private stream 2

PES header size is 6 bytes (00 00 01 bf XX XX), not 0.
BluRay text subtitles use private stream 2.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_spp: use the name 's' for the pointer to the private context
Ganesh Ajjanagadde [Mon, 31 Aug 2015 15:07:56 +0000 (08:07 -0700)]
avfilter/vf_spp: use the name 's' for the pointer to the private context

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
5 years agortmp: support the AMF_DATE tag
Andrew Stone [Tue, 1 Sep 2015 00:28:42 +0000 (20:28 -0400)]
rtmp: support the AMF_DATE tag

Instead of returning EINVAL, which can cause a stream to fail to load, this
allows the tag to be passed through to the flv demuxer, where it's summarily
ignored.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoaacenc: disable bandtype modifying extensions when coder != twoloop
Rostislav Pehlivanov [Tue, 1 Sep 2015 11:07:00 +0000 (12:07 +0100)]
aacenc: disable bandtype modifying extensions when coder != twoloop

If the selected coder isn't twoloop, this commit temporarily
disables IS and PNS.
The problem is in the encode_window_bands_info() being confused
and setting invalid band_types for non-marked (normal) bands.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavfilter/vf_waveform: support envelope for all filters
Paul B Mahol [Mon, 31 Aug 2015 17:48:10 +0000 (17:48 +0000)]
avfilter/vf_waveform: support envelope for all filters

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_waveform: simplify memory allocations
Paul B Mahol [Mon, 31 Aug 2015 16:45:55 +0000 (16:45 +0000)]
avfilter/vf_waveform: simplify memory allocations

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_waveform: implement various filters
Paul B Mahol [Fri, 28 Aug 2015 18:45:53 +0000 (18:45 +0000)]
avfilter/vf_waveform: implement various filters

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agofate: adjust fuzz of AAC Encoder's TNS test
Rostislav Pehlivanov [Tue, 1 Sep 2015 08:08:31 +0000 (09:08 +0100)]
fate: adjust fuzz of AAC Encoder's TNS test

Have to adjust it again, this time because of --enable-small on
gcc 4.5 in Linaro.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolavf: Remove probesize32 and max_analyze_duration32 on version bump.
Carl Eugen Hoyos [Tue, 1 Sep 2015 07:19:49 +0000 (09:19 +0200)]
lavf: Remove probesize32 and max_analyze_duration32 on version bump.

Add FF_API_PROBESIZE_32 to allow removing 32bit probesize and 32bit
max_analyze_duration after the next libavformat version bump.

5 years agolavfi/scale: Pass src_range and dst_range to libswscale.
Carl Eugen Hoyos [Tue, 1 Sep 2015 07:17:26 +0000 (09:17 +0200)]
lavfi/scale: Pass src_range and dst_range to libswscale.

Fixes ticket #4812.

5 years agofate: update AAC tests to the new defaults
Rostislav Pehlivanov [Tue, 1 Sep 2015 06:26:03 +0000 (07:26 +0100)]
fate: update AAC tests to the new defaults

IS and PNS increase quality a ton so as a result the PSNR changed.
Disable the extensions and keep the tests separate such that there
will be no red herrings if one test fails.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: Enable Intensity Stereo by default
Rostislav Pehlivanov [Tue, 1 Sep 2015 06:15:23 +0000 (07:15 +0100)]
aacenc: Enable Intensity Stereo by default

Since the changes made a few week ago (which were done more than a
month ago) the quality and stability of intensity stereo has been
notably good. There were some requests and wishes to have in on by
default and therefore it has been enabled. Should any regressions
arise changes will be made to preferably keep it operating rather
than just disabling it by default again.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: Enable Perceptual Noise Substitution by default
Rostislav Pehlivanov [Tue, 1 Sep 2015 06:13:33 +0000 (07:13 +0100)]
aacenc: Enable Perceptual Noise Substitution by default

It has been in the current encoder in its current implementation
for quite some time now, so enable it by default. Will increase
quality at all bitrates, especially at low ones.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agofate: update AAC Encoder TNS test for the new changes
Rostislav Pehlivanov [Tue, 1 Sep 2015 06:07:59 +0000 (07:07 +0100)]
fate: update AAC Encoder TNS test for the new changes

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: reorder resetting of cpe->common_window
Rostislav Pehlivanov [Tue, 1 Sep 2015 06:00:10 +0000 (07:00 +0100)]
aacenc: reorder resetting of cpe->common_window

Purely a cosmetic change, most of the zeroing of encoder resources
should happen at the top of the main loop.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_tns: rework coefficient quantization and filter application
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:44:07 +0000 (06:44 +0100)]
aacenc_tns: rework coefficient quantization and filter application

This commit reworks the TNS implementation to a hybrid between what
the specifications say, what the decoder does and what's the best
thing to do.

The filter application function was copied from the decoder and
modified such that it applies the inverse AR filter to the
coefficients. The LPC coefficients themselves are fed into the
same quantization expression that the specifications say should
be used however further processing is not done, instead they're
converted to the form that the decoder expects them to be in
and are sent off to the compute_lpc_coeffs function exactly the
way the decoder does. This function does all conversions and will
return the exact coefficients that the decoder will generate, which
are then applied to the coefficients.
Having the exact same coefficients on both the encoder and decoder
is a must since otherwise the entire sfb's over which the filter
is applied will be attenuated.

Despite this major rework, TNS might not work fine on some audio
types at very low bitrates (e.g. sub 90kbps) as it can attenuate
some coefficients too much. Users are advised to experiment with
TNS at higher bitrates if they wish to use this tool or simply
wait for the implementation to be improved.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: allocate a larger buffer for the TNS LPC context
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:40:12 +0000 (06:40 +0100)]
aacenc: allocate a larger buffer for the TNS LPC context

Turns out autocorrelating more than 750 coefficients at once
will cause a segfault, despite there being enough space to
hold an entire frame of samples into the buffer.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolpc: add ff_lpc_calc_ref_coefs_f() function
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:34:50 +0000 (06:34 +0100)]
lpc: add ff_lpc_calc_ref_coefs_f() function

This commit adds a function to get the reflection coefficients on
floating point samples. It's functionally identical to
ff_lpc_calc_ref_coefs() except it works on float samples and will
return the global prediction gain. The Welch window implementation
which is more optimized works only on int32_t samples so a slower
generic expression was used.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolpc: remove unused ff_lpc_calc_levinson() function
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:32:35 +0000 (06:32 +0100)]
lpc: remove unused ff_lpc_calc_levinson() function

Not needed anymore, it was only used by the AAC TNS
encoder and was replaced with a more suitable function
in the following commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenctab: add tns_min_sfb[] to the encoder tables header
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:30:08 +0000 (06:30 +0100)]
aacenctab: add tns_min_sfb[] to the encoder tables header

Needed for following commits. Contains the starting sfb for
every samplerate and window type.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: populate tns_max_bands
Rostislav Pehlivanov [Tue, 1 Sep 2015 05:20:24 +0000 (06:20 +0100)]
aacenc: populate tns_max_bands

Needed for the following commits.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavcodec/truemotion1: Check for even width
Michael Niedermayer [Tue, 1 Sep 2015 02:57:22 +0000 (04:57 +0200)]
avcodec/truemotion1: Check for even width

Fixes out of array access
Fixes: 87196d8bbc633629fc9dd851fce73e70/asan_heap-oob_26f6853_862_cov_585961513_sonic3dblast_intro-partial.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mpeg12dec: Set dimensions in mpeg1_decode_sequence() only in absence of errors
Michael Niedermayer [Tue, 1 Sep 2015 00:45:10 +0000 (02:45 +0200)]
avcodec/mpeg12dec: Set dimensions in mpeg1_decode_sequence() only in absence of errors

Fixes assertion failure
Fixes: 56dcafde14a8397161bb61a16c511179/signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/movtextdec: Free ftab_temp
Michael Niedermayer [Mon, 31 Aug 2015 21:43:43 +0000 (23:43 +0200)]
avcodec/movtextdec: Free ftab_temp

Fixes memleak
Fixes: efe937780e95574250dabe07151bdc23/unknown_unknown_351_849_cov_3187578556_shellymanne.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/movtextdec: Make tx3g_ptr unsigned
Michael Niedermayer [Mon, 31 Aug 2015 21:01:23 +0000 (23:01 +0200)]
avcodec/movtextdec: Make tx3g_ptr unsigned

Fixes integer overflow
Fixes: efe937780e95574250dabe07151bdc23/unknown_unknown_351_849_cov_3187578556_shellymanne.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agotests: Renamed pix_fmts wording in ffv1 test target name to match pix_fmt parameter.
Peter B [Mon, 31 Aug 2015 01:02:36 +0000 (03:02 +0200)]
tests: Renamed pix_fmts wording in ffv1 test target name to match pix_fmt parameter.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofate: use 'c' for setting the channel_layout
Andreas Cadhalpun [Sat, 8 Aug 2015 18:01:50 +0000 (20:01 +0200)]
fate: use 'c' for setting the channel_layout

Without this fate-filter-join failes with
FF_API_GET_CHANNEL_LAYOUT_COMPAT disabled.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoavcodec/pngdec: fully support the tRNS chunk
Donny Yang [Fri, 28 Aug 2015 13:53:07 +0000 (13:53 +0000)]
avcodec/pngdec: fully support the tRNS chunk

Signed-off-by: Donny Yang <work@kota.moe>
5 years agoMerge commit 'c457bdebe7af643b380aa0f6add3cb4335d218dc'
Hendrik Leppkes [Mon, 31 Aug 2015 08:08:18 +0000 (10:08 +0200)]
Merge commit 'c457bdebe7af643b380aa0f6add3cb4335d218dc'

* commit 'c457bdebe7af643b380aa0f6add3cb4335d218dc':
  checkasm: Fix floating point arguments on 64-bit Windows

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'b1abd2aaf91be249f24cb74db9c205d9e4ca9da6'
Hendrik Leppkes [Mon, 31 Aug 2015 08:07:34 +0000 (10:07 +0200)]
Merge commit 'b1abd2aaf91be249f24cb74db9c205d9e4ca9da6'

* commit 'b1abd2aaf91be249f24cb74db9c205d9e4ca9da6':
  vf_scale: Add an option to pass the scaler params

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit 'c23999be134bde0a0554261a9043be7dbc01de0c'
Hendrik Leppkes [Mon, 31 Aug 2015 08:01:58 +0000 (10:01 +0200)]
Merge commit 'c23999be134bde0a0554261a9043be7dbc01de0c'

* commit 'c23999be134bde0a0554261a9043be7dbc01de0c':
  avconv_opt: Add an option that lists all supported hwaccels

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoMerge commit '629d4c5b4deee08bf3a4f3ab45fd4f8b76d7aff3'
Hendrik Leppkes [Mon, 31 Aug 2015 08:00:07 +0000 (10:00 +0200)]
Merge commit '629d4c5b4deee08bf3a4f3ab45fd4f8b76d7aff3'

* commit '629d4c5b4deee08bf3a4f3ab45fd4f8b76d7aff3':
  avconv_opt: Add missing comma

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
5 years agoswscale/utils: If cascaded contexts are used forward sws_setColorspaceDetails() to...
Michael Niedermayer [Sun, 30 Aug 2015 22:34:55 +0000 (00:34 +0200)]
swscale/utils: If cascaded contexts are used forward sws_setColorspaceDetails() to the first context

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoswscale/utils: Split scaling if possible and yuv->yuv with different matrixes is...
Michael Niedermayer [Sun, 30 Aug 2015 21:58:37 +0000 (23:58 +0200)]
swscale/utils: Split scaling if possible and yuv->yuv with different matrixes is requested

This uses a RGB intermediate, a more optimal solution would be to perform the rematrixing
directly in subsampled YUV, this is quite a bit more complicated though

Fixes Ticket4805

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_scale: If no output color matrix is specified, use the input
Michael Niedermayer [Sun, 30 Aug 2015 22:17:50 +0000 (00:17 +0200)]
avfilter/vf_scale: If no output color matrix is specified, use the input

This should only affect yuv->yuv, and not change behavior

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_scale: Do not skip scale if the color matrix mismatches
Michael Niedermayer [Sun, 30 Aug 2015 21:49:04 +0000 (23:49 +0200)]
avfilter/vf_scale: Do not skip scale if the color matrix mismatches

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_scale: Do not skip scale if range mismatches
Carl Eugen Hoyos [Sun, 30 Aug 2015 21:46:11 +0000 (23:46 +0200)]
avfilter/vf_scale: Do not skip scale if range mismatches

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agofate: add -fflags +bitexact to the relevant targets
Andreas Cadhalpun [Sat, 22 Aug 2015 13:34:28 +0000 (15:34 +0200)]
fate: add -fflags +bitexact to the relevant targets

This fixes fate with FF_API_LAVF_BITEXACT disabled.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agomux: warn if the encoders bitexact flag is set, but not the muxers
Andreas Cadhalpun [Mon, 24 Aug 2015 22:37:04 +0000 (00:37 +0200)]
mux: warn if the encoders bitexact flag is set, but not the muxers

Based-on-patch-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoavfilter: add missing FF_API_AVFILTERBUFFER guards
Andreas Cadhalpun [Sun, 16 Aug 2015 22:34:58 +0000 (00:34 +0200)]
avfilter: add missing FF_API_AVFILTERBUFFER guards

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
5 years agoavfilter/vf_separatefields: use the name 's' for the pointer to the private context
Ganesh Ajjanagadde [Sun, 30 Aug 2015 15:46:08 +0000 (08:46 -0700)]
avfilter/vf_separatefields: use the name 's' for the pointer to the private context

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
5 years agoavcodec/qsv : Added look ahead rate control mode
Sven Dueking [Fri, 21 Aug 2015 08:17:35 +0000 (09:17 +0100)]
avcodec/qsv : Added look ahead rate control mode

Reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_vectorscope: make color mode more useful
Paul B Mahol [Sun, 30 Aug 2015 13:34:17 +0000 (13:34 +0000)]
avfilter/vf_vectorscope: make color mode more useful

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoswresample/swresample-test: Make layouts static const
Michael Niedermayer [Sun, 30 Aug 2015 10:45:53 +0000 (12:45 +0200)]
swresample/swresample-test: Make layouts static const

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavdevice/libdc1394: Make dc1394_frame_format and dc1394_frame_rate, static
Michael Niedermayer [Sun, 30 Aug 2015 10:42:42 +0000 (12:42 +0200)]
avdevice/libdc1394: Make dc1394_frame_format and dc1394_frame_rate, static

These are not used outside nor are in installed headers

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/options: Make dummy_v?_encoder static
Michael Niedermayer [Sun, 30 Aug 2015 09:56:41 +0000 (11:56 +0200)]
avcodec/options: Make dummy_v?_encoder static

It does not need to be non static

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: mention all short names for vectorscope options
Paul B Mahol [Sun, 30 Aug 2015 08:35:02 +0000 (08:35 +0000)]
doc/filters: mention all short names for vectorscope options

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter/vf_vectorscope: implement envelope support
Paul B Mahol [Sat, 29 Aug 2015 21:18:53 +0000 (21:18 +0000)]
avfilter/vf_vectorscope: implement envelope support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/snowenc: Support setting the iterative dia size separately
Michael Niedermayer [Fri, 24 Jul 2015 18:50:55 +0000 (20:50 +0200)]
avcodec/snowenc: Support setting the iterative dia size separately

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoaacenc_tns: do not limit the filter size
Rostislav Pehlivanov [Sat, 29 Aug 2015 20:59:38 +0000 (21:59 +0100)]
aacenc_tns: do not limit the filter size

This was copied from the decoder, but is unneeded for the encoder.
tns_max_bands is unused and set to zero which zeroed out start, end
and size and thus no filter was actually applied.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolpc: rename ff_lpc_calc_levinsion to ff_lpc_calc_levinson
Rostislav Pehlivanov [Sat, 29 Aug 2015 18:29:18 +0000 (19:29 +0100)]
lpc: rename ff_lpc_calc_levinsion to ff_lpc_calc_levinson

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_tns: fix out-of-bounds array access
Rostislav Pehlivanov [Sat, 29 Aug 2015 18:21:35 +0000 (19:21 +0100)]
aacenc_tns: fix out-of-bounds array access

Since the coefficients are stepped up to order + 1 it was possible
that it went over TNS_MAX_ORDER. Also just return in case the only
coefficient is less than the threshold.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_tns: actually apply TNS filter to the coefficients
Rostislav Pehlivanov [Sat, 29 Aug 2015 18:18:18 +0000 (19:18 +0100)]
aacenc_tns: actually apply TNS filter to the coefficients

The encoder-side filter isn't that important. The PSNR
shouldn't change so the FATE test should still be fine.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: initialize LPC context with MAX_LPC_ORDER
Rostislav Pehlivanov [Sat, 29 Aug 2015 18:15:52 +0000 (19:15 +0100)]
aacenc: initialize LPC context with MAX_LPC_ORDER

The order should never go above TNS_MAX_ORDER (and thus cause
the context to be reinitialized) but this is just in case.

Also fix a comparison, since the coefficients are zero-indexed.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_tns: fix triggering an assertion with assert-level=2
Rostislav Pehlivanov [Sat, 29 Aug 2015 18:01:59 +0000 (19:01 +0100)]
aacenc_tns: fix triggering an assertion with assert-level=2

It also made no sense to actually make the filter span the entire
window including the first band of the next window.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavfilter/af_apad: use the name 's' for the pointer to the private context
Ganesh Ajjanagadde [Wed, 26 Aug 2015 17:03:32 +0000 (13:03 -0400)]
avfilter/af_apad: use the name 's' for the pointer to the private context

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
5 years agoavfilter/vf_vectorscope: add yet another mode
Paul B Mahol [Sat, 29 Aug 2015 13:40:25 +0000 (13:40 +0000)]
avfilter/vf_vectorscope: add yet another mode

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavfilter: add allrgb
Clément Bœsch [Sat, 15 Aug 2015 23:22:59 +0000 (01:22 +0200)]
avfilter: add allrgb

Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Clément Bœsch <u@pkh.me>
5 years agofate: adjust AAC encoder TNS test fuzziness
Rostislav Pehlivanov [Sat, 29 Aug 2015 08:26:05 +0000 (09:26 +0100)]
fate: adjust AAC encoder TNS test fuzziness

Tests fails on some ARM builds but it's close enough so it's okay.
NEON, half-precision floats, rounding errors, who knows.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agofate: add a test for encoding AAC-Main prediction
Rostislav Pehlivanov [Sat, 29 Aug 2015 06:00:54 +0000 (07:00 +0100)]
fate: add a test for encoding AAC-Main prediction

This commit introduces a test for AAC-Main prediction
which was just reworked in this series of commits.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agofate: reenable TNS test
Rostislav Pehlivanov [Sat, 29 Aug 2015 06:00:17 +0000 (07:00 +0100)]
fate: reenable TNS test

Hopefully without errors like last time, but I'm prepared.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: remove TNS from the todo list
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:57:08 +0000 (06:57 +0100)]
aacenc: remove TNS from the todo list

Pulses are already on the way so expect to see the list
gone in the close future.

TNS is already of sufficiently high quality to be enabled
by default (but isn't yet, so you too can help by testing!).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_tns: rework the way coefficients are calculated
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:47:31 +0000 (06:47 +0100)]
aacenc_tns: rework the way coefficients are calculated

This commit abandons the way the specifications state to
quantize the coefficients, makes use of the new LPC float
functions and is much better.

The original way of converting non-normalized float samples
to int32_t which out LPC system expects was wrong and it was
wrong to assume the coefficients that are generated are also
valid. It was essentially a full garbage-in, garbage-out
system and it definitely shows when looking at spectrals
and listening. The high frequencies were very overattenuated.
The new LPC function performs the analysis directly.

The specifications state to quantize the coefficients into
four bit index values using an asin() function which of course
had to have ugly ternary operators because the function turns
negative if the coefficients are negative which when encoding
causes invalid bitstream to get generated.

This deviates from this by using the direct TNS tables, which
are fairly small since you only have 4 bits at most for index
values. The LPC values are directly quantized against the tables
and are then used to perform filtering after the requantization,
which simply fetches the array values.

The end result is that TNS works much better now and doesn't
attenuate anything but the actual signal, e.g. TNS removes
quantization errors and does it's job correctly now.

It might be enabled by default soon since it doesn't hurt and
helps reduce nastyness at low bitrates.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaac: remove now-unused redundant array
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:44:20 +0000 (06:44 +0100)]
aac: remove now-unused redundant array

This commit removes the array which was made redundant with
the last commit. The current prediction system gets the
quantization error directly (and without the single-frame delay)
in the search_for_pred function.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc_pred: rework the way prediction is done
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:34:08 +0000 (06:34 +0100)]
aacenc_pred: rework the way prediction is done

This commit completely alters the algorithm of prediction.
The original commit which introduced prediction was completely
incorrect to even remotely care about what the actual coefficients
contain or whether any options were enabled. Not my actual fault.

This commit treats prediction the way the decoder does and expects
to do: like lossy encryption. Everything related to prediction now
happens at the very end but just before quantization and encoding
of coefficients. On the decoder side, prediction happens before
anything has had a chance to even access the coefficients.

Also the original implementation had problems because it actually
touched the band_type of special bands which already had their
scalefactor indices marked and it's a wonder the asserion wasn't
triggered when transmitting those.

Overall, this now drastically increases audio quality and you should
think about enabling it if you don't plan on playing anything encoded
on really old low power ultra-embedded devices since they might not
support decoding of prediction or AAC-Main. Though the specifications
were written ages ago and as times change so do the FLOPS.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaacenc: change FF_PROFILE_UNKNOWN to AAC-Main if prediction is enabled
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:28:21 +0000 (06:28 +0100)]
aacenc: change FF_PROFILE_UNKNOWN to AAC-Main if prediction is enabled

This was missed when the original commits were done. FF_PROFILE_UNKNOWN
is what's in avctx->profile when no audio profile is specified.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agolpc: create a simplified Levinson-Durbin LPC handling float samples
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:14:13 +0000 (06:14 +0100)]
lpc: create a simplified Levinson-Durbin LPC handling float samples

This commit simply duplicates the functionality of ff_lpc_calc_coefs()
for the case of a Levinson-Durbin LPC with the only difference being
that floating point samples are accepted and the resulting coefficients
are raw and unquantized.
The motivation behind doing this is the fact that the AAC encoder
requires LPC in TNS and LTP and converting non-normalized floating
point coefficients to int32_t using SWR and again back for the LPC
coefficients was very impractical.
The current LPC interfaces were designed for int32_t in mind possibly
because FLAC and ALAC use this type for most internal operations.
The mathematics in case of floats remains of course identical.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoaac: move the TNS tables from aacdectab to the shared aactab
Rostislav Pehlivanov [Sat, 29 Aug 2015 05:07:12 +0000 (06:07 +0100)]
aac: move the TNS tables from aacdectab to the shared aactab

This commit simply moves the TNS tables to a more appropriate
aactab.h since then they can be accessed by both the decoder
and encoder.

The encoder _shouldn't_ normally need the tables since the
specs describe a specific quantization process, but the exact
reason for this can be seen in the TNS commit following.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
5 years agoavcodec/vc1dec: Re-order init to avoid initting hwaccel too early
Philip Langdale [Sat, 8 Aug 2015 21:59:09 +0000 (14:59 -0700)]
avcodec/vc1dec: Re-order init to avoid initting hwaccel too early

At least for vdpau, the hwaccel init code tries to check the video
profile and ensure that there is a matching vdpau profile available.

If it can't find a match, it will fail to initialise.

In the case of wmv3/vc1, I observed initialisation to fail all the
time. It turns out that this is due to the hwaccel being initialised
very early in the codec init, before the profile has been extracted
and set.

Conceptually, it's a simple fix to reorder the init code, but it gets
messy really fast because ff_get_format(), which is what implicitly
trigger hwaccel init, is called multiple times through various shared
init calls from h263, etc. It's incredibly hard to prove to my own
satisfaction that it's safe to move the vc1 specific init code
ahead of this generic code, but all the vc1 fate tests pass, and I've
visually inspected a couple of samples and things seem correct.

Signed-off-by: Philip Langdale <philipl@overt.org>
5 years agoffmpeg: force 128k default audio bitrate if nothing is specified and there is no...
Michael Niedermayer [Tue, 18 Aug 2015 01:27:52 +0000 (03:27 +0200)]
ffmpeg: force 128k default audio bitrate if nothing is specified and there is no specific default

This prevents breaking existing command lines in case the "ab" default is removed from libavcodec

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_dejudder: use the name 's' for the pointer to the private context
Paul B Mahol [Thu, 20 Aug 2015 15:14:27 +0000 (15:14 +0000)]
avfilter/vf_dejudder: use the name 's' for the pointer to the private context

This is shorter and consistent across filters.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoffserver: use -b instead of -ab for setting audio bitrate.
Ronald S. Bultje [Tue, 18 Aug 2015 12:19:26 +0000 (08:19 -0400)]
ffserver: use -b instead of -ab for setting audio bitrate.

5 years agoPut remaining pieces of CODEC_FLAG_EMU_EDGE under FF_API_EMU_EDGE.
Ronald S. Bultje [Mon, 17 Aug 2015 16:25:39 +0000 (12:25 -0400)]
Put remaining pieces of CODEC_FLAG_EMU_EDGE under FF_API_EMU_EDGE.

The amv one probably looks suspicious, but since it's an intra-only
codec, I couldn't possibly imagine what it would use the edge for,
and the vsynth fate result doesn't change, so it's probably OK.

5 years agoChangelog: Add VDPAU HEVC to the list
Philip Langdale [Fri, 28 Aug 2015 15:15:57 +0000 (08:15 -0700)]
Changelog: Add VDPAU HEVC to the list

Signed-off-by: Philip Langdale <philipl@overt.org>
5 years agoavfilter/vf_histogram: 9 and 10 bit depth support
Paul B Mahol [Tue, 25 Aug 2015 18:02:42 +0000 (18:02 +0000)]
avfilter/vf_histogram: 9 and 10 bit depth support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agodoc/examples/filtering_video: better demo ffmpeg filters; demos chaining the filters
Harshit Mittal [Wed, 5 Aug 2015 19:41:49 +0000 (12:41 -0700)]
doc/examples/filtering_video: better demo ffmpeg filters; demos chaining the filters

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoChangelog: Clarify that the new asf demuxer is optional.
Carl Eugen Hoyos [Fri, 28 Aug 2015 09:08:28 +0000 (11:08 +0200)]
Changelog: Clarify that the new asf demuxer is optional.

5 years agocheckasm: Fix floating point arguments on 64-bit Windows
Henrik Gramner [Mon, 24 Aug 2015 20:53:56 +0000 (22:53 +0200)]
checkasm: Fix floating point arguments on 64-bit Windows

Signed-off-by: Anton Khirnov <anton@khirnov.net>
5 years agoChangelog: Mention the change of the default webm codecs.
Thilo Borgmann [Fri, 28 Aug 2015 04:05:41 +0000 (06:05 +0200)]
Changelog: Mention the change of the default webm codecs.

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
5 years agoconfigure: Do not let the webm muxer suggest external libraries.
Carl Eugen Hoyos [Fri, 28 Aug 2015 04:00:49 +0000 (06:00 +0200)]
configure: Do not let the webm muxer suggest external libraries.

This can fail as seen on fate and the usefulness of the suggestion is limited.