Commit Graph

2805 Commits

Author SHA1 Message Date
rcombs
6c3a82f043 lavfi/drawutils: improve colorspace support
- Introduce ff_draw_init2, which takes explicit colorspace and range
  args
- Use lavu/csp and lavfi/colorspace for conversion, rather than the
  lavu/colorspace.h macros
- Use the passed-in colorspace when performing RGB->YUV conversions

The upshot of this is:
- Support for YUV spaces other than BT601
- Better rounding for all conversions
- Particular rounding improvements in >8-bit formats, which previously
  used simple left-shifts
- Support for limited-range RGB
- Support for full-range YUV in non-J pixfmts

Due to the rounding improvements, this results in a large number of
minor changes to FATE tests.

Signed-off-by: rcombs <rcombs@rcombs.me>
2022-06-19 19:18:34 -05:00
Michael Niedermayer
ade36d61de avcodec/texturedspenc: Fix indexing in color distribution determination
Fixes CID1396405

MSE and PSNR is slightly improved, and some noticable corruptions disappear as
well.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-06-09 00:02:02 +02:00
Paul B Mahol
e93006c67b fate: add test for QOI format 2022-06-05 13:06:54 +02:00
Andreas Rheinhardt
bdba8ecce2 fate/wavpack: Test APE cuesheet tags
The cue_sheet.wv sample contains a cue sheet as APE tags,
yet this is not really covered by fate-wavpack-cuesheet
because the metadata does not affect the output of said test.
So add a proper test for this.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-31 12:45:41 +02:00
Michael Niedermayer
366ef56f7f avcodec/ffv1enc: Eliminate float/double from find_best_state()
log2() remains, this can either be replaced by a integer implementation or the table
hardcoded if needed

Tested-by: Anton Khirnov <anton@khirnov.net>
Tested-by: Martin Storsjö <martin@martin.st>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-05-30 12:13:29 +02:00
Anton Khirnov
60f948dd55 tests/fate/vcodec: add tests for ffv1 2pass mode 2022-05-24 13:35:16 +02:00
Thilo Borgmann
9cb9da62a3 avfilter: Add blockdetect filter 2022-05-24 11:21:36 +02:00
Martin Storsjö
4cdc14aa95 libavutil: Deprecate av_fopen_utf8, provide an avpriv version
Since every DLL can use an individual CRT on Windows, having
an exported function that opens a FILE* won't work if that
FILE* is going to be used from a different DLL (or from user
application code).

Internally within the libraries, the issue can be worked around
by duplicating the function in all libraries (this already happened
implicitly because the function resided in file_open.c) and renaming
the function to ff_fopen_utf8 (so that it doesn't end up exported from
the DLLs) and duplicating it in all libraries that use it.

This makes the avpriv_fopen_utf8 / ff_fopen_utf8 function work in
the exact same way as the existing avpriv_open / ff_open, with the
same setup as introduced in e743e7ae6e.

