summaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
* dxva: move d3d11 locking/unlocking to functionswm42017-06-081-18/+28
| | | | | | | | | I want to make it non-mandatory to set a mutex in the D3D11 device context, and replacing it with user callbacks seems like the best solution. This is preparation for it. Also makes the code slightly more readable. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* dxva: preparations for new hwaccel APIwm42017-06-086-43/+55
| | | | | | | | | | | | The actual hwaccel code will need to access an internal context instead of avctx->hwaccel_context, so add a new DXVA_CONTEXT() macro, that will dispatch between the "old" external and the new internal context. Also, the new API requires a new D3D11 pixfmt, so all places which check for the pixfmt need to be adjusted. Introduce a ff_dxva2_is_d3d11() function, which does the check. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: set avctx->hwaccel before initwm42017-06-081-2/+2
| | | | | | | | | So a hwaccel can access avctx->hwaccel in init for whatever reason. This is for the new d3d hwaccel API. We could create separate entrypoints for each of the 3 hwaccel types (dxva2, d3d11va, new d3d11va), but this seems nicer. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* smacker: Improve error handlingDiego Biurrun2017-06-011-23/+24
| | | | Return sensible error values and forward error codes.
* smacker: Check that the data size is a multiple of a sample vectorMichael Niedermayer2017-06-011-0/+5
| | | | | | | | | | | | | Fixes out of array access Fixes: ce19e41f0ef1e52a23edc488faecdb58/asan_heap-oob_2504e97_4202_ffa0df1baed14022b9bfd4f8ac23d0cb.smk Bug-Id: CVE-2015-8365 CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4a9af07a49295e014b059c1ab624c40345af5892) Signed-off-by: Diego Biurrun <diego@biurrun.de>
* decode: fix the code reducing cropping to preserve alignmentAnton Khirnov2017-05-201-1/+7
| | | | | | Currently it does not work at all. Bug-Id: 1058
* hevcdec: move the MD5 context out of HEVCSEIPictureHash back into HEVCContextAnton Khirnov2017-05-203-9/+8
| | | | | | | HEVCSEIPictureHash should store only the information extracted from the bitstream and exported to the higher layer (the decoder or the parser). The MD5 context is allocated, used and freed by this higher layer, so it makes more sense for it to also be stored there.
* extract_extradata_bsf: make sure all needed parameter set NALUs were foundJames Almer2017-05-201-3/+12
| | | | | | | | | This mimics the behavior of the now unused h264/hevc parser's split() function and fixes decoding some files when extract_extradata bsf is enabled. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* vp9_superframe_bsf: cache input packets directlyAnton Khirnov2017-05-201-30/+19
| | | | Avoids unnecessary allocs+copies and makes the code slightly simpler.
* vp9_superframe_bsf: convert to the new bitstream readerAnton Khirnov2017-05-201-10/+12
|
* hevc: Add names for reserved NAL unit typesMark Thompson2017-05-161-0/+16
| | | | | While not yet used, these NAL units do already have some defined semantics and are referred to elsewhere.
* h264_sei: Add namespace prefix to all SEI valuesMark Thompson2017-05-165-55/+56
| | | | | This avoids confusion with equivalent H.265 SEI values when both are being used at the same time.
* arm: Avoid using .dn register aliasesMartin Storsjö2017-05-152-20/+5
| | | | | | | | | | | | | | | | | | | | | | | clang now (in the upcoming 5.0 version) is capable of building our arm assembly without relying on gas-preprocessor, although clang/LLVM doesn't support .dn register aliases. The VC1 MC assembly was only built and used if the chosen assembler supported the .dn directives though. This was supported as long as gas-preprocessor was used. This means that VC1 decoding got a speed regression on clang 5.0, unless the user manually chose using gas-preprocessor again. By avoiding using the .dn register aliases, we can build the VC1 MC assembly with the latest clang version. Support for the .dn/.qn directives in clang/LLVM isn't actively planned, see https://bugs.llvm.org/show_bug.cgi?id=18199. This partially reverts 896a5bff64264f4d01ed98eacc97a67260c1e17e. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()Sean McGovern2017-05-091-0/+7
| | | | | Bug-Id: 1036 CC: libav-stable@libav.org
* hevcdec: move SEI message parsing into a separate headerJames Almer2017-05-093-61/+95
| | | | | | | It doesn't depend on hevcdec anymore. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hevcdec: remove HEVCContext usage from hevc_seiJames Almer2017-05-093-79/+86
| | | | | | | | | | Based on the H264 SEI implementation. This will be mainly useful once support for SEI messages that can be used by the hevc parser are implemented, like Picture Timing. Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* hevc: Add NEON 32x32 IDCTAlexandra Hájková2017-05-042-21/+294
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hevc: 16x16 NEON idct: Use the right element size for loads/storesAlexandra Hájková2017-05-041-8/+8
| | | | | | | This doesn't change the actual behaviour of the code but improves readability. Signed-off-by: Martin Storsjö <martin@martin.st>
* aacsbr: Turnoff in the event of over read.Alex Converse2017-05-031-0/+1
| | | | | | | | | | | | | | | Aliased compressed AAC bytes are almost certainly not meaningful SBR data. In the wild this causes harsh artifacts switching HE-AAC streams that don't have SBR headers aligned with segment boundaries. Turning off SBR falls back to a default set of upsampling parameters that can function as a sort of error concealment. This is consistent with how the decoder handles other sorts of errors. Bug-Id: 1047 CC: libav-stable@libav.org Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
* aac: Split function to parse ADTS header data into public and private partDiego Biurrun2017-05-028-28/+110
| | | | | | This makes the currently semi-public avpriv_aac_parse_header() function private to libavcodec and adds a proper public API function to return the parts of the ADTS header required in libavformat.
* bitstream: Move VLC reading functions into the vlc.h headerLuca Barbato2017-05-022-73/+74
| | | | | | This makes the bitstream.h header leaner. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* vlc: Add header #include when the types are usedLuca Barbato2017-05-0229-0/+29
| | | | | | Do not rely on indirectly including it from bitstream.h. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* hevc: Add NEON add_residual for bitdepth 10Alexandra Hájková2017-05-012-0/+102
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* vp9_raw_reorder_bsf: Remove a redundant allocationMark Thompson2017-04-301-4/+0
| | | | | | This was left over from an earlier version which created the new packet inside the current frame structure. Now it just leaks an unused packet, so remove the allocation entirely.
* mpeg4audio: Make avpriv_copy_pce_data() inlineAnton Khirnov2017-04-283-42/+43
| | | | | | | | | The function currently accepts a PutBitContext and a GetBitContext, which hardcodes their sizes into the lavc ABI. Since the function is quite small and only called in a few places, the simplest solution is making it inline, thus avoiding a runtime dependency completely. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* arm: hevc_idct: Tune the add_res_8x8 and add_res_32x32 functionsMartin Storsjö2017-04-281-16/+35
| | | | | | | | | | | Before: Cortex A7 A8 A9 A53 hevc_add_res_8x8_8_neon: 116.0 58.7 80.2 90.7 hevc_add_res_32x32_8_neon: 1230.0 737.5 1187.5 974.4 After: hevc_add_res_8x8_8_neon: 97.7 57.0 73.7 80.0 hevc_add_res_32x32_8_neon: 1216.0 698.7 1127.5 827.1 Signed-off-by: Martin Storsjö <martin@martin.st>
* hevc: Add NEON add_residual for bitdepth 8Seppo Tomperi2017-04-272-0/+103
| | | | | | Optimized by Alexandra Hájková. Signed-off-by: Martin Storsjö <martin@martin.st>
* mlp_parser: Drop in-parser downmix functionalityVittorio Giovara2017-04-273-23/+9
| | | | | | | | | | | | | | | | request_channel_layout is a decoder option and it makes no sense to have it in a parser. This feature was needed in the past when the decoder was allowed to reuse the avctx from the demuxer. Nowadays the decoder receives only the parameters from it, already containing the real channel layout (and the correct request_channel_layout option). After initialization the decoder overwrites the channel layout with the downmixed one that is actually output, so there is no need to preserve this functionality in the parser. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* aac_ac3_parser: Drop in-parser downmix functionalityVittorio Giovara2017-04-271-14/+2
| | | | | | | | | | | | | | | | request_channel_layout is a decoder option and it makes no sense to have it in a parser. This feature was needed in the past when the decoder was allowed to reuse the avctx from the demuxer. Nowadays the decoder receives only the parameters from it, already containing the real channel layout (and the correct request_channel_layout option). After initialization the decoder overwrites the channel layout with the downmixed one that is actually output, so there is no need to preserve this functionality in the parser. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* vaapi: Add external control of allow-profile-mismatchMark Thompson2017-04-261-9/+2
| | | | Uses the just-added ALLOW_PROFILE_MISMATCH flag.
* lavc: Add flag to allow profile mismatch with hardware decodingMark Thompson2017-04-262-1/+15
|
* vaapi_encode: Use gop_size consistently in RC parametersMark Thompson2017-04-263-6/+5
| | | | | | | | The non-H.26[45] codecs already use this form. Since we don't currently generate I frames for codecs which support them separately to IDR, the p_per_i variable is set to infinity by default so that it doesn't interfere with any other calculation. (All the code for I frames still exists, and it works for H.264 if set manually.)
* mlp: Factor out channel layout subset checksVittorio Giovara2017-04-263-13/+15
|
* mlp: Drop ff_ prefix from a static functionVittorio Giovara2017-04-261-2/+2
|
* mlp: Rename the channel layout variableVittorio Giovara2017-04-261-12/+12
| | | | | Purely cosmetic change, will make code more readable once the new channel layout takes over.
* hevc: Add support for bitdepth 10 for IDCT DCAlexandra Hájková2017-04-252-12/+37
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hevc: Add NEON IDCT DC functions for bitdepth 8Seppo Tomperi2017-04-252-0/+88
| | | | | Signed-off-by: Alexandra Hájková <alexandra@khirnov.net> Signed-off-by: Martin Storsjö <martin@martin.st>
* clearvideo: Convert to the new bitstream readerDiego Biurrun2017-04-251-12/+12
|
* Add ClearVideo decoderKostya Shishkov2017-04-256-1/+402
| | | | | | Only I-frames are decoded for now. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* utvideodec: Fix gradient prediction when stride does not match widthPaul B Mahol2017-04-251-2/+10
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* utvideodec: Fix decoding odd sizes with interlaced video with some formatsPaul B Mahol2017-04-251-1/+11
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dca: Move the downmix request check outside the loopAnton Khirnov2017-04-251-4/+7
|
* vc1dec: raise an error if sprite picture data is missingSean McGovern2017-04-241-1/+1
| | | | | Bug-Id: 1013 CC: libav-stable@libav.org
* qsvenc: Make sure the interlaced encoding worksAaron Levinson2017-04-232-6/+24
| | | | | | | And reduce the vertical alignment constraint when possible to reduce the memory usage. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* qsvenc: Use MFXVideoENCODE_Query() to update the parametersAaron Levinson2017-04-231-1/+9
| | | | | | | | Fill out the default/unset parameters with ones actually in use. Matches the current MediaSDK example code. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mjpeg: Report non-3 component rgb lossless as not supportedLuca Barbato2017-04-201-0/+6
| | | | | Bug-Id: 1043 CC: libav-stable@libav.org
* dca: Account for lfe when checking for the channel countLuca Barbato2017-04-191-1/+1
| | | | | Bug-Id: 1037 CC: libav-stable@libav.org
* utvideodec: Support for gradient predictionPaul B Mahol2017-04-151-5/+227
| | | | | | | Introduced with utvideo 18. Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* utvideodec: Reuse the huffyuv add_leftPaul B Mahol2017-04-152-30/+136
| | | | | | | ~10% faster when simd is available. Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* utvideodec: Support ULY4 and ULH4Paul B Mahol2017-04-151-0/+30
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
OpenPOWER on IntegriCloud