1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

5164 Commits

Author SHA1 Message Date
Wenlong Ding
16e5014649 tests/dnn/dnn-layer-mathunary-test: add unit test for exp
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
2021-03-24 13:57:19 +08:00
Andreas Rheinhardt
47d0b86cf3 avformat/s337m: Use and test Dolby-E-parser
This makes av_read_frame() return packets with proper timestamps.
As a result, seeking now works in combination with streamcopy.
A FATE-test for this has been added.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-23 01:05:17 +01:00
Derek Buitenhuis
e668c55649 FATE: Add test for probing MOV/MP4 files with extended box sizes
The test sample has to have no file extension, otherwise probing
happens to work, based off file extension alone, and we want to
test the actual probing function.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-03-21 14:14:36 +00:00
Zane van Iperen
cbb8943a54
fate: add adpcm_ima_cunning stereo test case
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-03-19 23:38:33 +10:00
Zane van Iperen
684745230f
avcodec/adpcm_ima_cunning: support stereo
Changes the sample format to S16P, but was only ever mono so it
affects nothing.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2021-03-19 23:38:25 +10:00
James Almer
7643a35474 tests/api/api-flac-test: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:37 -03:00
Anton Khirnov
2644a5d418 lavc: remove tests/options
It tests deprecated avcodec_copy_context().
2021-03-08 09:29:50 +01:00
Anton Khirnov
8369a2873c tests/api-flac-test: reindent 2021-03-08 09:29:50 +01:00
Anton Khirnov
f942e14884 tests/api-flac-test: convert to new encoding/decoding API 2021-03-08 09:29:50 +01:00
Anton Khirnov
ba30fd6c81 tests/api-flac-test: ensure the frame is writable before writing to it
The encoder may keep a reference to frames that were sent to it, so the
caller cannot modify them without checking first.
2021-03-08 09:29:50 +01:00
Jan Ekström
64af14555b avformat: add TTML muxer
Enables writing TTML documents or encoded TTML paragraphs as such
documents.

Additionally, a test for the combined TTML encoder and muxer has
been added to validate that the components still work.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Jan Ekström
c8c6c9f5d9 ffprobe: switch to av_bprint_escape for XML escaping
Additionally update the result of the ffprobe XML writing test.

Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-03-05 19:45:00 +02:00
Andreas Rheinhardt
94bf3f90e9 tests/fate: Don't keep unnecessary temp files
Some FATE tests use files created by other FATE tests as input files;
this mostly affects the seek tests which use files from vsynth_lena as
well as acodec-pcm as input files. In order to make this possible the
temporary files of all the vsynth* and all acodec-pcm tests are kept.
Yet only a fraction of these files are actually used. This commit
changes this to only keep the files that are actually needed for other
tests. This reduces the size of the tests/data/fate folder after a full
FATE run from 2024727441B to 138739312B.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-05 09:24:34 +01:00
Marton Balint
088f35f036 avformat/mxfdec: add support for getting product version number metadata
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-04 20:23:51 +01:00
Marton Balint
7cb40b270c avformat/mxfdec: change toolkit_version metadata field to toolkit_version_num
It only got added recently, and the new name makes it consistent with
product_version_num in the next patch.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-04 20:23:49 +01:00
Andreas Rheinhardt
efa012cbdb fate/matroska: Test remuxing tracks for hearing/visually impaired
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-02 07:10:46 +01:00
Anton Khirnov
a5b737e625 tests/api-band-test: simplify code 2021-02-25 11:46:28 +01:00
Anton Khirnov
9e4225cf7f Handle AVID MJPEG streams directly in the MJPEG decoder.
AVID streams - currently handled by the AVRN decoder - can be (depending
on extradata contents) either MJPEG or raw video. To decode the MJPEG
variant, the AVRN decoder currently instantiates a MJPEG decoder
internally and forwards decoded frames to the caller (possibly after
cropping them).

This is suboptimal, because the AVRN decoder does not forward all the
features of the internal MJPEG decoder, such as direct rendering.
Handling such forwarding in a full and generic manner would be quite
hard, so it is simpler to just handle those streams in the MJPEG decoder
directly.

The AVRN decoder, which now handles only the raw streams, can now be
marked as supporting direct rendering.

