ffmpeg.git
3 years agoavcodec: remove unused avpriv_ac3_parse_header
Andreas Cadhalpun [Tue, 13 Oct 2015 23:42:06 +0000 (01:42 +0200)]
avcodec: remove unused avpriv_ac3_parse_header

It was replaced by avpriv_ac3_parse_header2.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agoavutil: install des.h, rc4.h and tree.h as public headers
Andreas Cadhalpun [Tue, 13 Oct 2015 22:31:02 +0000 (00:31 +0200)]
avutil: install des.h, rc4.h and tree.h as public headers

These headers contain functions supposed to be public.

libavutil/des.h:
 av_des_alloc
 av_des_crypt
 av_des_init
 av_des_mac
libavutil/rc4.h:
 av_rc4_alloc
 av_rc4_crypt
 av_rc4_init
libavutil/tree.h
 av_tree_destroy
 av_tree_enumerate
 av_tree_find
 av_tree_insert
 av_tree_node_alloc
 av_tree_node_size

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3 years agodnxhdenc: Optimize get_pixels_8x4_sym for 10-bit
Timothy Gu [Tue, 29 Sep 2015 23:50:02 +0000 (16:50 -0700)]
dnxhdenc: Optimize get_pixels_8x4_sym for 10-bit

This reverts commit 628e6d0164febc8e69b0f10dfa487e8a2dd1a28a and uses
a better fix.

Before:
4483 decicycles in get_pixels_8x4_sym,  131032 runs,     40 skips

After:
2569 decicycles in get_pixels_8x4_sym,  131054 runs,     18 skips

3 years agodca_parser: don't overwrite the sample rate, it may not be correct
Hendrik Leppkes [Wed, 30 Sep 2015 11:09:01 +0000 (13:09 +0200)]
dca_parser: don't overwrite the sample rate, it may not be correct

The parser only reads the dca core sample rate, which is limited to a
maximum of 48000 Hz, while X96 and HD extensions can increase the sample
rate up to 192000 Hz.

This change prevents the parser and decoder fighting over the sample rate,
potentially confusing user applications. This also fixes sample rate
display of >48000Hz files with ffmpeg/ffprobe when using libdcadec.

Fixes ticket #4397

3 years agoavformat/mp3dec: improve junk skipping heuristic
wm4 [Tue, 20 Oct 2015 10:17:21 +0000 (12:17 +0200)]
avformat/mp3dec: improve junk skipping heuristic

Commit 2b3e9bbfb529e6bde238aeb511b55ebe461664c8 caused problems for a
certain API user:

https://code.google.com/p/chromium/issues/detail?id=537725
https://code.google.com/p/chromium/issues/detail?id=542032

The problem seems rather arbitrary, because if there's junk, anything
can happen. In this case, the imperfect junk skipping just caused it to
read different junk, from what I can see.

We can improve the accuracy of junk detection by a lot by checking if 2
consecutive frames use the same configuration. While in theory it might
be completely fine for the 1st frame to have a different format than the
2nd frame, it's exceedingly unlikely, and I can't think of a legitimate
use-case.

This is approximately the same mpg123 does for junk skipping. The
set of compared header bits is the same as the libavcodec mp3 parser
uses for similar purposes.

3 years agoavformat: add wve demuxer
Paul B Mahol [Sun, 18 Oct 2015 22:03:10 +0000 (00:03 +0200)]
avformat: add wve demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat: add msf demuxer
Paul B Mahol [Sat, 17 Oct 2015 19:41:18 +0000 (21:41 +0200)]
avformat: add msf demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agocompat/solaris/make_sunver.pl: Use /usr/bin/env perl instead of /usr/bin/perl
Michael Niedermayer [Sun, 18 Oct 2015 00:20:32 +0000 (02:20 +0200)]
compat/solaris/make_sunver.pl: Use /usr/bin/env perl instead of /usr/bin/perl

This is how the other perl scripts in git call perl

Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agohuffyuvencdsp: Use intptr_t for width
Timothy Gu [Mon, 19 Oct 2015 01:12:28 +0000 (02:12 +0100)]
huffyuvencdsp: Use intptr_t for width

