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
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
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
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
Clément Bœsch
3cdd5f4b7c
Revert "Merge commit ' 187d719760'"
...
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 ' 187d719760'
...
* commit '187d719760 ':
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 ' 75872d77d2'
...
* commit '75872d77d2 ':
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 ' f1a9eee41c'
...
* commit 'f1a9eee41c ':
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
a7ce5b25c0
Merge commit ' 84b2d3fb68'
...
* commit '84b2d3fb68 ':
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
b4abf0e396
Merge commit ' a833ff68f6'
...
* commit 'a833ff68f6 ':
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 ' 90f469aa2b'
...
* commit '90f469aa2b ':
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 ' 61f168ae34'
...
* commit '61f168ae34 ':
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
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
Michael Niedermayer
fcdbbbd85a
avcodec/iff: decode_delta_j: Check that the number of bytes that will be read are available
...
This should avoid long loops
related to CID1361958
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 11:19:41 +02:00
Carl Eugen Hoyos
420ba222c6
lavc/mjpeg_parser: Allow jpegls parsing.
...
Fixes ticket #5691 .
2016-07-05 23:48:22 +02:00
James Almer
645489cf90
x86/dcadsp: optimize lfe_fir0_float_fma3 on x86_32
...
About 10% faster.
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-05 17:48:20 -03:00
James Almer
293484fa5e
avcodec: add missing xmm/neon clobber test wrappers for the new decode API
...
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-03 18:04:30 -03:00
Clément Bœsch
64c619369b
lavc/h264_slice: use sps directly when checking for invalid 8x8 inference
2016-07-03 15:11:40 +02:00
Michael Graczyk
37941878f1
libopusenc: Add channel mapping family argument
...
The default value of -1 indicates that ffmpeg should determine the channel
mapping automatically, which was the behavior before this commit.
Unless the -mapping_family argument is provided, behavior is unchanged.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 23:31:16 +02:00
Michael Graczyk
a1e3c7cf0f
libopusenc: Refactor to simplify forthcoming mapping_family parameter
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 23:31:10 +02:00
Michael Niedermayer
febc862b53
avcodec/h264_parser: Set sps/pps_ref
...
Fixes use of freed memory
Should fix valgrind failures of fate-h264-skip-nointra
Found-by: logan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-02 03:07:23 +02:00
James Almer
77eb05a2f1
avcodec/h264_slice: Only call ff_h264_flush_change() on initialized contexts
...
Changed by committer to ensure context_initialized is reset
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-01 21:39:09 +02:00
Clément Bœsch
5565e27111
Merge commit ' 6e92181bf8'
...
* commit '6e92181bf8 ':
h264: pass just the PPS to get_chroma_qp()
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:23:38 +02:00
Clément Bœsch
2021326f99
Merge commit ' d1f539c97e'
...
* commit 'd1f539c97e ':
h264: merge the two reinit blocks in slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:19:09 +02:00
Clément Bœsch
99b37f53a1
Merge commit ' 3fba16ecd9'
...
* commit '3fba16ecd9 ':
h264: factor starting a new field out of parsing the slice header
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-07-01 14:02:00 +02:00
Martin Vignali
d9e1e08133
libavcodec/exr : fix decoding piz float file.
...
fix ticket #5674
the size of data to process in piz_uncompress, is now calc
using the pixel type of each channel.
the data reorganization, alos take care about the size of
each channel
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-30 12:16:52 +02:00
Clément Bœsch
f48aea66dd
Merge commit ' bec993381c'
...
* commit 'bec993381c ':
h264: postpone generating the implicit MMCOs
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-30 10:24:03 +02:00