summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
...
* tools/target_dec_fuzzer: Adjust maxpixels for indeo4Michael Niedermayer2019-08-29
| | | | | | | | 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-29
| | | | | | | | 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-29
| | | | | | | | | | 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-26
| | | | | | | | | | | | | 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-26
| | | | | | | | | 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-23
| | | | | | 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-23
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* convert_from_tensorflow.py: support conv2d with dilationGuo, Yejun2019-08-15
| | | | | | | | | 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-15
| | | | | | | 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-15
| | | | | | | | | | | 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-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/aviocat: add verbose mode.Nicolas George2019-08-13
| | | | For now: print the input size as detected by AVSEEK_SIZE.
* tools/target_dec_fuzzer: Add missing breaksMichael Niedermayer2019-08-12
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/target_dec_fuzzer: Limit number off all pixels decodedMichael Niedermayer2019-08-12
| | | | | | | | | | | | | 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-09
| | | | | | | | 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-31
| | | | | | | | 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-29
| | | | | | | | | 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-21
| | | | | | | | 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-19
| | | | | | 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-13
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* tools/python: add script to convert TensorFlow model (.pb) to native model ↵Guo, Yejun2019-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (.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-14
| | | | | | 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-05
| | | | | | | | | | | | 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-31
| | | | | | 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-09
| | | | | | | 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-09
| | | | | | | | 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-20
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '7e5bde93a1e7641e1622814dafac0be3f413d79b'James Almer2019-03-10
|\ | | | | | | | | | | | | * commit '7e5bde93a1e7641e1622814dafac0be3f413d79b': build: Rename OBJDIRS variable to OUTDIRS Merged-by: James Almer <jamrial@gmail.com>
| * build: Rename OBJDIRS variable to OUTDIRSDiego Biurrun2019-02-16
| | | | | | | | These directories are not just for object files.
* | tools/target_dec_fate.list: Add testcases for #2000 to #4000Michael Niedermayer2019-03-01
| | | | | | | | | | | | 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-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate.list: Extend selftests upto issue 2000Michael Niedermayer2019-02-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate.list: add entries upto 1214Michael Niedermayer2019-01-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools/target_dec_fate: Add entries from around issue 500 to 700Michael Niedermayer2019-01-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | tools: add target_dec_fate.shMichael Niedermayer2018-12-29
| | | | | | | | | | | | | | | | 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-28
| | | | | | | | 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-01
| |
* | tools/target_dec_fuzzer: set parser codec id to avoid assertion failureMichael Niedermayer2018-07-07
| | | | | | | | | | | | | | | | 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-30
| | | | | | | | | | | | | | 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-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qt-faststart - print errors to stderrerankor2018-06-15
| | | | | | | | | | | | instead of stdout Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | qt-faststart - stco offset bug fixerankor2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13
| | | | | | | | | | | | 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-30
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | tools/crypto_bench: add missing RC4 implementation from gcryptJames Almer2018-05-30
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | tools/crypto_bench: add support for mbedcryptoJames Almer2018-05-30
| | | | | | | | | | | | Requires mbed TLS 2.7.0 or newer Signed-off-by: James Almer <jamrial@gmail.com>
* | qt-faststart - stricter input validationserankor2018-05-30
| | | | | | | | | | | | | | | | | | 1. validate the moov size before checking for cmov atom 2. avoid performing arithmetic operations on unvalidated numbers 3. verify the stco/co64 offset count does not overflow the stco/co64 atom (not only the moov atom) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/allcodecs: Provide empty codec_list in allcodecs when ossfuzz is usedMichael Niedermayer2018-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last workaround is not sufficient to make oss fuzz work with the iterate API as it did not provide a FFmpeg that external libs can be linked to. This patch does not fully restore the pre iterate functionality. My attempts to do this have so far failed. The problem with this solution is that it renders the fuzzers virtual system ffmpeg (libs) non functional. Which differs from a real system compared to the virtual system tested by the fuzzer. It should theoretically not matter as the system ffmpeg wouldnt be used. But with more cases being fuzzed we likely will hit a case where a external lib is involved and it does matter ... Working around this may be possible with weak symbols but so far my attempts failed Alternatively multiple ffmpeg could be built, this becomes messy though quickly as they need to be all linked together. That is we need a FFmpeg that has the iterate API modified so it can work with the resources available to ossfuzz. And at the same time we need a ffmpeg that has its full functionality for any external libs which use ffmpeg and are used by ffmpeg. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: Disable new iterate API for ossfuzzMichael Niedermayer2018-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few days ago ossfuzz stoped testing new FFmpeg as it run out of diskspacee https://oss-fuzz-build-logs.storage.googleapis.com/index.html An alternative would be to revert the API. This changes for example -rwxr-x--- 1 michael michael 144803654 May 14 12:54 tools/target_dec_ac3_fixed_fuzzer* to -rwxr-x--- 1 michael michael 30333852 May 14 12:51 tools/target_dec_ac3_fixed_fuzzer* Which should massively decrease space requirements Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | | | | | | | | avdevice_register_all() is still required to register devices into lavf (this is required due to lavd being somewhat of a hack). Signed-off-by: Josh de Kock <josh@itanimul.li>