Commit Graph

4823 Commits

Author SHA1 Message Date
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
Michael Niedermayer 640e401aed tests/ref/fate/nuv-rtjpeg: Preserve the original timestamps
The tests previously rounded the timestamps. Its better in a fate test to preserve
the data from the demuxer and decoder.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-06-12 12:01:32 +02:00
Ruiling Song 8f4963ad25 checkasm/vf_gblur: add test for horiz_slice simd
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-06-12 08:54:05 +08:00
Peter Ross b124327216 fate: add dst decoder test 2019-06-10 09:44:11 +10:00
Andreas Rheinhardt 8b2140de63 avutil: Add missing reference files for pixdesc fate test
Commit cd48318035 added support for NV24 and NV42, including several
fate tests for these formats, but did not include the reference files
for the tests filter-pixdesc-nv24 and filter-pixdesc-nv42. As a result,
these two tests were broken.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-14 12:06:26 +02:00
Philip Langdale 4fa4f1d7a9 swscale: Add test for isSemiPlanarYUV to pixdesc_query
Lauri had asked me what the semi planar formats were and that reminded
me that we could add it to pixdesc_query so we know exactly what the
list is.
2019-05-12 07:51:02 -07:00
Philip Langdale cd48318035 swscale: Add support for NV24 and NV42
The implementation is pretty straight-forward. Most of the existing
NV12 codepaths work regardless of subsampling and are re-used as is.
Where necessary I wrote the slightly different NV24 versions.

Finally, the one thing that confused me for a long time was the
asm specific x86 path that did an explicit exclusion check for NV12.
I replaced that with a semi-planar check and also updated the
equivalent PPC code, which Lauri kindly checked.
2019-05-12 07:51:02 -07:00
Philip Langdale 5de4f1d871 avutil: Add NV24 and NV42 pixel formats
These are the 4:4:4 variants of the semi-planar NV12/NV21 formats.

These formats are not used much, so we've never had a reason to add
them until now. VDPAU recently added support HEVC 4:4:4 content
and when you use the OpenGL interop, the returned surfaces are in
NV24 format, so we need the pixel format for media players, even
if there's no direct use within ffmpeg.

Separately, there are apparently webcams that use NV24, but I've
never seen one.
2019-05-12 07:51:02 -07:00
Andreas Rheinhardt 0b61ddb576 avformat/matroskaenc: Don't waste bytes writing level 1 elements
Up until now, the length field of most level 1 elements has been written
using eight bytes, although it is known in advance how much space the
content of said elements will take up so that it would be possible to
determine the minimal amount of bytes for the length field. This
commit changes this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt add68dcca9 avformat/matroskaenc: Write CRC-32 in non-seekable mode
Given that in both the seekable as well as the non-seekable mode dynamic
buffers are used to write level 1 elements and that now no seeks are
used in the seekable case any more, the two modes can be combined; as a
consequence, the non-seekable mode automatically inherits the ability to
write CRC-32 elements.

There are no differences in case the output is seekable; when it is not
and writing CRC-32 elements is disabled, there can still be minor
differences because before this commit, the EBML ID and length field
were counted towards the cluster size limit; now they no longer are.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:30 -03:00
Andreas Rheinhardt 4e6df068b5 avformat/matroskaenc: Don't waste bytes in EBML Header
Up until now the EBML Header length field has been written with eight
bytes, although the EBML Header is always so small that only one byte
is needed for it. This patch saves seven bytes for every Matroska/Webm
file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-08 13:02:29 -03:00
James Almer f60ddb7310 fate/checkasm: add missing v210dec test
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-03 01:07:38 -03:00
James Darnley 76c370af64 checkasm: add test for v210dec 2019-05-02 19:21:37 +02:00
Carl Eugen Hoyos d0ca749adb tests/fate-run: New variable hostexecsuf for local fate tools.
Allows running fate in-tree on wsl with msvc.
2019-04-24 01:42:56 +02:00
Jun Zhao 8d3630c540 lavf/oggparsevorbis: Fix change the case of metadata keys issue
The spec in https://xiph.org/vorbis/doc/v-comment.html states that
the metadata keys are case-insensitive, so don't change the case
and update the fate test case.

