1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

83266 Commits

Author SHA1 Message Date
Matthieu Bouron
e2d336cf64 lavfi/framepool: re-indent after previous commit 2017-01-12 10:22:52 +01:00
Matthieu Bouron
eb3368178e lavfi/framepool: add audio support 2017-01-12 10:22:52 +01:00
Matthieu Bouron
b1f68f00b1 lavfi/framepool: rename FFVideoFramePool to FFFramePool 2017-01-12 10:22:52 +01:00
James Almer
e71b8119e7 avcodec/mathops: add missing header for ff_reverse
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-11 21:18:03 -03:00
Martin Vignali
682769d3d3 fate/psd : add test for 256 color
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-11 22:25:21 +01:00
Zhengxu
1a79b8f8d2 ffmpeg: Add an option "qsv_device" to choose proper node for QSV child device (vaapi or dxva2)
Reason: For some cases, such as 2 or more graphics cards existing, the
default command line may fail because ffmpeg does not open the correct
device node:
    ffmpeg -hwaccel qsv -c:v h264_qsv -i test.264 -c:v h264_qsv out.264
Let user choose the proper one by running like below:
    ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv \
-i test.264 -c:v h264_qsv out.264

Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com>
Signed-off-by: Huang, Zhengxu <zhengxu.maxwell@gmail.com>
Signed-off-by: Andrew, Zhang <huazh407@gmail.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-01-11 20:21:09 +00:00
Carl Eugen Hoyos
f55da2200d lavf/dss: Support version 3 files / files with larger header.
Fixes ticket #6072.
2017-01-11 18:27:00 +01:00
Derek Buitenhuis
14b9060160 hevc: Mark as having threadsafe init
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-01-11 12:21:43 -05:00
Steinar H. Gunderson
2a293ec7ac avcodec: add Newtek SpeedHQ decoder
This decoder can decode all existing SpeedHQ formats (SHQ0–5, 7, and 9),
including correct decoding of the alpha channel.

1080p is decoded in 142 fps on one core of my i7-4600U (2.1 GHz Haswell),
about evenly split between bitstream reader and IDCT. There is currently
no attempt at slice or frame threading, even though the format trivially
supports both.

NewTek very helpfully provided a full set of SHQ samples, as well as
source code for an SHQ2 encoder (not included) and assistance with
understanding some details of the format.
2017-01-11 16:02:10 +01:00
Steinar H. Gunderson
eaff1aa09e avcodec: move bitswap_32() into a header file
Allows more codecs than mpeg12video to make use of it.
2017-01-11 15:40:01 +01:00
Paul B Mahol
107b3064d8 avcodec/wmaprodec: do not force extradata presence for XMA
Mainly useful for supporting decoding of headerless files.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-11 11:48:07 +01:00
Paul B Mahol
45cd50e5e2 avcodec/psd: fix ugly typo
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-11 11:42:50 +01:00
Steven Liu
184c13f64a avfilter/vf_libopencv: fix resource leak in read_shape_frame_filter
CID: 1324298
add a label when error goto the label to release resource

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-11 09:59:55 +08:00
Martin Vignali
658e626cc0 libavcodec/psd : add support for psd bitmap mode
Fixes ticket #6044

Based on patch by Carl Eugen Hoyos
2017-01-11 00:22:25 +01:00
Carl Eugen Hoyos
4313ed511a lavc/psd: Interpret DUOTONE as GRAYSCALE.
This is what gimp, ImageMagick and FreeImage do and what the
Adobe Photoshop file format specification suggests.
Fixes a sample from ticket #6045.

Reviewed-by: Martin Vignali
2017-01-11 00:17:59 +01:00
Steven Liu
daff04bd18 avformat/hlsenc: fix the bug when the largest segment duration pointer right value is 0
when the segments largest duration value is look like 4.000000, the
EXT-X-TARGETDURATION value should equ 4.
it's wrong when hlsenc use ceil, so fix it.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-11 04:38:34 +08:00
Steven Liu
2deafd9898 avformat/hlsenc: fix hls start and tail segment duration
problem

fix ticket: #6067

Tested-by: Pero
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-11 04:33:13 +08:00
Steven Liu
d9c2cfd316 avcodec/bsf: fix resource leak in av_bsf_list_parse_str
cid: 1396268
when av_strdup(str) error, the lst need release

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-11 04:09:47 +08:00
Michael Niedermayer
f48b6b8b91 avcodec/tiff: Perform multiply in tiff_unpack_lzma() as 64bit
This should make no difference as the value should not be able to be that large
but its more correct this way

Fixes CID1348138

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-10 00:55:15 +01:00
Lou Logan
890320b1c0 doc/scaler: mention default scaling algorithm
Default is "bicubic".