It is done this way in huffyuvdsp as well.

3 years agox86: vc1dsp_mmx: Move yasm initiation steps to vc1dsp_init
Timothy Gu [Sat, 17 Oct 2015 23:38:00 +0000 (16:38 -0700)]
x86: vc1dsp_mmx: Move yasm initiation steps to vc1dsp_init

That's where all yasm initiation steps are. Also removes the overlap
between the two files.

3 years agox86: fpel: Remove erroneous ff_put_pixels8_mmxext prototype
Timothy Gu [Sat, 17 Oct 2015 23:34:07 +0000 (16:34 -0700)]
x86: fpel: Remove erroneous ff_put_pixels8_mmxext prototype

This function does not exist.

3 years agox86: fpel: Move prototypes for 4-px block functions
Timothy Gu [Sat, 17 Oct 2015 23:32:08 +0000 (16:32 -0700)]
x86: fpel: Move prototypes for 4-px block functions

3 years agoavcodec/mpegaudio_parser: Update comment to match code
Michael Niedermayer [Mon, 19 Oct 2015 20:14:10 +0000 (22:14 +0200)]
avcodec/mpegaudio_parser: Update comment to match code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agovp9_parser: fix endless loop w/0-sized frame
James Zern [Fri, 16 Oct 2015 22:28:55 +0000 (15:28 -0700)]
vp9_parser: fix endless loop w/0-sized frame

treat this the same as an over-sized superframe packet to break out of
the parser loop and allow the decoder to fail.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Zern <jzern@google.com>
3 years agolavu/intmath.h: Move x86 only msvc/icl functions to x86 specific header.
Matt Oliver [Fri, 16 Oct 2015 06:00:13 +0000 (17:00 +1100)]
lavu/intmath.h: Move x86 only msvc/icl functions to x86 specific header.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
3 years agolavu/intmath.h: Add msvc/icl ctzll optimisations.
Matt Oliver [Fri, 16 Oct 2015 05:58:43 +0000 (16:58 +1100)]
lavu/intmath.h: Add msvc/icl ctzll optimisations.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
3 years agoavutil/opt: display a better default value for int/int64 options
Clément Bœsch [Sat, 17 Oct 2015 12:54:31 +0000 (14:54 +0200)]
avutil/opt: display a better default value for int/int64 options

Example:

% ./ffmpeg -h encoder=aac
  -aac_coder         <int>        E...A... Coding algorithm (from -1 to 3) (default twoloop)
     faac                         E...A... FAAC-inspired method
     anmr                         E...A... ANMR method
     twoloop                      E...A... Two loop searching method
     fast                         E...A... Constant quantizer
[...]

3 years agoavfilter/af_flanger: free frame on ENOMEM
Kyle Swanson [Thu, 15 Oct 2015 15:08:36 +0000 (10:08 -0500)]
avfilter/af_flanger: free frame on ENOMEM

Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil: use EINVAL instead of -1 for the return code of crypto related init functions
Ganesh Ajjanagadde [Thu, 15 Oct 2015 23:36:22 +0000 (19:36 -0400)]
avutil: use EINVAL instead of -1 for the return code of crypto related init functions

These functions return an error typically when the key size is an
incorrect number. AVERROR(EINVAL) is more specific than -1.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavformat/vag: Remove unused variable pos
Michael Niedermayer [Sat, 17 Oct 2015 21:35:29 +0000 (23:35 +0200)]
avformat/vag: Remove unused variable pos

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter: add zscale filter
Paul B Mahol [Mon, 21 Sep 2015 13:34:15 +0000 (15:34 +0200)]
avfilter: add zscale filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/bitstream: replace qsort with AV_QSORT
Ganesh Ajjanagadde [Sun, 18 Oct 2015 01:22:59 +0000 (21:22 -0400)]
avcodec/bitstream: replace qsort with AV_QSORT