That mechanism doesn't work for external users, thus deprecate the
existing function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-05-23 13:52:26 +03:00
Andreas Rheinhardt
8bf618884b tests/fate: Remove intermediate file of flv-add_keyframe_index test
Do this by making this test a transcode test.
Also fix the test requirements and don't add this test to FATE_AFILTER;
instead use a new variable and a new target for flvenc-tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-20 10:16:04 +02:00
Tomas Härdin
1cd8596ef4 libavcodec/cinepakenc: Mark no-skip frames as keyframes
Reset curframe whenever we generate a keyframe.
Use -g instead of -keyint_min.
2022-05-12 11:19:12 +02:00
Andreas Rheinhardt
cf9e470d05 fate/matroska: Add test for remuxing DVB subtitles to Matroska
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-12 08:33:11 +02:00
Andreas Rheinhardt
f98b6cf543 fate/matroska: Add tests for muxing PGS into Matroska
They test the new pgs_frame_merge BSF.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 10:03:32 +02:00
Andreas Rheinhardt
80c7258b3a fate/filter-video: Remove intermediate file of meta-4560-rotate0 test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-06 05:39:25 +02:00
Andreas Rheinhardt
bf8411c495 fate/lavf-audio: Disable CRC for lavf-peak_only.wav test
The output of this test is just a file containing the positions
of peaks; it is not a wave file and trying to demux it just
returns AVERROR_INVALIDDATA; said error has just been ignored
as the return value from do_avconv_crc is the return value from echo.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-06 05:39:10 +02:00
Andreas Rheinhardt
155f68f7d1 tests/ref: Remove unused reference files
Accidentally resurrected in fc49f22c3b
and 7711f19eda,
forgotten in 6ebc71847e and
1a6a088f7c or never needed
(filter-aemphasis).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-03 04:18:06 +02:00
Zhao Zhili
301141b576 avformat/movenc: sidx earliest_presentation_time is applied after editlist
Fix #8334

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2022-04-29 17:22:52 +08:00
Andreas Rheinhardt
886c65784d fate/acodec: Remove acodec-adpcm-adx-trellis test
adx ignores the trellis option, making this test identical
to acodec-adpcm-adx.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-28 02:40:49 +02:00
Andreas Rheinhardt
9d767b8a98 fate/fits: Use transcode for transcode-like test
Each of the intermediately generated lena-*.fits files is only used
for exactly one test; so it could be deleted right after the test.
Switching to a transcode test (which is also more natural) achieves
this. It also adds checksums of the intermediate files to the ref-file.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-04-28 02:39:37 +02:00
Thilo Borgmann
b23208826b lavfi: Add blurdetect filter 2022-04-25 20:52:15 +02:00
Niklas Haas
e254af3154 avcodec/mjpegenc: support writing ICC profiles
This is mostly straightforward. The major complication is that, as a
result of the 16-bit chunk size limitation, ICC profiles may need to be
split up into multiple chunks.

We also need to make sure to allocate enough extra space in the packet
to fit the ICC profile, so modify both mpegvideo_enc.c and ljpegenc.c to
take into account this extra overhead, failing cleanly if necessary.

Also add a FATE transcode test to ensure that the ICC profile gets
written (and read) correctly. Note that this ICC profile is smaller than
64 kB, so this doesn't test the APP2 chunk re-arranging code at all.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-11 17:29:57 +02:00
Niklas Haas
4a580975d4 avcodec/pngenc: support writing iCCP chunks
We re-use the PNGEncContext.zstream for deflate-related operations.
Other than that, the code is pretty straightforward. Special care needs
to be taken to avoid writing more than 79 characters of the profile
description (the maximum supported).

To write the (dynamically sized) deflate-encoded data, we allocate extra
space in the packet and use that directly as a scratch buffer. Modify
png_write_chunk slightly to allow pre-writing the chunk contents like
this.

Also add a FATE transcode test to ensure that the ICC profile gets
encoded correctly.

Signed-off-by: Niklas Haas <git@haasn.dev>
2022-04-11 17:29:57 +02:00
Marton Balint
7ac559b819 fate: add fate tests for VBN encoder and decoder
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-04-10 20:12:23 +02:00
Marton Balint
80e997b081 fate/filter-refcmp-*: make refcmp_metadata fail on empty or truncated input
On empty input the awk script was always successful which caused the
filter-refcmp tests to always succeed.

