summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* lavc/aac_ac3_parser: fix potential overflow when averaging bitrateAlexander Strasser2020-08-12
| | | | | | | 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>
* lavf/url: rewrite ff_make_absolute_url() using ff_url_decompose().Nicolas George2020-08-12
| | | | | | | | | | 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.
* lavf/url: add ff_url_decompose().Nicolas George2020-08-12
|
* dnn_backend_native_layer_mathunary: add round supportMingyu Yin2020-08-12
| | | | | Signed-off-by: Mingyu Yin <mingyu.yin@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* FATE/dnn: add unit test for dnn avgpool layerTing Fu2020-08-10
| | | | | | | 'make fate-dnn-layer-avgpool' to run the test Signed-off-by: Ting Fu <ting.fu@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* fate: cosmeticsZane van Iperen2020-08-07
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* fate: add adpcm_argo testZane van Iperen2020-08-07
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* dnn_backend_native_layer_mathunary: add floor supportMingyu Yin2020-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be tested with the model generated with below python script: import tensorflow as tf import os import numpy as np import imageio from tensorflow.python.framework import graph_util name = 'floor' pb_file_path = os.getcwd() if not os.path.exists(pb_file_path+'/{}_savemodel/'.format(name)): os.mkdir(pb_file_path+'/{}_savemodel/'.format(name)) with tf.Session(graph=tf.Graph()) as sess: in_img = imageio.imread('detection.jpg') in_img = in_img.astype(np.float32) in_data = in_img[np.newaxis, :] input_x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in') y_ = tf.math.floor(input_x*255)/255 y = tf.identity(y_, name='dnn_out') sess.run(tf.global_variables_initializer()) constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out']) with tf.gfile.FastGFile(pb_file_path+'/{}_savemodel/model.pb'.format(name), mode='wb') as f: f.write(constant_graph.SerializeToString()) print("model.pb generated, please in ffmpeg path use\n \n \ python tools/python/convert.py {}_savemodel/model.pb --outdir={}_savemodel/ \n \nto generate model.model\n".format(name,name)) output = sess.run(y, feed_dict={ input_x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) print("To verify, please ffmpeg path use\n \n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow -f framemd5 {}_savemodel/tensorflow_out.md5\n \ or\n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow {}_savemodel/out_tensorflow.jpg\n \nto generate output result of tensorflow model\n".format(name, name, name, name)) print("To verify, please ffmpeg path use\n \n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native -f framemd5 {}_savemodel/native_out.md5\n \ or \n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model={}_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native {}_savemodel/out_native.jpg\n \nto generate output result of native model\n".format(name, name, name, name)) Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
* avformat/mxfdec: Read color metadata from MXFHarry Mallon2020-08-06
| | | | | | | 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>
* dnn_backend_native_layer_mathunary: add ceil supportMingyu Yin2020-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be tested with the model generated with below python script: import tensorflow as tf import os import numpy as np import imageio from tensorflow.python.framework import graph_util name = 'ceil' pb_file_path = os.getcwd() if not os.path.exists(pb_file_path+'/{}_savemodel/'.format(name)): os.mkdir(pb_file_path+'/{}_savemodel/'.format(name)) with tf.Session(graph=tf.Graph()) as sess: in_img = imageio.imread('detection.jpg') in_img = in_img.astype(np.float32) in_data = in_img[np.newaxis, :] input_x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in') y = tf.math.ceil( input_x, name='dnn_out') sess.run(tf.global_variables_initializer()) constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out']) with tf.gfile.FastGFile(pb_file_path+'/{}_savemodel/model.pb'.format(name), mode='wb') as f: f.write(constant_graph.SerializeToString()) print("model.pb generated, please in ffmpeg path use\n \n \ python tools/python/convert.py ceil_savemodel/model.pb --outdir=ceil_savemodel/ \n \n \ to generate model.model\n") output = sess.run(y, feed_dict={ input_x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) print("To verify, please ffmpeg path use\n \n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model=ceil_savemodel/model.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow -f framemd5 ceil_savemodel/tensorflow_out.md5\n \n \ to generate output result of tensorflow model\n") print("To verify, please ffmpeg path use\n \n \ ./ffmpeg -i detection.jpg -vf format=rgb24,dnn_processing=model=ceil_savemodel/model.model:input=dnn_in:output=dnn_out:dnn_backend=native -f framemd5 ceil_savemodel/native_out.md5\n \n \ to generate output result of native model\n") Signed-off-by: Mingyu Yin <mingyu.yin@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* test: hlsenc: Use unique init/segment file names for the fmp4_ac3 testMartin Storsjö2020-08-03
| | | | | | | | | | | | | | | Previously, the hls-fmp4 and hls-fmp4_ac3 tests used the same file names for init and segment files, which occasionally could cause corruption and failed tests, if the input files for both tests are generated in parallel, as they could overwrite each other. This happened to work some of the time, as the fmp4_ac3 test actually only checked the init segment file (which the fmp4 test case never wrote, due to using the incorrect hls_segment_type option) and the fmp4 test case always regenerated the input files due to mismatched target and file names. Signed-off-by: Martin Storsjö <martin@martin.st>
* test: hlsenc: Make the hls_fmp4 sample file name match the targetMartin Storsjö2020-08-03
| | | | | | | | | | | | Previously, with the file name not matching the target, the files were regenerated every time fate is rerun - contrary to the other test targets in the same file. (While regenerating it every time might be desireable, as that's what the test is about, the file at least has a dependency on the ffmpeg executable, making them regenerated every time the executable is updated - and this change at least makes it consistent with the rest.) Signed-off-by: Martin Storsjö <martin@martin.st>
* fate/aac: add missing bitexact flag to some encoder testsJames Almer2020-08-03
| | | | | | | | Will prevet FATE from breaking once LIBAVCODEC_VERSION_MINOR is bumped to 100. Reported-by: zane Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cfhd: improve decompanding quality with reference implementationPaul B Mahol2020-08-02
|
* tests/imgutils: test the output of av_image_fill_* functionsJames Almer2020-07-30
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libavutil: Detect MMI and MSA flags for MIPSJiaxun Yang2020-07-23
| | | | | | | | | | | | | | | Add MMI & MSA runtime detection for MIPS. Basically there are two code pathes. For systems that natively support CPUCFG instruction or kernel emulated that instruction, we'll sense this feature from HWCAP and report the flags according to values grab from CPUCFG. For systems that have no CPUCFG (or not export it in HWCAP), we'll parse /proc/cpuinfo instead. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fate: add adpcm_ima_apm encoding testZane van Iperen2020-07-21
| | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* checkasm/vf_blend: use the correct depth parameters to initialize the blend ↵James Almer2020-07-12
| | | | | | | | | modes This effectively enables the tests that until now were just running the C version alone. Signed-off-by: James Almer <jamrial@gmail.com>
* tests/dnn/mathunary: fix the issue of NANTing Fu2020-07-09
| | | | | | | When one of output[i] & expected_output is NAN, the unit test will always pass. Signed-off-by: Ting Fu <ting.fu@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
* tests/fate/hlsenc: add testcase of ac3 surround sound input in hlsencSteven Liu2020-07-07
| | | | | | | 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>
* avfilter/vf_edgedetect: properly implement double_threshold()Valery Kot2020-07-06
| | | | | | | | | | | | | | 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>
* dnn-layer-math-unary-test: add unit test for atanhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for acoshTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for asinhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for tanhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for coshTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn-layer-math-unary-test: add unit test for sinhTing Fu2020-07-06
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* FATE: fix colorbalance fate test failed on x86_32Limin Wang2020-07-02
| | | | | | | | | floating point precision will cause rgb*max generate different value on x86_32 and x86_64. have pass fate test on x86_32 and x86_64 by using lrintf to get the nearest integral value for rgb * max before av_clip. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* fate: Update fate refs after cca982ee018aad54214e94f2a0a5921c8bbf1328Andreas Rheinhardt2020-06-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc/aac_ac3_parser: improve the raw AAC file bit rate calculationJun Zhao2020-06-26
| | | | | | | | | | | | | | | | | | | Now we just use one ADTS raw frame to calculate the bit rate, it's lead to a larger error when get the duration from bit rate, the improvement cumulate Nth ADTS frames to get the average bit rate. e,g used the command get the duration like: ffprobe -show_entries format=duration -i fate-suite/aac/foo.aac before this improvement dump the duration=2.173935 after this improvement dump the duration=1.979267 in fact, the real duration can be get by command like: ffmpeg -i fate-suite/aac/foo.aac -f null /dev/null with time=00:00:01.97 Also update the fate-adtstoasc_ticket3715. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* dnn-layer-math-unary-test: add unit test for atanTing Fu2020-06-25
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn-layer-math-unary-test: add unit test for acosTing Fu2020-06-25
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn-layer-math-unary-test: add unit test for asinTing Fu2020-06-25
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* fate: add yuv420p10 and yuv422p10 tests for overlay filterLimin Wang2020-06-19
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/movenc: Write 'av01' as a compatible brand when muxing AV1Derek Buitenhuis2020-06-17
| | | | | | | | | This is a requirement of the AV1-ISOBMFF spec. Section 2.1. General Requirements & Brands states: * It SHALL have the av01 brand among the compatible brands array of the FileTypeBox Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/h264: create user data unregistered SEI side data for H.264Limin Wang2020-06-15
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avcodec/hevc_sei: add support for user data unregistered SEI messageLimin Wang2020-06-15
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* swscale: Add swscale input/output support for X2RGB10LEFei Wang2020-06-12
| | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* lavu/pix_fmt: add new pixel format x2rgb10Fei Wang2020-06-12
| | | | | | | The format is packed RGB with each channel 10 bits available and include 2 bits unused. Signed-off-by: Fei Wang <fei.w.wang@intel.com>
* dnn-layer-mathunary-test: add unit test for tanTing Fu2020-06-11
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn-layer-mathunary-test: add unit test for cosTing Fu2020-06-11
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn-layer-mathunary-test: add unit test for sinTing Fu2020-06-11
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* Remove unnecessary use of avcodec_close().Anton Khirnov2020-06-10
| | | | | Replace it with avcodec_free_context() or drop it completely as appropriate.
* Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."Michael Niedermayer2020-06-08
| | | | | | | | | This causes regressions in end to end timestamps with mp3s and ffmpeg. The revert is to avoid this regression in the 4.3 release See: [FFmpeg-devel] [PATCH] Don't adjust start time for MP3 files; packets are not adjusted. This reverts commit 460132c9980f8a1f501a1f69477bca49e1641233.
* fate/vcodec: use the encoder private option for frame skip compare functionJames Almer2020-06-04
| | | | | | Stop using the deprecated global option Signed-off-by: James Almer <jamrial@gmail.com>
* fate: add adpcm_ima_ssi encoding testZane van Iperen2020-06-01
| | | | | Signed-off-by: Zane van Iperen <zane@zanevaniperen.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* checkasm: sw_rgb: Fix mixed declaration and codeJun Zhao2020-06-01
| | | | | | | Fix mixed declaration and code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* dnn-layer-mathunary-test: add unit test for absTing Fu2020-05-28
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* lavf/mp3dec: don't adjust start time; packets are not adjusted.Dale Curtis2020-05-27
| | | | | | | | | | | | | | | | | | | | 7546ac2fee4 made it so that the start_time for mp3 files is adjusted for skip_samples. However, this appears incorrect because subsequent packet timestamps are not adjusted and skip_samples are applied by deleting data from a packet without changing the timestamp. E.g., we are told the start_time is ~25ms and we get a packet with a timestamp of 0 that has had the skip_samples discarded from it. As such rendering engines may incorrectly discard everything prior to the 25ms thinking that is where playback should officially start. Since the samples were deleted without adjusting timestamps though, the true start_time is still 0. Other formats like MP4 with edit lists will adjust both the start time and the timestamps of subsequent packets to avoid this issue. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* fate: add tests for h264 and vp9 video enc parameters exportAnton Khirnov2020-05-25
|