Commit 3a0a2f33a6c955823fa4fb12c0b49cd29a496659 claims large performance
advantages for AV_QSORT over libc's qsort. The reason is that I suspect
that libc's qsort (at least on non LTO builds, like the typical FFmpeg config)
can't inline the comparison callback:
https://stackoverflow.com/questions/5290695/is-there-any-way-a-c-c-compiler-can-inline-a-c-callback-function.
AV_QSORT has two things going for it:
1. The guaranteed inlining of qsort itself. This yields a negligible
boost that may be ignored.
2. The more serious possibility of potentially allowing the comparison
function to be inlined - this is likely responsible for the large boosts
reported.

There is a comment explaining that this is a place that could use some
performance improvement. Thus AV_QSORT is used to achieve that.

Benchmarks deemed unnecessary due to existing claims about AV_QSORT.
Tested with FATE.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoconfigure: Simplify using --disable-all.
Carl Eugen Hoyos [Sun, 18 Oct 2015 12:27:51 +0000 (14:27 +0200)]
configure: Simplify using --disable-all.

libavutil was always built, allow its dependencies to be enabled.

3 years agoavcodec/adpcm: increase max channels for ADPCM PSX to 8
Paul B Mahol [Sun, 18 Oct 2015 12:10:26 +0000 (14:10 +0200)]
avcodec/adpcm: increase max channels for ADPCM PSX to 8

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/rsd: add VAG support
Paul B Mahol [Sun, 18 Oct 2015 11:45:10 +0000 (13:45 +0200)]
avformat/rsd: add VAG support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agolibavcodec/mpegvideo_enc.c: Fix encoding videos with less frames than the delay of...
Alexis Ballier [Fri, 16 Oct 2015 08:42:33 +0000 (10:42 +0200)]
libavcodec/mpegvideo_enc.c: Fix encoding videos with less frames than the delay of the encoder.

When the encoder is fed with less frames than its delay, the picture list looks like { NULL, NULL, ..., frame, frame, frame }. When flushing the encoder (input frame == NULL), we need to ensure the picture list is shifted enough so that we do not return an empty packet, which would mean the encoder has finished, while it has not encoded any frame.

Before the patch, the command:
'./ffmpeg_g -loglevel debug -f lavfi -i "testsrc=d=0.01" -bf 2 -vcodec mpeg2video out.mxf' prints:

Output stream #0:0 (video): 1 frames encoded; 0 packets muxed (0 bytes);

After:

Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (8058 bytes);

Relates to ticket #4817.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpegvideo_enc: Merge ifs with identical conditions
Michael Niedermayer [Sun, 18 Oct 2015 09:44:42 +0000 (11:44 +0200)]
avcodec/mpegvideo_enc: Merge ifs with identical conditions

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpegvideo_enc: Factor new_picture unref out
Michael Niedermayer [Sun, 18 Oct 2015 09:42:32 +0000 (11:42 +0200)]
avcodec/mpegvideo_enc: Factor new_picture unref out

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/af_ladspa: check functions return value in query_formats
Paul B Mahol [Sun, 18 Oct 2015 00:00:21 +0000 (02:00 +0200)]
avfilter/af_ladspa: check functions return value in query_formats

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/internal: Doxygen for ff_fmt_is_in
Ganesh Ajjanagadde [Thu, 15 Oct 2015 02:56:54 +0000 (22:56 -0400)]
avfilter/internal: Doxygen for ff_fmt_is_in

This clarifies and adds Doxygen for ff_fmt_is_in.

Reviewed-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoaacenc_ltp: adjust and speed up autocorrelation calculations
Rostislav Pehlivanov [Sat, 17 Oct 2015 21:50:55 +0000 (22:50 +0100)]
aacenc_ltp: adjust and speed up autocorrelation calculations

There were some errors in the calculation as well as an entire
unnecessary loop to find the gain coefficient. Merge the
two loops.
Thanks to @ubitux for the suggestions and testing.

3 years agompegts: Make the sdt_period a double
Derek Buitenhuis [Fri, 16 Oct 2015 19:09:20 +0000 (15:09 -0400)]
mpegts: Make the sdt_period a double

Having it as a float didn't even allow enough precision to check
for INT_MAX/2.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agompegts: Make the pat_period a double
Derek Buitenhuis [Fri, 16 Oct 2015 19:09:19 +0000 (15:09 -0400)]
mpegts: Make the pat_period a double

