summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* diracdec: check return code of get_buffer_with_edgeAndreas Cadhalpun2016-11-04
| | | | | | | If it fails, buffers aren't allocated, causing NULL pointer dereferencing. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* diracdec: clear slice_params_num_buf on allocation failureAndreas Cadhalpun2016-11-04
| | | | | | | | | | | Otherwise it can be non-zero next time decode_lowdelay is called, causing slice_params_buf not to be allocated, leading to a NULL pointer dereference. The problem was introduced in commit dcad4677d637cd2f701917e38361fa96b8c9a418. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* diracdec: use correct buffer for slice_params_buf reallocAndreas Cadhalpun2016-11-04
| | | | | | | | | | This fixes a double-free detected by AddressSanitizer. The problem was introduced in commit dcad4677d637cd2f701917e38361fa96b8c9a418. Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/hap: consistent name for codecTom Butterworth2016-11-04
| | | | | | | "Vidvox Hap", not "Vidvox Hap encoder" or "Vidvox Hap decoder". Fixes bad name in "ffmpeg -codecs", matches other codec naming. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* qsvenc: do not re-execute encoding on all positive status codesAnton Khirnov2016-11-04
| | | | | | | It should only be done for DEVICE_BUSY/IN_EXECUTION (cherry picked from commit 0956fd460681e8ccbdae19f135f0d3970bf95c2f) Fixes ticket #5924.
* libx265: Add option to force IDR framesDerek Buitenhuis2016-11-04
| | | | | | | This is in the same the same vein as c981b1145a857c8f962c93b8eecb1c613b20ffe9. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ac3dec: Check expaccMichael Niedermayer2016-11-03
| | | | | | | | | | this is somewhat a magic number, which can be understood from reading section "7.1.2 Exponent Strategy" of the ac3 specification, in short: Three exponents each represented as number 0-4 are grouped together and base-5 encoded, so the maximal correct value is 25*4 + 5*4 + 4 = 124. Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* hevc: Move hevc_decode_extradata before frame decodingVittorio Giovara2016-11-03
| | | | | | | Avoids a forward-declaration in the following commit. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ppc: pixblockdsp: do unaligned block accesses correctly againAndreas Cadhalpun2016-11-03
| | | | | | | | | | | | | | | | | | | | | | This was broken by the following Libav commit: 4c387c7 ppc: dsputil: do unaligned block accesses correctly The following tests fail due to this: fate-checkasm fate-vsynth1-dnxhd-2k-hr-hq fate-vsynth1-dnxhd-edge1-hr fate-vsynth1-dnxhd-edge2-hr fate-vsynth1-dnxhd-edge3-hr fate-vsynth1-dnxhd-hr-sq-mov fate-vsynth1-dnxhd-hr-hq-mov fate-vsynth2-dnxhd-2k-hr-hq fate-vsynth2-dnxhd-edge1-hr fate-vsynth2-dnxhd-edge2-hr fate-vsynth2-dnxhd-edge3-hr fate-vsynth2-dnxhd-hr-sq-mov fate-vsynth2-dnxhd-hr-hq-mov fate-vsynth3-dnxhd-2k-hr-hq fate-vsynth3-dnxhd-edge1-hr fate-vsynth3-dnxhd-edge2-hr fate-vsynth3-dnxhd-edge3-hr fate-vsynth3-dnxhd-hr-sq-mov fate-vsynth3-dnxhd-hr-hq-mov Fixes trac ticket #5508. Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* crystalhd: Update high level descriptionPhilip Langdale2016-11-02
| | | | We don't need to document the horrible hacks that we removed.
* crystalhd: Simplify output frame handlingPhilip Langdale2016-11-02
| | | | | | | The old code had to retain a partial frame across two calls in the case of separate interlaced fields. Now, we know that we'll get both fields within the same receive_frame call, and so we don't need to manage the frame as private state any more.
* crystalhd: Loop for a frame internally where possible.Philip Langdale2016-11-02
| | | | | | | | It's not possible to return EAGAIN when we've passed input EOF and are in draining mode. If do return EAGAIN, we're saying there's no way to get any more output - which isn't true in many cases. So let's handled these cases in an internal loop as best we can.
* crystalhd: Keep NOPTS_VALUE so we know it's not there.Philip Langdale2016-11-02
|
* crystalhd: Remove h.264 parserPhilip Langdale2016-11-02
| | | | | Now that we don't need to do ridiculous things to work out if a frame is interlaced or not, we don't need an extra h.264 parser.
* crystalhd: We don't need the track the last picture number anymorePhilip Langdale2016-11-02
| | | | | This was needed to detect an interlaced failure case that doesn't happen with the new decode api.
* crystalhd: Remove trust_interlaced heuristicPhilip Langdale2016-11-02
| | | | | | It seems that without all the other 1:1 heuristics, we don't have a fundamental problem trusting the interlaced flag on output pictures. That's a relief.
* crystalhd: Revert back to letting hardware handle packed b-framesPhilip Langdale2016-11-02
| | | | | | | | | | | | | | I'm not sure why, but the mpeg4_unpack_bframes bsf is not interacting well with seeking. Looking at the code, it should be ok, with possibly one warning shown, but I see it getting stuck for an extended period of time after a seek where a packed frame is cached to be shown later. So, I gave up on that and went back to making the old hardware based path work. Turns out that it wasn't broken except that some samples have a 6 byte drop packet which I wasn't accounting for. Now it works again and seeks are good.
* crystalhd: Switch to new decode API and remove the insanityPhilip Langdale2016-11-02
| | | | | | | | | | The new decode API allows for m:n decode patterns, which is what you need to use this hardware in a sane way. There are so many situations where 1:1 doesn't happen naturally that it's a miracle I got it working as well as I did. With this change, we can throw all of the crazy heuristics and sleeps(!) out, and things work correctly.
* crystalhd: Fix up the missing first samplePhilip Langdale2016-11-02
| | | | | | | | Why on earth the hardware returns garbage for the first sample of a decoded picture is anyone's guess. The simplest reasonable way to patch it up is to copy the first sample of the second line. This should result in the correct chroma values (because the data was original 4:2:0 upsampled to 4:2:2) even if the luma is isn't.
* lavc: Add hevc main10 profile to ffmpeg cliVittorio Giovara2016-11-02
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sunrast: Fix input buffer pointer checkMichael Niedermayer2016-11-02
| | | | | | | | | Fixes: out of array read Fixes: poc.dat Found-by: Bingchang, Liu @VARAS of IIE Tested-by: bc L <l.bing.chang.bc@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/hapenc: Use the correct printf length modifier for size_t arguments.Carl Eugen Hoyos2016-11-02
| | | | | | | Fixes the following warning: libavcodec/hapenc.c:122:20: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat] Based on a patch by Diego Biurrun.
* avcodec/dnxhdenc: Fix alignment of edge_buf*Michael Niedermayer2016-11-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* apngdec: use side data to pass extradata to the decoderAndreas Cadhalpun2016-11-01
| | | | | | | | | Fixes remuxing apng streams coming from the apng demuxer. This is a regression since 940b8908b94404a65f9f55e33efb4ccc6c81383c. Found-by: James Almer <jamrial@gmail.com> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* Fix build warnings due to misleading indentationAdriano Pallavicino2016-11-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* interplayacm: increase bitstream buffer size by AV_INPUT_BUFFER_PADDING_SIZEAndreas Cadhalpun2016-11-01
| | | | | | | This fixes out-of-bounds reads by the bitstream reader. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/smc: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tscc: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rscc: Fix constantMichael Niedermayer2016-10-31
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qsv: remove MFX_EXTBUFF_CODING_OPTION3Kyle Schwarz2016-10-31
| | | | | | 4th generation Intel CPUs don't support MFX_EXTBUFF_CODING_OPTION3. This patch fixes bug #5324.
* qsvdec: Avoid probing with qsv decodersMark Thompson2016-10-31
| | | | Set the AV_CODEC_CAP_AVOID_PROBING flag on all of the qsv decoders.
* qsv: Merge libav implementationMark Thompson2016-10-31
| | | | | | | Merged as-at libav 398f015, and therefore includes outstanding skipped merges 04b17ff and 130e1f1. All features not in libav are preserved, and no options change.
* mpegvideo: Return correct coded frame sizes from parserMark Thompson2016-10-31
|
* hevc: Return stream format information from parserMark Thompson2016-10-31
|
* vc1: Return stream format information from parserMark Thompson2016-10-31
|
* avcodec/rawdec: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rscc: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/msvideo1: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qpeg: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qtrle: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/msrle: Check side data size before useMichael Niedermayer2016-10-31
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cuvid: Don't claim to decode h.263 (it doesn't)Philip Langdale2016-10-30
| | | | Turns out cuvid doesn't support h.263.
* interplayacm: validate number of channelsAndreas Cadhalpun2016-10-30
| | | | | | | | The number of channels is used as divisor in decode_frame, so it must not be zero to avoid SIGFPE crashes. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* interplayacm: check for too large bAndreas Cadhalpun2016-10-30
| | | | | | | This fixes out-of-bounds reads. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec/kmvc: Check side data size before useMichael Niedermayer2016-10-30
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/idcinvideo: Check side data size before useMichael Niedermayer2016-10-30
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cinepak: Check side data size before useMichael Niedermayer2016-10-30
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/8bps: Check side data size before useMichael Niedermayer2016-10-30
| | | | | | Fixes out of array read Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* doc: fix spelling errorsAndreas Cadhalpun2016-10-29
| | | | | Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* crystalhd: Reorder mspeg4 decoder after software decodersPhilip Langdale2016-10-28
| | | | | This avoids it getting picked by default, which is generally undesirable and can break test runs.