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

98711 Commits

Author SHA1 Message Date
Guo, Yejun
0a51abe8ab dnn: add backend options when load the model
different backend might need different options for a better performance,
so, add the parameter into dnn interface, as a preparation.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-12 15:43:40 +08:00
Mingyu Yin
4ed6bca4ae dnn_backend_native_layer_mathunary: add round support
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-12 10:30:46 +08:00
Limin Wang
ed39d28ce7 avcodec/libsvtav1: fix copy and paste error
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-08-12 08:12:59 +08:00
Andreas Rheinhardt
7ad4928580 avformat/ty: Remove write-only array and variable
Up until now, the TiVo demuxer parse an array of SEQ entries, yet it has
never ever made any use of them. In fact, parse_master, the function
parsing said table, only influenced the outside world in three ways: Via
an excessive amount of error message in case a certain parameter is not
what it expected; via an allocation (the aforementioned write-only
array); and by setting a certain parameter (ty->cur_chunk_pos), but that
parameter is always overwritten before it is used (it is overwritten
in get_chunk() on success and if get_chunk() fails, the error is
returned to the caller anyway). So remove the array and the function
used to parse it.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-11 16:44:11 +02:00
Michael Niedermayer
4b7189848f tools/target_dec_fuzzer: Adjust threshold for AGM
Fixes: Timeout (142sec -> 2sec)
Fixes: 24426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5639724379930624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-11 14:21:56 +02:00
Michael Niedermayer
6d7e522103 avcodec/agm: Mark fill_pixels() as av_always_inline
Speedup from 275sec to 142sec
Testcase: 24426/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5639724379930624

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-11 14:21:56 +02:00
Paul B Mahol
7a940a2112 doc/general: mark that CFHD have encoder now 2020-08-11 12:34:41 +02:00
Paul B Mahol
f7c0ad2bae doc/general: mention AGM codecs 2020-08-11 12:34:41 +02:00
Paul B Mahol
4dbb75c437 avfilter/vf_xfade: check that fps between inputs are valid 2020-08-11 10:57:04 +02:00
Paul B Mahol
3f58dbca72 avcodec/cfhdenc: mark filter as always inline 2020-08-11 10:01:05 +02:00
Paul B Mahol
ba0825626a avcodec/cfhdenc: optimize writting of small runcodes 2020-08-11 10:01:05 +02:00
Paul B Mahol
16b79f3d3a avcodec/cfhdenc: improve quality vs size ratio 2020-08-11 10:01:04 +02:00
Zane van Iperen
d2f42b9be1
avformat/argo_asf: strip file extension from name
Only when the user hasn't manually specified one.
Matches the original files more closely.

Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-11 08:50:27 +10:00
Zane van Iperen
a3a4591868
avformat/argo_asf: add name option
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-11 08:50:27 +10:00
Zane van Iperen
1f9dd53d5d
avformat/argo_asf: add version_major and version_minor options
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-11 08:50:27 +10:00
Zane van Iperen
a3e9821787
avformat/argo_asf: don't check file version
It has no bearing on structure. Determined by looking at the ASF
files from several Argonaut games:
  - FX Fighter,
  - Croc,
  - Croc 2,
  - The Emperor's New Groove, and
  - Disney's Aladdin in Nasira's Revenge

The only versions that appear are 1.1, 1.2, and 2.1, and their
structure is identical.

Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-11 08:50:26 +10:00
Zane van Iperen
97aaa15089
avformat/argo_asf: add games to version list
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-11 08:50:19 +10:00
Andreas Rheinhardt
1ead176d87 avformat/mpegts: Don't leave context in inconsistent state upon error
Up until now, opening a section filter works as follows: A filter is
opened and (on success) attached to the MpegTSContext. Then a buffer for
said filter is allocated and upon success attached to the section
filter; on error, the filter is simply freed without removing it from
the MpegTSContext, leaving the latter in an inconsistent state. This
leads to use-after-frees lateron.

