Commit Graph

3807 Commits

Author SHA1 Message Date
Clément Bœsch 77eeaa2c3d lavf/srtdec: rewrite parsing logic
Fixes Ticket #5032

The samples in Ticket #5032 is using \r\r\n as line breaks.  Since we
already are handling \r, or \n, or \r\n as line breaks, \r\n\n will be
considered as a double line breaks. This is an issue because
ff_subtitles_read_text_chunk() will as a result stop extracting a chunk
after just one line.

So instead of parsing the SRT by "chunks" (which means splitting every
double LB), this new parser is detecting timing lines, and split the
events on this basis. While this sounds safe and simple, it needs to
take into account the event number preceding the timing line while
handling situations such as:

 - event number starting at 0 or actually any number instead of 1
 - event numbers not being ordered at all
 - event number being followed by text garbage (this really happened,
   see Ticket #4898)
 - event payload containing one or multiple number (a protagonist saying
   a count-down, a date or whatever) which could be confused with a
   chapter number
 - event number being empty (see Ticket #2167)
 - all kind of weird line breaks can appear randomly like wild pokémons
 - untrustable line breaks (Ticket #5032)

The sample madness.srt tries to sum up most of this into one sample,
ticket5032-rrn.srt is the file containing \r\r\n line breaks. and
empty-events-2167.srt contains empty events.
2016-01-01 18:31:49 +01:00
Janne Grunau f0f54117c8 checkasm: x86: post commit review fixes
Check the full FPU tag word instead of only the lower half and simplify
the comparison.
Use upper-case function base name as macro name to instantiate both
checked_call variants.
2015-12-29 12:50:38 +01:00
Alexandra Hájková 2008f76054 dca: remove unused decode_hf function and quant_d tables
They were superseded with their integer equivalents. Rename integer
decode_hf to decode_hf.
2015-12-24 13:58:18 +01:00
Alexandra Hájková aebf07075f dca: change the core to work with integer coefficients.
The DCA core decoder converts integer coefficients read from the
bitstream to floats just after reading them (along with dequantization).
All the other steps of the audio reconstruction are done with floats
which makes the output for the DTS lossless extension (XLL)
actually lossy.
This patch changes the DCA core to work with integer coefficients
until QMF. At this point the integer coefficients are converted to floats.
The coefficients for the LFE channel (lfe_data) are not touched.
This is the first step for the really lossless XLL decoding.
2015-12-23 11:50:18 +01:00
Janne Grunau 489e6add44 checkasm: add fmtconvert tests 2015-12-21 18:58:46 +01:00
Janne Grunau 568a4323fb checkasm: add synth_filter test 2015-12-21 17:40:18 +01:00
Janne Grunau e71b747e9d checkasm: add tests for dcadsp 2015-12-21 17:40:18 +01:00
Janne Grunau 9d218d573f checkasm: add float comparison util functions 2015-12-21 17:40:18 +01:00
Janne Grunau 711781d7a1 x86: checkasm: check for or handle missing cleanup after MMX instructions
Not every asm routine is expected clear the MMX state after returning.
It is however a requisite for testing floating point code in checkasm.
Annotate functions requiring cleanup with declare_func_emms() and issue
emms after the call. The remaining functions are checked for having  a
cleared MMX state after return.
2015-12-21 17:40:18 +01:00
Clément Bœsch f122ba36cb lavc: add text encoder 2015-12-21 11:14:02 +01:00
Janne Grunau e2710e790c arm: add a cpu flag for the VFPv2 vector mode
The vector mode was deprecated in ARMv7-A/VFPv3 and various cpu
implementations do not support it in hardware. Vector mode code will
depending the OS either be emulated in software or result in an illegal
instruction on cpus which does not support it. This was not really
problem in practice since NEON implementations of the same functions are
preferred. It will however become a problem for checkasm which tests
every cpu flag separately.

Since this is a cpu feature newer cpu do not support anymore the
behaviour of this flag differs from the other flags. It can be only
activated by runtime cpu feature selection.
2015-12-14 16:42:35 +01:00
Andreas Cadhalpun 28e9b7e8ae 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>
2015-12-13 23:28:53 +01:00
Jean Delvare e74f1a121e 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>
2015-12-09 12:23:00 +01:00
Matthieu Bouron 3d09065316 fate/api-jpeg-codec-param: rename to api-mjpeg-codec-param 2015-12-08 20:43:20 +01:00
Rostislav Pehlivanov 4c5136a48b aacenc_ltp: disable LTP with high lambda values
Makes no sense to enable for high bitrates, the coder does well enough.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-12-08 13:31:55 +00:00
Rostislav Pehlivanov 6e5dbe7267 aacenc_tns: use 4 bits for short windows
With only 7 coefficients per short window at most the extra precision
makes a difference and seems to reduce crackling and stddev even
further.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-12-08 13:31:50 +00:00
Matthieu Bouron 102842d5fb fate/api-{jpeg,png}-codec-param: add missing codec dependencies 2015-12-08 08:12:35 +01:00
Matthieu Bouron bd0a9f603d fate/api-codec-param: fix codec context leak 2015-12-08 08:12:35 +01:00
Clément Bœsch dc97ff8380 fate/api: add w32+os2 support for fate-api-threadmessage 2015-12-07 14:57:33 +01:00
Clément Bœsch b98305f0ab fate/api: fix fate-api-threadmessage dependency 2015-12-07 14:40:10 +01:00
Clément Bœsch a26e4215b9 fate/api: test threadmessage 2015-12-07 11:39:28 +01:00
Simon Thelen 6596c6fca7 fate: add limited_input_seek tests
Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-07 10:39:17 +01:00
Rostislav Pehlivanov a0a39acd01 fate: change the CMP_TARGETs for the recent AAC encoder changes
The case of PNS was outdated and resulted in failures on some
kdfreebds systems.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-12-06 20:16:48 +00:00
Timothy Gu b0669e7ccf fate/concatdec: Use -bitexact
Fixes FATE failures on --enable-small builds.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-06 14:37:40 +01:00
Anton Khirnov 0cef06df07 checkasm: add HEVC MC tests 2015-12-05 21:11:21 +01:00
Rostislav Pehlivanov ed08cbd7b1 aacenc_ltp: fix out of bounds memory access
Discovered by Coverity.
2015-12-03 23:12:37 +00:00
Hendrik Leppkes 46db068c59 tests/api: Fix API test build on windows with --enable-shared 2015-12-03 10:21:28 +01:00
Claudio Freire ca203e9985 AAC encoder: improve SF range utilization
This patch does 4 things, all of which interact and thus it
woudln't be possible to commit them separately without causing
either quality regressions or assertion failures.

Fate comparison targets don't all reflect improvements in
quality, yet listening tests show substantially improved quality
and stability.

1. Increase SF range utilization.

The spec requires SF delta values to be constrained within the
range -60..60. The previous code was applying that range to
the whole SF array and not only the deltas of consecutive values,
because doing so requires smarter code: zeroing or otherwise
skipping a band may invalidate lots of SF choices.

This patch implements that logic to allow the coders to utilize
the full dynamic range of scalefactors, increasing quality quite
considerably, and fixing delta-SF-related assertion failures,
since now the limitation is enforced rather than asserted.

2. PNS tweaks

The previous modification makes big improvements in twoloop's
efficiency, and every time that happens PNS logic needs to be
tweaked accordingly to avoid it from stepping all over twoloop's
decisions. This patch includes modifications of the sort.

3. Account for lowpass cutoff during PSY analysis

The closer PSY's allocation is to final allocation the better
the quality is, and given these modifications, twoloop is now
very efficient at avoiding holes. Thus, to compute accurate
thresholds, PSY needs to account for the lowpass applied
implicitly during twoloop (by zeroing high bands).

This patch makes twoloop set the cutoff in psymodel's context
the first time it runs, and makes PSY account for it during
threshold computation, making PE and threshold computations
closer to the final allocation and thus achieving better
subjective quality.

4. Tweaks to RC lambda tracking loop in relation to PNS

Without this tweak some corner cases cause quality regressions.
Basically, lambda needs to react faster to overall bitrate
efficiency changes since now PNS can be quite successful in
enforcing maximum bitrates, when PSY allocates too many bits
to the lower bands, suppressing the signals RC logic uses to
lower lambda in those cases and causing aggressive PNS.

This tweak makes PNS much less aggressive, though it can still
use some further tweaks.

Also update MIPS specializations and adjust fuzz

Also in lavc/mips/aacpsy_mips.h: remove trailing whitespace
2015-12-02 07:47:37 -03:00
Chris Cunningham 5e6ce28dab avformat/mp3dec: prefer "fast_seek" to TOC seek for CBR files.
"Fast seek" uses linear interpolation to find the position of the
requested seek time. For CBR this is more direct than using the
mp3 TOC and bypassing the TOC avoids problems with TOC precision.
(see https://crbug.com/545914#c13)

For VBR, fast seek is not precise, so continue to prefer the TOC
when available (the lesser of two evils).

Also, some re-ordering of the logic in mp3_seek to simplify and
give usetoc=1 precedence over fastseek flag.

Signed-off-by: wm4 <nfxjfg@googlemail.com>
2015-12-02 11:02:27 +01:00
Claudio Freire 88e498a87e AAC encoder: make pe.min a local minimum
As noted in a comment, pe.min in the reference encoder
is centered around current pe. The bit reservoir algo
needs pe.min to be a local minimum, because it can only
account for local PE variations. If it's set to a global
minimum as was being done, bit reservoir logic doesn't
work as efficiently.

This patch tries to forget old minimums and converge to
a local minimum without losing the stability of the
previous solution. Listening tests until now suggest this
solves numerous RC issues.
2015-11-29 15:03:45 -03:00
Hendrik Leppkes 5c0dbc20fc Merge commit '823fa7004571cb8404ca5785f9fa6e85f0f9f3d3'
* commit '823fa7004571cb8404ca5785f9fa6e85f0f9f3d3':
  fate: Rework sgi tests into a suite and add the missing ones

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 16:00:54 +01:00
Hendrik Leppkes ba32a22c86 Merge commit '99f40fd02f1870c2dee70977b672da9cb198f0be'
* commit '99f40fd02f1870c2dee70977b672da9cb198f0be':
  sgienc: Do not end RLE lines with 0s

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:42:33 +01:00
Rostislav Pehlivanov 1e5dbb3409 aac_ltp: split, reorder and improve prediction algorithm
This commit attempts to mirror what the decoder does more closely
in addition to fixing some shortcomings.
2015-11-26 17:40:04 +00:00
Matthieu Bouron 39290f2715 fate: add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM tests 2015-11-26 17:05:54 +01:00
Timothy Gu 04deaef293 fate-run: Fix indentation 2015-11-25 21:03:14 -08:00
Michael Niedermayer 5b70fb8fee movenc-test: Fix integer overflows
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-24 20:57:11 +02:00
Vittorio Giovara 823fa70045 fate: Rework sgi tests into a suite and add the missing ones
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-24 09:05:01 -05:00
Vittorio Giovara 99f40fd02f sgienc: Do not end RLE lines with 0s
This is never mentioned in the specifications, and decoders work
just as fine without it. Update the fate references since the compressed
file is smaller.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-24 09:05:01 -05:00
Michael Niedermayer 188a1a17a6 avformat/movenc-test: Fix integer overflows
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-23 15:45:44 +01:00
Clément Bœsch 56bdf61baa avutil/motion_vector: export subpel motion information
FATE test changes because of the switch from shift to division.
2015-11-23 10:55:15 +01:00
Daniil Cherednik 6662ca28d4 avcodec/atrac1: fix decoder: QMF delay compensation should be 39 samples
This also adds a new fate test

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-21 11:38:45 +01:00
Ganesh Ajjanagadde 2db114ec3f tests/tiny_ssim: replace #define by typedef
See e.g https://stackoverflow.com/questions/1666353/are-typedef-and-define-the-same-in-c
for rationale.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-11-20 08:25:23 -05:00
Derek Buitenhuis bdcf2b6af6 Merge commit '1d62ee38894afb696674db78cee8f8d89204a8fe'
* commit '1d62ee38894afb696674db78cee8f8d89204a8fe':
  movenc: Add a unit test for signaling of the track start times

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-18 16:43:32 +00:00
Derek Buitenhuis e73a4d8491 movenc-test: Pad the packet data start with 0s
This way, it never starts with 0xFFF0, and never trips the
ADTS "Detection" code in movenc.c.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-18 16:37:58 +00:00
Derek Buitenhuis f6e5b17abb Merge commit '3eeb7edfc2a1157b7b0e0ce21ac2cd44d55d405b'
* commit '3eeb7edfc2a1157b7b0e0ce21ac2cd44d55d405b':
  movenc: Add a unit test for frag_discont with edit lists

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-17 14:57:20 +00:00
James Almer 88e381c807 fate: update fate-source reference file
Signed-off-by: James Almer <jamrial@gmail.com>
2015-11-16 21:12:01 -03:00
Marton Balint bcac6416b8 fate: fix concat demuxer extended test portability
Sed \r is not portable, it does not work on freebsd, hopefully tr -d will.

Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-16 17:55:48 +01:00
Derek Buitenhuis 61344c04ca Merge commit '59e8ec0aa8ab174701d01a3bfe96fedd0b7fcead'
All diferences in unit tests have been acounted for.

* commit '59e8ec0aa8ab174701d01a3bfe96fedd0b7fcead':
  movenc: Add an API unit test for fragmenting options/calls

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-16 16:19:27 +00:00
Marton Balint c9944f7596 fate: fix concat demuxer extended tests on windows
Line endings do matter to md5sum...

Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-16 11:05:21 +01:00
Marton Balint 9bd4f26b55 fate: fix concat demuxer tests on msys/cygwin by using relative paths
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-16 11:05:19 +01:00
Marton Balint a01046c90c fate: add concat demuxer tests
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
2015-11-15 19:22:46 +01:00
Martin Storsjö 1d62ee3889 movenc: Add a unit test for signaling of the track start times
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:53:42 +02:00
Martin Storsjö 3eeb7edfc2 movenc: Add a unit test for frag_discont with edit lists
This tests the case where the muxer correctly guesses that a stream
starts at pts=0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:52:53 +02:00
Michael Niedermayer 351e625d60 swresample/resample: increase precision for compensation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-11 18:17:18 +01:00
Michael Niedermayer 46070cc20a ffmpeg: set muxer packet duration based on framerate only for CFR
a set ost->frame_rate does not imply CFR in ffmpeg

The changed fate tests had all wrong packet durations
(like 1/1000 or 1/90000)

There might be more cases in which is_cfr could be set

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-11 15:04:21 +01:00
Michael Niedermayer d9726893f3 avformat/mxfenc: Only store user comment related tags when needed
Also support disabling them as they seem to cause problems to some
Users. They are also not allowed in IRT D-10 thus the default for
mxf_d10 is not to write them

This also decreases the filesize when no user comment are stored

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 23:27:51 +01:00
Martin Storsjö 59e8ec0aa8 movenc: Add an API unit test for fragmenting options/calls
Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:50:25 +02:00
Hendrik Leppkes d3d4bc4784 Merge commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4'
* commit '3efd71b4d0b4a73ccbbbdc092e6bbd54d92633f4':
  avconv: set packet duration for CFR video streams

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-10 18:37:25 +01:00
Michael Niedermayer b83c849e87 tests/fate/avformat: Fix fate-lavf
The CMP variable seems to have been inherited from fate-api-seek which set it to null

the mxf reference needed a change due to c7e14a279f

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-10 04:53:47 +01:00
Timothy Gu 3d20f8e7c0 Add pixblockdsp checkasm tests 2015-11-07 18:46:55 -08:00
Nicolas George 47ea04ff10 lavu/opt: enhance printing durations.
Trim unneeded leading components and trailing zeros.
Move the formating code in a separate function.
Use the function also to format the default value, it was currently
printed as plain integer, inconsistent to the way it is parsed.
2015-11-07 16:04:09 +01:00
Nicolas George 432e27e6e7 fate: add mpdecimate test. 2015-11-07 16:03:47 +01:00
Nicolas George b16e569312 lavfi: add testsrc2 test source.
Similar to testsrc, but using drawutils and therefore
supporting a lot of pixel formats instead of just rgb24.
This allows using it as input for other tests without
requiring a format conversion.
It is also slightly faster than testsrc for some reason.
2015-11-07 16:02:48 +01:00
James Almer a97f1e7bd0 fate: update fate-source ref file
Signed-off-by: James Almer <jamrial@gmail.com>
2015-11-03 15:05:32 -03:00
Steven Robertson b38e685c05 vf_lut: Add support for RGB48 and RGBA64.
Signed-off-by: Steven Robertson <steven@strobe.cc>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-30 03:55:12 +01:00
Carl Eugen Hoyos 2f1d6d45af lavc/cdg: Add transparency support. 2015-10-30 01:24:50 +01:00
Ronald S. Bultje c048303823 vp9: update timestamps in ref files using multiple invisible frames.
For the 10-show-existing-frame, the source file indeed has a timestamp
of 3 (or 100/33) for the second visible frame, so the fix appears to
work correctly. For the other, only the timebase is fixed, but again
appears to be correct now.
2015-10-29 07:55:12 -04:00
Rodger Combs 1e477a970f lavu: add AESNI CPU flag 2015-10-28 04:23:14 -05:00
Hendrik Leppkes c2f861ca42 Replace remaining occurances of av_free_packet with av_packet_unref 2015-10-27 14:35:30 +01:00
Hendrik Leppkes 8b3228a329 Merge commit '533a6198505edd1379e1cd722852350ae4a85acc'
* commit '533a6198505edd1379e1cd722852350ae4a85acc':
  innoHeim/Rsupport Screen Capture Codec decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 13:58:44 +01:00
Rostislav Pehlivanov af71c73fb4 FATE: Increase FUZZ value on AAC LTP encoding test
Clang prerelease on Darwin is making the test fail.
2015-10-27 07:41:33 +00:00
Rostislav Pehlivanov e6f99520aa FATE: Slightly increase thresholds on prediction AAC encoding tests
They barely fail on some systems by being off by 0.81.
2015-10-27 03:48:17 +00:00
Derek Buitenhuis a7fcc43bcc tests/aac: Add bitexact flags to AAC LTP Encode test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-10-26 14:32:05 +00:00
Michael Niedermayer 4f00d23577 tests/fate/aac: Add bitexact flags to fate-aac-pns-encode
This fixes a fate failure after bumping the minor version
Its unknown why this is not needed for the other aac tests,
more investigation needed but for now i dont want to leave
it broken while its investigated

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-26 13:31:06 +01:00
Clément Bœsch 6b5412cbfa avutil/opt: print more meaningful default flags values
Example:
% ./ffmpeg -h encoder=gif
[...]
GIF encoder AVOptions:
  -gifflags          <flags>      E..V.... set GIF flags (default offsetting+transdiff)
     offsetting                   E..V.... enable picture offsetting
     transdiff                    E..V.... enable transparency detection between frames
2015-10-25 22:47:16 +01:00
Vittorio Giovara 533a619850 innoHeim/Rsupport Screen Capture Codec decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-23 14:56:43 +02: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
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
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
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 8ce6e24db4 fate: adjust the target for the new TNS changes 2015-10-17 11:10:26 +01: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
Hendrik Leppkes ba94e985a3 Merge commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea'
* commit '1f84b008bf2b1eaca473937c48788cb4e4ce1aea':
  fate: Move screenpresso to the appropriate screen capture file

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-16 23:00:11 +02:00
Christophe Gisquet 42c1dcde68 fate: use PROGSSUF
May require exporting in the shell var PROGSUF when invoking a
shell script.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-16 14:02:12 +02:00
Vittorio Giovara 1f84b008bf fate: Move screenpresso to the appropriate screen capture file 2015-10-15 15:47:16 +02:00
Zhang Rui 87ff61b9ab avutil/fifo: add function av_fifo_generic_peek_at()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-14 20:23:58 +02:00
Ronald S. Bultje eb4b5ff738 vp9: add itxfm_add eob shortcuts to 10/12bpp functions.
These aren't quite as helpful as the ones in 8bpp, since over there,
we can use pmulhrsw, but here the coefficients have too many bits to
be able to take advantage of pmulhrsw. However, we can still skip
cols for which all coefs are 0, and instead just zero the input data
for the row itx. This helps a few % on overall decoding speed.
2015-10-13 11:06:01 -04:00
Christophe Gisquet f1181e4660 fate: add 10bits YUV4:2:2 dnxhd test
It was useful to (accidentally?) spot an overflow in the column pass
of the x86 simple_idct10 implementation.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 04:04:02 +02:00
Christophe Gisquet 2fd14dd8eb avcodec/simple_idct10: improve precision
omse goes from 0.03060703 (which fails for dct-test) to 0.01663750.
This also actually improve the error of decoding the sample generated
by fate-vsynth3-dnxhd1080i-10bit using simple_idct10 to FAANI, which
goes (when resampled to yuv422p) from:
stddev:    0.06 PSNR: 72.28 MAXDIFF:    1
to identical.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-13 02:10:51 +02:00
Ricardo Constantino 6eaf97c289 avformat/webvttdec: Don't stop parsing on comments
Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
2015-10-12 22:16:12 +02:00
Ricardo Constantino a96dbdc14f fate/subtitles: Add a new test for WebVTT
Includes escapes that should now be supported and a few features not yet
fully supported, like comments, regions, classes, ruby, and lang.

All were tested with https://quuz.org/webvtt/ for validation, except
regions because the validator doesn't support them yet, and I couldn't
find any other way to validate WebVTT.

Signed-off-by: Ricardo Constantino <wiiaboo@gmail.com>
2015-10-12 22:14:44 +02:00
Rostislav Pehlivanov ccd3b3df39 fate: increase fuzz on fate-aac-tns-encode test
Fails on SunOS and old GCC (<=4.6 is ancient) versions.
2015-10-12 17:15:30 +01:00
Andreas Cadhalpun ec0275843d avcodec: remove leftover iff_byterun1 decoder
It was merged with the iff_ilbm decoder in commit
929a24efff.

Define AV_CODEC_ID_IFF_BYTERUN1 as AV_CODEC_ID_IFF_ILBM for API
compatibility.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-10-12 00:21:13 +02:00
Claudio Freire 79f2014f12 AAC encoder tests: increase fuzz for pred test
MIPS needs more fuzz
2015-10-11 18:46:27 -03:00
Claudio Freire 01ecb7172b AAC encoder: Extensive improvements
This finalizes merging of the work in the patches in ticket #2686.

Improvements to twoloop and RC logic are extensive.

The non-exhaustive list of twoloop improvments includes:
 - Tweaks to distortion limits on the RD optimization phase of twoloop
 - Deeper search in twoloop
 - PNS information marking to let twoloop decide when to use it
   (turned out having the decision made separately wasn't working)
 - Tonal band detection and priorization
 - Better band energy conservation rules
 - Strict hole avoidance

For rate control:
 - Use psymodel's bit allocation to allow proper use of the bit
   reservoir. Don't work against the bit reservoir by moving lambda
   in the opposite direction when psymodel decides to allocate more/less
   bits to a frame.
 - Retry the encode if the effective rate lies outside a reasonable
   margin of psymodel's allocation or the selected ABR.
 - Log average lambda at the end. Useful info for everyone, but especially
   for tuning of the various encoder constants that relate to lambda
   feedback.

Psy:
 - Do not apply lowpass with a FIR filter, instead just let the coder
   zero bands above the cutoff. The FIR filter induces group delay,
   and while zeroing bands causes ripple, it's lost in the quantization
   noise.
 - Experimental VBR bit allocation code
 - Tweak automatic lowpass filter threshold to maximize audio bandwidth
   at all bitrates while still providing acceptable, stable quality.

I/S:
 - Phase decision fixes. Unrelated to #2686, but the bugs only surfaced
   when the merge was finalized. Measure I/S band energy accounting for
   phase, and prevent I/S and M/S from being applied both.

PNS:
 - Avoid marking short bands with PNS when they're part of a window
   group in which there's a large variation of energy from one window
   to the next. PNS can't preserve those and the effect is extremely
   noticeable.

M/S:
 - Implement BMLD protection similar to the specified in
   ISO-IEC/13818:7-2003, Appendix C Section 6.1. Since M/S decision
   doesn't conform to section 6.1, a different method had to be
   implemented, but should provide equivalent protection.
 - Move the decision logic closer to the method specified in
   ISO-IEC/13818:7-2003, Appendix C Section 6.1. Specifically,
   make sure M/S needs less bits than dual stereo.
 - Don't apply M/S in bands that are using I/S

Now, this of course needed adjustments in the compare targets and
fuzz factors of the AAC encoder's fate tests, but if wondering why
the targets go up (more distortion), consider the previous coder
was using too many bits on LF content (far more than required by
psy), and thus those signals will now be more distorted, not less.

The extra distortion isn't audible though, I carried extensive
ABX testing to make sure.

A very similar patch was also extensively tested by Kamendo2 in
the context of #2686.
2015-10-11 17:29:50 -03:00
Zhang Rui 810fbd8933 fate/async: test error code from underlying protocol
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-10 17:58:45 +02:00
Christophe Gisquet 25d3013e36 fate: add DNxHD/HR tests
Currently only 2 profiles are evaluated because they are the only 2
with distributed test sequences.
- CID 1260: YUV 4:2:2 10 bits with block-adaptive interlace coding,
  from ticket 4876;
- CID 1270: YUV 4:4:4 10 bits (HR), 1920x839, from ticket 4581.

They were generated from the ticket sequences by running the
following kind of command-line;
ffmpeg -i $INPUT -an -sn -vcodec copy -vframes 1 -y $OUTPUT.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-09 22:36:05 +02:00
Stefano Sabatini 329465235a tests: update fate-filter-delogo test reference after commit 8bc708fcee 2015-10-08 12:44:48 +02:00
James Almer 285e41c34c checkasm: add alacdsp tests
Signed-off-by: James Almer <jamrial@gmail.com>
2015-10-06 20:25:49 -03:00
Henrik Gramner ec85153f25 checkasm: Fix compilation with --disable-avcodec 2015-10-04 15:35:16 +02:00
Henrik Gramner 99982524f9 checkasm: Remove use of deprecated av_set_cpu_flags_mask() 2015-10-03 15:08:24 +02:00
Henrik Gramner 8bb376cf6b checkasm: Fix the function name sorting algorithm
The previous implementation was behaving incorrectly in some corner cases.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-10-03 13:38:03 +02:00
Hendrik Leppkes 4d2160c99a Merge commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa'
* commit '9a3202a98b2e095b54dd784c3e01a09a676fc3fa':
  Screenpresso SPV1 decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-03 12:22:41 +02:00
Christophe Gisquet c7e14a279f dnxhddec: use dequantization formula from specs
The current one, while correct, does not yield the best possible
results. The specificiations suggest another formula, which results
in quality gains in the decoded output from fate tests. This
justifies changing said formula.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-02 18:08:36 +02:00
Joseph Artsimovich bfe1cd80eb dnxhddata: Fix 10-bit DNxHD quant matrices
Convert them to zigzag order, as the rest of them are.

When I was adding support for 10-bit DNxHD, I just copy-pasted the
missing quant matrices from the spec. Now it turns out the existing
matrices in dnxhddata.c were in zigzag order. This resulted in wrong
quantization for 10-bit DNxHD. The attached patch fixes the problem by
converting 10-bit quant matrices to zigzag order.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-10-02 13:11:57 +02:00
Vittorio Giovara 9a3202a98b Screenpresso SPV1 decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-09-30 16:45:11 +02:00
Michael Niedermayer ed18c49f5f fate: Add basic license header check
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-29 18:52:35 +02:00
Hendrik Leppkes fc97b1f091 Merge commit '26e8fa3b508eb047e85f4e923fc8e82a1aa656ba'
* commit '26e8fa3b508eb047e85f4e923fc8e82a1aa656ba':
  tiny_psnr: Use the correct abs() version

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 15:44:28 +02:00
Vittorio Giovara 26e8fa3b50 tiny_psnr: Use the correct abs() version 2015-09-29 14:33:01 +02:00
Henrik Gramner 69e456d7fb checkasm/vp9dsp: Fix iszero() to read the correct data 2015-09-28 18:50:13 +02:00
Ronald S. Bultje 0b227c6d47 checkasm: add vp9dsp.itxfm_add tests. 2015-09-28 10:51:53 -04:00
Henrik Gramner 19b28d047d checkasm: Fix the function name sorting algorithm
The previous implementation was behaving incorrectly in some corner cases.
2015-09-28 16:38:23 +02:00
Henrik Gramner cc28552100 checkasm/x86: Correctly handle variadic functions
The System V ABI on x86-64 specifies that the al register contains an upper
bound of the number of arguments passed in vector registers when calling
variadic functions, so we aren't allowed to clobber it.

checkasm_fail_func() is a variadic function so also zero al before calling it.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 14:25:59 +02:00
Henrik Gramner 5405584b7b checkasm: Use a self-balancing tree
Tested functions are internally kept in a binary search tree for efficient
lookups. The downside of the current implementation is that the tree quickly
becomes unbalanced which causes an unneccessary amount of comparisons between
nodes. Improve this by changing the tree into a self-balancing left-leaning
red-black tree with a worst case lookup/insertion time complexity of O(log n).

Significantly reduces the recursion depth and makes the tests run around 10%
faster overall. The relative performance improvement compared to the existing
non-balanced tree will also most likely increase as more tests are added.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-09-28 11:16:33 +02:00
Henrik Gramner 7ca1de5b4f checkasm/x86: Correctly handle variadic functions
The System V ABI on x86-64 specifies that the al register contains an upper
bound of the number of arguments passed in vector registers when calling
variadic functions, so we aren't allowed to clobber it.

checkasm_fail_func() is a variadic function so also zero al before calling it.
2015-09-27 20:21:26 +02:00
James Almer 4e03f0ab08 checkasm/vp9dsp: add const to suppress "discards const qualifier" warnings
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-26 16:35:39 -03:00
James Almer af990d72b7 checkasm/Makefile: add missing testclean target
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-26 16:35:34 -03:00
Henrik Gramner 2ab65b652d checkasm: Use a self-balancing tree
Tested functions are internally kept in a binary search tree for efficient
lookups. The downside of the current implementation is that the tree quickly
becomes unbalanced which causes an unneccessary amount of comparisons between
nodes. Improve this by changing the tree into a self-balancing left-leaning
red-black tree with a worst case lookup/insertion time complexity of O(log n).

Significantly reduces the recursion depth and makes the tests run around 10%
faster overall. The relative performance improvement compared to the existing
non-balanced tree will also most likely increase as more tests are added.
2015-09-26 15:11:11 +02:00
Ronald S. Bultje 7a4b97e946 checkasm: clip vp9 loopfilter test pixels inside allowed bitdepth range. 2015-09-26 06:42:33 -04:00
Rodger Combs f559812a84 tests/checkasm: make randomize_buffers a function for easier debugging
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-26 02:47:53 +02:00
Claudio Freire 9458a62dec AAC encoder: tweak PNS usage to be more aggressive
This patch tweaks search_for_pns to be both more
aggressive and more careful when applying PNS. On
the one side, it will again try to use PNS on zero
(or effectively zero) bands. For this, both zeroes
and band_type have to be checked (some ZERO bands
aren't marked in zeroes). On the other side, a more
accurate rate-distortion measure avoids using PNS
where it would cause audible distortion.

Also fixed a small bug in the computation of freq
that caused PNS usage on low-frequency bands during
8-short windows. This allows re-enabling PNS during
8-short.
2015-09-25 03:56:32 -03:00
Michael Niedermayer 5ba40c3c71 tests/checkasm/vp9dsp: Revert first hunk of bddcf758d3
The change was wrong, also add a comment explaining it

Found-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-24 18:34:43 +02:00
Christophe Gisquet f94af8d32a fate: add chroma position scale test
The sample position is made weird and non-nominal to force catching
such issues as default values or specialized operations hiding
issues in corner cases.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-23 23:42:28 +02:00
Claudio Freire 7ec74ae4aa AAC encoder: tweak rate-distortion logic
This patch modifies the encode frame function to
retry encoding the frame when the resulting bit count
is too far off target, but only adjusting lambda
in small, incremental step. It also makes the logic
more conservative - otherwise it will contend with
bit reservoir-related variations in bit allocation,
and result in artifacts when frame have to be truncated
(usually at high bit rates transitioning from low
complexity to high complexity).
2015-09-23 02:33:44 -03:00
Ronald S. Bultje 350e9c6765 vp9: fix loopfilter test code to address Hendrik's comments.
(I forgot to actually merge them into the patch I just pushed.)
2015-09-21 20:44:14 -04:00
Rodger Combs df2a2643fe tests/checkasm: fix stack smash in check_loopfilter
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 20:26:09 +02:00
Michael Niedermayer bddcf758d3 tests/checkasm/vp9dsp: Add () to protect macro arguments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-20 11:37:57 +02:00
Ronald S. Bultje b074367405 checkasm: add VP9 loopfilter tests.
The randomize_buffer() implementation assures that "most of the time",
we'll do a good mix of wide16/wide8/hev/regular/no filters for complete
code coverage. However, this is not mathematically assured because that
would make the code either much more complex, or much less random.
2015-09-20 10:33:04 +02:00
James Almer 784792788b checkasm: add jpeg2000dsp rct_int tests
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-20 00:49:35 -03:00
Rostislav Pehlivanov 0cfdaf45c4 lpc: correctly apply windowing to the samples in the float-only lpc
Also change the window to Hamming (using coefficient which make it
a Hanning).

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-19 16:25:58 +01:00
James Almer 763ffa2029 checkasm: add flacdsp decorrelate tests
Reviewed-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-17 15:33:07 -03:00
Henrik Gramner 781a25e9c4 checkasm: v210: Fix array overwrite 2015-09-17 10:33:06 +02:00
Claudio Freire 8df9bf8e39 AAC encoder: refactor to resynchronize MIPS port
This patch refactors the AAC coders to reuse code
between the MIPS port and the regular, portable C code.
There were two main functions that had to use
hand-optimized versions of quantization code:
 - search_for_quantizers_twoloop
 - codebook_trellis_rate

Those two were split into their own template header
files so they can be inlined inside both the MIPS port
and the generic code. In each context, they'll link
to their specialized implementations, and thus be
optimized by the compiler.

This approach I believe is better than maintaining
several copies of each function. As past experience has
proven, having to keep those in sync was error prone.
In this way, they will remain in sync by default.

Also, an implementation of the dequantized output
argument for the optimized quantize_and_encode
functions is included in the patch. While the current
implementation of search_for_pred still isn't using
it, future iterations of main prediction probably will.
It should not imply any measurable performance hit while
not being used.
2015-09-16 23:14:26 -03:00
Rostislav Pehlivanov 5ba811bdf0 aacenc_tns: fix coefficient compression condition
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-16 17:48:02 +01:00
Michael Niedermayer a860adb49c tests/checkasm/vp9dsp: Use snprintf() for safetey
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-16 14:19:37 +02:00
Henrik Gramner 6115966ad3 checkasm: v210: Fix array overwrite 2015-09-16 13:50:09 +02:00
Henrik Gramner 985e7d8cc1 checkasm: v210: s/Libav/FFmpeg/ 2015-09-16 13:48:43 +02:00
Hendrik Leppkes 25a7c2aed6 Merge commit 'e17db9ac496420f8824190ff5059a8a3646cbb7e'
* commit 'e17db9ac496420f8824190ff5059a8a3646cbb7e':
  fate: Move mv0 option from global to mpv private

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-16 11:14:37 +02:00
Ronald S. Bultje bbd44e124a checkasm: add vp9 intra pred tests. 2015-09-15 16:43:29 -04:00
Ronald S. Bultje 084451e1e4 checkasm: add vp9 MC tests. 2015-09-15 16:43:28 -04:00
Vittorio Giovara e17db9ac49 fate: Move mv0 option from global to mpv private 2015-09-13 17:34:45 +02:00
Vittorio Giovara 18adc1fd3b avconv_filter: Use full named options
This introduces a slight timebase computation difference in zmbv-8bit
fate test. This is expected since the new options are double instead
of ints, and the additional precision skews the results in a non
meaningful way.
2015-09-13 17:34:45 +02:00
Vittorio Giovara 2c6014c629 fate: Change global error option to private error_rate option 2015-09-13 17:34:45 +02:00
Rostislav Pehlivanov 1e75bee3d6 fate: readjust AAC encoder TNS test
The recent commits change the value slightly. Even though it's
within the threshold it's better to risk as little as possible
especially when different systems, processors, FPUs and compilers
are involved.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-12 13:17:04 +01:00
Michael Niedermayer 319898bba2 swscale/utils: handle gray+alpha formats like gray for luma ranges
Its illogic to handle gray differently depending on the existence of an alpha channel

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 15:00:19 +02:00
Rostislav Pehlivanov da64bd6a99 aaccoder: tweak PNS implementation further
This commit changes a few things about the noise substitution
logic:
 - Brings back the quantization factor (reduced to 3) during
   scalefactor index calculations.
 - Rejects any zeroed bands. They should be inaudiable and it's
   a waste transmitting the scalefactor indices for these.
 - Uses swb_offsets instead of incrementing a 'start' with every
   window group size.
 - Rejects all PNS during short windows.
Overall improves quality. There was a plan to use the lfg system
to create the random numbers instead of using whatever the decoder
uses but for now this works fine. Entropy is far from important here.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-09 10:44:33 +01:00
Clément Bœsch 9117748cff avutil/opt: add AV_OPT_TYPE_BOOL 2015-09-08 22:39:20 +02:00