Commit Graph

4870 Commits

Author SHA1 Message Date
James Almer 968c4cbf22 fate/cbs: add svc AV1 tests
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-02 14:45:02 -03:00
James Almer 637742b45d fate/cbs: add a decode model AV1 test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-01 16:53:11 -03:00
James Almer af7ab32b89 fate/cbs: add a switch frame AV1 test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-01 16:53:11 -03:00
James Almer 0d67af34c2 fate/demux: add an AV1 Annex B test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-29 18:58:42 -03:00
James Almer 13ed243594 fate/lavf-container: add an H264 mp4 remux test
This uses a raw h264 bitstream as source, in order to test the avcC
generation code.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-29 18:24:01 -03:00
James Almer de557eb191 fate/lavf-container: add an AV1 mp4 remux test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-29 18:23:49 -03:00
James Almer f18a5efb52 fate/cbs: add initial AV1 tests
Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-19 14:49:03 -03:00
Michael Niedermayer 8d5f9daacd tests/ref/vsynth: add missing reference files, fix build 2019-11-13 23:34:56 +01:00
Baptiste Coudurier a1403032c8 avcodec/dvenc: support encoding dvcprohd 2019-11-13 09:08:43 -08:00
Limin Wang 66ac7775f7 tests/fate/filter-video: add test for colorlevels
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-11 14:51:09 +01:00
Limin Wang 78c0030f34 FATE: add a test for freeezedetect
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-30 18:09:00 +01:00
Guo, Yejun dff39ea9f0 dnn: add tf.nn.conv2d support for native model
Unlike other tf.*.conv2d layers, tf.nn.conv2d does not create many
nodes (within a scope) in the graph, it just acts like other layers.
tf.nn.conv2d only creates one node in the graph, and no internal
nodes such as 'kernel' are created.

The format of native model file is also changed, a flag named
has_bias is added, so change the version number.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-30 10:31:55 -03:00
Zhao Zhili 11cfff04ed FATE/dnn: add .gitignore
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2019-10-23 09:58:17 -03:00
Limin Wang 190f52ba3b avfilter/af_silencedetect: use AV_OPT_TYPE_DURATION
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-10-21 15:42:04 +05:30
Paul B Mahol 0528adbd85 avfilter/vf_shuffleplanes: add mising query_formats()
Fixes #8298
2019-10-18 23:24:06 +02:00
Michael Niedermayer 0279e727e9 avcodec/cavsdec: Set ret on errors in decode_pic()
Fixes regression and fate failure on some machienes

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-17 13:17:18 +02:00
Michael Niedermayer e7113704b2 avcodec/cavsdec: Check remaining bitstream in the main loop in decode_pic()
Fixes: Timeout (149sec ->1sec)
Fixes: 17311/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CAVS_fuzzer-5679368642232320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-16 19:17:57 +02:00
Paul B Mahol e831f60100 fate/source: add libavfilter/af_arnndn.c 2019-10-16 18:37:29 +02:00
Guo, Yejun 3fd5ac7e92 avfilter/dnn: unify the layer execution function in native mode
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-15 18:56:25 -03:00
Paul B Mahol c109dfc1b1 avutil/opt: print runtime flag too 2019-10-14 11:28:54 +02:00
Matthieu Bouron 1921f866ec avformat/mov: parse sdtp atom and set the pkt disposable flag accordingly
Allows the creation of the sdtp atom while remuxing MP4 to MP4. This
atom is required by Apple devices (iPhone, Apple TV) in order to accept
2160p medias.
2019-10-12 14:36:15 +02:00
Andreas Rheinhardt e5e5be4c7f avcodec/flac_parser: Fix off-by-one error
The flac parser uses a fifo to buffer its data. Consequently, when
searching for sync codes of flac packets, one needs to take care of
the possibility of wraparound. This is done by using an optimized start
code search that works on each of the continuous buffers separately and
by explicitly checking whether the last pre-wrap byte and the first
post-wrap byte constitute a valid sync code.

Moreover, the last MAX_FRAME_HEADER_SIZE - 1 bytes ought not to be searched
for (the start of) a sync code because a header that might be found in this
region might not be completely available. These bytes ought to be searched
lateron when more data is available or when flushing.

Unfortunately there was an off-by-one error in the calculation of the
length to search of the post-wrap buffer: It was too large, because the
calculation was based on the amount of bytes available in the fifo from
the last pre-wrap byte onwards. This meant that a header might be
parsed twice (once prematurely and once regularly when more data is
available); it could also mean that an invalid header will be treated as
valid (namely if the length of said invalid header is
MAX_FRAME_HEADER_SIZE and the invalid byte that will be treated as the
last byte of this potential header happens to be the right CRC-8).

