1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

98132 Commits

Author SHA1 Message Date
Fei Wang
b09fb030c1 lavu/pix_fmt: add new pixel format x2rgb10
The format is packed RGB with each channel 10 bits available and
include 2 bits unused.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2020-06-12 17:56:15 +01:00
Steven Liu
38737b3d4e mailmap: add entry for myself 2020-06-12 14:30:02 +08:00
Michael Niedermayer
0b182ff66d tools/target_dec_fuzzer: Adjust threshold for lagarith
Fixes: Timeout (3minute 49 sec -> 3sec)
Fixes: 22020/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5708544679870464

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-11 14:59:04 +02:00
Michael Niedermayer
48de8f5816 avcodec/mpeg12dec: remove outdated comments
Found-by: Kieran
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-11 13:49:54 +02:00
Michael Niedermayer
38fbf33c72 avcodec/snowdec: Avoid integer overflow with huge qlog
Fixes: integer overflow
Fixes: 22285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5682428762128384

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-11 13:49:54 +02:00
Michael Niedermayer
d7a2311a2c avcodec/movtextdec: Fix shift overflows in mov_text_init()
Fixes: left shift of 243 by 24 places cannot be represented in type 'int'
Fixes: 22716/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOVTEXT_fuzzer-5704263425851392

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-11 13:49:54 +02:00
Michael Niedermayer
d3747f4431 tools/target_dem_fuzzer: Use file extensions listed in input formats
This should make it easier for the fuzzer to fuzz formats being detected only by
file extension and thus increase coverage

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-11 13:49:54 +02:00
Limin Wang
bc8ab084fb avutil: add AV_FRAME_DATA_SEI_UNREGISTERED side data type
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-06-11 13:06:31 +08:00
Ting Fu
3ac2f7ccd7 dnn-layer-mathunary-test: add unit test for tan
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Ting Fu
22d0860c13 dnn_backend_native_layer_mathunary: add tan support
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, 0.78)
x2 = tf.tan(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-06-11 11:10:51 +08:00
Ting Fu
dd3fe3e77c dnn-layer-mathunary-test: add unit test for cos
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Ting Fu
88fb494f42 dnn_backend_native_layer_mathunary: add cos support
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>
2020-06-11 11:10:51 +08:00
Ting Fu
3f7c5a375b dnn-layer-mathunary-test: add unit test for sin
Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
2020-06-11 11:10:51 +08:00
Ting Fu
0b6d3f0d83 dnn_backend_native_layer_mathunary: add sin support
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>
2020-06-11 11:10:51 +08:00
Andreas Rheinhardt
c33e56c7a6 avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf()
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>
2020-06-11 04:03:38 +02:00
Andreas Rheinhardt
7be9b0bb38 avformat/aviobuf: Return better error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-11 03:29:22 +02:00
Andreas Rheinhardt
fa0bc627c5 avformat/aviobuf: Stop restricting dynamic buffer sizes to INT_MAX/2
This has originally been done in 568e18b15e
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>
2020-06-11 03:09:56 +02:00
Andreas Rheinhardt
88d5ae068f avformat/aviobuf: Simplify dyn_buf_write() a bit
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-06-11 02:01:56 +02:00
Andreas Rheinhardt
28a078eded avformat/aviobuf: Don't check for overflow after it happened
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>
2020-06-11 01:18:54 +02:00
Anton Khirnov
7aa7d68971 AVFormatContext: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
2cbd544519 AVIOContext: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
43ed2b86d6 URLContext: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
c7d8d8d8d9 vf_spp: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
6bfac4ee6f vf_scale: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
344149cf01 framesync: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
aba98de6b8 avfilter: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
342230a537 af_resample: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
3dd324427a af_aresample: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
851e0dfe29 AVCodecContext: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
c0d6eaca50 bsf: switch to child_class_iterate() 2020-06-10 12:36:44 +02:00
Anton Khirnov
e0fbb6cf2b fftools: switch to the new child class iteration API 2020-06-10 12:36:44 +02:00
Anton Khirnov
1b4a98b029 lavu/opt: add a more general child class iteration API
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.
2020-06-10 12:36:42 +02:00
Anton Khirnov
202e06870e lavf/dump: schedule use of deprecated API for removal 2020-06-10 11:35:17 +02:00
Anton Khirnov
0d6b4351c6 Remove unnecessary use of avcodec_close().
Replace it with avcodec_free_context() or drop it completely as
appropriate.
2020-06-10 11:31:16 +02:00
Steven Liu
9dfb19baeb avformat/hls: check segment duration value of EXTINF
fix ticket: 8673
set the default EXTINF duration to 1ms if duration is smaller than 1ms

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-06-10 09:22:37 +08:00
Steven Liu
ea1940c6e2 avformat/hls: check output string is usable of ff_make_absolute_url
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>
2020-06-10 09:22:29 +08:00
Steven Liu
029ff31af6 avformat/url: check return value of strchr
fix ticket: 8687
workflow should return if there have no value of strchr

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-06-10 09:22:21 +08:00
Michael Niedermayer
f66f3ca2c1 RELEASE: We are after the 4.3 branch point, update for that
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-10 00:20:24 +02:00
James Almer
1ee3c984b9 avcodec/snow: ensure current_picture is writable before modifying its data
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>
2020-06-09 18:18:11 -03:00
Moritz Barsnick
7ab375f574 doc/utils: document the "s", "ms" and "us" suffixes for durations
These suffixes were introduced in 61c972384d
and completed in 8218249f1f.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:55:52 +05:30
Moritz Barsnick
aab0885c19 doc/ffmpeg: remove reference to deprecated option
The "-deinterlace" was deprecated since d7edd35, over eight years
ago.

Refer to deinterlacing filters instead.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
2020-06-09 17:53:41 +05:30
Anton Khirnov
6943ab688d pthread_frame: change the way delay is set
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 1f4cf92cfb.
2020-06-09 12:45:57 +02:00
Brad Hards
fb819697f6 avformat/mpegts: add constants for MPEG-TS transport stream identifiers
Signed-off-by: Brad Hards <bradh@frogmouth.net>
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-09 01:01:28 +02:00
Marton Balint
81975cd24b avformat/fifo: add timeshift option to delay output
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-06-09 00:57:30 +02:00
Michael Niedermayer
cdac618c9b Changelog: add next marker back after branching 4.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
c5079bf3bc Bump minor versions after branching 4.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
0a8a96c251 Bump minor versions to separate 4.3 from master
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:49:04 +02:00
Michael Niedermayer
49739d1688 Changelog: Add 4.3 cut marker
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:43:10 +02:00
Michael Niedermayer
fe65923ad1 doc/APIchanges: Fill in missing values
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-06-08 22:40:48 +02:00
Michael Niedermayer
49e766aa4c Revert "lavf/mp3dec: don't adjust start time; packets are not adjusted."
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 460132c998.
2020-06-08 22:08:37 +02:00