summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAge
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* utils: Use data buffers directly instead of an AVPictureVittorio Giovara2015-10-22
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: Add data and linesize to AVSubtitleRectVittorio Giovara2015-10-21
| | | | | | | | | | | | Use the new fields directly instead of the ones from AVPicture. This removes a layer of indirection which serves no pratical purpose whatsoever, and will help in removing AVPicture structure completely later. Every subtitle encoder/decoder seamlessly points to the new arrays, so it is possible to deprecate AVSubtitleRect.pict. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avcodec: Do not lock during init if there is no init functionDerek Buitenhuis2015-10-13
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: Do not lock during open for codecs marked as having threadsafe initDerek Buitenhuis2015-10-04
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavc: reimplement avcodec_get_type() using codec descriptorswm42015-09-28
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* 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>
* lavu: Drop deprecated duplicated AVFrame/AVCodecContext parametersVittorio Giovara2015-08-28
| | | | Deprecated in 10/2012.
* lavc: Drop deprecated get_buffer related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 11/2012.
* lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 10/2012.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Deprecate avctx.coded_frameVittorio Giovara2015-07-20
| | | | | | | | | | | | | | | | | The rationale is that coded_frame was only used to communicate key_frame, pict_type and quality to the caller, as well as a few other random fields, in a non predictable, let alone consistent way. There was agreement that there was no use case for coded_frame, as it is a full-sized AVFrame container used for just 2-3 int-sized properties, which shouldn't even belong into the AVCodecContext in the first place. The appropriate AVPacket flag can be used instead of key_frame, while quality is exported with the new AVPacketSideData quality factor. There is no replacement for the other fields as they were unreliable, mishandled or just not used at all. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Gather all coded_frame allocations and free functions to a single placeVittorio Giovara2015-07-20
| | | | | | | | | | | | | | Allocating coded_frame is what most encoders do anyway, so it makes sense to always allocate and free it in a single place. Moreover a lot of encoders freed the frame with av_freep() instead of the correct API av_frame_free(). This bring uniformity to encoder behaviour and prevents applications from erroneusly accessing this field when not allocated. Additionally this helps isolating encoders that export information with coded_frame, and heavily simplifies its deprecation. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* PCM signed 16-bit big-endian planar decoderPaul B Mahol2015-06-24
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec: Free the default avoptions on init failureLuca Barbato2015-04-22
|
* avcodec: Unref the dummy buffer on the fail pathLuca Barbato2015-04-22
|
* lavc: Introduce AVCodec internal capabilitiesVittorio Giovara2015-03-13
| | | | | | | 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: Improve thread locking error messageVittorio Giovara2015-03-13
|
* avcodec/utils: use correct printf specifier in ff_set_sarAndreas Cadhalpun2015-02-28
| | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: support extracting audio service type from side dataAnton Khirnov2015-01-27
|
* Add a side data type for audio service type.Anton Khirnov2015-01-27
| | | | | Currently, audio service type is a field in AVCodecContext. However, side data is more appropriate for this kind of information.
* lavc: add GBRAP to avcodec_align_dimensions2Paul B Mahol2015-01-14
|
* avcodec: add AVCodecContext.sw_pix_fmtRémi Denis-Courmont2014-12-25
| | | | | | | | This carries the pixel format that would be used if it were not for hardware acceleration. This is equal to AVCodecContext.pix_fmt if hardware acceleration is not in use. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: Compact the side-data passthroughLuca Barbato2014-11-09
|
* hwaccel: Deinitialize hardware acceleration early enoughRémi Denis-Courmont2014-11-04
| | | | | | | | | | | The application will destroy the underlying hardware handles when get_format() gets called again. Also this ensures the deinitialization takes place if the get_format callback returns an error. Regression from 1c80c9d7ef809180042257200c7b5f6b81d0b0e2. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* dump: display codec tags when availableVittorio Giovara2014-10-17
| | | | For both audio and video.
* lavc: deprecate the use of AVCodecContext.time_base for decodingAnton Khirnov2014-10-15
| | | | | | | | | | | When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding.
* lavc: use a separate field for exporting audio encoder paddingAnton Khirnov2014-10-13
| | | | | | | | | | | | | | Currently, the amount of padding inserted at the beginning by some audio encoders, is exported through AVCodecContext.delay. However - the term 'delay' is heavily overloaded and can have multiple different meanings even in the case of audio encoding. - this field has entirely different meanings, depending on whether the codec context is used for encoding or decoding (and has yet another different meaning for video), preventing generic handling of the codec context. Therefore, add a new field -- AVCodecContext.initial_padding. It could conceivably be used for decoding as well at a later point.
* dump: print the original coded dimensions when availableVittorio Giovara2014-10-08
|
* dump: print detailed color space informationVittorio Giovara2014-10-08
|
* dump: split audio and video probing on multiple linesVittorio Giovara2014-10-08
| | | | Also always report pixel format.
* avcodec: make sure color_range is properly initializedVittorio Giovara2014-10-08
|
* ff_get_format: fix infinite loopRémi Denis-Courmont2014-10-06
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: specify the behavior of av_lockmgr_register on failure.Manfred Georg2014-10-06
| | | | | | | | | | | The register function now specifies that the user callback should leave things in the same state that it found them on failure but that failure to destroy is ignored by the library. The register function is now explicit about its behavior on failure (it unregisters the previous callback and destroys all mutex). Signed-off-by: Manfred Georg <mgeorg@google.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hwaccel: Call ->get_format again if hwaccel init failsRémi Denis-Courmont2014-09-26
| | | | | | | This allows the application to fall back on another hwaccel or, more likely, software decoding. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: add stream-level stereo3d side dataVittorio Giovara2014-08-28
|
* cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: drop the av_fast_{re,m}alloc compatibility wrappersAnton Khirnov2014-08-10
| | | | They were only needed until the bump.
* Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.Anton Khirnov2014-08-09
|
* avcodec: Mark argument in av_{parser|hwaccel|bitstream_filter}_next as constDiego Biurrun2014-07-26
|
* build: Add define for SIMD extensions requiring 16-byte aligned buffersDiego Biurrun2014-07-22
|
* dsputil: Split motion estimation compare bits off into their own contextDiego Biurrun2014-07-17
|
* dsputil: Move draw_edges() to mpegvideoencdspDiego Biurrun2014-07-06
|
* lavc: do not allocate edges in the default get_buffer2()Anton Khirnov2014-06-26
|
* Add av_image_check_sar() and use it to validate SARJustin Ruggles2014-06-20
|
* libavcodec: set AVFrame colorspace fields on decodingwm42014-06-01
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Add transformation matrix API.Vittorio Giovara2014-05-19
| | | | | | | | | | | Add AV_PKT_DATA_DISPLAYMATRIX and AV_FRAME_DATA_DISPLAYMATRIX as stream and frame side data (respectively) to describe a display transformation matrix for linear transformation operations on the decoded video. Add functions to easily extract a rotation angle from a matrix and conversely to setup a matrix for a given rotation angle. Signed-off-by: Anton Khirnov <anton@khirnov.net>