Should a header be parsed twice, the second instance will be the best child
of the first instance; the first instance's score will be
FLAC_HEADER_BASE_SCORE - FLAC_HEADER_CHANGED_PENALTY ( = 3) higher than
the second instance's score. So the frame belonging to the first
instance will be output and it will be done as a zero length frame (the
difference of the header's offset and the child's offset). This has
serious consequences when flushing, as returning a zero length buffer
signals to the caller that no more data will be output; consequently the
last frames not yet output will be dropped.

Furthermore, a "sample/frame number mismatch in adjacent frames" warning
got output when returning the zero-length frame belonging to the first
header, because the child's sample/frame number of course didn't match
the expected sample frame/number given its parent.

filter/hdcd-mix.flac from the FATE-suite was affected by this (the last
frame was omitted) which is the reason why several FATE-tests needed to
be updated.

Fixes ticket #5937.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-10-07 22:27:18 +02:00
Zhao Zhili 7c145b6441 FATE/dnn: fix stack buffer overflow
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-04 09:58:22 -03:00
Paul B Mahol 1ac0d5513e fate: update hashes after ya16 change 2019-09-26 16:59:14 +02:00
Ting Fu 9691e2a426 checkasm/vf_eq: add test for vf_eq
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-09-26 08:10:31 +08:00
Michael Niedermayer f8406ab4b9 avcodec: add max_samples
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-25 17:18:37 +02:00
Guo, Yejun 9ae42c130c FATE/dnn: add unit test for layer maximum
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-20 10:57:23 -03:00
Anthony Delannoy a221af1f5e avformat/mpegts: add support for EPG extraction from mpegts
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-09-19 21:30:54 +02:00
Guo, Yejun b766a13dba FATE/dnn: add unit test for dnn depth_to_space layer
'make fate-dnn-layer-depth2space' to run the test

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-19 11:29:57 -03:00
Guo, Yejun 24f507301b FATE/dnn: add unit test for dnn conv2d layer
'make fate-dnn-layer-conv2d' to run the test

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-09-19 11:21:38 -03:00
James Almer 1d86e4b3eb checkasm/opusdsp: declare opus_deemphasis as a function returning a float
Fixes ticket #8175

Signed-off-by: James Almer <jamrial@gmail.com>
2019-09-18 11:42:06 -03:00
Michael Niedermayer b6b9ac5698 avcodec/vp56rac: delay signaling an error on truncated input
A threshold of 1 is sufficient for simple_dump_cut.webm, 10 is used
just to be sure the next truncated file doesnt cause the same issue

Obvious alternative fixes are to simply accept that the file is broken or to
write some advanced error concealment or to
simply accept that the decoder wont stop at the end of input.

Fixes: Ticket 8069 (artifacts not the differing md5 which was there before 1afd246960)
Fixes: simple_dump_cut.webm
Fixes: regression of 1afd246960

fate-vp5 changes because the last frame is truncated and now handled
differently.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-11 22:36:33 +02:00
Lynne 4ce1e13b54 checkasm: add opusdsp tests 2019-09-11 03:28:22 +01:00
Andrey Semashev 6d9d053edb tests: Fix bash errors in lavf_container tests.
Because the lavf_container is sometimes called with only 2 arguments,
fate tests produce bash errors like this:

  tests/fate-run.sh: 299: test: =: unexpected operator

This commit fixes this.

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-09 18:16:06 +02:00
Calvin Walton 3ad5d4df9c lavfi/concat: allow to support inputs with different frame rates
Right now, the concat filter does not set the frame_rate value on any of
the out links. As a result, the default ffmpeg behaviour kicks in - to
copy the framerate from the first input to the outputs.

If a later input is higher framerate, this results in dropped frames; if
a later input is lower framerate it might cause judder.

This patch checks if all of the video inputs have the same framerate, and
if not it sets the out link to use '1/0' as the frame rate, the value
meaning "unknown/vfr".

A test is added to verify the VFR behaviour. The existing test for CFR
behaviour passes unchanged.
2019-09-08 16:48:28 +02:00
Gyan Doshi 2b66c757d6 fate: add test for stream_loop
Checks that seek to start indeed seeks to start.
2019-09-05 23:23:24 +05:30
Paul B Mahol 62459d6584 avfilter/vf_stereo3d: improve dubois anaglyphs 2019-08-30 22:41:07 +02:00
Guo, Yejun 09a455a246 dnn: introduce dnn operand (in c code) to hold operand infos within network
the info can be saved in dnn operand object without regenerating again and again,
and it is also needed for layer split/merge, and for memory reuse.