Having it as a float didn't even allow enough precision to check
for INT_MAX/2.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
3 years agoavformat/vag: fix demuxing stereo files
Paul B Mahol [Sat, 17 Oct 2015 18:00:35 +0000 (20:00 +0200)]
avformat/vag: fix demuxing stereo files

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/aacenc: Fix "libavcodec/aacenc.c:540:13: warning: ISO C90 forbids mixed decla...
Michael Niedermayer [Sat, 17 Oct 2015 11:40:04 +0000 (13:40 +0200)]
avcodec/aacenc: Fix "libavcodec/aacenc.c:540:13: warning: ISO C90 forbids mixed declarations and code"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotests/fate-run: Remove ./ from run ffmpeg call
Michael Niedermayer [Sat, 17 Oct 2015 10:59:08 +0000 (12:59 +0200)]
tests/fate-run: Remove ./ from run ffmpeg call

This makes it consistent with ffprobe

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoconcatdec: fix file_start_time calculation regression
Marton Balint [Tue, 13 Oct 2015 20:56:00 +0000 (22:56 +0200)]
concatdec: fix file_start_time calculation regression

Fixes ticket #4924.

Found-by: Jaroslav Šnajdr <jsnajdr@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
3 years agoavfilter/internal: add av_warn_unused_result
Ganesh Ajjanagadde [Thu, 15 Oct 2015 03:00:02 +0000 (23:00 -0400)]
avfilter/internal: add av_warn_unused_result

av_warn_unused_result is added to functions whose return status should
be checked. Currently does not trigger any warnings, but should be
useful for future robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agochromakey: Use the pixel descriptor API for chroma subsampling info
Timothy Gu [Wed, 14 Oct 2015 04:31:47 +0000 (21:31 -0700)]
chromakey: Use the pixel descriptor API for chroma subsampling info

3 years agolibavformat/Makefile: remove unnecessary object file from wtv demuxer
Hendrik Leppkes [Thu, 15 Oct 2015 22:09:06 +0000 (00:09 +0200)]
libavformat/Makefile: remove unnecessary object file from wtv demuxer

The wtv demuxer doesn't reference any functionality from asfdec or asfcrypt

3 years agoavfilter/selectivecolor: fix correction_method option range
Clément Bœsch [Sat, 17 Oct 2015 13:01:23 +0000 (15:01 +0200)]
avfilter/selectivecolor: fix correction_method option range

3 years agoaacenc_ltp: correct header description comment
Rostislav Pehlivanov [Sat, 17 Oct 2015 12:28:55 +0000 (13:28 +0100)]
aacenc_ltp: correct header description comment

3 years agofate: use -profile:a aac_ltp instead of -aac_ltp 1 for LTP encode test
Rostislav Pehlivanov [Sat, 17 Oct 2015 11:30:53 +0000 (12:30 +0100)]
fate: use -profile:a aac_ltp instead of -aac_ltp 1 for LTP encode test

The fate test command line is supposed to serve as an example. It's
nicer to explicitly state the profile rather than setting options
to force it for you.

3 years agoaacenc_ltp: replace av_clip() with av_clip_uintp2()
Rostislav Pehlivanov [Sat, 17 Oct 2015 11:24:16 +0000 (12:24 +0100)]
aacenc_ltp: replace av_clip() with av_clip_uintp2()

Suggested by ubitux.
Convenient.

3 years agoaacenc_ltp: fix assertion
Rostislav Pehlivanov [Sat, 17 Oct 2015 10:58:33 +0000 (11:58 +0100)]
aacenc_ltp: fix assertion

A value of 2048 will overflow 11 bits.

3 years agoavformat/rsd: Check av_new_packet() return value
Michael Niedermayer [Sat, 17 Oct 2015 10:11:16 +0000 (12:11 +0200)]
avformat/rsd: Check av_new_packet() return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/genh: Check av_new_packet() return value
Michael Niedermayer [Sat, 17 Oct 2015 00:44:43 +0000 (02:44 +0200)]
avformat/genh: Check av_new_packet() return value

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotests/fate-run: Remove PROGSUF from function calls
Michael Niedermayer [Sat, 17 Oct 2015 10:25:48 +0000 (12:25 +0200)]
tests/fate-run: Remove PROGSUF from function calls

