Commit Graph

91721 Commits

Author SHA1 Message Date
Michael Niedermayer
6b1b5af024 avfilter/vf_frei0r: Remove duplicate }, fix build
Fixes regression from a3c6b7ff59

Reported-by: qq2225936589
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-30 17:12:25 +02:00
Paul B Mahol
562f00ed07 avcodec/utvideodec: use cached bitstream reader everywhere except on x86_32
From 100x real-time decoding to 138x real-time decoding for 320x240 video.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-08-30 12:00:27 +02:00
Paul B Mahol
042fc12344 doc/libav-merge: bitstream reader is now merged
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-08-30 11:50:23 +02:00
Paul B Mahol
ca079b0954 avcodec/get_bits: add cached bitstream reader
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-08-30 11:50:23 +02:00
Raphael Graf
a3c6b7ff59 frei0r: handle string params
This is needed for some of the frei0r filters (facebl0r and facedetect) which accept string parameters.

Fixes the issue described here:
http://www.ffmpeg-archive.org/Unable-to-set-ffmpeg-frei0r-facedetect-filter-parameter-td4680190.html

Signed-off-by: Raphael Graf <r@undefined.ch>
2018-08-30 09:57:25 +02:00
Paul B Mahol
d71dfc087b avcodec/scpr: error out if run length is <= 0 2018-08-29 23:11:45 +02:00
Colin NG
b205635fbc avformat/dashdec: Add a re-entrance check point after an interrupt operation 2018-08-29 16:28:03 +08:00
Jacek Jendrzej
3cff2311ab avformat/dashdec: Fix calc_cur_seg_no if availability_start_time not
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-29 15:20:00 +08:00
Gyan Doshi
26dc763245 ffmpeg: add correct field for raw pts in -progress report
PTS is in microseconds, so correct field name is out_time_us.

Old field out_time_ms kept for now - will be removed after a suitable transition
period.

Fixes #7345
2018-08-28 10:11:01 +05:30
Rostislav Pehlivanov
964819fefd atrac9dec: clean up code slightly
Just remove some dead variable assignments, unneeded variables and
change the FFMAX order to something more readable. Still identical.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-08-28 04:25:35 +01:00
Rostislav Pehlivanov
ea82ff81e4 atrac9dec: implement LFE channel decoding
Much simpler than regular decoding, does allow for 5.1 and 7.1
streams to be decoded without desync.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-08-27 23:18:03 +01:00
Rostislav Pehlivanov
6213cf7394 atrac9dec: relax gradient value requirements
Unlike the range, the gradient start value does not have to be lower
than the end value.
Does allow more files to be correctly decoded without errors.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-08-27 23:18:03 +01:00
Shiyou Yin
e13e52fd0d configure: [loongson] revert no-expensive-optimizations
Add gcc version check before add -fno-expensive-optimizations flag.
Only when gcc version is lower than 5.3.0, this flag is needed.
More bug info see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67736
https://gcc.gnu.org/ml/gcc-patches/2012-05/msg00401.html

Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-27 23:30:54 +02:00
Paul B Mahol
ad2ac1e7dd avcodec: add WinCAM Motion Video decoder 2018-08-27 22:06:19 +02:00
Paul B Mahol
f7d749e95b avcodec: add MatchWare Screen Capture Codec 2018-08-27 22:06:19 +02:00
Mark Thompson
38ec5b4aa4 vaapi_encode: Factorise out adding global parameters 2018-08-27 16:21:38 +01:00
Mark Thompson
c5b4ad247b vaapi_encode: Remove common priv_data and options fields
The codec-specific context now contains both the common context and the
codec-specific options directly.
2018-08-27 16:21:38 +01:00
Mark Thompson
1616106f11 vaapi_encode_vp9: Move options and common structures into context 2018-08-27 16:21:37 +01:00
Mark Thompson
58d3ac31c8 vaapi_encode_vp8: Move options and common structures into context 2018-08-27 16:21:37 +01:00
Mark Thompson
537d6aa30e vaapi_encode_mpeg2: Move common structure into context 2018-08-27 16:21:37 +01:00
Mark Thompson
2c3ad16d3e vaapi_encode_mjpeg: Move common structure into context 2018-08-27 16:21:37 +01:00
Mark Thompson
46d1313fcd vaapi_encode_h265: Move options and common structures into context
Matching previous commit for H.264.
2018-08-27 16:21:37 +01:00
Mark Thompson
2fd962efba vaapi_encode_h264: Move options and common structures into context
This will make it easier to support options in common between different
encoders.  It also cleans up some of the field naming.
2018-08-27 16:21:37 +01:00
Avi Halachmi (:avih)
45499e557c configure: speed up check_deps()
x4 - x25 faster.

