summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* 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()
* avcodec: validate the channel layout vs. channel count for decodersJustin Ruggles2012-04-081-0/+9
| | | | | Set avctx->channel_layout to 0 if the channel count does not match avctx->channels.
* avcodec_encode_{audio,video}: only reallocate output packet when it has ↵Anton Khirnov2012-03-281-2/+2
| | | | | | | non-zero size. Otherwise realloc would free it, which would result in double free later.
* lavc/avconv: support changing frame sizes in codecs with frame mt.Ronald S. Bultje2012-03-241-5/+4
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: shrink encoded audio packet size after encoding.Justin Ruggles2012-03-201-1/+8
|
* adpcm: fix nb_samples rounding for adpcm_ima_dk3, and update reference.Ronald S. Bultje2012-03-181-1/+1
|
* avcodec: add av_get_audio_frame_duration() function.Justin Ruggles2012-03-051-0/+142
| | | | | This is a utility function for the user to get the frame duration based on the codec id, frame size in bytes, and various AVCodecContext parameters.
* avcodec: add av_get_exact_bits_per_sample() functionJustin Ruggles2012-03-051-11/+23
| | | | | | This only returns bits per sample when it is exactly correct. That is, the codec contains only raw samples with no frame headers or padding. This applies to basically all PCM codecs and a small subset of ADPCM codecs.
* lavc: make codec_is_decoder/encoder() public.Anton Khirnov2012-03-041-9/+9
|
* lavc: free the output packet when encoding failed or produced no output.Anton Khirnov2012-03-031-0/+8
|
* lavc: preserve avpkt->destruct in ff_alloc_packet().Anton Khirnov2012-03-031-3/+2
| | | | | Also, don't bother with saving/restoring data, av_init_packet doesn't touch it.
* lavc: shrink encoded video packet size after encoding.Anton Khirnov2012-03-011-0/+6
| | | | Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>
* avcodec_default_reget_buffer(): fix compilation in DEBUG modeDiego Biurrun2012-02-271-1/+1
|
* lavc: merge two if()s with the same condition.Anton Khirnov2012-02-251-2/+1
|
* lavc: factorize setting got_packet_ptr in avcodec_encode_video2()Anton Khirnov2012-02-251-2/+2
|
* lavc: signal no output when a NULL frame is passed to audio encoder without ↵Anton Khirnov2012-02-251-1/+2
| | | | delay
* avcodec: disallow reget_buffer() if pix_fmt changed.Ronald S. Bultje2012-02-241-0/+2
|
* lavc: drop encode() support for video.Anton Khirnov2012-02-231-40/+8
| | | | | All video encoders have been converted to encode2(), all new encoders should also use only encode2().
* avcodec: do not override pts or duration from the audio encoderJustin Ruggles2012-02-211-3/+5
| | | | | This allows encoders to set pts and/or duration even if they do not use CODEC_CAP_DELAY.
* avcodec: add ff_samples_to_time_base() convenience function to internal.hJustin Ruggles2012-02-201-9/+6
|
* dsputil: Add ff_ prefix to the dsputil*_init* functionsMartin Storsjö2012-02-151-1/+1
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Check AVCodec.pix_fmts in avcodec_open2()Paul B Mahol2012-02-101-0/+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-091-0/+2
|
* avcodec: for audio encoding, set packet dts to packet pts.Justin Ruggles2012-02-091-7/+9
| | | | There are no audio encoders which do frame reordering.
* lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacketAnton Khirnov2012-02-081-8/+92
| | | | Deprecate avcodec_encode_video().
* dsputil: set STRIDE_ALIGN to 16 for x86 also.Ronald S. Bultje2012-02-071-12/+0
| | | | | | 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-011-3/+1
| | | | | 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-011-0/+13
| | | | | | | 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-311-5/+12
| | | | | | | | | 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-311-8/+11
| | | | | 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-311-0/+8
| | | | | | | 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-281-2/+2
| | | | | | | 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-271-0/+6
| | | | | | | | | | | | 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-271-4/+1
|
* lavc: remove disabled FF_API_ER cruft.Anton Khirnov2012-01-271-10/+0
|
* lavc: remove disabled FF_API_AVCODEC_OPEN cruft.Anton Khirnov2012-01-271-7/+0
|
* lavc: remove disabled FF_API_OLD_FF_PICT_TYPES cruft.Anton Khirnov2012-01-271-6/+0
|
* lavc: remove disabled FF_API_THREAD_INIT cruft.Anton Khirnov2012-01-271-8/+0
|
OpenPOWER on IntegriCloud