Fixes make fate V=2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agofate: increase fuzz on AAC LTP encoding test
Rostislav Pehlivanov [Sat, 17 Oct 2015 10:23:22 +0000 (11:23 +0100)]
fate: increase fuzz on AAC LTP encoding test

Fails on some newer systems (archlinux with a modern GCC version).

3 years agofate: add a parameter to disable TNS for the other encoder tests
Rostislav Pehlivanov [Sat, 17 Oct 2015 10:08:56 +0000 (11:08 +0100)]
fate: add a parameter to disable TNS for the other encoder tests

Since it became the default option, in order to prevent interference
with the other tests, disable it.

3 years agoaacenc_tns: enable Temporal Noise Shaping by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 10:06:05 +0000 (11:06 +0100)]
aacenc_tns: enable Temporal Noise Shaping by default

In light of the recent changes to the TNS system, it has been
deemed worthy and robust enough to be turned on by default.

3 years agofate: adjust the target for the new TNS changes
Rostislav Pehlivanov [Sat, 17 Oct 2015 10:05:36 +0000 (11:05 +0100)]
fate: adjust the target for the new TNS changes

3 years agoaacenc_tns: rework TNS descision logic
Rostislav Pehlivanov [Sat, 17 Oct 2015 09:59:35 +0000 (10:59 +0100)]
aacenc_tns: rework TNS descision logic

Changes:
 - strongly prefer dual filters to a single filter
 - less strict about using 2 filters w.r.t. energy
 - scrap the usage of threshold and spread, useless
 - use odd-shaped windows to set the filter direction
 - use 4 bits instead of 3 bits for short windows
 - simplify and reduce the main loop to a single level
 - add stricter regulations for short windows

All of this now makes the TNS implementation operate
as good as it can and it definitely shows. The frequency
thresholds are now even better defined by looking at
the spectrals and the overall sound has been improved at
the price of just a few bits that are well worth it.

3 years agoaacenc_tns: simplify encoding function
Rostislav Pehlivanov [Sat, 17 Oct 2015 09:58:06 +0000 (10:58 +0100)]
aacenc_tns: simplify encoding function

It's simpler and has 2 less levels than the previous which
was practically lifted from the decoder with put_bits() instead
of get_bits().

3 years agoaacenc_tns: disable coefficient compression by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 09:55:19 +0000 (10:55 +0100)]
aacenc_tns: disable coefficient compression by default

Too much effort and work has been spent on such a simple function.
It simply refuses to work as the specifications say, the
transformation is NOT lossless and creates some crackling and
distortions.
Therefore disable it by default and add a couple of warnings to
scare people away from touching it or wasting their time the
way I did.

3 years agoaacenc_tns: add moving average filter for LTP
Rostislav Pehlivanov [Sat, 17 Oct 2015 09:50:41 +0000 (10:50 +0100)]
aacenc_tns: add moving average filter for LTP

The decoder does this so I guess we better do that as well.
There's barely any difference between the autoregressive and
the moving average filters looking at spectrals though.

3 years agoopencl: Force the use of 1.2 APIs
Timothy Gu [Mon, 12 Oct 2015 09:50:18 +0000 (02:50 -0700)]
opencl: Force the use of 1.2 APIs

Silences warnings regarding `clCreateCommandQueue` being deprecated.

Only a very limited number of products support 2.0. Since the
replacement API (`clCreateCommandQueueWithProperties`) is only available
in 2.0, we should not update it just yet.

3 years agoopencl: Use "opencl" as log context name
Timothy Gu [Mon, 12 Oct 2015 09:44:40 +0000 (02:44 -0700)]
opencl: Use "opencl" as log context name

All other classes use lowercase names.

3 years agoopencl: Print compilation log
Timothy Gu [Mon, 12 Oct 2015 09:41:15 +0000 (02:41 -0700)]
opencl: Print compilation log

Useful when debugging.

3 years agoopencl: Print error string when compilation fails
Timothy Gu [Mon, 12 Oct 2015 09:38:49 +0000 (02:38 -0700)]
opencl: Print error string when compilation fails

