Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-02lavu/frame: allow calling av_frame_make_writable() on non-refcounted framesAnton Khirnov
This is an easy way to make a refcounted frame from a non-refcounted one.
2022-07-19lavu/frame: add a duration field to AVFrameAnton Khirnov
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.
2022-06-05avutil/avframe: fix channel layout checks in av_frame_copy()James Almer
Normally, both the source and dest frame would have only the old API fields set, only the new API fields set, or both set. But in some cases, like when calling av_frame_ref() using a non reference counted source frame where only the old channel layout API fields were populated, the result would be the dst frame having both the new and old fields populated. This commit takes this into account and fixes the checks by calling av_channel_layout_compare() only if the source frame has the new API fields set, and doing sanity checks for the source frame old API fields if the new ones are not set. Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-15avframe: switch to the new channel layout APIAnton Khirnov
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-01avutil: support for CUVA Vivid HDR metadataLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-01-04lavu/frame: Add Dolby Vision metadata side data typeNiklas Haas
In order to be able to extend this struct later (as the Dolby Vision RPU evolves), all of the 'container' structs are considered extensible, and the individual constituent fields must instead be accessed via offsets. The precedent for this style of access is set in <libavutil/detection_bbox.h> Signed-off-by: Niklas Haas <git@haasn.dev> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-05avutil/frame: Treat frame as uninitialized in get_frame_defaults()Andreas Rheinhardt
Currently, it also tests whether extended_data points to something different than the AVFrame's data array and frees extended_data if it is different. Yet this is only necessary for one of its three callers, namely av_frame_unref(); meanwhile the other two callers took measures to avoid this (or rather, to make it to an av_free(NULL)). This commit moves this chunk to av_frame_unref() (so that get_frame_defaults() now treats its input as uninitialized) and removes the now superfluous code in the other two callers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-04lavu/avframe: add a time_base fieldLynne
This adds a time_base field to AVFrame, as an analogue to the AVPacket.time_base field.
2021-11-17avutil: Add Dolby Vision RPU side data typeDerek Buitenhuis
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2021-09-20Replace all occurences of av_mallocz_array() by av_calloc()Andreas Rheinhardt
They do the same. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22avcodec/avcodec: Don't include cpu.hAndreas Rheinhardt
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>
2021-04-27avutil/buffer: Switch AVBuffer API to size_tAndreas Rheinhardt
Announced in 14040a1d913794d9a3fd6406a6d8c2f0e37e0062. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPALAndreas Rheinhardt
Deprecated in d6fc031caf64eed921bbdef86d79d56bfc2633b0. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/frame: Remove deprecated getters and settersAndreas Rheinhardt
Deprecated in 7df37dd319f2d9d3e1becd5d433884e3ccfa1ee2. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/frame: Remove deprecated AVFrame.pkt_pts fieldAndreas Rheinhardt
Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/frame: Remove deprecated AVFrame.errorAndreas Rheinhardt
Deprecated in 1aa24df74c052a73175c43e57d35b4835e537ec8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27avutil/frame: Remove AVFrame QP table APIAndreas Rheinhardt
Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943; scheduled again for removal in a9915268327b097bba84a07f68968d8c07f4b549. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-17lavu: add side data AV_FRAME_DATA_DETECTION_BBOXES for object ↵Guo, Yejun
detection/classification
2021-04-05avutil/frame: Return 0 on success in av_frame_ref()Andreas Rheinhardt
av_frame_copy() is allowed to return values >= 0 on success, whereas the documentation of av_frame_ref() states that the return value is 0 on success. Ergo the latter must not just return the former's return value. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-03-24avutil/frame: Deprecate av_get_colorspace_name()Andreas Rheinhardt
Contrary to av_color_space_name() it doesn't even support newer colorspaces. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11avutil/frame: change av_frame_new_side_data() size parameter type to size_tJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-26libavutil: introduce AVFilmGrainParams side dataLynne
This patch introduces a new frame side data type AVFilmGrainParams for use with video codecs which support it. It can save a lot of memory used for duplicate processed reference frames and reduce copies when applying film grain during presentation.
2020-11-19avutil/frame: fix potential leaks in av_frame_ref()Gil Pedersen
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: James Almer <jamrial@gmail.com>
2020-11-19avutil/frame: use av_buffer_replace() to simplify codeGil Pedersen
Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Gil Pedersen <git@gpost.dk> Signed-off-by: James Almer <jamrial@gmail.com>
2020-07-22libavutil/frame: avoid UB when getting plane sizesBrian Kim
This uses av_image_fill_plane_sizes instead of av_image_fill_pointers when we are getting plane sizes to avoid UB from adding offsets to NULL. Signed-off-by: Brian Kim <bkkim@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-11avutil: add AV_FRAME_DATA_SEI_UNREGISTERED side data typeLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-05-22Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov
Use 0, which selects the alignment automatically.
2020-05-12libavutil: add API for exporting video frame quantizersJuan De León
This is intended to replace the deprecated the AV_FRAME_DATA_QP_TABLE* API and extend it to a wider range of codecs. In the future, it may also be extended to support other encoding parameters such as motion vectors. Additional changes by Anton Khirnov <anton@khirnov.net> with suggestions by Lynne <dev@lynne.ee>. Signed-off-by: Juan De León <juandl@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Anton Khirnov <anton@khirnov.net>
2020-03-28avutil/frame: make frame copy functions hwframe awareTimo Rothenpieler
2019-11-12avutil/frame: fix remove_side_dataZhao Zhili
remove_side_data is supposed to remove a single instance by design. Since new_side_data() doesn't forbid add multiple instances of the same type, remove_side_data should deal with that. Signed-off-by: Marton Balint <cus@passwd.hu>
2019-01-18avutil: add ROI (Region Of Interest) data struct and bump versionGuo, Yejun
The encoders such as libx264 support different QPs offset for different MBs, it makes possible for ROI-based encoding. It makes sense to add support within ffmpeg to generate/accept ROI infos and pass into encoders. Typical usage: After AVFrame is decoded, a ffmpeg filter or user's code generates ROI info for that frame, and the encoder finally does the ROI-based encoding. The ROI info is maintained as side data of AVFrame. Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2018-12-21Add HDR dynamic metadata struct (for SMPTE 2094-40) to libavutilMohammad Izadi
The dynamic metadata contains data for color volume transform - application 4 of SMPTE 2094-40:2016 standard. The data comes from HEVC in the SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2018-10-30lavu/frame: Add error report if av_image_fill_pointers fail.Jun Zhao
Add error handle if av_image_fill_pointers fail. Signed-off-by: Jun Zhao <mypopydev@gmail.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2018-10-23lavc/h264: create AVFrame side data from H.264 timecodesDevin Heitmueller
Create SMPTE ST 12-1 timecodes based on H.264 SEI picture timing info. For framerates > 30 FPS, the field flag is used in conjunction with pairs of frames which contain the same frame timestamp in S12M. Ensure the field is properly set per the spec.
2018-09-21lavu/frame: Add missing conversions from side data enum to nameJun Zhao
Add missing conversions from side data enum to name. Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-09-11Merge commit 'f89ec87afaf0d1abb6d450253b0b348fd554533b'James Almer
* commit 'f89ec87afaf0d1abb6d450253b0b348fd554533b': frame: Simplify the video allocation Merged-by: James Almer <jamrial@gmail.com> Padding-Remixed-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-05frame: Simplify the video allocationLuca Barbato
2018-06-06Use the same name for stereo3d frame/packet side dataVittorio Giovara
2018-04-03avutil/pixdesc: deprecate AV_PIX_FMT_FLAG_PSEUDOPALwm4
PSEUDOPAL pixel formats are not paletted, but carried a palette with the intention of allowing code to treat unpaletted formats as paletted. The palette simply mapped the byte values to the resulting RGB values, making it some sort of LUT for RGB conversion. It was used for 1 byte formats only: RGB4_BYTE, BGR4_BYTE, RGB8, BGR8, GRAY8. The first 4 are awfully obscure, used only by some ancient bitmap formats. The last one, GRAY8, is more common, but its treatment is grossly incorrect. It considers full range GRAY8 only, so GRAY8 coming from typical Y video planes was not mapped to the correct RGB values. This cannot be fixed, because AVFrame.color_range can be freely changed at runtime, and there is nothing to ensure the pseudo palette is updated. Also, nothing actually used the PSEUDOPAL palette data, except xwdenc (trivially changed in the previous commit). All other code had to treat it as a special case, just to ignore or to propagate palette data. In conclusion, this was just a very strange old mechnaism that has no real justification to exist anymore (although it may have been nice and useful in the past). Now it's an artifact that makes the API harder to use: API users who allocate their own pixel data have to be aware that they need to allocate the palette, or FFmpeg will crash on them in _some_ situations. On top of this, there was no API to allocate the pseuo palette outside of av_frame_get_buffer(). This patch not only deprecates AV_PIX_FMT_FLAG_PSEUDOPAL, but also makes the pseudo palette optional. Nothing accesses it anymore, though if it's set, it's propagated. It's still allocated and initialized for compatibility with API users that rely on this feature. But new API users do not need to allocate it. This was an explicit goal of this patch. Most changes replace AV_PIX_FMT_FLAG_PSEUDOPAL with FF_PSEUDOPAL. I first tried #ifdefing all code, but it was a mess. The FF_PSEUDOPAL macro reduces the mess, and still allows defining FF_API_PSEUDOPAL to 0. Passes FATE with FF_API_PSEUDOPAL enabled and disabled. In addition, FATE passes with FF_API_PSEUDOPAL set to 1, but with allocation functions manually changed to not allocating a palette.
2018-03-18lavu/frame: add QP side datawm4
This adds a way for an API user to transfer QP data and metadata without having to keep the reference to AVFrame, and without having to explicitly care about QP APIs. It might also provide a way to finally remove the deprecated QP related fields. In the end, the QP table should be handled in a very similar way to e.g. AV_FRAME_DATA_MOTION_VECTORS. There are two side data types, because I didn't care about having to repack the QP data so the table and the metadata are in a single AVBufferRef. Otherwise it would have either required a copy on decoding (extra slowdown for something as obscure as the QP data), or would have required making intrusive changes to the codecs which support export of this data. The new side data types are added under deprecation guards, because I don't intend to change the status of the QP export as being deprecated (as it was before this patch too).
2018-03-18lavu/frame: fix inconsistent qp_table_buf deprecationwm4
Everything related to the QP data is deprecated, with qp_table_buf being an inconsistent exception. Some parts were under the deprecation guards, some not. It probably didn't even compile.
2018-03-01frame: add an av_frame_new_side_data_from_buf functionRostislav Pehlivanov
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-11-10avutil/frame: Add private_ref to AVFrameMichael Niedermayer
This gives FFmpeg libs a field that they can freely and safely use. Avoiding the need of wrapping of a users opaque_ref field and its issues. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-29avutil/frame: deprecate getters and setters for AVFrame fieldsJames Almer
The fields can be accessed directly, so these are not needed anymore. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-23avutil/frame: remove unneccessary metadata pointer getterJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-28Merge commit '4de220d2e3751c459f8739a08ac6ca52e63eba30'James Almer
* commit '4de220d2e3751c459f8739a08ac6ca52e63eba30': frame: allow align=0 (meaning automatic) for av_frame_get_buffer() See https://ffmpeg.org/pipermail/ffmpeg-devel/2017-September/215834.html Merged-by: James Almer <jamrial@gmail.com>
2017-08-08lavc, lavu: move frame cropping to a convenience functionwm4
Signed-off-by: Anton Khirnov <anton@khirnov.net> Merged from Libav commit 47399ccdfd.
2017-07-27lavc, lavu: move frame cropping to a convenience functionwm4
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2017-07-26avutil/frame: add ICC Profile to av_frame_side_data_nameJames Almer
Reviwed-by: Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2017-05-08Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'James Almer
* commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3': frame: add a cropping rectangle to AVFrame Merged-by: James Almer <jamrial@gmail.com>