1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
Commit Graph

36773 Commits

Author SHA1 Message Date
James Almer
1d4d0ee4b0 avutil/reverse: move the ff_reverse declaration to a separate header
Fixes compilation with hardcoded tables after eaff1aa09e
and e71b8119e7

Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-01-12 19:59:37 -03: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
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
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
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
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
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
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
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
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
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
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
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
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
Andreas Cadhalpun
e8651f51aa wmavoice: validate block alignment
This prevents a division by zero crash in wmavoice_decode_packet.

The problem was introduced by commit
3deb4b54a2.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-03 00:52:55 +01:00
Andreas Cadhalpun
91e6a64d2e wmavoice: truncate spillover_nbits if too large
This fixes triggering the av_assert0(ret <= tmp.size).

The problem was reintroduced by commit
7b27dd5c16 and originally fixed by
2a4700a4f0.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-03 00:51:58 +01:00
Michael Niedermayer
aa95292043 avcodec/x86/vc1dsp_mc: Fix build with NASM 2.09.10
make fate passes

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 22:37:55 +01:00
John Comeau
d06518752b avcodec/x86/imdct36: fix building with nasm 2.11.05
fixes `operation size not specified` errors as described here:
http://stackoverflow.com/questions/36854583/compiling-ffmpeg-for-kali-linux-2

I rebuilt again with yasm and made sure it didn't break that.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 20:44:16 +01:00
Carl Eugen Hoyos
28307ef7e6 lavc/psd: Support indexed files.
Fixes ticket #6045.
2017-01-02 11:39:21 +01:00
Michael Niedermayer
68cdeb06de avcodec/tests/fft: Fix indention of dct_init()
Fixes CID1396253

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-01 23:04:31 +01:00
Carl Eugen Hoyos
4acea512f3 lavc/mjpegdec: Do not overread too short JFIF tags.
Fixes ticket #6055.
2017-01-01 18:53:27 +01:00
Miroslav Slugen
9b425bd24c avcodec/nvenc: Add bluray_compat basic implementation
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:47:25 +01:00
Miroslav Slugen
1841eda679 avcodec/nvenc: Make AUD optional for h264_nvenc and hevc_nvenc
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:37:09 +01:00
Miroslav Slugeň
f8c503d927 avcodec/nvenc: round qpIntra and qpInter calculation
Round qpIntra and qpInter calculation instead of old floor behavior.

Adopted from vaapi_encode_h264.c

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:34:42 +01:00
Moritz Barsnick
6c442e1584 lavc/libmp3lame: add support for cutoff
Pass the cutoff option from lavc's avcodec_options[] to libmp3lame's
lowpass option, without allowing to adjust its default behavior.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Michael Niedermayer
25d9643f11 avcodec/mjpegdec: Check for rgb before flipping
Fixes assertion failure due to unsupported case

Fixes: 356/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_MJPEG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 03:21:05 +01:00
Carl Eugen Hoyos
ec2f3b1f57 lavc/psd: Remove an uninitialized variable. 2016-12-30 12:08:26 +01:00
Michael Bradshaw
616513ef6e avcodec/libopenjpegdec: Set key frame metadata
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-28 16:04:59 +01:00
Ronald S. Bultje
33d7f822f8 wmavoice: protect against zero-energy in adaptive gain control.
Otherwise the scale factor becomes NaN, resulting in corrupt output.
Fixes #5426.
2016-12-27 10:02:34 -05:00
Ronald S. Bultje
7b27dd5c16 wmavoice: move overflow handling to common code. 2016-12-27 10:02:34 -05:00
Ronald S. Bultje
b011bb5f8b wmavoice: reindent. 2016-12-27 10:02:33 -05:00
Ronald S. Bultje
3deb4b54a2 wmavoice: disable bitstream checking.
The checked bitstream reader does that already. To allow parsing of
superframes split over a packet boundary, we always decode the last
superframe in each packet at the start of the next packet, even if
theoretically we could have decoded it. The last superframe in the
last packet is decoded using AV_CODEC_CAP_DELAY.
2016-12-27 10:02:33 -05:00
Ronald S. Bultje
992cb15e67 wmavoice: move wmavoice_flush() up. 2016-12-27 10:02:33 -05:00
Paul B Mahol
2f347c17d6 avcodec/ylc: thread safe initialization is possible with this codec
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-26 20:28:40 +01:00
Paul B Mahol
31bf37cba8 avcodec/ylc: add frame threading support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-26 20:27:01 +01:00
Paul B Mahol
341d3ee441 avcodec/ylc: do not leak memory at uninit
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-26 20:18:00 +01:00
Paul B Mahol
12461636ea avcodec/magicyuv: export colorspace and color_range for YUV
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-26 17:34:57 +01:00
Ruta Gadkari
67db4ff3b6 NVENC: Update check for Lookahead
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
2016-12-26 12:13:39 -03:00
James Almer
c3d822855c avcodec/lossless_videodsp: fix output of add_hfyu_left_pred_int16_c()
It is now bitexact with the ssse3 and sse4.1 versions of the function.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-26 12:02:38 -03:00