This also removes the last remaining internal use of the obsolete
decoding API.
2021-02-25 11:46:28 +01:00
Anton Khirnov
eed2125f3f tests/fate/apng: add a test for APNG_DISPOSE_OP_PREVIOUS 2021-02-24 17:16:46 +01:00
Anton Khirnov
6853bdbdd2 tests: add a test for LSCR 2021-02-24 17:16:46 +01:00
Anton Khirnov
313c91beb8 ffprobe: stop printing deprecated fields
The FF_API macros are private and must not be used by external callers.
As the fields in question are to be removed without replacement, just
drop them.
The fields are:
AVPacket.convergence_duration
AVCodecContext.time_base
AVCodecContext.timecode_frame_start
AV_PIX_FMT_FLAG_PSEUDOPAL pixel descriptor flag
2021-02-22 11:14:29 +01:00
Andreas Rheinhardt
2edfb26fd1 fate/matroska: Add fate-matroska target
Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:26 +01:00
Andreas Rheinhardt
1406b3cc23 fate/matroska: Add test for remuxing VP8 with alpha
This provides coverage for writing BlockGroups with BlockAdditional
and ReferenceBlock elements. It also tests setting the hearing impaired
disposition (it fits given that this video has no audio so one needs to
be able to read lips to understand anything).

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 04:14:26 +01:00
Andreas Rheinhardt
37b069e361 fate/matroska: Add test for mastering display metadata
The FATE suite already contains a file containing mastering display
and content light level metadata: Meridian-Apple_ProResProxy-HDR10.mxf
This file is used to test both the Matroska muxer and demuxer.

Reviewed-by: Ridley Combs <rcombs@rcombs.me>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-22 03:45:38 +01:00
James Almer
d52ceed9fd tests/checkasm/sw_scale: use memset() to fill dither
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-19 16:19:11 -03:00
Alan Kelly
ee18edb13a checkasm/sw_scale: properly initialize src_pixer and filter_coeff buffers
Fixes valgrind uninitialised value warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-19 11:20:32 -03:00
James Almer
1371647fc3 checkasm/sw_scale: use av_free() instead of free()
Fixes crashes on Win64

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 20:57:33 -03:00
Alan Kelly
554c2bc708 swscale: move yuv2yuvX_sse3 to yasm, unrolls main loop
And other small optimizations for ~20% speedup.
2021-02-17 21:21:03 +01:00
James Almer
bea7c51307 checkasm/vf_gblur: add a test for postscale_slice
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 13:39:31 -03:00
James Almer
2df3c2ed9b checkasm/vf_gblur: split off the horiz_slice test into its own function
Will come in handy for the following commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 13:39:11 -03:00
Andreas Rheinhardt
8de5d196d1 tests/fate-run.sh: Don't overlook errors from md5 tests
The md5 test up until now ignored errors from ffmpeg (the cli) and just
md5'ed whatever ffmpeg has output; while testing scenarios in which
ffmpeg fails has its merits, errors should not be overlooked by default;
doing so also reduces the effectiveness of sanitizers as errors from
them are ignored. This has happened with a memleak in the AV1 decoder.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-16 22:50:36 +01:00
Andreas Rheinhardt
a47f5e55e2 fate/mxf: Fix d10-user-comments test
The mxf_d10 muxer is very picky regarding the input it accepts:
The only video accepted is MPEG-2 with absolutely constant bitrate,
i.e. all packets need to have exactly the same size; and only a few
bitrates are accepted.

The sample file used did not abide by this: Writing the first packet
(a video packet) errors out and afterwards an audio packet from the
muxing queue has been written. That's all besides metadata (which this
test is about). The FFmpeg cli returned an error, but said error has
been ignored by the md5 test.

This commit changes the test to actually send a compliant stream to the
muxer, so that it does not error out; furthermore, the test is changed
to explicitly check the metadata instead of it only being implicitly
included in the md5 checksum. The compliant stream is created by our
encoder at runtime.

Finally, the test now also covers writing user-specified
product/company/version identification.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-16 22:50:08 +01:00
Andreas Rheinhardt
c1f81c13a1 fate/matroska: Add test for remuxing file with spherical metadata
Also, test modifying colorspace properties and the default_mode
passthrough which is used here to create a file that has no default
track at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-15 21:58:00 +01:00
Andreas Rheinhardt
b0d8310f76 fate/matroska: Add test for zero-length Block
It furthermore tests the demuxer's handling of chained SeekHeads,
level 1-elements after the Clusters and the muxer's capability of
writing huge TrackNumbers as well as expanding the Cues' length field
by one byte if necessary to fill the reserved space. It also tests
propagation of metadata.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-15 21:48:22 +01:00
Paul B Mahol
e0fd35d867 avformat/fitsenc: write DATAMIN/DATAMAX to encoded output
There is no point in doing normalization when such files are decoded.

