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
1515
1616 API changes, most recent first:
1717
18+2017-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+
1822 2017-09-27 - xxxxxxx - lavu 55.77.100 / lavu 55.31.0 - cpu.h
1923 Add av_cpu_max_align() for querying maximum required data alignment.
2024
libavutil/frame.c+3−0
@@ -181,6 +181,9 @@ static int get_video_buffer(AVFrame *frame, int align) · 180 unmodified lines
181181 return ret;
182182
183183 if (!frame->linesize[0]) {
184+ if (align <= 0)
185+ align = 32; /* STRIDE_ALIGN. Should be av_cpu_max_align() */
186+
184187 for(i=1; i<=align; i+=i) {
185188 ret = av_image_fill_linesizes(frame->linesize, frame->format,
186189 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
681681 * cases.
682682 *
683683 * @param frame frame in which to store the new buffers.
684− * @param align required buffer size alignment
684+ * @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.
685687 *
686688 * @return 0 on success, a negative AVERROR on error.
687689 */
libavutil/version.h+1−1
@@ -81,7 +81,7 @@ · 80 unmodified lines
8181
8282 #define LIBAVUTIL_VERSION_MAJOR 55
8383 #define LIBAVUTIL_VERSION_MINOR 77
84−#define LIBAVUTIL_VERSION_MICRO 100
84+#define LIBAVUTIL_VERSION_MICRO 101
8585
8686 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
8787 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