summaryrefslogtreecommitdiff
path: root/libavcodec/internal.h
Commit message (Collapse)AuthorAge
* Merge commit '019ab88a95cb31b698506d90e8ce56695a7f1cc5'James Almer2017-05-08
|\ | | | | | | | | | | | | * commit '019ab88a95cb31b698506d90e8ce56695a7f1cc5': lavc: add an option for exporting cropping information to the caller Merged-by: James Almer <jamrial@gmail.com>
| * lavc: add an option for exporting cropping information to the callerAnton Khirnov2017-01-12
| | | | | | | | | | Also, add generic code for handling cropping, so the decoders can export just the cropping size and not bother with the rest.
* | avcodec: Avoid splitting side data repeatedlyMichael Niedermayer2017-05-06
| | | | | | | | | | | | | | | | Fixes Timeout Fixes: 508/clusterfuzz-testcase-6245747678773248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/internal: update FF_CODEC_CAP_SETS_PKT_DTS doxyJames Almer2017-05-01
| | | | | | | | The code it refers to was moved to decode.c in 00fb745a10a151791ce2e49ba3e463bd17ea9251
* | avcodec/pthread_frame, decode: allow errors to happen on drainingMuhammad Faiz2017-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So, all frames and errors are correctly reported in order. Also limit the numbers of error during draining to prevent infinite loop. This fix fate failure with THREADS>=4: make fate-h264-attachment-631 THREADS=4 This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f. Suggested-by: wm4, Ronald S. Bultje, Marton Balint Reviewed-by: w4 <nfxjfg@googlemail.com> Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* | Merge commit '972c71e9cb63e24f57ee481e413199c7d88a8813'James Almer2017-04-22
|\| | | | | | | | | | | | | * commit '972c71e9cb63e24f57ee481e413199c7d88a8813': lavc: add support for filtering packets before decoding Merged-by: James Almer <jamrial@gmail.com>
| * lavc: add support for filtering packets before decodingAnton Khirnov2016-12-14
| |
* | Merge commit '061a0c14bb5767bca72e3a7227ca400de439ba09'James Almer2017-04-22
|\| | | | | | | | | | | | | | | | | * commit '061a0c14bb5767bca72e3a7227ca400de439ba09': decode: restructure the core decoding code CUVID decoder adapted by wm4. Merged-by: James Almer <jamrial@gmail.com>
| * decode: restructure the core decoding codeAnton Khirnov2016-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the new decoding API is pretty much just a wrapper around the old deprecated one. This is problematic, since it interferes with making full use of the flexibility added by the new API. The old API should also be removed at some future point. Reorganize the code so that the new send_packet/receive_frame functions call the actual decoding directly and change the old deprecated avcodec_decode_* functions into wrappers around the new API. The new internal API for decoders is now changing as well. Before this commit, it mirrors the public API, so the decoders need to implement send_packet() and receive_frame() callbacks. This turns out to require awkward constructs in both the decoders and the generic code. After this commit, the decoders only implement the receive_frame() callback and call a new internal function, ff_decode_get_packet() to obtain input data, in the same manner to how the bitstream filters now work. avcodec will now always make a reference to the input packet, which means that non-refcounted input packets will be copied. Keeping the previous behaviour, where this copy could sometimes be avoided, would make the code significantly more complex and fragile for only dubious gains, since packets are typically small and everyone who cares about performance should use refcounted packets anyway.
* | Merge commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f'James Almer2017-04-22
|\| | | | | | | | | | | | | | | | | | | * commit '549d0bdca53af7a6e0c612ab4b03baecf3a5878f': decode: be more explicit about storing the last packet properties Also copy pkt->size in extract_packet_props(), as it's needed for AVFrame.pkt_size Merged-by: James Almer <jamrial@gmail.com>
| * decode: be more explicit about storing the last packet propertiesAnton Khirnov2016-12-14
| | | | | | | | | | | | | | | | | | | | | | The current code stores a pointer to the packet passed to the decoder, which is then used during get_buffer() for timestamps and side data passthrough. However, since this is a pointer to user data which we do not own, storing it is potentially dangerous. It is also ill defined for the new decoding API with split input/output. Fix this problem by making an explicit internally owned copy of the packet properties.
* | avcodec: estimate output bitrate for uncompressed video codecsTobias Rapp2017-03-17
| | | | | | | | | | | | | | | | | | | | | | Allows to get a more realistic total bitrate (and estimated file size) in avi_write_header. Previously a static default value of 200k was assumed. Adds an internal helper function for bitrate guessing. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/internal: Constify AVPacket* in AVCodecInternal.Carl Eugen Hoyos2017-03-16
| | | | | | | | | | Fixes a gcc warning: libavcodec/utils.c:2244:26: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
* | Merge commit '89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0'James Almer2017-03-15
|\| | | | | | | | | | | | | * commit '89aebc5bcc6e23a0a79c3f51c3a55c3571692ba0': lavc: align the linesize to 32 when AVX is enabled Merged-by: James Almer <jamrial@gmail.com>
| * lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | aacdec: do not mutate input packet metadatawm42017-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently the demuxer outputs the wrong padding for HE-AAC (based on the raw sample rate, or so). aacdec contains a hack to adjust the muxer padding accordingly before it's used to trim the decoder output. This modified the packet side data, which in combination with the old decoding API would change the packet the user passed to the decoder. This is clearly not allowed, and it breaks running some gapless fate tests with "-fflags +keepside" applied (without keepside, the packet metadata is typically newly allocated, essentially making a copy and not modifying the user's input packet). This should probably be fixed in the demuxer (and consequently also the muxer), but for now only fix the immediate problem. Regression since 946ed78f5f8 (2012).
* | Fix -Werror=parentheses errorThierry Foucu2016-11-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffmpeg: move subframe warning to libavcodecwm42016-10-01
| | | | | | | | | | | | | | | | | | | | | | With the new decode API, doing this in ffmpeg.c is impractical. There was resistance against removing the warning, so put it into libavcodec. Not bothering with reducing the warning to verbose log level for subsequent wanrings. The warning should be rare, and only happen when developing new codecs for the old API. Includes a change suggested by Michael Niedermayer.
* | libavcodec: factor out SEI generation for A53 captionsAndrey Turkin2016-06-19
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-04-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, the decoding API was restricted to outputting 0 or 1 frames per input packet. It also enforces a somewhat rigid dataflow in general. This new API seeks to relax these restrictions by decoupling input and output. Instead of doing a single call on each decode step, which may consume the packet and may produce output, the new API requires the user to send input first, and then ask for output. For now, there are no codecs supporting this API. The API can work with codecs using the old API, and most code added here is to make them interoperate. The reverse is not possible, although for audio it might. From Libav commit 05f66706d182eb0c36af54d72614bf4c33e957a9. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avcodec: Add avpriv_codec_get_cap_skip_frame_fill_param()Michael Niedermayer2016-04-21
| | | | | | | | | | | | With this the use of the caps_internal from libavformat can be avoided Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '34138ece23c8ddae543269212a051c00d49e67d7'Hendrik Leppkes2015-12-18
|\| | | | | | | | | | | | | * commit '34138ece23c8ddae543269212a051c00d49e67d7': log: Use a do {} while (0) for tlog Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * log: Use a do {} while (0) for tlogLuca Barbato2015-12-08
| | | | | | | | Avoid the warning `-Wempty-body`.
* | Merge commit '11c9bd633f635f07a762be1ecd672de55daf4edc'Hendrik Leppkes2015-12-17
|\| | | | | | | | | | | | | * commit '11c9bd633f635f07a762be1ecd672de55daf4edc': libopenh264enc: export CPB props side data Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * libopenh264enc: export CPB props side dataAnton Khirnov2015-12-06
| |
| * log: Use a do {} while (0) for dlogLuca Barbato2015-12-05
| | | | | | | | Avoid the warning `-Wempty-body`.
* | lavc: move exp2fi to ff_exp2fi in internal.hGanesh Ajjanagadde2015-12-16
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avcodec/internal: Fix skiped typoMichael Niedermayer2015-11-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/internal: add FF_CODEC_CAP_SKIP_FRAME_FILL_PARAMMatthieu Bouron2015-11-15
| | | | | | | | | | The decoder extracts and fills its parameters even if the frame is skipped due to the skip_frame setting.
* | avcodec: rename avpriv_color_frame to ff_color_frameAndreas Cadhalpun2015-10-22
| | | | | | | | | | | | | | It is only used inside libavcodec. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec: Don't lock during open if the codec has threadsafe initDerek Buitenhuis2015-10-02
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avcodec/internal: Use do {} while() for ff_tlog()Michael Niedermayer2015-09-20
| | | | | | | | | | | | | | Avoids problems when used without braces Found-by: Clément Bœsch <u@pkh.me> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/internal: silence -Wempty-body on clangGanesh Ajjanagadde2015-09-19
| | | | | | | | | | | | | | | | This silences a -Wempty-body warning on clang 3.7+, e.g http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '87a051f97633010f71dfc1d23d806856499bf231'Hendrik Leppkes2015-09-12
|\| | | | | | | | | | | | | * commit '87a051f97633010f71dfc1d23d806856499bf231': lavc: allow asynchronous decoders to return correct pkt_dts values Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: allow asynchronous decoders to return correct pkt_dts valueswm42015-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic code in utils.c sets the AVFrame.pkt_dts field from the packet it was supposedly decoded. This does not have to be true for a fully asynchronous decoder like mmaldec. It could be overwritten with an incorrect value. Even if the decoder doesn't determine the DTS (but sets it to AV_NOPTS_VALUE), it's impossible to determine a correct value in utils.c. Decoders can now be marked with FF_CODEC_CAP_SETS_PKT_DTS, in which case utils.c won't overwrite the field. The decoders are expected to set this field (even if they only set it to AV_NOPTS_VALUE). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec: remove deprecated old audio encode APIHendrik Leppkes2015-09-05
| |
* | Move ff_dlog from lavc to lavu.Ronald S. Bultje2015-08-18
| |
* | avcodec/internal: improve min_size documentation for ff_alloc_packet2()Michael Niedermayer2015-08-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/internal: Deprecate ff_alloc_packet() in favor of ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: Add a min size parameter to ff_alloc_packet2()Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | This parameter can be used to inform the allocation code about how much downsizing might occur, and can be used to optimize how to allocate the packet Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Replace AV_PKT_DATA_QUALITY_FACTOR by AV_PKT_DATA_QUALITY_STATSMichael Niedermayer2015-07-22
| | | | | | | | | | | | | | | | | | The stats are a superset of the quality factor, also allowing the picture type and encoder "PSNR" stats to be exported This also replaces the native by fixed little endian order for the affected side data AV_PKT_DATA_QUALITY_FACTOR is left as a synonym of AV_PKT_DATA_QUALITY_STATS Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc: Allow 64 channels internally.Carl Eugen Hoyos2015-07-17
| |
* | Merge commit '910247f1720c6aae422723c05dac6d0b19f20bec'Michael Niedermayer2015-07-03
|\| | | | | | | | | | | | | | | | | | | | | * commit '910247f1720c6aae422723c05dac6d0b19f20bec': lavc: Deprecate avctx.{inter,intra}_quant_bias Conflicts: libavcodec/mpegvideo_enc.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Deprecate avctx.{inter,intra}_quant_biasVittorio Giovara2015-07-02
| | | | | | | | | | | | | | They are used by dnxhd and mpegvideo_enc exclusively, move them to codec private options instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '5bba3ab0cf7a0238ee1ea31ca2da08ce860fd8f9'Michael Niedermayer2015-04-24
|\| | | | | | | | | | | | | | | | | | | * commit '5bba3ab0cf7a0238ee1ea31ca2da08ce860fd8f9': internal: Make dlog/tlog a no-op when disabled Conflicts: libavcodec/internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * internal: Make dlog/tlog a no-op when disabledVittorio Giovara2015-04-24
| | | | | | | | Improves Coverity analysis, avoiding "double semicolon" CIDs.
* | avcodec/internal: Fix ff_dlog() define like av_dlog()Michael Niedermayer2015-04-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>