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

86991 Commits

Author SHA1 Message Date
Brice Waegeneire
6a6eec485d doc/filters: typo in frei0r
Signed-off-by: Brice Waegeneire <brice.wge@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-23 14:58:29 +02:00
Vodyannikov Aleksandr
47c9365724 avcodec/cfhd: Fix decoding regression due to height check
Fixes: Ticket6546

Regression since: 54aaadf648

Reviewed-by: Muhammad Faiz <mfcc64@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-23 14:58:29 +02:00
foo86
dd4b7badb4 avcodec/dcaadpcm: fix use of uninitialized variable
Fixes CID 1409924.
2017-07-23 00:28:18 +03:00
foo86
34fb84a97d avcodec/dcaadpcm: check for av_malloc() failure
Fixes CID 1409915.
2017-07-23 00:28:18 +03:00
Mark Thompson
f2c11b9337 pixdesc: Reindent after previous commit 2017-07-22 21:51:41 +01:00
Mark Thompson
f48efb14f9 pixdesc: Explicitly handle invalid arguments to av_find_best_pix_fmt_of_2() 2017-07-22 21:51:26 +01:00
Vittorio Giovara
d24a82d2e2 ffprobe: Print color properties from show_frames
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-07-21 20:19:07 +02:00
Vittorio Giovara
dc9735eb67 hevc: Make sure to update the current frame transfer characteristic
Otherwise the first decoded frame will still be tagged with the
original transfer instead of the alternative one.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2017-07-21 20:07:40 +02:00
Vittorio Giovara
2e91a96d7b zscale: Factor out graph building 2017-07-21 20:07:40 +02:00
Vittorio Giovara
0a243bedec zscale: Factor out format initialization 2017-07-21 20:07:40 +02:00
Michael Niedermayer
edc88646ee avcodec/diracdec: Check dimensions which are closer to what is allocated in alloc_sequence_buffers()
Fixes OOM
Fixes: 2674/clusterfuzz-testcase-minimized-4999700518273024

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-21 17:37:05 +02:00
Michael Niedermayer
1196e53b70 doc: Add initial documentation explaining undefined behavior and SUINT
Requested-by: Kieran Kunhya <kierank@obe.tv>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 17:37:05 +02:00
Kaustubh Raste
ef1b4bdf44 libavutil/mips: Updated msa generic macros
Reduced msa load-store code.
Removed inline asm of GP load-store for 64 bit.
Updated variable names in GP load-store macros for naming consistency.
Corrected macro descriptions.

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-21 17:37:05 +02:00
foo86
67af24da0d MAINTAINERS: add myself
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-21 12:18:48 -03:00
James Almer
7c9d2ad45f avcodec/dca: remove GetBitContext usage from avpriv_dca_parse_core_frame_header()
This prevents potential ABI issues with GetBitContext.

Reviewed-by: foo86 <foobaz86@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-07-21 12:18:10 -03:00
Wan-Teh Chang
99c5ac2039 avcodec/h264: Declare the local variable decode_chroma as const.
ff_h264_decode_mb_cabac() and ff_h264_decode_mb_cavlc() are very long
functions. Declaring decode_chroma as const makes it clear the variable
doesn't change after initialization.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Wan-Teh Chang
b77e26b285 avcodec/hevcdec: hevc_await_progress: declare |y| only if used.
hevc_await_progress() uses the variable |y| only inside the "if" block.
So |y| only needs to be declared and initialized in that block.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Wan-Teh Chang
ea1ca17be2 avcodec/x86/cavsdsp: Delete #include "libavcodec/x86/idctdsp.h".
This file already has #include "idctdsp.h", which is resolved to the
idctdsp.h header in the directory where this file resides by compilers.
Two other files in this directory, libavcodec/x86/idctdsp_init.c and
libavcodec/x86/xvididct_init.c, also rely on #include "idctdsp.h"
working this way.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-07-21 02:08:33 +02:00
Rostislav Pehlivanov
3aca16e857 opus_rc: fix CDF encoding of zeroes
0th CDF value is where probabilities are.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-07-20 08:24:46 +01:00
James Almer
0a813ca091 fate: add libavdevice/reverse.c to fate-source 2017-07-20 01:59:43 -03:00
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