Commit Graph

98130 Commits

Author SHA1 Message Date
Limin Wang cb14c6ff8f avformat/rtspdec: av_dict_set() -> av_dict_set_int()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-02 22:25:11 +08:00
rcombs fb17ba86a8 compat/cuda/ptx2c: remove shell loop; fix BSD sed compat
This fixes building on macOS, and improves build times dramatically there
2020-06-01 22:10:41 -05:00
Michael Niedermayer 782865bf30 avcodec/h264dec: Disable forced small_padding on flag2 fast
Fixes: 20978/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H264_fuzzer-5746381832847360

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-02 00:02:04 +02:00
Michael Niedermayer 4b2248594c avcodec/jpeg2000dec: clear pointer which become stale in get_ppt()
Fixes: use after free
Fixes: 22484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5671488765296640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-01 23:32:28 +02:00
Zane van Iperen 01fd93e2ac fate: add adpcm_ima_ssi encoding test
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-01 23:32:28 +02:00
Andriy Gelman 6cd198860d fftools/ffmpeg: update text requesting samples
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
2020-06-01 14:39:52 -04:00
Roman Arzumanyan 0842fd2c25 avcodec/nvenc: zero avg and max bitrate in CQ mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-06-01 19:23:47 +02:00
Jun Zhao 7f76f20fa0 checkasm: sw_rgb: Fix mixed declaration and code
Fix mixed declaration and code.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-06-01 23:28:07 +08:00
Przemysław Sobala 2a9ffd89fc avformat/dashenc: use AVStream timebase when computing missing bitrate 2020-06-01 18:58:04 +05:30
Andreas Rheinhardt 317b722c51 avfilter/vf_lut3d: Fix mixed declaration and code
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-01 15:21:40 +02:00
Andreas Rheinhardt f02b1b1222 avcodec/encode: Remove ff_alloc_packet
It is no longer used anymore.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-01 14:52:26 +02:00
Limin Wang dd76226842 avcodec/mpeg12enc: support mpeg2 encoder const profile
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-01 07:05:32 +08:00
Brad Hards b8d6d9376c avformat/mpegtsenc: set stream_id correctly based on KLV profile selected
Previously we always set STREAM_TYPE_PRIVATE_DATA, and that remains
the default value.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-31 18:43:02 +02:00
Brad Hards bbc0eb7fcb avcodec: add constants for KLV pseudo-profile.
There are two different ways KLV is used in MISB specs - sync and async.
The corresponding text (in ST1401) says:

ISO/IEC 13818-1 Table-34 defines a stream_type = 0x15 for “Metadata carried in PES packets,”
and Table 2-22 defines a stream_id = 0xFC for “metadata stream.”

and

In ISO/IEC 13818-1, Table-34 defines a stream_type = 0x06 for “PES packets containing private
data,” and Table 2-22 defines a stream_id = 0xBD for “private_stream_1.”

These constants allow us to distinguish the two cases, as codec profiles.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-05-31 18:31:54 +02:00
Andreas Rheinhardt a886785018 avcodec/anm: Don't unnecessarily use context variables
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-31 13:13:52 +02:00
Andreas Rheinhardt 45c3502266 avcodec/anm: Check extradata length before allocating frame
Then one doesn't need to free the frame in case the length turns out to
be insufficient.

Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-31 12:17:06 +02:00
Zane van Iperen 4aa07d1a74 avformat: add kvag muxer
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-31 00:55:12 +02:00
Mark Reid a1221b96d8 avfilter/vf_lut3d: prelut support for 3d cinespace luts
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-31 00:55:12 +02:00
Dale Curtis 57564a2cfc avformat/oggparsetheora: Don't update start time when lastpts is AV_NOPTS_VALUE.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-31 00:52:08 +02:00
Paul B Mahol 1329db8cfb avfilter/af_aiir: simplify polynomial evaluation 2020-05-30 18:04:14 +02:00
Paul B Mahol aac16abd92 avfilter/af_aiir: use correct size when allocating in zp2tf 2020-05-30 18:04:14 +02:00
Paul B Mahol 726dbc57f8 avfilter: add dblur video filter 2020-05-30 18:04:14 +02:00
Paul B Mahol d49db99ce2 avcodec: add PFM image decoder 2020-05-30 18:02:55 +02:00
Jun Zhao 4391289609 lavf/utils: fix start_time/duration dump if it is AV_NOPTS_VALUE
e,g: the command:
ffprobe -show_format -i fate-suite/aac/foo.aac -loglevel 99 will
dump the trace message as follow when start_time is AV_NOPTS_VALUE
[aac @ 0x55bf8e1f3dc0] stream 0: start_time: -326791809695.818 duration: 2.174
[aac @ 0x55bf8e1f3dc0] format: start_time: -9223372036854.775 duration: 2.174 bitrate=120 kb/s

