Commit Graph

5161 Commits

Author SHA1 Message Date
Ting Fu
0de5043060 dnn-layer-math-unary-test: add unit test for tanh
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-07-06 12:45:14 +08:00
Ting Fu
c5de77e33c dnn-layer-math-unary-test: add unit test for cosh
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-07-06 12:45:14 +08:00
Ting Fu
85c0608c6b dnn-layer-math-unary-test: add unit test for sinh
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-07-06 12:45:14 +08:00
Limin Wang
49054fe94c FATE: fix colorbalance fate test failed on x86_32
floating point precision will cause rgb*max generate different value on
x86_32 and x86_64. have pass fate test on x86_32 and x86_64 by using
lrintf to get the nearest integral value for rgb * max before av_clip.

Reviewed-by:   Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-07-02 21:12:37 +08:00
Andreas Rheinhardt
5005b41ad6 fate: Update fate refs after cca982ee01
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-29 17:58:00 +02:00
Jun Zhao
60d79b1df9 lavc/aac_ac3_parser: improve the raw AAC file bit rate calculation
Now we just use one ADTS raw frame to calculate the bit rate, it's
lead to a larger error when get the duration from bit rate, the
improvement cumulate Nth ADTS frames to get the average bit rate.

e,g used the command get the duration like:
ffprobe -show_entries format=duration -i fate-suite/aac/foo.aac

before this improvement dump the duration=2.173935
after this improvement  dump the duration=1.979267

in fact, the real duration can be get by command like:
ffmpeg -i fate-suite/aac/foo.aac -f null /dev/null with time=00:00:01.97

Also update the fate-adtstoasc_ticket3715.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-06-26 09:53:36 +08:00
Ting Fu
24d1781cbd dnn-layer-math-unary-test: add unit test for atan
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-25 08:41:50 +08:00
Ting Fu
130c600144 dnn-layer-math-unary-test: add unit test for acos
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-25 08:41:50 +08:00
Ting Fu
057f6ee7f4 dnn-layer-math-unary-test: add unit test for asin
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-25 08:41:50 +08:00
Limin Wang
2f5994679b fate: add yuv420p10 and yuv422p10 tests for overlay filter
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-19 07:14:46 +08:00
Derek Buitenhuis
94bac7b3f8 avformat/movenc: Write 'av01' as a compatible brand when muxing AV1
This is a requirement of the AV1-ISOBMFF spec. Section 2.1.
General Requirements & Brands states:

    * It SHALL have the av01 brand among the compatible brands array of the FileTypeBox

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-06-17 19:06:45 +01:00
Limin Wang
4b3b217e30 avcodec/h264: create user data unregistered SEI side data for H.264
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-15 07:19:55 +08:00
Limin Wang
ed6dbbfc16 avcodec/hevc_sei: add support for user data unregistered SEI message
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-15 07:19:55 +08:00
Fei Wang
c721b45014 swscale: Add swscale input/output support for X2RGB10LE
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2020-06-12 17:56:15 +01:00
Fei Wang
b09fb030c1 lavu/pix_fmt: add new pixel format x2rgb10
The format is packed RGB with each channel 10 bits available and
include 2 bits unused.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2020-06-12 17:56:15 +01:00
Ting Fu
3ac2f7ccd7 dnn-layer-mathunary-test: add unit test for tan
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Ting Fu
dd3fe3e77c dnn-layer-mathunary-test: add unit test for cos
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Ting Fu
3f7c5a375b dnn-layer-mathunary-test: add unit test for sin
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Anton Khirnov
0d6b4351c6 Remove unnecessary use of avcodec_close().
Replace it with avcodec_free_context() or drop it completely as
appropriate.
2020-06-10 11:31:16 +02:00
Michael Niedermayer
49e766aa4c Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."
This causes regressions in end to end timestamps with mp3s and ffmpeg.
The revert is to avoid this regression in the 4.3 release

See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted.

This reverts commit 460132c998.
2020-06-08 22:08:37 +02:00
James Almer
821fda819a fate/vcodec: use the encoder private option for frame skip compare function
Stop using the deprecated global option

Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-04 09:56:01 -03:00
Zane van Iperen
01fd93e2ac fate: add adpcm_ima_ssi encoding test
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-01 23:32:28 +02:00
Jun Zhao
7f76f20fa0 checkasm: sw_rgb: Fix mixed declaration and code
Fix mixed declaration and code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-06-01 23:28:07 +08:00
Ting Fu
c51b46e5dd dnn-layer-mathunary-test: add unit test for abs
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-05-28 11:04:21 +08:00
Dale Curtis
460132c998 lavf/mp3dec: don't adjust start time; packets are not adjusted.
7546ac2fee made it so that the start_time for mp3 files is
adjusted for skip_samples. However, this appears incorrect because
subsequent packet timestamps are not adjusted and skip_samples are
applied by deleting data from a packet without changing the timestamp.

