Derek Buitenhuis
66e9d2f44e
avutil: Add GOP timecode frame side data
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Derek Buitenhuis
21f9468402
avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
...
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>
9 years ago
Neil Birkbeck
17399f6a9f
Add missing conversions from side data enum to name
...
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>
9 years ago
Clément Bœsch
e8bc642202
lavu: add AV_CEIL_RSHIFT and use it in various places
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Clément Bœsch
503d8bf74a
lavu/frame: use AVPALETTE_SIZE instead of 1024
9 years ago
Vittorio Giovara
1aa24df74c
lavu: Deprecate AVFrame.error[]
...
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>
9 years ago
Hendrik Leppkes
a991526832
lavu/frame: put frame QP elements under a new version guard
...
These fields are still used, removal postponed until a replacement functionality is available.
9 years ago
Andreas Cadhalpun
095347ffe4
disable deprecation warnings in deprecated code
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Michael Niedermayer
feb6a94f74
avutil/frame: fix crash with av_frame_unref(NULL)
...
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>
10 years ago
Ronald S. Bultje
589a6042ea
avutil: make AVFrameSideData buffers ref-counted.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
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>
10 years ago
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
10 years ago
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>
10 years ago
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>
10 years ago
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.
11 years ago
Diego Biurrun
e070d0a5ca
frame: Remove some FF_API_AVFRAME_COLORSPACE leftovers
11 years ago
Carl Eugen Hoyos
788cf6f0c6
Remove panscan information in av_frame_copy_props() if resolution changes.
...
Fixes ticket #3750 .
11 years ago
Anton Khirnov
472f9ed312
Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.
11 years ago
Michael Niedermayer
ba3e3311ef
avutil/frame: add av_frame_side_data_name()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Roman Savchenko
44671b5786
AVFrame: factor out freeing the side data
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
wm4
8c02adc62d
lavu: add all color-related enums to AVFrame
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
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>
11 years ago
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>
11 years ago
Michael Niedermayer
4615ff0d61
avutil/frame: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
d161ae0a37
frame: add a function for removing side data from a frame
11 years ago
Michael Niedermayer
74bb1ca82c
avutil/frame_copy_audio: also check that channels match
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
1155fd02ae
frame: add a convenience function for copying AVFrame data
11 years ago
Michael Niedermayer
833501657b
avutil/frame: increase padding for frames
...
This matches what avcodec uses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
df7aba52b5
frame: cosmetics, reindent
11 years ago
Anton Khirnov
c342132fa8
frame: copy flags in av_frame_copy_props()
...
Flags can be considered metadata (at least those that are defined now).
11 years ago
Michael Niedermayer
60b099c371
get_audio_buffer: fix usage where channels are not set but layout is
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
529a9893d7
avframe: mark source frame const in _ref and _clone
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years ago
Michael Niedermayer
1225b67fc9
avutil/frame: suppress "comparison of unsigned expression < 0 is always false" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9c8aeacf82
avutil: add av_get_colorspace_name()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
12 years ago
Reimar Döffinger
a48979d715
Reduce MAKE_ACCESSORS code duplication via a new header.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Michael Niedermayer
60ae776d04
av_frame_copy_props: fix unintended self assignment
...
Fixes CID1061052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Vittorio Giovara
3c8bff0740
avframe: have av_frame_get_side_data take const AVFrame*
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
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>
12 years ago
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>
12 years ago
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>
12 years ago
Xidorn Quan
5a65fea655
avutil/frame: continue to process bufs even if some are empty
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
12 years ago
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
12 years ago
Hendrik Leppkes
1e8b9738fa
avutil/frame: add all remaining frame properties to av_frame_copy_props
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Nicolas George
a964d6a8a2
lavu/frame: use channels rather than channel_layout.
12 years ago
Michael Niedermayer
f566ac48ce
avutil/frame: fix video buffer allocation
...
The padding was lost during porting from avcodec
Should fix out of array accesses
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
caff888183
avutil/frame: add AVBufferRef for qp table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Hendrik Leppkes
febd78e904
lavu/frame: free frame metadata when unrefing a frame.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Hendrik Leppkes
e4c5e08f60
lavu/frame: av_frame_make_writable: set the channels on the new frame.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago