Commit Graph

81103 Commits

Author SHA1 Message Date
Rostislav Pehlivanov
b2b12b2d4a diracdec: fix maximum quantization index checks
Found by Coverity, fixes CID1363961 and CID1363962

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-13 23:40:06 +01:00
Rostislav Pehlivanov
9c0aba434e dirac_vlc: remove redundant macro declaration
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-13 23:38:10 +01:00
Rostislav Pehlivanov
e24c31b656 dirac_vlc: fix undefined shifts
Shifting by more than 63 bits is undefined behavior, athough any
compiler not returning 0 after shifting by any amount would be insane.

Found by Coverity, fixes CID1363959 and CID1363960

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-13 23:35:03 +01:00
Michael Niedermayer
e879819e7b avfilter/vf_uspp: Check for encoding failure
Fixes CID1363015

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-13 20:16:27 +02:00
Matthieu Bouron
57fa9608e4 Merge commit 'ec9f04423b82afa323e90f5b2c677be74302c1fd'
* commit 'ec9f04423b82afa323e90f5b2c677be74302c1fd':
  ffv1: Error out on unsupported format

This commit is a noop, the feature is already present in FFmpeg.

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-07-13 17:40:56 +02:00
James Almer
fde9c5e424 fate: fix fate-vp8 dependencies
Fix the demuxer dependencies in some of the tests and remove the vp8 decoder
dependency for the stream copy tests

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-13 12:33:56 -03:00
Matthieu Bouron
a91c330a29 Merge commit '105998fb5ca3c343f5c8cb39ce3197f87a5e4d36'
* commit '105998fb5ca3c343f5c8cb39ce3197f87a5e4d36':
  checkasm: Add tests for h264 idct

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-07-13 17:22:29 +02:00
Matthieu Bouron
495a40cecb tests/checkasm: reduce cosmetic diff with libav
Chunk was not merged in ca5ec2bf51.
2016-07-13 17:11:58 +02:00
Matthieu Bouron
354336490d Merge commit '846a3e78a535f05ee61bb23a160f3378f041f751'
* commit '846a3e78a535f05ee61bb23a160f3378f041f751':
  mov: Support prores with multiple stsd

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-07-13 16:56:20 +02:00
Matthieu Bouron
3c058f5701 Merge commit '76729970049fe95659346503f7401a5d869f9959'
* commit '76729970049fe95659346503f7401a5d869f9959':
  mov: Implement support for multiple sample description tables