Update fate test with new results.
2021-02-10 00:03:38 +01:00
Paul B Mahol
3b65c848a6 avfilter/vf_thumbnail: add support for YUV and GBRP formats 2021-02-08 12:45:49 +01:00
Anton Khirnov
fffc35b870 mjpegdec: stop setting the QP table
MJPEG does not have a single quantiser scale, so this does not fit into
the intended API use.

This removes the last use of the long-deprecated QP table API.
2021-02-08 11:06:10 +01:00
Limin Wang
9605307e78 avformat/mxf: add platform local tag
Please check the string of platform with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
application_platform: Lavf (linux)

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:06 +08:00
Limin Wang
3f8db7eea0 avformat/mxfdec: set toolkit version metadata
Please check the string of toolkit version with below command:
./ffmpeg -i ../fate-suite/mxf/Sony-00001.mxf -c:v copy -c:a copy out.mxf
./ffmpeg -i out.mxf
....
toolkit_version : 58.65.101.0.0

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-02-05 09:27:05 +08:00
Paul B Mahol
cba716f55e avformat/cdxl: improve frame rate guessing for standard cdxl
Use audio size and sample rate to get real frame rate.
Also make seeking more robust.
2021-02-05 00:43:11 +01:00
Paul B Mahol
a8b3a51790 avformat/cdxl: rework probe and fix sample rate and frame rate 2021-02-04 00:57:49 +01:00
Paul B Mahol
e818951505 avformat/cdxl: add support for custom 24bit pal8 formats
Also stop discarding half of audio samples and use planar pcm s8.
2021-02-03 19:11:35 +01:00
Jose Da Silva
41b8fd3a16 avcodec/xbmenc: Do not add last comma into output
There is a minor bug in xbm encode which adds a trailing comma at the end
of data. This isn't a big problem, but it would be nicer to be more
technically true to an array of data (by not including the last comma).

This bug fixes the output from something like this (having 4 values):
static unsigned char image_bits[] = { 0x00, 0x11, 0x22, }
to C code that looks like this instead (having 3 values):
static unsigned char image_bits[] = { 0x00, 0x11, 0x22 }
which is the intended results.
Subject: [PATCH 1/3] avcodec/xbmenc: Do not add last comma into output array

xbm outputs c arrays of data.
Including a comma at the end means there is another value to be added.
This bug fix changes something like this:
static unsigned char image_bits[] = { 0x00, 0x11, 0x22, }
to C code like this:
static unsigned char image_bits[] = { 0x00, 0x11, 0x22 }

Signed-off-by: Joe Da Silva <digital@joescat.com>
2021-01-28 15:50:09 +01:00
Guo, Yejun
a163aa6cf7 tests/dnn: enable unit test dense 2021-01-28 09:45:13 +08:00
Marton Balint
b410b14fba avformat/mxfenc: add Coding Equations and Color Primaries to local tags
Fixes ticket #9079.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-01-27 23:43:19 +01:00
James Almer
12c8aeb2b8 fate/hlsenc: rework the ffprobe dependency of hls-fmp4_ac3
Add it to the existing FATE_SAMPLES_FFMPEG_FFPROBE list of ffprobe dependant
tests instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-01-25 12:19:51 -03:00
Josh Dekker
9c513edb79 checkasm: add hevc_pel tests
Co-authored-by: Niklas Haas <git@haasn.xyz>
Signed-off-by: Josh Dekker <josh@itanimul.li>
2021-01-25 09:24:11 +01:00
Carl Eugen Hoyos
3ee45eca98 tests/fate/fits: Add a todo for a 64bit test.
The test should currently fail on big endian but passes because of the
unsuitable input file.
2021-01-24 17:13:19 +01:00
Carl Eugen Hoyos
9c9174b9c1 tests/fate/hlsenc: ffprobe is needed for hls-fmp4_ac3. 2021-01-24 17:12:05 +01:00
Guo, Yejun
07a18ff477 tests/dnn: fix build issue after function name changed 2021-01-22 19:28:29 +08:00