Commit Graph

2587 Commits

Author SHA1 Message Date
Anton Khirnov
fe7f0d366f tests: drop api-codec-param test
It fundamentally depends on deprecated lavf internals.
2020-12-10 09:46:30 +01:00
Mark Reid
8d19b3c4a5 avcodec/exr: preserve half-float NaN bits and add fate test
Handles NaNs more like the official implementation handles them, preserving
the original bits.
2020-12-09 12:31:09 +01:00
Paul B Mahol
f41de0436c avfilter/af_earwax: fix filter behavior
Previous filter output was incorrect. New one actually follows
graph in comments described on side of filter taps.
2020-12-07 21:09:08 +01:00
Marton Balint
76fbb0052d avformat/dv: fix timestamps of audio packets in case of dropped corrupt audio frames
By using the frame counter (and the video time base) for audio pts we lose some
timestamp precision but we ensure that video and audio coming from the same DV
frame are always in sync.

This patch also makes timestamps after seek consistent and it should also fix
the timestamps when the audio clock is unlocked and have a completely
indpendent clock source. (E.g. runs on fixed 48009 Hz which should have been
exact 48000 Hz)

Fixes out of sync timestamps in ticket #8762.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-12-06 18:09:24 +01:00
Mohammad Izadi
89e3f5abb7 fate: add a test for HDR10+ metadata in HEVC
Signed-off-by: James Almer <jamrial@gmail.com>
2020-12-05 19:20:11 -03:00
Thierry Foucu
4d97acfe33 libavformat/mov.c: export vendor id as metadata 2020-12-05 10:16:51 +05:30
Limin Wang
48235c8263 avutil/opt: add AV_OPT_FLAG_DEPRECATED option
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-12-05 09:00:53 +08:00
Martin Storsjö
284560baa7 fate: Convert the musepack8 test to an oneoff test
This fixes tests if built for x86 with x87 FPU.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-11-17 23:47:31 +02:00
Martin Storsjö
3fcfde2cea aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KB
The previous threshold, 4 KB, maybe was reasonable when it was set
(in 2010), but in today's settings and with typical network speeds
and data sizes, it's pretty small. 32 KB probably is a more reasonable
default now, regardless of input.

This changes the test references for two seek tests.

When using the normal seek function, which boils down to the lseek(2)
function, a seek to an out of bounds position doesn't return an error,
but that condition is only reported when doing the subsequent read
(which returns EOF). When doing more seeks by fast forwarding, the
fact that the seeked to destination is out of bounds is noticed and
reported sooner in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
2020-11-12 14:05:43 +02:00
Zane van Iperen
50d3a751aa
avcodec/adpcm_ima_amv: use coded sample count
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-11-09 14:58:37 +10:00
Zane van Iperen
406879f49c
avcodec/adpcm_ima_swf: fix frame size to 4096
SWF File Format Specification, Version 19 says this is 1 raw
sample + 4095 nibbles.

https://www.adobe.com/content/dam/acom/en/devnet/pdf/swf-file-format-spec.pdf

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-11-07 23:43:26 +10:00
Limin Wang
06aab9790d fate/filter-video: add 10bit test for unsharp filter
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-11-07 10:09:59 +08:00
Andreas Rheinhardt
02188639ca fate: Add test for Musepack SV8 decoding
While the FATE suite contains a sample file for Musepack 8, it did not
use it to test the decoder; it is only used in the mpc8-demux test that
tests the demuxer via streamcopy. Therefore this commit adds an actual
encoder test.

The test uses the framecrc output, because Musepack SV8 is an encoder
that returns multiple frames for a single packet, so that timing
information in the test output is valueable. Output seeking has been
used in order to limit the size of the ref file as well as to test this
codepath for the first time.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-10-31 12:44:16 +01:00
Jan Ekström
fbb44bc51a ffmpeg: move field order decision making to encoder initialization
We now have the possibility of getting AVFrames here, and we should
not touch the muxer's codecpar after writing the header.

Results of FATE tests change as the MXF and Matroska muxers actually
write down the field/frame coding type of a stream in their
respective headers. Before this change, these values in codecpar
would only be set after the muxer was initialized. Now, the
information is also available for encoder and muxer initialization.
2020-10-29 16:59:49 +02:00
Jan Ekström
7369595c55 ffmpeg: pass decoded or filtered AVFrame to output stream initialization
Additionally, reap the first rewards by being able to set the
color related encoding values based on the passed AVFrame.

The only tests that seem to have changed their results with this
change seem to be the MXF tests. There, the muxer writes the
limited/full range flag to the output container if the encoder
is not set to "unspecified".
2020-10-29 16:59:49 +02:00
ruiquan.crq
ae9a1a9698 lavf/url: fix relative url parsing when the query string or fragment has a colon
This disallows the usage of ? and # in libavformat specific scheme options
(e.g. subfile,,start,32815239,end,0,,:video.ts) but this change was considered
acceptable.