Notes:
  * The sc->stsc_data[index].id checks have been moved from the mov_read_stsc
  to mov_read_packet before the value is used in mov_change_extradata to
  not break playback of samples with broken stsc entries (see sample of
  ticket #1918).

  * sc->stsc_index is now checked against sc->stsc_count - 1 before it
  is incremented so it remains lesser than sc->stsc_count. Fixes a crash
  with:

  ./ffmpeg -i matrixbench_mpeg2.mpg -t 1 -frag_duration 200k test.mov
  ./ffprobe -show_packets test.mov

Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
2016-07-13 16:34:54 +02:00
Martin Vignali
f2b08a0702 libavcodec/exr : cosmetics, rename variable in b44_uncompress func
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-13 14:56:27 +02:00
Vignesh Venkatasubramanian
acca56d962 libvpx: Enable vp9 alpha encoding
Chrome canary now supports decoding of VP9 streams with alpha
channel [1]. Add support to ffmpeg for creating such files.

[1] https://codereview.chromium.org/2096813002/

Reviewed-by: James Zern <jzern@google.com>
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2016-07-12 23:19:50 -07:00
Burt P
7af44ce2f7 af_hdcd: don't log full HDCD stats if HDCD was not detected
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 22:55:04 +02:00
Burt P
0d8caeb41e af_hdcd: integrate() renamed hdcd_integrate() to be consistent with the other function names
Signed-off-by: Burt P <pburt0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 21:39:01 +02:00
Michael Niedermayer
2408f92678 avcodec/dirac_vlc: Fix avutil.h include
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 19:11:40 +02:00
James Almer
4acdbb1c6c avformat/oggenc: always use the time base stored in the theora header
Fixes ticket #5704

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-12 11:24:30 -03:00
Michael Niedermayer
9157ac2f9c avcodec/dirac_vlc: Fix mixed declaration and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-12 13:30:52 +02:00
Rostislav Pehlivanov
a337cb7361 diracdec: fix #coeffs -> byte conversion
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-12 10:44:24 +01:00
Rostislav Pehlivanov
df1dc52195 diracdsp_init: add missing ARCH_X86_64 check
That SIMD is still x86_64 only for now.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-07-12 00:39:12 +01:00
Rostislav Pehlivanov
2094562923 diracdec: do not memset the entire coefficient buffer for HQ pictures
This is now handled by the slice decoding function.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:41:32 +01:00
Rostislav Pehlivanov
dcad4677d6 diracdec: do not allocate and free slice parameters every frame
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:40:57 +01:00
Rostislav Pehlivanov
0eb0f93109 diracdec: implement a LUT-based Golomb code parser
Still much left to optimize, but it provides a significant performance
improvement - 10% for 300Mbps (1080p30), 25% for 1.5Gbps (4k 60fps) in
comparison with the default implementation.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:40:28 +01:00
Rostislav Pehlivanov
c43485f707 diracdec: rewrite HQ slice decoding
Now coefficients are written to a buffer and are then dequantized by the
new SIMD dequantization functions. For the lower bands without enough
coefficients to fill a register (and hence they overwrite) the C version
of the dequantization function is used.

The buffer is per-thread and will be realloc'd if anything changes.
This prevents regressions and having to limit slice size.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:38:45 +01:00
Rostislav Pehlivanov
09d89d9406 diractab: expose the maximum quantization index as a macro
Prevents having to have random magic values in the decoder and a
separate macro in the encoder.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:38:01 +01:00
Rostislav Pehlivanov
b9c6c5f453 diracdec: decode HQ profile slices in rows
Siginificantly improves the performance.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:34:54 +01:00
Rostislav Pehlivanov
17caae7202 diracdec: simplify golomb parsing and dequantization
In preparation for the following commits, this commit simplifies the
coefficient parsing and dequantization function. It was needlessly
inlined without much performance gain.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:34:25 +01:00
Rostislav Pehlivanov
bd61f3c6bf diracdsp: add SIMD for the 10 bit version of put_signed_rect_clamped
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:33:24 +01:00
Rostislav Pehlivanov
80721cc1ff diracdsp: add dequantization SIMD
Currently unused, to be used in the following commits.

Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
2016-07-11 23:30:11 +01:00
Carl Eugen Hoyos
244d22452c lavc/Makefile: Fix standalone compilation of the lame encoder.
Also fix a possible issue with the mpegaudio audiotoolbox decoders.
Fixes ticket #5703.
2016-07-11 23:21:19 +02:00
James Almer
f60b54902f avformat/oggenc: make flac the default for oga muxer
This allows simpler selection of flac in ogg from the command line,
while following the RFC 5334 recommendation[1] for the oga extension.

[1] https://tools.ietf.org/html/rfc5334#section-10.3

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-11 13:08:19 -03:00
Ronald S. Bultje
70d418c7e6 Revert "PPC64: Add versions of functions in libswscale/input.c optimized for POWER8 VSX SIMD."
This reverts commit 1df908f33f. The expected
performance improvements are essentially non-existent.
2016-07-11 10:15:05 -04:00
Ronald S. Bultje
f0a2b6249b vp9: add 16x16 idct avx2 (8-bit).
checkasm --bench, 10k runs, for *_add_${bpc}_${sub_idct}_${opt}, shows
that it's about 1.65x as fast as the AVX version for the full IDCT, and
similar speedups for the sub-IDCTs:

nop: 24.6
vp9_inv_dct_dct_16x16_add_8_1_c: 6444.8
vp9_inv_dct_dct_16x16_add_8_1_sse2: 638.6
vp9_inv_dct_dct_16x16_add_8_1_ssse3: 484.4
vp9_inv_dct_dct_16x16_add_8_1_avx: 661.2
vp9_inv_dct_dct_16x16_add_8_1_avx2: 311.5
vp9_inv_dct_dct_16x16_add_8_2_c: 6665.7
vp9_inv_dct_dct_16x16_add_8_2_sse2: 646.9
vp9_inv_dct_dct_16x16_add_8_2_ssse3: 455.2
vp9_inv_dct_dct_16x16_add_8_2_avx: 521.9
vp9_inv_dct_dct_16x16_add_8_2_avx2: 304.3
vp9_inv_dct_dct_16x16_add_8_4_c: 7022.7
vp9_inv_dct_dct_16x16_add_8_4_sse2: 647.4
vp9_inv_dct_dct_16x16_add_8_4_ssse3: 467.1
vp9_inv_dct_dct_16x16_add_8_4_avx: 446.1
vp9_inv_dct_dct_16x16_add_8_4_avx2: 297.0
vp9_inv_dct_dct_16x16_add_8_8_c: 6800.4
vp9_inv_dct_dct_16x16_add_8_8_sse2: 598.6
vp9_inv_dct_dct_16x16_add_8_8_ssse3: 465.7
vp9_inv_dct_dct_16x16_add_8_8_avx: 440.9
vp9_inv_dct_dct_16x16_add_8_8_avx2: 290.2
vp9_inv_dct_dct_16x16_add_8_16_c: 6626.6
vp9_inv_dct_dct_16x16_add_8_16_sse2: 599.5
vp9_inv_dct_dct_16x16_add_8_16_ssse3: 475.0
vp9_inv_dct_dct_16x16_add_8_16_avx: 469.9
vp9_inv_dct_dct_16x16_add_8_16_avx2: 286.4
2016-07-11 10:14:58 -04:00
Michael Niedermayer
a2550e7d2e avcodec/iff: Check that there are enough bytes in dgb before reading
Fixes CID1361959

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 14:48:57 +02:00
Michael Niedermayer
9585c50942 avcodec/iff: remove useless ()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 14:44:27 +02:00
Michael Niedermayer
92139c1bd1 avcodec/mediacodecdec_h264: Fix occured typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 13:00:04 +02:00
Michael Niedermayer
37c658b56b doc/muxers: Fix Thisimproves typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 12:55:29 +02:00
Steven Liu
b45a976ed4 add split_by_time flag for support splite mpegts segment at non-keyframe
support split hls segment at duration set by hls_time

Signed-off-by: LiuQi <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 12:20:40 +02:00
Marton Balint
593987810e avutil/parseutils: dont assume standard time when parsing a timestamp
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-07-11 01:06:23 +02:00
Michael Niedermayer
58dc8bbca4 avcodec/h264_refs: Assert that op is 0-2
Coverity fails to realize this

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-10 21:23:11 +02:00
Sami Hult
d4c8e93190 Changed metadata print option to accept general urls
This is an - once again - updated patch, that uses avio_write instead
of avio_puts to stream clean text output without null characters. Works
now for me as intended.

Changes metadata filter to accept general urls as file argument without
breaking former behaviour. As a byproduct, it also allows for writing to
file "-" if specified as "file:-".

Example:

ffmpeg -i test.wav -filter_complex "silencedetect=n=-40dB:d=0.1,ametadata=mode=print:file='pipe\:4'" -f null

Signed-off-by: Sami Hult <sami.hult@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-10 00:36:49 +02:00
Michael Niedermayer
e98ab799be avcodec/vaapi_encode_h264: Use av_clip_uintp2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-10 00:36:20 +02:00
James Almer
fd6dbc5385 Revert "configure: Enable GCC vectorization on ≥4.9 on x86"
This reverts commit cb8646af24.

This change has brough more issues than benefits, between compilation
time failures depending on flags used and code miscompilation causing
runtime crashes.

See the "[PATCH 2/2] configure: Enable GCC vectorization on ≥4.9"
thread in the ffmpeg-devel mailing list for the relevant discussion.
2016-07-09 16:00:06 -03:00
Clément Bœsch
3cdd5f4b7c Revert "Merge commit '187d719760bd130f848194ec4a6bd476341914bb'"
This reverts commit c67aa7f287, reversing
changes made to 46bd0e8e0d.

The merge should have been a noop as the support was added in
601c238854
2016-07-09 15:56:04 +02:00
Clément Bœsch
c67aa7f287 Merge commit '187d719760bd130f848194ec4a6bd476341914bb'
* commit '187d719760bd130f848194ec4a6bd476341914bb':
  h264: Support AV_PKT_DATA_NEW_EXTRADATA

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 15:03:27 +02:00
Clément Bœsch
46bd0e8e0d Merge commit '75872d77d215d64b8d9430df23c6c74ff921227b'
* commit '75872d77d215d64b8d9430df23c6c74ff921227b':
  lavc: Document AV_PKT_DATA_NEW_EXTRADATA

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:55:39 +02:00
Clément Bœsch
84ecbbfb27 Merge commit 'f1a9eee41c4b5ea35db9ff0088ce4e6f1e187f2c'
* commit 'f1a9eee41c4b5ea35db9ff0088ce4e6f1e187f2c':
  x86: Add missing movsxd for the int stride parameter

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:52:23 +02:00
Clément Bœsch
1ad3ffadd9 Merge commit 'a2ddfadc2d9e91cf70aa7430a7340b418bdb5b42'
* commit 'a2ddfadc2d9e91cf70aa7430a7340b418bdb5b42':
  avdevice: Ignore timefilter test program

This commit is a noop, /timefilter entry was added in the original merge
(5d48e4eafa)

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:49:32 +02:00
Clément Bœsch
3536493082 Merge commit 'd6c2c2796d8885e99fc90793cdd7937826f82fab'
* commit 'd6c2c2796d8885e99fc90793cdd7937826f82fab':
  LICENSE: Fix silly typo

This commit is a noop, the typo disappeared when the whole paragraph was
reworked in 484aec4da3.

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:48:24 +02:00
Clément Bœsch
a7ce5b25c0 Merge commit '84b2d3fb68caf71cff4b80b44ff865d7ae2531ce'
* commit '84b2d3fb68caf71cff4b80b44ff865d7ae2531ce':
  h264: Drop unused function check_opcodes()

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:45:12 +02:00
Clément Bœsch
415072605b Merge commit '05a4bacbf7ece618553d339afe1d0b57bc87aea8'
* commit '05a4bacbf7ece618553d339afe1d0b57bc87aea8':
  avpacket: Error out when creating 0-sized side data

This commit is a noop, see 5a633ec2dd

AV_PKT_DATA_METADATA_UPDATE can be zero sized in order to clear old
meta.

Note: maybe we could add a start or end marker.

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:43:46 +02:00