Commit Graph

2580 Commits

Author SHA1 Message Date
James Almer 6d0c89980c avcodec/hevcdec: export global side data in AVCodecContext
Signed-off-by: James Almer <jamrial@gmail.com>
2024-04-11 11:48:39 -03:00
Jan Ekström 0d36844ddf avcodec: add frame side data array to AVCodecContext
This allows configuring an encoder by using AVFrameSideData.
2024-03-20 19:15:05 +02:00
Mark Thompson 98a2ade630 avcodec: Fix doxygen comment marker 2024-03-13 21:56:59 +00:00
Anton Khirnov 68a8eca752 lavc: add a decoder option for configuring side data preference
This and the following commits fix #10857
2024-03-08 07:37:55 +01:00
Anton Khirnov 0757669629 lavc: move AVCodecContext.pts_correction* to DecodeContext
These fields are documented to be non-public and are only used in
decode.c
2024-03-07 08:53:32 -03:00
Andreas Rheinhardt 326c97dd38 avcodec/avcodec: Reorder AVCodecContext and AVSubtitleRect fields
Move related fields closer together and try to plug holes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
James Almer 67e7f0b05e avutil: remove deprecated FF_API_REORDERED_OPAQUE
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer 65ddc74988 avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUT
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer 98e1eebef9 avcodec: remove deprecated FF_API_SLICE_OFFSET
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer 2717dcfb85 avcodec: remove deprecated FF_API_AVCTX_FRAME_NUMBER
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer c4498aae7c avcodec: remove deprecated FF_API_AVCODEC_CHROMA_POS
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:30 -03:00
James Almer 0b8940f96a avcodec: remove deprecated FF_API_IDCT_NONE
Signed-off-by: James Almer <jamrial@gmail.com>
2024-03-07 08:53:29 -03:00
Andrew Sayers 0dde5c5efa avcodec/avcodec: downgrade multi-member comment to non-Doxygen comment
Doxygen only associates this comment with "pts_correction_num_faulty_pts",
causing it to display incorrectly.

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:40:24 +01:00
Andrew Sayers 6096c244bb fix /// comments that should be ///<
Actual command: sed -i -e "s/\([;,] *\)<* *\/\/\/ *<* */\1\/\/\/< /" $( git grep -l "[;,] */// " )

Signed-off-by: Andrew Sayers <ffmpeg-devel@pileofstuff.org>
2024-03-04 17:38:57 +01:00
Andreas Rheinhardt 1d66a122df avcodec/avcodec: Deprecate AV_INPUT_BUFFER_MIN_SIZE
It used to be used with preallocated packet buffers with
the old encode API, but said API is no more and therefore
there is no reason for this to be public any more.
So deprecate it and use an internal replacement
for the encoders using it as an upper bound for the
size of their headers.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-02-21 00:24:44 +01:00
Anton Khirnov 1cc24d7495 lavc: deprecate avcodec_close()
Its use has been discouraged since 2016, but now is no longer used in
avformat, so there is no reason to keep it public.
2024-02-09 16:14:56 +01:00
James Almer 804be7f9e3 avcodec/hevcdec: check for DOVI configuration record in AVCodecContext side data
Signed-off-by: James Almer <jamrial@gmail.com>
2023-10-06 10:11:18 -03:00
Stefano Sabatini 6f421d9d4e lavc: clarify meaning of avctx.level option 2023-10-06 09:49:47 +02:00
Andreas Rheinhardt f58038d498 avcodec/avcodec: Avoid codec_desc.h, codec_par.h inclusions
Instead, use forward declarations; and in order not to affect
any user include these headers for them, but not internally.
This has the advantage of removing implicit inclusions of these
headers from almost all files providing codecs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-03 01:59:07 +02:00
Andreas Rheinhardt 8238bc0b5e avcodec/defs: Add AV_PROFILE_* defines, deprecate FF_PROFILE_* defines
These defines are also used in other contexts than just AVCodecContext
ones, e.g. in libavformat. Furthermore, given that these defines are
public, the AV-prefix is the right one, so deprecate (and not just move)
the FF-macros.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:39:02 +02:00
James Almer b6627a57f4 Revert "avcodec/mpeg12dec: Do not alter avctx->rc_buffer_size"
This reverts commit eb88ccb92e.

