aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dnn_backend_native_layer_mathunary: add cos supportTing Fu2020-06-114-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be tested with the model generated with below python scripy 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') x1 = tf.multiply(x, 1.5) x2 = tf.cos(x1) y = tf.identity(x2, name='dnn_out') 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> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn-layer-mathunary-test: add unit test for sinTing Fu2020-06-111-0/+4
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn_backend_native_layer_mathunary: add sin supportTing Fu2020-06-114-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can be tested with the model file generated with below python scripy: 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') x1 = tf.multiply(x, 3.14) x2 = tf.sin(x1) y = tf.identity(x2, name='dnn_out') 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> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf()Andreas Rheinhardt2020-06-111-2/+2
| | | | | | | | | | | | | | | | | Two kinds of errors can happen when working with dynamic buffers: (Re)allocation errors or truncation errors (one has to truncate the buffer to a size of INT_MAX because avio_close_dyn_buf() and avio_get_dyn_buf() both return an int). Right now, avio_get_dyn_buf() returns an empty buffer in either case. But given that avio_get_dyn_buf() does not destroy the dynamic buffer, one can return the buffer in case of truncation and let the user check the error flags and decide for himself instead of hardcoding a single way to proceed in case of truncation. (This actually restores the behaviour from before commit 163bb9ac0af495a5cb95441bdb5c02170440d28c.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Return better error codesAndreas Rheinhardt2020-06-111-6/+8
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Stop restricting dynamic buffer sizes to INT_MAX/2Andreas Rheinhardt2020-06-111-1/+3
| | | | | | | | This has originally been done in 568e18b15e2ddf494fd8926707d34ca08c8edce5 as a precaution against integer overflows, but it is actually easy to support the full range of int without overflows. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Simplify dyn_buf_write() a bitAndreas Rheinhardt2020-06-111-9/+6
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/aviobuf: Don't check for overflow after it happenedAndreas Rheinhardt2020-06-111-1/+1
| | | | | | | | If adding two ints overflows, it doesn't matter whether the result will be stored in an unsigned or not; and checking afterwards does not make it retroactively defined. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* AVFormatContext: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+64
|
* AVIOContext: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+12
|
* URLContext: switch to child_class_iterate()Anton Khirnov2020-06-103-0/+23
|
* vf_spp: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+12
|
* vf_scale: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+15
|
* framesync: switch to child_class_iterate()Anton Khirnov2020-06-102-0/+10
|
* avfilter: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+16
|
* af_resample: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+12
|
* af_aresample: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+12
|
* AVCodecContext: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+15
|
* bsf: switch to child_class_iterate()Anton Khirnov2020-06-103-0/+21
|
* fftools: switch to the new child class iteration APIAnton Khirnov2020-06-101-2/+3
|
* lavu/opt: add a more general child class iteration APIAnton Khirnov2020-06-105-12/+71
| | | | | | | Use opaque iteration state instead of the previous child class. This mirrors similar changes done in lavf/lavc. Deprecate the av_opt_child_class_next() API.
* lavf/dump: schedule use of deprecated API for removalAnton Khirnov2020-06-101-0/+14
|
* Remove unnecessary use of avcodec_close().Anton Khirnov2020-06-109-29/+6
| | | | | Replace it with avcodec_free_context() or drop it completely as appropriate.
* avformat/hls: check segment duration value of EXTINFSteven Liu2020-06-101-2/+7
| | | | | | | fix ticket: 8673 set the default EXTINF duration to 1ms if duration is smaller than 1ms Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hls: check output string is usable of ff_make_absolute_urlSteven Liu2020-06-101-0/+23
| | | | | | | fix ticket: 8688 should goto failed workflow if cannot get usable string by ff_make_absolute_url Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/url: check return value of strchrSteven Liu2020-06-101-0/+5
| | | | | | | fix ticket: 8687 workflow should return if there have no value of strchr Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* RELEASE: We are after the 4.3 branch point, update for thatMichael Niedermayer2020-06-101-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snow: ensure current_picture is writable before modifying its dataJames Almer2020-06-091-1/+12
| | | | | | | | current_picture was not writable here because a reference existed in at least avctx->coded_frame, and potentially elsewhere if the caller created new ones from it. Signed-off-by: James Almer <jamrial@gmail.com>
* doc/utils: document the "s", "ms" and "us" suffixes for durationsMoritz Barsnick2020-06-091-2/+4
| | | | | | | These suffixes were introduced in 61c972384d311508d07f9360d196909e27195655 and completed in 8218249f1f04de65904f58519bde21948e5a0783. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* doc/ffmpeg: remove reference to deprecated optionMoritz Barsnick2020-06-091-2/+2
| | | | | | | | | The "-deinterlace" was deprecated since d7edd35, over eight years ago. Refer to deinterlacing filters instead. Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
* pthread_frame: change the way delay is setAnton Khirnov2020-06-091-1/+5
| | | | | | | | | It is a constant known at codec init, so set it in ff_frame_thread_init(). Also, only set it for video, since the meaning of this field is not well-defined for audio with frame threading. Fixes availability of delay in callbacks invoked from the per-thread contexts after 1f4cf92cfbd3accbae582ac63126ed5570ddfd37.
* avformat/mpegts: add constants for MPEG-TS transport stream identifiersBrad Hards2020-06-092-8/+15
| | | | | Signed-off-by: Brad Hards <bradh@frogmouth.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/fifo: add timeshift option to delay outputMarton Balint2020-06-093-2/+64
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Changelog: add next marker back after branching 4.3Michael Niedermayer2020-06-081-0/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions after branching 4.3n4.4-devMichael Niedermayer2020-06-088-8/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Bump minor versions to separate 4.3 from masterMichael Niedermayer2020-06-088-10/+10
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Changelog: Add 4.3 cut markerMichael Niedermayer2020-06-081-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc/APIchanges: Fill in missing valuesMichael Niedermayer2020-06-081-30/+30
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."Michael Niedermayer2020-06-082-1/+5
| | | | | | | | | 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.
* avcodec/mpeg12dec: Fix got_outputMichael Niedermayer2020-06-081-1/+1
| | | | | | | | | | | | | | | | This makes got_output consistent with the code in slice_end() which sets the output in slice_end() if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) { int ret = av_frame_ref(pict, s->current_picture_ptr->f); ... } else { Fixes: assertion failure Fixes: 22178/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG1VIDEO_fuzzer-5664234440753152 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: enable mjpeg for tiff or tdscMichael Niedermayer2020-06-082-0/+7
| | | | | | This is needed for fuzzing tiff/tdsc and should increase coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hcadec: Check or bound indexesMichael Niedermayer2020-06-081-2/+2
| | | | | | | | | | | | | This causes indexes into scale_conversion_table to wrap around, alternatively they could be clipped, the table be enlarged or we can error out. I have not found a document that specifies what is the correct way to handle this Fixes: out of array access Fixes: 21727/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5752477891952640.fuzz Fixes: 22438/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCA_fuzzer-5640717790871552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pnm: Check scaleMichael Niedermayer2020-06-081-1/+1
| | | | | | | | Fixes: division by zero Fixes: 22974/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PFM_fuzzer-6270027077779456 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: Implement AVSEEK_SIZEMichael Niedermayer2020-06-081-0/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/4xm: Cleanup on GET_LIST_HEADER() failureMichael Niedermayer2020-06-081-3/+5
| | | | | | | | | Fixes: memleak Fixes: 23142/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5932860820422656 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hevc: move SliceHeader and LongTermRPS back to hevcdec.hAnton Khirnov2020-06-082-84/+84
| | | | | | | They are no longer necessary there and have nothing to do with parameter sets, so do not belong in hevc_ps.h. This effectively reverts 4aaace8b25.
* hevc_parser: drop the use of SliceHeaderAnton Khirnov2020-06-081-27/+30
| | | | | It is only used to store a few local variables within one function, which is better accomplished by just declaring them on stack explicitly.
* hevc_refs: reduce code duplication in find_ref_idx()Anton Khirnov2020-06-081-16/+6
|
* avcodec/v4l2_m2m_enc: Avoid ;;Andreas Rheinhardt2020-06-081-1/+1
| | | | | | | | | | | | | Inside a function, the second ; in a double ;; is a null statement, but outside of functions a double ;; is simply invalid C that compilers happen to accept. v4l2_m2m_enc.c contained several ;; as a result of macro-expansion. So change the underlying macro so that it doesn't happen any longer. This fixes warnings when compiling with -pedantic: "ISO C does not allow extra ‘;’ outside of a function". Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ac3dec_fixed: Remove some temporary variables from scale_coefs()Michael Niedermayer2020-06-081-22/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>