From patchwork Fri Aug 21 09:40:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 21792 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D98F144AAB2 for ; Fri, 21 Aug 2020 12:48:15 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB94668B721; Fri, 21 Aug 2020 12:48:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4767E68975D for ; Fri, 21 Aug 2020 12:48:09 +0300 (EEST) Received: by mail-ej1-f66.google.com with SMTP id qc22so1585492ejb.4 for ; Fri, 21 Aug 2020 02:48:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Uk8VtjY29ZGzEMu+crbKC7UEaN1W3dq8NjowNZ2PCE=; b=C46646/tKFv+ab/a+4VWmO8FzL5vmypBi0ScKNkc5O/aaBmnHOdWGNsowhpII0pWDX QSpeYW02XFemY+7AmN5t1ForBpn2+rIPzXcmZ3vkS9n+ZUhOfeqdmY38NtP4U0usQQUT ZSCu68Xidz7nd4dLRkOBYJV++zGosrjtQ/+Q89XjXwcA7XWZfAFu9x0ULupiFO/bOGhn sxyWbGzbAPtpgarKit4X1yTGjraqNoYl4Q7UBVFDvYBfiGefY9W0cY+P4kE2TfEvWklq eHEOymqvodXSlTu31I3hHTvQX+CpcojQKn9lOhtXG2WQnibvlEpN5aUg02k7QTE56q5c EbtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8Uk8VtjY29ZGzEMu+crbKC7UEaN1W3dq8NjowNZ2PCE=; b=Xu1DJ9qjlS+VX5BhCbbywie9BKDEr/etADb8bQppF4AMVJIKqmr0Gn4jG1WXeeE3IG F+S5kK9mrqKf8Q1bsMRCMPC8GPnDPs65p9jvnDqrZ4Hv3rwyfrH95RP+8FpCDLhVeWQs 6ipuEIMbFARJML5zEQbexEKQGxa6gra2jPQa3fxlIXkLEjoE7rZXrvYgyexI/nMyWuos bEmFLeV1op+gX3DHx7/jK9qj8zshRVFzq67TLXqjBRMngzJo6Ei2S3mgbGuFJ3sOBspk ZBrlzpgL/cqbjFu28jIueG0BIT6GWw7OSv7g7fhH1TEUBJOpJn9z7Ak+tvKeeI5vRTlu 2aWQ== X-Gm-Message-State: AOAM531uF2y6sb6vrzMMUMkfoe1UsMj+jgXecUAa3ego4cRAJfcd5ntz h9r95uA6+ZA1+OZyDC/8wJyKDAawOvE= X-Google-Smtp-Source: ABdhPJyTutSUqyNRybEvX0co0nMbw7mEhceLrA2QRVc8dMvqb788aOnhxR7na3gdzvqyw/FclrfZ0Q== X-Received: by 2002:aa7:c70b:: with SMTP id i11mr1899477edq.272.1598002834823; Fri, 21 Aug 2020 02:40:34 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id dk28sm803003edb.90.2020.08.21.02.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Aug 2020 02:40:34 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Fri, 21 Aug 2020 11:40:26 +0200 Message-Id: <20200821094026.20012-1-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] avfilter/fifo: Remove unused functions and headers X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2. Signed-off-by: Andreas Rheinhardt --- Two more headers in this file are unnecessary: libavutil/channel_layout.h and video.h, but they were already unnecessary before the last patch. Should I remove them in this commit or in a separate commit? libavfilter/fifo.c | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 70f4876a50..2e79c7ff55 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -23,11 +23,9 @@ * 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" @@ -98,51 +96,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;