Also fix the command lines for refcmp_metadata compare function because it
needs auto conversion filters, and update reference of test
filter-refcmp-psnr-rgb because it was missed in
a7fc78c1a6 but was never noticed due to the
original issue...

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-04-10 20:12:23 +02:00
James Almer
aa0829d834 fate: update reference files after the recent dash manifest muxer changes
Missed in 487b49d8f2.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-04-08 16:08:53 -03:00
James Almer
0e03807f69 fate: add a test for writing channel descriptions in mov
Signed-off-by: James Almer <jamrial@gmail.com>
2022-04-05 09:19:59 -03:00
Boris Baracaldo
80831e742b lavfilter: Add SITI filter
Calculate Spatial Info (SI) and Temporal Info (TI) scores for a video, as defined
in ITU-T P.910: Subjective video quality assessment methods for multimedia
applications.
2022-04-01 20:27:43 +02:00
James Almer
7602b4e4c2 avutil/tests/channel_layout: also test ambisonic layouts in av_channel_layout_subset()
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 17:10:39 -03:00
Paul B Mahol
89083142fa fate: add crystalizer test 2022-03-25 18:18:44 +01:00
James Almer
95ac380252 avutil/tests/channel_layout: test the output of av_channel_layout_subset()
Should increase test coverage a bit

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 12:09:19 -03:00
James Almer
167c5a6afc avutil/tests/channel_layout: test the output of av_channel_layout_standard()
Should increase test coverage.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 11:46:51 -03:00
James Almer
f9ed91abc9 avutil/tests/channel_layout: test generating a custom layout using ambisonic channels and a non diegetic channel with a custom name
Should increase test coverage a bit

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-25 11:46:48 -03:00
Paul B Mahol
7dc570ea13 fate: add tpad filter tests 2022-03-18 10:25:13 +01:00
James Almer
c5628ae347 fate: add a setts bsf test
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-17 13:04:44 -03:00
Marton Balint
4afe4a542e avformat/mxfenc: allow more bits for variable part in uuid generation
Also make sure we do not change the product UID.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-16 21:37:53 +01:00
Paul B Mahol
2bcfe78ddf fate: add epx tests 2022-03-16 21:03:37 +01:00
Paul B Mahol
b63c9c7f97 fate: add chromashift tests 2022-03-16 21:03:36 +01:00
Vittorio Giovara
886847afa0 channel_layout: add support for Ambisonic
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:47 -03:00
James Almer
1f96db959c avfilter: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:46 -03:00
Anton Khirnov
9543161800 framehash: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:32 -03:00
Anton Khirnov
f423497b45 lavu: support AVChannelLayout AVOptions
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:29 -03:00
James Almer
f51e169d2b fate: add a channel_layout API test
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15 09:42:29 -03:00
Paul B Mahol
4eb76e7461 fate: add decimate filter test 2022-03-14 17:43:12 +01:00
Andreas Rheinhardt
a909666d7c fate/mov: Add test for muxing chapters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-11 17:58:40 +01:00
Limin Wang
0a005b1207 fate: add a test for HDR Vivid metadata in HEVC
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-03-10 07:05:57 +08:00
Paul B Mahol
a0fc6c4a8e avcodec/pngdec: support alpha blending for palette apng
Update clock test, as PAL8 apngs are now decoded as RGBA.
2022-03-08 10:26:46 +01:00
Paul B Mahol
c444d7fafa tests: update hash as output have changed again for fate-lavf-mxf_opatom 2022-03-06 12:31:43 +01:00
Paul B Mahol
044c09c0a0 avcodec/dnxhdenc: retry increasing qscale to not overflow max_bits
Increase mb_bits type from uint16_t to uint32_t to fix possible overflows
in bit size calculations.

Update fate test that needs change.
2022-03-05 22:11:38 +01:00
Martin Storsjö
c523724c69 swscale: Take the destination range into account for yuv->rgb->yuv conversions
The range parameters need to be set up before calling
sws_init_context (which selects which fastpaths can be used;
this gets called by sws_getContext); solely passing them via
sws_setColorspaceDetails isn't enough.

This fixes producing full range YUV range output when doing
YUV->YUV conversions between different YUV color spaces.

Signed-off-by: Martin Storsjö <martin@martin.st>
2022-02-25 11:01:17 +02:00
Pierre-Anthony Lemieux
b0193e26ca
avformat/imf: fix packet pts, dts and muxing
The IMF demuxer does not set the DTS and PTS of packets accurately in all
scenarios. Moreover, audio packets are not trimmed when they exceed the
duration of the underlying resource.

imf-cpl-with-repeat FATE ref file is regenerated.

Addresses https://trac.ffmpeg.org/ticket/9611
2022-02-20 18:32:09 +10:00
Pierre-Anthony Lemieux
a2df665246 avformat/imf: add IMF CPL with repeated resources to FATE
Signed-off-by: Pierre-Anthony Lemieux <pal@palemieux.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-02-03 04:00:09 +01:00