summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* avcodec/chomp: move the reference in the bsf internal bufferJames Almer2018-03-11
| | | | | | | There's no need to allocate a new packet for it. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/extract_extradata: don't allocate more space than needed when ↵James Almer2018-03-10
| | | | | | removing NALUs in h264/hevc Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ffv1: support of more pix_fmtJérôme Martinez2018-03-10
| | | | | | | | Without direct support of such pix_fmt, content is padded to 16-bit and it is not possible to know that the source file was with a smaller bit depth so framemd5 is different Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vc2enc: replace quantization LUT with a smaller division LUTRostislav Pehlivanov2018-03-10
| | | | | | | | | This commit replaces the huge and impractical LUT which converted coeffs and a quantizer to bits to encode and instead uses a standard multiplication and a shift to replace the division and then codes the values using the regular golomb coding functions. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/extract_extradata: zero initalize the padding bytes in all allocated ↵James Almer2018-03-09
| | | | | | | buffers Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ffv1enc: remove warning about transparencyJérôme Martinez2018-03-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/videotoolbox: fix threaded decodingRodger Combs2018-03-08
| | | | | | | | | | | | | | | | | | AVHWAccel.end_frame can run on a worker thread. The assumption of the frame threading code is that the worker thread will change the AVFrame image data, not the AVFrame fields. So the AVFrame fields are not synced back to the main thread. But this breaks videotoolbox due to its special requirements (everything else is fine). It actually wants to update AVFrame fields. The actual videotoolbox frame is now stored in the dummy AVBufferRef, so it mimics what happens in non-videotoolbox cases. (Changing the AVBufferRef contents is a bit like changing the image data.) The post_process callback copies that reference to the proper AVFrame field. Based on a patch by wm4. Signed-off-by: Aman Gupta <aman@tmm1.net>
* lavc/vaapi_encode: Don't return error if the underlying driver doesn't ↵Haihao Xiang2018-03-08
| | | | | | | | | | | | support B frames The underlying driver need not support B frames - since they are enabled by default for some codecs, it is better to disable them rather than returning an error in this case. This makes the default settings usable for low-power encoding on Intel platforms. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* avcodec/mediacodecdec: add more trace logging of input/output buffersAman Gupta2018-03-07
| | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* avcodec/mediacodecdec: add delay_flush optionAman Gupta2018-03-07
| | | | | | | | | | | | | | | | | | | | | | | | The default behavior of the mediacodec decoder before this commit was to delay flushes until all pending hardware frames were returned to the decoder. This was useful for certain types of applications, but was unexpected behavior for others. The new default behavior with this commit is now to execute flushes immediately to invalidate all pending frames. The old behavior can be enabled by setting delay_flush=1. With the new behavior, video players implementing seek can simply call flush on the decoder without having to worry about whether they have one or more mediacodec frames still buffered in their rendering pipeline. Previously, all these frames had to be explictly freed (or rendered) before the seek/flush would execute. The new behavior matches the behavior of all other lavc decoders, reducing the amount of special casing required when using the mediacodec decoder. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* sbcenc: add armv6 and neon asm optimizationsAurelien Jacobs2018-03-07
| | | | This was originally based on libsbc, and was fully integrated into ffmpeg.
* sbcenc: add MMX optimizationsAurelien Jacobs2018-03-07
| | | | | | | | This was originally based on libsbc, and was fully integrated into ffmpeg. Rough speed test: C version: speed= 592x MMX version: speed= 785x
* sbc: implement SBC encoder (low-complexity subband codec)Aurelien Jacobs2018-03-07
| | | | This was originally based on libsbc, and was fully integrated into ffmpeg.
* sbc: add parser for SBCAurelien Jacobs2018-03-07
|
* sbc: implement SBC decoder (low-complexity subband codec)Aurelien Jacobs2018-03-07
| | | | This was originally based on libsbc, and was fully integrated into ffmpeg.
* lavc/vorbisdec: Allow avcodec_open2 to call .closeMatt Wolenetz2018-03-07
| | | | | | | | | | If there is a decoder initialization failure detected in avcodec_open2 after .init is called, allow graceful decoder .close to prevent leaking vorbis decoder allocations such as those from vorbis_parse_setup_*. BUG=772699 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec: log configuration change detailsAman Gupta2018-03-07
| | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mediacodec_wrapper: fix false positives in swdec blacklistStefan _2018-03-07
| | | | | 'OMX.SEC.avc.dec' is a valid hardware decoder, while the decoders we seek to blacklist all match 'OMX.SEC.*.sw.dec'.
* mpegvideo_parser: fix indentation of an if statementMasaki Tanaka2018-03-07
|
* h264_metadata: Actually fail when sei_user_data option is invalidMark Thompson2018-03-06
|
* avcodec/mediacodec: reduce loglevel for per-frame loggingAman Gupta2018-03-06
| | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* avcodec/mediacodec_wrapper: blacklist more software decodersStefan _2018-03-06
| | | | | | | | Additionally blacklist ffmpeg, Samsung and Qualcomm software implementations offered through MediaCodec. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* lavc/qsvenc: disable h264 look_ahead by defaultZhong Li2018-03-06
| | | | | | | | | | | Look_ahead can provide quality improvements, but would better disable it by default due to some reasons: 1. It is only available for some codecs (e.g. HEVC is not supported) on Intel Haswell and plus platforms. Thus means it will be failed on some platforms. 2. It significantly increases encoding latency and memory consumption. 3. It may overwrite some other options such as CBR and CAVLC. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* Merge commit '2d6b3f3a9dce409ca51d70ef4b85c0593bb4b109'Mark Thompson2018-03-05
|\ | | | | | | | | | | | | * commit '2d6b3f3a9dce409ca51d70ef4b85c0593bb4b109': qsvenc: Provide a detailed error message if the parameters are invalid Merged-by: Mark Thompson <sw@jkqxz.net>
| * qsvenc: Provide a detailed error message if the parameters are invalidZhong Li2018-03-05
| | | | | | | | | | | | | | | | | | Currently it always shows "Selected ratecontrol mode is not supported by the QSV runtime. Choose a different mode", but sometimes it is not accurate. Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/cbs: use a reference to the assembled CodedBitstreamFragment buffer ↵James Almer2018-03-05
| | | | | | | | | | | | | | | | | | | | | | | | when writing packets This saves one malloc + memcpy per packet The CodedBitstreamFragment buffer is padded to follow the requirements of AVPacket. Reviewed-by: jkqxz Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/vaapi: mask unused bits in bitplane_present.valueJerome Borsboom2018-03-04
| | | | | | | | | | | | | | | | | | Due to the union construct, unused bits in bitplane_present.value might be uninitialized even when the used bits are all set to a value. Masking the unused bits prevents spurious true values when all used bits are unset, e.g. skipped pictures. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* | avcodec/vaapi: add fields for VAAPI VC-1 interlaced decodingJerome Borsboom2018-03-04
| | | | | | | | | | | | | | Pass necessary bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* | avcodec/vc1: add bitstream elements for VAAPI VC-1 interlaced decodingJerome Borsboom2018-03-04
| | | | | | | | | | | | | | We need to pass more bitstream elements to the VAAPI VC-1 decoder in order to start doing interlaced decoding in hardware. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* | avcodec/mediacodecdec: factorize codec declarationsMatthieu Bouron2018-03-03
| |
* | avcodec/mediacodecdec: factorize common extradata functionsMatthieu Bouron2018-03-03
| |
* | avcodec/mediacodecdec: add missing "libavutil/internal.h" includeMatthieu Bouron2018-03-03
| | | | | | | | libavutil/internal.h defines NULL_IF_CONFIG_SMALL.
* | avcodec/mediacodec_wrapper: load and use MediaFormat.constainsKey()Matthieu Bouron2018-03-03
| | | | | | | | | | Avoids triggering an exception in MediaFormat getter functions if the key does not exist.
* | avcodec/mediacodecdec_common: remove unused field from MediaCodecDecContextMatthieu Bouron2018-03-03
| |
* | avcodec/mediacodecdec_common: remove spurious spaceMatthieu Bouron2018-03-03
| |
* | avcodec/mediacodecdec_common: refactor mediacodec_dec_parse_format()Matthieu Bouron2018-03-03
| |
* | avcodec/nvenc: Declare support for P016Philip Langdale2018-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvenc doesn't support P016, but we have two problems today: 1) We declare support for YUV444P16 which nvenc also doesn't support. We do this because it's the only pix_fmt we have that can approximate nvenc's internal format that is YUV444P10 with data in MSBs instead of LSBs. Because the declared format is a 16bit one, it will be preferrentially chosen when encoding >10bit content, but that content will normally be YUV420P12 or P016 which should get mapped to P010 and not YUV444P10. 2) Transcoding P016 content with nvenc should be possible in a pure hardware pipeline, and that can't be done if nvenc doesn't say it accepts P016. By mapping it to P010, we can use it, albeit with truncation. I have established that swscale doesn't know how to dither to 10bits so we'd get truncation anyway, even if we tried to do this 'properly'.
* | avcodec/hevcdec: Declare that nvdec supports 12bit decodingPhilip Langdale2018-03-02
| |
* | avcodec/wmaprodec: support decoding up to 16 channels of xmaMaxton2018-03-01
| | | | | | | | Signed-off by: Maxton <maxton@maxton.xyz>
* | avcodec/Makefile: skip nvdec.h header when nvdec is not enabledJames Almer2018-02-27
| | | | | | | | | | | | Fixes make checkheaders now that the cuda headers are no longer in-tree Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/msmpeg4dec: Check for input end in msmpeg4v34_decode_mb()Michael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 6276/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV1_fuzzer-5881196690014208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/truemotion2rt: Check input buffer sizeMichael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 6250/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2RT_fuzzer-5479814011027456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/g2meet: Check tile dimensions with av_image_check_size2()Michael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: OOM Fixes: 6216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-4983807968018432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/exr: fix invalid shift in unpack_14()Michael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: 6154/clusterfuzz-testcase-minimized-5762231061970944 Fixes: runtime error: shift exponent 63 is too large for 32-bit type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/bintext: sanity check dimensionsMichael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 6277/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XBIN_fuzzer-6047202288861184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | compat: remove in-tree NVidia headersTimo Rothenpieler2018-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | External headers are no longer welcome in the ffmpeg codebase because they increase the maintenance burden. However, in the NVidia case the vanilla headers need some modifications to be usable in ffmpeg therefore we still provide them, but in a separate repository. The external headers can be found at https://git.videolan.org/?p=ffmpeg/nv-codec-headers.git Fate-source is updated because of the deleted files, and dynlink_loader.h license headers were updated with the standard FFmpeg headers. Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | avcodec/utvideodec: Check subsample factorsMichael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | Fixes: Out of array read Fixes: heap_poc Found-by: GwanYeong Kim <gy741.kim@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/rscc: Skip empty frames (nb_tiles == 0)Michael Niedermayer2018-02-27
| | | | | | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 6266/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RSCC_fuzzer-5692431816196096 Its not known if nb_tiles is allowed so it is not treated as an error Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/exr : add support for long name flag and be more explicit about ↵Martin Vignali2018-02-24
| | | | | | | | | | | | | | | | unsupported flag based-on patch by Carl Eugen Hoyos Fix ticket 6994
* | Add libcodec2 en/decoderTomas Härdin2018-02-24
| |