Commit Graph

86821 Commits

Author SHA1 Message Date
James Almer 3cd616a0c9 avdevice: make ff_reverse available on shared builds
Should fix compilation failures introduced by 9b93795890.
2017-07-20 00:33:29 -03:00
Paul B Mahol 12791ec5b0 avfilter/af_astats: measure dynamic range
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 21:07:45 +02:00
James Almer cb13f44831 avcodec/dolby_e: use av_clip_uintp2()
Fixes fate-source.
2017-07-19 15:19:59 -03:00
Paul B Mahol a17fcd8e04 avfilter/af_astats: do not overwrite already set values when doing reset
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-07-19 20:11:43 +02:00
George Boyle 6e156075b0 avfilter: Add blue and violet noise generation filters
For the blue and violet noise, I took the pink and brown noise
respectively and subtracted the offsets instead of adding them. When I
eyeball the frequency spectrum of the resulting outputs it looks correct
to me, i.e. the blue graph appears to be a mirror image of the pink, and
the same can be said of the violet and the brown. I did not do anything
else to confirm the correctness.
2017-07-19 19:51:04 +02:00
foo86 f04ef26816 avformat: add SMPTE 337M demuxer 2017-07-19 12:27:33 +02:00
foo86 930fe4b1f7 avcodec: add Dolby E decoder 2017-07-19 12:27:32 +02:00
Muhammad Faiz 22b72de04b avfilter/pthread: use slice threading from avutil
Benchmark (with 2 cpus):
./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
threads=2:
  old: 31.129s 31.446s 31.574s
  new: 29.602s 29.636s 29.656s
threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation):
  old: 40.132s 40.279s 40.279s
  new: 39.308s 39.570s 39.693s
threads=4:
  old: 31.306s 31.366s 31.654s
  new: 30.231s 30.360s 30.451s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:38 +07:00
Muhammad Faiz b505f15b15 avcodec/pthread_slice: use slice threading from avutil
Also remove pthread_cond_broadcast(progress_cond) on uninit.
Broadcasting it is not required because workers are always
parked when they are not in thread_execute. So it is imposible
that a worker is waiting on progress_cond when uninitialized.

Benchmark:
./ffmpeg -threads $threads -thread_type slice -i 10slices.mp4 -f null null
threads=2:
  old: 70.212s 70.525s 70.877s
  new: 65.219s 65.377s 65.484s
threads=3:
  old: 65.086s 66.306s 66.409s
  new: 63.229s 65.026s 65.116s
threads=4:
  old: 60.993s 61.482s 62.123s
  new: 59.224s 59.441s 59.667s
threads=5:
  old: 57.576s 57.860s 58.832s
  new: 53.032s 53.948s 54.086s

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:51:32 +07:00
Muhammad Faiz a3d3cfa65c avutil: merge slice threading implementation from avcodec and avfilter
Rework it to improve performance. Now mutex is not shared by workers,
instead each worker has its own mutex and condition variable. This
reduces lock contention between workers. Also use atomic variable for
counter.

The interface also allows execute to run special function on main
thread, requested by Ronald.

Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-07-19 15:50:07 +07:00
Jan Sebechlebsky 5c9dcd5c48 libavformat/fifo: Fix initialization of underlying AVFormatContext
Muxers may want to directly access filename in stored in
AVFormatContext. For example in case of RTSP, the filename (url)
is used by the muxer to extract parameters of the connection.
These muxers will fail when used with fifo pseudo-muxer.

This commit fixes this issue by passing filename from AVFormatContext
of fifo pseudo-muxer to all AVFormatContext(s) of underlying muxers
during initialization.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2017-07-19 10:08:19 +02:00
foo86 012620aa1b avcodec/dca: avoid using bitstream reader in a non-standard way
Use proper get_bits.h functions instead of directly accessing index.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:58 -03:00
foo86 902cd30e9b avcodec/dca_core: probe extension headers directly
Avoid using bitstream reader in a non-standard way by directly accessing
index. Use bit shifting/masking operations instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:58 -03:00
foo86 07a7f08b1e avcodec/dca_parser: avoid use of magic values
Duration computation can be simplified because number of PCM blocks is
only allowed to be a multiple of 8.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:58 -03:00
foo86 4b6c212e85 avcodec/dca_parser: export profile information
Permits applications to access DTS profile information without having to
decode a frame.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:57 -03:00
foo86 3b7ec920af avformat/dtsdec: switch to common frame header parsing function
This makes probing for regular DTS more strict because more header
fields are checked and values not supported by decoder are now rejected.

Also fixes an issue original code had with 14-bit streams: 96 bits of
header were expected, however only 84 bits were converted, which was not
enough to parse LFE flag.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:57 -03:00
foo86 e54b9be1ff avcodec/dca_parser: switch to common frame header parsing function
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:57 -03:00
foo86 33fc6c17a6 avcodec/dca_core: switch to common frame header parsing function
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:56 -03:00
foo86 2123ddb425 avcodec: add avpriv_dca_parse_core_frame_header()
There are 3 different places where DCA core frame header is parsed:
decoder, parser and demuxer. Each one uses ad-hoc code. Add common core
frame header parsing function that will be used in all places.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:56 -03:00
foo86 9e37cc1101 avcodec/dca: move bits per sample array to dca.c
It will be used by the parser. This change avoids unwanted parser
dependency on dcadata.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:55 -03:00
foo86 f6b86b62f7 avcodec/dca: move some enumeration typedefs into headers
These values will be used by the parser. Prefix them with DCA_
appropriately.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-18 21:04:55 -03:00
Carl Eugen Hoyos 5c7e7ac6d4 lavc/codec_desc: Mark some uncompressed codecs as lossless.
Fixes ticket #6526.
2017-07-19 01:55:21 +02:00
Mark Thompson e6b4fb95d7 doc: Fix names of VAAPI encoders
They were all reversed (oops).
2017-07-18 23:36:06 +01:00
Mark Thompson 3192821237 pixdesc: Add a test for av_find_best_pix_fmt_of_2() 2017-07-18 22:56:30 +01:00
Mark Thompson 8a442d7a8a pixdesc: Improve scoring for opaque/unknown pixel formats
Hardware pixel formats do not tell you anything about their actual
contents, but should still score higher than formats with completely
unknown properties, which in turn should score higher than invalid
formats.

