Commit Graph

4668 Commits

Author SHA1 Message Date
Jacob Trimble
69bd73b3ff libavutil/encryption_info: Add unit tests.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-27 13:43:39 +02:00
Steven Liu
387464bea5 from RTCTIME to N*23, step is 23
fix ticket: 7225

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-06-25 14:06:45 +08:00
Gyan Doshi
830695be36 avformat/movenc: read track title from correct key
da9cc22d5b allowed the MOV muxer to relay a custom stream handler name,
whether populated from the input stream or user-set. However, the entry
key didn't match the key set by the MOV demuxer, so it wasn't
effective. Fixed.

Due to the change, four FATE refs have to be updated. Verified that the
target payload of the tests hasn't changed in terms of CRC.
2018-06-19 11:05:57 +05:30
Gyan Doshi
70742f0264 fate: correct filename references of qt-faststart binary
qt-faststart build doesn't have PROGSSUF added.
2018-06-16 09:20:57 +05:30
erankor
c5e6c0b5f6 qt-faststart: add fate test for stco overflow
verify that the stco atom is upgraded to co64 when the addition of moov
size to the offsets results in an overflow

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-13 21:55:19 +02:00
foo86
b74877206e fate: add Dolby E test
Signed-off-by: James Almer <jamrial@gmail.com>
2018-06-05 23:07:03 -03:00
Sasi Inguva
fe6c4f0c47 lavf/mov.c: Set st->start_time for video streams explicitly.
If start_time is not set, ffmpeg takes the duration from the global
movie instead of the per stream duration.
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-06-06 01:53:30 +02:00
Andrey Semashev
d7eb8d8475 lavfi/tests: Fix 16-bit vf_blend test to avoid memory not aligned to 2 bytes
Generic C implementation of vf_blend performs reads and writes of 16-bit
elements, which requires the buffers to be aligned to at least 2-byte
boundary.

Also, the change fixes source buffer overrun caused by src_offset being
added to to test handling of misaligned buffers.

Fixes: #7226

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 02:42:10 +02:00
Michael Niedermayer
a9dacdeea6 avcodec/qtrle: Do not output duplicated frames on insufficient input
This improves performance and makes qtrle behave more similar to other decoders.
Libavcodec does generally not output known duplicated frames, instead the calling Application
can insert them as it needs.

Fixes: Timeout
Fixes: 6383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-6199846902956032

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-30 02:42:10 +02:00
Mark Thompson
ba7d1377e8 hwcontext: Add test for device creation and derivation
This uses any devices it can find on the host system - on a system with no
hardware device support or in builds with no support included it will do
nothing and pass.
2018-05-21 20:54:52 +01:00
Aman Gupta
16b4f97b72 avformat/mpegts: add merge_pmt_versions option
This new optional flag makes it easier to deal with mpegts
samples where the PMT is updated and elementary streams move
to different PIDs in the middle of playback.

Previously, new AVStreams were created per PID, and it was up
to the user to figure out which streams had migrated to a new PID
(by iterating over the list of AVProgram and making guesses), and
switch seamlessly to the new AVStream during playback.

Transcoding or remuxing these streams with ffmpeg on the CLI was
also quite painful, and the user would need to extract each set
of PIDs into a separate file and then stitch them back together.

With this new option, the mpegts demuxer will automatically detect
PMT changes and feed data from the new PID to the original AVStream
that was created for the orignal PID. For mpegts samples with
stream_identifier_descriptor available, the unique ID is used to
merge PIDs together. If the stream id is not available, the demuxer
attempts to map PIDs based on their position within the PMT.

With this change, I am able to playback and transcode/remux these
two samples which previously caused issues:

    https://tmm1.s3.amazonaws.com/pmt-version-change.ts
    https://kuroko.fushizen.eu/videos/pid_switch_sample.ts

I also have another longer sample in which the PMT changes
repeatedly and ES streams move to different pids three times
during playback:

    https://tmm1.s3.amazonaws.com/multiple-pmt-change.ts