E.g., we are told the start_time is ~25ms and we get a packet with a
timestamp of 0 that has had the skip_samples discarded from it. As such
rendering engines may incorrectly discard everything prior to the
25ms thinking that is where playback should officially start. Since the
samples were deleted without adjusting timestamps though, the true
start_time is still 0.

Other formats like MP4 with edit lists will adjust both the start
time and the timestamps of subsequent packets to avoid this issue.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-05-27 10:22:17 +02:00
Anton Khirnov
ea980d4162 fate: add tests for h264 and vp9 video enc parameters export 2020-05-25 11:59:45 +02:00
Nicolas George
88567a2e52 lavfi: add untile filter. 2020-05-23 15:52:27 +02:00
Oneric
e6dcb6a0db avcodec/ass: explicitly set ScaledBorderAndShadow
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-23 00:26:38 +02:00
Anton Khirnov
f30a41a608 Stop hardcoding align=32 in av_frame_get_buffer() calls.
Use 0, which selects the alignment automatically.
2020-05-22 14:38:57 +02:00
Andreas Rheinhardt
57e570b508 checkasm/sw_scale: Fix stack-buffer-overflow
A buffer whose size is not a multiple of four has been initialized using
consecutive writes of 32bits. This results in a stack-buffer-overflow
reported by ASAN in the checkasm-sw_scale FATE-test.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-20 23:18:50 +02:00
Zane van Iperen
5a5d6e052a fate: add adpcm_ima_cunning tests
single:               Single-track
track{0,1}:           Dual-track
trunc-t1:             Truncated track 1
trunc-t2-track{0,1}:  Fully-truncated track 2
trunc-t2a-track{0,1}: Partially-truncated track 2
trunc-h2:             Truncated track 2 header

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-20 15:47:22 +02:00
Mark Reid
af5922a79a avcodec/exr: output float pixels in float pixel format
changes since v1
- default behavior, no longer hidden behind decoder parameter
- updated tests to reflect change

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-20 15:47:22 +02:00
Paul B Mahol
8b0575d763 avfilter/vf_colorkey: fix formula for calculation of difference
Also fixes colorhold filtering.
2020-05-19 20:10:34 +02:00
Andreas Rheinhardt
4ebfc13c33 avformat/matroskaenc: Don't ignore tags of chapters written late
The Matroska muxer writes the Chapters early when chapters were already
available when writing the header; in this case any tags pertaining to
these chapters get written, too.

Yet if no chapters had been supplied before writing the header, Chapters
can also be written when writing the trailer if any are supplied. Tags
belonging to these chapters were up until now completely ignored.

This commit changes this: Writing the tags belonging to chapters has
been moved to mkv_write_chapters(). If mkv_write_tags() has not been
called yet (i.e. when chapters are written when writing the header),
the AVIOContext for writing the ordinary Tags element is used, but not
output, as this is left to mkv_write_tags() in order to only write one
Tags element. Yet if mkv_write_tags() has already been called,
mkv_write_chapters() will output a Tags element of its own which only
contains the tags for chapters.

When chapters are available initially, the corresponding tags will now
be the first tags in the Tags element; but the ordering of tags in Tags
is irrelevant anyway.

This commit also makes chapter_id_offset local to mkv_write_chapters()
as it is used only there and not reused at all.

Potentially writing a second Tags element means that the maximum number
of SeekHead entries had to be incremented. All the changes to FATE
result from the ensuing increase in the amount of space reserved for the
SeekHead (21 bytes more).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-19 03:34:44 +02:00
Andreas Rheinhardt
81e39cf481 avformat/matroskaenc: Don't reserve space for duration when unseekable
We won't be able to seek back to write the actual duration anyway.

FATE-tests using the md5pipe command had to be updated due to this change.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-19 01:03:05 +02:00
Martin Storsjö
9c326af1d0 checkasm: swscale: Fix running the hscale test on 32 bit x86
This function doesn't call emms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-16 08:16:12 +03:00
Martin Storsjö
eba1ebd9bf checkasm: sw_rgb: Add a test for interleaveBytes
Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 23:38:01 +03:00
Martin Storsjö
5bdffced0a checkasm: pixblockdsp: Add tests for get_pixels_unaligned and diff_pixels_unaligned
Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 23:37:27 +03:00
Martin Storsjö
ed7d73355e checkasm: aarch64: Check for stack overflows
Also fill x8-x17 with garbage before calling the function.

Figure out the number of stack parameters and make sure that the
value on the stack after those is untouched.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 21:22:36 +03:00
Martin Storsjö
6cb2d4d94b checkasm: arm: Check for stack overflows
Figure out the number of stack parameters and make sure that the
value on the stack after those is untouched.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 21:22:34 +03:00
Martin Storsjö
3f266cf49e checkasm: arm: Don't use blx to call checkasm_fail_func
We should just use a normal bl here, and the linker will add the 'x'
bit if necessary.

