Vittorio Giovara
e7a6f8c972
lavc: Add spherical packet side data API
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2016-12-07 14:40:06 -05:00
Michael Niedermayer
c188f358aa
avcodec/wavpack: Treat the first block coding too many channels as an error
...
Fixes memleak
Fixes: 236/8aeebc9ca49b91bf71c114dcefac56c154a3a563
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-07 13:16:32 +01:00
James Darnley
728651df06
avcodec/h264: mmx2, sse2, avx 10-bit 4:2:2 h chroma deblock/loop filter
...
Yorkfield:
- mmx2: 2.53x (504 vs. 199 cycles)
- sse2: 3.83x (504 vs. 131 cycles)
Nehalem:
- mmx2: 2.42x (365 vs. 151 cycles)
- sse2: 3.56x (365 vs. 103 cycles)
Skylake:
- mmx2: 1.81x (308 vs. 170 cycles)
- sse2: 2.84x (308 vs. 108 cycles)
- avx: 2.93x (308 vs. 105 cycles)
2016-12-07 00:29:13 +01:00
James Darnley
add21d0bb3
avcodec/h264: mmx2, sse2, avx 10-bit h chroma deblock/loop filter
...
Yorkfield:
- mmx2: 2.45x (279 vs. 114 cycles)
- sse2: 3.36x (279 vs. 83 cycles)
Nehalem:
- mmx2: 2.10x (192 vs. 92 cycles)
- sse2: 2.84x (192 vs. 68 cycles)
Skylake:
- mmx2: 1.75x (170 vs. 97 cycles)
- sse2: 2.47x (170 vs. 69 cycles)
- avx: 2.47x (170 vs. 69 cycles)
2016-12-07 00:29:13 +01:00
James Darnley
58ca2ef62e
whitespace changes after last commit
2016-12-07 00:29:13 +01:00
James Darnley
f33714a694
avcodec/h264: clean up and expand x86 function definitions
2016-12-07 00:29:13 +01:00
Timothy Gu
b6f80b16d1
qsvdec: Fix memory leak
...
Fixes CID1396851.
2016-12-06 13:21:08 -08:00
Timothy Gu
16a75304fe
omx: Fix OOM check
...
Also use av_mallocz_array().
Fixes CID1396839.
2016-12-06 13:20:55 -08:00
Thomas Turner
da3c69a5a9
Added test for libavcodec/avpacket.c
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-06 17:12:38 +01:00
Mathieu Velten
49e8e5fc56
avcodec/vaapi-vp9: add support for profile 2 (bpp > 8)
...
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2016-12-05 22:12:34 +00:00
Mathieu Velten
b1f630f1a6
avcodec/vp9: move bpp to the shared context for use in hwaccel
...
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2016-12-05 22:12:26 +00:00
Andreas Cadhalpun
46e75617d9
truemotion1: fix leaking frame on init failure
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-12-05 23:04:35 +01:00
Mark Thompson
51020adcec
vaapi_encode: Write sequence header as extradata
...
Only works if packed headers are supported, where we can know the
output before generating the first frame.
(cherry picked from commit 0cf86fabfa )
2016-12-05 21:04:00 +00:00
Michael Niedermayer
1f5630af51
avcodec/flacdec: Fix undefined shift in decode_subframe()
...
Fixes undefined behavior
Fixes: 639961-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-04 00:12:06 +01:00
Michael Niedermayer
c72fa43234
avcodec/get_bits: Fix get_sbits_long(0)
...
Fixes undefined behavior
Fixes: 640889-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-03 23:45:43 +01:00
Michael Niedermayer
6567c59c49
avcodec/flac: forward errors from ff_flac_parse_streaminfo()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-03 23:39:11 +01:00
Michael Niedermayer
020d53ebdb
avcodec/flac: Check bps in ff_flac_parse_streaminfo()
2016-12-03 23:37:27 +01:00
Michael Niedermayer
83a75bf6c3
avcodec/flacdec: Fix signed integer overflow in decode_subframe_fixed()
...
Fixes undefined behavior
Fixes: 640912-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-03 17:26:39 +01:00
Michael Niedermayer
acc163c6ab
avcodec/flacdsp_template: Fix undefined shift in flac_decorrelate_indep_c
...
Fixes: left shift of negative value
Fixes: 668346-media
Found-by: Matt Wolenetz <wolenetz@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-12-03 17:25:40 +01:00
Carl Eugen Hoyos
a8cb567e55
lavc: Remove CR/LF from avpriv_request_sample() calls.
2016-12-03 15:40:26 +01:00
Vittorio Giovara
25fcbf7a84
hevc: Support extradata changes
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2016-12-02 15:04:24 -05:00
Vittorio Giovara
46fae40d25
hevc: Allow parsing external extradata buffers
2016-12-02 15:03:24 -05:00
Philip Langdale
4e6d1c1f4e
avcodec/vdpau_hevc: Fix potential out-of-bounds write
...
The maximum number of references is 16, so the index value cannot
exceed 15.
Fixes Coverity CID 1348139, 1348140, 1348141
2016-11-30 16:14:39 -08:00
Philip Langdale
5512dbe37f
avcodec/crystalhd: Handle errors from av_image_get_linesize
...
This function can return an error in certain situations.
Fixes Coverity CID 703707.
2016-11-30 16:14:39 -08:00
James Darnley
13d71c28cc
avcodec/h264: sse2 and avx 4:2:2 idct add8 10-bit functions
...
Yorkfield:
- sse2:
- complex: 4.13x faster (1514 vs. 367 cycles)
- simple: 4.38x faster (1836 vs. 419 cycles)
Skylake:
- sse2:
- complex: 3.61x faster ( 936 vs. 260 cycles)
- simple: 3.97x faster (1126 vs. 284 cycles)
- avx (versus sse2):
- complex: 1.07x faster (260 vs. 244 cycles)
- simple: 1.03x faster (284 vs. 274 cycles)
2016-11-30 22:58:28 +01:00
James Darnley
1dae7ffa0b
avcodec/h264: mmx 4:2:2 idct add8 function
...
2.87 times faster (1830 vs. 638 cycles)
2016-11-30 22:58:27 +01:00
James Darnley
815ea8c6cc
avcodec/h264: mmxext 4:2:2 chroma intra deblock/loop filter
...
2.1 times faster (401 vs. 194 cycles)
2016-11-30 22:58:27 +01:00
Timo Rothenpieler
c2f3af57a5
avcodec/nvenc: mark intentional fall through
2016-11-30 12:36:23 +01:00
Miroslav Slugeň
f2dd6aee80
avcodec/nvenc: always reduce DAR width and height
...
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2016-11-30 12:36:23 +01:00
Philip Langdale
27038693bb
avcodec/nvenc: Delay identification of underlying format of cuda frames
...
When input surfaces are cuda frames, we will not know what the actual
underlying format (nv12, p010, etc) is at surface allocation time.
On the other hand, we will know when the input frames are actually
registered and associated with a surface.
So, let's delay format discovery until registration time, which is
actually how we handle other frame properties, such as dimensions.
By itself, this change doesn't allow for transcoding of 10bit
content from cuvid, but it reduces the problem to the hardcoding of
the sw format in ffmpeg_cuvid.c
Signed-off-by: Philip Langdale <philipl@overt.org >
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org >
2016-11-30 12:36:23 +01:00
Michael Niedermayer
2475858889
avcodec/flac_parser: Update nb_headers_buffered
...
Fixes infinite loop
Fixes: fuzz.flac
Found-by: Frank Liberato <liberato@google.com >
Reviewed-by: Frank Liberato <liberato@google.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-11-30 00:58:56 +01:00
Paul B Mahol
d56c7830c0
avcodec/raw: add gray10 support in nut
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2016-11-29 11:23:20 +01:00
Daniel Verkamp
e856ac2373
avcodec/msrledec: implement vertical offset in 4-bit RLE
...
The delta escape (2) is supposed to work the same in 4-bit RLE as in
8-bit RLE. This is documented in the MSDN Bitmap Compression page:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd183383(v=vs.85).aspx
The unchecked modification of line is safe, since the loop condition
(line >= 0) will check it before any pixel data is written.
Fixes ticket #5153 (output now matches ImageMagick for the provided sample).
Signed-off-by: Daniel Verkamp <daniel@drv.nu >
2016-11-29 10:57:49 +01:00
Alex Converse
8899057d91
libvpxenc: Report encoded VP9 level
...
Report the actual level of the encoded output if a level is
targeted or the level is passively tracked with a target of 0.
2016-11-28 12:02:43 -08:00
Andreas Cadhalpun
801b5c18c7
pngdec: check if previous frame exists instead of trusting sequence_number
...
This fixes a segmentation fault caused by calling memcpy with NULL as
second argument in handle_p_frame_apng.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-27 23:46:30 +01:00
Michael Niedermayer
d9883ded34
avcodec/me_cmp: Fix median_sad size
...
Fixes out of array read
Fixes: COV1396255
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-11-27 14:34:57 +01:00
Hendrik Leppkes
99ee8ee093
dxva2_vc1: support multiple slices
2016-11-26 13:11:36 +01:00
Hendrik Leppkes
36e27c87e7
vc1dec: support multiple slices in frame coded images with hwaccel
...
Based on a patch by Jun Zhao <mypopydev@gmail.com >
2016-11-26 13:11:32 +01:00
James Almer
6e1902bab4
avcodec/aac_adtstoasc_bsf: validate and forward extradata if the stream is already ASC
...
Fixes ticket #5973
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2016-11-25 18:24:56 -03:00
Andreas Cadhalpun
2566ad98b0
mss2: only use error correction for matching block counts
...
This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2
with coded_width/coded_height larger than width/height.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 21:05:03 +01:00
Philip Langdale
829db8effd
avcodec/nvenc: Remove aspect-ratio decompensation logic
...
This dubious behaviour in nvenc was finally removed by nvidia, and
as we refuse to run on anything older than 7.0, we don't need to
keep it around for old versions.
2016-11-25 10:13:58 -08:00
James Almer
50b1453915
avcodec/mpeg4audio: correctly propagate meaningful error values
...
Signed-off-by: James Almer <jamrial@gmail.com >
2016-11-25 10:40:59 -03:00
Martin Vignali
5099c541bb
libavcodec/exr: add support for uint32 channel decoding with pxr24
...
Doesn't decode the uint32 layer, but decodes the half part of the file.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 00:57:38 +01:00
Andreas Cadhalpun
8c8f543b81
libopusdec: default to stereo for invalid number of channels
...
This fixes an out-of-bounds read if avc->channels is 0.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-25 00:36:36 +01:00
Andreas Cadhalpun
995512328e
pgssubdec: only set w/h/linesize when allocating data
...
Rects with positive w/h/linesize but no data are invalid.
Reviewed-by: Petri Hintukainen <phintuka@gmail.com >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-24 01:48:43 +01:00
Jun Zhao
584eea5bf3
lavc/vaapi_hevc: fix scaling list duplicate transfer issue.
...
scaling list is already transfered to raster scan during head parsing,
so no need to transfer it again.
And after this fix, FATE test SLIST_A_Sony_4/SLIST_B_Sony_8/
SLIST_C_Sony_3/SLIST_D_Sony_9 will pass in i965/Skylake.
Signed-off-by: Wang, Yi A <yi.a.wamg@intel.com >
Signed-off-by: Jun Zhao <jun.zhao@intel.com >
Signed-off-by: Mark Thompson <sw@jkqxz.net >
2016-11-23 21:38:10 +00:00
Philip Langdale
dd10e7253a
avcodec/cuvid: Restore initialization of pixel format in init()
...
I moved this into the handle_video_sequence callback because that's
the earliest time you can make an accurate decision as to what the
format should be.
However, transcoding requires that the decision between using
the accelerated PIX_FMT_CUDA vs a normal pix format happen at init()
time. There is enough information available to make that decision
and things work out with the underlying format only being discovered
in the sequence callback.
2016-11-23 13:23:34 -08:00
Michael Niedermayer
69f7dd3524
avcodec/options_table: make channel_layouts uint64
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2016-11-23 02:01:05 +01:00
Andreas Cadhalpun
946ecd19ea
smacker: limit recursion depth of smacker_decode_bigtree
...
This fixes segmentation faults due to stack-overflow caused by too deep
recursion.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc >
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com >
2016-11-23 00:57:10 +01:00
Alex Converse
3ee59939a1
libvpxenc: Support targeting a VP9 level
...
Levels are specified at https://www.webmproject.org/vp9/levels/
2016-11-22 11:31:48 -08:00