aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ref/lavf
Commit message (Collapse)AuthorAgeFilesLines
* Revert "tests/fate: disable compression for zlib-based codecs"James Almer2024-10-165-10/+10
| | | | | | | | This made the output non binary reproducible across different versions of zlib. This reverts commit bce5855afb25d318e090c2e6c16117f065458356. Signed-off-by: James Almer <jamrial@gmail.com>
* tests/fate: disable compression for zlib-based codecsRamiro Polla2024-10-145-10/+10
| | | | | | | | | | FATE results differ when using the original zlib and zlib-ng. Since we don't need to test the result from zlib itself, this commit disables compression on tests for zlib-based codecs, which ends up giving the same results with both libraries. Signed-off-by: James Almer <jamrial@gmail.com>
* movenc: Add an option for resilient, hybrid fragmented/non-fragmented muxingMartin Storsjö2024-06-241-0/+3
| | | | | | | | | | | | | | This allows ending up with a normal, non-fragmented file when the file is finished, while keeping the file readable if writing is aborted abruptly at any point. (Normally when writing a mov/mp4 file, the unfinished file is completely useless unless it is finished properly.) This results in a file where the mdat atom contains (and hides) all the moof atoms that were part of the fragmented file structure initially. Signed-off-by: Martin Storsjö <martin@martin.st>
* fate/lavf-audio: Test writing AIFF-native tagsAndreas Rheinhardt2024-03-171-2/+2
| | | | | | | | In particular, test writing tags with odd strlen. (These tags are zero-padded to even size.) Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/pcm: decrease target audio frame per sec to 10Marton Balint2024-03-166-17/+17
| | | | | | | | | | This makes the wav and pcm demuxer demux bigger packets, which is more efficient. As a side effect of the bigger packets, audio durations can become less exact for command lines such as "ffmpeg -i $INPUT -c:a copy -t 1.0 $OUTPUT". Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/pnm: explicitly tag color rangeNiklas Haas2023-11-094-9/+9
| | | | | | | | | | | | | | PGMYUV seems to be always limited range. This was a format originally invented by FFmpeg at a time when YUVJ distinguished limited from full range YUV, and this codec never appeared to output YUVJ in any circumstance, so hard-coding limited range preserves the status quo. The other formats are explicitly documented to be full range RGB/gray formats. That said, don't tag them yet, due to outstanding bugs w.r.t grayscale formats and color range handling. This change in behavior updates a bunch of FATE tests in trivial ways (added tagging being the only difference).
* fftools/ffmpeg_enc: do not round frame durations prematurelyAnton Khirnov2023-10-037-19/+19
| | | | | Changes the results of fate-idroq-video-encode and fate-lavf* tests, where different frames now get duplicated by framerate conversion code.
* avformat/matroskaenc: Write default duration for audioAndreas Rheinhardt2023-10-023-6/+6
| | | | | | | This is easily possible for those codecs with a fixed frame-size (in samples). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_enc: apply -top to individual encoded framesAnton Khirnov2023-09-181-1/+1
| | | | Fixes #9339.
* avformat/matroskaenc: Don't write \0 unnecessarilyAndreas Rheinhardt2023-08-103-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Writing the duration SimpleTag is special: It's size is reserved in advance via an EBML Void element (if seekable) and this reserved space is overwritten when writing the trailer; it does not use put_ebml_string(). The string to write is created via snprintf on a buffer of size 20; this buffer is then written via put_ebml_binary() with a size of 20. EBML strings need not be zero-terminated; if not, they are implicitly terminated by the element's length field. snprintf() always zero-terminates the buffer, i.e. the last byte can be discarded when using an EBML string. This patch does this. The FATE changes are as expected: One byte saved for every track; the only exception is the matroska-qt-mode test: An additional byte is saved because an additional byte could be saved from the enclosing Tags length field. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't reserve space for HDR10+ when unnecessaryAndreas Rheinhardt2023-08-103-6/+6
| | | | | | | | | | Do it only for video (the only thing for type for which HDR10+ makes sense). This effectively reverts changes to several FATE ref-files made in bda44f0f39e8ee646e54f15989d7845f4bf58d26. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate: fix mismatches between requested and actually used pixel formatsAnton Khirnov2023-07-201-1/+1
|
* fftools/ffmpeg: rework audio-decode timestamp handlingAnton Khirnov2023-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Stop using InputStream.dts for generating missing timestamps for decoded frames, because it contains pre-decoding timestamps and there may be arbitrary amount of delay between input packets and output frames (e.g. dependent on the thread count when frame threading is used). It is also in AV_TIME_BASE (i.e. microseconds), which may introduce unnecessary rounding issues. New code maintains a timebase that is the inverse of the LCM of all the samplerates seen so far, and thus can accurately represent every audio sample. This timebase is used to generate missing timestamps after decoding. Changes the result of the following FATE tests * pcm_dvd-16-5.1-96000 * lavf-smjpeg * adpcm-ima-smjpeg In all of these the timestamps now better correspond to actual frame durations.
* fftools/ffmpeg: propagate frame durations to packets when encodingAnton Khirnov2023-04-193-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove now-obsolete code setting packet durations pre-muxing for CFR encoded video. Changes output in the following FATE tests: * numerous adpcm tests * ffmpeg-filter_complex_audio * lavf-asf * lavf-mkv * lavf-mkv_attachment * matroska-encoding-delay All of these change due to the fact that the output duration is now the actual input data duration and does not include padding added by the encoder. * apng-osample: less wrong packet durations are now passed to the muxer. They are not entirely correct, because the first frame duration should be 3 rather than 2. This is caused by the vsync code and should be addressed later, but this change is a step in the right direction. * tscc2-mov: last output frame has a duration of 11 rather than 1 - this corresponds to the duration actually returned by the demuxer. * film-cvid: video frame durations are now 2 rather than 1 - this corresponds to durations actually returned by the demuxer and matches the timestamps. * mpeg2-ticket6677: durations of some video frames are now 2 rather than 1 - this matches the timestamps.
* avformat/matroskaenc: support writing Dynamic HDR10+ packet side dataJames Almer2023-04-083-6/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: write a MaxBlockAdditionID elementJames Almer2023-04-053-6/+6
| | | | | | A non zero value is mandatory for Matroska if the track has blocks with BlockAdditions. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mxfenc: fix stored/sampled/displayed width/heightJerome Martinez2023-03-262-1/+4
| | | | | | | | | | | | | | | | | | | | According to MXF specs the Stored Rectangle corresponds to the data which is passed to the compressor and received from the decompressor, so they should contain the width / height extended to the macroblock boundary. In practice however width and height values rounded to the upper 16 multiples are only seen when muxing MPEG formats. Therefore this patch changes stored width and height values to unrounded for all non-MPEG formats, even macroblock based ones. For DNXHD the specs (ST 2019-4) explicitly indicates to use 1080 for 1088p. For ProRes the specs (RDD 44) only refer to to ST 377-1 without precision but no known commercial implementations are using rounded values. DV is not using 16x16 macroblocks, so 16 rounding makes no sense. The patch also fixes Sampled Width / Display Width to use unrounded values. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: SMPTE RDD 48:2018 Amd 1:2022 supportJerome Martinez2023-03-251-0/+3
|
* avformat/oggenc: don't flush twice when the last packet is side data onlyJames Almer2023-01-031-1/+1
| | | | | | | | Commit 18f24527eb accidentally made side data only packets be handled like a flush request. Fix this regression by effectively ignoring them as was the original intention. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: ignore empty packetsJames Almer2022-12-271-1/+1
| | | | | | | | | | Some encoders, like flac, can send side data only packets at the end. Eventually, said extradata update should ideally be used to update the header when writting to seekable output, but for now, ignore them. Should fix the undefined behavior of passing NULL to memcpy(). Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/pnm: avoid mirroring PFM images verticallyLeo Izen2022-12-274-4/+4
| | | | | | | | | | | | | | | | | | | | PFM (aka Portable FloatMap) encodes its scanlines from bottom-to-top, not from top-to-bottom, unlike other NetPBM formats. Without this patch, FFmpeg ignores this exception and decodes/encodes PFM images mirrored vertically from their proper orientation. For reference, see the NetPBM tool pfmtopam, which encodes a .pam from a .pfm, using the correct orientation (and which FFmpeg reads correctly). Also compare ffplay to magick display, which shows the correct orientation as well. See: http://www.pauldebevec.com/Research/HDR/PFM/ and see: https://netpbm.sourceforge.net/doc/pfm.html for descriptions of this image format. Signed-off-by: Leo Izen <leo.izen@gmail.com> Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add QOI/XBM/XWD image2pipe testsPaul B Mahol2022-12-033-0/+9
|
* ac3: convert to lavu/txLynne2022-11-061-1/+1
|
* avcodec/sgidec: Use planar pixel formatsAndreas Rheinhardt2022-10-051-1/+1
| | | | | | | The data in SGI images is stored planar, so exporting it via planar pixel formats is natural. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate/lavf-audio: Add dfpwm testAndreas Rheinhardt2022-09-181-0/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Write CodecDelay for codecs != OpusAndreas Rheinhardt2022-09-052-4/+4
| | | | | | | | | The field is not specific to Opus. The mp2fixed encoder signals initial_padding and is used by both the matroska-encoding-delay test as well as the lavf-mkv tests which necessitated several FATE ref changes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc/dv: remove ff_dvvideo_init()Anton Khirnov2022-09-051-1/+1
| | | | | | | | | | | The function contains only two assignments, setting DVVideoContext.avctx and AVCodecContext.chroma_sample_location. However, the decoder does not use the former, and the encoder should not be setting the latter. Therefore move the first assignment to dvenc and the second to dvdec. Make the encoder warn if the user-signalled chroma sample location does not match the supported one, and return an error on higher compliance levels.
* avcodec: WBMP (Wireless Application Protocol Bitmap) image formatPeter Ross2022-08-071-0/+3
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Peter Ross <pross@xvid.org>
* fate/lavf-image: Disable file checksums for exr testsAndreas Rheinhardt2022-08-0212-24/+0
| | | | | | | | | | The generated files are endian-dependent, so no checksums may be part of the ref files. Fixes ticket #9854. Tested-by: Sebastian Ramacher <sramacher@debian.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* tests/fate-run: Allow to skip file checksums for lavf_imageAndreas Rheinhardt2022-08-0250-50/+50
| | | | | | | | | | | | | | The output file (even the filesize) of the recently added EXR tests depends on the endianness; therefore checksums of these files must not be part of the ref file. Therefore this commit adds an option (unused for now) to disable these checksums on a per-test basis. In order to avoid having to check twice, the checksum and the filesize info are moved to immediately follow one another; this results into updates to the ref files of all lavf-image tests. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: add PFM encoder testsPaul B Mahol2022-07-034-0/+12
|
* fate: add EXR encoder testsPaul B Mahol2022-07-0312-0/+36
|
* avformat/movenc: enable compressorname for mp4 modeZhao Zhili2022-06-241-3/+3
| | | | Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* avformat/matroskaenc: Don't waste bytes to Write Tag length fieldsAndreas Rheinhardt2022-06-203-6/+6
| | | | | | | This is possible by using a dynamic buffer to write them; said dynamic buffer is (re)used and reset as appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fate: add test for QOI formatPaul B Mahol2022-06-051-0/+3
|
* fate/lavf-audio: Disable CRC for lavf-peak_only.wav testAndreas Rheinhardt2022-05-061-1/+0
| | | | | | | | | 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>
* avformat/mxfenc: allow more bits for variable part in uuid generationMarton Balint2022-03-166-8/+8
| | | | | | Also make sure we do not change the product UID. Signed-off-by: Marton Balint <cus@passwd.hu>
* tests: update hash as output have changed again for fate-lavf-mxf_opatomPaul B Mahol2022-03-061-1/+1
|
* avcodec/dnxhdenc: retry increasing qscale to not overflow max_bitsPaul B Mahol2022-03-051-2/+2
| | | | | | | Increase mb_bits type from uint16_t to uint32_t to fix possible overflows in bit size calculations. Update fate test that needs change.
* avformat/matroskaenc: Don't waste bytes on Video element length fieldsAndreas Rheinhardt2022-01-192-4/+4
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on AttachedFiles' length fieldsAndreas Rheinhardt2022-01-191-2/+2
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/matroskaenc: Don't waste bytes on SimpleTags length fieldsAndreas Rheinhardt2022-01-193-6/+6
| | | | | | | Also check the (user-provided) tags for being overlong; the earlier code had an implicit unchecked size_t->int conversion. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/mxfenc: fix DNxHD GC element_typeNicolas Gaullier2021-12-271-1/+1
| | | | | | | | | | | | | | | | The values for the essence element type were updated in the spec from 0x05/0x06 (ST2019-4 2008) to 0x0C/0x0D (ST2019-4 2009). Fixes ticket #6380. Thanks-to: Philip de Nier <philip.denier@bbc.co.uk> Thanks-to: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfenc: fix DNxHD GC container_ulNicolas Gaullier2021-12-271-1/+1
| | | | | | | Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Reviewed-by: Matthieu Bouron <matthieu.bouron@gmail.com> Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: fix loosing gaps between audio frame timestamps when filteringPaul B Mahol2021-11-181-1/+1
|
* avformat/matroskaenc: Pass dispositions through unchanged by defaultAndreas Rheinhardt2021-08-243-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until now, the Matroska muxer did not use the dispositions it is given as-is; instead it by default overrode the disposition of the first track of a kind (audio, video, subtitles) if no track of this kind has the default disposition set. And up until recently, it also enforced by default that no more than one track of each kind be marked as default. The rationale for the former is that there are lots of containers which lack the concept of default streams, so that it is not uncommon for no stream to be marked as default at all; the rationale for the latter was that up until recently, it was dubious whether the Matroska specification allowed more than one default stream for track type (e.g. mkvmerge disallowed it). It was this point which led to the implementation of the above mentioned behaviour inspired by mkvmerge. Yet the Matroska specifications have changed and now explicitly allow to set more than one track of each type as default, so that the main reason of not using the dispositions as-is was rendered moot. Therefore this commit changes the default to pass the disposition through. The matroska-mpegts-remux FATE-test has been updated to still use the old "infer" mode so that it is still covered by FATE; the matroska-zero-length-block test has also been updated to cover the infer_no_subs mode. The references for lots of other FATE tests needed to be updated because of a newly added FlagDefault element with value zero (whereas a FlagDefault with value 1 needn't be coded at all, as it coincided with the default value of said element). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/fitsenc: write DATAMIN/DATAMAX to encoded outputPaul B Mahol2021-02-106-7/+7
| | | | | | There is no point in doing normalization when such files are decoded. Update fate test with new results.
* avformat/mxf: add platform local tagLimin Wang2021-02-056-8/+8
| | | | | | | | | | | 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>
* avcodec/xbmenc: Do not add last comma into outputJose Da Silva2021-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* avformat/mxfenc: add Coding Equations and Color Primaries to local tagsMarton Balint2021-01-276-8/+8
| | | | | | Fixes ticket #9079. Signed-off-by: Marton Balint <cus@passwd.hu>