Ronald S. Bultje
589a6042ea
avutil: make AVFrameSideData buffers ref-counted.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-25 12:04:00 +01:00
Ronald S. Bultje
b8e36690e8
lavu/frame: move av_frame_copy_props() up in the file.
...
Preparation for following patch.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-25 12:03:53 +01:00
Michael Niedermayer
bce06eb059
Merge commit '5d839778b9f3edb682b7f71dde4f80f07c75b098'
...
* commit '5d839778b9f3edb682b7f71dde4f80f07c75b098':
lavu: Refactor side data wiping
Conflicts:
libavutil/frame.c
See: a400edbb6d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 03:57:59 +01:00
Luca Barbato
5d839778b9
lavu: Refactor side data wiping
...
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
2014-12-18 23:22:59 +01:00
wm4
a400edbb6d
lavu/frame: fix malloc error path in av_frame_copy_props()
...
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>
2014-12-15 04:46:30 +01:00
Reimar Döffinger
d9e2aceb7f
Add missing "const" all over the place.
...
Only "./configure --enable-gpl" on x86 was tested.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2014-08-29 18:57:25 +02:00
Clément Bœsch
b0352b1997
avcodec: export motion vectors in frame side data on demand
...
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.
2014-08-18 14:13:57 +02:00
Diego Biurrun
e070d0a5ca
frame: Remove some FF_API_AVFRAME_COLORSPACE leftovers
2014-08-14 00:44:47 -07:00
Carl Eugen Hoyos
788cf6f0c6
Remove panscan information in av_frame_copy_props() if resolution changes.
...
Fixes ticket #3750 .
2014-08-10 22:31:33 +02:00
Michael Niedermayer
287602f9d8
Merge commit '472f9ed312ec784f7c72876b77163f4741880d05'
...
* 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>
2014-08-10 01:29:24 +02:00
Anton Khirnov
472f9ed312
Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.
2014-08-09 16:59:13 +00:00
Michael Niedermayer
ba3e3311ef
avutil/frame: add av_frame_side_data_name()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-30 19:19:22 +02:00
Michael Niedermayer
40c9d43086
Merge commit '44671b57866aab8dd36715ff010e985e25baaf19'
...
* commit '44671b57866aab8dd36715ff010e985e25baaf19':
AVFrame: factor out freeing the side data
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 12:53:42 +02:00
Roman Savchenko
44671b5786
AVFrame: factor out freeing the side data
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-18 08:11:05 +02:00
Michael Niedermayer
6e8e9f1e51
Merge commit '8c02adc62d71dfbb079a04753d8c16152c49de88'
...
* 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: a80e622924
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-01 13:18:32 +02:00
wm4
8c02adc62d
lavu: add all color-related enums to AVFrame
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-06-01 08:22:02 +02:00
Michael Niedermayer
879aa062f9
avutil/frame: frame_copy_video: support copying from a smaller to a larger frame
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-31 17:16:44 +02:00
Michael Niedermayer
d9c4f61dab
Merge commit 'a53551cba86bb67efcb6105fdc337a36c43132bd'
...
* commit 'a53551cba86bb67efcb6105fdc337a36c43132bd':
frame: fix the error path in av_frame_copy_props()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 12:35:02 +02:00
Roman Savchenko
a53551cba8
frame: fix the error path in av_frame_copy_props()
...
First free metadata, then the side data it is contained in.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-05-29 07:59:56 +02:00
Michael Niedermayer
4615ff0d61
avutil/frame: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 13:51:48 +02:00
Michael Niedermayer
3e1f24131a
Merge commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5'
...
* commit 'd161ae0a37900cbd36c1390ca32a56b892c02ab5':
frame: add a function for removing side data from a frame
Conflicts:
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 14:51:44 +01:00
Anton Khirnov
d161ae0a37
frame: add a function for removing side data from a frame
2014-03-24 06:07:51 +01:00
Michael Niedermayer
74bb1ca82c
avutil/frame_copy_audio: also check that channels match
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 10:12:33 +01:00
Michael Niedermayer
fff5262301
Merge commit '1155fd02ae7bac215acab316e847c6bb25f74fc3'
...
* commit '1155fd02ae7bac215acab316e847c6bb25f74fc3':
frame: add a convenience function for copying AVFrame data
Conflicts:
doc/APIchanges
libavutil/frame.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-24 09:38:32 +01:00
Anton Khirnov
1155fd02ae
frame: add a convenience function for copying AVFrame data
2014-02-24 07:25:07 +01:00
Michael Niedermayer
833501657b
avutil/frame: increase padding for frames
...
This matches what avcodec uses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-28 19:10:45 +01:00
Michael Niedermayer
58f70f1701
Merge commit 'df7aba52b51007db50410abe15fe28391abd8757'
...
* commit 'df7aba52b51007db50410abe15fe28391abd8757':
frame: cosmetics, reindent
Conflicts:
libavutil/frame.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 18:16:35 +01:00
Michael Niedermayer
3f5f955c53
Merge commit 'c342132fa8a29692e28c98238e3a31da5c407e42'
...
* commit 'c342132fa8a29692e28c98238e3a31da5c407e42':
frame: copy flags in av_frame_copy_props()
Conflicts:
libavutil/frame.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 17:59:33 +01:00
Anton Khirnov
df7aba52b5
frame: cosmetics, reindent
2013-12-09 08:45:08 +01:00
Anton Khirnov
c342132fa8
frame: copy flags in av_frame_copy_props()
...
Flags can be considered metadata (at least those that are defined now).
2013-12-09 08:45:01 +01:00
Michael Niedermayer
60b099c371
get_audio_buffer: fix usage where channels are not set but layout is
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-27 10:52:26 +01:00
Michael Niedermayer
078dab551d
Merge commit '529a9893d769f381b72785c500662be2020da5fe'
...
* commit '529a9893d769f381b72785c500662be2020da5fe':
avframe: mark source frame const in _ref and _clone
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-28 10:28:47 +01:00
Vittorio Giovara
529a9893d7
avframe: mark source frame const in _ref and _clone
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-10-27 21:32:37 +01:00
Michael Niedermayer
1225b67fc9
avutil/frame: suppress "comparison of unsigned expression < 0 is always false" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:46:52 +02:00
Michael Niedermayer
9c8aeacf82
avutil: add av_get_colorspace_name()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:14:13 +02:00
Reimar Döffinger
d4db7c334b
Integrate accessors.h header into internal.h
...
I have no idea why I added a separate header,
I think there is no good reason for it.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-10 07:56:42 +02:00
Reimar Döffinger
a48979d715
Reduce MAKE_ACCESSORS code duplication via a new header.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-08 20:32:40 +02:00
Michael Niedermayer
60ae776d04
av_frame_copy_props: fix unintended self assignment
...
Fixes CID1061052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 17:27:07 +02:00
Michael Niedermayer
9408d990c4
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
avframe: have av_frame_get_side_data take const AVFrame*
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 13:59:50 +02:00
Vittorio Giovara
3c8bff0740
avframe: have av_frame_get_side_data take const AVFrame*
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-01 09:41:45 +02:00
Michael Niedermayer
a80e622924
avcodec/avutil: Add AVColorSpace and AVColorRange to AVFrames
...
This also moves AVColorSpace and AVColorRange from avcodec to avutil
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-17 01:15:31 +02:00
Michael Niedermayer
0a06e6e49b
av_frame_get_buffer: Do not fail when the channel layout is unknown
...
Fixes handling of cases with unknown layouts but known channel counts
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-13 21:09:20 +02:00
Michael Niedermayer
9626d0e906
avutil/frame: Try to align width to achive linesize[0] alignment
...
This results in more alignment for pixel formats that have "odd" pixel
sizes like RGB24. It makes access through SIMD easier
Works around Issue described in Ticket1031
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-18 16:50:07 +02:00
Xidorn Quan
5a65fea655
avutil/frame: continue to process bufs even if some are empty
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-20 23:34:15 +02:00
Michael Niedermayer
ff4680922f
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
Conflicts:
doc/APIchanges
libavcodec/avpicture.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/imgconvert.c
libavcodec/tiffenc.c
libavfilter/vf_pixdesctest.c
libavfilter/vf_scale.c
libavutil/imgutils.c
libavutil/pixdesc.c
libavutil/version.h
libswscale/swscale_internal.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-15 11:10:09 +02:00
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
2013-05-15 07:46:51 +02:00
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
2013-05-09 16:59:42 +02:00
Michael Niedermayer
6efe61486d
Merge commit '1e8b9738fa70e20967ddb542d2f9d5552fc51ec6'
...
* commit '1e8b9738fa70e20967ddb542d2f9d5552fc51ec6':
avutil/frame: add all remaining frame properties to av_frame_copy_props
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-23 12:08:01 +01:00
Hendrik Leppkes
1e8b9738fa
avutil/frame: add all remaining frame properties to av_frame_copy_props
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-22 20:05:37 +01:00
Nicolas George
a964d6a8a2
lavu/frame: use channels rather than channel_layout.
2013-03-20 13:35:24 +01:00