to make things step by step, this patch just focuses on c code,
the change within python script will be added later.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-30 11:41:30 -03:00
Michael Niedermayer e0c973e5be avformat/mpsubdec: Remove floating point usage
This makes the code bitexact between platforms.
Intermediate timestamps between frames are preserved.
The timebase is simplified.
Rounding differs from doubles in cases where timestamps/durations
are "funny"

Suggested-by: jb
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-08-29 15:14:32 +02:00
Paul B Mahol 428b4aacb1 avformat/mov: improve timecode calculation
Fixes timecode calculation for NTSC frame rates.
Fixes ticket #5978.
2019-08-28 16:27:58 +02:00
James Almer 8b71cc3363 Revert "avcodec/qtrle: Do not output duplicated frames on insufficient input"
This reverts commit a9dacdeea6.

This patch effectively made the decoder output vfr content out of samples
where cfr is expected.

Addresses ticket #7880.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-08-27 15:10:03 -03:00
Thilo Borgmann 1cfba7fc75 fate/als: Add test for conformance file with 512 channels. 2019-08-24 09:33:44 +02:00
Marton Balint 2fb550893f avformat/mpegtsenc: get rid of packet counting for sdt/pat/pmt
The packet counting based approach caused excessive sdt/pat/pmt for VBR, so
let's use a timestamp based approach instead similar to how we emit PCRs.
SDT/PAT/PMT period should be consistent for both VBR and CBR from now on.

Also change the type of sdt_period and pat_period to AV_OPT_TYPE_DURATION so no
floating point math is necessary.

Fixes ticket #3714.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-23 22:49:01 +02:00
Guo, Yejun d0fa1a58da FATE/dnn: let fate/dnn tests depend on ffmpeg static libraries
background:
DNN (deep neural network) is a sub module of libavfilter, and FATE/dnn
is unit test for the DNN module, one unit test for one dnn layer.
The unit tests are not based on the APIs exported by libavfilter,
they just directly call into the functions within DNN submodule.

There is an issue when run the following command:
build$ ../ffmpeg/configure --disable-static --enable-shared
make
make fate-dnn-layer-pad

And part of error message:
tests/dnn/dnn-layer-pad-test.o: In function `test_with_mode_symmetric':
/work/media/ffmpeg/build/src/tests/dnn/dnn-layer-pad-test.c:73: undefined reference to `dnn_execute_layer_pad'

The root cause is that function dnn_execute_layer_pad is a LOCAL symbol
in libavfilter.so, and so the linker could not find it when build dnn-layer-pad-test.
To check it, just run: readelf -s libavfilter/libavfilter.so | grep dnn

So, add dependency in fate/dnn Makefile with ffmpeg static libraries.
This is the same method used in fate/checkasm

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-08-19 11:37:16 -03:00
Limin Wang 6a3bdf3148 fate: add accurate_rnd+bitexact sws_flags for fate-gifenc
This fixes make fate issue for frame thread scale in my local testing

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-17 17:33:16 +02:00
Limin Wang ad3ef00ce5 avfilter/f_select: yuv will use Y plane only for scenecut detect
At the moment scene change detection score uses all planes to detect scene
changes. In this regard this is similar how the frozen frames detection works.
However, in classic encoding scene change detection typically only uses the Y
plane.

We might get more resonable scores for scene change if we also use only
the Y plane for calculating the score if the pixel format is YUV. Although
this will require additional work once packed YUV formats are added,
because for the moment the generic scene sad score calculation has no way
to ignore some components in a packed format.

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-17 17:15:19 +02:00
Zhong Li 8cd96e13ee fate: add a case for ticket #3229
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-08-13 10:46:20 +08:00
Andreas Rheinhardt b307d74fe6 compat/cuda: Change inclusion guards
cuda_runtime.h as well as dynlink_loader.h used nonstandard inclusion
guards with an AV_ prefix, although these files are not in an libav*/
path. So change the inclusion guards and adapt the ref file of the
source fate test accordingly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-08-05 12:07:09 +02:00
Steven Liu 46b97c0527 FATE: add hls single file mode test case
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-08-01 19:25:29 +08:00
Guo, Yejun 3805aae479 fate: add unit test for dnn-layer-pad
'make fate-dnn-layer-pad' to run the test

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-07-29 12:34:19 -03:00