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

96161 Commits

Author SHA1 Message Date
Andreas Rheinhardt
fc7b6d5574 fftools/ffmpeg_opt: Fix mixed declarations and code
Introduced in ed3c317d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
leozhang
84c27c8c08 avcodec/extract_extradata_bsf: fix typo in comments
Signed-off-by: leozhang <leozhang@qiyi.com>
Reviewed-by: Gyan <ffmpeg@gyani.pro>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
Andriy Gelman
7b2ce27e56 avdevice/v4l2: Remove av_assert0 when format not supported
Before this commit an av_assert0 would fail if a v4l2 device did not
support a target format.
For example,
./ffmpeg -f v4l2 -codec:v h264 -i /dev/video0 -f mpegts -
would signal an abort if /dev/video0 did not support h264.

The new behaviour is to return an AVERROR(EINVAL) error code. An
av_assert0 has been added to verify this return.

Fixes #6629

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-06 20:38:03 +01:00
Lou Logan
a0c7406075 avcodec/Makefile: add missing msmpeg4* dependencies to wmv1 encoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-06 09:49:59 -09:00
Lou Logan
b973d27952 avcodec/Makefile: add missing h263data dependency to snow encoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-06 09:49:59 -09:00
Lou Logan
9022a5e0c2 avcodec/Makefile: add missing vorbis_data dependency to opus encoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-06 09:49:59 -09:00
Lou Logan
0663f0e0da configure: select mdct for dca encoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-06 09:49:59 -09:00
Baptiste Coudurier
004ebd4b37 avcodec/dvdec: correctly decode bottom mb row in 1080i field mode 2019-11-06 08:40:36 -08:00
Baptiste Coudurier
33203a08e0 avcodec/dvdec: correctly set interlaced and tff 2019-11-06 08:40:08 -08:00
Marton Balint
c54268ce02 avcodec/libvpxdec: reject video and alpha dimension mismatches
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Marton Balint
5478e2cc57 avcodec/libvpxdec: decode to custom framebuffers for vp9
This avoids copying the full frame after decoding.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Marton Balint
98aa1eb1cb avcodec/libvpxdec: pass decoder instances to vpx_init directly
If the alpha decoder init failed we presented the error message from the normal
decoder. This change should prevent such mistakes.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Marton Balint
99e0007046 avcodec/libvpxdec: make sure BlockAdditional side data size >= 8
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Marton Balint
6b54477072 avcodec/libvpxenc: only allocate alpha U/V planes on size changes
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Marton Balint
4255032914 avcodec/libvpxenc: fix alpha stride
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
2019-11-05 23:14:24 -08:00
Michael Niedermayer
e4fdeb3fce avformat/nutenc: Do not pass NULL to memcmp() in get_needed_flags()
This compared to the other suggestions is cleaner and easier to understand
keeping the condition in the if() simple.

This affects alot of fate tests.

See: [FFmpeg-devel] [PATCH 05/11] avformat/nutenc: Don't pass NULL to memcmp
See: [FFmpeg-devel] [PATCH]lavf/nutenc: Do not call memcmp() with NULL argument

Fixes: Ticket 7980

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-05 21:21:59 +01:00
Limin Wang
377fa6612a doc/bitstream_filters: Fix copy an paste typo
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-05 21:21:32 +01:00
Lou Logan
121326d7b8 configure: select bswapdsp for ylc decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:27 -09:00
Lou Logan
c69ade947a configure: select fft for qdmc decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:27 -09:00
Lou Logan
16503a933d configure: select bswapdsp for mdec decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:40:08 -09:00
Lou Logan
04e23e027e configure: select bswapdsp for imm4 decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-05 09:38:52 -09:00
Lou Logan
3bfd12d84c avcodec/Makefile: add missing ass dependency to ccaption decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:12:24 -09:00
Lou Logan
1c7e661adb configure: select audiodsp for acelp_kelvin decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:10:11 -09:00
Lou Logan
e8e788da97 configure: select mdct for atrac3al decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:06:22 -09:00
Lou Logan
e5511bc1bd configure: select mdct & sinewin for atrac3pal decoder
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-04 14:01:45 -09:00
Lou Logan
cae7f6658c avformat/Makefile: add missing pcm dependency to sdx demuxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Lou Logan
5f78ca83d6 avformat/Makefile: add missing pcm dependency to nsp demuxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Lou Logan
82bb7900db avformat/Makefile: add missing pcm dependency to hcom demuxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Lou Logan
16ccafad95 configure: select riffdec for act demuxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Lou Logan
132bc8817e configure: select jpegtables for rtp muxer
Signed-off-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
2019-11-04 12:13:48 -09:00
Zhong Li
8ff432eb44 tools/enum_options: replace the deprecated API
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-11-04 23:27:50 +08:00
Zhong Li
f52e15df0f tools/probetest: replace the deprecated API
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-11-04 23:27:35 +08:00
zhongli_dev@126.com
fcbfdeeabe lavc/qsvenc: add the missing vp9 file
It is missed in commit 3358380

Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-11-04 23:24:20 +08:00
Jun Zhao
ec3d3fc65d lavf/asfdec: Simplify the check conditions
Simplify the check conditions

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-11-04 10:24:58 +08:00
Jun Zhao
8f7a043609 lavf/mpegtsenc: fix logic check error
fix the logic check error

