Commit Graph

93110 Commits

Author SHA1 Message Date
Reto Kromer
6174686bc3 doc/faq: update macOS and URLs
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-11 10:13:31 +05:30
James Almer
3e8b8b6b50 avcodec/cbs_av1: don't call cbs_av1_read_trailing_bits() when no bits remain in the OBU
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
2019-02-10 17:43:26 -03:00
Carl Eugen Hoyos
6de396c216 lavf/img2: Move "loop" into common options.
While the image2pipe demuxer ignores the option - confusing users -
the autodetecting demuxers that are favoured over image2 act on it.
2019-02-10 18:56:46 +01:00
Carl Eugen Hoyos
826cc58deb lavf/img2dec: Split img2 and img2pipe options. 2019-02-10 17:56:01 +01:00
Reto Kromer
21858b060f doc/snow: fix typos 2019-02-10 16:46:56 +01:00
Moritz Barsnick
885a80d189 doc: fix various typos
Found with the help of codespell-1.14.0.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-10 21:12:40 +05:30
Reto Kromer
d20902fd23 doc/filters: fix typos
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-10 12:17:09 +05:30
Steven Liu
9ec1f7634a avformat/hlsenc: fix fmp4_init_filename file name with %v problem
when set option fmp4_init_filename to init_%v.mp4
before patch:
the init file will be init_%v_0.mp4, init_%v_1.mp4
after patch:
the init file will be init_0.mp4, init_1.mp4

Reported-By: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-02-10 14:45:43 +08:00
Jan Ekström
a03885b745 lavf/mpegts: add reading of ARIB data coding descriptor
This enables us to read the data coding type utilized for
a specific private data stream, of which we currently are
interested in ARIB caption streams.

The component tag limitations are according to ARIB TR-B14,
and the component IDs are defined in ARIB STD-B10.
2019-02-10 03:30:56 +02:00
Jan Ekström
100bfac6d6 add libaribb24 ARIB STD-B24 caption decoder
* Outputs ASS lines with basic coloring and font scaling for each
  given region.
* Sets the default style to the resolution of the subtitle plane
  (for example, 960x540 / 36pt font for profile A).
* Has options to:
  * Disable ruby text (which is coded as regions which have
    half-height text in libaribb24).
    Enabled by default as without positioning ruby text only
    confuses as it is usually coded in the beginning of the decoded
    subtitle line.
  * Set the working directory, in which libaribb24 will read
    configuration as well as into which it may save broadcast extra
    symbols as PNG.
    Unset by default.

The unconventional library check can be explained by the library's
current master branch being licensed as LGPLv3, but at the time of
writing the latest official release is still licensed under GPLv3.

Thus, one either has to wait for the following release, or enable
GPLv3.
2019-02-10 03:30:52 +02:00
Carl Eugen Hoyos
5c515b5f7d lavf/mpegts: Convert service_name and service_provider to utf-8.
Fixes ticket #6320.
2019-02-09 23:49:51 +01:00
Reto Kromer
5b32f94b97 doc/ffprobe: fix typo and update URL in man 2019-02-09 20:01:18 +01:00
Michael Niedermayer
dfae0e295a tools/target_dec_fate.list: Extend selftests upto issue 2000
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-09 14:40:50 +01:00
Michael Niedermayer
4cde7e62db avcodec/sbrdsp_fixed.c: remove input value limit for sbr_sum_square_c()
Fixes: 1377/clusterfuzz-testcase-minimized-5487049807233024
Fixes: assertion failure in sbr_sum_square_c()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-09 14:40:50 +01:00
Carl Eugen Hoyos
0cac68bcf9 lavu/parseutils: Allow to parse >= 100 hours.
Reported and tested by gamnark.
Fixes ticket #7721.
2019-02-09 13:59:10 +01:00
Michael Niedermayer
7f8bfbee36 avcodec/h264_parse: Clear ref_list[1] if only [0] is used
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-08 12:00:59 +01:00
Decai Lin
9d800d39d5 avcodec/h264_parse: no need check ref list1 for P slices.
This is robust for some corner case there is incorrect list1 count
in pps header, but it's a P slice and can be decoded well.

