Yong Lei
8dcfe43de0
avcodec/huffman: beautify: add space between #include and filename.
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
697b2bbd54
avcodec/ffv1dec: Test extradata_size instead of extradata for better robustness
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
James Almer
7a15cf42ee
x86/diracdsp: make ff_put_signed_rect_clamped_10_sse4 work on x86_32
...
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Mark Reid
41d7642a7b
libavcodec/dnxhd: add dnxhr profiles
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vignesh Venkatasubramanian
134fe28981
libavcodec/libvpx: Add VPx alpha decode support
...
VPx (VP8/VP9) alpha encoding has been part of FFmpeg. Now, add the
ability to decode such files with alpha channel.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
9 years ago
Michael Niedermayer
9bf3fdcd3c
avcodec/h264_slice: Move h264_init_ps() call into h264_field_start()
...
This was missing from f512e4a390
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
fd1588919d
avcodec/h264: remove list_count and ref_count clearing
...
The code conflicts with moving the h264_init_ps() call point
Without this, ff_h264_parse_ref_count() fills ref and list count and
h264_init_ps() subsequently wipes them out on a "success" path.
Subsequently things crash as the wiped fields are used.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Petru Rares Sincraian
68f991d909
fate: add test for avfft
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
21c081a246
lavc/h264: fix spacing before comment
9 years ago
Aman Gupta
a49ed9e32d
avcodec/ccaption_dec: default rollup to row 10
...
This ensures that captions are written towards the bottom of the screen
when tuning into mid-stream. The row will be reset on the receipt of the
next PAC command. Row 10 was chosen as it corresponds to the value of
"0" in a PAC (see row_map in handle_pac()).
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Aman Gupta
9ca9671458
avcodec/ccaption_dec: implement positioning for closed captions
...
Positioning math is based on the guidelines in https://dvcs.w3.org/hg/text-tracks/raw-file/default/608toVTT/608toVTT.html#positioning-in-cea-608
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Aman Gupta
309322ef65
avcodec/ccaption_dec: change write_char() to void as return value is unused
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
James Almer
d688f39dc4
cosmetics: fix some misspelled words
...
Signed-off-by: James Almer <jamrial@gmail.com>
9 years ago
Michael Niedermayer
2b14204339
avcodec/dnxhddata: replace % by &
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Mark Reid
ed0dc14ebb
libavcodec/dnxhd: add support more dnxhr header prefixes
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Pavel Koshevoy
25ca74d314
Restore compatibility with powerpc-apple-darwin9-gcc-4.2.1
...
... and attempt to preserve compatibility with clang that was
introduced in 311a953c76
(untested)
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
bec7145252
lavc/truemotion2rt: mark AVPacket* as const
9 years ago
Clément Bœsch
87e9cefa91
lavc/codec_desc: move a few codecs out of the image codecs list
...
Also shuffle them a little to simplify next Libav merge.
9 years ago
Rostislav Pehlivanov
f41e37b84f
dirac_vlc: prevent shifting a 0 by 64 bits when zeroing residue
...
Adding a check for bits == 0 would still make Coverity misdetect this,
so just revert to the normal way of setting the residue to 0.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
Rostislav Pehlivanov
c4adcff976
dirac_vlc: add a SET_RESIDUE macro and fix recent regression
...
Can also be used in future cleanups since 99% of the time the leftover
appending will just append to an already empty residue.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
Rostislav Pehlivanov
000eb01a7d
diracdec: fix unchecked byte length
...
Also drops the start variable since it's redundant.
Found by Coverity, fixes CID1363964
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
Rostislav Pehlivanov
b2b12b2d4a
diracdec: fix maximum quantization index checks
...
Found by Coverity, fixes CID1363961 and CID1363962
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
Rostislav Pehlivanov
9c0aba434e
dirac_vlc: remove redundant macro declaration
...
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
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>
9 years ago
Martin Vignali
f2b08a0702
libavcodec/exr : cosmetics, rename variable in b44_uncompress func
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
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>
9 years ago
Michael Niedermayer
9157ac2f9c
avcodec/dirac_vlc: Fix mixed declaration and statements
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Rostislav Pehlivanov
a337cb7361
diracdec: fix #coeffs -> byte conversion
...
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
9 years ago
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>
9 years ago
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>
9 years ago
Rostislav Pehlivanov
dcad4677d6
diracdec: do not allocate and free slice parameters every frame
...
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
9 years ago
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>
9 years ago
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>
9 years ago
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>
9 years ago
Rostislav Pehlivanov
b9c6c5f453
diracdec: decode HQ profile slices in rows
...
Siginificantly improves the performance.
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
9 years ago
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>
9 years ago
Rostislav Pehlivanov
bd61f3c6bf
diracdsp: add SIMD for the 10 bit version of put_signed_rect_clamped
...
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
9 years ago
Rostislav Pehlivanov
80721cc1ff
diracdsp: add dequantization SIMD
...
Currently unused, to be used in the following commits.
Signed-off-by: Rostislav Pehlivanov <rpehlivanov@obe.tv>
9 years ago
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 .
9 years ago
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
9 years ago
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>
9 years ago
Michael Niedermayer
9585c50942
avcodec/iff: remove useless ()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
92139c1bd1
avcodec/mediacodecdec_h264: Fix occured typo
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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>
9 years ago
Michael Niedermayer
e98ab799be
avcodec/vaapi_encode_h264: Use av_clip_uintp2()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
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
9 years ago
Matthieu Bouron
0f2654c9a3
lavc: add mediacodec hwaccel support
9 years ago
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.
9 years ago
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.
9 years ago