1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Commit Graph

90861 Commits

Author SHA1 Message Date
Clément Bœsch
5be0410cb3 lavu/opt: add AV_OPT_FLAG_DEPRECATED 2018-04-26 19:50:29 +02:00
Clément Bœsch
71fa82bed6 lavu/threadmessage: add av_thread_message_queue_nb_elems() 2018-04-26 19:41:19 +02:00
Jerome Borsboom
02e4970bc9 avcodec/vc1: fix out of bounds access of overlap filter
Overlap filtering of the first row and first column must be guarded
for out of bounds access of v->over_flags_plane.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-26 17:13:17 +02:00
Paul B Mahol
330215830e avfilter/vf_mix: clip output pixel values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol
a5172dcab6 avfilter/vf_mix: add scale option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Paul B Mahol
161e006cc0 avfilter: add tmix filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-26 16:44:15 +02:00
Derek Buitenhuis
28503c5aea mov: Properly abide by the track's media duration
The track's media duration from the mdhd atom takes precedence
over both the stts and elst atom for calculating and setting
the track's total duraion.

Technically, we shouldn't be using the stts atom at all for
calculating stream durations.

This fixes incorrect stream and final packet durations on files
with edit lists that are longer than the media duration.

The FATE changes are expected, and output is more correct (the
AAC frame is not 1028 samples).

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-04-26 14:42:15 +01:00
Carl Eugen Hoyos
3914a76db6 lavf/rtmpcrypt: Add a cast to silence an unavoidable warning.
The av_rc4_crypt() documentation allows src == dst.

Silences the following warning:
libavformat/rtmpcrypt.c:304:36: warning: passing argument 2 of 'av_rc4_crypt' discards 'const' qualifier from pointer target type

Reported-by: Reino Wijnsma
2018-04-26 13:45:20 +02:00
Karthick Jeyapal
4c27a6fbfd avformat/dashenc: Set mp4 as the default format for VP9
There is a separate muxer(webmdashenc.c) for supporting VP9+webm output in DASH.
Hence in this muxer we will focus on supporting VP9 in MP4
Have verified playout support of VP9+MP4 in Chrome and Firefox.
2018-04-26 14:23:08 +05:30
Karthick Jeyapal
060e74e2a9 avformat/dashenc: Set VP9 codec string with profile, level and bitdepth
Otherwise some versions of chrome browser returns "codec not supported" error
2018-04-26 14:23:08 +05:30
Karthick Jeyapal
5b6cc3a73a avformat/vpcc: Calculate VP9 level from Luma's Sample rate and Picture size 2018-04-26 14:23:08 +05:30
Steven Liu
798ae8794e avformat/dashdec: fix compling warning "filename is deprecated"
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-04-26 16:19:30 +08:00
guikunzhi
8ea8be5951 fix memory leak of parsing dash MPD
Signed-off-by: guikunzhi <guikunzhi@163.com>
2018-04-26 12:40:52 +08:00
Michael Niedermayer
1c97035e3b avcodec/error_resilience: Fix integer overflow in filter181()
Fixes: runtime error: signed integer overflow: 197710 * 10923 cannot be represented in type 'int'
Fixes: 7010/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5667127596941312

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-25 23:09:47 +02:00
Michael Niedermayer
de841fbea7 avcodec/h263dec: Check slice_ret in mspeg4 slice loop
Fixes infinite loop
Fixes: 6858/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_MSMPEG4V3_fuzzer-4681563766784000
Fixes: 6890/clusterfuzz-testcase-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-4756103142309888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-25 23:09:47 +02:00
Michael Niedermayer
7562567f41 avcodec/h2645_parse: Replace RNXYA by RNXY in ff_h2645_extract_rbsp()
Fixes misaligned accesses
Found-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-25 23:09:47 +02:00
Michael Niedermayer
0bd0401336 avcodec/elsdec: Fix memleaks
Fixes: 6798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5135899701542912

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-25 23:09:47 +02:00
Jerome Borsboom
144ce364cd avcodec/vc1: more corrections for AC inverse quantization scaling
HALFQP should only be added to the inverse quantizer when the block is
coded with PQUANT. When PQUANT is equal to ALTPQUANT, the original test
for the addition of HALFQP fails. A negative value for mquant indicates
that the value was derived from VOPDQUANT.

Fixes #4372

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
9ae2845b1c avcodec/vc1: correct forgotten v->blocks_off
correct forgotten v->blocks_off

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
797c1536a4 avcodec/vc1: correct AC inverse quantization scaling
HALFQP should only be added to the inverse quantizer when the block is
coded with PQUANT. See 8.1.3.8 in VC-1 spec.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
a1dc0bdaf4 avcodec/vc1: correct mspel for field-interlace B frames
mspel indicates the use of bicubic interpolation. The check wrongly included
MVMODE MV_PMODE_1MV_HPEL as using bilinear interpolation.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
7a70879624 avcodec/vc1: remove unused overlap smooting and loop filter
remove unused overlap smooting and loop filter

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
cc5deeb74a avcodec/vc1: add overlap smooting and loop filter for frame/field-interlace
Add previously omitted overlap smooting and loop filtering for
frame/field-interlace pictures. For progressive pictures switch to the
re-implemented versions of overlap smooting and loop filtering.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
e60e14ef92 avcodec/vc1: re-implement vc1_put_signed_blocks_clamped
The existing implementation only used vc1_put_signed_blocks_clamped for I and
BI frames. This rewritten version is also applicable to P frame both
progressive and frame/field-interlace.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
362ce2db4b avcodec/vc1: implement interlaced out-of-bounds reference pixel replication
The existing implementation did out-of-bounds reference pixel replication for
progressive reference frames. In interlaced reference frames both the even and
odd line on the horizontal edges need to be replicated.

