summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* libavcodec/utils: Add braces to shut up gcc warningsDiego Biurrun2012-12-301-2/+2
| | | | | libavcodec/utils.c:1050:5: warning: missing braces around initializer [-Wmissing-braces] libavcodec/utils.c:1314:5: warning: missing braces around initializer [-Wmissing-braces]
* lavc: set frame parameters after decoding only if necessaryJanne Grunau2012-12-131-5/+8
| | | | | | | | Direct rendering capable decoders call get_buffer() which will set the frame parameters. Prevents frames with wrong parameters when a decoder outputs delayed frames after a resolution or pixel format change.
* lavc: factorise setting buffer type in avcodec_default_get_buffer().Anton Khirnov2012-12-041-3/+1
|
* lavc: don't reuse audio buffersAnton Khirnov2012-12-041-65/+11
| | | | | Any performance gain from this is negligible and not worth the extra code.
* lavc: set frame properties in ff_get_buffer().Anton Khirnov2012-12-041-20/+18
| | | | | There is no point in duplicating this code in every get_buffer() implementation.
* lavc: add a wrapper for AVCodecContext.get_buffer().Anton Khirnov2012-12-041-3/+8
| | | | It will be useful in the upcoming transition to refcounted AVFrames.
* avcodec: remove ff_is_hwaccel_pix_fmtLuca Barbato2012-11-131-1/+7
| | | | | It is used only in one place and is unlikely it would be needed elsewhere.
* pixdesc: add av_pix_fmt_get_chroma_sub_sampleLuca Barbato2012-11-131-1/+2
| | | | Deprecate avcodec_get_chroma_sub_sample.
* Include libavutil/channel_layout.h instead of libavutil/audioconvert.hJustin Ruggles2012-11-111-2/+1
| | | | Also reorder some other #include when applicable.
* decode_audio3: initialize AVFrameIlkka Ollakka2012-11-011-1/+1
| | | | | | Same fix and issue as in a25d912dca9cd553440167e0476c47581359c0fc Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: check channel count after decoder initJustin Ruggles2012-11-011-0/+5
| | | | | | Ensures the decoder did not set channel count to an insanely high value during initialization, which could cause large memory usage when it tries to get a buffer during decoding.
* lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decodersJustin Ruggles2012-11-011-2/+1
|
* lavc: initialize output AVFrame before decoding.Anton Khirnov2012-10-241-0/+4
| | | | | | | Avoids memleaks with audio when extended_data is nontrivial and the user doesn't reset the frame. Shouldn't have any effect for video for now, but might be useful in the future.
* lavc: use the correct API version guard macro for avcodec_encode_audio()Justin Ruggles2012-10-231-1/+1
|
* avcodec: handle AVERROR_EXPERIMENTALNathan Caldwell2012-10-211-0/+6
| | | | | | | | | | Error out on init if a codec with CODEC_CAP_EXPERIMENTAL is requested and strict_std_compliance is not FF_COMPLIANCE_EXPERIMENTAL. Move the check from avconv to avcodec_open2() and return AVERROR_EXPERIMENTAL accordingly. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: prefer decoders without CODEC_CAP_EXPERIMENTALNathan Caldwell2012-10-211-10/+9
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec_encode_audio(): fix invalid freeRafaël Carré2012-10-161-1/+1
| | | | | | | Since 2bc0de385, AVFrame needs to be initialized before calling avcodec_get_frame_defaults(). Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil: Rename ff_set_systematic_pal2() ---> avpriv_set_systematic_pal2()Diego Biurrun2012-10-131-1/+1
| | | | Functions used across libraries should have avpriv_ and not ff_ prefixes.
* avutil: add yuva422p and yuva444p formatsLuca Barbato2012-10-121-0/+2
|
* lavc: do not use av_pix_fmt_descriptors directly.Anton Khirnov2012-10-121-2/+4
|
* avcodec: free extended_data instead address of itJanne Grunau2012-10-091-1/+1
| | | | Fixes CID732173.
* Restructure av_log_missing_feature messageDiego Biurrun2012-10-091-1/+1
| | | | | | | | Some invocations include a verb in the log message, others do not. Yet av_log_missing_feature expects callers to provide a verb. Change the function to include a verb instead and update the callers accordingly. The result is a more natural function API and correct English in the function invocations.
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-081-45/+45
|
* avcodec: allow either planar or interleaved sample format when encoding monoJustin Ruggles2012-10-071-1/+8
| | | | | When there is only 1 channel, the planar and interleaved formats of the same data type should be treated as identical.
* avcodec: Drop silly and/or broken printf debug outputDiego Biurrun2012-10-011-1/+0
|
* lavc: set channel count from channel layout in avcodec_open2().Anton Khirnov2012-09-291-4/+9
| | | | | Some decoders (e.g. nellymoser) only set channel_layout and do not set channel count.
* avcodec: Drop long-deprecated imgconvert.h headerDiego Biurrun2012-09-271-1/+0
|
* lavc: add avcodec_free_frame().Anton Khirnov2012-09-241-0/+15
| | | | | Since an AVFrame now has malloced members (extended_data), it must have a destructor.
* lavc: ensure extended_data is set properly on decodingAnton Khirnov2012-09-241-0/+14
|
* lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()Anton Khirnov2012-09-241-0/+4
|
* lavc: use av_mallocz to allocate AVFrames.Anton Khirnov2012-09-241-1/+1
| | | | | Otherwise the frame is uninitialized, so avcodec_get_frame_defaults() cannot determine whether to free extended_data.
* lavc: rename the argument of avcodec_alloc_frame/get_frame_defaultsAnton Khirnov2012-09-241-10/+10
| | | | | AVFrame is used for both audio and video, so calling the argument 'pic' is misleading.
* avcodec: fix memleak in avcodec_encode_audio2()Justin Ruggles2012-09-221-3/+6
| | | | Ensure that padded_frame is freed before returning when needed.
* avcodec: cleanup utils.cLuca Barbato2012-09-181-232/+263
|
* lavc: replace AVCodecContext.encode with subtitle-specific callbackAnton Khirnov2012-09-171-2/+2
| | | | | AVCodecContext.encode is currently used only for subtitles, encode2 is used for audio and video.
* lavc: add const to private codec class initialization.Anton Khirnov2012-09-171-1/+1
| | | | Silences a warning about discarding const.
* lavc: add const to AVCodec* function parameters.Anton Khirnov2012-08-181-5/+6
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-96/+96
|
* Add support for iLBC decoding/encoding via the external library libilbcMartin Storsjö2012-06-181-0/+5
| | | | | | The library is 3-clause BSD licensed. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/utils: cast a function argument to shut up a compiler warningDiego Biurrun2012-05-201-1/+2
| | | | libavcodec/utils.c:251: note: expected ‘const uint8_t *’ but argument is of type ‘const short int *’
* lavc: check that extended_data is properly set in avcodec_encode_audio2().Anton Khirnov2012-05-091-0/+17
|
* lavc: pad last audio frame with silence when needed.Anton Khirnov2012-05-091-0/+64
|
* avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2()Justin Ruggles2012-05-071-1/+0
| | | | It is already set to 0 by av_free_packet()
* avcodec: for audio encoding, reset output packet when it is not validJustin Ruggles2012-05-071-1/+4
|
* avcodec: refactor avcodec_encode_audio2() to merge common branchesJustin Ruggles2012-05-071-3/+3
|
* avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2()Justin Ruggles2012-05-071-68/+2
| | | | We no longer have any audio encoders using AVCodec.encode().
* lavc: add sample rate and channel layout to AVFrame.Anton Khirnov2012-05-071-0/+4
| | | | Rationale is the same as for video width/height etc.
* Remove lowres video decodingMans Rullgard2012-04-211-10/+3
| | | | | | | This feature is complex, of questionable utility, and slows down normal decoding. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avcodec_string: Favor AVCodecContext.codec over the default codec.Alex Converse2012-04-171-1/+3
| | | | This improves output for formats with more than one AVCodec.
* avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame()Justin Ruggles2012-04-091-2/+2
| | | | Use default alignment in audio_get_buffer()