This fixes calling the checkasm_fail_func on windows, where the
code is built in thumb mode (and the linker doesn't clear the 'x'
bit in the blx instruction).

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 21:22:32 +03:00
Martin Storsjö
89cf9e1fb6 checkasm: arm: Make the indentation consistent with other files
This makes it easier to share code with e.g. the dav1d implementation
of checkasm.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-05-15 21:22:27 +03:00
Josh de Kock
5913cd4e6c checkasm: add hscale test
This tests the hscale 8bpp to 14/18bpp functions with different filter
sizes.

Signed-off-by: Josh de Kock <josh@itanimul.li>
2020-05-15 10:29:30 +01:00
Martin Storsjö
3ce1b2bf8d checkasm: add function to check and diff memory
This was ported from dav1d (c950e7101bdf5f7117bfca816984a21e550509f0).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2020-05-15 10:29:30 +01:00
Limin Wang
3b5a36c56d FATE: add fate test for minterpolate filter
have tested on linux x86_32/64, mingw32/64 arm & mips qemu

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Limin Wang
dd24fdc672 fate: add scdet metadata test
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 23:03:07 +08:00
Limin Wang
e9668929b8 FATE: add a test for colorbalance
Tested on x86-32/64, mingw32/64, arm & mips qemu

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-14 09:19:26 +08:00
Michael Niedermayer
5f359f2b67 test: Add codecview test 2020-05-12 01:00:28 +02:00
Michael Niedermayer
b1e9764c5e tests: Add pp7, spp tests based on pp test 2020-05-12 01:00:28 +02:00
Limin Wang
5752e97b4e fate: add signalstats 8bit and 10bit test
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-10 22:32:34 +08:00
Guo, Yejun
6fd61234d5 dnn-layer-mathbinary-test: add unit test for minimum
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-05-08 15:22:44 +08:00
Limin Wang
96e5e6abb9 avformat/mux: Set AV_PKT_FLAG_KEY for is_intra_only packet
The patch will make audio and subtitle packets be marked as AV_PKT_FLAG_KEY.

For audio, it'll caused the audio sample to be sync sample.
To verify ref/fate/movenc results:
1. Get the movenc test data
[lmwang@vpn ffmpeg]$ libavformat/tests/movenc -w && mkdir -p audio_old && mv *.mp4 audio_old_

After applied the patch:
[lmwang@vpn ffmpeg]$ make fate-movenc SAMPLES=../fate-suite
[lmwang@vpn ffmpeg]$ libavformat/tests/movenc -w && mkdir -p audio_key && mv *.mp4 audio_key

2. Get l-smash and build boxdumper
https://github.com/l-smash/l-smash.git

3. dump the box of crc change mp4 and diff -u
[lmwang@vpn ffmpeg]$ ../l-smash/cli/boxdumper --box audio_key/non-empty-moov-no-elst.mp4  > audio_key/non-empty-moov-no-elst.log
[lmwang@vpn ffmpeg]$ ../l-smash/cli/boxdumper --box audio_old/non-empty-moov-no-elst.mp4  > audio_old/non-empty-moov-no-elst.log
[lmwang@vpn ffmpeg]$ diff -u audio_key/non-empty-moov-no-elst.log audio_old/non-empty-moov-no-elst.log
-                default_sample_flags = 0x02000000
-                    independent
-                    sync sample
+                default_sample_flags = 0x01010000
+                    dependent
+                    non-sync sample

4. have checked the change of crc are caused by default_sample_flags
non-empty-moov.mp4, non-empty-moov-elst.mp4,
non-empty-moov-no-elst.mp4, empty-moov.mp4, delay-moov-content.mp4,
empty-moov-second-frag.mp4, empty-moov-second-frag-discont.mp4,
delay-moov-second-frag-discont.mp4, delay-moov-elst-second-frag.mp4
etc

5 For subtitle, it'll effect for tests/ref/fate/binsub-movtextenc and
tests/ref/fate/sub2video, that's expecting result for the subtitle is
marked as keyframe. Below is the checking result of binsub-movtextenc:

[lmwang@vpn ffmpeg]$ ./ffmpeg -i ../fate-suite/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov audio_key/binsub-movtextenc.mp4
[lmwang@vpn ffmpeg]$ ./ffmpeg -i ../fate-suite/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -fflags +bitexact -movflags frag_keyframe+empty_moov audio_old/binsub-movtextenc.mp4
[lmwang@vpn ffmpeg]$../l-smash/cli/boxdumper audio_key/binsub-movtextenc.mp4  > audio_key/binsub-movtextenc.log
[lmwang@vpn ffmpeg]$../l-smash/cli/boxdumper audio_old/binsub-movtextenc.mp4  > audio_old/binsub-movtextenc.log
[lmwang@vpn ffmpeg]$ diff -u audio_key/binsub-movtextenc.log audio_old/binsub-movtextenc.log
.... // the key difference is the flag for sync sample
-                flags = 0x000701
+                flags = 0x000301
                     data-offset-present
                     sample-duration-present
                     sample-size-present