AVCodecContext fields are the proper place for a decoder to export such values.
This change is in preparation for the following commits.
2023-09-06 10:27:12 -03:00
Stefano Sabatini a76fb12375 lavc/avcodec.h: fix typos in AVCodecContext.pkt_timebase description 2023-09-06 01:02:38 +02:00
Andreas Rheinhardt e35dfe864d avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit
20f972701806be20a77f808db332d9489343bb78: It moves the private fields
of AVHWAccel to a new struct FFHWAccel extending AVHWAccel
in an internal header (namely hwaccel_internal.h).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:50:29 +02:00
Andreas Rheinhardt 7469f2ec0a avcodec/avcodec: Remove unnecessary forward declaration
This would only be necessary if this header declared a function
that takes a (pointer to) struct AVCodecContext as parameter.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-05 09:40:06 +02:00
Anton Khirnov f264204de9 lavc: deprecate AV_CODEC_FLAG_DROPCHANGED
This decoding flag makes decoders drop all frames after a parameter
change, but what exactly constitutes a parameter change is not well
defined and will typically depend on the exact use case.
This functionality then does not belong in libavcodec, but rather in
user code
2023-07-15 10:19:33 +02:00
Dawid Kozinski 637afea88e avcodec: MPEG-5 EVC codec registration
Added prerequisites that must be met before providing support for the MPEG-5 EVC codec
- Added new entry to codec IDs list
- Added new entry to the codec descriptor list
- Bumped libavcodec minor version
- Added profiles for EVC codec

Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-29 11:38:21 -03:00
Lynne 6733a1a456
avcodec: add AVHWAccel.flush callback 2023-05-29 00:41:57 +02:00
Lynne be07145109
avcodec: add AVHWAccel.free_frame_priv callback 2023-05-29 00:41:56 +02:00
Anton Khirnov 8b23644408
lavc/pthread_frame: add support for thread-safe hwaccels 2023-05-29 00:41:27 +02:00
Anton Khirnov 7d1d61cc5f lavc: deprecate AVCodecContext.ticks_per_frame
For encoding, this field is entirely redundant with
AVCodecContext.framerate.

For decoding, this field is entirely redundant with
AV_CODEC_PROP_FIELDS.
2023-05-15 10:56:18 +02:00
Stefano Sabatini 26eb3129df lavc: clarify color_range semantics
Extend description for decoding and encoding use cases.

Address issue: http://trac.ffmpeg.org/ticket/443
2023-04-02 16:22:14 +02:00
Anton Khirnov b62632e2c9 lavc: turn mentions of AV_CODEC_FLAG_RECON_FRAME in doxy into links 2023-03-28 13:00:42 +02:00
Anton Khirnov 83eb52323c lavc: expand doxy for AV_CODEC_FLAG_RECON_FRAME 2023-03-28 13:00:42 +02:00
Anton Khirnov 5f87c9915d lavc/avcodec: fix documentation typo 2023-03-28 13:00:42 +02:00
Stefano Sabatini dcf963f490 lavc/avcodec.h: extend documentation for avcodec_open2()
In particular, clarify how to set options in the codec context, and
mention when to use avcodec_parameters_to_context().

Fix trac issues:
http://trac.ffmpeg.org/ticket/5781
http://trac.ffmpeg.org/ticket/5838
2023-03-12 16:45:00 +01:00
Anton Khirnov 432adca5fe lavc: disable an obsolete hack for real video
AVCodecContext.slice_{count,offset} are unneeded since 2007, commit
383b123ed3 and following. Deprecate those
fields.
2023-03-02 21:32:00 +01:00
Marth64 98a4699216
avcodec/dca_xll: add detection of DTS:X and DTS:X IMAX
Signed-off-by: Marth64 <marth64@proxyid.net>
2023-03-02 13:46:04 +01:00
Marth64 96ed043afa
avcodec/mlpdec: add detection of Atmos spatial extension profile in TrueHD
Signed-off-by: Marth64 <marth64@proxyid.net>
2023-03-02 13:45:59 +01:00
Marth64 a4e5b94633
avcodec/eac3dec: add detection of Atmos spatial extension profile
Signed-off-by: Marth64 <marth64@proxyid.net>
2023-03-02 13:45:51 +01:00
Linjie Fu f459377543 lavc/avcodec: Add HEVC Screen Content Coding Extensions profile
Described in HEVC spec A.3.7. Bump minor version and add APIchanges
entry for new added profile.

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2023-02-27 13:42:06 +08:00
Marton Balint 6b6f7db819 avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_number
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>
2023-02-13 00:36:46 +01:00
James Almer 1ba8b6d9dc avcodec: remove FF_API_SUB_TEXT_FORMAT
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 3ceffe7839 avcodec: remove FF_API_FLAG_TRUNCATED
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
James Almer 5f9e848e68 avcodec: remove FF_API_AVCTX_TIMEBASE
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:08 +01:00
James Almer 63258b6f7c avcodec: remove FF_API_GET_FRAME_CLASS
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer 0b3152779d avcodec: remove FF_API_DEBUG_MV
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:24:16 +01:00
James Almer e0786a8eeb avcodec: remove FF_API_THREAD_SAFE_CALLBACKS
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:16 +01:00
Andreas Rheinhardt f843460eb7 avcodec/avcodec: Remove AV_CODEC_FLAG2_DROP_FRAME_TIMECODE
It has been deprecated in 94d68a41fa
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>
2023-02-09 15:24:15 +01:00
Andreas Rheinhardt 868a31b42d avcodec: Make avcodec_decode_subtitle2 accept a const AVPacket*
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Anton Khirnov bdc76f467f lavu/frame: deprecate reordered_opaque
It is only used in libavcodec, where it's been superseded by
AV_CODEC_CAP_COPY_OPAQUE.
2023-02-04 13:40:20 +01:00