summaryrefslogtreecommitdiff
path: root/libavcodec/libwebpenc.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: support AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE in all no-delay encodersAnton Khirnov2023-01-291-1/+1
| | | | Including fake-delay encoders marked with FF_CODEC_CAP_EOF_FLUSH.
* avcodec/codec_internal: Add macro to set AVCodec.long_nameAndreas Rheinhardt2022-09-031-1/+1
| | | | | | | | It reduces typing: Before this patch, there were 105 codecs whose long_name-definition exceeded the 80 char line length limit. Now there are only nine of them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-181-0/+1
| | | | | | | This is in preparation of switching the default init-thread-safety to a codec being init-thread-safe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-051-1/+1
| | | | | | | | | | | This is possible, because every given FFCodec has to implement exactly one of these. Doing so decreases sizeof(FFCodec) and therefore decreases the size of the binary. Notice that in case of position-independent code the decrease is in .data.rel.ro, so that this translates to decreased memory consumption. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-211-9/+10
| | | | | | | | | | | | | | | | Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/encoders: Remove redundant setting of AV_PKT_FLAG_KEYAndreas Rheinhardt2021-09-281-1/+0
| | | | | | | It is now set generically for all those encoders whose corresponding AVCodecDescriptor has the AV_CODEC_PROP_INTRA_ONLY. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libwebpenc: Deduplicate options, AVClass, pix_fmtsAndreas Rheinhardt2021-07-081-14/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libwebpenc: Allow user-supplied buffersAndreas Rheinhardt2021-05-231-1/+3
| | | | | | | | Here the packet size is known before allocating the packet, so that supporting user-supplied buffers is trivial. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | Explicitly identify decoder/encoder wrappers with a common name. This saves API users from guessing by the name suffix. For example, they don't have to guess that "h264_qsv" is the h264 QSV implementation, and instead they can just check the AVCodec .codec and .wrapper_name fields. Explicitly mark AVCodec entries that are hardware decoders or most likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing API users listing hardware decoders in a more generic way. The proposed AVCodecHWConfig does not provide this information fully, because it's concerned with decoder configuration, not information about the fact whether the hardware is used or not. AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software implementations in case the hardware is not capable. Based on a patch by Philip Langdale <philipl@overt.org>. Merges Libav commit 47687a2f8aca3f65b6fdd117b1cb66a7409a7fd1.
* avcodec/libwebpenc: Use ff_alloc_packet2()Michael Niedermayer2015-08-021-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libwebp: simplify AVCodec.close functionsJames Almer2015-05-231-1/+4
| | | | | Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* libwebp: use a separate AVClass for each encoderJames Almer2015-05-231-0/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* WebP encoder: extract out some methods into a separate helper library.Urvang Joshi2015-05-221-270/+9
| | | | | | | This is the 2nd patch in preparation for using WebPAnimEncoder API for encoding and muxing WebP images. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/libwebpenc: add quality optionMichael Niedermayer2014-11-031-4/+4
| | | | | | | | | | | | previously quality could only be set through qscale/global_quality but the scale was inverted. Using a separate option avoids the confusion from qscale working backward. Reviewed-by: Benoit Fouet <benoit.fouet@free.fr> Reviewed-by: Clément Bœsch <u@pkh.me> Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/libwebpenc: support "P" frames in webp animationsMichael Niedermayer2014-11-011-3/+77
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* lavc/libwebpenc: use WebPMemoryWriterClear()James Almer2014-08-271-0/+4
| | | | | | | WebPMemoryWriterClear() must be used instead of free() when libwebp ABI version is > 0x0203 Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-241-3/+1
|\ | | | | | | | | | | | | | | | | | | * qatar/master: Use av_frame_copy() to simplify code where appropriate. Conflicts: libavfilter/vf_copy.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Use av_frame_copy() to simplify code where appropriate.Anton Khirnov2014-02-241-3/+1
| |
* | Merge commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b'Michael Niedermayer2013-12-221-4/+4
|/ | | | | | | | | | | | | | * commit 'be7c323176e2e5fcf30e3d2ff20975b2f936811b': Add a libwebp encoder Conflicts: Changelog doc/encoders.texi doc/general.texi libavcodec/version.h libavformat/img2enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Add a libwebp encoderJustin Ruggles2013-12-211-0/+287