-                    sample-flags-present
                 sample_count = 6
-                data_offset = 188
+                data_offset = 164
                 sample[0]
                     sample_duration = 1570000
                     sample_size = 21
-                    sample_flags = 0x02000000
-                        independent
-                        sync sample
-                        degradation_priority = 0
                 sample[1]
                     sample_duration = 510000
                     sample_size = 2
-                    sample_flags = 0x01010000
-                        dependent
-                        non-sync sample
-                        degradation_priority = 0
                 sample[2]
                     sample_duration = 1690000
                     sample_size = 9
-                    sample_flags = 0x02000000
-                        independent
-                        sync sample
-                        degradation_priority = 0

Suggested-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Suggested-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-07 07:12:24 +08:00
Steven Liu
648051f07c avformat/url: check url root node when rel include double dot and trim double dot
fix ticket: 8625
and add testcase into url for double dot corner case

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-05-06 12:00:26 +08:00
Steven Liu
03b1b96832 tests/fate/hlsenc: rename fate macro define from FATE_AFILTER to FATE_HLSENC
and add fate-hlsenc for test all of the testcase
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-05-06 11:25:57 +08:00
Mark Reid
b4967fc71c libswscale: add output support for AV_PIX_FMT_GBRAPF32
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-05 20:06:58 +02:00
vectronic
a75924ec88 fftools/ffprobe: show closed caption info in the stream dump
Signed-off-by: vectronic <hello.vectronic@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-02 19:14:08 +02:00
Lynne
4fd0559b77
fate/oggopus-demux: fix fate failure
Failure was due to the extra comment printed by libavcodec/utils.c since
side data is used to signal the skipped samples.
2020-05-01 01:36:43 +01:00
Linjie Fu
e3510fb178 tests/api/api-h264-slice-test: remove unused bool header
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
2020-04-29 13:30:46 +01:00
Martin Storsjö
499f43ae90 fate: hevc: Skip a few large testcases if large tests are disabled
Signed-off-by: Martin Storsjö <martin@martin.st>
2020-04-26 22:30:43 +03:00
Martin Storsjö
02b74bd76a fate: Skip the dnxhd-uhd-hr-sq tests of large tests are disabled
These tests are also in the same size range as the previously
skipped 2k and 4k tests.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-04-26 22:30:37 +03:00
Martin Storsjö
f4d8fad802 dnn-layer-mathbinary-test: Fix tests for cases with extra intermediate precision
This fixes tests on 32 bit x86 mingw with clang, which uses x87
fpu by default.

In this setup, while the get_expected function is declared to
return float, the compiler is (especially given the optimization
flags set) free to keep the intermediate values (in this case,
the return value from the inlined function) in higher precision.

This results in the situation where 7.28 (which actually, as
a float, ends up as 7.2800002098), multiplied by 100, is
728.000000 when really forced into a 32 bit float, but 728.000021
when kept with higher intermediate precision.

For the multiplication case, a more suitable epsilon would e.g.
be 2*FLT_EPSILON*fabs(expected_output), but just increase the
current hardcoded threshold for now.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-04-24 14:41:06 +03:00
Guo, Yejun
2e38c63630 dnn-layer-mathbinary-test: add unit test for divide
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-04-22 13:15:09 +08:00
Guo, Yejun
265b5bd324 dnn-layer-mathbinary-test: add unit test for 'mul'
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-04-22 13:14:55 +08:00
Guo, Yejun
17006196a6 dnn-layer-mathbinary-test: add unit test for add
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-04-22 13:14:39 +08:00
Andreas Rheinhardt
e3c54b549a avformat/matroskaenc: Redo handling of FlagDefault
Up until now, the Matroska muxer would mark a track as default if it had
the disposition AV_DISPOSITION_DEFAULT or if there was no track with
AV_DISPOSITION_DEFAULT set; in the latter case even more than one track
of a kind (audio, video, subtitles) was marked as default which is not
sensible.

This commit changes the logic used to mark tracks as default. There are
now three modes for this:
a) In the "infer" mode the first track of every type (audio, video,
subtitles) with default disposition set will be marked as default; if
there is no such track (for a given type), then the first track of this
type (if existing) will be marked as default. This behaviour is inspired
by mkvmerge. It ensures that the default flags will be set in a sensible
way even if the input comes from containers that lack the concept of
default flags. This mode is the default mode.
b) The "infer_no_subs" mode is similar to the "infer" mode; the
difference is that if no subtitle track with default disposition exists,
no subtitle track will be marked as default at all.
c) The "passthrough" mode: Here the track will be marked as default if
and only the corresponding input stream had disposition default.

