summaryrefslogtreecommitdiff
path: root/libavfilter/drawutils.c
Commit message (Collapse)AuthorAge
* 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>
* avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPALAndreas Rheinhardt2021-04-27
| | | | | | | Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_extractplanes: add float formats supportPaul B Mahol2021-02-07
|
* avfilter/drawutils: Remove remnants of old APIAndreas Rheinhardt2021-01-29
| | | | | | | | | ff_fill_line_with_color and ff_draw_rectangle are unused since 19c8f2271423281c9b876b984076a6467c455904; ff_copy_rectangle is unused since 53b7a3fe081ec56c5706228eb6431bb943ad471a. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/drawutils: support gray14Paul B Mahol2018-05-05
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/drawutils: add support for full rangePaul B Mahol2018-05-03
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm42018-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PSEUDOPAL pixel formats are not paletted, but carried a palette with the intention of allowing code to treat unpaletted formats as paletted. The palette simply mapped the byte values to the resulting RGB values, making it some sort of LUT for RGB conversion. It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8, GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap formats. The last one, GRAY8, is more common, but its treatment is grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming from typical Y video planes was not mapped to the correct RGB values. This cannot be fixed, because AVFrame.color_range can be freely changed at runtime, and there is nothing to ensure the pseudo palette is updated. Also, nothing actually used the PSEUDOPAL palette data, except xwdenc (trivially changed in the previous commit). All other code had to treat it as a special case, just to ignore or to propagate palette data. In conclusion, this was just a very strange old mechnaism that has no real justification to exist anymore (although it may have been nice and useful in the past). Now it's an artifact that makes the API harder to use: API users who allocate their own pixel data have to be aware that they need to allocate the palette, or FFmpeg will crash on them in _some_ situations. On top of this, there was no API to allocate the pseuo palette outside of av_frame_get_buffer(). This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes the pseudo palette optional. Nothing accesses it anymore, though if it's set, it's propagated. It's still allocated and initialized for compatibility with API users that rely on this feature. But new API users do not need to allocate it. This was an explicit goal of this patch. Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0. Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition, FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation functions manually changed to not allocating a palette.
* lavfi/drawutils: Do not claim to support P016.Carl Eugen Hoyos2018-03-08
| | | | Fixes fate on big-endian.
* avfilter/drawutils: add gray9/10/12 supportPaul B Mahol2017-08-07
|
* avfilter/drawutils: support gbrap10 tooPaul B Mahol2017-08-07
|
* avfilter/drawutils: allow drawing opaque text on transparent backgroundPaul B Mahol2016-09-21
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/drawutils: honor shift for color component descriptionTimo Rothenpieler2016-08-31
|
* avfilter/drawutils: P010 is not supportedTimo Rothenpieler2016-08-31
|
* avfilter/drawutils: Fix single plane with alphaMichael Niedermayer2016-08-09
| | | | | | Fixes Ticket5720 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Split drawutils test out into separate fileDerek Buitenhuis2016-05-11
| | | | | | | This was missed during 96d616052b3d39678e477fa10610ca688f46fff9 because it is not included in FATE. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavfi/drawutils: support NV12 and NV21Rodger Combs2016-05-10
|
* lavfi/drawutils: Add some missing GBRP pix_fmts.Carl Eugen Hoyos2016-03-03
| | | | Fixes for example extractplanes with GBRAP16.
* avfilter/drawutils: fix gray and gbr formats on big endianMichael Niedermayer2016-02-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/drawutils: Fix ff_fill_rectangle() on big endianMichael Niedermayer2016-02-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/drawutils: >8 bit supportPaul B Mahol2016-02-17
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-27
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavfi: recognize GBR9-14P as RGB in ff_fill_rgba_map().Ronald S. Bultje2016-01-24
|
* drawutils: ReindentTimothy Gu2015-10-26
|
* lavfi/drawutils: add const to blending mask.Nicolas George2015-10-25
|
* avfilter/all: propagate errors of functions from avfilter/formatsGanesh Ajjanagadde2015-10-14
| | | | | | | | | | | | | | | | | | Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM). This propagates the return values. All of these were found by using av_warn_unused_result, demonstrating its utility. Tested with FATE. I am least sure of the changes to avfilter/filtergraph, since I don't know what/how reduce_format is intended to behave and how it should react to errors. Fixes: CID 1325680, 1325679, 1325678. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Previous version Reviewed-by: Nicolas George <george@nsup.org> Previous version Reviewed-by: Clément Bœsch <u@pkh.me> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes2015-09-08
|
* avfilter/drawutils: Assert av_pix_fmt_desc_get() return value in ↵Michael Niedermayer2015-06-13
| | | | | | | | | | | ff_fill_line_with_color() Theres currently no case where this could be triggered Found-by: Daemon404 Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/drawutils: Fix format validity check in ff_draw_init()Michael Niedermayer2015-06-13
| | | | | Found-by: Daemon404 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/drawutils: Check for av_malloc* failuresMichael Niedermayer2015-01-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/drawutils: Use av_malloc_array()Michael Niedermayer2015-01-22
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avfilter/vf_drawtext: Avoid using non public AV_PIX_FMT_NBMichael Niedermayer2014-05-27
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/drawutils: set subsampling for rgb tooPaul B Mahol2013-07-14
| | | | | | Otherwise it is incorrectly set to 1. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/drawutils: fix planar rgbPaul B Mahol2013-07-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/drawutils: attempt to fix subsampling.Clément Bœsch2013-05-28
|
* replace remaining PIX_FMT_* flags with AV_PIX_FMT_FLAG_*Michael Niedermayer2013-05-15
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavfi/drawutils: add 16 bit rgb and planar rgb to ff_fill_rgba_map()Paul B Mahol2013-05-08
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* lavfi/drawutils: fix blending computation in blend_line functionMatthieu Bouron2013-01-05
| | | | | If width is not alligned with hsub, background component should only be multiplied once by sub alpha component.
* Merge commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480'Michael Niedermayer2012-11-21
|\ | | | | | | | | | | | | | | | | | | | | * commit 'd1d9efaae6c7e8466b06c30ca21c6b569dd2e480': avcodec: split avpicture from imgconvert pixdesc: add PIX_FMT_ALPHA flag Conflicts: libavcodec/imgconvert.c Merged-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
| |
* | 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>
| * Don't include common.h from avutil.hMartin Storsjö2012-08-15
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * lavfi: add drawutilsStefano Sabatini2011-02-21
| | | | | | | Add drawutils.h and drawutils.c, and use them in the pad filter. The new functions are going to be shared by other filters. Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavfi/drawutils: make ff_draw_color() accept a const rgba mapStefano Sabatini2012-08-02
|
* lavfi: update some deprecated functionsPaul B Mahol2012-06-16
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* drawutils: fix copyrightMichael Niedermayer2012-05-24
| | | | | | | | | | | | | | | | | git blame: 423 Nicolas George 86 Stefano Sabatini 19 Michael Niedermayer 1 Reimar Döffinger Initial commit: commit bcfd9e821b6083e9a98b8e5da4de0a4fbf22923b Author: Stefano Sabatini <stefano.sabatini-lala@poste.it> Date: Sun Feb 20 23:42:17 2011 +0100 lavfi: add drawutils Signed-off-by: Michael Niedermayer <michaelni@gmx.at>