3 years agoaacenc: increase fuzz on aac-ms-encode test
Rostislav Pehlivanov [Sat, 17 Oct 2015 05:55:19 +0000 (06:55 +0100)]
aacenc: increase fuzz on aac-ms-encode test

GCC 3.4 miscompiles it on sunos. Date of release? The second of
August two thousand and five, anno Domini. That's ten years two
months and fourteen days ago. Three thousand seven hundred and
twenty seven days ago. One sixth of the average life expectancy
of a person living in a country with a human development index
of zero point eight hundred and eight, equality adjusted.
GCC 4.3 also miscompiles it, though not as bad.

3 years agofate: adjust aac encoder test values and introduce MS and LTP tests
Rostislav Pehlivanov [Sat, 17 Oct 2015 04:59:19 +0000 (05:59 +0100)]
fate: adjust aac encoder test values and introduce MS and LTP tests

The LTP encoding and the test is a bit slow currently, taking twice
the amount of time the other tests do, so in the future the
total time to encode might be cut down on that test.

3 years agoaacenc: partially revert previous commits to set options via a profile
Rostislav Pehlivanov [Sat, 17 Oct 2015 02:15:44 +0000 (03:15 +0100)]
aacenc: partially revert previous commits to set options via a profile

It didn't work out because of the exceptions that needed to be made
for the "-1" cases and was overall more confusing that just manually
checking and setting options for each profile.

3 years agoavfilter/avfiltergraph: fix -Wunused-result warnings
Ganesh Ajjanagadde [Thu, 15 Oct 2015 02:26:38 +0000 (22:26 -0400)]
avfilter/avfiltergraph: fix -Wunused-result warnings

Commit bf0d2d6030c239f91e0368a20fb2dc0705bfec99 introduced
av_warn_unused_result to avfilter/formats, whose associated warnings
were mostly fixed in 6aaac24d72a7da631173209841a3944fcb4a3309. This
fixes the issues in avfilter/avfiltergraph.

Tested with FATE.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoaacenc: add support for encoding files using Long Term Prediction
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:22:51 +0000 (02:22 +0100)]
aacenc: add support for encoding files using Long Term Prediction

Long Term Prediction allows for prediction of spectral coefficients
via the previously decoded time-dependent samples. This feature
works well with harmonic content 2 or more frames long, like speech,
human or non-human, piano music or any constant tones at very low
bitrates.

It should be noted that the current coder is highly efficient and
the rate control system is unable to encode files at extremely
low bitrates (less than 14kbps seems to be impossible) so this
extension isn't capable of optimum operation. Dramatic difference
is observable with some types of audio and speech but for the most
part the audiable differences are subtle. The spectrum looks better
however so the encoder is able to harvest the additional bits that
this feature provies, should the user choose to enable it. So
it's best to enable this feature only if encoding at the absolutely
lowest bitrate that the encoder is capable of.

3 years agoaacenc: (re)enable Mid/Side coding by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:20:13 +0000 (02:20 +0100)]
aacenc: (re)enable Mid/Side coding by default

Apparently it was set to be enabled by default but after the
profile commits it was reverted to be off by default because
I didn't notice.
Works well so (re)enable it.

3 years agoaacenc_pred: only print predictor information if profile is aac_main
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:15:44 +0000 (02:15 +0100)]
aacenc_pred: only print predictor information if profile is aac_main

Needed because LTP uses predictor_present as well.

3 years agoaacenc: correctly zero prediction_used array
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:14:10 +0000 (02:14 +0100)]
aacenc: correctly zero prediction_used array

An oversight, probably because of copy-pasting the TNS line.

3 years agoaacenc: slightly simplify and remove a redundant variable
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:13:00 +0000 (02:13 +0100)]
aacenc: slightly simplify and remove a redundant variable

Functionally identical, doesn't change anything.

3 years agoaacenc_pred: correct header information
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:10:56 +0000 (02:10 +0100)]
aacenc_pred: correct header information

3 years agoaacenc: indicate that TNS is off by default
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:08:34 +0000 (02:08 +0100)]
aacenc: indicate that TNS is off by default