Do not return an AVERROR code as a score.

Fixes a hang in libavfilter where format negotiation gets stuck in a
loop because AV_PIX_FMT_NONE scores more highly than all other
possibilities.
2017-07-18 22:56:30 +01:00
Jun Zhao 5b8a708492 lavc/vaapi_encode_h265: Remove duplicate slice_segment_address.
the VAEncSliceParameterBufferHEVC in libva have support this field,
so remove the duplicate field in VAAPIEncodeH265MiscSliceParams.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-07-18 22:56:24 +01:00
Michael Niedermayer c61715e2c5 avcodec/htmlsubtitles: Be a bit more picky on syntax
This reduces the number of strstr() calls per byte
This diasalows empty tags like '< >' as well as '<' in tags like '<ab<cd<<ef>'

Fixes timeout
Fixes: 1817/clusterfuzz-testcase-minimized-5104230530547712

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-18 22:14:16 +02:00
Michael Niedermayer 2886142e0c avcodec/aacdec_template (fixed point): Check gain in decode_cce() to avoid undefined shifts later
Fixes: runtime error: shift exponent 47 is too large for 32-bit type 'int'
Fixes: 2581/clusterfuzz-testcase-minimized-4681474395602944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-18 22:14:16 +02:00
Rostislav Pehlivanov 79450adfc8 opus: simplify coarse energy beta coefficients
Just put the subtraction in the table.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-18 20:52:06 +01:00
Marton Balint 9b93795890 avdevice/decklink_dec: add support for receiving op47 teletext
v2:
- use uint16_t instead of int to store 10-bit ancillary data
- fix ancillary line numbers for 1080p
- some comments and clarifications as requested by Aaron Levinson

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-18 18:28:57 +02:00
Marton Balint cc0916bfc2 avdevice/decklink_dec: add support for decoding teletext from 10bit ancillary data
This also add supports for 4K DeckLink cards because they always output the
ancillary data in 10-bit.

v2:
- only try teletext decoding for 576i PAL mode
- some comments as requested by Aaron Levinson

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-07-18 18:28:57 +02:00
Carl Eugen Hoyos 4c1aac893c lavc/jpeg2000dec: Read the sample aspect ratio from the jp2 resolution box. 2017-07-18 11:51:10 +02:00
Clément Bœsch dad54e3c29 ffprobe: reindent after previous commit 2017-07-18 10:39:46 +02:00
Clément Bœsch 8e0d5b354e ffprobe: add -(no)find_stream_info expert option 2017-07-18 10:39:45 +02:00
Clément Bœsch af50fbaaeb ffplay: reindent after previous commit 2017-07-18 10:39:43 +02:00
Clément Bœsch 998687f1b2 ffplay: add -(no)find_stream_info expert option 2017-07-18 10:39:42 +02:00
Clément Bœsch d7ea14c5e2 ffmpeg: reindent after previous commit 2017-07-18 10:39:38 +02:00
Clément Bœsch b7a741223d ffmpeg: add -(no)find_stream_info expert option 2017-07-18 10:23:29 +02:00
Rostislav Pehlivanov 04a8e03ef0 opusenc: remove unused variable
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-18 04:12:59 +01:00
Matt Oliver d8f1982639 configure: Fix libvmaf name
Fixes:
    fatal error: libvmaf.h: No such file or directory.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-16 16:12:25 +01:00
Derek Buitenhuis a27c412795 webmdashenc: Fix memory leak
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-16 16:09:17 +01:00
Michael Niedermayer ba4beaf614 avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others

Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-16 16:53:02 +02:00
Ashish Singh 615479d51c avfilter: add LIBVMAF filter
This one changes the previous vmaf patch to libvmaf to keep it separate from the
native implementation of vmaf inside ffmpeg later.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2017-07-16 08:21:32 -04:00
Michael Niedermayer 4de4308d2a avcodec/ffv1dec_template: Fix signed integer overflow
Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 2634/clusterfuzz-testcase-minimized-4540890636877824

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-16 02:09:43 +02:00
Michael Niedermayer 0ef8f03133 avcodec/aacdec_template: Fix undefined integer overflow in apply_tns()
Fixes: runtime error: signed integer overflow: -2147483648 - 1202286525 cannot be represented in type 'int'
Fixes: 2071/clusterfuzz-testcase-minimized-6036414271586304

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-16 01:07:27 +02:00
Michael Niedermayer d0ba0be355 fate: add sub-srt-badsyntax test
Based-on: srt sample by ubitux

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-15 04:16:44 +02:00
Derek Buitenhuis e10c31f331 hdsenc: Remove dead store
This is apparently not supposed to error out anyway.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-14 13:48:56 +01:00
Rostislav Pehlivanov 91b27b8393 opusenc: use float_dsp for non-transient windowing
Also fixes transient windowing

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-14 04:54:32 +01:00
Aleksandr Slobodeniuk 390e028c66 avutil/threadmessage: fix error return in case of av_fifo_alloc failure
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-14 02:30:37 +02:00
Kaustubh Raste df806605f7 avcodec: Add prefetch for mips
Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-14 02:30:37 +02:00