Commit Graph

4927 Commits

Author SHA1 Message Date
Linjie Fu ddf6ca3a0e tests/checkasm: add overflow test for hevc_add_res
Add overflow test for hevc_add_res when int16_t coeff = -32768.

The result of C is good, while ASM is not.

To verify:
    make fate-checkasm-hevc_add_res
    ffmpeg/tests/checkasm/checkasm --test=hevc_add_res

./checkasm --test=hevc_add_res
checkasm: using random seed 679391863
MMXEXT:
    hevc_add_res_4x4_8_mmxext (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
SSE2:
    hevc_add_res_8x8_8_sse2 (hevc_add_res.c:69)
    hevc_add_res_16x16_8_sse2 (hevc_add_res.c:69)
    hevc_add_res_32x32_8_sse2 (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
AVX:
    hevc_add_res_8x8_8_avx (hevc_add_res.c:69)
    hevc_add_res_16x16_8_avx (hevc_add_res.c:69)
    hevc_add_res_32x32_8_avx (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
AVX2:
    hevc_add_res_32x32_8_avx2 (hevc_add_res.c:69)
  - hevc_add_res.add_residual [FAILED]
checkasm: 8 of 14 tests have failed

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-03-27 10:57:40 +01:00
Linjie Fu 69b9548dd6 checkasm/hevc_add_res: prepare test data only if the fuction is not tested
check_func will return NULL for functions that have already been tested. If
the func is tested and skipped (which happens several times), there is no
need to prepare data(randomize_buffers and memcpy).

Move relative code in compare_add_res(), prepare data and do check only if
the function is not tested.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-03-27 10:57:40 +01:00
Andreas Rheinhardt dc2f6b54ac avformat/matroskaenc: Avoid allocations for SeekHead
Up until e7ddafd5, the Matroska muxer wrote two SeekHeads: One at the
beginning referencing the main level 1 elements (i.e. not the Clusters)
and one at the end, referencing the Clusters. This second SeekHead was
useless and has therefore been removed. Yet the SeekHead-related
functions and structures are still geared towards this usecase: They
are built around an allocated array of variable size that gets
reallocated every time an element is added to it although the maximum
number of Seek entries is a small compile-time constant, so that one should
rather include the array in the SeekHead structure itself; and said
structure should be contained in the MatroskaMuxContext instead of being
allocated separately.

The earlier code reserved space for a SeekHead with 10 entries, although
we currently write at most 6. Reducing said number implied that every
Matroska/Webm file will be 84 bytes smaller and required to adapt
several FATE tests; furthermore, the reserved amount overestimated the
amount needed for for the SeekHead's length field and how many bytes
need to be reserved to write a EBML Void element, bringing the total
reduction to 89 bytes.

This also fixes a potential segfault: If !mkv->is_live and if the
AVIOContext is initially unseekable when writing the header, the
SeekHead is already written when writing the header and this used to
free the SeekHead-related structures that have been allocated. But if
the AVIOContext happens to be seekable when writing the trailer, it will
be attempted to write the SeekHead again which will lead to segfaults
because the corresponding structures have already been freed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-26 03:19:56 +01:00
Andreas Rheinhardt 00d0934fce avformat/webmdashenc: Don't use custom option for bitexactness
The WebM DASH Manifest muxer can write manifests for live streams and
these contain an entry that depends on the time the manifest is written;
an AVOption to make the output reproducible has been added for tests.
But this is unnecessary, as there already is a method for reproducible
output: The AVFMT_FLAG_BITEXACT-flag of the AVFormatContext. Therefore
this commit removes the custom option.

Given that the description of said option contained "private option -
users should never set this" and that it was not documented in
muxers.texi, no deprecation period for this option seemed necessary.

The commands of the FATE-tests for this muxer have been changed to no
longer use this option.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-03-25 23:26:29 +01:00
Nicolas Gaullier 1ec86be79b avcodec/mpeg12dec: Add CPB coded side data
This fixes mpeg2video stream copies to mpeg muxer like this:
  ffmpeg -i xdcamhd.mxf -c:v copy output.mpg

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-03-20 09:16:05 +01:00
Jan Ekström c149f16db1 fate/ffmpeg: add test for time limited sub2video instance
Utilizes a subpicture sample with one decodable subpicture for the
test.

Based on a failing test case in reported by Michael in
https://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/240398.html
which at the time had no test case for it.

Additionally, this is the first test case for the presentation
graphics format.
2020-03-16 19:35:17 +02:00
Jan Ekström 9c8a5fd57e fate/ffmpeg: add a second, simple sub2video test 2020-03-16 19:35:17 +02:00
Carl Eugen Hoyos 5f8c383452 lsws/input: Do not change transparency range.
Fixes ticket #8509.
2020-03-11 22:55:49 +01:00
Zane van Iperen 33be368202 fate/adpcm: add adpcm_ima_alp tests
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-03-10 20:22:32 +01:00
Andreas Rheinhardt 518bbe9eac h264_mp4toannexb: Try to avoid four byte startcodes
According to the H.264 specifications, the only NAL units that need to
have four byte startcodes in H.264 Annex B format are SPS/PPS units and
units that start a new access unit. Before af7e953a, the first of these
conditions wasn't upheld as already existing in-band parameter sets
would not automatically be written with a four byte startcode, but only
when they already were at the beginning of their input packets. But it
made four byte startcodes be used too often as every unit that is written
together with a parameter set that is inserted from extradata received a
four byte startcode although a three byte start code would suffice
unless the unit itself were a parameter set.

FATE has been updated to reflect the changes. Although the patch leaves
the extradata unchanged, the size of the extradata according to the FATE
reports changes. This is due to a quirk in ff_h2645_packet_split which
is used by extract_extradata: If the input is Annex B, the first zero of
a four byte startcode is considered a part of the last unit (if any).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-03-06 00:58:31 +01:00
Marton Balint 121b6c7aa7 avformat/mxfenc: use a zero based continuity counter
The standard does not seem to require the counter to be zero based, but some
checker tools (MyriadBits MXFInspect, Interra Baton) have validations against 0
start...

Fixes ticket #6781.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-03-02 22:01:47 +01:00
Linjie Fu 1c37cad084 lavu/pix_fmt: add new pixel format y210
Add some packed 4:2:2 10-bit pixel formats for hardware decode support
in VAAPI and QSV.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2020-02-24 00:09:51 +00:00
James Almer c666689491 avcodec: add an AVCodecContext field to signal types of packet, frame, and coded stream side data to export
Add an initial mvs flag to is, analog to the export_mvs flags2 one.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-02-22 23:19:07 -03:00
Zane van Iperen 3de8ca21ab fate/adpcm: add adpcm_ima_apm tests
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-22 20:45:45 +01:00
Marton Balint 554576b6cf avformat/utils: make av_url_split search for hashmark as well to separate hostname
RFC 3986 states that the generic syntax uses the slash ("/"), question mark
("?"), and number sign ("#") characters to delimit components that are
significant to the generic parser's hierarchical interpretation of an
identifier.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Marton Balint 365b817b51 avformat/tests/url: add av_url_split tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Marton Balint 0f5127b1ca avformat/tests/url: make format more readable
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-02-15 18:41:36 +01:00
Martin Storsjö 5181f491ee checkasm: sbrdsp: Fix a spurious test failure by calculating a better epsilon for sum_square
Signed-off-by: Martin Storsjö <martin@martin.st>
2020-02-08 23:00:21 +02:00
Zane van Iperen 3b860bfd6f fate/adpcm: add adpcm_ima_ssi tests
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-08 00:01:17 +01:00
Zane van Iperen d84a30e123 fate/adpcm: add adpcm_argo tests
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-04 23:34:22 +01:00
Michael Niedermayer 24a5e873b3 tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies
The gif test should depend on gif not fits
Regression since: ac4b5d8622

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-30 20:30:36 +01:00
Michael Niedermayer 07754f3f8f remove tests/ref/lavf/fits
This appears to be forgotten in ac4b5d8622

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-30 19:57:58 +01:00
Guo, Yejun de1b2aa796 Revert "fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32"
The tests broke fate without SAMPLES and fate on some platforms.
This reverts commit 95ade711eb.
2020-01-29 01:15:56 +01:00
Carl Eugen Hoyos d89f69e142 test/fate: Add missing exe suffix to h265_levels test.
Fixes fate on WSL using mingw.
2020-01-28 00:02:01 +01:00
James Almer 609dfb4057 fate/lavf-container: add an AV1 in Matroska muxing test
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-26 12:41:32 -03:00
Martin Storsjö cbb254cb4c checkasm: Check HAVE_GETSTDHANDLE here as well
This was missed in 63418e374f.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-01-24 22:17:18 +02:00
James Almer cc929cee76 avformat/movenc: add a flag to enable CMAF compatability
Sets some required constrains and reports compatability with the relevant
compatible brand.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:21 -03:00
Guo, Yejun 95ade711eb fate/filter-video: add two tests for dnn_processing with frame format rgb24 and grayf32
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-01-14 11:00:04 -03:00
Andreas Rheinhardt c4c96d5942 fate: Don't use depreceated keepside option
The tests for concat use this option which is scheduled for removal and
does nothing any more. So remove it; otherwise, these tests would fail
at the next major version bump.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-10 12:28:18 -03:00
Andreas Rheinhardt 2ff687c17f avformat/matroskadec: Fix lzo decompression
When a Matroska Block is only stored in compressed form, the size of
the uncompressed block is not explicitly coded and therefore not known
before decompressing it. Therefore the demuxer uses a guess for the
uncompressed size: The first guess is three times the compressed size
and if this is not enough, it is repeatedly incremented by a factor of
three. But when this happens with lzo, the decompression is neither
resumed nor started again. Instead when av_lzo1x_decode indicates that x
bytes of input data could not be decoded, because the output buffer is
already full, the first (not the last) x bytes of the input buffer are
resent for decoding in the next try; they overwrite already decoded
data.

This commit fixes this by instead restarting the decompression anew,
just with a bigger buffer.

This seems to be a regression since 935ec5a1.

A FATE-test for this has been added.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:40:13 -03:00
Andreas Rheinhardt 6c735b96ee fate/matroska: Add test for ProRes and bz2 compression
This test tests that demuxing ProRes that is muxed like it should be in
Matroska (i.e. with the first header ("icpf") atom stripped away) works;
it also tests bz2 decompression as well as the handling of
unknown-length clusters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:40:13 -03:00
Paul B Mahol 6399eed48a avfilter/vf_waveform: implement tint options 2019-12-28 21:51:40 +01:00
Paul B Mahol 2736dc0564 avfilter/vf_vectorscope: rename gray mode to tint mode 2019-12-28 14:01:15 +01:00
Marton Balint a619787a9c avutil/tests/opt: add av_opt_get/av_opt_set tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-27 21:52:21 +01:00
Marton Balint 672b925e8a avutil/tests/opt: add tests for AV_OPT_TYPE_DICT
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-27 21:52:21 +01:00
Andreas Rheinhardt 9bde6c6be0 avformat/microdvd: Use \n instead of \0 to end file header
Up until now, the microdvd demuxer uses av_strdup() to allocate the
extradata from a string; its length is set to strlen() + 1, i.e.
including the \0 at the end. Upon remuxing, the muxer would simply copy
the extradata at the beginning, including the \0.

This commit changes this by not adding the \0 to the size of the
extradata; the muxer now delimits extradata by inserting a \n. This
required to change the subtitles-microdvd-remux FATE-test.

Furthermore, the extradata is now allocated with zeroed padding.

The microdvd decoder is not affected by this, as it didn't use the size
of the extradata at all, but treated it as a C-string.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-27 12:38:08 +01:00
James Almer 191df4f2d1 avformat/movenc: use iso6 major brand when signed CTS offsets are used in trun boxes
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-21 11:57:28 -03:00
James Almer 245ace4e2d avformat/movenc: ensure we don't write the major brand as a compatible brand more than once
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-21 11:57:28 -03:00
James Almer 58ac760816 avformat/movenc: write the major brand also as the first compatible brand
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-21 11:57:28 -03:00
Martin Storsjö aad0e26f93 checkasm: aacpsdsp: Tolerate extra intermediate precision in stereo_interpolate
The stereo_interpolate functions add h_step to the values h
BUF_SIZE times. Within the stereo_interpolate C functions, the
values h (h0-h3, h00-h13) are declared as local float variables,
but the compiler is free to keep them in a register with extra
precision.

If the accumulation is rounded to 32 bit float precision after
each step, the less significant bits of h_step end up ignored
and the sum can deviate, affecting the end result more than
the currently set EPS.

By clearing the log2(BUF_SIZE) lower bits of h_step, we make sure
that the accumulation shouldn't differ significantly, regardless
of any extra precision in the accmulating register/variable.

This fixes the aacpsdsp checkasm test when built with clang for
mingw/x86_32.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-18 15:15:29 +02:00
Martin Storsjö e10654de2b ffprobe: Fix fate tests for ffprobe in cases where TARGET_PATH differs from the current path
In these cases, we must pass the full path of the file to ffprobe
(as the current working dir on the remote system, e.g. when invoked
with "ssh remote ffprobe ..." isn't the wanted one).

The input filename passed to ffprobe is also included in the output,
which is part of the reference test data. Add a new option to
ffprobe to allow overriding what path is printed, to keep the
original relative path in the tests.

An alternative approach could be an option to allow requesting omitting
the file name from the dumped data, and updating the test references
accordingly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-18 15:15:12 +02:00
Linjie Fu fb705e4073 FATE/hevc.mak: cosmetic for fate-hevc-paired-fields
Adjust the order of fate-hevc-paired-fields.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-17 14:20:48 -03:00
Linjie Fu ed2bd94fc0 FATE: add test for hevc files with 4 TUDepth(0..4) of cbf_cb/cbf_cr
5 cabac states for cbf_cb and cbf_cr are supported according to
Table 9-4.

Add a test for 64x64 4:4:4 8bit HEVC clips with TUDepth = 4, cbf_cr > 0.

Signed-off-by: Xu Guangxin <guangxin.xu@intel.com>
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-17 14:12:40 -03:00
Martin Storsjö 0f50be625f fate: Add an option for disabling the 2k/4k tests
When testing on a memory limited system, these tests consume a
significant amount of memory and can often fail if testing by running
multiple processes in parallel.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-17 10:22:29 +02:00
James Almer 54d09eb8d0 fate/cbs: use the rawvideo muxer for AV1 tests
The IVF muxer autoinserts the av1_metadata filter unconditionally, which is
not desirable for these tests.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-13 10:58:10 -03:00
Martin Storsjö f58bda642d checkasm: af_afir: Use a dynamic tolerance depending on values
As the values generated by av_bmg_get can be arbitrarily large
(only the stddev is specified), we can't use a fixed tolerance.
Calculate a dynamic tolerance (like in float_dsp from 38f966b222),
based on the individual steps of the calculation.

This fixes running this test with certain seeds, when built with
clang for mingw/x86_32.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-12 23:57:08 +02:00
Martin Storsjö e9bb1410e4 fate: Fix use of target_path/target_samples
Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-12 11:28:21 +02:00
Martin Storsjö b85dcd8586 fate: Fix dependencies to sample files to use local paths
These dependencies are evaluted by make and must be expressed with
the paths as in the local filesystem.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-12 11:27:55 +02:00
James Almer 13f2b6dc72 fate/cbs: update the two film grain cbs_av1 tests
They were missed in the previous commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-11 21:59:24 -03:00
Martin Storsjö c27a85b983 fate: Use a oneoff test for the tremolo filter
The tremolo filter uses floating point internally, and uses
multiplication factors derived from sin(fmod()), neither of
which is bitexact for use with framecrc.

This fixes running this test when built with for mingw/x86_32
with clang.

In this case, a 1 ulp difference in the output from fmod() would
end up in an output from the filter that differs by 1 ulp, but
which makes the lrint() in swresample/audioconvert.c round in a
different direction.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-11 22:20:00 +02:00