Signed-off-by: Decai Lin <decai.lin@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-08 12:00:59 +01:00
chcunningham
1c15449ca9 avformat/mov: validate chunk_count vs stsc_data
Bad content may contain stsc boxes with a first_chunk index that
exceeds stco.entries (chunk_count). This ammends the existing check to
include cases where chunk_count == 0. It also patches up the case
when stsc refers to unknown chunks, but stts has no samples (so we
can simply ignore stsc).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-08 12:00:59 +01:00
chcunningham
3ea87e5d9e avformat/mov.c: require tfhd to begin parsing trun
Detecting missing tfhd avoids re-using tfhd track info from the previous
moof. For files with multiple tracks, this may make a mess of the
avindex and fragindex, which can later trigger av_assert0 in
mov_read_trun().

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-08 12:00:59 +01:00
Marton Balint
7cab5471b2 ffplay: add support for setting the number of filter threads
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Marton Balint
fe99a51c40 ffplay: add missing avfilter_graph_alloc result check
Also do not allocate a graph at start, we will reallocate it anyway.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Marton Balint
28dd73a443 ffplay: use different decoder names for each media type
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Nikolas Bowe
2b8458fcc5 avformat/movenc: Add more error checking when writing sample entries.
Fixes a problem where a sample entry which cannot be written correctly appears to succeed, but produces an invalid file.
For example, this command:
ffmpeg -f lavfi -i sine=frequency=1000:duration=5 -codec:a ac3 -movflags +empty_moov -frag_duration 5000000 /tmp/foo.mp4
produced a file with the ac-3 sample entry, but no AC3SpecificBox (dac3) child, which is invalid according to ETSI TS 102 366.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-07 00:29:01 +01:00
Michael Niedermayer
1aa796bc9c avcodec/mpegvideo_enc: Use av_assert1() instead of assert() in merge_context_after_encode()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-07 00:29:01 +01:00
Michael Niedermayer
1e59071aad avcodec/ac3: Explicitly return to discard large amounts of nonsense bytes
Changes 19sec to 10ms (12559) runtime, 17sec to 177ms (12570)
Fixes: Timeout
Fixes: 12559/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_fuzzer-5666516266123264
Fixes: 12561/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AC3_FIXED_fuzzer-5682923041193984
Fixes: 12570/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EAC3_fuzzer-5194734308425728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-07 00:29:01 +01:00
Paweł Wegner
835ab35ef0 libavformat/dashdec: disable seeking only for live streams.
Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
2019-02-06 13:01:34 +01:00
Lauri Kasanen
8522d219ce libswscale/ppc: VSX-optimize 9-16 bit yuv2planeX
./ffmpeg_g -f rawvideo -pix_fmt rgb24 -s hd1080 -i /dev/zero -pix_fmt yuv420p16be \
-s 1920x1728 -f null -vframes 100 -v error -nostats -

9-14 bit funcs get about 6x speedup, 16-bit gets about 15x.
Fate passes, each format tested with an image to video conversion.

Only POWER8 includes 32-bit vector multiplies, so POWER7 is locked out
of the 16-bit function. This includes the vec_mulo/mule functions too,
not just vmuluwm.

With TIMER_REPORT skips disabled:
yuv420p9le
  12412 UNITS in planarX,  131072 runs,      0 skips
  73136 UNITS in planarX,  131072 runs,      0 skips
yuv420p9be
  12481 UNITS in planarX,  131072 runs,      0 skips
  73410 UNITS in planarX,  131072 runs,      0 skips
yuv420p10le
  12322 UNITS in planarX,  131072 runs,      0 skips
  72546 UNITS in planarX,  131072 runs,      0 skips
yuv420p10be
  12291 UNITS in planarX,  131072 runs,      0 skips
  72935 UNITS in planarX,  131072 runs,      0 skips
yuv420p12le
  12316 UNITS in planarX,  131072 runs,      0 skips
  72708 UNITS in planarX,  131072 runs,      0 skips
yuv420p12be
  12319 UNITS in planarX,  131072 runs,      0 skips
  72577 UNITS in planarX,  131072 runs,      0 skips
yuv420p14le
  12259 UNITS in planarX,  131072 runs,      0 skips
  72516 UNITS in planarX,  131072 runs,      0 skips
yuv420p14be
  12440 UNITS in planarX,  131072 runs,      0 skips
  72962 UNITS in planarX,  131072 runs,      0 skips
yuv420p16le
  10548 UNITS in planarX,  131072 runs,      0 skips
  73429 UNITS in planarX,  131072 runs,      0 skips
yuv420p16be
  10634 UNITS in planarX,  131072 runs,      0 skips
 150959 UNITS in planarX,  131072 runs,      0 skips

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2019-02-05 09:34:53 +02:00
Lauri Kasanen
fc6022e108 avutil/ppc/cpu: Fix power8 linux detection
The existing code was in no released kernel that I can see. The corrected code
was added in 3.9.
2019-02-05 09:29:57 +02:00
Marton Balint
4b46d1ee46 avformat/async: fix assertion condition when draining buffer
Fixes some random assertion failures with