check_deps() recursively enables/disables components, and its loop is
iterated nearly 6000 times. It's particularly slow in bash - currently
consuming more than 50% of configure runtime, and about 20% with other
shells.

This commit applies few local optimizations, most effective first:
- Use $1 $2 ... instead of pushvar/popvar, and same at enable_deep*
- Abort early in one notable case - empty deps, to avoid costly no-op.
- Smaller changes which do add up:
  - Handle ${cfg}_checking locally instead of via enable[d]/disable
  - ${cfg}_checking: test done before inprogress - x2 faster in 50%+
  - one eval instead of several at the empty-deps early abort path.

- The "actual work" part is unmodified - just its surroundings.

Biggest speedups (relative and absolute) are observed with bash.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:10 -03:00
Avi Halachmi (:avih)
923586a58f configure: speed up print_enabled_components()
x4 - x10 faster.

Inside print_enabled components, the filter_list case invokes sed
about 350 times to parse the same source file and extract different
info for each arg. This is never instant, and on systems where fork is
slow (notably MSYS2/Cygwin on windows) it takes many seconds.

Change it to use sed once on the source file and set env vars with the
parse results, then use these results inside the loop.

Additionally, the cases of indev_list and outdev_list are very
infrequent, but nevertheless they're faster, and arguably cleaner, with
shell parameter substitutions than with command substitutions.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:10 -03:00
Avi Halachmi (:avih)
58b81ac621 configure: speed up flatten_extralibs_wrapper()
x50 - x200 faster.

Currently configure spends 50-70% of its runtime inside a single
function: flatten_extralibs[_wrapper] - which does string processing.

During its run, nearly 20K command substitutions (subshells) are used,
including its callees unique() and resolve(), which is the reason
for its lengthy run.

This commit avoids all subshells during its execution, speeding it up
by about two orders of magnitude, and reducing the overall configure
runtime by 50-70% .

resolve() is rewritten to avoid subshells, and in unique() and
flatten_extralibs() we "inline" the filter[_out] functionality.

