summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* tests/audiomatch: add free to make static analysis tools happyJun Zhao2020-12-10
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* smvjpegdec: merge into mjpegdecAnton Khirnov2020-12-10
| | | | | | | | | | | | | | | | | | | | | | | SMVJPEG stores frames as slices of a big JPEG image. The decoder is implemented as a wrapper that instantiates a full internal MJPEG decoder, then forwards the decoded frames with offset data pointers. This is unnecessarily complex and fragile, not supporting useful decoder capabilities like direct rendering. Re-implement the decoder inside the MJPEG decoder, which is accomplished by returning each decoded frame multiple times, setting cropping information appropriately on each instance. One peculiar aspect of the previous design is that since - the smvjpeg decoder returns one frame per input packet - there are multiple frames in each packets (the aformentioned slices) the demuxer needs to return each packet multiple times. This is now also eliminated - the demuxer now returns each packet exactly once, with the duration set to the number of frames it decodes to. This also removes one of the last remaining internal uses of the old video decoding API.
* tests: stop using -vsync dropAnton Khirnov2020-12-10
| | | | | | | | It depends on the muxer generating the timestamps, which is deprecated and scheduled for removal on next bump. A bunch of tests change timestamps, because of ffmpeg.c is not generating them correctly. This should be fixed later.
* lavf/mux: rewrite guessing the packet durationAnton Khirnov2020-12-10
| | | | | | Factor out the code into a separate muxing-specific function. Stop accessing the deprecated AVStream-embedded codec context, use the average framerate (if specified) instead.
* tests: drop api-codec-param testAnton Khirnov2020-12-10
| | | | It fundamentally depends on deprecated lavf internals.
* avcodec/exr: preserve half-float NaN bits and add fate testMark Reid2020-12-09
| | | | | Handles NaNs more like the official implementation handles them, preserving the original bits.
* avfilter/af_earwax: fix filter behaviorPaul B Mahol2020-12-07
| | | | | Previous filter output was incorrect. New one actually follows graph in comments described on side of filter taps.
* avformat/dv: fix timestamps of audio packets in case of dropped corrupt ↵Marton Balint2020-12-06
| | | | | | | | | | | | | | | | | 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>
* fate: add a test for HDR10+ metadata in HEVCMohammad Izadi2020-12-05
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavformat/mov.c: export vendor id as metadataThierry Foucu2020-12-05
|
* avutil/opt: add AV_OPT_FLAG_DEPRECATED optionLimin Wang2020-12-05
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fate: Convert the musepack8 test to an oneoff testMartin Storsjö2020-11-17
| | | | | | This fixes tests if built for x86 with x87 FPU. Signed-off-by: Martin Storsjö <martin@martin.st>
* aviobuf: Increase the default SHORT_SEEK_THRESHOLD to 32 KBMartin Storsjö2020-11-12
| | | | | | | | | | | | | | | | | | 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>
* avcodec/adpcm_ima_amv: use coded sample countZane van Iperen2020-11-09
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* avcodec/adpcm_ima_swf: fix frame size to 4096Zane van Iperen2020-11-07
| | | | | | | | | 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>
* fate/filter-video: add 10bit test for unsharp filterLimin Wang2020-11-07
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fate: Add test for Musepack SV8 decodingAndreas Rheinhardt2020-10-31
| | | | | | | | | | | | | | | 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>
* ffmpeg: move field order decision making to encoder initializationJan Ekström2020-10-29
| | | | | | | | | | | 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.
* ffmpeg: pass decoded or filtered AVFrame to output stream initializationJan Ekström2020-10-29
| | | | | | | | | | 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".
* lavf/url: fix relative url parsing when the query string or fragment has a colonruiquan.crq2020-10-28
| | | | | | | | | 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>
* tests/audiomatch: removes a warning when compiling tests/audiomatchSteven Liu2020-10-26
| | | | | | | | | the warning message: warning: using floating point absolute value function 'fabs' when argument is of integer type use FFABS to set the absolute value. Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
* fate: add adpcm_ima_alp encoding testZane van Iperen2020-10-25
|
* tests/fate/hevc: Add test for 3fbf8737923ac49754946a2505367630544b87f1Michael Niedermayer2020-10-25
| | | | | Tested-on: x86-32/64/ARM/MIPS Linux, Mingw/WINE 32/64 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: add test for adpcm_swf in wavZane van Iperen2020-10-21
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* fate-mxf-probe-applehdr10: Ignore endiannessTomas Härdin2020-10-12
|
* fate: Add aa-demux testMichael Niedermayer2020-10-10
| | | | | | This should help fuzzer coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* FATE/dnn: only run unit test when CONFIG_DNN enabledPeter Ross2020-10-09
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* libswcale/input: use more accurate planer rgb16 yuv conversionsMark Reid2020-10-06
| | | | | | | 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>
* avcodec/av1dec: avoid probing with av1decJames Almer2020-10-06
| | | | | | | | av1dec should no longer attempt to output empty frames if another decoder was used for probing and it sucessfully set a pix_fmt ever since 05872c67a4, so we can re-add the AV_CODEC_CAP_AVOID_PROBING cap. Signed-off-by: James Almer <jamrial@gmail.com>
* libswcale/input: use more accurate rgbf32 yuv conversionsMark Reid2020-10-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libswscale/tests: add floatimg_cmp testMark Reid2020-10-02
| | | | | | | | | | 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>
* fate: add scale filters for big-endian architectures.Nicolas George2020-09-30
| | | | | | | | | | Filters mostly work in native endianness, but they must output a specified endianness, usually little: that requires a final conversion for big endian. I do not know what's the deal with gif-deal: inserting explicitly the filters that are implicitly inserted result in less frames in output. Probably a strange problem of duration.
* dnn/native: add native support for denseMingyu Yin2020-09-29
| | | | Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
* tests/fate-run: Always overwrite output files for md5 testsAndreas Rheinhardt2020-09-27
| | | | | | | | Otherwise the result of such tests will not accurately reflect the current state. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/movenc: use more fall-back values for average bit rate fieldsJan Ekström2020-09-22
| | | | | | | | | 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.
* avformat/movenc: implement writing of the btrt boxJan Ekström2020-09-22
| | | | | | | | | | | 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.
* avformat/mxfdec: Read Apple private Content Light Level from MXFHarry Mallon2020-09-17
| | | | | | * As embedded by Apple Compressor Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* libavcodec/exr: fix incorrect translation of denorm mantissaMark Reid2020-09-15
|
* avutil/timecode: fix av_timecode_get_smpte_from_framenum with 50/60 fpsMarton Balint2020-09-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avcodec: add AV1 hardware accelerated decoderFei Wang2020-09-12
| | | | | | | | | 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>
* fate: use correct uint32 layerMark Reid2020-09-12
|
* avcodec/exr: add support data windows larger or outside display windowMark Reid2020-09-12
|
* tests: fix warning ISO C90 forbids mixed declarations and codeLimin Wang2020-09-10
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* dnn_backend_native_layer_conv2d.c:Add mutithread functionXu Jun2020-09-09
| | | | | | | | | | | | | | | | | | | | | | Use pthread to multithread dnn_execute_layer_conv2d. Can be tested with command "./ffmpeg_g -i input.png -vf \ format=yuvj420p,dnn_processing=dnn_backend=native:model= \ espcn.model:input=x:output=y:options=conv2d_threads=23 \ -y sr_native.jpg -benchmark" before patch: utime=11.238s stime=0.005s rtime=11.248s after patch: utime=20.817s stime=0.047s rtime=1.051s on my 3900X 12c24t @4.2GHz About the increase of utime, it's because that CPU HyperThreading technology makes logical cores twice of physical cores while cpu's counting performance improves less than double. And utime sums all cpu's logical cores' runtime. As a result, using threads num near cpu's logical core's number will double utime, while reduce rtime less than half for HyperThreading CPUs. Signed-off-by: Xu Jun <xujunzz@sjtu.edu.cn> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavfi/vsrc_testsrc: switch to activate.Nicolas George2020-09-08
| | | | | | | | | | | | | | | | | | | | | | 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.
* fate: disable automatic conversions on many tests.Nicolas George2020-09-08
| | | | | | | | | | Explicitly insert the scale or aresample filter where it would have been inserted by the negotiation. Re-enable conversions if it cannot be done easily. If a conversion is needed in a test, we want to know about it. If the negotiation changes and makes new conversion necessary, we want to know about it even more.
* fate: add wav chapters testPaul B Mahol2020-09-07
|
* libavcodec/jpeg2000: fix tag tree resetGautam Ramakrishnan2020-08-30
| | | | | | | | | | 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>
* libavcodec/j2kenc: Support for multiple layersGautam Ramakrishnan2020-08-30
| | | | | | | | | | | 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>
* avformat/mxfdec: Read video range from CDCIEssenceDescriptorHarry Mallon2020-08-29
| | | | | | | * Capture black_ref, white_ref and color_range and recognise full and narrow range. Signed-off-by: Harry Mallon <harry.mallon@codex.online>