* commit '7e350379f87e7f74420b4813170fe808e2313911': lavfi: switch to AVFrame. Conflicts: doc/filters.texi libavfilter/af_ashowinfo.c libavfilter/audio.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersink.c libavfilter/buffersrc.c libavfilter/buffersrc.h libavfilter/f_select.c libavfilter/f_setpts.c libavfilter/fifo.c libavfilter/split.c libavfilter/src_movie.c libavfilter/version.h libavfilter/vf_aspect.c libavfilter/vf_bbox.c libavfilter/vf_blackframe.c libavfilter/vf_delogo.c libavfilter/vf_drawbox.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_fieldorder.c libavfilter/vf_fps.c libavfilter/vf_frei0r.c libavfilter/vf_gradfun.c libavfilter/vf_hqdn3d.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_showinfo.c libavfilter/vf_transpose.c libavfilter/vf_vflip.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavfilter/yadif.h Following are notes about the merge authorship and various technical details. Michael Niedermayer: * Main merge operation, notably avfilter.c and video.c * Switch to AVFrame: - afade - anullsrc - apad - aresample - blackframe - deshake - idet - il - mandelbrot - mptestsrc - noise - setfield - smartblur - tinterlace * various merge changes and fixes in: - ashowinfo - blackdetect - field - fps - select - testsrc - yadif Nicolas George: * Switch to AVFrame: - make rawdec work with refcounted frames. Adapted from commit 759001c534287a96dc96d1e274665feb7059145d by Anton Khirnov. Also, fix the use of || instead of | in a flags check. - make buffer sink and src, audio and video work all together Clément Bœsch: * Switch to AVFrame: - aevalsrc - alphaextract - blend - cellauto - colormatrix - concat - earwax - ebur128 - edgedetect - geq - histeq - histogram - hue - kerndeint - life - movie - mp (with the help of Michael) - overlay - pad - pan - pp - pp - removelogo - sendcmd - showspectrum - showwaves - silencedetect - stereo3d - subtitles - super2xsai - swapuv - thumbnail - tile Hendrik Leppkes: * Switch to AVFrame: - aconvert - amerge - asetnsamples - atempo - biquads Matthieu Bouron: * Switch to AVFrame - alphamerge - decimate - volumedetect Stefano Sabatini: * Switch to AVFrame: - astreamsync - flite - framestep Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Clément Bœsch <ubitux@gmail.com> Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com> Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
Showing the changes to libavfilter/bufferqueue.h (1 of 124 files). Show all
Unified · Split
| @@ -23,7 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | #define AVFILTER_BUFFERQUEUE_H |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | − * FFBufQueue: simple AVFilterBufferRef queue API | |
| 26 | + * FFBufQueue: simple AVFrame queue API | |
| 27 | 27 | * |
| 28 | 28 | * Note: this API is not thread-safe. Concurrent access to the same queue |
| 29 | 29 | * must be protected by a mutex or any synchronization mechanism. |
| @@ -47,7 +47,7 @@ · 17 unmodified lines | ||
| 47 | 47 | * Structure holding the queue |
| 48 | 48 | */ |
| 49 | 49 | struct FFBufQueue { |
| 50 | − AVFilterBufferRef *queue[FF_BUFQUEUE_SIZE]; | |
| 50 | + AVFrame *queue[FF_BUFQUEUE_SIZE]; | |
| 51 | 51 | unsigned short head; |
| 52 | 52 | unsigned short available; /**< number of available buffers */ |
| 53 | 53 | }; |
| @@ -69,11 +69,11 @@ static inline int ff_bufqueue_is_full(struct FFBufQueue *queue) · 15 unmodified lines | ||
| 69 | 69 | * (and unrefed) with a warning before adding the new buffer. |
| 70 | 70 | */ |
| 71 | 71 | static inline void ff_bufqueue_add(void *log, struct FFBufQueue *queue, |
| 72 | − AVFilterBufferRef *buf) | |
| 72 | + AVFrame *buf) | |
| 73 | 73 | { |
| 74 | 74 | if (ff_bufqueue_is_full(queue)) { |
| 75 | 75 | av_log(log, AV_LOG_WARNING, "Buffer queue overflow, dropping.\n"); |
| 76 | − avfilter_unref_buffer(BUCKET(--queue->available)); | |
| 76 | + av_frame_free(&BUCKET(--queue->available)); | |
| 77 | 77 | } |
| 78 | 78 | BUCKET(queue->available++) = buf; |
| 79 | 79 | } |
| @@ -84,8 +84,8 @@ static inline void ff_bufqueue_add(void *log, struct FFBufQueue *queue, · 4 unmodified lines | ||
| 84 | 84 | * Buffer with index 0 is the first buffer in the queue. |
| 85 | 85 | * Return NULL if the queue has not enough buffers. |
| 86 | 86 | */ |
| 87 | −static inline AVFilterBufferRef *ff_bufqueue_peek(struct FFBufQueue *queue, | |
| 88 | − unsigned index) | |
| 87 | +static inline AVFrame *ff_bufqueue_peek(struct FFBufQueue *queue, | |
| 88 | + unsigned index) | |
| 89 | 89 | { |
| 90 | 90 | return index < queue->available ? BUCKET(index) : NULL; |
| 91 | 91 | } |
| @@ -95,9 +95,9 @@ static inline AVFilterBufferRef *ff_bufqueue_peek(struct FFBufQueue *queue, · 3 unmodified lines | ||
| 95 | 95 | * |
| 96 | 96 | * Do not use on an empty queue. |
| 97 | 97 | */ |
| 98 | −static inline AVFilterBufferRef *ff_bufqueue_get(struct FFBufQueue *queue) | |
| 98 | +static inline AVFrame *ff_bufqueue_get(struct FFBufQueue *queue) | |
| 99 | 99 | { |
| 100 | − AVFilterBufferRef *ret = queue->queue[queue->head]; | |
| 100 | + AVFrame *ret = queue->queue[queue->head]; | |
| 101 | 101 | av_assert0(queue->available); |
| 102 | 102 | queue->available--; |
| 103 | 103 | queue->queue[queue->head] = NULL; |
| @@ -110,8 +110,10 @@ static inline AVFilterBufferRef *ff_bufqueue_get(struct FFBufQueue *queue) · 6 unmodified lines | ||
| 110 | 110 | */ |
| 111 | 111 | static inline void ff_bufqueue_discard_all(struct FFBufQueue *queue) |
| 112 | 112 | { |
| 113 | − while (queue->available) | |
| 114 | − avfilter_unref_buffer(ff_bufqueue_get(queue)); | |
| 113 | + while (queue->available) { | |
| 114 | + AVFrame *buf = ff_bufqueue_get(queue); | |
| 115 | + av_frame_free(&buf); | |
| 116 | + } | |
| 115 | 117 | } |
| 116 | 118 | |
| 117 | 119 | #undef BUCKET |