Commit Graph

80979 Commits

Author SHA1 Message Date
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
Clément Bœsch
1cfa350429 Merge commit 'bcc07e2576cb723007bea1238afd019ae2d1b005'
* commit 'bcc07e2576cb723007bea1238afd019ae2d1b005':
  pixdesc: Use C99 array to list color properties names

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:21:01 +02:00
Clément Bœsch
b4abf0e396 Merge commit 'a833ff68f6bf9dc72c3ef0ddf830ebed743c0703'
* commit 'a833ff68f6bf9dc72c3ef0ddf830ebed743c0703':
  h264: Fix decoding delay for Intra only streams

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:06:11 +02:00
Clément Bœsch
775389fc59 Merge commit '90f469aa2b98a868cdbe35170c24272de10e1341'
* commit '90f469aa2b98a868cdbe35170c24272de10e1341':
  lavc: add H.264 MVC profiles

Merged-by: Clément Bœsch <u@pkh.me>
2016-07-09 14:01:28 +02:00
Clément Bœsch
f512e4a390 Merge commit '61f168ae348f94f39e7afc6971654455a5de0e4d'
* commit '61f168ae348f94f39e7afc6971654455a5de0e4d':
  h264: factor out setting the parameter sets for a frame

Michael's changes on top of the merge undo parts of the original diff
that are not factorization:

"The call point is left where it was before. Such a change should be in
a separate commit and has multiple issues, one being null pointer
dereferences the other is that some safety checks would become
conditional.

I tried to split the PPS init between the new and old functions
similarly to the SPS code."

Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-09 13:57:43 +02:00
Matthieu Bouron
0f2654c9a3 lavc: add mediacodec hwaccel support 2016-07-08 17:02:37 +02:00
Hendrik Leppkes
83a940e7fb h2645_parse: don't overread AnnexB NALs within an avc stream
We know the maximum size of an AnnexB NAL, signaling it as the maximum
NAL size allows ff_h2645_extract_rbsp to determine the correct size.
2016-07-08 15:20:20 +02:00
Hendrik Leppkes
c3e9b098e1 h2645_parse: only read avc length code at the correct position
Reading it from any other position would result in a wrong size being
read, instead fallback to the re-sync mechanic in the else clause.
2016-07-08 15:20:16 +02:00
Michael Niedermayer
b450b82514 avcodec/exr: Fix mixed declarations and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-07 14:53:01 +02:00
Martin Vignali
50747d6b1f libavcodec/exr : indent gray support patch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:53:28 +02:00
Martin Vignali
7ebd13fc8b libavodec/exr : add support for Y and YA file (ticket #5621)
a gray channel in exr, is named Y
we admit that the file need to be interpreted as gray
only if no other channel match (except alpha)

to manage RGB and Y in the color conversion part of decode_block,
the color processing is now made with a for loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:52:49 +02:00
Burt P
ba69a81019 libavfilter/af_hdcd.c: Collect HDCD stats and report
The new HDCD filter really does nothing to show that it is working or
that HDCD control information was even detected in the stream. This
patch collects information about the decode, like which features were
used, and reports it to the user at the end.

Also,
* Fixes low-level gain adjustment
* Updates the documentation

Signed-off-by: Burt P <pburt0@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 22:54:47 +02:00
Carl Eugen Hoyos
3e4357eb82 lavc/libx265: Support gray encoding.
Gray encoding crashes with libx265 <= 84, so check the library version.
2016-07-06 18:56:19 +02:00
Matthieu Bouron
88d9c30cf5 lavc/mediacodecdec_h264: properly convert extradata to annex-b
H264ParamSets has its SPS/PPS stored raw (SODB) and needs to be
converted to NAL units before sending them to MediaCodec.

This patch adds the missing convertion of the SPS/PPS from SOBP to RBSP
which makes the resulting NAL units correct.

Fixes codec initialization on Nexus 4 and Nexus 7.
2016-07-06 15:10:16 +02:00
Michael Niedermayer
55ef890b29 avcodec/iff: Print error for cols/bpp/bytes being bad in decode_delta_j()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 11:20:41 +02:00