summaryrefslogtreecommitdiff
path: root/libavfilter/avcodec.c
Commit message (Collapse)AuthorAge
* avfilter/avcodec: use NULL instead of 0 for pointerMichael Niedermayer2014-12-06
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: remove obsolete FF_API_FILL_FRAME cruftJames Almer2014-09-17
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avcodec: Use av_mallocz_array()Michael Niedermayer2014-04-23
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: deprecate remainders of the avcodec glue codeHendrik Leppkes2013-03-16
| | | | | | | Since lavfi works natively with AVFrame now, these functions are no longer necessary and can be removed in a future bump. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: fix API version checksHendrik Leppkes2013-03-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: cleanup includesHendrik Leppkes2013-03-13
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '7e350379f87e7f74420b4813170fe808e2313911'Michael Niedermayer2013-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7e350379f87e7f74420b4813170fe808e2313911': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit 759001c534287a96dc96d1e274665feb7059145d by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter_get_audio_buffer_ref_from_frame: fix handling of >8 channelsMichael Niedermayer2013-01-28
| | | | | | Found-by: inferno@chromium.org Reported-by: Dale Curtis <dalecurtis@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: support unknown channel layouts.Nicolas George2013-01-26
|
* lavfi/avcodec: fix typoPaul B Mahol2013-01-01
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi: add avfilter_get_audio_buffer_ref_from_arrays_channels.Nicolas George2013-01-01
| | | | | It is the same as avfilter_get_audio_buffer_ref_from_arrays except it has a "channels" and the channel layout can be 0.
* avfilter_get_audio_buffer_ref_from_frame: check that layout and channels ↵Michael Niedermayer2012-12-12
| | | | | | match if they are set Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter_get_video_buffer_ref_from_frame: check channel countMichael Niedermayer2012-12-12
| | | | | | | more than 8 channels is not supported and crashes with null pointer dereference Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* replace av_log(0, by av_log(NULL,Michael Niedermayer2012-11-23
| | | | | | The first parameter is a pointer and NULL is more correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* liavfi/avcodec: allow channel layouts with fewer channels than actually ↵Michael Niedermayer2012-11-18
| | | | | | | | available. This fixes the regression with Ticket1726, where some audio was lost. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: store and propagate number of channels information in audio buffer ↵Stefano Sabatini2012-11-13
| | | | | | | properties The channels field is required since the channel layout is not always available.
* lavfi/avcodec: check that injected avframes use a supported channel layoutMichael Niedermayer2012-11-10
| | | | | | | This fixes out of array accesses. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: check avfilter_copy_frame_props() return codeMichael Niedermayer2012-11-10
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc: add lavfi metadata support.Clément Bœsch2012-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new AVPacket side data type: AV_PKT_DATA_STRINGS_METADATA. Its main goal is to provide a way to transmit the metadata from the AVFilterBufferRef up to the AVFrame. This is at the moment "only" useful for lavfi input from libavdevice: lavd/lavfi only outputs packets, and the metadata from the buffer ref kept in its context needs to be transmitted from the packet to the frame by the decoders. The buffer ref can be destroyed at any time (along with the metadata), and a duplication of the AVPacket needs to duplicate the metadata as well, so the choice of using the side data to store them was selected. Making sure lavd/lavfi raises the metadata is useful to allow tools like ffprobe to access the filters metadata (it is at the moment the only way); ffprobe will now automatically show the AVFrame metadata in any customizable output format for users. API users will also be able to access the AVFrame->metadata pointer the same way ffprobe does (av_frame_get_metadata). All the changes are done in this single commit to avoid some memory leaks: for instances, the changes in lavfi/avcodec.c are meant to duplicate the metadata from the buffer ref into the AVFrame. Unless we have an internal way of freeing the AVFrame->metadata automatically, it will leak in most of the user apps. To fix this problem, we introduce AVCodecContext->metadata and link avctx->metadata to the current frame->metadata and free it at each decode frame call (and in the codec closing callback for the last one). But doing this also means to update the way the tiff decoder already handles the AVFrame->metadata (it's the only one decoder with frame metadata at the moment), by making sure it is not trying to free a pointer already freed by the lavc internals. The lavfi/avcodec.c buffer ref code is based on an old Thomas Kühnel work, the rest of the code belongs to the commit author. Signed-off-by: Thomas Kühnel <kuehnelth@googlemail.com> Signed-off-by: Clément Bœsch <ubitux@gmail.com>
* Merge commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702'Michael Niedermayer2012-10-10
| | | | | | | | | | | | | | | | * commit '6d0beefbf6ee6dbf8efb522a9307e54c6ed5f702': swscale: Do not make ff_ symbols globally visible. rtspdec: use av_strlcpy for writing into fixed size buffer g722enc: fix size argument in memset http: use av_strlcpy instead of strcpy() without size checks avfilter: correct memcpy size avfilter_copy_buf_props() lavc: split asv12 encoder/decoder Conflicts: libavcodec/asvdec.c libavfilter/buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: apply cosmetics style fixesStefano Sabatini2012-09-14
|
* lavfi: add qp_table_sizeMichael Niedermayer2012-09-07
| | | | | | This avoid recalculating it and in case w/h changed avoids crashes. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* libavfilter: pass QP table through the filter chainMichael Niedermayer2012-09-07
| | | | | | Any volunteers to port the pp and spp filters from libmpcodec? Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec: rename picref->samplesref variable in ↵Stefano Sabatini2012-07-30
| | | | | | avfilter_get_audio_buffer_ref_from_frame() The new name is more meaningful in that context.
* lavfi: add avfilter_get_buffer_ref_from_frame.Nicolas George2012-07-23
|
* lavfi/avcodec: deprecate avfilter_fill_frame_from_*_buffer_ref APIStefano Sabatini2012-06-25
| | | | | | | | | | | Deprecate functions: avfilter_fill_frame_from_buffer_ref avfilter_fill_frame_from_audio_buffer_ref avfilter_fill_frame_from_video_buffer_ref and schedule to drop them at the next API major bump. The function avfilter_copy_buf_props() should be used instead.
* lavfi/avcodec: make avfilter_fill_frame_from*() functions use ↵Stefano Sabatini2012-06-19
| | | | | | | avfilter_copy_buf_props() The code in avfilter_copy_buf_props() is more generic, allow code factorization.
* lavfi/avcodec: always use av_frame* accessors in avfilter_copy_buf_props()Stefano Sabatini2012-06-19
| | | | | | Use av_frame_* accessors for the newly added fields in AVFrame (for which we are supposed to use such accessors), and group the istructions accordingly.
* lavfi/avcodec: copy pos field from AVFilterBuffer to AVFrame pkt_posStefano Sabatini2012-06-19
|
* lavfi/avcodec: add consistency checks in avfilter_copy_buf_props()Stefano Sabatini2012-06-16
| | | | | | The function will abort through an assert if the source is not defined, or if the internal state of the source is inconsistent (e.g. type = AUDIO && !src->audio).
* lavfi: move definition of avfilter_copy_buf_props() from buffer.c to avcodec.cStefano Sabatini2012-06-13
| | | | | | avcodec.c is where it is defined the lavc/lavfi interface code, so seems a more adequate location (and doesn't force the inclusion of libavcodec/avcodec.h where it is not required).
* lavfi: move avfilter_copy_frame_props() definition from buffer.c to avcodec.cStefano Sabatini2012-06-05
| | | | | The new location is more suited, as it is where the lavfi/lavc glue is defined.
* lavfi: use getter/setter functions for AVFrame.pkt_posMichael Niedermayer2012-05-28
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: Fill linesize, sample_rate and channel_layout fields in ↵Robert Nagy2012-05-28
| | | | | | avfilter_fill_frame_from_audio_buffer_ref. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/avcodec.c: fix copyrightMichael Niedermayer2012-05-24
| | | | | | | | | | | | | | | | | git blame: 45 Stefano Sabatini 23 Clément Bœsch 4 Michael Niedermayer 3 Robert Nagy 3 Nicolas George 2 Roger Pau Monné Initial commit: commit 566666caf3a09d6254edaa99d222eddb6fe2986b Author: Stefano Sabatini <stefano.sabatini-lala@poste.it> Date: Sun May 1 14:47:05 2011 +0200 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (26 commits) fate: use diff -b in oneline comparison Add missing version bumps and APIchanges/Changelog entries. lavfi: move buffer management function to a separate file. lavfi: move formats-related functions from default.c to formats.c lavfi: move video-related functions to a separate file. fate: make smjpeg a demux test fate: separate sierra-vmd audio and video tests fate: separate smacker audio and video tests libmp3lame: set supported channel layouts. avconv: automatically insert asyncts when -async is used. avconv: add support for audio filters. lavfi: add asyncts filter. lavfi: add aformat filter lavfi: add an audio buffer sink. lavfi: add an audio buffer source. buffersrc: add av_buffersrc_write_frame(). buffersrc: fix invalid read in uninit if the fifo hasn't been allocated lavfi: rename vsrc_buffer.c to buffersrc.c avfiltergraph: reindent lavfi: add channel layout/sample rate negotiation. ... Conflicts: Changelog doc/APIchanges doc/filters.texi ffmpeg.c ffprobe.c libavcodec/libmp3lame.c libavfilter/Makefile libavfilter/af_aformat.c libavfilter/allfilters.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/avfiltergraph.c libavfilter/buffersrc.c libavfilter/defaults.c libavfilter/formats.c libavfilter/src_buffer.c libavfilter/version.h libavfilter/vf_yadif.c libavfilter/vsrc_buffer.c libavfilter/vsrc_buffer.h libavutil/avutil.h tests/fate/audio.mak tests/fate/demux.mak tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: switch to _alt functionsMichael Niedermayer2012-05-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* lavfi/avcodec: implement audio copy_frame_prop.Nicolas George2012-05-04
|
* lavfi: implement avfilter_get_audio_buffer_ref_from_frame.Nicolas George2012-05-04
|
* copy pts and format props between lavfi buffer and frame.Robert Nagy2012-04-17
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter: set w/h in avfilter_fill_frame_from_video_buffer_ref().Michael Niedermayer2012-03-29
| | | | | | This fixes issues with AVFrame w/h being wrong in some cases Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi: add avfilter_fill_frame_from_{audio_,}buffer_ref().Clément Bœsch2012-03-26
|
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avs: call release_buffer() at the end. Add minor bumps and APIchanges entries for lavc/lavfi changes. mpegvideo.c: K&R formatting and cosmetics. avconv: avoid memcpy in vsrc_buffer when possible. avconv: implement get_buffer()/release_buffer(). lavfi: add a new function av_buffersrc_buffer(). lavfi: add avfilter_copy_frame_props() lavc: add format field to AVFrame lavc: add width and height fields to AVFrame lavc: add a sample_aspect_ratio field to AVFrame doxy: add website-alike style to the html output FAQ: add an entry for common error when using -profile Conflicts: avconv.c cmdutils.c doc/APIchanges libavcodec/avcodec.h libavcodec/mpegvideo.c libavcodec/utils.c libavcodec/version.h libavfilter/Makefile libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/src_movie.c libavfilter/vsrc_buffer.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* libavfilter: implement avfilter_fill_frame_from_video_buffer_ref()Stefano Sabatini2011-06-12
|
* lavfi: add avfilter_get_video_buffer_ref_from_frame to avcodec.hStefano Sabatini2011-05-19
| | | | Simplify passing AVFrame data to av_vsrc_buffer_add_video_buffer_ref().
* lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()Stefano Sabatini2011-05-07
avfilter_copy_frame_props() avoids code duplication and increases robustness. The added files libavfilter/avcodec.[ch] are used for containing utilities useful for gluing togheter libavfilter and libavcodec.