summaryrefslogtreecommitdiffstats
path: root/libavcodec/internal.h
Commit message (Collapse)AuthorAgeFilesLines
* lavc: Use hardware config information in ff_get_format()Mark Thompson2017-12-191-0/+6
| | | | | | | | | | | This removes the dependency that hardware pixel formats previously had on AVHWAccel instances, meaning only those which actually do something need exist after this patch. Also updates avcodec_default_get_format() to be able to choose hardware formats if either a matching device has been supplied or no additional external configuration is required, and avcodec_get_hw_frames_parameters() to use the hardware config rather than searching the old hwaccel list.
* libavcodec: Don't use dllexport, only dllimport when building DLLsMartin Storsjö2017-11-191-5/+1
| | | | | | | | | | | | | | | | | | | | The only purpose of dllexport (which is set while building the library that exports the symbols) is to have the linker automatically export such symbols into a DLL without using a def file - it doesn't affect the generated code. For both MSVC and mingw builds, this isn't essential since we override what symbols to export via an autogenerated def file instead. Update a comment in configure to refer to the right concept. With lld, this avoids warnings about duplicate export directives, when some symbols are requested to be exported both via dllexport attributes and via the autogenerated def file. This also reduces the number of lines of code marginally. Signed-off-by: Martin Storsjö <martin@martin.st>
* configure: Use dllexport/dllimport for data symbols across DLLs with mingwMartin Storsjö2017-08-311-1/+1
| | | | | | | | | | | This avoids having to use pseudo relocations. The version script used for exporting functions is skipped as soon as the set of object files contains symbols marked with dllexport, therefore we need to use makedef to produce the full list of symbols to be exported. Signed-off-by: Martin Storsjö <martin@martin.st>
* msvc: Properly specify dllexport for data symbols shared across dll boundariesMartin Storsjö2017-08-311-0/+10
| | | | | | | | | We currently only have exported data symbols within libavcodec, but the concept is easy to extend to other libraries if necessary. The attribute declaration needs to be in a private header though, since we can't use CONFIG_SHARED in public installed headers. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: Drop deprecated options moved to private contextsVittorio Giovara2017-03-231-2/+0
| | | | Deprecated in 10/2014 and 07/2015.
* lavc: add an option for exporting cropping information to the callerAnton Khirnov2017-01-121-0/+6
| | | | | Also, add generic code for handling cropping, so the decoders can export just the cropping size and not bother with the rest.
* lavc: add support for filtering packets before decodingAnton Khirnov2016-12-141-0/+6
|
* decode: restructure the core decoding codeAnton Khirnov2016-12-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* decode: be more explicit about storing the last packet propertiesAnton Khirnov2016-12-141-3/+3
| | | | | | | | | | | 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.
* lavc: introduce a new decoding/encoding API with decoupled input/outputwm42016-03-231-0/+13
| | | | | | | | | | | | | | | | 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>
* log: Use a do {} while (0) for tlogLuca Barbato2015-12-081-1/+1
| | | | Avoid the warning `-Wempty-body`.
* libopenh264enc: export CPB props side dataAnton Khirnov2015-12-061-0/+5
|
* log: Use a do {} while (0) for dlogLuca Barbato2015-12-051-1/+1
| | | | Avoid the warning `-Wempty-body`.
* lavc: allow asynchronous decoders to return correct pkt_dts valueswm42015-09-121-1/+7
| | | | | | | | | | | | | | | 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>
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Deprecate avctx.{inter,intra}_quant_biasVittorio Giovara2015-07-021-0/+4
| | | | | | | 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>
* internal: Make dlog/tlog a no-op when disabledVittorio Giovara2015-04-241-2/+2
| | | | Improves Coverity analysis, avoiding "double semicolon" CIDs.
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-0/+13
|
* libavcodec: Clarify the documentation of the internal codec capability flagsMartin Storsjö2015-04-051-2/+7
| | | | | | The previous documentation was very vague and almost misleading. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: Introduce AVCodec internal capabilitiesVittorio Giovara2015-03-131-0/+10
| | | | | | | This field is designed for marking codec properties useful to lavc internals. Two internal capabilities are added: - FF_CODEC_CAP_INIT_THREADSAFE: codec can be opened without locks; - FF_CODEC_CAP_INIT_CLEANUP: codec frees memory if initialization fails.
* lavc: fix bitshifts amount bigger than the typeVittorio Giovara2014-11-181-0/+2
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
* Add av_image_check_sar() and use it to validate SARJustin Ruggles2014-06-201-0/+6
|
* lavc: Add hwaccel private data and init/uninit callbacksAnton Khirnov2014-05-111-0/+5
|
* lavc: set AVCodecContext.hwaccel in ff_get_format()Anton Khirnov2014-05-111-9/+0
| | | | This way each decoder does not have to do the same thing manually.
* lavc: Add an internal wrapper around get_format()Anton Khirnov2014-05-111-0/+7
| | | | It will be useful in the following commits.
* libavcodec: when decoding, copy replaygain side data to decoded framesAnton Khirnov2014-03-241-0/+5
|
* avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.Tim Walker2014-01-051-0/+7
| | | | Includes a libavcodec utility function to update a frame's side data.
* lavc: rework handling of refcounted_frames=0Anton Khirnov2013-12-091-1/+1
| | | | | | | | | Use only proper AVFrame API (no assigning of whole frames, since that hardcodes sizeof(AVFrame) into lavc). Make a copy of the side data, so the caller can use av_frame_unref/free on non-refcounted frames, eliminating the need for avcodec_get_frame_defaults()/avcodec_free_frame().
* hwaccel: Simplify ff_find_hwaccelLuca Barbato2013-11-101-3/+2
| | | | It is always called by passing fields from an AVCodecContext.
* lavc: move AVCodecContext.pkt to AVCodecInternalAnton Khirnov2013-11-041-0/+6
| | | | It's a private field, not meant to be accessed from outside lavc.
* pthread: store thread contexts in AVCodecInternal instead of AVCodecContextAnton Khirnov2013-11-041-0/+2
| | | | | | It's a private field, it should not be visible to callers. Deprecate AVCodecContext.thread_opaque
* lavc: replace avcodec_set_dimensions with ff_set_dimensionsAnton Khirnov2013-10-311-0/+6
| | | | | | avcodec_set_dimensions() is supposed to be an internal utility function, there is no reason whatsoever for it to be public. Therefore deprecate it.
* lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-261-0/+5
| | | | | | | Also move the declaration to internal.h, and add restrict qualifiers to the declaration (as in the implementation). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruftAnton Khirnov2013-03-091-8/+0
|
* lavc: limit maximum number of channels to 63Anton Khirnov2013-03-081-1/+1
| | | | | | This is the most that can be represented with the current channel layout system. This limit should be raised/removed when a better system is implemented.
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-23/+41
|
* avcodec/internal: Fix #if DECODE_AUDIO / ENCODE_AUDIO name mismatchDiego Biurrun2013-03-061-1/+1
|
* lavc: don't reuse audio buffersAnton Khirnov2012-12-041-3/+6
| | | | | Any performance gain from this is negligible and not worth the extra code.
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-041-0/+7
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* avcodec: remove ff_is_hwaccel_pix_fmtLuca Barbato2012-11-131-5/+0
| | | | | It is used only in one place and is unlikely it would be needed elsewhere.
* lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decodersJustin Ruggles2012-11-011-0/+2
|
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-081-3/+3
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
|
* lavc: pad last audio frame with silence when needed.Anton Khirnov2012-05-091-0/+6
|
* avcodec: add ff_samples_to_time_base() convenience function to internal.hJustin Ruggles2012-02-201-0/+11
|
* ff_alloc_packet: modify the size of the packet to match the requested sizeJustin Ruggles2012-02-011-0/+1
| | | | | This will simplify encoders which use this function to request the exact packet size rather than the maximum size.
* avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()Justin Ruggles2012-01-151-0/+25
| | | | | | | | This allows audio encoders to optionally take an AVFrame as input and write encoded output to an AVPacket. This also adds AVCodec.encode2() which will also be usable by video and subtitle encoders once support is implemented in the public functions.
* utils: Check for extradata size overflows.Alex Converse2012-01-121-0/+7
|
* avcodec: deprecate AVFrame.ageMans Rullgard2011-12-181-1/+0
| | | | | | | | This was intended as an optimisation for skipped blocks in MPEG2 P-frames and never used elsewhere. Removing this "optimisation" speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9). Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add avcodec_decode_audio4().Justin Ruggles2011-12-021-3/+6
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
OpenPOWER on IntegriCloud