From patchwork Thu Mar 16 05:43:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 2950 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp606979vsy; Wed, 15 Mar 2017 22:43:38 -0700 (PDT) X-Received: by 10.28.154.14 with SMTP id c14mr22218558wme.75.1489643018518; Wed, 15 Mar 2017 22:43:38 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u199si3091195wmu.140.2017.03.15.22.43.37; Wed, 15 Mar 2017 22:43:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5DFE3680ADB; Thu, 16 Mar 2017 07:43:18 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62DD96808DF for ; Thu, 16 Mar 2017 07:43:11 +0200 (EET) Received: by mail-pf0-f193.google.com with SMTP id r137so714892pfr.3 for ; Wed, 15 Mar 2017 22:43:27 -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; bh=1UHlJD8dOdwOgQE/zRaxqSEy+PS2LmCdWawL0WT/7/0=; b=pTOKrzS4Vbd4NFUUXYrIIQ7xO6flPTnjth1kN0kW+rrX5C5lRQNRVT1WaqCz8U5cpQ SL19hVbqiZFVestOsuyKpNkGFbRqavvtM+qowrAI2v5ly71nQn1it4RcqSWdeLjDZB37 0HnW+Zp9RkmDB8r9ZFUDvcb+74gJjCJ97NY9OUZJv03hhtaxD0geLDiisUzWNA5kNBXY 9dep78SBqSb9KnJi2fQ0lZ5cMT4sqFhQELjozU17VSXzkrF3pVvivfTCDVZcvDkhlLEp 3OgSOrdBRFuo2HQ0GOETqb/epIgOoWR+lCUuBs2rzjqILC/oP3o/I9HWsG0jYfRby0vA ENtA== 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; bh=1UHlJD8dOdwOgQE/zRaxqSEy+PS2LmCdWawL0WT/7/0=; b=aXGTFF0k/nHTmkIsL+Mzqp1yjURNNZqCUNQewMUmxUnVRwys2BdpdG0rlcRmdG8iKj O39FNDdDKq/OoF2C9un0A4fx2+L5b1tJR3KTUYpWzyY7E2sRs4w0YErUW7t2Piol0ZGQ F431J97aqfHtoQjf8Iokp0Qi+IBg6JIoLqwSQx3UnpLVSPZ23eAC5qWuS4tIIFDFwVuW V4x/K5XW5QD0qyaD3BMvUVfxJWLtaFiZgG+Tw84oH00F8QCpxJ0XSHDit2gr1EVw+i+q hjsEv6g8cVgzQbyjQ3DppfvFVKbYlS7DGcTLhh9JDRItl8q7YrmGn4FC/o3loogrkyIZ 6eOg== X-Gm-Message-State: AFeK/H0ug4b4Ayu6kqt5ZLe5uCy+DVZBGy0jKF5Z6ulLaEEjTeDfv3tJ/ycjxY4gYaOGpw== X-Received: by 10.98.32.213 with SMTP id m82mr8019083pfj.140.1489643006231; Wed, 15 Mar 2017 22:43:26 -0700 (PDT) Received: from localhost.localdomain ([114.120.238.220]) by smtp.gmail.com with ESMTPSA id c11sm7513078pfe.68.2017.03.15.22.43.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 22:43:25 -0700 (PDT) From: Muhammad Faiz To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Mar 2017 12:43:10 +0700 Message-Id: <20170316054310.22561-1-mfcc64@gmail.com> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH] swresample/swresample: do not use s32p internally by default when resampling 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: Muhammad Faiz MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" use fltp when doing s32 -> s32 resampling because s32p has no simd optimization benchmark: old 17.913s new 7.584s (use fma3) Signed-off-by: Muhammad Faiz --- libswresample/swresample.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index f2e6600..74c96dc 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -223,6 +223,8 @@ av_cold int swr_init(struct SwrContext *s){ }else if( av_get_planar_sample_fmt(s-> in_sample_fmt) == AV_SAMPLE_FMT_S32P && av_get_planar_sample_fmt(s->out_sample_fmt) == AV_SAMPLE_FMT_S32P && !s->rematrix + && s->out_sample_rate == s->in_sample_rate + && !(s->flags & SWR_FLAG_RESAMPLE) && s->engine != SWR_ENGINE_SOXR){ s->int_sample_fmt= AV_SAMPLE_FMT_S32P; }else if(av_get_bytes_per_sample(s->in_sample_fmt) <= 4){