summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avcodec/mpeg12dec: switch to AVBufferRef buffer for a53 captionLimin Wang2020-06-26
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/avc, mxfenc: Avoid allocation of H264 SPS structure, fix memleakAndreas Rheinhardt2020-06-26
| | | | | | | | | | | | | | | | | | | | | | Up until now, ff_avc_decode_sps would parse a SPS and return some properties from it in a freshly allocated structure. Yet said structure is very small and completely internal to libavformat, so there is no reason to use the heap for it. This commit therefore changes the function to return an int and to modify a caller-provided structure. This will also allow ff_avc_decode_sps to return better error codes in the future. It also fixes a memleak in mxfenc: If a packet contained multiple SPS, only the SPS structure belonging to the last SPS would be freed, the other ones would leak when the pointer is overwritten to point to the new SPS structure. Of course, without allocations there are no leaks. This is Coverity issue #1445194. Furthermore, the SPS structure has been renamed from H264SequenceParameterSet to H264SPS in order to avoid overlong lines. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avc: Don't use ff_ prefix for static functionAndreas Rheinhardt2020-06-26
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webvttdec: Accept \r as newlineAndreas Rheinhardt2020-06-26
| | | | | | | | | | | | | After parsing the end timestamp of a WebVTT cue block, the current code skips everything after the start of the timestamp that is not a \t, ' ' or \n and treats what is next as the start of a WebVTT cue settings list. Yet if there is no such list, but a single \r, this will skip a part of the cue payload (namely everything until the first occurence of \t, ' ' or \n) and treat what has not been skipped as the beginning of the WebVTT cue settings list that extends until the next \r or \n (or the end). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/av1: Avoid using dynamic buffer when assembling av1cAndreas Rheinhardt2020-06-26
| | | | | | | | | Given that AV1 only has exactly one sequence header, it is unnecessary to copy the content of said sequence header into an intermediate dynamic buffer; instead the sequence header can be copied from where it is in the input buffer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: add AV1 profiles to profile.hJames Almer2020-06-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_h265: set default VUI parameters when ↵James Almer2020-06-25
| | | | | | | | | | vui_parameters_present_flag is false Based on cbs_h264 code. Should fix ticket #8752. Signed-off-by: James Almer <jamrial@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>
* avformat/microdvddec: skip malformed lines without frame number.Michael Niedermayer2020-06-25
| | | | | | | | | Fixes: signed integer overflow: 1 - -9223372036854775808 cannot be represented in type 'long' Fixes: 23490/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5133490093031424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/zoompan: add in_time variableexwm2020-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the zoompan filter exposes a 'time' variable (missing from docs) for use in the 'zoom', 'x', and 'y' expressions. This variable is perhaps better named 'out_time' as it represents the timestamp in seconds of each output frame produced by zoompan. This patch adds aliases 'out_time' and 'ot' for 'time'. This patch also adds an 'in_time' (alias 'it') variable that provides access to the timestamp in seconds of each input frame to the zoompan filter. This helps to design zoompan filters that depend on the input video timestamps. For example, it makes it easy to zoom in instantly for only some portion of a video. Both the 'out_time' and 'in_time' variables have been added in the documentation for zoompan. Example usage of 'in_time' in the zoompan filter to zoom in 2x for the first second of the input video and 1x for the rest: zoompan=z='if(between(in_time,0,1),2,1):d=1' V2: Fix zoompan filter documentation stating that the time variable would be NAN if the input timestamp is unknown. V3: Add 'it' alias for 'in_time. Add 'out_time' and 'ot' aliases for 'time'. Minor corrections to zoompan docs. Signed-off-by: exwm <thighsman@protonmail.com>
* avformat/libamqp: add option delivery_modeLevis Florian2020-06-24
| | | | | Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Levis Florian <levis.florian@gmail.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_backend_native_layer_mathunary: add atan supportTing Fu2020-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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') x1 = tf.atan(x) x2 = tf.divide(x1, 3.1416/4) # pi/4 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-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>
* dnn_backend_native_layer_mathunary: add acos supportTing Fu2020-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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') x1 = tf.acos(x) x2 = tf.divide(x1, 3.1416/2) # pi/2 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-math-unary-test: add unit test for asinTing Fu2020-06-25
| | | | | Signed-off-by: Ting Fu <ting.fu@intel.com> Signed-off-by: Guo Yejun <yejun.guo@intel.com>
* dnn_backend_native_layer_mathunary: add asin supportTing Fu2020-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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') x1 = tf.asin(x) x2 = tf.divide(x1, 3.1416/2) # pi/2 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/smoothstreaming: Forward errors from copying white/blacklistsAndreas Rheinhardt2020-06-24
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_av1: Simplify writing uvlc elementsAndreas Rheinhardt2020-06-24
| | | | | | | There is no reason to special-case writing a value of zero as uvlc element as the generic code is perfectly capable of doing so. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_av1: Fix writing uvlc numbers >= INT_MAXAndreas Rheinhardt2020-06-24
| | | | | | | | | | Fixes: assertion failure Fixes: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 23264/clusterfuzz-testcase-minimized-ffmpeg_BSF_AV1_METADATA_fuzzer-6308429248593920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/hevc: export chroma sample locationHendrik Leppkes2020-06-24
|
* avfilter/vf_v360: do not ignore return value of allocate_plane()Paul B Mahol2020-06-23
|
* avcodec/ccaption_dec: add support for background colorsPaul B Mahol2020-06-23
|
* lavc: Lower MediaFoundation audio encoder priority.Carl Eugen Hoyos2020-06-23
| | | | | The actual encoders may not be available. Fixes ticket #8699.
* doc/general: mention BT20 decoderPaul B Mahol2020-06-23
|
* doc/general: merge dupe ProRes entriesPaul B Mahol2020-06-23
| | | | While here add missing fourcc.
* doc/general: mention NotchLCPaul B Mahol2020-06-23
|
* avfilter/vf_v360: add orthographic projection supportPaul B Mahol2020-06-23
|
* avfilters/vf_v360: add equisolid projection supportPaul B Mahol2020-06-22
|
* avfilter/vf_showpalette: Don't pretend disp_palette can failAndreas Rheinhardt2020-06-22
| | | | | | | | | It can't fail, yet it returns an int and other code checks whether it failed; yet if it did fail, an AVFrame would leak. One could of course add an av_frame_free for this (that compilers could optimize away), yet it is easier to simply stop pretending that disp_palette could fail. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/sccdec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/pjsdec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mpl2dec: Avoid variable that is always zeroAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: CosmeticsAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Avoid allocation when reading ddts atomAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Use ffio_read_size where appropriateAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Avoid allocation+copy when moving extradataAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Read attached pics directly into st->attached_picAndreas Rheinhardt2020-06-22
| | | | | | | | | | Given that av_get_packet returns a blank packet on error, the only difference to the current approach (that uses intermediate AVPackets on the stack) is that st->attached_pic will be properly initialized on error (i.e. the timestamps are AV_NOPTS_VALUE) whereas right now st->attached_pic is only zeroed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mov: Check earlier whether reel_name string is emptyAndreas Rheinhardt2020-06-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec, avformat: Remove unnecessary initializations of side data sizeAndreas Rheinhardt2020-06-22
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avformat: Improve documentation of av_stream_get_side_dataAndreas Rheinhardt2020-06-22
| | | | | | | | Document that it also sets the size in case the desired side data is absent (if the pointer has been supplied). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/packet: Improve documentation of av_packet_get_side_dataAndreas Rheinhardt2020-06-22
| | | | | | | | Document that it also sets the size in case the desired side data is absent (if the pointer has been supplied). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/flvdec: CosmeticsAndreas Rheinhardt2020-06-22
| | | | | Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/nellymoserdec: Don't use invalid AVPacketSideDataTypeAndreas Rheinhardt2020-06-22
| | | | | | | | | | | | | | | | | | | Commits 957a593cd95b15a5dcb2f50306fbac59f09d8e9e and 11828b8885cc1d87ffc7b1b4bbe642ce9720b194 made the flv demuxer export a certain flag as side data to be used by the nellymoser decoder for mid-stream sample rate changes. It used a custom side data type 'F' that was never officially documented. Yet since 2215c39e94e01f57b3191a29e0e51d7e230daf49 (merged in commit 52c522c72090233edeeb0486a9bd8bee925a710a) this information is exported via the properly documented AV_PKT_DATA_PARAM_CHANGE side data. The merge commit therefore stopped exporting the 'F' sidedata; yet the changes in the Nellymoser decoder (which are now dead code (and would become dangerous if lots of new side data types were added)) have not been removed. This commit does this. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/dashenc: Calculate average bitrate for adaptation sets in static ↵Przemysław Sobala2020-06-22
| | | | | | | | | manifest If stream's bitrate is not specified: - for static manifest: an average bitrate will be calculated and used, - for dynamic manifest: first segment's bitrate will be calculated and used, as before, for bandwidth setting in adaptation sets.
* Revert "avformat/dashenc: use AVStream timebase when computing missing bitrate"Przemysław Sobala2020-06-22
| | | | This reverts commit 2a9ffd89fcb09bd69b2130da039ad2caba79cf33 as duration is always in AV_TIME_BASE units
* avfilter/af_ladspa: check return value of getenv()Paul B Mahol2020-06-21
|
* avfilter/af_ladspa: add latency compensationPaul B Mahol2020-06-21
|
* avfilter/af_ladspa: check another directory for pluginsPaul B Mahol2020-06-21
|
* avcodec/hcadec: get intensity from correct channelsummertriangle.dev@gmail.com2020-06-21
| | | | | | | Fixes an issue with one output channel being slightly louder than the other. The output now matches other public HCA decoders. Signed-off-by: t <summertriangle.dev@gmail.com>