summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* 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>
* dnn/native: add log error messageTing Fu2020-08-25
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* lavfi/hflip: Support Bayer pixel formats.Carl Eugen Hoyos2020-08-25
| | | | Fixes part of ticket #8819.
* fate: remove "-v 0" from ffprobe tests.Nicolas George2020-08-24
|
* dnn_backend_native_layer_mathbinary: add floormod supportMingyu Yin2020-08-24
| | | | Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
* fate: add fate-sub-dvb testClément Bœsch2020-08-22
| | | | | | 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.
* avformat/movenc: write the colr atom by defaultMichael Bradshaw2020-08-21
| | | | | | | | | | | | | | | | | 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>
* FATE: fix copy & paste for minterpolate testLimin Wang2020-08-18
| | | | | Reported-by: Nicolas George <george@nsup.org> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* 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>