Fix #7784

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-04-22 23:24:42 +08:00
Hendrik Leppkes a87774636b tests: don't include TARGET_PATH in the sample path needlessly
The transcode() helper function will already prepend the TARGET_PATH to
the sample path, if its a relative path. This avoids an issue on
Windows, where the relative path check could fail.
2019-04-19 16:24:14 +02:00
Carl Eugen Hoyos 96fc0cbfde tests: Add EXESUF to program calls.
Fixes fate in Windows subsystem for Linux.
2019-04-19 01:11:39 +02:00
Steven Liu 55619f3012 rename hls_segment_filename in fate-hls-segment-size for fate 2019-04-19 06:22:34 +08:00
Steven Liu 608d5fd8b6 add tests/ref/fate/hls-segment-size for the fate test
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-04-19 06:14:03 +08:00
Steven Liu 2a50f1d9e4 tests/fate: add fate-hls-segment-size for hls_segment_size test
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-04-17 16:10:23 +08:00
Marton Balint f9840cd2b5 avformat/mxfdec: use operational_pattern_ul instead of operational_pattern for metadata
This makes it more consistent with other metadata keys.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-14 21:54:35 +02:00
Marton Balint 6ed7df5b20 avformat/mxfdec: export operational pattern UL as file metadata
Can be useful for API users as ffmpeg/libavformat can't properly support some
operational patterns.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-04-11 21:17:57 +02:00
Derek Buitenhuis 772c73e61f FATE: Add test for HEVC files that claim to have two first slices
This makes sure we don't regress on 70c8c8a818.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-04-05 14:16:52 +01:00
Gyan Doshi 8161ac2902 lavf/movenc: fix tmcd writing for non-MP4/MOV modes
write_tmcd allows tmcd track to be created with any mode but in
mov_write_header, index for first tmcd track is only set for modes
MP4 or MOV, causing a crash if tmcd creation is attempted with other
modes.
2019-04-03 15:50:22 +05:30
Gyan Doshi b131a07e4b fate: unbreak fate with custom binary names 2019-04-03 10:05:50 +05:30
James Almer f8075b2c91 tests/fate-run: fix regression in encoding options
Set threads back to 1. Fixes fate when run in multi threaded mode.

Regression since d0c43e3242.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19 01:08:16 -03:00
Carl Eugen Hoyos def18ac43b tests/fate/ffmpeg: Check for apng codec for fate-copy-apng.
The file has to be created first, fixes fate without zlib.
2019-03-15 01:41:22 +01:00
James Almer 85649b6523 fate/lavf-image: fix passed arguments for some high bit depth tests
Should fix fate failures on big endian targets.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-14 17:15:28 -03:00
James Almer 0dda0f3bdb Merge commit 'f8abf7d4dfa0504f7f65e4f1fd9d22e01cb371cc'
* commit 'f8abf7d4dfa0504f7f65e4f1fd9d22e01cb371cc':
  checkasm/h264: test 4:2:2 chroma loop filter functions

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 16:31:41 -03:00
James Almer ac4b5d8622 Merge commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b'
* commit 'f8df5e2f31a5ba7b30a0e1caaaf5a03c753b3f9b':
  tests: Add a convenience function for video-only lavf tests

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:59:45 -03:00
James Almer a200bf8094 tests: Convert lavf container tests with samples to non-legacy test scripts 2019-03-14 14:37:44 -03:00
James Almer fda424b300 Merge commit '618d02c1fa9e74d490cace64a7d15762656b521c'
* commit '618d02c1fa9e74d490cace64a7d15762656b521c':
  tests: Convert lavf container tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:36:24 -03:00
James Almer ace96d2e69 Merge commit '896fe15dbb7b78de495c4a7dd75e7faec66778da'
* commit '896fe15dbb7b78de495c4a7dd75e7faec66778da':
  tests: Convert lavf pixfmt conversion tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:31:48 -03:00
James Almer c2631dfd0a Merge commit 'a957e9379d11f2982d615f92c30580a57ea8bb40'
* commit 'a957e9379d11f2982d615f92c30580a57ea8bb40':
  tests: Convert lavf image tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:30:08 -03:00
James Almer 29929fc8e2 Merge commit 'eb8a8115994434b548523cf0bca6a4a74784e79c'
* commit 'eb8a8115994434b548523cf0bca6a4a74784e79c':
  tests: Convert audio-only lavf tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:19:03 -03:00
James Almer d0c43e3242 Merge commit 'a70eac7a9b193e8434b5bed90bd72aa4cb688363'
* commit 'a70eac7a9b193e8434b5bed90bd72aa4cb688363':
  tests: Convert image2pipe tests to non-legacy test scripts

Merged-by: James Almer <jamrial@gmail.com>
2019-03-14 14:15:46 -03:00
Mark Reid 7ff89574c7 fate/mxf: add mxf user comments tests
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-13 12:39:51 +01:00
James Almer 5ab44ff20c Merge commit '5846b496f0a1dd5be4ef714622940674305ec00f'
* commit '5846b496f0a1dd5be4ef714622940674305ec00f':
  tests: Use a predefined function for lavf-rm test

Merged-by: James Almer <jamrial@gmail.com>
2019-03-10 22:28:03 -03:00
James Almer bad70b7af6 Merge commit 'dad5fd59f3d6a8311365314cfcde0ebcd15c2b01'
* commit 'dad5fd59f3d6a8311365314cfcde0ebcd15c2b01':
  tests: Enable CRC test for yuv4mpeg

Merged-by: James Almer <jamrial@gmail.com>
2019-03-10 22:22:50 -03:00