This commit fixes this by allocating the buffer first; the filter is
only opened if the buffer could be successfully allocated.

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-10 21:07:54 +02:00
Michael Niedermayer
a5ac81952e avcodec/jpeg2000dec: Check remaining data in packed_headers_stream before use
Fixes: out of array read
Fixes: 24487/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5165847820369920
Fixes: 24636/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5700973918683136
Fixes: 24683/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6202883897556992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-10 14:54:32 +02:00
Ting Fu
de5cb6c060 FATE/dnn: add unit test for dnn avgpool layer
'make fate-dnn-layer-avgpool' to run the test

Signed-off-by: Ting Fu <ting.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-10 16:37:43 +08:00
Ting Fu
91efc41a69 dnn/native: add native support for avg_pool
Not support pooling strides in channel dimension yet.

Signed-off-by: Ting Fu <ting.fu@intel.com>
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-10 16:37:39 +08:00
Steven Liu
40597add98 avformat/hlsenc: write temp file for append single file by encryption mode
fix ticket: 8783
Because in single file by encryption mode, it cannot get the last one
block of the file, it need ff_format_io_close for get full file size,
then hlsenc can get the total size of the encryption content,
so write the content into temp file first, and get the temp file content
append the temp file content into append to single file, then hlsenc can
get the correct file/content size and offset.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2020-08-10 15:52:59 +08:00
Steven Liu
6e4bba4055 avformat/hls: support avio_seek in encryption mode
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
2020-08-10 15:52:54 +08:00
Mark Thompson
6e951d0cf8 kmsgrab: Add more supported formats
X2RGB10 tested on both Intel Gen9 and AMD Polaris 11.  NV12 tested on
Intel Gen9 only - since it has multiple planes, this requires GetFB2.

Also add some comments to split the list up a bit.
2020-08-09 20:18:49 +01:00
Mark Thompson
991daf3895 doc/indevs: Note improved behaviour of kmsgrab with Linux 5.7 2020-08-09 20:18:49 +01:00
Mark Thompson
ff14858a60 kmsgrab: Don't require the user to set framebuffer format
This is provided by GetFB2, but we still need the option for cases where
that isn't available.
2020-08-09 20:18:49 +01:00
Mark Thompson
ef934dba2d kmsgrab: Use GetFB2 if available
The most useful feature here is the ability to automatically extract the
framebuffer format and modifiers.  It also makes support for multi-plane
framebuffers possible, though none are added to the format table in this
patch.

