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.
Unified · Split
| @@ -23,16 +23,12 @@ · 22 unmodified lines | ||
| 23 | 23 | * FIFO buffering filter |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | −#include "libavutil/avassert.h" | |
| 27 | −#include "libavutil/channel_layout.h" | |
| 28 | 26 | #include "libavutil/common.h" |
| 29 | 27 | #include "libavutil/mathematics.h" |
| 30 | −#include "libavutil/samplefmt.h" | |
| 31 | 28 | |
| 32 | 29 | #include "audio.h" |
| 33 | 30 | #include "avfilter.h" |
| 34 | 31 | #include "internal.h" |
| 35 | −#include "video.h" | |
| 36 | 32 | |
| 37 | 33 | typedef struct Buf { |
| 38 | 34 | AVFrame *frame; |
| @@ -98,51 +94,6 @@ static void queue_pop(FifoContext *s) · 59 unmodified lines | ||
| 98 | 94 | s->root.next = tmp; |
| 99 | 95 | } |
| 100 | 96 | |
| 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 | − | |
| 146 | 97 | static int request_frame(AVFilterLink *outlink) |
| 147 | 98 | { |
| 148 | 99 | FifoContext *s = outlink->src->priv; |