fix #6751

Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-11-04 10:22:11 +08:00
Nicolas Frattaroli
a8ec0685ac avformat/ftp: add AVOptions for authentication
This introduces two new AVOption options for the FTP protocol,
one named ftp-user to supply the username to be used for auth,
one named ftp-password to supply the password to be used for auth.

These are useful for when an API user does not wish to deal with
URL manipulation and percent encoding.

Setting them while also having credentials in the URL will use the
credentials from the URL. The rationale for this is that credentials
embedded in the URL are probably more specific to what the user is
trying to do than anything set by some API user.

Signed-off-by: Nicolas Frattaroli <ffmpeg@fratti.ch>
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-11-03 12:24:19 +01:00
Andriy Gelman
5e3229df4c avformat: Add max_probe_packets option
Allows user to set maximum number of buffered packets when
probing a codec. It was a hard-coded parameter before this commit.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-03 11:52:32 +01:00
Zhong Li
33583803e1 lavc/qsvenc: enable vp9 encoder
1. must enable low_power mode since just VDENC can be supported by iHD
driver right now
2. Coding option1 and extra_data are not supported by MSDK
3. IVF header will be inserted in MSDK by default, but it is not needed
for FFmpeg, so disable it.

Signed-off-by: Zhong Li <zhongli_dev@126.com>
2019-11-03 16:45:35 +08:00
Linjie Fu
e786e37326 lavc/qsvenc: Fix bitrate_limit to allow AVC encode in limited bitrate
MFXVideoENCODE_Query calls CheckVideoParamQueryLike in MSDK and
will determine whether to set param.mfx.TargetKbps to the allowed
minTargetKbps according to the bitrate_limit in extco2 buffer.

Thus q->param.ExtParam must be set before MFXVideoENCODE_Query in case
minTargetKbps is written to TargetKbps by default.

1080P AVC encoding with option "-bitrate_limit 0 -b:v 100k":
Before patch:
            902 kbps
After patch:
            156 kbps
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
2019-11-03 16:22:47 +08:00
Andriy Gelman
53c21c2d6b avcodec/v4l2_m2m: Fix indentation
Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-11-01 15:19:55 -07:00
Andriy Gelman
1aec1183f3 avcodec/v4l2_buffers: Fix infinite loop
This part of the code counts the number of planes returned by the v4l2
device for each queried capture/output buffer.
When testing the GPU h264 encoder on Nvidia's Jetson Nano, this caused an
infinite loop because avbuf->buf.length included some empty buffers (i.e.
where avbuf->buf.m.planes[i].length = 0), meaning that the counter was
never incremented and break was never reached.
This is fixed in the commit by using a well defined iteration range.

Signed-off-by: Aman Gupta <aman@tmm1.net>
2019-11-01 15:19:55 -07:00
Michael Niedermayer
fd3ee7a92e tools/target_dec_fuzzer: Adjust threshold for G2M
G2M allows large images from small input and also reallocates
multiple buffers on any resolution change.

Fixes: Timeout (22sec -> 5sec)
Fixes: 18022/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5089192530411520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:15:33 +01:00
Michael Niedermayer
98a257c323 avcodec/aptx: Check the number of channels
Fixes: store to null pointer of type 'uint32_t' (aka 'unsigned int')
Fixes: 18021/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APTX_HD_fuzzer-5761738313564160

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:15:32 +01:00
Michael Niedermayer
47a017aaaa avcodec/rv10: Check input for minimal frame size
Fixes: Timeout (18sec -> 4sec)
Fixes: 18012/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV20_fuzzer-5767486145822720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:15:31 +01:00
Michael Niedermayer
7730bacb41 avcodec/aacdec_template: Check samplerate
Fixes: signed integer overflow: 2 * 1881153568 cannot be represented in type 'int'
Fixes: 17996/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5687126468853760

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:15:25 +01:00
Michael Niedermayer
2b655f55ea avcodec/truemotion2: Fix several integer overflows in tm2_low_res_block()
Fixes: signed integer overflow: 1077952576 + 1355863565 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5679842317565952

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:12:14 +01:00
Michael Niedermayer
9ee5096068 avcodec/truemotion2: Fix several integer overflows with *Yo, *Uo, *Vo
Fixes: signed integer overflow: 538976288 - -2080374792 cannot be represented in type 'int'
Fixes: 16196/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5144044274974720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 20:12:11 +01:00
Michael Niedermayer
f011572e66 avcodec/utils: Check block_align
Fixes: out of array access
Fixes: 18432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5675574936207360
Fixes: 18326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV2_fuzzer-5071752362721280
Fixes: 18384/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAV1_fuzzer-5769439500304384

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 14:43:16 +01:00
Limin Wang
99fc5059fb avfilter/vf_lut3d: simplify code
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 14:43:16 +01:00
Limin Wang
a5e24be52a swscale/swscale_unscaled: fix gbrap10be md5 different on big endian system
You can reproduce it by below command:
./ffmpeg -f lavfi -i "testsrc=duration=1:rate=30" -vf format=gbrap10 -vcodec rawvideo \
    -pix_fmt gbrap10le -flags +bitexact -sws_flags +accurate_rnd+bitexact -fflags +bitexact  \
    -frames:v 1 -f nut md5:

little-endian:
f91e2edd8098276579c1929e5e160416
big-endian:
ba4d011dbbdc78ccbf6cc7d698630929

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 14:43:16 +01:00