aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/frame.h
Commit message (Collapse)AuthorAgeFilesLines
* all: fix typos found by codespellTimo Rothenpieler8 days1-1/+1
|
* avutil/frame: add a 3D Reference Displays Information side data typeJames Almer2025-07-011-0/+11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: Port AVFrame.private_ref to RefStruct APIAndreas Rheinhardt2025-03-281-7/+3
| | | | | | | | | This is possible without deprecation period, because said field is documented as only for our libav* libraries and not the general public. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_PALETTE_HAS_CHANGEDJames Almer2025-03-281-8/+0
| | | | | | Deprecated since 2023-05-18. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_FRAME_KEYJames Almer2025-03-281-10/+0
| | | | | | Deprecated since 2023-05-04. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_INTERLACED_FRAMEJames Almer2025-03-281-18/+0
| | | | | | Deprecated since 2023-05-04. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_FRAME_PKTJames Almer2025-03-281-26/+0
| | | | | | Deprecated since 2023-03-20. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add a side data prop to signal channel layout dependent typesJames Almer2025-01-251-0/+7
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame.h: improve documentation for AV_FRAME_FLAG_LOSSLESSLeo Izen2025-01-111-1/+5
| | | | | | | | | | It should be more clear what this flag is indicating with a more verbose comment documenting it. Signed-off-by: Leo Izen <leo.izen@gmail.com> Reviewed-by: Marton Balint <cus@passwd.hu> Reviewed-by: Alexander Strasser <eclipse7@gmx.net> Reviewed-by: Marth64 <marth64@proxyid.net>
* avutil/frame: add AV_FRAME_SIDE_DATA_FLAG_NEW_REFJames Almer2025-01-101-0/+5
| | | | | | | The flag is documented but did not exist. So introduce it as it can be useful. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/frame: add AV_FRAME_FLAG_LOSSLESSMarton Balint2025-01-051-0/+4
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/frame: add av_frame_side_data_remove_by_props()Niklas Haas2024-12-231-0/+8
| | | | | | | | | | As discussed in the previous commit, we often need a convenient way of stripping all side data related to a certain aspect of the frame. This helper accomplishes just that. I considered also adding a way to match only side data matching *all* properties, but I think this is sufficiently useless in practise to not warrant inclusion in the API.
* avutil/frame: add AV_SIDE_DATA_PROP_{SIZE,COLOR}_DEPENDENTNiklas Haas2024-12-231-0/+14
| | | | | | | | | | | | | | | | | | Many filters modify certain aspects of frame data, e.g. through resizing (vf_*scale* family), color volume mapping (vf_lut*, vf_tonemap*), or possibly others. When this happens, we should strip all frame side data that will no longer be correct/relevant after the operation. For example, changing the image size should invalidate AV_FRAME_DATA_PANSCAN because the crop window (given in pixels) no longer corresponds to the actual image size. For another example, tone-mapping filters (e.g. from HDR to SDR) should strip all of the dynamic HDR related metadata. Since there are a lot of different side data types that are affected by such operations, it makes sense to establish this information in a common, easily accessible way. The existing side data properties enum is a perfect fit for this.
* avutil/frame: also align data pointers in av_frame_get_buffer()Pavel Koshevoy2024-11-221-3/+4
| | | | | | | | | | | | | | | This avoids unpleasant surprises to av_frame_get_buffer callers that explicitly specified 64-byte alignment and didn't get AVFrame.data pointers that are 64-byte aligned. For example, see https://github.com/sekrit-twc/zimg/issues/212 Although the zscale issue has already been resolved by other means it would still be prudent to improve the behavior of av_frame_get_buffer to fix any unknown and future instances of similar issues. Co-authored-by: James Almer <jamrial@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/frame: add side data storing view ID for multi-view videoAnton Khirnov2024-09-231-0/+9
|
* avutil/frame: add an LCEVC enhancement data payload side data typeJames Almer2024-09-191-0/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: remove comment about avcodec_get_frame_class()Andrew Sayers2024-04-181-2/+1
| | | | | | The function was deprecated a while back and deleted last year. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add helper to remove side data of a given type from an arrayJames Almer2024-04-111-0/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add a flag to allow overwritting existing entriesJames Almer2024-04-111-8/+22
| | | | | | Enable it only for side data types that don't allow more than one entry. Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add helper for adding side data w/ AVBufferRef to arrayJames Almer2024-04-111-0/+24
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/frame: add side data descriptorsAnton Khirnov2024-03-271-0/+37
| | | | They allow exporting extended information about side data types.
* avutil/frame: clarify AV_FRAME_DATA_FILM_GRAIN_PARAMS usageNiklas Haas2024-03-231-0/+4
| | | | | To allow for AFGS1 usage, which can expose multiple parameter sets for a single frame.
* avutil/frame: Rename av_frame_side_data_get and add wrapper for itAndreas Rheinhardt2024-03-221-2/+17
| | | | | | | | | | | | | | | | | | | av_frame_side_data_get() has a const AVFrameSideData * const *sd parameter; so calling it with an AVFramesSideData **sd like AVCodecContext.decoded_side_data (or with a AVFramesSideData * const *sd) is safe, but the conversion is not performed automatically in C. All users of this function therefore resort to a cast. This commit changes this: av_frame_side_data_get() is renamed to av_frame_side_data_get_c(); furthermore, a static inline wrapper for it name av_frame_side_data_get() is added that accepts an AVFramesSideData * const * and converts this to const AVFramesSideData * const * in a Wcast-qual safe way. This also allows to remove the casts from the current users. Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: Constify av_frame_side_data_get()Andreas Rheinhardt2024-03-221-1/+1
| | | | | Reviewed-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/frame: add helper for getting side data from arrayJan Ekström2024-03-201-0/+14
|
* avutil/frame: add helper for adding existing side data to arrayJan Ekström2024-03-201-0/+20
|
* avutil/frame: add helper for adding side data to arrayJan Ekström2024-03-201-0/+22
| | | | | Additionally, add an API test to check that the no-duplicates addition works after duplicates have been inserted.
* avutil/frame: add helper for freeing arrays of side dataJan Ekström2024-03-201-0/+11
|
* avutil: remove deprecated FF_API_FRAME_PICTURE_NUMBERJames Almer2024-03-071-13/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_REORDERED_OPAQUEJames Almer2024-03-071-15/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_PKT_DURATIONJames Almer2024-03-071-13/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: remove deprecated FF_API_OLD_CHANNEL_LAYOUTJames Almer2024-03-071-20/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu: add video_hint APIElias Carotti2023-08-081-0/+10
| | | | | | | Add side data type to provide hint to the video encoders about unchanged portions of each frame. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avutil/frame: add av_frame_replaceJames Almer2023-05-181-0/+13
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: deprecate palette_has_changedJames Almer2023-05-181-0/+3
| | | | | | | | Not only this is information that relies on the concept of a sequence of frames, which is completely out of place as a field in AVFrame, but there are no known or intended uses of this field. Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/frame: extend AVFrame.repeat_pict documentationAnton Khirnov2023-05-151-2/+16
|
* avutil/frame: deprecate key_frameJames Almer2023-05-041-0/+5
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add a keyframe flag to AVFrameJames Almer2023-05-041-0/+4
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: deprecate interlaced_frame and top_field_firstJames Almer2023-05-041-0/+8
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/frame: add new interlaced and top_field_first flagsJames Almer2023-05-041-0/+9
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil: make av_frame_get_plane_buffer accept a const AVFrame*Niklas Haas2023-04-141-1/+1
| | | | Signed-off-by: Niklas Haas <git@haasn.dev>
* lavu/frame: deprecate AVFrame.pkt_{pos,size}Anton Khirnov2023-03-201-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fields are supposed to store information about the packet the frame was decoded from, specifically the byte offset it was stored at and its size. However, - the fields are highly ad-hoc - there is no strong reason why specifically those (and not any other) packet properties should have a dedicated field in AVFrame; unlike e.g. the timestamps, there is no fundamental link between coded packet offset/size and decoded frames - they only make sense for frames produced by decoding demuxed packets, and even then it is not always the case that the encoded data was stored in the file as a contiguous sequence of bytes (in order for pos to be well-defined) - pkt_pos was added without much explanation, apparently to allow passthrough of this information through lavfi in order to handle byte seeking in ffplay. That is now implemented using arbitrary user data passthrough in AVFrame.opaque_ref. - several filters use pkt_pos as a variable available to user-supplied expressions, but there seems to be no established motivation for using them. - pkt_size was added for use in ffprobe, but that too is now handled without using this field. Additonally, the values of this field produced by libavcodec are flawed, as described in the previous ffprobe conversion commit. In summary - these fields are ill-defined and insufficiently motivated, so deprecate them.
* lavu/frame: improve AVFrame.opaque[_ref] documentationAnton Khirnov2023-03-101-7/+23
| | | | | Make them match each other, mention interaction with AV_CODEC_FLAG_COPY_OPAQUE.
* avutil/frame: deprecate AVFrame.coded_picture_number and display_picture_numberMarton Balint2023-02-131-0/+4
| | | | | | | | Their usefulness is questionable, very few decoders set them, and their type should have been int64_t. A replacement field can be added later if a valid use case is found. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil: remove FF_API_COLORSPACE_NAMEJames Almer2023-02-091-9/+0
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavu/frame: deprecate reordered_opaqueAnton Khirnov2023-02-041-0/+5
| | | | | It is only used in libavcodec, where it's been superseded by AV_CODEC_CAP_COPY_OPAQUE.
* avutil: introduce AVAmbientViewingEnvironment side dataJan Ekström2023-01-131-0/+5
| | | | | This enables exposing H.274 Ambient Viewing Environment metadata in the framework.
* avutil/frame: Add doxy for missing argumentMarvin Scholz2022-10-171-0/+1
|
* lavu/frame: allow calling av_frame_make_writable() on non-refcounted framesAnton Khirnov2022-08-021-1/+2
| | | | | This is an easy way to make a refcounted frame from a non-refcounted one.
* lavu/frame: add a duration field to AVFrameAnton Khirnov2022-07-191-0/+10
| | | | | | | | | The only duration field currently present in AVFrame is pkt_duration, which is semantically restricted to those frames that are output by decoders. Add a new field that stores the frame's duration without regard for how that frame was produced. Deprecate pkt_duration.