Signed-off-by: ruiquan.crq <caihaoning83@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-10-28 21:34:09 +01:00
Zane van Iperen
86267fccc6
fate: add adpcm_ima_alp encoding test 2020-10-25 23:44:27 +10:00
Michael Niedermayer
6939174bfc tests/fate/hevc: Add test for 3fbf873792
Tested-on: x86-32/64/ARM/MIPS Linux, Mingw/WINE 32/64
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-25 09:48:29 +01:00
Zane van Iperen
3106db044e
fate: add test for adpcm_swf in wav
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-10-21 11:26:39 +10:00
Tomas Härdin
86b485b5d6 fate-mxf-probe-applehdr10: Ignore endianness 2020-10-12 20:21:36 +02:00
Michael Niedermayer
2ad9c95c26 fate: Add aa-demux test
This should help fuzzer coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-10 13:08:24 +02:00
Mark Reid
a48adcd136 libswcale/input: use more accurate planer rgb16 yuv conversions
These conversion appears to be exhibiting the same rounding error as the rgbf32 formats where.
I seperated the rounding value from the 16 and 128 offsets, I think it makes it a little more clear.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-06 17:56:52 +02:00
Mark Reid
453004fde6 libswcale/input: use more accurate rgbf32 yuv conversions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-02 14:59:52 +02:00
Mark Reid
6bf57c6a2a libswscale/tests: add floatimg_cmp test
changes since v1:
- made into fate test
- fixed c90 warnings
- tests more intermediate formats
- tested on BE mips too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-02 14:59:52 +02:00
Jan Ekström
308882d9f2 avformat/movenc: use more fall-back values for average bit rate fields
If the average bit rate cannot be calculated, such as in the case
of streamed fragmented mp4, utilize various available parameters
in priority order.

Tests are updated where the esds or btrt or ISML manifest boxes'
output changes.
2020-09-22 18:25:44 +03:00
Jan Ekström
3838e8fc21 avformat/movenc: implement writing of the btrt box
This is utilized by various media ingests to figure out the bit
rate of the content you are pushing towards it, so write it for
video, audio and subtitle tracks in case at least one nonzero value
is available. It is only mentioned for timed metadata sample
descriptions in QTFF, so limit it only to ISOBMFF (MODE_MP4) mode.

Updates the FATE tests which have their results changed due to the
20 extra bytes being written per track.
2020-09-22 18:21:31 +03:00
Harry Mallon
fe3a57f4ca avformat/mxfdec: Read Apple private Content Light Level from MXF
* As embedded by Apple Compressor

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
2020-09-17 21:40:25 +02:00
Mark Reid
8ddcbebc3f libavcodec/exr: fix incorrect translation of denorm mantissa 2020-09-15 19:22:18 +02:00
Marton Balint
00117e28c1 avutil/timecode: fix av_timecode_get_smpte_from_framenum with 50/60 fps
SMPTE 12M timecode can only count frames up to 39, because the tens-of-frames
value is stored in 2 bit. In order to resolve this 50/60 fps SMPTE timecode is
using the field bit (which is the same bit as the phase correction bit) to
signal the least significant bit of a 50/60 fps timecode. See SMPTE ST
12-1:2014 section 12.1.

Therefore we slightly change the format of the return value of
av_timecode_get_smpte_from_framenum and AV_FRAME_DATA_S12M_TIMECODE and start
using the previously unused Phase Correction bit as Field bit. (As the SMPTE
standard suggests)

We add 50/60 fps support to av_timecode_get_smpte_from_framenum by calling the
recently added av_timecode_get_smpte function in it which already handles this
properly.

This change affects the decklink indev and the DV and MXF muxers. MXF has no
fate test for 50/60fps content, DV does, therefore the changes.

MediaInfo (a recent version) confirms that half-frame timecode must be inserted
to DV. MXFInspect confirms valid timecode insertion to the System Item of MXF
files. For MXF, also see EBU R122.

Note that for DV the field flag is not used because in the HDV specs (SMPTE
370M) it is still defined as biphase mark polarity correction flag. So it
should not matter that the DV muxer overrides the field bit.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-09-13 17:51:57 +02:00
Fei Wang
47be5a5056 avcodec: add AV1 hardware accelerated decoder
This AV1 decoder is currently only used for hardware accelerated decoding.
It can be extended into a native decoder in the future, so set its name to
"av1" and temporarily give it the lowest priority in the codec list.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-09-12 13:08:34 -03:00
Mark Reid
61d767f3a3 fate: use correct uint32 layer 2020-09-12 14:52:31 +02:00
Mark Reid
1c094563fe avcodec/exr: add support data windows larger or outside display window 2020-09-12 01:34:51 +02:00
Nicolas George
ddba05afe4 lavfi/vsrc_testsrc: switch to activate.
Allow to set the EOF timestamp.

Also: doc/filters/testsrc*: specify the rounding of the duration option.

The changes in the ref files are right.