Fixes #3262.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
b43f1c5225 avcodec/vc1: correct ff_vc1_dqscale
According to VC-1 spec table 74, the last value in ff_vc1_dqscale should be
0x1041 instead of 0x1000.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
dd1e717f5b avcodec/vc1: correct ff_vc1_mbmode_intfrp
According to VC-1 spec 10.7.3.4, FIELDTX shall be set to the same type as the
motion vector for zero-coded blocks.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
79f8074cc4 avcodec/vc1: store color-difference reference field type
The loop filter for P interlace field pictures needs the reference field type.
For luma, the reference field type was already available. Store the reference
field type for color-difference as well.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
c5f74b1e23 avcodec/vc1: store additional bitstream elements during MB decoding
The new loop filter needs additional MB properties to make its filtering
decisions.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
ded52f6e36 avcodec/vc1: re-implement and expand VC-1 loop filtering
The existing implementation did loop filtering for progressive
frames only. This rewritten version implements loop filtering for
all applicable frame types for both progessive and
frame/field-interlace.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
20de893b3b avcodec/vc1: change to using v->block instead of s->block for P frames
The new overlap smooting filter smoothes image pixels stored in v->block.
Switch to v->block instead of s->block for storing decoded image pixels for P
frames. Additionally, we must take incrementing *_blk_idx out of the
vc1_put_signed_blocks_clamped function.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
Jerome Borsboom
5e5c9f1804 avcodec/vc1: re-implement and expand VC-1 overlap smoothing
The existing implementation did overlap smoothing for progressive
frames only. This rewritten version implements overlap smoothing
for all applicable frame types for both progessive and
frame/field-interlace.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-25 22:07:20 +02:00
James Almer
0161d91db0 avcodec/cbs_mpeg2: use memcpy when assembling fragments
before:
419022 decicycles in assemble_fragment,    2047 runs,      1 skips

after:
104621 decicycles in assemble_fragment,    2045 runs,      3 skips

Benched with a 2 minutes long 720x480 DVD mpeg2 sample.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-25 16:45:43 -03:00
James Almer
bd90a2ec04 avcodec/mpeg4_unpack_bframes: cache input packets directly
Avoids unnecessary allocs+copies and makes the code slightly simpler.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-25 16:34:00 -03:00
Aman Gupta
d8e92a89ed avcodec/mediacodecdec: refactor pts handling
Also fixes a bug where EOS buffer was sent with incorrect
pts when not using surface generation.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-04-25 10:53:54 -07:00
Aman Gupta
7a4639b1eb avcodec/mediacodecdec: use AV_TIME_BASE_Q
Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Jan Ekström <jeebjp@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-04-25 10:53:54 -07:00
Aman Gupta
6a7a84b2d1 avcodec/mediacodecdec: clarify delay_flush specific code
As of 2a0eb8685, ff_mediacodec_dec_is_flushing() only returns
true in delay_flush mode. Make this more obvious by adding
delay_flush to the if statement.

Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-04-25 10:53:52 -07:00
Paul B Mahol
b2570afde3 avformat/yuv4mpegdec: fix seeking backwards
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 18:30:46 +02:00
Paul B Mahol
a12899ad9b avfiler/vf_mix: fix crash with >8 bit depth
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 14:08:21 +02:00
Paul B Mahol
0b360cae1c make swresample optional for ffmpeg
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-25 12:38:03 +02:00
Michael Niedermayer
d06b01fc2d avcodec/vc1_block: simplify ac_val computation
also fixes: runtime error: index 1456 out of bounds for type 'int16_t [16]'

Found-by: durandal_1707
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-24 19:58:04 +02:00
Paul B Mahol
f09fdf2d9c avcodec/clearvideo: display warning if decoder overreads input
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-24 17:20:26 +02:00
Paul B Mahol
e34751cb8a avcodec/clearvideo: do not try to return frame when it is same as previous one
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-24 17:10:26 +02:00
Michael Niedermayer
d9706f79c1 avcodec/ffv1enc: Check that the crc + version combination is supported
The crc flag is only stored since version 3 thus before this crcs do not
work. We increase the version as needed same as we do with pix_fmts

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-24 01:29:17 +02:00
Jerome Borsboom
8132d362fa avcodec/vaapi: do not parse MVMODE for VC-1 interlaced frame pictures
Interlaced frame pictures do not contain the MVMODE or MVMODE2 bitstream
element. Trying to parse this element and passing a nonzero value to the
hardware decoder results in small inaccuracies in the decoded picture.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
2018-04-23 23:11:29 +01:00
Paul B Mahol
daba369471 avcodec/vc1: check return value of bitplane_decoding()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-23 23:49:56 +02:00
Vasile Toncu
9c01cdb94e avfilter/vf_interlace: remove duplicate code with same funcionality 2018-04-23 23:48:30 +02:00
Rostislav Pehlivanov
4ac0ff8ec2 Revert "libavformat: add mbedTLS based TLS"
This reverts commit 62f5c9d68b,
which was pushed a bit prematurely.
2018-04-23 20:29:02 +01:00
Thomas Volkert
62f5c9d68b libavformat: add mbedTLS based TLS 2018-04-23 20:48:11 +02:00
Carl Eugen Hoyos
2442cf3615 lavf/os_support: Only compile inet_aton() if getaddrinfo() is needed.
Silences a warning:
libavformat/os_support.c:49:12: warning: 'inet_aton' defined but not used

Reported-by: Reino Wijnsma
2018-04-23 13:39:29 +02:00