summaryrefslogtreecommitdiff
path: root/libavfilter/video.c
Commit message (Collapse)AuthorAge
* avfilter/avfilter: Move frame_pool to FilterLinkInternalAndreas Rheinhardt2024-02-18
| | | | | | | | | Avoids ugly casts when uninitializing. (One could actually avoid allocating this separately if one were willing to expose FFFramePool to those files including link_internal.h.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter: add negotiation API for color space/rangeNiklas Haas2023-12-31
| | | | | | | | | | | | | | | | | | | Motivated by YUVJ removal. This change will allow full negotiation between color ranges and matrices as needed. By default, all ranges and matrices are marked as supported. Because grayscale formats are currently handled very inconsistently (and in particular, assumed as forced full-range by swscale), we exclude them from negotiation altogether for the time being, to get this API merged. After filter negotiation is available, we can relax the grayscale-is-forced-jpeg restriction again, when it will be more feasible to do so without breaking a million test cases. Note that this commit updates one FATE test as a consequence of the sanity fallback for non-YUV formats. In particular, the test case now writes rgb24(pc, gbr/unspecified/unspecified) to the matroska file, instead of rgb24(unspecified/unspecified/unspecified) as before.
* avfilter: Deduplicate default video inputs/outputsAndreas Rheinhardt2023-08-07
| | | | | | | | | | | | | | | | | Lots of video filters use a very simple input or output: An array with a single AVFilterPad whose name is "default" and whose type is AVMEDIA_TYPE_VIDEO; everything else is unset. Given that we never use pointer equality for inputs or outputs*, we can simply use a single AVFilterPad instead of dozens; this even saves .data.rel.ro (8312B here) as well as relocations. *: In fact, several filters (like the filters in vf_lut.c) already use the same outputs; furthermore, ff_filter_alloc() duplicates the input and output pads so that we do not even work with the pads directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/video: Fix newline in trace outputAndreas Rheinhardt2022-09-14
| | | | | | | Forgotten in 7e350379f87e7f74420b4813170fe808e2313911. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/video: Add ff_default_get_video_buffer2() to set specific alignmentMichael Niedermayer2022-04-21
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/video: fix shadowed variableZhao Zhili2022-03-22
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avfilter/framepool: fix alignment requirements for audio and video filtersPaul B Mahol2022-02-22
|
* avfilter/internal: Combine get_(audio|video)_buffer into unionAndreas Rheinhardt2021-08-17
| | | | | | | | These fields are mutually exclusive, so putting them in a union is possible and makes AVFilterPad smaller. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/internal: Don't include framepool.h, thread.hAndreas Rheinhardt2021-08-04
| | | | | | | | They are not used by the header at all and only used by very few files; so include the headers in their users instead of in internal.h. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Remove unnecessary mem.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/video: pick sar from linkPaul B Mahol2017-12-23
| | | | | | | | It should not be needed for each filter that sets sample aspect ratio to set it explicitly also for each and every frame, instead that is automatically done in get_buffer call. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '7433feb82f75827884d909de34d341a1c4401d4a'Matthieu Bouron2017-03-29
|\ | | | | | | | | | | | | * commit '7433feb82f75827884d909de34d341a1c4401d4a': lavfi: Make default get_video_buffer work with hardware frames Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
| * lavfi: Make default get_video_buffer work with hardware framesMark Thompson2016-11-02
| |
* | lavfi/framepool: rename FFVideoFramePool to FFFramePoolMatthieu Bouron2017-01-12
| |
* | lavfi: use a video frame pool for each link of the filtergraphMatthieu Bouron2015-12-15
| |
* | Merge commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit 'f6974fe651d29ef6eb68d66d73f7b6c011062aa0': lavfi: Drop deprecated AVFilterBuffer* code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavfi: Drop deprecated AVFilterBuffer* codeVittorio Giovara2015-08-28
| | | | | | | | Deprecated in 11/2012.
* | Merge commit '67a7695c142561fe60f21adffe89c133385d37c9'Michael Niedermayer2014-08-20
|\| | | | | | | | | | | | | | | | | | | * commit '67a7695c142561fe60f21adffe89c133385d37c9': avfilter: Remove unused variable from ff_get_video_buffer() Conflicts: libavfilter/video.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avfilter: Remove unused variable from ff_get_video_buffer()Diego Biurrun2014-08-19
| |
* | avfilter/video: remove commented out cruftPaul B Mahol2013-09-13
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | 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>
| * lavfi: switch to AVFrame.Anton Khirnov2013-03-08
| | | | | | | | | | Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead.
| * lavfi: merge start_frame/draw_slice/end_frameAnton Khirnov2012-11-28
| | | | | | | | | | Any alleged performance benefits gained from the split are purely mythological and do not justify added code complexity.
* | lavfi: merge all filtering code into ff_filter_frame.Nicolas George2013-01-01
| |
* | lavfi/video: ensure that filter_frame is called.Nicolas George2012-12-30
| | | | | | | | | | | | This is a temporary workaround until all filters have been upgraded to filter_frame and the framework can forget completely about start_frame/draw_slice/end_frame.
* | lavfi: remove some draw_slice related code that has become unneededMichael Niedermayer2012-12-30
| | | | | | | | | | Reviewed-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi/video: remove unused ff_inplace_start_frame().Clément Bœsch2012-12-26
| |
* | lavfi: drop ff_null_start_frame/end_frame/draw_slice.Michael Niedermayer2012-12-13
| | | | | | | | | | | | The functions have become unused Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavfilter: default to filter_frame when neither it nor start/slice/end is set.Michael Niedermayer2012-11-29
| | | | | | | | | | | | this is needed for vf_null and a few others. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavfilter: Support using filter_frame for videoMichael Niedermayer2012-11-28
| | | | | | | | | | | | With this we can mix filters using filter_frame OR start/draw_slice/end Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Replace usage of the deprecated av_pix_fmt_descriptors array with ↵Hendrik Leppkes2012-10-20
| | | | | | | | | | | | av_pix_fmt_desc_get Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavfi: limit matching w/h/fmt asserts to non scale filtersMichael Niedermayer2012-10-17
| | | | | | | | | | | | | | | | | | This fixes a regression with the scale filters input changing. In the long run filters should get a flag to indicate support of this and then this flag be used here. But the regression should not be left standing until thats done. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627'Michael Niedermayer2012-10-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '59ee9f78b0cc4fb84ae606fa317d8102ad32a627': lavfi: do not use av_pix_fmt_descriptors directly. Conflicts: libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/filtfmts.c libavfilter/vf_ass.c libavfilter/vf_boxblur.c libavfilter/vf_drawtext.c libavfilter/vf_lut.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavfi: do not use av_pix_fmt_descriptors directly.Anton Khirnov2012-10-12
| |
* | Merge commit '716d413c13981da15323c7a3821860536eefdbbb'Michael Niedermayer2012-10-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '716d413c13981da15323c7a3821860536eefdbbb': Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat Conflicts: doc/examples/muxing.c ffmpeg.h ffmpeg_filter.c ffmpeg_opt.c ffplay.c ffprobe.c libavcodec/8bps.c libavcodec/aasc.c libavcodec/aura.c libavcodec/avcodec.h libavcodec/avs.c libavcodec/bfi.c libavcodec/bmp.c libavcodec/bmpenc.c libavcodec/c93.c libavcodec/cscd.c libavcodec/cyuv.c libavcodec/dpx.c libavcodec/dpxenc.c libavcodec/eatgv.c libavcodec/escape124.c libavcodec/ffv1.c libavcodec/flashsv.c libavcodec/fraps.c libavcodec/h264.c libavcodec/huffyuv.c libavcodec/iff.c libavcodec/imgconvert.c libavcodec/indeo3.c libavcodec/kmvc.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/ljpegenc.c libavcodec/mjpegdec.c libavcodec/mjpegenc.c libavcodec/motionpixels.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo_enc.c libavcodec/pamenc.c libavcodec/pcxenc.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/pnm.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/ptx.c libavcodec/qdrw.c libavcodec/qpeg.c libavcodec/qtrleenc.c libavcodec/raw.c libavcodec/rawdec.c libavcodec/rl2.c libavcodec/sgidec.c libavcodec/sgienc.c libavcodec/snowdec.c libavcodec/snowenc.c libavcodec/sunrast.c libavcodec/targa.c libavcodec/targaenc.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/tmv.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/vb.c libavcodec/vp3.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/xwddec.c libavcodec/xwdenc.c libavcodec/yop.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_format.c libavfilter/vf_hflip.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/movenc.c libavformat/mxf.h libavformat/utils.c libavformat/yuv4mpeg.c libavutil/imgutils.c libavutil/pixdesc.c libswscale/input.c libswscale/output.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c libswscale/x86/swscale_template.c libswscale/x86/yuv2rgb.c libswscale/x86/yuv2rgb_template.c libswscale/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
| |
* | lavfi: check that buffer and link properties match.Nicolas George2012-09-13
| |
* | lavfi: drop deprecated and pointless avfilter_default_end_frame() functionStefano Sabatini2012-09-09
| | | | | | | | | | | | | | | | Fix warning when compiling boxblur. While this is technically a major API break, practically there will be no one using that function since the filtering API is mostly private, so that function alone is not usable.
* | 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: add a closed field to AVFilerLink.Nicolas George2012-08-22
| | | | | | | | It will help forward errors and maintain consistency.
* | lavfi: fix erroneous use of AV_PERM_PRESERVE in ff_inplace_start_frame.Nicolas George2012-08-17
| | | | | | | | ff_inplace_start_frame looks useless anyway.
* | lavfi: grant all permissions on mallocated video buffers.Nicolas George2012-08-17
| | | | | | | | | | The permissions not requested by the filter that created the buffer may be useful for a later filter and avoid a copy.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-08-16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Fix even more missing includes after the common.h removal build: Factor out rangecoder dependencies to CONFIG_RANGECODER build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE x86: avcodec: Consistently name all init files Add more missing includes after removing the implicit common.h Add some more missing includes after removing the implicit common.h Don't include common.h from avutil.h rtmp: Automatically compute the hash for SWFVerification Conflicts: configure doc/APIchanges doc/examples/decoding_encoding.c libavcodec/Makefile libavcodec/assdec.c libavcodec/audio_frame_queue.c libavcodec/avpacket.c libavcodec/dv_profile.c libavcodec/dwt.c libavcodec/libtheoraenc.c libavcodec/rawdec.c libavcodec/rv40dsp.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/v210dec.h libavcodec/vc1dsp.c libavcodec/x86/Makefile libavfilter/asrc_anullsrc.c libavfilter/avfilter.c libavfilter/buffer.c libavfilter/formats.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_select.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/version.h libavutil/audioconvert.c libavutil/error.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add some more missing includes after removing the implicit common.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavfi: use min_perms and rej_perms for out pads.Nicolas George2012-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several reasons for doing that: 1. It documents the code for the reader and helps find inconsistencies and bugs. 2. For rej_perms, it guarantees the change will be done even if the output reference can be created by several code paths. 3. It can be used to predict cases where a copy will, or will not happen and optimize buffer allocation (for example not request a rare direct-rendering buffer from a device sink if it will be copied anyway). Note that a filter is still allowed to manage the permissions on its own without using these fields.
* | lavfi: use a new field for automatic buffer copy.Nicolas George2012-08-04
| | | | | | | | | | | | | | | | | | | | | | The code currently use cur_buf as the target of the copy, but cur_buf can be cleared by the filter if it has given the reference away or stored it elsewhere as soon as start_frame. The code still relies on the fact that the reference is not destroyed until end_frame. All filters currently follow that condition. An av_assert1() is added to check it; it should at least cause very visible errors in valgrind.
* | lavfi/video: remove duplicated function ff_null_start_frame_keep_ref()Stefano Sabatini2012-08-02
| | | | | | | | | | | | | | Semantic for the function ff_null_start_frame() was changed in 07bad27810cd, and it has now the same behavior of ff_null_start_frame_keep_ref(), thus it makes no sense to keep both of them.
* | lavfi: use correct PTS for link age.Nicolas George2012-07-30
| | | | | | | | | | When start_frame has returned, the buffer reference's PTS may have been modified by another filter.