summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* | avcodec/hapqa_extract: remove the AVOption flagsJames Almer2018-03-14
| | | | | | | | | | | | | | These two are not used for bitstream filters. Reviewed-by: Martin Vignali <martin.vignali@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hapqa_extract: fix two error return valuesJames Almer2018-03-13
| | | | | | | | | | | | | | ret is 0 by default. Reviewed-by: Martin Vignali <martin.vignali@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/hapqa_extract: move the reference in the bsf internal bufferJames Almer2018-03-13
| | | | | | | | | | | | There's no need to allocate a new packet for it. Signed-off-by: James Almer <jamrial@gmail.com>
* | avcodec/mediacodecdec: fix immediate EAGAIN with buffered packetAman Gupta2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In cases where the mediacodec decoder consumed a partial packet, receive_frame() would start returning EAGAIN if the rest of the packet couldn't be flushed and no frames were immediately available. This fixes receive_frame() to perform its normal blocking wait for new frames before returning EAGAIN. Fixes an issue I could reproduce fairly often on a FireOS 6 device, and reported to be happening intermittently by two mpv users. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* | avcodec/hapqa_extract_bsf : add new bsf filterMartin Vignali2018-03-13
| | | | | | | | | | convert HapQA data to HAPQ or HAPAlphaOnly by copying the corresponding texture
* | avcodec/hap : move parse_section_header to hap.c in order to be use by new ↵Martin Vignali2018-03-13
| | | | | | | | bsf filter
* | vc2enc: properly promote operations to 64 bitsRostislav Pehlivanov2018-03-13
| | | | | | | | | | | | | | | | | | | | | | On Windows machines, the UL suffix still means 32 bits. The only parts that need 64 bits are (1ULL << (m + 32)) and (t*qf + qf). Hence, use the proper ULL suffix for the former and just increase the type of the qf constant for the latter. No overflows can happen as long as these are done in 64 bits and the quantization table doesn't change. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* | h264_mp4toannexb_bsf: Fix start code size of parameter sets.Yusuke Nakamura2018-03-13
| | | | | | | | | | | | Any parameter set shall have start code of at least 4 byte size. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mediacodecdec_common: make INFO_TRY_AGAIN trace messages more consistentMatthieu Bouron2018-03-12
| | | | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* | avcodec/mediacodecdec: add debug logging around hw buffer lifecycleAman Gupta2018-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | Some Android devices are very finicky about how quicky output buffers are returned back to the decoder, especially when they are associated with a Surface. This commit adds a new counter that keeps track of exactly how many hw output buffers are being retained by the user, along with DEBUG level logging that makes it easy to track the lifecycle of these buffers. Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* | avcodec/nuv: rtjpeg with dimensions less than 16 would result in no decoded ↵Michael Niedermayer2018-03-12
| | | | | | | | | | | | | | | | | | | | pixels thus reject it Fixes: Timeout Fixes: 6297/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-4882404863901696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/nuv: Check for minimum input size for uncomprssed and rtjpegMichael Niedermayer2018-03-12
| | | | | | | | | | | | | | | | Fixes: Timeout Fixes: 6297/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NUV_fuzzer-4882404863901696 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/wmalosslessdec: Reset num_saved_bits on error pathMichael Niedermayer2018-03-12
| | | | | | | | | | | | | | | | Fixes: NULL pointer dereference Fixes: poc-201803.wav Found-by: GwanYeong Kim <gy741.kim@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/trace_headers: 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/remove_extradata: 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/mov2textsub: 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: 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/dca_core: 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/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.