This fixes ticket #8173 (the passthrough mode is ideal for this) as
well as ticket #8416 (the "infer_no_subs" mode leads to the desired
output).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-21 08:36:20 +02:00
Andreas Rheinhardt
5b6e164b4b avformat/matroskaenc: Don't waste bytes on length fields
Several EBML Master elements for which a good upper bound of the final
length was available were nevertheless written without giving an
upper bound of the final length to start_ebml_master(), so that their
length fields were eight bytes long. This has been changed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-21 08:11:09 +02:00
Andreas Rheinhardt
945b928730 avformat/matroskaenc: Improve Cues in case of no video
The Matroska muxer currently only adds CuePoints in three cases:
a) For video keyframes. b) For the first audio frame in a new Cluster if
in DASH-mode. c) For subtitles. This means that ordinary Matroska audio
files won't have any Cues which impedes seeking.

This commit changes this. For every track in a file without video track
it is checked and tracked whether a Cue entry has already been added
for said track for the current Cluster. This is used to add a Cue entry
for each first packet of each track in each Cluster.

Implements #3149.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-20 21:30:46 +02:00
James Almer
300e6f03d9 fate/truehd: add a test for the truehd_core bitstream filter
Signed-off-by: James Almer <jamrial@gmail.com>
2020-04-20 13:53:42 -03:00
James Almer
051d5b284e fate: move TrueHD tests to their own file
Signed-off-by: James Almer <jamrial@gmail.com>
2020-04-20 13:53:42 -03:00
Andreas Rheinhardt
2e92e1fb27 fate/matroska: Add test for chapters, Vorbis and WebM DASH
Moreover, putting the Cues in front of the Clusters by reserving space
in advance is also tested.

The new capability of using ffprobe during a remux/transcode test are
used here for information about the chapters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-19 00:25:05 +02:00
Andreas Rheinhardt
277306f54b fate: Allow to test temporary files with ffprobe
This is primarily intended to test that muxers correctly write chapters
or metadata; but given that it does this by having our demuxers read the
generated files, it also tests demuxers. And of course it may prove
useful for encoders, too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-19 00:13:40 +02:00
Andreas Rheinhardt
e1d9bfc3ee fate: Fix dependencies for ffprobe tests with external samples
Up until now, they were appended to the FATE_EXTERN-$(CONFIG_FFMPEG)
variable and were therefore activated when ffmpeg was enabled regardless
of whether ffprobe was enabled.

Also the same happened with FATE_SAMPLES_FASTSTART, although the
corresponding test (mov-faststart-4gb-overflow) only requires external
samples.

Furthermore, remove the unused FATE_FULL variable (FATE_EXTERN_FFPROBE has
taken its place).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-18 23:59:19 +02:00
Michael Bradshaw
05039c1334 tests/ref/vsynth: fix fate colr changes (again)
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2020-04-13 13:34:49 -07:00
Michael Bradshaw
19a16330f4 tests/ref/vsynth: fix fate colr changes
Commit 9842fd3aaf stopped guessing colr
values.

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2020-04-13 12:59:06 -07:00
Andreas Rheinhardt
ccadd00a4a avformat/matroskaenc: Make output more deterministic
Using random values for TrackUID and FileUID (as happens when the
AVFMT_FLAG_BITEXACT flag is not set) has the obvious downside of making
the output indeterministic. This commit mitigates this by writing the
potentially random values with a fixed size of eight byte, even if their
actual values would fit into less than eight bytes. This ensures that
even in non-bitexact mode, the differences between two files generated
with the same settings are restricted to a few bytes in the header.
(Namely the SegmentUID, the TrackUIDs (in Tracks as well as when
referencing them via TagTrackUID), the FileUIDs (in Attachments as
well as in TagAttachmentUID) as well as the CRC-32 checksums of the
Info, Tracks, Attachments and Tags level-1-elements.) Without this
patch, there might be an offset/a size difference between two such
files.

The FATE-tests had to be updated because the fixed-sized UIDs are also
used in bitexact mode.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-13 08:43:14 +02:00
Andreas Rheinhardt
358b58cb29 avformat/matroskaenc: Remove allocations for Attachments
If there are Attachments to write, the Matroska muxer currently
allocates two objects: An array that contains an entry for each
AttachedFile containing just the stream index of the corresponding
stream and the FileUID used for this AttachedFile; and a structure with
a pointer to said array and a counter for said array. These uids are
generated via code special to Attachments: It uses an AVLFG in the
normal and a sha of the attachment data in the bitexact case. (Said sha
requires an allocation, too.)

But now that an uid is generated for each stream in mkv_init(), there is
no need any more to use special code for generating the FileUIDs of
AttachedFiles: One can simply use the uid already generated for the
corresponding stream. And this makes the whole allocations of the
structures for AttachedFiles as well as the structures itself superfluous.
They have been removed.

In case AVFMT_FLAG_BITEXACT is set, the uids will be different from the
old ones which is the reason why the FATE-test lavf-mkv_attachment
needed to be updated. The old method had the drawback that two
AttachedFiles with the same data would have the same FileUID.
The new one doesn't.

