summaryrefslogtreecommitdiff
path: root/libavcodec/options.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: remove FF_API_GET_FRAME_CLASSJames Almer2023-02-091-33/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/frame: deprecate reordered_opaqueAnton Khirnov2023-02-041-0/+4
| | | | | It is only used in libavcodec, where it's been superseded by AV_CODEC_CAP_COPY_OPAQUE.
* avcodec/options: Fix AVClassCategory of decoders with .receive_frameAndreas Rheinhardt2022-04-051-1/+1
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Rename AVCodecDefault->FFCodecDefaultAndreas Rheinhardt2022-03-211-1/+1
| | | | | | | This structure is no longer declared in a public header, so using an FF-prefix is more appropriate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/codec_internal: Add FFCodec, hide internal part of AVCodecAndreas Rheinhardt2022-03-211-6/+9
| | | | | | | | | | | | | | | | 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/internal: Move FF_CODEC_CAP_* to a new header codec_internal.hAndreas Rheinhardt2022-03-211-1/+1
| | | | | | | | | | Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault. This reduces the amount of files that have to include internal.h (which comes with quite a lot of indirect inclusions), as e.g. most encoders don't need it. It is furthemore in preparation for moving the private part of AVCodec out of the public codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-161-0/+2
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: switch to the new channel layout APIVittorio Giovara2022-03-151-0/+8
| | | | | | | | Since the request_channel_layout is used only by a handful of codecs, move the option to codec private contexts. Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated AVClass.child_class_nextJames Almer2021-04-271-22/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: Remove deprecated avcodec_copy_contextAndreas Rheinhardt2021-04-271-105/+0
| | | | | | | Deprecated in 5f30ac27795f9f98043e8582ccaad8813104adc4. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Remove deprecated avcodec_get_context_defaults3Andreas Rheinhardt2021-04-271-7/+0
| | | | | | | Deprecated in 04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: Remove always-true checkAndreas Rheinhardt2021-04-051-1/+1
| | | | | | Every codec has a name. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/options: Reindent after previous commitAndreas Rheinhardt2021-03-201-4/+3
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/options: Remove always-true checkAndreas Rheinhardt2021-03-201-2/+0
| | | | | | | | Added in dc51a72ba45fbefb9f1c6c3ca5a5b2388d69b2da, yet even back then the check was always true as the AVCodecContext has already been memset to zero before that. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec: add a get_encode_buffer() callback to AVCodecContextJames Almer2021-03-121-0/+1
| | | | | | | | | | | This callback is functionally the same as get_buffer2() is for decoders, and implements for the new encode API the functionality of the old encode API had where the user could provide their own buffers. Reviewed-by: Lynne <dev@lynne.ee> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: deprecate avcodec_get_frame_class()James Almer2021-02-271-0/+2
| | | | | | | | AVFrame hasn't been a struct defined in libavcodec for a decade now, when it was moved to libavutil. Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Revert "avcodec/options: add missing FF_API_COPY_CONTEXT checks"James Almer2021-02-251-4/+0
| | | | | | | | | | This reverts commit 0191f2d29c2a62b8699ac75f09708187e943814c. These functions were never deprecated. The merge from commit 6988cf2969 included them by mistake. Found-by: mkver Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: add missing FF_API_COPY_CONTEXT checksJames Almer2020-10-011-0/+4
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* AVCodecContext: switch to child_class_iterate()Anton Khirnov2020-06-101-0/+15
|
* lavc: stop using deprecated av_codec_next()Josh de Kock2020-04-201-3/+4
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* avcodec/options: remove dead test codeJames Almer2019-05-171-169/+0
| | | | | | It's been unused since 5d48e4eafa6c4559683892b8638d10508125f3cf. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/options: Remove unneeded headerDerek Buitenhuis2018-01-031-1/+0
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/options: do a more thorough clean up in avcodec_copy_context()James Almer2017-04-301-0/+15
| | | | | | | | | Free coded_frame, coded_side_data and unref hw_device_ctx to prevent potential leaks. Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/options: factorize avcodec_copy_context() cleanup codeJames Almer2017-04-301-15/+15
| | | | | | Reviewed-by: Aaron Levinson <alevinsn@aracnet.com> Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit 'd59641abfd25a1007bdf4723d952887b1e3619c6'Clément Bœsch2017-03-121-0/+1
|\ | | | | | | | | | | | | * commit 'd59641abfd25a1007bdf4723d952887b1e3619c6': lavc: initialize AVCodecContext.sw_pix_fmt properly Merged-by: Clément Bœsch <u@pkh.me>
| * lavc: initialize AVCodecContext.sw_pix_fmt properlyAnton Khirnov2016-07-221-0/+1
| | | | | | | | | | Currently it's memset to 0, which is YUV420P. It should be initialized to none.
* | Merge commit '24b5cff01bbac4e08acfd6d19c499e880988f520'Hendrik Leppkes2016-06-261-1/+9
|\ \ | |/ | | | | | | | | | | * commit '24b5cff01bbac4e08acfd6d19c499e880988f520': lavc: handle hw_frames_ctx where necessary Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: handle hw_frames_ctx where necessaryAndrey Turkin2016-05-261-0/+9
| | | | | | | | | | | | | | avcodec_copy_context() didn't handle hw_frames_ctx references correctly which could cause crashes. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f'Hendrik Leppkes2016-06-261-2/+9
|\ \ | |/ | | | | | | | | | | * commit '04fc8e24a091ed1d77d7a3c0cbcfe60baec19a9f': lavc: deprecate avcodec_get_context_defaults3() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: deprecate avcodec_get_context_defaults3()Anton Khirnov2016-05-231-2/+9
| | | | | | | | | | | | | | | | | | This function is supposed to "reset" a codec context to a clean state so that it can be opened again. The only reason it exists is to allow using AVStream.codec as a decoding context (after it was already opened/used/closed by avformat_find_stream_info()). Since that behaviour is now deprecated, there is no reason for this function to exist anymore.
* | Merge commit '5f30ac27795f9f98043e8582ccaad8813104adc4'Hendrik Leppkes2016-06-261-0/+2
|\ \ | |/ | | | | | | | | | | * commit '5f30ac27795f9f98043e8582ccaad8813104adc4': lavc: deprecate avcodec_copy_context() Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: deprecate avcodec_copy_context()Anton Khirnov2016-05-231-0/+2
| | | | | | | | | | | | | | | | | | Since AVCodecContext contains a lot of complex state, copying a codec context is not a well-defined operation. The purpose for which it is typically used (which is well-defined) is copying the stream parameters from one codec context to another. That is now possible with through the AVCodecParameters API. Therefore, there is no reason for avcodec_copy_context() to exist.
* | avcodec/options: Make dummy_v?_encoder staticMichael Niedermayer2015-08-301-4/+4
| | | | | | | | | | | | It does not need to be non static Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/options: Silence deprecated warning about coded_frameMichael Niedermayer2015-08-061-0/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/options-test: don't alloc avctx->coded_frameJames Almer2015-07-211-2/+0
| | | | | | | | | | | | | | | | It's done automatically by avcodec_open2() now. Fixes memleaks in fate-libavcodec-options. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'f046c3b5ac36848cce824b008e0347c621523041'Michael Niedermayer2015-07-031-0/+2
|\ \ | |/ | | | | | | | | | | | | * commit 'f046c3b5ac36848cce824b008e0347c621523041': lavc: Move deprecation warning disabling to files including the table lavc: Disable deprectation warnings coming from options table Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Move deprecation warning disabling to files including the tableVittorio Giovara2015-07-031-0/+2
| | | | | | | | | | | | Unbreak build from 7a5902c556d84a367dd64a003a4e7244fc3a73d1. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavc/options: add test for avcodec_copy_contextLukasz Marek2014-12-081-0/+171
| | | | | | | | | | | | | | This test doesn't cover every possible issue with this function. It covers options management only. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix leaks in avcodec_copy_contextLukasz Marek2014-12-061-5/+11
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: don't copy priv context when it is not AVOption objectLukasz Marek2014-12-061-2/+3
| | | | | | | | | | | | This prevents potential crash when opt API is used without a class. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix leaks in avcodec_free_contextLukasz Marek2014-11-261-0/+3
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix rc_eq leakLukasz Marek2014-11-211-10/+0
| | | | | | | | rc_eq is an option, so it is copied by av_opt_copy(dest, src); above.
* | avcodec/options: Set AVCodecContext->codec upon initialization.Vadim Kalinsky2014-11-181-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavc/options: initialize pkt_timebaseLukasz Marek2014-11-161-0/+1
| | | | | | | | | | | | It's default in option_table.h is 0, but without this fix it is represented as 0/0. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: set timecode_frame_start to -1 as option defaultLukasz Marek2014-11-161-1/+0
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | lavc/options: fix shallow copy contextLukasz Marek2014-11-091-0/+1
| | | | | | | | | | | | | | avcodec_copy_context leaves shallow copy of string/binary/dict options. Double free/accessing freed memory may occur. Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | Merge commit 'a75c2eb25a62105c09b48521aef429dc8a231637'Michael Niedermayer2014-10-181-1/+10
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'a75c2eb25a62105c09b48521aef429dc8a231637': lavc: make rc_eq into private options of mpegvideo encoders Conflicts: libavcodec/options_table.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: make rc_eq into private options of mpegvideo encodersAnton Khirnov2014-10-181-1/+10
| |