summaryrefslogtreecommitdiff
path: root/libavutil/frame.c
Commit message (Collapse)AuthorAge
* Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'James Almer2017-05-08
|\ | | | | | | | | | | | | * commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3': frame: add a cropping rectangle to AVFrame Merged-by: James Almer <jamrial@gmail.com>
| * frame: add a cropping rectangle to AVFrameAnton Khirnov2017-01-12
| | | | | | | | | | Extend the width/height doxy to clarify that it should store coded values.
* | lavu: add support for Content Light Level side metadataSteve Lhomme2017-04-06
| | | | | | | | | | | | As found in HEVC. Signed-off-by: James Almer <jamrial@gmail.com>
* | Revert "avutil/frame: Disallow zero sized frame side data"Michael Niedermayer2017-03-03
| | | | | | | | | | | | | | | | | | Found a case where we use size==0, the other related commits remain needed, and should be sufficient to fix the original issue This reverts commit 7e4f32f4e4b93c95dcc872cb844c5548e69f352e. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/frame: Disallow zero sized frame side dataMichael Niedermayer2017-02-25
| | | | | | | | | | | | | | There should be no case that needs this and its a potential for creating corner cases Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/frame: Reimplement av_frame_new_side_data() without size=0 special caseMichael Niedermayer2017-02-25
| | | | | | | | | | | | | | | | | | | | | | | | The size 0 special case causes side data to be created which is different and a special case if for any reasons size = 0 is passed Fixes: multiple runtime error: null pointer passed as argument 1, which is declared to never be null Fixes: 653/clusterfuzz-testcase-5773837415219200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | AVFrame: add an opaque_ref fieldwm42017-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an extended version of the AVFrame.opaque field, which can be used to attach arbitrary user information to an AVFrame. The usefulness of the opaque field is rather limited, because it can store only up to 32 bits of information (or 64 bit on 64 bit systems). It's not possible to set this field to a memory allocation, because there is no way to deallocate it correctly. The opaque_ref field circumvents this by letting the user set an AVBuffer, which makes the user data refcounted. Signed-off-by: Anton Khirnov <anton@khirnov.net> Merges Libav commit 04f3bd349651.
* | avutil/frame: fix av_frame_copy for unknown layoutsMarton Balint2017-01-31
| | | | | | | | | | | | | | | | | | I wonder how unknown layouts ever worked without this? Reviewed-by: Nicolas George <george@nsup.org> Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avutil/frame: fix indention after last commitMichael Niedermayer2016-11-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/frame: Copy size=0 side data in ff_init_buffer_info()Michael Niedermayer2016-11-16
| | | | | | | | | | | | | | | | Fixes null pointer dereference Fixes: 189/FOO Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '32c8359093d1ff4f45ed19518b449b3ac3769d27'Hendrik Leppkes2016-10-07
|\| | | | | | | | | | | | | * commit '32c8359093d1ff4f45ed19518b449b3ac3769d27': lavc: export the timestamps when decoding in AVFrame.pts Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: export the timestamps when decoding in AVFrame.ptsAnton Khirnov2016-06-21
| | | | | | | | | | | | | | | | | | | | | | Currently it's exported as AVFrame.pkt_pts, which is also the only use for that field. The reason it is done like this is that lavc used to export various codec-specific "timing" information in AVFrame.pts, which is not done anymore. Since it is confusing to the callers to have a separate field which is used only for decoder timestamps and nothing else, deprecate pkt_pts and use just AVFrame.pts everywhere.
* | avutil/frame: Add a flag to discard frame after decode.Sasi Inguva2016-09-19
| | | | | | | | | | Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil/frame: access avframe fields directly in get_frame_defaults()James Almer2016-07-25
| | | | | | | | | | | | | | The accessors are needed only from outside libavutil. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* | avutil/frame: Assert that width/height/channels is 0 for the destination of ↵Michael Niedermayer2016-06-05
| | | | | | | | | | | | av_frame*_ref() This should detect caes where these functions are called in unclean destinations
* | Merge commit '29c2d06d67724e994980045afa055c6c34611b30'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit '29c2d06d67724e994980045afa055c6c34611b30': cosmetics: Drop empty comment lines Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
| |
* | Merge commit '89923e418b494e337683442ab896d754bc07341a'Derek Buitenhuis2016-02-17
|\| | | | | | | | | | | | | * commit '89923e418b494e337683442ab896d754bc07341a': lavu: add a framework for handling hwaccel frames Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavu: add a framework for handling hwaccel framesAnton Khirnov2016-02-14
| |
| * lavu: add AV_CEIL_RSHIFT and use it in various placesClément Bœsch2016-01-11
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avutil/frame: Free destination qp_table_buf in frame_copy_props()Michael Niedermayer2016-02-13
| | | | | | | | | | | | | | Fixes memleak Fixes: Ticket4899 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil: Add GOP timecode frame side dataDerek Buitenhuis2016-02-01
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-27
| | | | | | | | | | | | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Add missing conversions from side data enum to nameNeil Birkbeck2016-01-22
| | | | | | | | | | | | | | Add names for recently added enums to av_frame_side_data_name. Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavu/frame: use AVPALETTE_SIZE instead of 1024Clément Bœsch2015-12-08
| |
* | Merge commit '1aa24df74c052a73175c43e57d35b4835e537ec8'Hendrik Leppkes2015-10-03
|\| | | | | | | | | | | | | * commit '1aa24df74c052a73175c43e57d35b4835e537ec8': lavu: Deprecate AVFrame.error[] Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavu: Deprecate AVFrame.error[]Vittorio Giovara2015-09-30
| | | | | | | | | | | | | | | | | | | | | | These field are difficult to interpret, and are provided by a single encoder (mpegvideoenc). In general they do not belong to a structure containing raw data only, so remove them from AVFrame. Mpegvideoenc now uses a private field in Picture for its internal computations. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavu/frame: put frame QP elements under a new version guardHendrik Leppkes2015-09-05
| | | | | | | | These fields are still used, removal postponed until a replacement functionality is available.
* | Merge commit '8f12ef9860d0e164e4647fd5d5cebdb3cfb34a79'Hendrik Leppkes2015-09-05
|\| | | | | | | | | | | | | * commit '8f12ef9860d0e164e4647fd5d5cebdb3cfb34a79': lavu: Drop deprecated duplicated AVFrame/AVCodecContext parameters Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | disable deprecation warnings in deprecated codeAndreas Cadhalpun2015-08-22
| | | | | | | | | | Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avutil/frame: fix crash with av_frame_unref(NULL)Michael Niedermayer2015-07-13
| | | | | | | | | | | | | | Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 2097152 alloc limit Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avutil: make AVFrameSideData buffers ref-counted.Ronald S. Bultje2015-03-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavu/frame: move av_frame_copy_props() up in the file.Ronald S. Bultje2015-03-25
| | | | | | | | | | | | Preparation for following patch. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'Michael Niedermayer2014-12-19
|\| | | | | | | | | | | | | | | | | | | | | * commit '5d839778b9f3edb682b7f71dde4f80f07c75b098': lavu: Refactor side data wiping Conflicts: libavutil/frame.c See: a400edbb6d00c0211de38e4f1b4f593681db91d8 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: Refactor side data wipingLuca Barbato2014-12-18
| | | | | | | | | | | | | | | | And make sure the nb_side_data field is reset as well. Based on an initial patch from wm4 <nfxjfg@googlemail.com>. CC: libav-stable@libav.org
| * frame: Remove some FF_API_AVFRAME_COLORSPACE leftoversDiego Biurrun2014-08-14
| |
* | lavu/frame: fix malloc error path in av_frame_copy_props()wm42014-12-15
| | | | | | | | | | | | | | The error path frees all side data, but forgets to reset the side data count. This can blow up later in av_frame_unref() and free_side_data(). Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add missing "const" all over the place.Reimar Döffinger2014-08-29
| | | | | | | | | | | | Only "./configure --enable-gpl" on x86 was tested. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avcodec: export motion vectors in frame side data on demandClément Bœsch2014-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reasoning behind this addition is that various third party applications are interested in getting some motion information out of a video "for free" when it is available. It was considered to export other information as well (such as the intra information about the block, or the quantization) but the structure might have ended up into a half full-generic, half full of codec specific cruft. If more information is necessary, it should either be added in the "flags" field of the AVMotionVector structure, or in another side-data. This commit also includes an example exporting them in a CSV stream.
* | Remove panscan information in av_frame_copy_props() if resolution changes.Carl Eugen Hoyos2014-08-10
| | | | | | | | Fixes ticket #3750.
* | Merge commit '472f9ed312ec784f7c72876b77163f4741880d05'Michael Niedermayer2014-08-10
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '472f9ed312ec784f7c72876b77163f4741880d05': Remove obsolete FF_API_AVFRAME_COLORSPACE cruft. Conflicts: libavcodec/utils.c libavutil/frame.h libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.Anton Khirnov2014-08-09
| |
* | avutil/frame: add av_frame_side_data_name()Michael Niedermayer2014-07-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '44671b57866aab8dd36715ff010e985e25baaf19'Michael Niedermayer2014-06-18
|\| | | | | | | | | | | | | * commit '44671b57866aab8dd36715ff010e985e25baaf19': AVFrame: factor out freeing the side data Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * AVFrame: factor out freeing the side dataRoman Savchenko2014-06-18
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'Michael Niedermayer2014-06-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '8c02adc62d71dfbb079a04753d8c16152c49de88': lavu: add all color-related enums to AVFrame Conflicts: libavcodec/avcodec.h libavutil/frame.c libavutil/frame.h libavutil/version.h The version check is changed so they are available with the current ABI FFmpeg libs should have no problems with added fields, nor should any application using the libs, and we regularly added fields in the past. We also moved 2 of these fields to AVFrame already previously without issues. See: a80e622924c89df69fb1c225ba432fe12fe6648e Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavu: add all color-related enums to AVFramewm42014-06-01
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avutil/frame: frame_copy_video: support copying from a smaller to a larger frameMichael Niedermayer2014-05-31
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a53551cba86bb67efcb6105fdc337a36c43132bd'Michael Niedermayer2014-05-29
|\| | | | | | | | | | | | | * commit 'a53551cba86bb67efcb6105fdc337a36c43132bd': frame: fix the error path in av_frame_copy_props() Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * frame: fix the error path in av_frame_copy_props()Roman Savchenko2014-05-29
| | | | | | | | | | | | First free metadata, then the side data it is contained in. Signed-off-by: Anton Khirnov <anton@khirnov.net>