mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '4de220d2e3751c459f8739a08ac6ca52e63eba30'
* 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>
This commit is contained in:
commit
7aa6b8a68f
@ -15,6 +15,10 @@ libavutil: 2015-08-28
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2017-09-27 - xxxxxxx - lavu 55.77.101 / lavu 55.31.1 - frame.h
|
||||
Allow passing the value of 0 (meaning "automatic") as the required alignment
|
||||
to av_frame_get_buffer().
|
||||
|
||||
2017-09-27 - xxxxxxx - lavu 55.77.100 / lavu 55.31.0 - cpu.h
|
||||
Add av_cpu_max_align() for querying maximum required data alignment.
|
||||
|
||||
|
@ -181,6 +181,9 @@ static int get_video_buffer(AVFrame *frame, int align)
|
||||
return ret;
|
||||
|
||||
if (!frame->linesize[0]) {
|
||||
if (align <= 0)
|
||||
align = 32; /* STRIDE_ALIGN. Should be av_cpu_max_align() */
|
||||
|
||||
for(i=1; i<=align; i+=i) {
|
||||
ret = av_image_fill_linesizes(frame->linesize, frame->format,
|
||||
FFALIGN(frame->width, i));
|
||||
|
@ -681,7 +681,9 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src);
|
||||
* cases.
|
||||
*
|
||||
* @param frame frame in which to store the new buffers.
|
||||
* @param align required buffer size alignment
|
||||
* @param align Required buffer size alignment. If equal to 0, alignment will be
|
||||
* chosen automatically for the current CPU. It is highly
|
||||
* recommended to pass 0 here unless you know what you are doing.
|
||||
*
|
||||
* @return 0 on success, a negative AVERROR on error.
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 55
|
||||
#define LIBAVUTIL_VERSION_MINOR 77
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
#define LIBAVUTIL_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
LIBAVUTIL_VERSION_MINOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user