Doesn't change anything, just a slight clarification that
under all profiles TNS is currently off. That'll be soon to change
hopefully.

3 years agoaactab: move ltp_coef[] from aacdectab to aactab
Rostislav Pehlivanov [Sat, 17 Oct 2015 01:06:09 +0000 (02:06 +0100)]
aactab: move ltp_coef[] from aacdectab to aactab

The encoder makes use of it in the following commits.

3 years agoavcodec/ffv1: Initialize vlc_state on allocation
Michael Niedermayer [Sat, 17 Oct 2015 00:13:42 +0000 (02:13 +0200)]
avcodec/ffv1: Initialize vlc_state on allocation

This ensures that they are always set to valid values
Fixes Ticket4939

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil/mem: add av_warn_unused_result
Ganesh Ajjanagadde [Thu, 15 Oct 2015 21:38:03 +0000 (17:38 -0400)]
avutil/mem: add av_warn_unused_result

This adds av_warn_unused_result to functions whose return codes need to
be checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavutil: undo FF_API_CRYPTO_CONTEXT deprecation
James Almer [Fri, 16 Oct 2015 06:04:20 +0000 (03:04 -0300)]
avutil: undo FF_API_CRYPTO_CONTEXT deprecation

It's been argued that the benefits of the current implementation far outweight
those of making the structs opaque.

This deprecation is not present in any release, so it can be safely removed.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavdevice/internal: add av_warn_unused_result
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:49:30 +0000 (21:49 -0400)]
avdevice/internal: add av_warn_unused_result

This does not trigger any warnings but adds robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavutil/file: add av_warn_unused_result to av_file_map
Ganesh Ajjanagadde [Thu, 15 Oct 2015 22:18:02 +0000 (18:18 -0400)]
avutil/file: add av_warn_unused_result to av_file_map

The return code here should be checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoavutil/internal: add av_warn_unused_result to avpriv_open
Ganesh Ajjanagadde [Thu, 15 Oct 2015 21:49:48 +0000 (17:49 -0400)]
avutil/internal: add av_warn_unused_result to avpriv_open

The open syscall can obviously fail, and its return code needs to be
checked.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoswscale/swscale: add av_warn_unused_result to sws_init_context
Ganesh Ajjanagadde [Fri, 16 Oct 2015 01:44:22 +0000 (21:44 -0400)]
swscale/swscale: add av_warn_unused_result to sws_init_context

This should not trigger any warnings; but adds robustness.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
3 years agoMerge commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:59 +0000 (23:04 +0200)]
Merge commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f'

* commit '68e00ad66d13c57d9eb3a3862b44ab3fb030e19f':
  w32pthreads: fix mingw build on x86 with -msse2 or higher

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'b52307933b576eba741c80108c3dad09eb48ba12'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:46 +0000 (23:04 +0200)]
Merge commit 'b52307933b576eba741c80108c3dad09eb48ba12'

* commit 'b52307933b576eba741c80108c3dad09eb48ba12':
  wrapped_avframe: Drop a now-unused variable

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db'
Hendrik Leppkes [Fri, 16 Oct 2015 21:04:14 +0000 (23:04 +0200)]
Merge commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db'

* commit '49d7fcd774ac31f242818ad9d45d9c013f3bb3db':
  mpeg12: Unbreak building stale code

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '504e3f75bf73a488d39a80a42962bae2a353dd6b'
Hendrik Leppkes [Fri, 16 Oct 2015 21:03:49 +0000 (23:03 +0200)]
Merge commit '504e3f75bf73a488d39a80a42962bae2a353dd6b'

* commit '504e3f75bf73a488d39a80a42962bae2a353dd6b':
  aac: Make codec init run under ff_thread_once

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea'
Hendrik Leppkes [Fri, 16 Oct 2015 21:00:11 +0000 (23:00 +0200)]
Merge commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea'

* commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea':
  fate: Move screenpresso to the appropriate screen capture file

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '2d59159508c5c1830cc5da907a9454e229077320'
Hendrik Leppkes [Fri, 16 Oct 2015 20:58:24 +0000 (22:58 +0200)]
Merge commit '2d59159508c5c1830cc5da907a9454e229077320'

