Commit Graph

1233 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Vittorio Giovara e17db9ac49 fate: Move mv0 option from global to mpv private 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
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
Hendrik Leppkes d02d208211 Merge commit 'c45fcf30cfab687004ed1cdc06ebaa21f4262a0b'
* commit 'c45fcf30cfab687004ed1cdc06ebaa21f4262a0b':
  DXV decoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-07 16:07:07 +02:00
Rostislav Pehlivanov b6cc8ec7ec aaccoder: add frequency scaling and quantization correction for PNS
This commit once again improves the PNS implementation by scaling the
thresholds with frequency. The thresholds get looser as the frequency
increases since higher frequencies are basically noise to human ears.

Also, this introduces quantization error correction for PNS. Should
the error be too much, no PNS will be used. The energy_ratio is used
to regulate the actual encoded PNS energy: if the generated PNS
energy is higher than the energy from the psy system, energy_ratio
is used to correct it so that hopefully once requantized and
transmitted the value in the decoder will be closer to what the
encoder has.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-07 12:44:09 +01:00
Rostislav Pehlivanov 1956cfbaed aacenc_is: take absolute coefficient value upon energy calculations
This was an oversight when the IS system was being first implemented.
The ener01 part was largely a result of trial and error and the fact
that the sum of coef0 and coef1 could result in a zero was
overlooked. Once ener01 turns to zero it's used to divide the left
channel energy which doesn't turn out so well as it fills IS[]
with -nan's and inf's which in turn confused the quantize_band_cost.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-06 18:36:42 +01:00
Rostislav Pehlivanov ff99a38855 fate: adjust AAC encoder tests values
Since the new commits improve quality.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-06 15:30:26 +01:00
Yayoi fc9aa1fb46 fate/subtitles: add a new test for SAMI demuxer and decoder
Signed-off-by: Clément Bœsch <u@pkh.me>
2015-09-06 13:08:53 +02:00
Michael Niedermayer 61009a709c tests/fate: replace all -f md5 by framemd5
also limit dcinema-encode to 20 frames to avoid huge reference checksum lists

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-06 03:23:02 +02:00
Rostislav Pehlivanov cf6fb6f3f7 fate: increase the fuzz of the AAC encoder aref test
Almost fine on SunOS without yasm but 5 wasn't enough.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-05 21:47:26 +01:00
Rostislav Pehlivanov 5ab3b6a8a5 fate: adjust AAC encoder TNS test target
The new commits improve the quality.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-05 09:11:05 +01:00
Claudio Freire bcb3332b1b AAC: Increase fuzziness of fate-aac tests
Needed to make them pass in mips
2015-09-03 10:16:33 -03:00
Vittorio Giovara c45fcf30cf DXV decoder
Support all DXDI and DXD3 normal quality videos.
2015-09-02 22:22:02 +02:00
Rostislav Pehlivanov 10d16647cc 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>
2015-09-02 08:36:53 +01:00
Rostislav Pehlivanov dcf72da841 fate: add fuzziness to the AAC Encode prediction test
Fails on ppc64 architecture under Ubuntu.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-02 07:15:42 +01:00
Rostislav Pehlivanov 72adf24310 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>
2015-09-02 06:39:59 +01:00
Rostislav Pehlivanov b86532810d 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>
2015-09-01 09:08:31 +01:00
Rostislav Pehlivanov 555f513769 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>
2015-09-01 07:26:03 +01:00
Rostislav Pehlivanov a8ced764f7 fate: update AAC Encoder TNS test for the new changes
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-09-01 07:07:59 +01:00
Peter B baeb8f5f71 tests: Renamed pix_fmts wording in ffv1 test target name to match pix_fmt parameter.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-31 16:14:38 +02:00
Andreas Cadhalpun 2ac5b6ce8d 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>
2015-08-31 13:49:46 +02:00
Andreas Cadhalpun c64060d56a 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>
2015-08-30 23:31:10 +02:00
Paul B Mahol 16229fae9c avfilter/vf_vectorscope: add yet another mode
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-08-29 14:05:03 +00:00
Rostislav Pehlivanov 8323d9b8af 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>
2015-08-29 09:26:05 +01:00
Rostislav Pehlivanov 4ff897a536 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>
2015-08-29 07:00:54 +01:00
Rostislav Pehlivanov fe12ba6f30 fate: reenable TNS test
Hopefully without errors like last time, but I'm prepared.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-08-29 07:00:17 +01:00
Paul B Mahol 1b1c4030ea fate: add tests for vectorscope filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-08-25 10:13:03 +00:00
Hendrik Leppkes 11014dd3d4 Merge commit 'faa3f17a76333b672ce4a40cf80f678ab68bdbae'
* commit 'faa3f17a76333b672ce4a40cf80f678ab68bdbae':
  fate: test only demuxing in asf-repldata

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-08-24 10:25:41 +02:00
Paul B Mahol c864de3c8f fate: add tests for waveform filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-08-24 07:13:06 +00:00
Ludmila Glinskih 4a9bc12fe7 fate: add api-band-test
Works only for flv, h263 and huffyuv decoders.
Makes only one pass through the file (this should be changed to two passes)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-24 03:54:55 +02:00
Rostislav Pehlivanov 4f396a6f30 fate: temporarily disable AAC TNS test
Fixing it will take a bit longer, so just suspend the test.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2015-08-23 01:04:06 +01:00
Andreas Cadhalpun 805f38b4d6 fate: replace deprecated request_channels with request_channel_layout
This fixes fate with FF_API_REQUEST_CHANNELS disabled.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-08-22 19:16:13 +02:00