Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-09-08tools/cws2fws: Check read() for failureMichael Niedermayer
Fixes: CID1452579 Argument cannot be negative Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0b3cdd7cc2c63969e144cc3eb39d0c61260509ee) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-01tools/target_dem_fuzzer: Fix packet leakMichael Niedermayer
Fixes: 32121/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-4512973109460992 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6055b93379fd29477afa8f24881223a14e2f6b81) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-04-01tools/target_dec_fuzzer: Adjust threshold for H264Michael Niedermayer
Fixes: Timeout (too long -> 3sec) Fixes: 28047/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-4662727980875776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 46c4f393074916a023c1cac2436b19491847622f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-17tools/target_bsf_fuzzer: use av_packet_alloc() to allocate packetsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17tools/target_dem_fuzzer: use av_packet_alloc() to allocate packetsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17tools/target_dec_fuzzer: use av_packet_alloc() to allocate packetsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17tools/pktdumper: use av_packet_alloc() to allocate packetsJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-09tools/target_dec_fuzzer: Adjust flv1 thresholdMichael Niedermayer
Fixes: Timeout (long -> 95ms) Fixes: 29068/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLV_fuzzer-6509662832820224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-05avutil/{avstring,bprint}: add XML escaping from ffprobe to avutilStefano Sabatini
Base escaping only escapes values required for base character data according to part 2.4 of XML, and if additional flags are added single and double quotes can additionally be escaped in order to handle single and double quoted attributes. Co-authored-by: Jan Ekström <jan.ekstrom@24i.com> Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
2021-02-16tools/target_dec_fuzzer: Adjust threshold for wavpackMichael Niedermayer
Fixes: Timeout (long -> 4sec) Fixes: 29064/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVPACK_fuzzer-5104450901508096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16tools/target_dec_fuzzer: Adjust threshold for MSA1Michael Niedermayer
Fixes: Timeout (too long to wait -> 1ms) Fixes: 29048/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSA1_fuzzer-5733703473037312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16tools/target_dec_fuzzer: adjust threshold for cookMichael Niedermayer
Fixes: Timeout (long -> 3ms) Fixes: 29134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_COOK_fuzzer-5192822695264256 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16tools/target_dec_fuzzer: Adjust threshold for theoraMichael Niedermayer
Fixes: Timeout Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16tools/target_dec_fuzzer: Update maxpixels_per_frame for low thresholdsMichael Niedermayer
Fixes: Timeout Fixes: 29990/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSS2_fuzzer-5469155073589248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-16tools/target_dec_fuzzer: count all video decoding failures in the new APIMichael Niedermayer
The next commit depends on this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14tools/target_dec_fuzzer: Adjust threshold for VMNCMichael Niedermayer
Fixes: Timeout Fixes: 30055/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMNC_fuzzer-4739482576355328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-14tools/target_dec_fuzzer: Adjust the threshold of vc1imageMichael Niedermayer
Fixes: Timeout Fixes: 30025/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5965511357759488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-02-05tools/target_dec_fuzzer: Adjust threshold for interplayacmMichael Niedermayer
Fixes: Timeout (long -> 1sec) Fixes: 27439/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INTERPLAY_ACM_fuzzer-5145715814432768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-01-26tools/target_dec_fuzzer: use non-obsolete decoding APIAnton Khirnov
2021-01-05tools/target_dem_fuzzer.c: Decrease maxblocksMichael Niedermayer
Fixes: Timeout Fixes: 28606/clusterfuzz-testcase-minimized-ffmpeg_dem_FRM_fuzzer-5123311424110592 Fixes: 28796/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5945803411685376 Fixes: 28821/clusterfuzz-testcase-minimized-ffmpeg_dem_BRSTM_fuzzer-6044239834251264 Fixes: 28841/clusterfuzz-testcase-minimized-ffmpeg_dem_SIFF_fuzzer-5485368388485120 Fixes: 28862/clusterfuzz-testcase-minimized-ffmpeg_dem_AST_fuzzer-5081306790756352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-24tools/target_dec_fuzzer: Adjust maxpixels for G2MMichael Niedermayer
Fixes: Timeout (50sec -> 3sec) Fixes: 27383/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5196953666977792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-12-19tools/target_dem_fuzzer: remove unused labelMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-11-21tools/target_bsf_fuzzer: set bitstream filter optionsJames Almer
Should increase coverage with some bitstream filters Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-20tools/target_bsf_fuzzer: Call av_bsf_flush() in a fuzzer choosen patternJames Almer
This should increase coverage. Based on a commit by Michael Niedermayer Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-20tools/target_dec_fuzzer: Call avcodec_flush_buffers() in a fuzzer choosen ↵Michael Niedermayer
pattern This should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-20tools/target_dem_fuzzer: use avio_context_free() to free the fuzzer's ↵James Almer
AVIOContext The doxy for avio_alloc_context() states it must be used for this. Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-20tools/enum_options: fix build and add to MakefileAnton Khirnov
2020-11-07tools/target_dem_fuzzer: Consider it an EIO when reading position wraps ↵Michael Niedermayer
around 64bit Fixes: signed integer overflow: 9223372036854775807 + 564 cannot be represented in type 'long' Fixes: 26494/clusterfuzz-testcase-minimized-ffmpeg_dem_VOC_fuzzer-576754158849228 Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824 FIxes: 26875/clusterfuzz-testcase-minimized-ffmpeg_dem_C93_fuzzer-5996226782429184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-25tools/target_dec_fuzzer: adjust threshold for wmalosslessMichael Niedermayer
Fixes: Timeout (>30sec -> 0.5sec) Fixes: 26351/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5191487740182528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-24tools/target_dem_fuzzer: Limit max blocksMichael Niedermayer
With a IO block size of 1 byte potentially megabytes are quite slow to read, thus limit the number Fixes: 26511/clusterfuzz-testcase-minimized-ffmpeg_dem_NUV_fuzzer-5679249073373184 Fixes: 26517/clusterfuzz-testcase-minimized-ffmpeg_dem_XMV_fuzzer-6316634501021696 Fixes: 26518/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-485568285324083 Fixes: 26525/clusterfuzz-testcase-minimized-ffmpeg_dem_MSNWC_TCP_fuzzer-5121987011411968 Fixes: 26538/clusterfuzz-testcase-minimized-ffmpeg_dem_DHAV_fuzzer-5441800598454272 Fixes: OOM Fixes: Timeout Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-23tools/target_dec_fuzzer: Adjust threshold for opusMichael Niedermayer
Fixes: Timeout (12sec -> 3sec) Fixes: 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-19tools/target_dec_fuzzer: remove calls to avcodec_register*()James Almer
They are no longer needed. Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-19tools/target_dem_fuzzer: switch to the iterate APIJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-18tools/target_dec_fuzzer: assume that discarded audio packets produced max ↵Michael Niedermayer
samples We do not know how many samples these produce as its not exported. Alternatively we could export that but as long as its not we better assume its more than 0 as otherwise the thresholds would not work Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-18tools/target_dec_fuzzer: Correct maxsamples_per_frame if maxsamples has been ↵Michael Niedermayer
changed Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-16tools/target_dem_fuzzer: Set format independent of cMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-10-12Add support for building fuzzer tools for an individual demuxerMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-29dnn/native: add native support for denseMingyu Yin
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-09-19tools/target_dec_fuzzer: Adjust VQA thresholdMichael Niedermayer
Fixes: Timeout (169sec -> 9sec) Fixes: 23745/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VQA_fuzzer-5638172179693568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-13tools:target_dem_fuzzer: Split into a fuzzer fuzzing at the protocol level ↵Michael Niedermayer
and one fuzzing a fixed demuxer input This should improve coverage and should improve the efficiency of seed files Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-09-08tools/target_dec_fuzzer: Adjust threshold for WMV3IMAGEMichael Niedermayer
Fixes: Timeout (1131sec -> 1sec) Fixes: 24727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5754167793287168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-24dnn_backend_native_layer_mathbinary: add floormod supportMingyu Yin
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-08-18tools/target_dec_fuzzer: Adjust threshold for DSTMichael Niedermayer
Fixes: Timeout (too long -> 3sec) Fixes: 24239/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5189061015502848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-12dnn_backend_native_layer_mathunary: add round supportMingyu Yin
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-11tools/target_dec_fuzzer: Adjust threshold for AGMMichael Niedermayer
Fixes: Timeout (142sec -> 2sec) Fixes: 24426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5639724379930624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-10dnn/native: add native support for avg_poolTing Fu
Not support pooling strides in channel dimension yet. Signed-off-by: Ting Fu <ting.fu@intel.com> Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-07dnn_backend_native_layer_mathunary: add floor supportMingyu Yin
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>
2020-08-04dnn_backend_native_layer_mathunary: add ceil supportMingyu Yin
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>
2020-07-06dnn_backend_native_layer_mathunary: add atanh supportTing Fu
It can be tested with the model generated with below python script: import tensorflow as tf import numpy as np import imageio in_img = imageio.imread('input.jpeg') in_img = in_img.astype(np.float32)/255.0 in_data = in_img[np.newaxis, :] x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in') please uncomment the part you want to test x_sinh_1 = tf.sinh(x) x_out = tf.divide(x_sinh_1, 1.176) # sinh(1.0) x_cosh_1 = tf.cosh(x) x_out = tf.divide(x_cosh_1, 1.55) # cosh(1.0) x_tanh_1 = tf.tanh(x) x__out = tf.divide(x_tanh_1, 0.77) # tanh(1.0) x_asinh_1 = tf.asinh(x) x_out = tf.divide(x_asinh_1, 0.89) # asinh(1.0/1.1) x_acosh_1 = tf.add(x, 1.1) x_acosh_2 = tf.acosh(x_acosh_1) # accept (1, inf) x_out = tf.divide(x_acosh_2, 1.4) # acosh(2.1) x_atanh_1 = tf.divide(x, 1.1) x_atanh_2 = tf.atanh(x_atanh_1) # accept (-1, 1) x_out = tf.divide(x_atanh_2, 1.55) # atanhh(1.0/1.1) y = tf.identity(x_out, name='dnn_out') #please only preserve the x_out you want to test sess=tf.Session() sess.run(tf.global_variables_initializer()) graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out']) tf.train.write_graph(graph_def, '.', 'image_process.pb', as_text=False) print("image_process.pb generated, please use \ path_to_ffmpeg/tools/python/convert.py to generate image_process.model\n") output = sess.run(y, feed_dict={x: in_data}) imageio.imsave("out.jpg", np.squeeze(output)) Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-07-06dnn_backend_native_layer_mathunary: add acosh supportTing Fu
Signed-off-by: Ting Fu <ting.fu@intel.com>