Signed-off-by: Lou Logan <lou@lrcd.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-09 12:58:25 -09:00
Paul B Mahol
24d31a8074 avcodec/qdm2: make use of bytestream2
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-09 18:43:19 +01:00
Paul B Mahol
7aef56864c avfilter/af_sofalizer: speed and clean up fast convolution a little
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-09 18:38:25 +01:00
Henrik Gramner
cd09e3b349 x86inc: Avoid using eax/rax for storing the stack pointer
When allocating stack space with an alignment requirement that is larger
than the current stack alignment we need to store a copy of the original
stack pointer in order to be able to restore it later.

If we chose to use another register for this purpose we should not pick
eax/rax since it can be overwritten as a return value.
2017-01-09 16:00:29 +01:00
Wang Bin
0e8b68a2c4 avutil/tile: check clock_gettime at runtime for apple platforms
clock_gettime is avalible since macOS 10.12 and iOS 10.0. Because of
weak linking, clock_gettime can be build without error with new
macOS/iOS sdk, but the symbol may not exist on the target system.
Explicitly checking the symbol is required.
https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

Signed-off-by: Wang Bin <wbsecg1@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-09 11:52:06 +08:00
Jun Zhao
b53b3a4f6a lavc/vaapi_encode_h264: disable B frames in baseline profile
Disable B frames when using baseline/constrained baseline profile,
following H.264 spec Annex A.2.1.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Yi A Wang <yi.a.wang@intel.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2017-01-09 00:28:08 +00:00
Paul B Mahol
0ddc24d232 avfilter/af_dynaudnorm: fix hang with too short input
The only thing we can do at such point is return samples unchanged.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-08 20:42:17 +01:00
Michael Niedermayer
762bf6f4af avcodec/bsf: Fix av_bsf_list_free()
Negate null check
Fixes CID1396248

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-08 15:26:01 +01:00
Michael Niedermayer
bd83c295fc avcodec/omx: Do not pass negative value into av_malloc()
Fixes CID1396849

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-08 15:25:14 +01:00
Tobias Stoeckmann
95d9a85ca3 ffserver: local OOB write with custom program name
When the command line for children is created, it is assumed that
my_program_name always ends with "ffserver", which doesn't have to
be true if ffserver is called through a symbolic link.

In such a case, it could be that not enough space for "ffmpeg" is
available at the end, leading to a buffer overflow.

One example would be:

$ ln -s /usr/bin/ffserver ~/f; ~/f

As this is only a local buffer overflow, i.e. is based on a weird
program call, this has NO security impact.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-08 03:50:56 +01:00
Paul B Mahol
fd010406c0 avformat/riff: extend MagicYUV fourcc list
Newer version of encoder can create such files.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-07 17:26:33 +01:00
foo86
000638431c avcodec/dca: add support for 20-bit XLL
Fixes ticket #6063.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-07 11:28:12 -03:00
softworkz
20e8be0c20 avformat/matroskaenc: Regression fix for invalid MKV headers
The following three commits created a regression by writing initially
invalid mkv headers:

650e17d88b avformat/matroskaenc: write a
CRC32 element on Tags
3bcadf8227 avformat/matroskaenc: write a
CRC32 element on Info
ee888cfbe7 avformat/matroskaenc: postpone
writing the Tracks master

Symptoms:

- You can no longer playback a file that is still processed by ffmpeg,
e.g. VLC fails playback
- You can no longer stream a file to a client while if is still being
processed
- Various diagnosing tools show header errors or incomplete headers
(e.g. ffprobe, mediainfo, mkvalidator)

Note: The symptoms do not apply to completed files or ffmpeg runs that
were interrupted with 'q'

Cause:

The mentioned commits made changes in a way that some header elements
are only partially written in
mkv_write_header, leaving the header in an invalid state. Only in
mkv_write_trailer, these elements
are finished correctly, but that does only occur at the end of the
process.

Regression:

Before these commits were applied, mkv headers have always been valid,
even before completion of ffmpeg.
This has worked reliably over many versions of ffmpeg, to it was an
obvious regression.

Bugtracker:

This issue has been recorded as #5977 which is resolved by this patch

Patch:

The patch adds a new function 'end_ebml_master_crc32_preliminary' that
preliminarily finishes the ebml
element without destroying the buffer. The buffer can be used to update
the ebml element later during
mkv_write_trailer. But most important: mkv_write_header finishes with a
valid mkv header again.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-07 11:20:36 -03:00
Clément Bœsch
27627c281e lavfi/selectivecolor: add a link to algorithm explanations 2017-01-07 14:25:57 +01:00
softworkz
9488032e10 libavformat/avio: Add avio_get_dyn_buf function
This commit adds the avio_get_dyn_buf function which allows accessing
the
content of a DynBuffer without destroying it.

This is required in matroskaenc for preliminary writing (correct) mkv
headers.

