aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | lavc/utils: reindent in avcodec_decode_subtitle2().Clément Bœsch2012-12-311-5/+5
| |
* | 10l: export ff_bprint_to_extradata between libs using avpriv_ prefix.Clément Bœsch2012-12-301-1/+1
| | | | | | | | Both libavformat and libavcodec requires this function.
* | lavc: add ff_bprint_to_extradata() helper and use it.Clément Bœsch2012-12-301-0/+19
| | | | | | | | | | | | | | | | | | | | This commit also makes sure the extradata and subtitle_header are NUL terminated, without taking into account the trailing '\0' in account in the size. At the same time, it should fix 'warning: dereferencing type-punned pointer will break strict-aliasing rules' warning for compilers who don't consider uint8_t** and char** compatibles.
* | lavc/utils: fix 'warning: missing braces around initializer'Michael Niedermayer2012-12-261-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: Warn in case the set bitrate is very lowMichael Niedermayer2012-12-211-0/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Show underscores in av_get_codec_tag_string().Carl Eugen Hoyos2012-12-191-1/+1
| |
* | lavc: add pkt_size field to AVFrameStefano Sabatini2012-12-151-0/+4
| |
* | Merge commit 'bd255f9feb4deea4c990e582f0ba3b90d7b64b4c'Michael Niedermayer2012-12-141-5/+8
|\| | | | | | | | | | | | | | | | | | | * commit 'bd255f9feb4deea4c990e582f0ba3b90d7b64b4c': lavc: set frame parameters after decoding only if necessary Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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/utils: Do not require dimensions for PNG.Michael Niedermayer2012-12-111-1/+3
| | | | | | | | | | | | pngenc doesnt need them and mplayer doesnt set them. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Print bpc (for bits per component) with pixel format if it is smaller than ↵Carl Eugen Hoyos2012-12-111-0/+4
| | | | | | | | expected.
* | Merge commit '57231e4d5b467833fb289439cd35a92513bb55c1'Michael Niedermayer2012-12-081-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '57231e4d5b467833fb289439cd35a92513bb55c1': tak: demuxer, parser, and decoder Not merged as requested by Author and Maintainer of tak in FFmpeg. I just merged a few typo fixes and minor cosmetic improvments. Conflicts: Changelog libavcodec/Makefile libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/tak.c libavcodec/tak.h libavcodec/tak_parser.c libavcodec/takdec.c libavcodec/version.h libavformat/takdec.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc: check dimensions for video encodersMichael Niedermayer2012-12-071-0/+7
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ff_lock_avcodec: make the lock state be consistent in case of failure.Michael Niedermayer2012-12-061-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec_open: if obtaining a lock fails, dont attempt to unlock it.Michael Niedermayer2012-12-061-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | frame_thread_encoder: fix locking while locks are heldMichael Niedermayer2012-12-061-4/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec: add ff_lock/unlock_avcodec functions.Reimar Döffinger2012-12-051-56/+40
| | | | | | | | | | | | | | Will be used in future patches, together with the variable that allows checking whether the lock is held. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | Merge commit '387bef95d28019c13c6805cfa4079e59948284e5'Michael Niedermayer2012-12-051-3/+1
|\| | | | | | | | | | | | | * commit '387bef95d28019c13c6805cfa4079e59948284e5': lavc: factorise setting buffer type in avcodec_default_get_buffer(). Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: factorise setting buffer type in avcodec_default_get_buffer().Anton Khirnov2012-12-041-3/+1
| |
* | Merge commit 'e57c4706e969afa1f2384481b955ccd9494cddb5'Michael Niedermayer2012-12-051-65/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e57c4706e969afa1f2384481b955ccd9494cddb5': lavc: don't reuse audio buffers This commit causes a 0.5% speedloss for mp3 and 2% for raw pcm, that is "time ffmpeg" style tested thus includes disk IO, demux and parsing I would not have merged it if it wasnt required for the "new" buffer API but sadly it is. Once the new API is in ill reimplement proper buffer reuse, which will fix this speedloss. In case we choose not to merge the "new" buffer API then this commit here should be reverted. Conflicts: libavcodec/internal.h libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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: move ff_init_buffer_info() down to ff_get_buffer()Michael Niedermayer2012-12-051-42/+24
| | | | | | | | | | | | and remove redundant code from ff_get_buffer() Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ff953fecffd3b9a616a046723fb9d4690be032a6'Michael Niedermayer2012-12-051-8/+20
|\| | | | | | | | | | | | | | | | | | | * commit 'ff953fecffd3b9a616a046723fb9d4690be032a6': lavc: set frame properties in ff_get_buffer(). Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'Michael Niedermayer2012-12-051-3/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '594d4d5df3c70404168701dd5c90b7e6e5587793': lavc: add a wrapper for AVCodecContext.get_buffer(). Conflicts: libavcodec/4xm.c libavcodec/8svx.c libavcodec/bmv.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/kmvc.c libavcodec/mpc7.c libavcodec/mpegaudiodec.c libavcodec/pcx.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/rl2.c libavcodec/snow.c libavcodec/targa.c libavcodec/tscc.c libavcodec/txd.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vb.c libavcodec/vmdav.c libavcodec/vp56.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | lavc: fix duplicate stats_out line.Michael Niedermayer2012-11-301-0/+3
| | | | | | | | | | Found-by: Thierry Foucu Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | iff demuxer: 16SV supportPaul B Mahol2012-11-281-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | av_get_audio_frame_duration: add ADPCM_AFCPaul B Mahol2012-11-261-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavc/utils: check return value of avcodec_fill_audio_frame() for < 0Stefano Sabatini2012-11-251-2/+2
| | | | | | | | | | Assume that the value is always negative in case of error, as stated in the docs, do not assume that the value cannot be != 0 in case of success.
* | ADPCM IMA Dialogic decoderPaul B Mahol2012-11-241-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | 8svx: move pcm_s8_planar decoder to pcm.cPaul B Mahol2012-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | Removes limitation of max 2 channels for pcm_s8_planar decoder by moving it to more natural place. AV_CODEC_ID_8SVX_RAW is not used by anything anymore and is going to be removed. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | PCM signed 16-bit big-endian planar decoderPaul B Mahol2012-11-171-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | PCM signed 24-bit/32-bit little-endian planar decoderPaul B Mahol2012-11-171-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2'Michael Niedermayer2012-11-141-2/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5e9c6ef8f3beb9ed7b271654a82349ac90fe43f2': x86: h264_weight_10bit: port to cpuflags libtheoraenc: add missing pixdesc.h header avcodec: remove ff_is_hwaccel_pix_fmt pixdesc: add av_pix_fmt_get_chroma_sub_sample hlsenc: stand alone hls segmenter Conflicts: doc/muxers.texi libavcodec/ffv1enc.c libavcodec/imgconvert.c libavcodec/mpegvideo_enc.c libavcodec/tiffenc.c libavformat/Makefile libavformat/allformats.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88'Michael Niedermayer2012-11-121-2/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '97bf7c03b1338a867da52c159a2afecbdedcfa88': doc: git-howto: Leave reviewers time to react before pushing patches Include libavutil/channel_layout.h instead of libavutil/audioconvert.h lavu: rename audioconvert.* to channel_layout.* and deprecate audioconvert.h Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/git-howto.texi ffmpeg_filter.c libavcodec/flacdec.c libavcodec/imc.c libavcodec/mpegaudiodec.c libavcodec/utils.c libavfilter/asrc_anullsrc.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/buffer.c libavutil/Makefile libavutil/audioconvert.h libavutil/channel_layout.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Include libavutil/channel_layout.h instead of libavutil/audioconvert.hJustin Ruggles2012-11-111-2/+1
| | | | | | | | Also reorder some other #include when applicable.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-021-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: dv1394: Swap the min and max values of the 'standard' option rtpdec_vp8: Don't parse fields that aren't used lavc: add some AVPacket doxy. audiointerleave: deobfuscate a function call. rtpdec: factorize identical code used in several handlers a64: remove interleaved mode. doc: Point to the new location of the c99-to-c89 tool decode_audio3: initialize AVFrame ws-snd1: set channel layout wmavoice: set channel layout wmapro: use AVCodecContext.channels instead of keeping a private copy wma: do not keep private copies of some AVCodecContext fields Conflicts: libavcodec/wmadec.c libavcodec/wmaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * decode_audio3: initialize AVFrameIlkka Ollakka2012-11-011-1/+1
| | | | | | | | | | | | Same fix and issue as in a25d912dca9cd553440167e0476c47581359c0fc Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03'Michael Niedermayer2012-11-021-2/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '8ac0f6767bf63d3e6b308ee6648ff02598b81e03': dcadec: allow the decoder to change the channel layout mid-stream cook: use av_dlog() for debug logging instead of av_log() with AV_LOG_ERROR cook: move samples_per_frame from COOKSubpacket to where it is used cook: use av_get_channel_layout_nb_channels() instead of cook_count_channels() cook: reverse a condition so that the code makes more sense cook: remove unneeded COOKContext variable, sample_rate cook: remove unneeded COOKContext variable, bit_rate cook: use AVCodecContext.channels instead of keeping a private copy bmvaudio: set channel layout at init() rather than validating it atrac1: do not keep a copy of channel count in the private context dsicinaudio: set channels and channel layout g722dec: set channel layout at initialization instead of validating it amrwbdec: set channels, channel_layout, and sample_rate amrnbdec: set channels, channel_layout, and sample_rate dca_parser: allow the parser to change the sample rate lavc: check channel count after decoder init lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders Conflicts: libavcodec/dcadec.c libavcodec/pcm.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
| |
* | av_get_audio_frame_duration: add IACPaul B Mahol2012-10-311-0/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | av_get_audio_frame_duration: add G723_1Paul B Mahol2012-10-301-0/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | av_get_audio_frame_duration: fix IMCMichael Niedermayer2012-10-301-1/+2
| | | | | | | | | | Fixes Ticket1658 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/utils: make sub decode consistent with A/V.Clément Bœsch2012-10-241-3/+20
| | | | | | | | This allows side data to be transmitted properly with subtitles.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-241-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asfdec: cosmetics, reformat ff_asf_parse_packet() g.723.1: add missing CODEC_CAP_DR1 avconv: remove now unneeded calls to avcodec_get_frame_defaults(). lavc: initialize output AVFrame before decoding. Conflicts: libavformat/asfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.