Also notice that the dynamic buffer used to write the Attachments leaks
if an error happens when writing the buffer. By removing the
allocations potential sources of errors have been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-13 08:34:59 +02:00
Andreas Rheinhardt
bd7dea3f4f avformat/matroskaenc: Don't waste bytes writing durations
Tags in the Matroska file format can be summarized as follows: There is
a level 1-element called Tags containing one or many Tag elements each
of which in turn contain a Targets element and one or many SimpleTags.
Each SimpleTag roughly corresponds to a single key-value pair similar to
an AVDictionaryEntry. The Targets meanwhile contains information to what
the metadata contained in the SimpleTags contained in the containing Tag
applies (i.e. to the file as a whole or to an individual track).

The Matroska muxer writes such metadata. It puts the metadata of every
stream into a Tag whose Targets makes it point to the corresponding
track. And if the output is seekable, then it also adds another Tag for
each track whose Targets corresponds to the track and where it reserves
space in a SimpleTag to write the duration at the end of the muxing
process into.

Yet there is no reason to write two Tag elements for a track and a few
bytes (typically 24 bytes per track) can be saved by adding the duration
SimpleTag to the other Tag of the same track (if it exists).

FATE has been updated because the output files changed. (Tests that
write to unseekable output (pipes) needn't be updated (no duration tag
has ever been written for them) and the same applies to tests without
further metadata.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-13 08:08:42 +02:00
John Stebbins
91447ae3ba lavc/movtextdec: add alpha default to ass header colors
Signed-off-by: Philip Langdale <philipl@overt.org>
2020-04-10 09:32:13 -07:00
Anton Khirnov
5e316096fa h264_ps: make the PPS hold a reference to its SPS
It represents the relationship between them more naturally and will be
useful in the following commits.

Allows significantly more frames in fate-h264-attachment-631 to be
decoded.
2020-04-10 15:52:41 +02:00
Guo, Yejun
bbc64799dc dnn-layer-mathbinary-test: add unit test for subtraction
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-04-07 11:04:40 +08:00
Stephen Hutchinson
0c75acb4ce compat/avisynth: remove avisynth headers 2020-04-05 01:17:55 +02:00
Andreas Rheinhardt
45cb93e9bd fate/matroska: Add test for updating CodecPrivate from packet sidedata
containing updated extradata, in this case a new FLAC streaminfo.
Furthermore, it also tests that the Matroska muxer is able to preserve
uncommon channel layouts by adding Vorbis comments to the CodecPrivate.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-03 00:33:39 +02:00
Andreas Rheinhardt
96bf6d61e2 avformat/wvdec: Export version as extradata
It might be used by the Matroska muxer. This is also the reason why the
FATE-tests for muxing WavPack into Matroska needed to be updated: They
now write the correct version 4.07 and not 4.03 as before.

Reviewed-by: David Bryant <david@wavpack.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-02 07:17:34 +02:00
Andreas Rheinhardt
048bc3fe31 avformat/matroskadec: Add a workaround for missing WavPack extradata
mkvmerge versions 6.2 to 40.0 had a bug that made it not propagate the
WavPack extradata (containing the WavPack version) during remuxing from
a Matroska file; currently our demuxer would treat every WavPack block
encountered as invalid data (unless the WavPack stream is to be
discarded (i.e. the streams discard is >= AVDISCARD_ALL)) and try to
resync to the next level 1 element.

Luckily, the WavPack version is currently not really important; so we
fix this problem by assuming a version. David Bryant, the creator of
WavPack, recommended using version 0x410 (the most recent version) for
this. And this is what this commit does.

A FATE-test for this has been added.

Reviewed-by: David Bryant <david@wavpack.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-04-02 07:12:01 +02:00
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
Martin Storsjö
8f70e261fa checkasm: float_dsp: Scale FLT/DBL_EPSILON sufficiently when comparing
As the values generated by av_bmg_get can be arbitrarily large
(only the stddev is specified), we can't use a fixed tolerance.

This matches what was done for test_vector_dmul_scalar in
38f966b222.

This fixes the float_dsp checkasm test for some seeds, when built
with clang for mingw/x86_32.

Signed-off-by: Martin Storsjö <martin@martin.st>
2019-12-11 22:19:45 +02:00
Andreas Rheinhardt
9f7b2b37e3 fate/matroska: Add a test for propagating flac channel layouts
contained in Vorbis comments in the CodecPrivate of flac tracks.
Moreover, it also tests header removal compression.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-08 18:20:53 -03:00
Andreas Rheinhardt
ff2b75d94c avformat/matroskadec: Add a fate test for CodecPrivate compression
This test contains a track with zlib compressed CodecPrivate in addition
to compressed frames; the former was unchecked before.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-07 23:11:55 -03:00
James Almer
ade7f4c60c fate/matroska: fix dependencies for fate-matroska-prores-zlib test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-07 13:30:18 -03:00
James Almer
70efa31ba1 fate/matroska: add a demux test for ProRes using zlib compression
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-07 12:36:21 -03:00
Michael Niedermayer
37f31f4e50 avcodec/fitsdec: Use lrint()
Fixes: fate-fitsdec-bitpix-64

Possibly Fixes: -nan is outside the range of representable values of type 'unsigned short'
Possibly Fixes: 17769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-5678314672357376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-05 20:20:05 +01:00
James Almer
94fd85d81d fate/matroska: add a test for xiph lacing
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-04 22:52:01 -03:00
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
Paul B Mahol
cc6a1f1417 avcodec/adxenc: add EOF header
Fixes #8031.
2019-07-25 15:13:09 +01:00
Limin Wang
b696caba1a avformat/f_select: add support for more pixel formats for scene change score calculations
This avoids automatic conversions to rgb if scene change score is used in the expression.

Below is the tested results for the new added pixel format without autoscale to rgb24:
1. AV_PIX_FMT_YUVJ420P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,select=gt(scene\,.25)"

master:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.875036
pkt_pts=5800|tag:lavfi.scene_score=1.000000
pkt_pts=6720|tag:lavfi.scene_score=0.461625
pkt_pts=8160|tag:lavfi.scene_score=1.000000
pkt_pts=9760|tag:lavfi.scene_score=1.000000
pkt_pts=14080|tag:lavfi.scene_score=0.838916
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.474948
pkt_pts=20040|tag:lavfi.scene_score=0.379700
pkt_pts=21760|tag:lavfi.scene_score=1.000000
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f  0.71s user 0.01s system 99% cpu 0.721 total

patch applied:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.668643
pkt_pts=5800|tag:lavfi.scene_score=0.996721
pkt_pts=6720|tag:lavfi.scene_score=0.357390
pkt_pts=8160|tag:lavfi.scene_score=0.886268
pkt_pts=9760|tag:lavfi.scene_score=0.926219
pkt_pts=14080|tag:lavfi.scene_score=0.650033
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.316402
pkt_pts=20040|tag:lavfi.scene_score=0.269509
pkt_pts=21760|tag:lavfi.scene_score=1.000000
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f  0.19s user 0.01s system 81% cpu 0.240 total

2. AV_PIX_FMT_YUV420P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,select=gt(scene\,.2)"
master:
pkt_pts=3587|tag:lavfi.scene_score=0.462364
pkt_pts=4838|tag:lavfi.scene_score=0.419519
pkt_pts=6548|tag:lavfi.scene_score=0.397027
pkt_pts=9968|tag:lavfi.scene_score=0.419245
pkt_pts=12471|tag:lavfi.scene_score=0.413084
pkt_pts=16225|tag:lavfi.scene_score=0.506370
pkt_pts=19645|tag:lavfi.scene_score=0.507538
pkt_pts=22314|tag:lavfi.scene_score=0.504319
pkt_pts=24817|tag:lavfi.scene_score=0.417544
pkt_pts=25651|tag:lavfi.scene_score=0.413916
pkt_pts=26652|tag:lavfi.scene_score=0.487707
18.58s user 0.07s system 99% cpu 18.663 total

patch applied:
pkt_pts=3587|tag:lavfi.scene_score=0.272173
pkt_pts=4838|tag:lavfi.scene_score=0.247841
pkt_pts=6548|tag:lavfi.scene_score=0.233134
pkt_pts=9968|tag:lavfi.scene_score=0.247253
pkt_pts=12471|tag:lavfi.scene_score=0.244129
pkt_pts=16225|tag:lavfi.scene_score=0.302531
pkt_pts=19645|tag:lavfi.scene_score=0.303560
pkt_pts=22314|tag:lavfi.scene_score=0.301861
pkt_pts=24817|tag:lavfi.scene_score=0.249331
pkt_pts=25651|tag:lavfi.scene_score=0.247096
pkt_pts=26652|tag:lavfi.scene_score=0.287728
10.90s user 0.06s system 99% cpu 10.967 total

3. AV_PIX_FMT_YUV422P

time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_1080-sdr.mkv,format=yuv422p,select=gt(scene\,.2)"
master:

patched applied:
pkt_pts=3587|tag:lavfi.scene_score=0.224017
pkt_pts=4838|tag:lavfi.scene_score=0.204225
pkt_pts=9968|tag:lavfi.scene_score=0.204636
pkt_pts=12471|tag:lavfi.scene_score=0.202772
pkt_pts=16225|tag:lavfi.scene_score=0.248765
pkt_pts=19645|tag:lavfi.scene_score=0.250144
pkt_pts=22314|tag:lavfi.scene_score=0.248802
pkt_pts=24817|tag:lavfi.scene_score=0.208362
pkt_pts=25651|tag:lavfi.scene_score=0.205777
pkt_pts=26652|tag:lavfi.scene_score=0.230742

4.  AV_PIX_FMT_YUV420P10
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../Passengers_Breakfast_4k.mkv,select=gt(scene\,.2)"