This requires libdrm 2.4.101 (from April 2020) to build, so it includes a
configure check to allow compatibility with existing distributions.  Even
with libdrm support, it still won't do anything at runtime if you are
running Linux < 5.7 (before June 2020).
2020-08-09 20:18:48 +01:00
Mark Thompson
fa0b064cf2 kmsgrab: Refactor and clean error cases 2020-08-09 20:18:48 +01:00
Andreas Rheinhardt
ea8f8d28d0 avformat/sierravmd: Don't return packets for non-existing stream
It leads to an assert in ff_read_packet().

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-09 19:07:23 +02:00
Andreas Rheinhardt
c4a4fe938d avformat/vividas: Check allocation for success
Reviewed-by: Zane van Iperen <zane@zanevaniperen.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-09 19:07:23 +02:00
Andreas Rheinhardt
a3dced69c8 avformat/vividas: Check return value before storing it in smaller type
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-09 19:07:23 +02:00
Paul B Mahol
4ad77086b9 avcodec/cfhd: improve SampleIndex tag output
This tag is used for jumping to different channels in bitstream.
2020-08-09 18:47:30 +02:00
Paul B Mahol
17d1454a5f avcodec/cfhd: log version tags too 2020-08-09 18:47:29 +02:00
Paul B Mahol
fc3546bece avcodec/cfhd: read prescale table tag
Currently unused. Remove prescale shift tag as it
is not part of this codec.
2020-08-09 18:47:29 +02:00
Paul B Mahol
3ff7171a85 avcodec/cfhd: use init_get_bits8() 2020-08-09 18:47:29 +02:00
Paul B Mahol
25d07e1394 avcodec/cfhd: reindent 2020-08-09 18:47:28 +02:00
Paul B Mahol
8c7ea0c344 avcodec/cfhd: check if band encoding is valid
Also simplify lossless check as value of 5 for band encoding
always specify lossless mode.
2020-08-09 18:47:28 +02:00
Gautam Ramakrishnan
9ce787d61e libavcodec/j2kenc: Support for all Progression orders
This patch allows for selecting the progression order
in the j2k encoder. However, all components and resolution
levels will use the same progression order and will not
feature the use of progression order change markers.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-08-09 14:58:24 +02:00
Paul B Mahol
14b84a2e99 avcodec/cfhdenc: free alpha buffer on closing 2020-08-08 19:59:06 +02:00
Paul B Mahol
0a8742a1e6 avcodec/cfhdenc: add gbrap12 pixel format support 2020-08-08 19:40:34 +02:00
Paul B Mahol
8d48e8d251 avcodec/cfhdenc: compand coefficients
Also use -quality private option and add more modes.
2020-08-08 12:05:39 +02:00
Paul B Mahol
1006a21512 avcodec/cfhd: add 3d transform support
Based on Gagandeep Singh patch.
2020-08-08 12:03:43 +02:00
Paul B Mahol
1c6a010e3b avcodec/cfhd: remove some unused or only write items 2020-08-08 12:03:43 +02:00
Paul B Mahol
a96506f017 avcodec/cfhdenc: also write FrameNumber tag 2020-08-08 12:03:43 +02:00
Paul B Mahol
9d58cdb4ba swscale: do not drop half of bits from 16bit bayer formats 2020-08-08 12:03:42 +02:00
Jun Zhao
b9ff25a93e doc/fftools-common-opts: document ffmpeg -h protocol=protocol_name
document ffmpeg -h protocol=protocol_name

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-08-08 15:06:45 +08:00
Jun Zhao
035208e514 doc/fftools-common-opts: fix typo (name => named)
fix typo (name => named)

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-08-08 15:05:31 +08:00
tomajsjiang
926061fff1 doc/filters: update filter buffer/abuffer interface file name
Update filter buffer/abuffer interface file name, from
libavfilter/{vsrc|asrc_buffer.h} to libavfilter/buffersrc.h

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Signed-off-by: tomajsjiang <tomajsjiang@tencent.com>
2020-08-08 15:04:34 +08:00
Andreas Rheinhardt
06fef1e9f1 avcodec/put_bits: Make skip_put_bits() less dangerous
Before c63c303a1f (the commit which
introduced a typedef for the type of the buffer of a PutBitContext)
skip_put_bits() was as follows:

static inline void skip_put_bits(PutBitContext *s, int n)
{
    s->bit_left -= n;
    s->buf_ptr  -= 4 * (s->bit_left >> 5);
    s->bit_left &= 31;
}

If s->bit_left was negative after the first subtraction, then the next
line will divide this by 32 with rounding towards -inf and multiply by
four; the result will be negative, of course.

The aforementioned commit changed this to:

static inline void skip_put_bits(PutBitContext *s, int n)
{
    s->bit_left -= n;
    s->buf_ptr  -= sizeof(BitBuf) * ((unsigned)s->bit_left / BUF_BITS);
    s->bit_left &= (BUF_BITS - 1);
}

Casting s->bit_left to unsigned meant that the rounding is still towards
-inf; yet the right side is now always positive (it transformed the
arithmetic shift into a logical shift), so that s->buf_ptr will always
be decremented (by about UINT_MAX / 8 unless n is huge) which leads to
segfaults on further usage and is already undefined pointer arithmetic
before that. This can be reproduced with the mpeg4 encoder with the
AV_CODEC_FLAG2_NO_OUTPUT flag set.

Furthermore, the earlier version as well as the new version share
another bug: s->bit_left will be in the range of 0..(BUF_BITS - 1)
afterwards, although the assumption throughout the other PutBitContext
functions is that it is in the range of 1..BUF_BITS. This might lead to
a shift by BUF_BITS in little-endian mode. This has been fixed, too.
The new version is furthermore able to skip zero bits, too.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-08 01:08:47 +02:00
Zane van Iperen
6fdf3cc53b
fate: cosmetics
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2020-08-07 23:14:29 +10:00