Note that logically, "unique" functionality has more than one possible
output (depending on which of the recurring items is kept). As it
turns out, other parts expect the last recurring item to be kept
(which was the original behavior of uniqie()). This patch preservs
its output order.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Tested-by: Helmut K. C. Tessarek <tessarek@evermeet.cx>
Tested-by: Dave Yeo <daveryeo@telus.net>
Tested-by: Reino Wijnsma <rwijnsma@xs4all.nl>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-27 11:34:09 -03:00
Zhong Li
d91370e0f1 lavc/encode: fix frame_number double-counted
Encoder frame_number may be double-counted if some frames are cached and then flushed.
Take qsv encoder (some frames are cached firsty for asynchronism) as example,
./ffmpeg -loglevel verbose -hwaccel qsv -c:v h264_qsv -i in.mp4 -vframes 100 -c:v h264_qsv out.mp4
frame_number passed to encoder is double-counted and larger than the accurate value.
Libx264 encoding with B frames can also reproduce it.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-08-27 16:54:40 +08:00
Paul B Mahol
3aacb0d196 avcodec/proresdec2: add frame threading support 2018-08-26 18:07:57 +02:00
Paul B Mahol
c84a57d1a2 avcodec/mscc: fix several bugs
Fixes #6342.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-08-26 18:04:16 +02:00
Nicolas George
962c9313af lavfi/avf_concat: switch to activate.
Fix trac ticket #7351.
2018-08-26 12:16:48 +02:00
Kieran Kunhya
844ff49469 mpeg4video: Add Studio DPCM support 2018-08-25 22:08:19 +02:00
Michael Niedermayer
323095a6db avformat/mpegts: add missing null pointer checks in ff_parse_mpeg2_descriptor()
Fixes: null pointer dereference
Fixes: wtv-crash-75fa58662ded1c1d349f3d1df89394fd690cf92f

Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-25 21:50:17 +02:00
Michael Niedermayer
c9222b972d avcodec/hq_hqa: Check remaining input bits in hqa_decode_mb()
Fixes: Timeout
Fixes: 9634/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6267852259590144

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-25 21:50:17 +02:00
Michael Niedermayer
1cbac9ce20 avcodec/vb: Check for end of bytestream before reading blocktype
Fixes: Timeout
Fixes: 9601/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VB_fuzzer-4550228702134272

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-25 21:50:17 +02:00
Michael Niedermayer
acba153a14 avcodec/snowdec: Fix integer overflow with motion vector residual
Fixes: signed integer overflow: -19818 + -2147483648 cannot be represented in type 'int'
Fixes: 9545/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-4928769537081344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-25 21:50:17 +02:00
Rostislav Pehlivanov
2e23cfbb42 allcodecs: reorder ff_bitpacked_decoder
Needs to be in alphabetical order.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2018-08-25 18:36:16 +01:00
Michael Niedermayer
168d8d56bf avcodec/mpeg4videodec: Fix slice end detection in mpeg4_decode_studio_mb()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-25 18:50:30 +02:00
Timo Rothenpieler
0c71c6d66f avcodec/utils: document allocation requirement of extradata 2018-08-25 18:31:12 +02:00
Jun Zhao
d6915d0d45 doc/examples/vaapi_transcode: re-licensed to MIT-license.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-25 22:09:44 +08:00
Jun Zhao
5f090727ad doc/examples/vaapi_encode: re-licensed to MIT-license.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-25 22:09:44 +08:00
Jun Zhao
00286673d9 doc/examples/hw_decode: re-licensed to MIT-license.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-25 22:09:44 +08:00
Paul B Mahol
4d87cd2882 avcodec/prosumer: fix some minor issues 2018-08-24 21:33:01 +02:00
Paul B Mahol
aba720dce2 avcodec: add Brooktree ProSumer Video decoder 2018-08-24 21:07:01 +02:00
Jan Ekström
1931761f18 avformat/movenc: implicitly enable negative CTS offsets for ismv
ISMV lacks any sort of edit list support, as well as tfxd is
effectively the PTS of the fragment for most intents and purposes.

Thus, if b-frames are requested without negative CTS offsets you
end up with N frames' worth of delay (tfxd PTS plus the CTS offset
of the first sample). Negative CTS offsets enable the first sample
to have CTS=DTS, and thus a/v desync due to b-frame reorder delay
is avoided.
2018-08-24 21:00:05 +03:00
James Almer
701aca55fd avformat/flvdec: don't propagate empty extradata
Fixes ticket #7379

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-24 13:21:10 -03:00
James Almer
7890181d7e avformat/movenc: support Opus packets with more than 60ms of audio when writing the Sample Group Description
Since libopus 1.2, packets of sizes 80ms, 100ms and 120ms are allowed.

Fixes assertion failures when trying to mux such streams.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-24 13:21:10 -03:00
James Almer
3d2cf50ebb avcodec/libopusenc: support encoding packets of sizes bigger than 60ms
Packets of sizes 80ms, 100ms and 120ms are allowed since libopus 1.2

Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-24 13:21:09 -03:00
Carl Eugen Hoyos
c2be382620 lavf/Makefile: Fix standalone compilation of the matroska and webm muxers.
Reported-by: irc user Kam_
2018-08-24 12:59:41 +02:00
Gyan Doshi
d0b48a9604 avdevice/decklink_enc: print preroll and buffer size
Helpful in diagnosing latency issues.
2018-08-24 10:15:32 +05:30
James Almer
35c84ae834 Revert "avcodec/opus_parser: Handle complete frames flag."
This reverts commit 7e0df5910e.

"complete frames" containers, even if they don't need to assemble
packets, still depended on this code for proper packet duration and
timestamp generation.
2018-08-23 17:34:25 -03:00