summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Show hyphen in codec tag.Carl Eugen Hoyos2012-07-091-1/+1
|
* video_get_buffer: return ENOMEM instead of -1 on malloc failureMichael Niedermayer2012-07-041-1/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc/utils: print error message on get_buffer related errorsMichael Niedermayer2012-07-041-1/+3
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec_align_dimensions2: support 12 & 14 bit planar colorspacesMichael Niedermayer2012-07-031-0/+16
| | | | | Reviewed-by: Jean First <jeanfirst@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec_encode_audio2: print error messages for errorsMichael Niedermayer2012-06-301-2/+6
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* cosmetics: minor libavcodec spelling errorsLou Logan2012-06-291-1/+1
| | | | | | Also update some common misspelled words in patcheck Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc: add frame multithreading capability (currently intra only)Michael Niedermayer2012-06-231-2/+18
| | | | | | | | | Compared to the decoder side, this code is able to change both the delay and the number of threads seamlessly during encoding. Also any idle thread can pick up tasks, the strict round robin in order limit is gone too. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-06-191-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (24 commits) flvdec: remove incomplete, disabled seeking code mem: add support for _aligned_malloc() as found on Windows lavc: Extend the documentation for avcodec_init_packet flvdec: remove incomplete, disabled seeking code http: replace atoll() with strtoll() mpegts: remove unused/incomplete/broken seeking code af_amix: allow float planar sample format as input af_amix: use AVFloatDSPContext.vector_fmac_scalar() float_dsp: add x86-optimized functions for vector_fmac_scalar() float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil lavr: Add x86-optimized function for flt to s32 conversion lavr: Add x86-optimized function for flt to s16 conversion lavr: Add x86-optimized functions for s32 to flt conversion lavr: Add x86-optimized functions for s32 to s16 conversion lavr: Add x86-optimized functions for s16 to flt conversion lavr: Add x86-optimized function for s16 to s32 conversion rtpenc: Support packetizing iLBC rtpdec: Add a depacketizer for iLBC Implement the iLBC storage file format mov: Support muxing/demuxing iLBC ... Conflicts: Changelog configure libavcodec/avcodec.h libavcodec/dsputil.c libavcodec/version.h libavformat/movenc.c libavformat/mpegts.c libavformat/version.h libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | lavc/utils: in avcodec_decode_video2() return proper error code instead of -1Stefano Sabatini2012-06-161-1/+1
| | | | | | | | Return AVERROR(EINVAL) in case of invalid coded size.
* | lavc: fix support of unofficial pix_fmt extensions of jpegMichael Niedermayer2012-06-131-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: add pkt_duration field to AVFrameStefano Sabatini2012-06-051-0/+8
| |
* | av_get_audio_frame_duration: fix FPEMichael Niedermayer2012-06-031-0/+4
| | | | | | | | | | | | | | Fixes ticket1392 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: clarify experimental codec messageLou Logan2012-05-301-1/+1
| | | | | | | | | | | | Should be easier for new users to get a working output. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: prettify printing of some codec tags which contains non alphanumeric ↵Stefano Sabatini2012-05-291-1/+6
| | | | | | | | | | | | | | | | | | | | | | characters 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.
* | libavcodec: correct consumed bytes for decodersMichael Niedermayer2012-05-211-2/+8
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-201-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: indeo: Make ivi_calc_band_checksum() static, it is only used in one file. indeo: Drop unused debug function ivi_check_band(). avcodec/utils: cast a function argument to shut up a compiler warning truemotion1: remove disabled code fix typo in comment fate: fix dependencies for non-SAMPLES avconv tests indeo: check for invalid motion vectors indeo: check that band output buffer exists indeo: clear allocated band buffers indeo: track tile macroblock size indeo: check custom Huffman tables for errors factor out common decoding code for Indeo 4 and Indeo 5 mp3: fix start band index for block type 2 in 8kHz audio lavf: change some (de)muxer names to lowercase lavf: make output format matching case insensitive Conflicts: libavcodec/indeo4.c libavcodec/indeo5.c libavcodec/ivi_common.c libavcodec/utils.c tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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/utils: fix division by 0Michael Niedermayer2012-05-101-2/+2
| | | | | | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-101-0/+81
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) libxvid: Give more suitable names to libxvid-related files. libxvid: Separate libxvid encoder from libxvid rate control code. jpeglsdec: Remove write-only variable in ff_jpegls_decode_lse(). fate: cosmetics: lowercase some comments fate: Give more consistent names to some RealVideo/RealAudio tests. lavfi: add avfilter_get_audio_buffer_ref_from_arrays(). lavfi: add extended_data to AVFilterBuffer. lavc: check that extended_data is properly set in avcodec_encode_audio2(). lavc: pad last audio frame with silence when needed. samplefmt: add a function for filling a buffer with silence. samplefmt: add a function for copying audio samples. lavr: do not try to copy to uninitialized output audio data. lavr: make avresample_read() with NULL output discard samples. fate: split idroq audio and video into separate tests fate: improve dependencies fate: add convenient shorthands for ea-vp6, libavcodec, libavutil tests fate: split some combined tests into separate audio and video tests fate: fix dependencies for probe tests mips: intreadwrite: fix inline asm for gcc 4.8 mips: intreadwrite: remove unnecessary inline asm ... Conflicts: cmdutils.h configure doc/APIchanges doc/filters.texi ffmpeg.c ffplay.c libavcodec/internal.h libavcodec/jpeglsdec.c libavcodec/libschroedingerdec.c libavcodec/libxvid.c libavcodec/libxvid_rc.c libavcodec/utils.c libavcodec/version.h libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.h tests/Makefile tests/fate/aac.mak tests/fate/audio.mak tests/fate/demux.mak tests/fate/ea.mak tests/fate/image.mak tests/fate/libavutil.mak tests/fate/lossless-audio.mak tests/fate/lossless-video.mak tests/fate/microsoft.mak tests/fate/qt.mak tests/fate/real.mak tests/fate/screen.mak tests/fate/video.mak tests/fate/voice.mak tests/fate/vqf.mak tests/ref/fate/ea-mad tests/ref/fate/ea-tqi Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-081-74/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: rtmp: Support 'rtmp_live', an option which specifies if the media is a live stream. av_samples_fill_array: Mark unmodified function argument as const. lagarith: add YUY2 decoding support Support decoding unaligned rgb24 lagarith. dv: Split profile handling code into a separate file. flvenc: use AVFormatContext, not AVCodecContext for logging. mov: Remove write-only variable in mov_read_chan(). fate: Change the probe-format refs to match the final text format committed. fate: Add avprobe as a make dependency Add probe fate tests to test for regressions in detecting media types. fate: Add oneline comparison method qdm2: clip array indices returned by qdm2_get_vlc(). avplay: properly close/reopen AVAudioResampleContext on channel layout change avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2() avcodec: for audio encoding, reset output packet when it is not valid avcodec: refactor avcodec_encode_audio2() to merge common branches avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2() Conflicts: ffplay.c libavcodec/Makefile libavcodec/dvdata.c libavcodec/dvdata.h libavcodec/qdm2.c libavcodec/utils.c libavformat/flvenc.c libavformat/mov.c tests/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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().
* | Add yuva422p pix_fmt.Carl Eugen Hoyos2012-05-081-0/+1
| |
* | lavc/utils: change a few asserts to av_assert0()Michael Niedermayer2012-05-081-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-071-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: libschroedinger: Switch to function names more in line with Libav style. Move code shared between libdirac and libschroedinger to libschroedinger. lavfi: uninline avfilter_copy_buffer_ref_props(). lavf: add missing '*' in a doxy. h264: Remove a commented-out function pointer typedef. txd: Remove write-only variable in txd_decode_frame(). mmvideo.c: Remove unused variable in mm_decode_pal(). build: cosmetics: Add missing end-of-line backslashes to item lists. build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line. libschroedinger: Move a function to avoid a forward declaration. pthread: warn on high thread counts vf_yadif: fix missing error handling for avfilter_poll_frame() avprobe: allow showing only one container/stream property. lavfi: support audio in avfilter_copy_frame_props(). lavfi: avfilter_merge_formats: handle case where inputs are same lavc: add sample rate and channel layout to AVFrame. zerocodec: check if the previous frame is missing doc: clarify check for NULL pointer style Conflicts: doc/APIchanges doc/developer.texi ffprobe.c libavcodec/Makefile libavcodec/avcodec.h libavcodec/libdirac_libschro.c libavcodec/libdirac_libschro.h libavcodec/mmvideo.c libavcodec/txd.c libavcodec/version.h libavcodec/zerocodec.c libavfilter/Makefile libavfilter/avfilter.c libavfilter/version.h libavformat/Makefile libavutil/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | lavc: implement accessors for some AVFrame fields.Nicolas George2012-05-031-0/+9
| | | | | | | | | | | | | | | | | | Compared to av_opt_ptr, accessors bring: - better performance (negligible); - compile-time type check; - link-time existence check (or at worst, a dynamic linker error instead of a NULL dereference).
* | lavc: add a sample_rate field to AVFrame.Nicolas George2012-04-281-0/+2
| | | | | | | | The field is filled with the codec context information.
* | lavc: add a channel_layout field to AVFrame.Nicolas George2012-04-281-0/+2
| | | | | | | | | | | | The field is filled with the codec context information. FIXME need a minor version bump.
* | lowres2 support.Michael Niedermayer2012-04-221-3/+4
| | | | | | | | | | | | | | | | | | The new lowres support is limited to decoders where lowres decoding is possible in high quality. I was not able to measure any speed difference, but if one is found the 2-3 lines that might affect speed can be made compile time conditional Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-221-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ARM: allow runtime masking of CPU features dsputil: remove unused functions mov: Treat keyframe indexes as 1-origin if starting at non-zero. mov: Take stps entries into consideration also about key_off. Remove lowres video decoding Conflicts: ffmpeg.c ffplay.c libavcodec/arm/vp8dsp_init_arm.c libavcodec/libopenjpegdec.c libavcodec/mjpegdec.c libavcodec/mpegvideo.c libavcodec/utils.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-181-2/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ppc: drop unused function dct_quantize_altivec() mpegaudiodec: Do not discard mp_decode_frame() return value. matroska: do not set invalid default duration if frame rate is zero mkv: use av_reduce instead of av_d2q for framerate estimation mkv: report average framerate as minimal as well avcodec_string: Favor AVCodecContext.codec over the default codec. cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow. Conflicts: libavcodec/cook.c libavcodec/ppc/mpegvideo_altivec.c libavcodec/utils.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Reset pts_correction state on codec flush.Robert Nagy2012-04-181-0/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-091-5/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: use default alignment for audio buffer avcodec: use align == 0 for default alignment in avcodec_fill_audio_frame() avutil: use align == 0 for default alignment in audio sample buffer functions avutil: allow NULL linesize in av_samples_fill_arrays() and av_samples_alloc() avconv: remove OutputStream.picref. avconv: only set SAR once on the decoded frame. avcodec: validate the channel layout vs. channel count for decoders audioconvert: make av_get_channel_layout accept composite names. avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt() Conflicts: doc/APIchanges ffmpeg.c libavcodec/utils.c libavcodec/version.h libavutil/audioconvert.c libavutil/audioconvert.h libavutil/avutil.h libavutil/samplefmt.c libavutil/samplefmt.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Fix side-data memleak also for audio.Reimar Döffinger2012-04-081-5/+11
| | | | | | | | | | | | | | This uses the same code as in decode_video also in decode_audio. Should fix valgrind FATE failures for nellymoser encode test. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | lavc: check media type of the decoder before calling it.Michael Niedermayer2012-04-011-0/+14
| | | | | | | | | | | | | | | | This fixes a segfault where a video decoder was called from avcodec_decode_audio*(). Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-03-251-5/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avc: Add a function for converting mp4 style extradata to annex b pthread: free progress if buffer allocation failed. lavc/avconv: support changing frame sizes in codecs with frame mt. libavformat: Document who sets the AVStream.id field utvideo: mark output picture as keyframe. sunrast: Add support for negative linesize. vp8: fix update_lf_deltas in libavcodec/vp8.c ralf: read Huffman code lengths without GetBitContext Conflicts: ffmpeg.c libavcodec/sunrastenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | pthread/mpegvideo: detect and block attempts to init frames after setup.Michael Niedermayer2012-03-241-0/+5
| | | | | | | | | | | | | | This fixes race conditions that ultimately lead to memory corruption. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: limit realloc() on encoding to the libav compatibility API.Michael Niedermayer2012-03-221-2/+6
| | | | | | | | | | | | Neither the old nor new need it. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud