summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*Anton Khirnov2013-05-151-2/+2
|
* lavc: Fix msvc compilation of utils.c with -WX (warnings treated as errors)Matt Wolenetz2013-05-141-0/+1
| | | | | | This fixes https://bugzilla.libav.org/show_bug.cgi?id=514. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: do not leak frames in avcodec_decode_audio4Luca Barbato2013-05-071-3/+1
| | | | | | | Notwithstanding the return value the frame should be freed if is not going to be used. Reported-by: Matthew Wolenetz <wolenetz@chromium.org>
* avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-2/+3
|
* avcodec: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-301-20/+20
|
* lavc: clear AVBuffers on decoded frames if refcounted_frames is not setAnton Khirnov2013-04-301-0/+4
| | | | | Otherwise some code might mistakenly think it is allowed to unref those buffers, which would lead to double unref.
* ff_get_buffer(): allocate the frame for max(coded,display) dimensionsAnton Khirnov2013-04-191-5/+13
| | | | Needed e.g. for h264 cropping to work properly.
* lavc: don't overwrite display dimensions with coded dimensions.Anton Khirnov2013-04-101-1/+1
|
* dsputil: Make dsputil selectableRonald S. Bultje2013-04-101-1/+2
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* utils: add workaround for AVHWAccel in ff_get_buffer compat codeJanne Grunau2013-03-261-0/+4
| | | | | | | Since c977039e585bfff28ecc037ef827c6c3d1ed88aa plane count for PIX_FMT_HWACCEL pixel formats is 0 instead of 1. The created dummy AVBuffers are still bogus since AVFrame does not hold frame data when AVHWAccels are used.
* lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-261-4/+3
| | | | | | | 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: Move start code finding to utils.cMartin Storsjö2013-03-261-0/+34
| | | | | | | | | | This allows dropping the mpegvideo dependency from a number of components. This also fixes standalone building of the h264 parser, which was broken in 64e438697. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc, lavfi: fix counting number of planes in AVBufferRef wrappersAnton Khirnov2013-03-191-2/+2
| | | | | | Number of planes is not always equal to the number of components even for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components in two planes.
* lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappersAnton Khirnov2013-03-171-2/+2
| | | | | It is supposed to be height * linesize, not width * linesize. Thanks to Hendrik Leppkes for pointing out the bug.
* Add av_log_{ask_for_sample|missing_feature} replacements to libavutilDiego Biurrun2013-03-131-0/+3
| | | | | This allows reporting missing features and requesting samples from all libraries in a standard way; with a simplified API.
* avframe: call release_buffer only if it is setJanne Grunau2013-03-111-1/+2
| | | | | | AVCodecContext release_buffer() shall be NULL for audio codecs using get_buffer. The backward compatibility code hence have to check before calling it.
* lavc: fix get_buffer() compatibility layer for audio.Anton Khirnov2013-03-101-1/+1
| | | | | planes - FF_ARRAY_ELEMS would be evaluated as unsigned and underflow instead of being negative as was intended.
* lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruftAnton Khirnov2013-03-091-36/+0
|
* lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruftAnton Khirnov2013-03-091-81/+0
|
* lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruftAnton Khirnov2013-03-091-48/+0
|
* lavc: update the fallback versions of ff_thread_*Anton Khirnov2013-03-081-6/+6
| | | | | Fixes build without threads after 759001c534287a96dc96d1e274665feb7059145d.
* lavc: make up a fake frame channel layout when there is no real one.Anton Khirnov2013-03-081-2/+22
| | | | | This should ensure that a valid channel layout is always set on a frame, until a better solution is implemented.
* lavc: allow decoders to override frame parameters.Anton Khirnov2013-03-081-7/+14
|
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-081-221/+390
|
* avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-081-6/+12
| | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* Use the avstring.h locale-independent character type functionsReimar Döffinger2013-03-071-4/+4
| | | | | | Make sure the behavior does not change with the locale. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: Prettify printing of codec tags containing non alphanumeric charactersStefano Sabatini2013-03-071-1/+6
| | | | | | | | | | | | | Make av_get_codec_tag_string() show codec tag string characters in a more intelligible ways. For example the ascii char "@" is used as a number, so should be displayed like "[64]" rather than as a printable character. Apart alphanumeric chars, only the characters ' ' and '.' are used literally in codec tags, all the other characters represent numbers. This also avoids relying on locale-dependent character class functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* get_buffer(): do not initialize the data.Anton Khirnov2013-02-151-1/+0
| | | | | There may be more decoders that rely on this. Those should be found and fixed.
* dsputil: Move STRIDE_ALIGN macro to the only place it is usedDiego Biurrun2013-02-131-0/+7
|
* lavc: set the default rc_initial_buffer_occupancyLuca Barbato2013-01-151-0/+3
| | | | | | | | | | | rc_buffer_size is not set before. Solve the initial the rate control underflow issue reported in bug 222. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* 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
|
OpenPOWER on IntegriCloud