summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
Commit message (Collapse)AuthorAge
* avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_numberMarton Balint2023-02-13
| | | | | | | | | | Frame counters can overflow relatively easily (INT_MAX number of frames is slightly more than 1 year for 60 fps content), so make sure we use 64 bit values for them. Also deprecate the old 32 bit frame_number attribute. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: remove FF_API_SUB_TEXT_FORMATJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_FLAG_TRUNCATEDJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_AVCTX_TIMEBASEJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_GET_FRAME_CLASSJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_DEBUG_MVJames Almer2023-02-09
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: remove FF_API_THREAD_SAFE_CALLBACKSJames Almer2023-02-09
| | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODEAndreas Rheinhardt2023-02-09
| | | | | | | | | | It has been deprecated in 94d68a41fabb55dd8c7e59b88fe4a28a637d1e5f and can't be set via AVOptions. The only codecs that use it (the MPEG-1/2 encoders) have private options for this. So remove it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*Andreas Rheinhardt2023-02-09
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavu/frame: deprecate reordered_opaqueAnton Khirnov2023-02-04
| | | | | It is only used in libavcodec, where it's been superseded by AV_CODEC_CAP_COPY_OPAQUE.
* lavc/decode: allow using AV_CODEC_FLAG_COPY_OPAQUE for decodingAnton Khirnov2023-02-04
| | | | | Use it to propagate AVPacket.opaque[_ref] to corresponding AVFrame fields. This is a more convenient alternative to reordered_opaque.
* lavc/encode: pass through frame durations to encoded packetsAnton Khirnov2023-01-29
| | | | | | The generic code can only handle the no-delay case. Encoders with delay need to be handled individually, which will be done in the following commits.
* lavc: add a codec flag for propagating opaque from frames to packetsAnton Khirnov2023-01-29
| | | | | | | | | This is intended to be a more convenient replacement for reordered_opaque. Add support for it in the two encoders that offer AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE: libx264 and libx265. Other encoders will be supported in future commits.
* lavc/avcodec: improve AV_CODEC_FLAG_RECON_FRAME doxyAnton Khirnov2023-01-29
| | | | | | Do not break a sentence on a period after "i.e.". Link to the definition of AV_CODEC_CAP_ENCODER_RECON_FRAME.
* lavc/avcodec: improve enc/dec API doxyAnton Khirnov2023-01-29
| | | | Change return value descriptions into lists of @retval
* lavc: add new unsafe_output hwaccel_flagTimo Rothenpieler2022-12-10
|
* avcodec/avcodec: Escape Doxygen referenceMarvin Scholz2022-10-17
| | | | | | The # is interpreted as explicit reference request by Doxygen which is not desired here, use markdown inline code to avoid that.
* avcodec: Fix Doxygen trailing brief commentsMarvin Scholz2022-10-17
| | | | | The //< comment is not any magic comment supported by Doxygen, instead use ///< to mark them as doc for the members.
* avcodec/avcodec: Deprecate lavc chroma pos API functionsAndreas Rheinhardt2022-09-26
| | | | | | | | | | | | avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum() deal with enum AVChromaLocation which is defined in lavu. These functions are therefore replaced by av_chroma_location_enum_to_pos() and av_chroma_location_pos_to_enum(). This commit provides the necessary deprecations. Also already make these functions wrappers around the corresponding lavu functions as not doing so would force one to disable deprecation warnings. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.hAndreas Rheinhardt2022-09-26
| | | | | | | | They are also frequently used in libavformat. This change does not cause any breakage as avcodec.h includes defs.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: fix and extend AVCodecContext.hwaccel_context doxyAnton Khirnov2022-09-06
| | | | | | | | | Mention: - that it is legacy and optional (every hwaccel that uses it can also work with hwcontext, though some optional information can only be signalled throught hwaccel_context) - that it can be used for encoders (only qsvenc currently) - ownership and lifetime
* avcodec/avcodec: Remove legacy cruftAndreas Rheinhardt2022-08-05
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: add API for exporting reconstructed frames from encodersAnton Khirnov2022-08-02
|
* avcodec: add API for automatic handling of icc profilesNiklas Haas2022-07-30
| | | | | | | | | | | | | | | This functionally already exists, but as pointed out in #9672 and #9673, requiring users to manually include filters is clumsy, error-prone and hard to use together with tools like ffplay. To streamline ICC profile support, add a new AVCodecContext flag to globally enable reading and writing ICC profiles, automatically, for all appropriate media types. Note that this commit only includes the new API. The implementation is split off to separate commits for readability. Signed-off-by: Niklas Haas <git@haasn.dev>
* avcodec/avcodec: Don't mention removed functionAndreas Rheinhardt2022-06-30
| | | | | | | | avcodec_thread_init() has been removed in 9a79bb552a518f26bec1b5306a03b76076bcf8eb. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* Keep including the full version.h when headers are included externallyMartin Storsjö2022-03-19
| | | | | | | | | This avoids unnecessary churn and build breakage for users, by making sure the whole version.h is included like it has been so far, while keeping the benefit of not needing to rebuild most files in the ffmpeg tree on minor/micro bumps. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavcodec: Split version.hMartin Storsjö2022-03-16
| | | | | | | | | | | | | | This avoids including version.h in all source files, avoiding unnecessary rebuilds when the version number is bumped. Only version_major.h is included by the main header, which defines availability of e.g. FF_API_* macros, and which is bumped much less often. This isn't done for libavutil/version.h, because that header needs to be included essentially everywhere due to LIBAVUTIL_VERSION_INT being used wherever an AVClass is constructed. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: switch to the new channel layout APIVittorio Giovara2022-03-15
| | | | | | | | 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>
* avcodec/avcodec: Remove MpegEncContext forward declarationAndreas Rheinhardt2022-02-15
| | | | | | Forgotten in be95df12bb06b183c8d2aea3b0831fdf05466cf3. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: deprecate FF_IDCT_NONEAnton Khirnov2022-02-15
| | | | It was only used by XvMC.
* lavc/mpeg*: drop the XvMC hwaccel codeAnton Khirnov2022-02-15
| | | | | XvMC was last relevant over 10 years ago, if ever. There is no reason to use it today.
* avcodec/avcodec: Remove outdated commentAndreas Rheinhardt2022-01-09
| | | | | | | | | avcodec_open2() is supposed to be thread-safe (those codecs whose init functions are not thread-safe are guarded by a global lock). Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec, options_table: Deprecate sub_text_formatAndreas Rheinhardt2021-09-20
| | | | | | | | Unused since 1f63665ca567fbc49fa80166d468a822c2999efa. Found-by: Soft Works <softworkz@hotmail.com> Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: deprecate AV_CODEC_(FLAG|CAP)_TRUNCATEDAnton Khirnov2021-09-20
| | | | | | | | | | It is supported only by a few decoders (h263, h263p, mpeg(1|2|)video and mpeg4) and is entirely redundant with parsers. Furthermore, using it leads to missing frames, as flushing the decoder at the end does not work properly. Co-authored-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Allow up to seven codec ids per parserAndreas Rheinhardt2021-09-02
| | | | | | | ff_pnm_parser and ff_vp3_parser already hit the current limit; an addition to the former (to handle pfm) is planned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: add a Film Grain codec property flagJames Almer2021-08-24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt2021-07-22
| | | | | | | It is not used here at all; instead, add it where it is used without including it or any of the arch-specific CPU headers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't include hwcontext.hAndreas Rheinhardt2021-07-22
| | | | | | | It is no longer used directly; but it is still indirectly included via codec.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Don't include errno.hAndreas Rheinhardt2021-07-22
| | | | | | | This inclusion has been added before libavutil/error.h was split off from avcodec.h (in 60c144f700e2e362047b00704abcb694d49e549c). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including bsf.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include bsf.h directly wherever it is used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* lavc: fix and extend AVCodecContext.get_format doxyAnton Khirnov2021-06-26
| | | | | | | Remove some incorrect (or at least misleading) statements, such as the formats being ordered by quality, or the first format being the native one. Neither of those are true for hardware acceleration, which is the main use of this callback.
* lavc: move av_get_profile_name() from avcodec.h to codec.hAnton Khirnov2021-06-10
|
* lavc: move av_get_audio_frame_duration2() from avcodec.h to codec_par.hAnton Khirnov2021-06-10
|
* lavc: move av_get_pcm_codec() from avcodec.h to codec_id.hAnton Khirnov2021-06-10
|
* lavc: move avcodec_profile_name() from avcodec.h to codec_id.hAnton Khirnov2021-06-10
|
* lavc: move av_get_[exact_]bits_per_sample() to codec_id.hAnton Khirnov2021-06-10
|
* lavc: move small misc definitions into a separate headerAnton Khirnov2021-06-10
| | | | This will allow to avoid #including the entire avcodec.h in some places.
* avcodec: remove leftover references to AVCodecContext.refcounted_framesJames Almer2021-05-13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: be more explicit about the buffer size in get_encode_buffer ↵James Almer2021-05-07
| | | | | | documentation Signed-off-by: James Almer <jamrial@gmail.com>