master:
pkt_pts=3587|tag:lavfi.scene_score=0.269890
pkt_pts=4838|tag:lavfi.scene_score=0.248957
pkt_pts=6548|tag:lavfi.scene_score=0.234619
pkt_pts=9969|tag:lavfi.scene_score=0.224912
pkt_pts=12471|tag:lavfi.scene_score=0.225158
pkt_pts=16225|tag:lavfi.scene_score=0.289809
pkt_pts=19645|tag:lavfi.scene_score=0.285013
pkt_pts=22314|tag:lavfi.scene_score=0.280295
pkt_pts=24817|tag:lavfi.scene_score=0.206486
pkt_pts=25651|tag:lavfi.scene_score=0.208556
pkt_pts=26652|tag:lavfi.scene_score=0.249577
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f  76.03s user 0.22s system 99% cpu 1:16.27 total

patch applied
pkt_pts=3587|tag:lavfi.scene_score=0.269890
pkt_pts=4838|tag:lavfi.scene_score=0.248957
pkt_pts=6548|tag:lavfi.scene_score=0.234619
pkt_pts=9969|tag:lavfi.scene_score=0.224912
pkt_pts=12471|tag:lavfi.scene_score=0.225158
pkt_pts=16225|tag:lavfi.scene_score=0.289809
pkt_pts=19645|tag:lavfi.scene_score=0.285013
pkt_pts=22314|tag:lavfi.scene_score=0.280295
pkt_pts=24817|tag:lavfi.scene_score=0.206486
pkt_pts=25651|tag:lavfi.scene_score=0.208556
pkt_pts=26652|tag:lavfi.scene_score=0.249577
./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f  50.27s user 0.20s system 99% cpu 50.476 total

5. AV_PIX_FMT_RGBA, AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8
are tested by format= with the fate sample: Vertical400kbit.sorenson3.mov like below:
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=rgba,select=gt(scene\,.25)"

patch applied:
pkt_pts=1620|tag:lavfi.scene_score=1.000000
pkt_pts=4140|tag:lavfi.scene_score=0.656277
pkt_pts=5800|tag:lavfi.scene_score=1.000000
pkt_pts=6720|tag:lavfi.scene_score=0.346218
pkt_pts=8160|tag:lavfi.scene_score=0.987686
pkt_pts=9760|tag:lavfi.scene_score=1.000000
pkt_pts=14080|tag:lavfi.scene_score=0.629187
pkt_pts=15700|tag:lavfi.scene_score=1.000000
pkt_pts=18500|tag:lavfi.scene_score=0.356211
pkt_pts=20040|tag:lavfi.scene_score=0.284775
pkt_pts=21760|tag:lavfi.scene_score=1.000000

6. AV_PIX_FMT_YUVJ422P
time ./ffprobe -of compact=p=0 -show_entries frame=pkt_pts:frame_tags -bitexact -f lavfi \
"sws_flags=+accurate_rnd+bitexact;movie=../fate-suite/svq3/Vertical400kbit.sorenson3.mov,format=yuvj422p,select=gt(scene\,.25)"

patch applied:
pkt_pts=1620|tag:lavfi.scene_score=0.838281
pkt_pts=4140|tag:lavfi.scene_score=0.541382
pkt_pts=5800|tag:lavfi.scene_score=0.780588
pkt_pts=6720|tag:lavfi.scene_score=0.298274
pkt_pts=8160|tag:lavfi.scene_score=0.699106
pkt_pts=9760|tag:lavfi.scene_score=0.730136
pkt_pts=14080|tag:lavfi.scene_score=0.537742
pkt_pts=15700|tag:lavfi.scene_score=0.811946
pkt_pts=18500|tag:lavfi.scene_score=0.263382
pkt_pts=21760|tag:lavfi.scene_score=0.880773

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-07-22 22:54:51 +02:00
Limin Wang
d75c7dd45e fate: change the scenecut fate threshold
why change .4 to .25, it's for:
one scenecut(pkt_pts=20040) isn't detected by 0.4 threshold

why not change to 0.3 instead of 0.25:
it will miss the scenecut(pkt_pts=20040) after applying the next
patch which enables yuvj420

for fate testing, it's better to catch all scenecut scenes.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-07-22 22:54:51 +02:00
Steven Liu
ac22835db9 fate: add hls fmp4 segment type test case
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-07-15 21:57:43 +08:00
Marton Balint
397abca001 avformat/movenc: use unspecified language by default
English was used before.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-07-12 20:26:38 +02:00
Steven Liu
af9dc02e6b fate: add hls_list_size fate test case
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-07-11 09:39:44 +08:00
Steven Liu
89ea0c9bfd fate: add hls_init_time option fate
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-07-11 09:37:29 +08:00
Mark Thompson
e3424575f5 lavc/h265_profile_level: Add unit test
Operates in the same way as the h264-levels test.
2019-07-07 13:29:50 +01:00
Peter Ross
f4c35a458f fate: add VP4 test 2019-06-12 20:06:20 +10:00