summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAge
* dsputil: Add ff_ prefix to the dsputil*_init* functionsMartin Storsjö2012-02-15
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Check AVCodec.pix_fmts in avcodec_open2()Paul B Mahol2012-02-10
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* avcodec: set avpkt->size to 0 if encode2() did not output a packetJustin Ruggles2012-02-09
|
* avcodec: for audio encoding, set packet dts to packet pts.Justin Ruggles2012-02-09
| | | | There are no audio encoders which do frame reordering.
* lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacketAnton Khirnov2012-02-08
| | | | Deprecate avcodec_encode_video().
* dsputil: set STRIDE_ALIGN to 16 for x86 also.Ronald S. Bultje2012-02-07
| | | | | | This fixes crashes in e.g. PNG decoding with SSE2 enabled. In fact, many x86 optimizations for codecs assume that our buffer strides are 16-byte aligned.
* ff_alloc_packet: modify the size of the packet to match the requested sizeJustin Ruggles2012-02-01
| | | | | This will simplify encoders which use this function to request the exact packet size rather than the maximum size.
* avcodec: Add av_fast_padded_malloc().Janne Grunau2012-02-01
| | | | | | | Wrapper around av_fast_malloc() that keeps FF_INPUT_BUFFER_PADDING_SIZE zero-padded bytes at the end of the used buffer. Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>.
* lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().Anton Khirnov2012-01-31
| | | | | | | | | This way, if the AVCodecContext is allocated for a specific codec, the caller doesn't need to store this codec separately and then pass it again to avcodec_open2(). It also allows to set codec private options using av_opt_set_* before opening the codec.
* lavc: make avcodec_close() work properly on unopened codecs.Anton Khirnov2012-01-31
| | | | | I.e. free the priv_data and other stuff allocated in avcodec_alloc_context3() and not segfault.
* lavc: add avcodec_is_open().Anton Khirnov2012-01-31
| | | | | | | It allows to check whether an AVCodecContext is open in a documented way. Right now the undocumented way this check is done in lavf/lavc is by checking whether AVCodecContext.codec is NULL. However it's desirable to be able to set AVCodecContext.codec before avcodec_open2().
* avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.Anton Khirnov2012-01-28
| | | | | | | This function is video-only, so there's no point in setting more linesizes. Fixes stack corruption in avplay.
* libavcodec: Don't crash in avcodec_encode_audio if time_base isn't setMartin Storsjö2012-01-27
| | | | | | | | | | | | Earlier, calling avcodec_encode_audio worked fine even if time_base wasn't set. Now it crashes due to trying to scale the output pts to the codec context time base. This affects e.g. VLC. If no time_base is set for audio codecs, set it to the sample rate. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: remove disabled FF_API_AVCODEC_INIT cruft.Anton Khirnov2012-01-27
|
* lavc: remove disabled FF_API_ER cruft.Anton Khirnov2012-01-27
|
* lavc: remove disabled FF_API_AVCODEC_OPEN cruft.Anton Khirnov2012-01-27
|
* lavc: remove disabled FF_API_OLD_FF_PICT_TYPES cruft.Anton Khirnov2012-01-27
|
* lavc: remove disabled FF_API_THREAD_INIT cruft.Anton Khirnov2012-01-27
|
* lavc: remove disabled FF_API_OLD_SAMPLE_FMT cruft.Anton Khirnov2012-01-27
|
* avcodec: add a new codec_id for CRYO APC IMA ADPCM.Justin Ruggles2012-01-24
| | | | | The stereo layout and extradata is significantly different from that in Westwood IMA ADPCM, so a separate codec_id is warranted.
* avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()Justin Ruggles2012-01-15
| | | | | | | | 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.
* avcodec: add a public function, avcodec_fill_audio_frame().Justin Ruggles2012-01-15
| | | | This is a convenience function for the user to fill audio AVFrame information.
* lavc: Relax API strictness in avcodec_decode_audio3 with a custom get_buffer()Reinhard Tartler2012-01-15
| | | | | | | | | | | | | Do not fail audio decoding with avcodec_decode_audio3 if user has set a custom get_buffer. Strictly speaking, this was never allowed by the API, but it seems that some software packages did so anyways. In order to unbreak applications (cf. http://bugs.debian.org/655890), this change clarifies the API and overrides the custom get_buffer() with the defaults. This change is inspired by a similar commit (c3846e3ebab610be691adb8b40d376dc2f675dc4) in FFmpeg. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* utils: Check for extradata size overflows.Alex Converse2012-01-12
|
* libavcodec: Handle param change side data in avcodec_decode_video2, tooMartin Storsjö2012-01-07
| | | | | | Also call avcodec_set_dimensions on dimension param change packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavcodec: Move apply_param_change up above avcodec_decode_video2Martin Storsjö2012-01-07
| | | | | | This is in preparation to calling it from avcodec_decode_video2. Signed-off-by: Martin Storsjö <martin@martin.st>
* threads: set thread_count to 1 when thread support is disabledJanne Grunau2012-01-01
|
* lavc: add format field to AVFrameStefano Sabatini2011-12-25
| | | | | | The format is a per-frame property, having it in AVFrame simplify the operation of extraction of that information, since avoids the need to access the codec/stream context.
* lavc: add width and height fields to AVFrameStefano Sabatini2011-12-25
| | | | | | width and height are per-frame properties, setting these values in AVFrame simplify the operation of extraction of that information, since avoids the need to check the codec/stream context.
* lavc: add a sample_aspect_ratio field to AVFrameStefano Sabatini2011-12-25
| | | | | | | The sample aspect ratio is a per-frame property, so it makes sense to define it in AVFrame rather than in the codec/stream context. Simplify application-level sample aspect ratio information extraction, and allow further simplifications.
* libavcodec: Apply parameter change side data when decoding audioMartin Storsjö2011-12-21
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: always align height by 32 pixelRafaël Carré2011-12-21
| | | | | | | | Interlaced content for most codec requires it. This patch is a stop-gap pending a serious rework to support codecs with non 16 pixel macroblocks. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: deprecate AVFrame.ageMans Rullgard2011-12-18
| | | | | | | | 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>
* lavc: avoid invalid memcpy() in avcodec_default_release_buffer()Mans Rullgard2011-12-11
| | | | | | | | | | When the buf and last pointers are equal, the FFSWAP() results in an invalid call to memcpy() with same source and destination on some targets. Although assigning a struct to itself is valid C99, gcc does not check for this before calling memcpy(). See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667 Signed-off-by: Mans Rullgard <mans@mansr.com>
* g722: Change bits per sample to 4Sjoerd Simons2011-12-05
| | | | | | | | | | | | | | | Earlier, bits per sample was defined as 8, since bits_per_coded_sample was used to indicate whether to ignore the lower bits of the codeword, having values 6, 7 or 8. g722 encodes 2 samples into one byte codeword, therefore the bits per sample is 4. By changing this, the generated timestamps for streams encoded with g722 become correct. This makes timestamp generation for g722 data correct (both when encoding and when demuxing from raw g722 files). Signed-off-by: Martin Storsjö <martin@martin.st>
* Add avcodec_decode_audio4().Justin Ruggles2011-12-02
| | | | | | Deprecate avcodec_decode_audio3(). Implement audio support in avcodec_default_get_buffer(). Implement the new audio decoder API in all audio decoders.
* avcodec: change number of plane pointers from 4 to 8 at next major bump.Justin Ruggles2011-12-02
| | | | | | Add AV_NUM_DATA_POINTERS to simplify the bump transition. This will allow for supporting more planar audio channels without having to allocate separate pointer arrays.
* h264: add support for decoding planar RGB images.Ronald S. Bultje2011-11-24
|
* avcodec: move some AVCodecContext fields to an internal struct.Justin Ruggles2011-11-19
| | | | | | | | A new field, AVCodecContext.internal is used to hold a new struct AVCodecInternal, which has private fields that are not codec-specific and are used by general libavcodec functions. Moved internal_buffer, internal_buffer_count, and is_copy.
* avcodec: Allow locking and unlocking an avformat specific mutexMartin Storsjö2011-11-05
| | | | | | | This extends the lock manager in avcodec to manage two separate mutexes via the user-specified lock functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: translate non-flag-based er options into flag-based ef options at ↵Dustin Brody2011-10-22
| | | | | | codec open Signed-off-by: Anton Khirnov <anton@khirnov.net>
* sws/pixfmt/pixdesc: add support for yuv420p9le/be.Ronald S. Bultje2011-10-21
|
* lavc: use avpriv_ prefix for ff_toupper4.Anton Khirnov2011-10-20
| | | | It's used in lavf.
* w32threads: support for frame multithreadingSteven Walters2011-10-16
| | | | | | | | Replace our incomplete w32threads implementation with x264's pthreads w32threads wrapper. Relicensed to LGPL with kind permission by Pegasys Inc. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* libx264: support 9- and 10-bit output.Anton Khirnov2011-10-06
|
* avcodec: reject audio packets with NULL data and non-zero sizeJustin Ruggles2011-09-30
| | | | | | | There is no valid reason the user should ever send such packets in the first place, but the documentation for CODEC_CAP_DELAY states that the codec is guaranteed not to get a NULL packet unless that capability is set. That isn't true without preventing this case.
* adpcmenc: Set bits_per_coded_sampleJustin Ruggles2011-09-23
|
* lavc/utils: move avcodec_init() higher in the file.Anton Khirnov2011-09-21
| | | | Fixes build on next major bump.
* lavc: add avcodec_get_type() for mapping codec_id -> type.Anton Khirnov2011-08-16
|
* lavc: fix parentheses placement in avcodec_open2().Baptiste Coudurier2011-08-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>