[FFmpeg-cvslog] avfilter/fifo: Remove unused functions and headers

Andreas Rheinhardt git at videolan.org
Fri Aug 21 13:25:34 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Aug 21 11:15:21 2020 +0200| [d4e29d9c5e19804b35f431329bd670c259b3fa35] | committer: Andreas Rheinhardt

avfilter/fifo: Remove unused functions and headers

The functions were forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2;
removing them also means that the avassert.h and samplefmt.h headers are
no longer used any more, so they have been removed, too.

Moreover, video.h is unused since b077d8d9082d057d4c7abd9e0b1a98f9651cfaa8
and channel_layout.h is since fdd9663781e3ebc8ebed0704607abd174095a905.
Both headers have therefore been removed, too.

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4e29d9c5e19804b35f431329bd670c259b3fa35
---

 libavfilter/fifo.c | 49 -------------------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index 70f4876a50..5b39e1afe7 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -23,16 +23,12 @@
  * FIFO buffering filter
  */
 
-#include "libavutil/avassert.h"
-#include "libavutil/channel_layout.h"
 #include "libavutil/common.h"
 #include "libavutil/mathematics.h"
-#include "libavutil/samplefmt.h"
 
 #include "audio.h"
 #include "avfilter.h"
 #include "internal.h"
-#include "video.h"
 
 typedef struct Buf {
     AVFrame *frame;
@@ -98,51 +94,6 @@ static void queue_pop(FifoContext *s)
     s->root.next = tmp;
 }
 
-/**
- * Move data pointers and pts offset samples forward.
- */
-static void buffer_offset(AVFilterLink *link, AVFrame *frame,
-                          int offset)
-{
-    int nb_channels = link->channels;
-    int planar = av_sample_fmt_is_planar(link->format);
-    int planes = planar ? nb_channels : 1;
-    int block_align = av_get_bytes_per_sample(link->format) * (planar ? 1 : nb_channels);
-    int i;
-
-    av_assert0(frame->nb_samples > offset);
-
-    for (i = 0; i < planes; i++)
-        frame->extended_data[i] += block_align * offset;
-    if (frame->data != frame->extended_data)
-        memcpy(frame->data, frame->extended_data,
-               FFMIN(planes, FF_ARRAY_ELEMS(frame->data)) * sizeof(*frame->data));
-    frame->linesize[0] -= block_align*offset;
-    frame->nb_samples -= offset;
-
-    if (frame->pts != AV_NOPTS_VALUE) {
-        frame->pts += av_rescale_q(offset, (AVRational){1, link->sample_rate},
-                                   link->time_base);
-    }
-}
-
-static int calc_ptr_alignment(AVFrame *frame)
-{
-    int planes = av_sample_fmt_is_planar(frame->format) ?
-                 frame->channels : 1;
-    int min_align = 128;
-    int p;
-
-    for (p = 0; p < planes; p++) {
-        int cur_align = 128;
-        while ((intptr_t)frame->extended_data[p] % cur_align)
-            cur_align >>= 1;
-        if (cur_align < min_align)
-            min_align = cur_align;
-    }
-    return min_align;
-}
-
 static int request_frame(AVFilterLink *outlink)
 {
     FifoContext *s = outlink->src->priv;



More information about the ffmpeg-cvslog mailing list