after this fix, will dump the start_time with "NOPTS".

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-30 19:07:06 +08:00
Jun Zhao 018cd437f8 lavfi/aiir: Refine the pad/vpad related operation
move the pad/vpad related operation with more natural
coding style.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-30 19:02:43 +08:00
Jun Zhao ff8329a730 lavfi/afir: fix vpad.name leak
Fix vpad.name leak in error path, move the vpad related operation
only if enabled show IR frequency response.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-30 19:02:34 +08:00
Limin Wang 77e15f01fb avutil/attributes: Fix too many warning: false is not defined [-Wundef]
Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-30 17:29:23 +08:00
Paul B Mahol 6485b54477 Revert "avfilter/af_aiir: move response drawing as last step"
This reverts commit ca7095a907.
2020-05-30 10:05:19 +02:00
Paul B Mahol 3fc7b01c52 avfilter/af_aiir: improve response calculation with zp coefficients 2020-05-30 10:05:19 +02:00
Paul B Mahol e2e8121eaa avfilter/af_aiir: add S-plane support 2020-05-30 10:05:19 +02:00
Paul B Mahol 327b52412d avfilter/af_aiir: make it clear that transfer function is digital one 2020-05-30 10:05:19 +02:00
Paul B Mahol 1206a10d9c avfilter/af_biquads: implement 1st order allpass 2020-05-30 09:57:04 +02:00
Dale Curtis f3068be15b avformat/utils: Use av_sat_add64() when updating start_time by skip_samples.
Avoids overflow from fuzzed skip_samples values.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-29 19:40:36 +02:00
Dale Curtis fc54db3265 Use av_sat_sub64() when updating pts by duration.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-29 19:40:36 +02:00
Michael Niedermayer 9d24f293e7 avcodec/adpcm_data: extend ff_adpcm_ima_cunning_index_table
Fixes: overread by 1
Fixes: 21880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_CUNNING_fuzzer-5717917221257216.fuzz

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-05-29 19:40:36 +02:00
Lynne 83fa39eb06
lavfi/vulkan: use av_get_random_seed instead of rand
We need at least a few bits of entropy to determine the start index of each
queue, in order to let filters run in parallel as much as possible, and
rand() is not thread safe and disrupts any external API's usage of rand,
so instead replace it with av_get_random_seed.
While it has more overhead than rand, we only run it once per filter upon init.
2020-05-29 13:10:58 +01:00
Andreas Rheinhardt c0f01eaf12 avformat/oggdec: Avoid duplicating buffer when adding side-data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 12:04:26 +02:00
Andreas Rheinhardt 9fee37c56e avformat/img2dec: Avoid duplicating buffer when adding side-data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 12:03:28 +02:00
Andreas Rheinhardt be22f97332 avformat/concatdec: Avoid duplicating buffer when adding side-data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 12:01:22 +02:00
Andreas Rheinhardt ed9bbcff6f avformat/flvdec: Avoid duplicating extradata when adding side-data
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 11:59:56 +02:00
Andreas Rheinhardt 6c70f89813 avformat/hlsenc, hlsplaylist: Cosmetics
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 11:18:53 +02:00
Andreas Rheinhardt 4fbcb69707 avformat/hlsenc: Avoid duplicating strings when parsing
Up until now, the HLS muxer uses av_strtok() to split an input string
controlling parameters of the VariantStreams and then duplicates
parts of this string containing parameters such as the language or the
name of the VariantStream. But these parts are proper zero-terminated
strings of their own that are never modified lateron, so one can simply
use the substring as-is without creating a copy. This commit implements
this.

The same also happened for the string controlling the closed caption
groups.

Furthermore, add const to indicate that the pointers to these substrings
are not used to modify them and also to indicate that these strings are
not allocated on their own.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 11:18:53 +02:00
Andreas Rheinhardt c1638bfae1 avformat/hlsenc: Don't unnecessarily duplicate baseurl string
Up until now, the HLS muxer duplicated a string for every VariantStream,
although neither the original nor the copies are ever modified. So use
the original directly and stop copying.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 11:18:53 +02:00
Andreas Rheinhardt c6e73ad2b7 avformat/hlsplaylist: Add const where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-28 11:18:53 +02:00
Jun Zhao ab42db9bed lavf/mpegtsenc: misc style fixes
commit 32aeba1275 missed coding style fix.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-28 15:56:21 +08:00
Jun Zhao b63f502911 lavc/libx264: misc style fixes
commit 4ed3a01d71 missed coding style fix.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-05-28 15:56:06 +08:00
Limin Wang 3c346298f9 doc: add dia_size option documentation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-28 12:42:41 +08:00
Ting Fu c51b46e5dd dnn-layer-mathunary-test: add unit test for abs
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-05-28 11:04:21 +08:00
Ting Fu f73cc61bf5 dnn_backend_native_layer_mathunary: add abs support
more math unary operations will be added here

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.subtract(x, 0.5)
x2 = tf.abs(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>
2020-05-28 11:04:21 +08:00
James Almer b6d6597bef avcodec/decode: fix decoding when frames are allocated using AVHWAccel.alloc_frame()
Regression since a1133db30e

Found-by: comex <comexk@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-27 23:10:04 -03:00