Context for this change is fixing regression bug #5977.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-07 13:04:05 +01:00
Paul B Mahol
90ac9f4094 avcodec: add QDMC decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-06 22:05:45 +01:00
Paul B Mahol
49633f9f74 avcodec/iff: add support for vertical word compression in ILBM
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-06 21:45:52 +01:00
Andreas Cadhalpun
d74c471a39 omadec: fix overflows during bit rate calculation
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-06 19:58:42 +01:00
Kevin Wheatley
09905c412d libavcodec/exr: Fix blank output when data window != display window
looks like there is a bug in commit
1a08758e7c relating to the handling of
ptr in decode_frame after decode_block is called, before this commit
ptr would have been incremented for each line in the data window, now
after the commit it is left at the start of the first included line
rather than the line after the data window then the code sets the
remaining lines to 0 and thus the whole image is over written.

Fix by adjusting ptr to the correct line after decode_block returns

Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
2017-01-06 18:01:12 +01:00
Michael Niedermayer
bc6b53ae99 avfilter/asrc_flite: Fix textbuf leak
Fixes CID1244189

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-06 16:26:05 +01:00
Paul B Mahol
520c0736fd avfilter/vf_shuffleframes: allow also dropping frames
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-06 12:27:46 +01:00
Steven Liu
d1f3e475f9 avformat/test/fifo_muxer: add check for FailingMuxerPacketData alloc
CID: 1396257

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-06 06:35:32 +08:00
Rostislav Pehlivanov
2d208aaabe imdct15: replace the FFT with a faster PFA FFT algorithm
This commit replaces the current inefficient non-power-of-two FFT with a
much faster FFT based on the Prime Factor Algorithm.
Although it is already much faster than the old algorithm without SIMD,
the new algorithm makes use of the already very throughouly SIMD'd power
of two FFT, which improves performance even more across all platforms
which we have SIMD support for.

Most of the work was done by Peter Barfuss, who passed the code to me to
implement into the iMDCT and the current codebase. The code for a
5-point and 15-point FFT was derived from the previous implementation,
although it was optimized and simplified, which will make its future
SIMD easier. The 15-point FFT is currently using 6% of the current
overall decoder overhead.

The FFT can now easily be used as a forward transform by simply not
multiplying the 5-point FFT's imaginary component by -1 (which comes
from the fact that changing the complex exponential's angle by -1 also
changes the output by that) and by multiplying the "theta" angle of the
main exptab by -1. Hence the deliberately left multiplication by -1 at
the end.

FATE passes, and performance reports on other platforms/CPUs are
welcome.

Performance comparisons:

iMDCT, PFA:
101127 decicycles in speed,   32765 runs,      3 skips
iMDCT, Old:
211022 decicycles in speed,   32768 runs,      0 skips

Standalone FFT, 300000 transforms of size 960:
    PFA        Old FFT     kiss_fft    libfftw3f
    3.659695s, 15.726912s, 13.300789s, 1.182222s

Being only 3x slower than libfftw3f is a big achievement by itself.

There appears to be something capping the performance in the iMDCT side
of things, possibly during the pre-stage reindexing. However, it is
certainly fast enough for now.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-01-05 22:32:02 +00:00
Rostislav Pehlivanov
4fdacf4cdb imdct15: remove the AArch64 assembly
Prep work for the next commit, which will add a new FFT algorithm
which makes the iMDCT over 3x faster than it is currently (standalone,
the FFT is with some framesizes over 10x faster).

The new FFT algorithm uses the already thouroughly SIMD'd power of two
FFT which already has SIMD for AArch64, so users of that platform will
still see an improvement.

The previous FFT+SIMD was barely 2.5x faster than the C versions on these
platforms.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-01-05 22:32:02 +00:00
Steven Liu
57ae94a3c0 avformat/hlsenc: fix Explicit null dereferenced in hlsenc
CID: 1398228
Passing null pointer dirname to strlen, which dereferences it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-06 06:29:12 +08:00
Steve Lhomme
fd0716b364 dxva2: make ff_dxva2_get_surface() static and rename it
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-05 23:18:36 +01:00
Bela Bodecs
4068f5fac7 doc/muxers/hlsenc: typo hls_flag: discont_starts => discont_start
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-05 23:18:36 +01:00
Bela Bodecs
4c63910bdb vformat/hlsenc: typo in default localtime pattern
in get_default_pattern_localtime_fmt the default pattern contains
%Y%m%d%H%I%S but the original intention was %Y%m%d%H%M%S

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-05 19:25:38 +08:00
Carl Eugen Hoyos
e6050d81b0 lavc/Makefile: Clean up the amv encoder dependencies. 2017-01-05 12:17:54 +01:00
Michael Niedermayer
7ca2a23aaa avcodec/bitstream: Document the values supported for *_size in ff_init_vlc_sparse()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-05 12:08:24 +01:00
Michael Niedermayer
8f1d18a91b avcodec/bitstream: assert that *_size in ff_init_vlc_sparse() is valid
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-05 12:08:23 +01:00