History

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.

Andreas Rheinhardt committed 6 years ago

Commit d4e29d91 parent 2b71cd31 file · +0 −49Browse files

Unified · Split

libavfilter/fifo.c+0−49
@@ -23,16 +23,12 @@ · 22 unmodified lines
2323 * FIFO buffering filter
2424 */
2525
26−#include "libavutil/avassert.h"
27−#include "libavutil/channel_layout.h"
2826 #include "libavutil/common.h"
2927 #include "libavutil/mathematics.h"
30−#include "libavutil/samplefmt.h"
3128
3229 #include "audio.h"
3330 #include "avfilter.h"
3431 #include "internal.h"
35−#include "video.h"
3632
3733 typedef struct Buf {
3834 AVFrame *frame;
@@ -98,51 +94,6 @@ static void queue_pop(FifoContext *s) · 59 unmodified lines
9894 s->root.next = tmp;
9995 }
10096
101−/**
102− * Move data pointers and pts offset samples forward.
103− */
104−static void buffer_offset(AVFilterLink *link, AVFrame *frame,
105− int offset)
106−{
107− int nb_channels = link->channels;
108− int planar = av_sample_fmt_is_planar(link->format);
109− int planes = planar ? nb_channels : 1;
110− int block_align = av_get_bytes_per_sample(link->format) * (planar ? 1 : nb_channels);
111− int i;
112−
113− av_assert0(frame->nb_samples > offset);
114−
115− for (i = 0; i < planes; i++)
116− frame->extended_data[i] += block_align * offset;
117− if (frame->data != frame->extended_data)
118− memcpy(frame->data, frame->extended_data,
119− FFMIN(planes, FF_ARRAY_ELEMS(frame->data)) * sizeof(*frame->data));
120− frame->linesize[0] -= block_align*offset;
121− frame->nb_samples -= offset;
122−
123− if (frame->pts != AV_NOPTS_VALUE) {
124− frame->pts += av_rescale_q(offset, (AVRational){1, link->sample_rate},
125− link->time_base);
126− }
127−}
128−
129−static int calc_ptr_alignment(AVFrame *frame)
130−{
131− int planes = av_sample_fmt_is_planar(frame->format) ?
132− frame->channels : 1;
133− int min_align = 128;
134− int p;
135−
136− for (p = 0; p < planes; p++) {
137− int cur_align = 128;
138− while ((intptr_t)frame->extended_data[p] % cur_align)
139− cur_align >>= 1;
140− if (cur_align < min_align)
141− min_align = cur_align;
142− }
143− return min_align;
144−}
145−
14697 static int request_frame(AVFilterLink *outlink)
14798 {
14899 FifoContext *s = outlink->src->priv;

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