Demuxing this sample with the new option shows several new log
messages as the PMT changes are handled:

    [mpegts] detected PMT change (program=1, version=3/6, pcr_pid=0xf98/0xfb7)
    [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xfb7
    [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xfb8
    [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xfb9
    [mpegts] detected PMT change (program=1, version=6/3, pcr_pid=0xfb7/0xf98)
    [mpegts] detected PMT change (program=1, version=3/4, pcr_pid=0xf98/0xf9b)
    [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xf9b
    [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xf9c
    [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xf9d
    [mpegts] detected PMT change (program=1, version=4/5, pcr_pid=0xf9b/0xfa9)
    [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xfa9
    [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xfaa
    [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xfab
    [mpegts] detected PMT change (program=1, version=5/6, pcr_pid=0xfa9/0xfb7)

Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-05-18 19:00:29 -07:00
Clément Bœsch
2940af9389 tests/checkasm/nlmeans: fix invalid read/write on ii buffer 2018-05-18 19:12:11 +02:00
Tobias Rapp
eb28b5ec8a avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sources
Generates color bar test patterns based on EBU PAL recommendations.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-18 15:39:54 +02:00
Marton Balint
50d6b7bd83 avcodec/xwddec: fix palette alpha
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-05-16 22:34:27 +02:00
Michael Niedermayer
d628caf54f avformat/mxfenc: Add Sample width/height/x offset/y offset, Display x offset and F2 offset
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-12 01:08:01 +02:00
Tobias Rapp
66ba303c53 fate: add more tests for hue video filter
Adds tests for the hue angle and brightness filter parameters.
Renames the existing saturation parameter test for consistency.

Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2018-05-11 09:16:08 +02:00
Mark Thompson
f995aa82d8 fate/cbs: Add an SEI test
The artificial sample file sei-1.h264 contains five frames (IDR P B I B)
and the following SEI message types:
* Buffering period
* Picture timing
* Pan-scan rectangle (display as 4:3)
* User data registered, containing A/53 closed captions (captions match
  frame content, including reordering)
* Recovery point (at the I frame)
* Display orientation (identity transformation)
* Mastering display (with arbitrary contents)
* Undefined SEI type 1234 (containing ascending bytes)
2018-05-10 23:54:02 +01:00
Jun Zhao
b30575bc98 checkasm/sw_rgb: fix the function declaration warning
fix the warning: "function declaration isn’t a prototype", in C
int foo() and int foo(void) are different functions. int foo()
accepts an arbitrary number of arguments, while int foo(void) accepts 0
arguments.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-05-10 19:28:51 +08:00
Michael Niedermayer
293a6e8332 avformat/mxfenc: Write transfer characteristic
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
c35ca7e01c avformat/mxfenc: Add Stored F2 Offset / Image Start/End Offset for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
530ac1e50b avformat/mxfenc: Write Audio Ref Level for D10
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
1246754c80 avformat/mxfenc: Add Padding Bits
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
6d0339096e avformat/mxfenc: add white/black ref /color range
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
2bee43b67d avformat/mxfenc: Add vertical subsampling support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
1b6c89ca8d avformat/mxfenc: Add object model version
Other tools (XFConvert at least) write this as well.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
86c9250923 avformat/mxfenc: Add Product Version, Toolkit version and Platform
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
3ba1bbb4f9 avformat/mxfenc: Bump minor versions for S377-1-2009
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Michael Niedermayer
5c70513418 avformat/mxfenc: Correct KAG alignment of preface
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-05-08 23:02:58 +02:00
Martin Vignali
6ebc71847e fate/hapenc : remove tests due to inconsistent result 2018-05-08 11:44:34 +02:00
Clément Bœsch
f679711c1b checkasm: add vf_nlmeans test for ssd_integral_image 2018-05-08 10:28:06 +02:00
James Almer
08032331ac fate: update fate-sws-pixdesc-query reference file
Signed-off-by: James Almer <jamrial@gmail.com>
2018-05-05 19:20:38 -03:00
Paul B Mahol
a26367493c fate: update pad pixfmt test
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-05 22:05:07 +02:00
Paul B Mahol
b9dd058f7a swscale: add gray14 support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-05 21:35:31 +02:00
Paul B Mahol
f43fd68f28 avfilter/drawutils: add support for full range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 21:43:57 +02:00
Paul B Mahol
5abcf45d75 avformat/yuv4mpegdec: simplify math
This one actually works with hd1080 y4m files when seeking backwards.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-05-03 14:15:07 +02:00
Mark Thompson
e07b1913fc fate/cbs: Always overwrite output in cbs fate tests
Before this, a failed test would keep failing because the output file
is not cleaned up and subsequent runs would refuse to overwrite it.
2018-05-02 01:21:40 +01:00
Mark Thompson
ddd3a209dc lavc/cbs: Add tests for VP9
Uses the same mechanism as other codecs - conformance test files are
passed through the metadata filter (which, with no options, reads the
input and writes it back) and the output verified to match the input.
2018-05-02 01:21:40 +01:00
Marton Balint
c60a824ee8 avformat/qtpalette: parse color table according to the QuickTime file format specs
The specs says that the the first color component in the color array is
not alpha, but simply 0.

Fixes 0 alpha of fate-suite/cvid/catfight-cvid-pal8-partial.mov

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-04-30 21:50:12 +02:00
Paul B Mahol
29fd44adf1 avfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-28 22:49:09 +02:00
Clément Bœsch
71fa82bed6 lavu/threadmessage: add av_thread_message_queue_nb_elems() 2018-04-26 19:41:19 +02:00
Derek Buitenhuis
28503c5aea mov: Properly abide by the track's media duration
The track's media duration from the mdhd atom takes precedence
over both the stts and elst atom for calculating and setting
the track's total duraion.

Technically, we shouldn't be using the stts atom at all for
calculating stream durations.

This fixes incorrect stream and final packet durations on files
with edit lists that are longer than the media duration.

The FATE changes are expected, and output is more correct (the
AAC frame is not 1028 samples).

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-04-26 14:42:15 +01:00
Jerome Borsboom
cc5deeb74a avcodec/vc1: add overlap smooting and loop filter for frame/field-interlace
Add previously omitted overlap smooting and loop filtering for
frame/field-interlace pictures. For progressive pictures switch to the
re-implemented versions of overlap smooting and loop filtering.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
362ce2db4b avcodec/vc1: implement interlaced out-of-bounds reference pixel replication
The existing implementation did out-of-bounds reference pixel replication for
progressive reference frames. In interlaced reference frames both the even and
odd line on the horizontal edges need to be replicated.

Fixes #3262.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Paul B Mahol
b2570afde3 avformat/yuv4mpegdec: fix seeking backwards
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 18:30:46 +02:00
Martin Vignali
07a566e7d6 swscale/swscale_unscaled : add X86_64 (SSE2 and AVX) for uyvyto422
and checkasm test
2018-04-22 19:15:32 +02:00
Jacob Trimble
f7221d8e67 avformat/mov: Increase support for common encryption.
- Parse schm atom to get different encryption schemes.
- Allow senc atom to appear in track fragments.
- Allow 16-byte IVs.
- Allow constant IVs (specified in tenc).
- Allow only tenc to specify encryption (i.e. no senc/saiz/saio).
- Use sample descriptor to detect clear fragments.

This doesn't support:
- Different sample descriptor holding different encryption info.
  - Only first sample descriptor can be encrypted.
- Encrypted sample groups (i.e. seig).
- Non-'cenc' encryption scheme when using -decryption_key.

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-19 03:15:32 +02:00
Michael Niedermayer
18d6ff2b42 tests/checkasm/checkasm: Provide verbose failure information on float_near_abs_eps() failures
This will make understanding failures and adjusting EPS easier

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-14 15:54:06 +02:00
Michael Niedermayer
5c62a3dbda tests/fate/filter-video: Use a bitexact/lossless input sample for fate-filter-metadata-silencedetect
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-13 21:44:28 +02:00
Bela Bodecs
a06175d739 fate: to test program sub stream selection by its type in mpegts
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-12 23:52:59 +02:00
Mattias Amnefelt
a26c9fdd1b libavformat/aac: Parse all ID3 tags present between ADTS frames
Some ADTS streams can have multiple ID3 tags between frames. This
change parses all of them, rather than just the first one.

Signed-off-by: Mattias Amnefelt <mattiasa@avm.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-12 02:54:14 +02:00