History

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

James Almer committed 9 years ago

Commit 7aa6b8a2 parents 24ee1b8 4de220d4 files · +11 −2Browse files

Unified · Split

4 files
  1. doc/APIchanges +4 −0
  2. libavutil/frame.c +3 −0
  3. libavutil/frame.h +3 −1
  4. libavutil/version.h +1 −1
doc/APIchanges+4−0
@@ -15,6 +15,10 @@ libavutil: 2015-08-28 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182017-09-27 - xxxxxxx - lavu 55.77.101 / lavu 55.31.1 - frame.h
19 Allow passing the value of 0 (meaning "automatic") as the required alignment
20 to av_frame_get_buffer().
21
182017-09-27 - xxxxxxx - lavu 55.77.100 / lavu 55.31.0 - cpu.h222017-09-27 - xxxxxxx - lavu 55.77.100 / lavu 55.31.0 - cpu.h
19 Add av_cpu_max_align() for querying maximum required data alignment.23 Add av_cpu_max_align() for querying maximum required data alignment.
20 24
libavutil/frame.c+3−0
@@ -181,6 +181,9 @@ static int get_video_buffer(AVFrame *frame, int align) · 180 unmodified lines
181 return ret;181 return ret;
182 182
183 if (!frame->linesize[0]) {183 if (!frame->linesize[0]) {
184 if (align <= 0)
185 align = 32; /* STRIDE_ALIGN. Should be av_cpu_max_align() */
186
184 for(i=1; i<=align; i+=i) {187 for(i=1; i<=align; i+=i) {
185 ret = av_image_fill_linesizes(frame->linesize, frame->format,188 ret = av_image_fill_linesizes(frame->linesize, frame->format,
186 FFALIGN(frame->width, i));189 FFALIGN(frame->width, i));
libavutil/frame.h+3−1
@@ -681,7 +681,9 @@ void av_frame_move_ref(AVFrame *dst, AVFrame *src); · 680 unmodified lines
681 * cases.681 * cases.
682 *682 *
683 * @param frame frame in which to store the new buffers.683 * @param frame frame in which to store the new buffers.
684 * @param align required buffer size alignment684 * @param align Required buffer size alignment. If equal to 0, alignment will be
685 * chosen automatically for the current CPU. It is highly
686 * recommended to pass 0 here unless you know what you are doing.
685 *687 *
686 * @return 0 on success, a negative AVERROR on error.688 * @return 0 on success, a negative AVERROR on error.
687 */689 */
libavutil/version.h+1−1
@@ -81,7 +81,7 @@ · 80 unmodified lines
81 81
82#define LIBAVUTIL_VERSION_MAJOR 5582#define LIBAVUTIL_VERSION_MAJOR 55
83#define LIBAVUTIL_VERSION_MINOR 7783#define LIBAVUTIL_VERSION_MINOR 77
84#define LIBAVUTIL_VERSION_MICRO 10084#define LIBAVUTIL_VERSION_MICRO 101
85 85
86#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \86#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
87 LIBAVUTIL_VERSION_MINOR, \87 LIBAVUTIL_VERSION_MINOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t