ffprobe -show_packets async:samples/ffmpeg-bugs/trac/ticket6132/Samsung_HDR_-_Chasing_the_Light.ts > /dev/null

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-04 21:43:30 +01:00
Marton Balint
56c58b99d0 avformat/mpegts: cache PID discard values
discard_pid can be quite expensive, so let's cache it and recalculate it on
every packet start.

ffmpeg -y -i samples/MPEG-VOB/sdtv/RAI.ts -c copy -map 0✌️0 -map 0🅰️0 -f mpegts /dev/null

Before:
   1685 decicycles in handle_packet,  523483 runs,    805 skips

After:
    883 decicycles in handle_packet,  523505 runs,    783 skips

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-04 21:43:30 +01:00
Andreas Rheinhardt
1eb6bfbc1f avcodec/mpeg4_unpack_bframes_bsf: Use avpriv_find_start_code
instead of an ad-hoc function to search for start codes in order to
remove code duplication and to improve performance.

Improved performance of finding startcodes from 52606 decicycles to
9543 decicycles based upon 262144 runs for a 1 Mb/s MPEG4 video.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-04 19:59:21 +01:00
Lauri Kasanen
87b00cac2a MAINTAINERS: add myself to the PPC section
Signed-off-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-04 19:14:20 +01:00
Gyan Doshi
075fd5ba45 doc/filters: correct headphone examples
lavfi-complex is not a valid option. [a:0] is not correct pad form for input.
2019-02-04 10:37:11 +05:30
Michael Niedermayer
e35c3d887b avcodec/pgssubdec: Check for duplicate display segments
In such a duplication the previous gets overwritten and leaks

Fixes: memleak
Fixes: 12510/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGSSUB_fuzzer-5694439226343424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-03 19:40:20 +01:00
Shiyou Yin
b429c86d84 avcodec/mips: [loongson] optimize put_hevc_qpel_h_8 with mmi.
Optimize put_hevc_qpel_h_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 2%(2.39x to 2.44x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-02 20:17:37 +01:00
Shiyou Yin
dceefb2b84 avcodec/mips: [loongson] optimize put_hevc_qpel_bi_h_8 with mmi.
Optimize put_hevc_qpel_bi_h_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 2.1%(2.34x to 2.39x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-02 20:17:37 +01:00
Shiyou Yin
c0942b7a2c avcodec/mips: [loongson] optimize put_hevc_epel_bi_hv_8 with mmi.
Optimize put_hevc_epel_bi_hv_8 with mmi in the case width=4/8/12/16/24/32.
This optimization improved HEVC decoding performance 1.7%(2.30x to 2.34x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-02 20:17:37 +01:00
Shiyou Yin
0c43429210 avcodec/mips: [loongson] optimize put_hevc_qpel_uni_hv_8 with mmi.
Optimize put_hevc_qpel_uni_hv_8 with mmi in the case width=4/8/12/16/24/32/48/64.
This optimization improved HEVC decoding performance 2.7%(2.24x to 2.30x, tested on loongson 3A3000).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-02-02 20:17:37 +01:00
Paul B Mahol
08b83bf828 avfilter/vf_mix: always output frame if array is filled 2019-02-02 18:54:54 +01:00
Paul B Mahol
9e0e8e10c7 avfilter/vf_mix: add timeline support to tmix filter 2019-02-02 18:52:03 +01:00
Jun Zhao
6dc06e979c doc/filters: document ranges and defaults for nlmeans options
document ranges and defaults for nlmeans options

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2019-02-02 11:18:21 +08:00
Carl Eugen Hoyos
73d4efc596 lavu/imgutils: Use FFABS() instead of abs() for ptrdiff_t.
Fixes a warning with clang:
libavutil/imgutils.c:314:16: warning: absolute value function 'abs'
given an argument of type 'ptrdiff_t' (aka 'long') but has
parameter of type 'int' which may cause truncation of value
2019-02-01 23:19:25 +01:00
Clément Bœsch
1a9c6cc411 lavfi/nlmeans: use a dynamic size for the weight LUT 2019-02-01 20:58:47 +01:00
Clément Bœsch
65e61febc8 lavfi/nlmeans: simplify log() call 2019-02-01 20:58:47 +01:00
Jun Zhao
6c586303a1 lavfi/nlmeans: improve the performance
Remove the pdiff_lut_scale in nlmeans and increase weight_lut table size
from 2^9 to 500000, this change will avoid using pdiff_lut_scale in
nlmeans_slice() for weight_lut table search, improving the performance
by about 12%. (in 1080P size picture case).

Use the profiling command like:

perf stat -a -d -r 5 ./ffmpeg -i input -an -vf nlmeans=s=30 -vframes 10 \
-f null /dev/null

without this change:
when s=1.0(default value) 63s
     s=30.0               72s

after this change:
     s=1.0(default value) 56s
     s=30.0               63s

Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Clément Bœsch <u@pkh.me>
2019-02-01 20:58:43 +01:00
Carl Eugen Hoyos
ed20fbcd48 lavc/aarch64/vp8dsp: Fix the include guard.
Fixes fate-source.
2019-01-31 22:35:44 +01:00
Justin Bull
22fc9cdd7e INSTALL.md: Fix Markdown formatting
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-01-31 10:29:16 -09:00
Magnus Röös
833fed5253 libavcodec: vp8 neon optimizations for aarch64
Partial port of the ARM Neon for aarch64.

Benchmarks from fate:

benchmarking with Linux Perf Monitoring API
nop: 58.6
checkasm: using random seed 1760970128
NEON:
 - vp8dsp.idct       [OK]
 - vp8dsp.mc         [OK]
 - vp8dsp.loopfilter [OK]
checkasm: all 21 tests passed
vp8_idct_add_c: 201.6
vp8_idct_add_neon: 83.1
vp8_idct_dc_add_c: 107.6
vp8_idct_dc_add_neon: 33.8
vp8_idct_dc_add4y_c: 426.4
vp8_idct_dc_add4y_neon: 59.4
vp8_loop_filter8uv_h_c: 688.1
vp8_loop_filter8uv_h_neon: 216.3
vp8_loop_filter8uv_inner_h_c: 649.3
vp8_loop_filter8uv_inner_h_neon: 195.3
vp8_loop_filter8uv_inner_v_c: 544.8
vp8_loop_filter8uv_inner_v_neon: 131.3
vp8_loop_filter8uv_v_c: 706.1
vp8_loop_filter8uv_v_neon: 141.1
vp8_loop_filter16y_h_c: 668.8
vp8_loop_filter16y_h_neon: 242.8
vp8_loop_filter16y_inner_h_c: 647.3
vp8_loop_filter16y_inner_h_neon: 224.6
vp8_loop_filter16y_inner_v_c: 647.8
vp8_loop_filter16y_inner_v_neon: 128.8
vp8_loop_filter16y_v_c: 721.8
vp8_loop_filter16y_v_neon: 154.3
vp8_loop_filter_simple_h_c: 387.8
vp8_loop_filter_simple_h_neon: 187.6
vp8_loop_filter_simple_v_c: 384.1
vp8_loop_filter_simple_v_neon: 78.6
vp8_put_epel8_h4v4_c: 3971.1
vp8_put_epel8_h4v4_neon: 855.1
vp8_put_epel8_h4v6_c: 5060.1
vp8_put_epel8_h4v6_neon: 989.6
vp8_put_epel8_h6v4_c: 4320.8
vp8_put_epel8_h6v4_neon: 1007.3
vp8_put_epel8_h6v6_c: 5449.3
vp8_put_epel8_h6v6_neon: 1158.1
vp8_put_epel16_h6_c: 6683.8
vp8_put_epel16_h6_neon: 831.8
vp8_put_epel16_h6v6_c: 11110.8
vp8_put_epel16_h6v6_neon: 2214.8
vp8_put_epel16_v6_c: 7024.8
vp8_put_epel16_v6_neon: 799.6
vp8_put_pixels8_c: 112.8
vp8_put_pixels8_neon: 78.1
vp8_put_pixels16_c: 131.3
vp8_put_pixels16_neon: 129.8

Signed-off-by: Magnus Röös <mla2.roos@gmail.com>
2019-01-31 20:17:51 +01:00
Carl Eugen Hoyos
608572ce84 tests/checkasm/checkasm: Do not define an unused function.
Fixes the following warning:
tests/checkasm/checkasm.c:615:12: warning: 'bench_init_ffmpeg' defined but not used
2019-01-31 20:16:17 +01:00
Michael Niedermayer
497c9b0cce avformat/rtsp: Check number of streams in sdp_parse_line()
Fixes: OOM

Found-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-31 17:33:50 +01:00