summaryrefslogtreecommitdiff
path: root/libavcodec/libwebpenc_animencoder.c
Commit message (Collapse)AuthorAge
* avcodec: Add FF_CODEC_CAP_NOT_INIT_THREADSAFEAndreas Rheinhardt2022-07-18
| | | | | | | 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/libwebpenc_animencoder: Fix memory leak of WebPData in ↵Andrey Volk2022-04-10
| | | | | | | libwebp_anim_encode_frame() Signed-off-by: Andrey Volk <andywolk@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/codec_internal: Use union for FFCodec decode/encode callbacksAndreas Rheinhardt2022-04-05
| | | | | | | | | | | 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-21
| | | | | | | | | | | | | | | | 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-28
| | | | | | | 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-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/libwebpenc_animencoder: Allow user-supplied buffersAndreas Rheinhardt2021-05-23
| | | | | | | | 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-27
| | | | | | | | | | 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/libwebpenc_animencoder: set the correct packet ptsJames Almer2021-04-16
| | | | | | | The only packet produced by this encoder contains the entire animated stream, so set its pts to the first frame encoded. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libwebpenc_animencoder: stop propagating bogus empty packetsJames Almer2021-04-16
| | | | | | | | | | Packets must have at least one of data or side_data. If none are available, then got_packet must not be signaled. The generic encode code already discarded these empty packets, but it's better just not propagating them at all. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: add metadata to identify wrappers and hardware decoderswm42017-12-14
| | | | | | | | | | | | | | | | | | | | | 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.
* libwebpenc_animencoder: add missing braces to struct initializationJames Almer2016-03-17
| | | | | | The first member of the WebPAnimEncoderOptions struct is non scalar Signed-off-by: James Almer <jamrial@gmail.com>
* libwebpenc_animencoder: print library messages in verbose log levelsJames Almer2016-03-17
| | | | | Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* libwebpenc_animencoder: zero initialize the WebPAnimEncoderOptions structJames Almer2016-03-17
| | | | | | | | This zeroes the WebPAnimEncoderOptions.verbose field, silencing library info messages printed to stderr. Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/libwebpenc_animencoder: Use ff_alloc_packet2()Michael Niedermayer2015-08-03
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* libwebp: simplify AVCodec.close functionsJames Almer2015-05-23
| | | | | 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-23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* libwebp: remove unneeded definesJames Almer2015-05-23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* WebP encoder: use WebPAnimEncoder API when available.Urvang Joshi2015-05-23
WebPAnimEncoder API is a combination of encoder (WebPEncoder) and muxer (WebPMux). It performs several optimizations to make it more efficient than the combination of WebPEncode() and native ffmpeg muxer. When WebPAnimEncoder API is used: - In the encoder layer: we use WebPAnimEncoderAdd() instead of WebPEncode(). - The muxer layer: works like a raw muxer. On the other hand, when WebPAnimEncoder API isn't available, the old code is used as it is: - In the codec layer: WebPEncode is used to encode each frame - In the muxer layer: ffmpeg muxer is used Signed-off-by: Michael Niedermayer <michaelni@gmx.at>