Commit Graph

76138 Commits

Author SHA1 Message Date
Matt Oliver
b0bb1dc62d lavu/intmath.h: Move x86 only msvc/icl functions to x86 specific header.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-10-19 13:40:51 +11:00
Matt Oliver
216cc1f6fe lavu/intmath.h: Add msvc/icl ctzll optimisations.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2015-10-19 13:40:27 +11:00
Clément Bœsch
ce0a117ed4 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
[...]
2015-10-19 00:04:33 +02:00
Kyle Swanson
32403d1fab avfilter/af_flanger: free frame on ENOMEM
Signed-off-by: Kyle Swanson <k@ylo.ph>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-18 21:27:00 +02:00
Ganesh Ajjanagadde
07d4fe3a87 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>
2015-10-18 15:17:58 -04:00
Michael Niedermayer
94f7c97e05 avformat/vag: Remove unused variable pos
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-18 20:43:02 +02:00
Paul B Mahol
416e35e5aa avfilter: add zscale filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 18:01:56 +02:00
Ganesh Ajjanagadde
e11e32686f avcodec/bitstream: replace qsort with AV_QSORT
Commit 3a0a2f33a6 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>
2015-10-18 09:22:49 -04:00
Carl Eugen Hoyos
9496f565dc configure: Simplify using --disable-all.
libavutil was always built, allow its dependencies to be enabled.
2015-10-18 14:27:51 +02:00
Paul B Mahol
7bbd060324 avcodec/adpcm: increase max channels for ADPCM PSX to 8
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 14:17:15 +02:00
Paul B Mahol
bb1d3f1078 avformat/rsd: add VAG support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 14:17:14 +02:00
Alexis Ballier
6e8d856ad6 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>
2015-10-18 11:55:40 +02:00
Michael Niedermayer
fd46d6deac avcodec/mpegvideo_enc: Merge ifs with identical conditions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-18 11:44:42 +02:00
Michael Niedermayer
b379e1d6df avcodec/mpegvideo_enc: Factor new_picture unref out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-18 11:42:32 +02:00
Paul B Mahol
002b0499b6 avfilter/af_ladspa: check functions return value in query_formats
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-18 02:01:44 +02:00
Ganesh Ajjanagadde
62144b225d 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>
2015-10-17 18:58:38 -04:00
Rostislav Pehlivanov
7303962f14 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.
2015-10-17 22:53:11 +01:00
Derek Buitenhuis
4ffdba2418 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>
2015-10-17 15:02:40 -04:00
Derek Buitenhuis
516d34de42 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>
2015-10-17 15:02:06 -04:00
Paul B Mahol
c37d2cd01c avformat/vag: fix demuxing stereo files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-10-17 20:02:09 +02:00
Michael Niedermayer
c38a6077ee avcodec/aacenc: Fix "libavcodec/aacenc.c:540:13: warning: ISO C90 forbids mixed declarations and code"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-17 18:58:11 +02:00
Michael Niedermayer
66d3666803 tests/fate-run: Remove ./ from run ffmpeg call
This makes it consistent with ffprobe

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-17 18:58:11 +02:00
Marton Balint
df239b7619 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>
2015-10-17 18:38:52 +02:00
Ganesh Ajjanagadde
01790484c1 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>
2015-10-17 12:27:45 -04:00
Timothy Gu
ed53c14a3c chromakey: Use the pixel descriptor API for chroma subsampling info 2015-10-17 07:43:23 -07:00
Hendrik Leppkes
a8e86b0e3f libavformat/Makefile: remove unnecessary object file from wtv demuxer
The wtv demuxer doesn't reference any functionality from asfdec or asfcrypt
2015-10-17 15:38:27 +02:00
Clément Bœsch
8c9c8fd035 avfilter/selectivecolor: fix correction_method option range 2015-10-17 15:01:57 +02:00
Rostislav Pehlivanov
4c9805538d aacenc_ltp: correct header description comment 2015-10-17 13:28:55 +01:00
Rostislav Pehlivanov
b1d290920d 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.
2015-10-17 12:30:53 +01:00
Rostislav Pehlivanov
b0a3c614b4 aacenc_ltp: replace av_clip() with av_clip_uintp2()
Suggested by ubitux.
Convenient.
2015-10-17 12:24:16 +01:00
Rostislav Pehlivanov
780dba01f9 aacenc_ltp: fix assertion
A value of 2048 will overflow 11 bits.
2015-10-17 12:00:30 +01:00
Michael Niedermayer
92a26261d1 avformat/rsd: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-17 12:56:47 +02:00
Michael Niedermayer
acf23d9451 avformat/genh: Check av_new_packet() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-17 12:56:47 +02:00
Michael Niedermayer
58b19b6f63 tests/fate-run: Remove PROGSUF from function calls
Fixes make fate V=2

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-17 12:56:47 +02:00
Rostislav Pehlivanov
6eff30b0bc fate: increase fuzz on AAC LTP encoding test
Fails on some newer systems (archlinux with a modern GCC version).
2015-10-17 11:23:22 +01:00
Rostislav Pehlivanov
d4da15563f 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.
2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
dfba1be963 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.
2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
8ce6e24db4 fate: adjust the target for the new TNS changes 2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
fa4d900c27 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.
2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
bf39beca87 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().
2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
f3ad901a32 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.
2015-10-17 11:10:26 +01:00
Rostislav Pehlivanov
8d18d28918 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.
2015-10-17 11:10:26 +01:00
Timothy Gu
801eca1372 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.
2015-10-17 01:16:50 -07:00
Timothy Gu
17c68933f4 opencl: Use "opencl" as log context name
All other classes use lowercase names.
2015-10-17 01:16:50 -07:00
Timothy Gu
893a648182 opencl: Print compilation log
Useful when debugging.
2015-10-17 01:16:50 -07:00
Timothy Gu
d2a1029724 opencl: Print error string when compilation fails 2015-10-17 01:16:50 -07:00
Rostislav Pehlivanov
590008e696 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.
2015-10-17 06:55:19 +01:00
Rostislav Pehlivanov
777b305bed 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.
2015-10-17 05:59:19 +01:00
Rostislav Pehlivanov
e9299df7a6 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.
2015-10-17 03:17:27 +01:00
Ganesh Ajjanagadde
3835554bf8 avfilter/avfiltergraph: fix -Wunused-result warnings
Commit bf0d2d6030 introduced
av_warn_unused_result to avfilter/formats, whose associated warnings
were mostly fixed in 6aaac24d72. 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>
2015-10-16 21:58:50 -04:00