For filter-fps-down, the graph is testsrc2=r=7:d=3.5,fps=3.
3.5=24.5/7, so the EOF of testsrc2 will have PTS 25/7.
25/7=(10+5/7)/3, so the EOF PTS for fps should be 11/7,
and the output should contain a frame at PTS 10.

For filter-fps-up, the graph is testsrc2=r=3:d=2,fps=7,
for filter-fps-up-round-down and filter-fps-up-round-up
it is the same with explicit rounding options.
But there is no rounding: testsrc2 produces exactly 6 frames
and 2 seconds, fps converts it into exactly 14 frames.

The tests should probably be adjusted to restore them to
a useful coverage.
2020-09-08 14:39:43 +02:00
Paul B Mahol
03415f25d2 fate: add wav chapters test 2020-09-07 19:04:09 +02:00
Gautam Ramakrishnan
341064d68a libavcodec/jpeg2000: fix tag tree reset
The implementation of the tag tree did not
set the correct reset value for the encoder.
This lead to inefficent tag tree being encoded.
This patch fixes the implementation of the
ff_tag_tree_zero() function.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30 16:18:37 +02:00
Gautam Ramakrishnan
f0e33119e4 libavcodec/j2kenc: Support for multiple layers
This patch allows setting a compression ratio and to
set multiple layers. The user has to input a compression
ratio for each layer.
The per layer compression ration can be set as follows:
-layer_rates "r1,r2,...rn"
for to create 'n' layers.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-30 16:18:37 +02:00
Harry Mallon
719eb8a2e4 avformat/mxfdec: Read video range from CDCIEssenceDescriptor
* Capture black_ref, white_ref and color_range and recognise
  full and narrow range.

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
2020-08-29 11:02:35 +02:00
Clément Bœsch
7d8eafab91 fate: add fate-sub-dvb test
The dvbsubtest_filter.ts sample is a filtered version of the Videolan
sample database (samples/sub/dvbsub/dvbsubtest.ts) using Project X. It
originates from ticket #8844.
2020-08-22 19:02:01 +02:00
Michael Bradshaw
c5b20cfe19 avformat/movenc: write the colr atom by default
The write_colr flag has been marked as experimental for over 5 years.
It should be safe to enable its behavior by default as follows:

  - Write the colr atom by default for mp4/mov if any of the following:
     - The primaries/trc/matrix are all specified, OR
     - There is an ICC profile, OR
     - The user specified +write_colr
  - Keep the write_colr flag for situations where the user wants to
    write the colr atom even if the color info is unspecified (e.g.,
    http://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/259334.html)

This fixes https://trac.ffmpeg.org/ticket/7961

Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
2020-08-21 10:01:58 -07:00
Limin Wang
ab384d289d FATE: fix copy & paste for minterpolate test
Reported-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-08-18 08:32:02 +08:00
Alexander Strasser
ecd71916d1 lavc/aac_ac3_parser: fix potential overflow when averaging bitrate
The new code is analog to how it's done in our mpegaudio parser.

Acked-by: Jun Zhao <barryjzhao@tencent.com>
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2020-08-12 17:35:38 +02:00
Nicolas George
1201687da2 lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().
Also add and update some tests.

Change the semantic a little, because for filesytem paths
symlinks complicate things.
See the comments in the code for detail.

Fix trac tickets #8813 and 8814.
2020-08-12 16:45:21 +02:00
Nicolas George
d853293679 lavf/url: add ff_url_decompose(). 2020-08-12 16:33:09 +02:00
Zane van Iperen
6afc2797d2
fate: add adpcm_argo test
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-07 23:14:28 +10:00
Harry Mallon
7031a7beae avformat/mxfdec: Read color metadata from MXF
Reads color_primaries, color_trc and color_space from mxf
headers. ULs are from https://registry.smpte-ra.org/ site.

Signed-off-by: Harry Mallon <harry.mallon@codex.online>
2020-08-06 12:52:34 +02:00
Paul B Mahol
131d2a3e1c avcodec/cfhd: improve decompanding quality with reference implementation 2020-08-02 09:31:54 +02:00
James Almer
134a48a880 tests/imgutils: test the output of av_image_fill_* functions
Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-30 19:33:09 -03:00
Zane van Iperen
932edaaa60 fate: add adpcm_ima_apm encoding test
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-07-21 11:36:14 +10:00
Steven Liu
9ee010e734 tests/fate/hlsenc: add testcase of ac3 surround sound input in hlsenc
add probeaudiostream for get audio stream's codec_name,codec_time_base,
sample_fmt,channels and channel_layout.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-07-07 14:32:07 +08:00
Valery Kot
855d51bf48 avfilter/vf_edgedetect: properly implement double_threshold()
Important part of this algorithm is the double threshold step: pixels
above "high" threshold being kept, pixels below "low" threshold dropped,
pixels in between (weak edges) are kept if they are neighboring "high"
pixels.

The weak edge check uses a neighboring context and should not be applied
on the plane's border. The condition was incorrect and has been fixed in
the commit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
2020-07-06 23:20:53 -04:00