* commit '2d59159508c5c1830cc5da907a9454e229077320':
  lavc: AV-prefix a few left out capabilities

Not applied, since this change breaks compilation and is not correct.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit '9ef748173a4e0e58d40afaf38397783cd2537eaa'
Hendrik Leppkes [Fri, 16 Oct 2015 20:57:21 +0000 (22:57 +0200)]
Merge commit '9ef748173a4e0e58d40afaf38397783cd2537eaa'

* commit '9ef748173a4e0e58d40afaf38397783cd2537eaa':
  cmdutils: Print general codec capabilities

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoMerge commit 'e240a28b20680b326a39b0860fda37d7e459bfc0'
Hendrik Leppkes [Fri, 16 Oct 2015 20:46:23 +0000 (22:46 +0200)]
Merge commit 'e240a28b20680b326a39b0860fda37d7e459bfc0'

* commit 'e240a28b20680b326a39b0860fda37d7e459bfc0':
  cmdutils: Add auto to threading capabilities report

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
3 years agoavcodec/ffv1dec: update progress in case of broken pointer chains
Michael Niedermayer [Fri, 16 Oct 2015 20:25:20 +0000 (22:25 +0200)]
avcodec/ffv1dec: update progress in case of broken pointer chains

Fixes deadlock
Fixes Ticket4932

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding...
Michael Niedermayer [Fri, 16 Oct 2015 18:15:48 +0000 (20:15 +0200)]
avcodec/ffv1dec: Clear slice coordinates if they are invalid or slice header decoding fails for other reasons

Fixes Ticket4931

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/rsd: propagate return values of extradata helper functions
James Almer [Fri, 16 Oct 2015 19:09:10 +0000 (16:09 -0300)]
avformat/rsd: propagate return values of extradata helper functions

They can return errors other than ENOMEM

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/nvenc: fix b frame n_quant_offset
Agatha Hu [Fri, 16 Oct 2015 16:23:51 +0000 (18:23 +0200)]
avcodec/nvenc: fix b frame n_quant_offset

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
3 years agow32pthreads: fix mingw build on x86 with -msse2 or higher
Hendrik Leppkes [Wed, 14 Oct 2015 21:18:17 +0000 (23:18 +0200)]
w32pthreads: fix mingw build on x86 with -msse2 or higher

When SSE2 or higher compiler optimizations are used, mingw uses
the _mm_mfence intrinsic for MemoryBarrier, however it doesn't include
the appropriate headers automatically.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agowrapped_avframe: Drop a now-unused variable
Luca Barbato [Fri, 16 Oct 2015 12:45:45 +0000 (14:45 +0200)]
wrapped_avframe: Drop a now-unused variable

3 years agompeg12: Unbreak building stale code
Luca Barbato [Fri, 16 Oct 2015 06:45:04 +0000 (08:45 +0200)]
mpeg12: Unbreak building stale code

Broken in 2d59159508c5c1830cc5da907a9454e229077320

3 years agoavformat: add svag demuxer
Paul B Mahol [Fri, 16 Oct 2015 12:01:53 +0000 (14:01 +0200)]
avformat: add svag demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat/rsd: add WADP support
Paul B Mahol [Thu, 15 Oct 2015 22:09:02 +0000 (00:09 +0200)]
avformat/rsd: add WADP support

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat: add ads demuxer
Paul B Mahol [Wed, 14 Oct 2015 09:58:38 +0000 (11:58 +0200)]
avformat: add ads demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat: add vag demuxer
Paul B Mahol [Tue, 13 Oct 2015 10:52:54 +0000 (12:52 +0200)]
avformat: add vag demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavformat: add genh demuxer
Paul B Mahol [Mon, 12 Oct 2015 20:58:05 +0000 (22:58 +0200)]
avformat: add genh demuxer

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec: add ADPCM PSX decoder
Paul B Mahol [Tue, 13 Oct 2015 12:16:24 +0000 (14:16 +0200)]
avcodec: add ADPCM PSX decoder

Signed-off-by: Paul B Mahol <onemda@gmail.com>