aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools/target_dec_fuzzer: adjust pixel threshold for TRUEMOTION2, as it ↵Michael Niedermayer2019-08-311-0/+1
| | | | | | | | | | allows coding gigantic images on tiny input Fixes: Timeout (137sec -> 6sec) Fixes: 16090/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5674245178261504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Init parsepktMichael Niedermayer2019-08-311-0/+1
| | | | | | | | | Fixes: memory corruption Fixes: 16702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PNG_fuzzer-5768418552184832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* dnn: export operand info in python script and load in c codeGuo, Yejun2019-08-301-10/+101
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* dnn: change .model file format to put layer number at the end of fileGuo, Yejun2019-08-301-11/+1
| | | | | | | | | | currently, the layer number is at the beginning of the .model file, so we have to scan twice in python script, the first scan to get the layer number. Only one scan needed after put the layer number at the end of .model file. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* tools/target_dec_fuzzer: Adjust maxpixels for indeo4Michael Niedermayer2019-08-291-0/+2
| | | | | | | | Fixes: Timeout (131sec -> 4sec) Fixes: 15581/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5651105515569152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Adjust GDV pixel threshold down by a factor of 2Michael Niedermayer2019-08-291-1/+1
| | | | | | | | Fixes: Timeout (7sec -> 1sec) Fixes: 14709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5704215281795072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: adjust pixel threshold for SANM, as it allows ↵Michael Niedermayer2019-08-291-0/+1
| | | | | | | | | | coding gigantic images on tiny input Fixes: Timeout (13sec ->1sec) Fixes: 16122/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_fuzzer-5724944247291904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Increase maxpixels threshold for diracMichael Niedermayer2019-08-261-0/+1
| | | | | | | | | | | | | wavelets allow significant size expansion and they are also not very fast. Fixes: Timeout Fixes: 16480/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5659892689403904 (108sec -> 17ms) Fixes: 16480/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5749422717140992 (big ->15sec) Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Do not corrupt the packet size returnMichael Niedermayer2019-08-261-2/+1
| | | | | | | | | Fixes: Timeout (infinite) Fixes: 16732/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5642166377906176 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: use refcounted packetsJames Almer2019-08-231-50/+21
| | | | | | Should reduce allocations and data copying. Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: Do not increase max_pixelsMichael Niedermayer2019-08-231-2/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* convert_from_tensorflow.py: support conv2d with dilationGuo, Yejun2019-08-151-21/+59
| | | | | | | | | conv2d with dilation > 1 generates tens of nodes in graph, it is not easy to parse each node one by one, so we do special tricks to parse the conv2d layer. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* convert_from_tensorflow.py: add option to dump graph for visualization in ↵Guo, Yejun2019-08-152-7/+12
| | | | | | | tensorboard Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* tools/target_dec_fuzzer: adjust pixel threshold for MSRLE, as it allows ↵Michael Niedermayer2019-08-151-0/+1
| | | | | | | | | | | coding gigantic images on tiny input Fixes: Timeout (12sec ->2sec) Fixes: 16125/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-5650846364205056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Print max_pixels and iterations at the endMichael Niedermayer2019-08-131-0/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/aviocat: add verbose mode.Nicolas George2019-08-131-2/+12
| | | | For now: print the input size as detected by AVSEEK_SIZE.
* tools/target_dec_fuzzer: Add missing breaksMichael Niedermayer2019-08-121-4/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Limit number off all pixels decodedMichael Niedermayer2019-08-121-1/+17
| | | | | | | | | | | | | This should reduces the number of uninteresting timeouts encountered A single threshold for all codecs did not work Fixes: 13979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5629872380051456 (14sec -> 4sec) Fixes: 14709/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5704215281795072 (179sec -> 7sec) Fixes: 16296/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HNM4_VIDEO_fuzzer-5756304521428992 (108sec -> 9sec) Fixes: 15620/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GIF_fuzzer-5657214435459072 (26sec -> 26ms) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/zmqsend: Avoid mem copy past the end of input bufferAndriy Gelman2019-08-091-1/+1
| | | | | | | | This patch avoids a read past the end of the input buffer in memcpy since the size of the received zmq message is recv_buf_size - 1. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: fix memleak of extradataMichael Niedermayer2019-07-311-1/+1
| | | | | | | | Fixes: memleak Fixes: 15535/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5692162424963072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* dnn: convert tf.pad to native model in python script, and load/execute it in ↵Guo, Yejun2019-07-291-5/+18
| | | | | | | | | the c code. since tf.pad is enabled, the conv2d(valid) changes back to its original behavior. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
* tools/target_dec_fuzzer: Free parser in case of avcodec_open2() failureMichael Niedermayer2019-07-211-0/+1
| | | | | | | | Fixes: memleak Fixes: part of 15529/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-5140143700180992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dem_fuzzer: ignore avformat_find_stream_info() failureMichael Niedermayer2019-07-191-2/+0
| | | | | | Such a failure should not be fatal and its worth testing this path too Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Remove redundant av_free()Michael Niedermayer2019-07-131-2/+0
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/python: add script to convert TensorFlow model (.pb) to native model ↵Guo, Yejun2019-07-012-0/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (.model) For example, given TensorFlow model file espcn.pb, to generate native model file espcn.model, just run: python convert.py espcn.pb In current implementation, the native model file is generated for specific dnn network with hard-code python scripts maintained out of ffmpeg. For example, srcnn network used by vf_sr is generated with https://github.com/HighVoltageRocknRoll/sr/blob/master/generate_header_and_model.py#L85 In this patch, the script is designed as a general solution which converts general TensorFlow model .pb file into .model file. The script now has some tricky to be compatible with current implemention, will be refined step by step. The script is also added into ffmpeg source tree. It is expected there will be many more patches and community needs the ownership of it. Another technical direction is to do the conversion in c/c++ code within ffmpeg source tree. While .pb file is organized with protocol buffers, it is not easy to do such work with tiny c/c++ code, see more discussion at http://ffmpeg.org/pipermail/ffmpeg-devel/2019-May/244496.html. So, choose the python script. Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
* tools/target_dec_fuzzer: Also fuzz extradataMichael Niedermayer2019-06-141-2/+13
| | | | | | This should improve coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Limit error concealment on pixels instead of just ↵Michael Niedermayer2019-06-051-1/+3
| | | | | | | | | | | | frames This should reduce the amount of timeout issues overall Fixes: Timeout (34->10sec) Fixes: 14682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5728608414334976 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools: Add fuzzer for demuxersMichael Niedermayer2019-05-312-0/+166
| | | | | | This is based on target_dec_fuzzer Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/crypto_bench: update the comment about build commandJun Zhao2019-05-091-1/+1
| | | | | | | commit cd62f9d557f missing the comment about build Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* tools/crypto_bench: check malloc fail before using itJun Zhao2019-05-091-3/+5
| | | | | | | | Need to check malloc fail before using it, so adjust the location in the code. Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* tools/target_dec_fate.list: add issues 4000 to 6000Michael Niedermayer2019-03-201-0/+64
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b'James Almer2019-03-101-1/+1
|\ | | | | | | | | | | | | * commit '7e5bde93a1e7641e1622814dafac0be3f413d79b': build: Rename OBJDIRS variable to OUTDIRS Merged-by: James Almer <jamrial@gmail.com>
| * build: Rename OBJDIRS variable to OUTDIRSDiego Biurrun2019-02-161-1/+1
| | | | | | | | These directories are not just for object files.
* | tools/target_dec_fate.list: Add testcases for #2000 to #4000Michael Niedermayer2019-03-011-0/+196
| | | | | | | | | | | | Testcases which return 403 currently are commented out Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate.sh: Add support for lines that are commentsMichael Niedermayer2019-03-011-0/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate.list: Extend selftests upto issue 2000Michael Niedermayer2019-02-091-0/+266
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate.list: add entries upto 1214Michael Niedermayer2019-01-281-0/+63
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate: Add entries from around issue 500 to 700Michael Niedermayer2019-01-041-0/+61
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools: add target_dec_fate.shMichael Niedermayer2018-12-292-0/+84
| | | | | | | | | | | | | | | | Script to download and test ossfuzz testcases This also includes a list of such testcases. I intend to subsequently fill this list with the cases we have fixed in the past Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | configure: Make sure libpostproc can be found if -rpath-link doesn't work.Carl Eugen Hoyos2018-12-281-1/+1
| | | | | | | | Solaris ld takes "-rpath-link=libpostproc" as indication to search in "-link=libpostproc".
* | tools/qt-faststart: Allow free atoms after moov atom.Carl Eugen Hoyos2018-08-011-1/+12
| |
* | tools/target_dec_fuzzer: set parser codec id to avoid assertion failureMichael Niedermayer2018-07-071-0/+1
| | | | | | | | | | | | | | | | Fixes: 9211/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GSM_fuzzer-5680396581732352 Fixes: assertion failure Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fuzzer: Fix parser_avctx memleak on error pathMichael Niedermayer2018-06-301-0/+1
| | | | | | | | | | | | | | Fixes: oss-fuzz issue 9195 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fuzzer: Also optionally fuzz with a parserMichael Niedermayer2018-06-281-5/+37
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qt-faststart - print errors to stderrerankor2018-06-151-17/+17
| | | | | | | | | | | | instead of stdout Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qt-faststart - stco offset bug fixerankor2018-06-131-55/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the last offsets in the stco atom are close to 4GB, the addition of the moov atom size can overflow, causing corruption near the end of the mp4 file. this patch upgrades all stco atoms to co64 when such an edge case is detected. in order to accomplish this, the implementation was changed to walk the atom tree, instead of searching for the strings 'stco'/'co64'. this was required since when an stco atom is changed to co64, its size changes, and the sizes of all containing atoms (moov, trak, etc.) have to be updated as well. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qt-faststart: add validation on ftyp atom sizeerankor2018-06-131-0/+6
| | | | | | | | | | | | avoid trying to allocate an unreasonably sized buffer on corrupt files Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/crypto_bench: add missing RC4 implementation from tomcryptJames Almer2018-05-301-4/+11
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | tools/crypto_bench: add missing RC4 implementation from gcryptJames Almer2018-05-301-8/+10
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | tools/crypto_bench: add support for mbedcryptoJames Almer2018-05-301-3/+121
| | | | | | | | | | | | Requires mbed TLS 2.7.0 or newer Signed-off-by: James Almer <jamrial@gmail.com>