From patchwork Fri Nov 25 09:55:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Faiz X-Patchwork-Id: 1561 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.90.1 with SMTP id o1csp260870vsb; Fri, 25 Nov 2016 02:11:37 -0800 (PST) X-Received: by 10.28.69.91 with SMTP id s88mr6630070wma.18.1480068697262; Fri, 25 Nov 2016 02:11:37 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id yo1si41594580wjc.240.2016.11.25.02.11.36; Fri, 25 Nov 2016 02:11:37 -0800 (PST) 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 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 2CB39689C87; Fri, 25 Nov 2016 12:11:30 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C5AA3689B7F for ; Fri, 25 Nov 2016 12:11:23 +0200 (EET) Received: by mail-pg0-f68.google.com with SMTP id x23so5221308pgx.3 for ; Fri, 25 Nov 2016 02:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=79qdspJy93ZdGWfC9MQxsJLIhbI1ta1XmIU/S1nUShE=; b=HxnYouXHgulbOgf1QFhysuKYI3EMPnK0EPj3hAX6TElhnSKjsDzjGjg8XIb3W3ikHY jXxLFIs3qW+zLKhM5hf9Rmt56cIpGSaivi11QdGNPS5jJDjP/2+3xA1H8XjfJbiIsTi/ uXquRAqV+hK+En8yaryd8PssJtUMs66wls0CdKDcd4D5NoEyzDIWG4hzpUlpYHH1+z+d KNKRieSKWNK0i+0+5BHKhGkohdDYS9kxyrXRQbnrGvPZgC4I8tzUO5ynIwuE5gP+kpD2 p/UWcC3GWZVowU3mqixDXY+GFvryfq05Ev32bedOhJzzPxbiQupvG4DygcZ1yR9aHZ48 e4OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=79qdspJy93ZdGWfC9MQxsJLIhbI1ta1XmIU/S1nUShE=; b=a3MX5TqfUy1F7gzYa7xaAi5ppgnajoGKVCel1e69CmCSAC7nG7cBDHUZGIiACVanwj JRdcHIKO33a1xpzffvILoNTfolarzGv3psX4AlIfxtfFtK/A4LByeLyOOO8xQbFGiKG/ OBp++jKV8+gpLKCFJJ0kHISjn5Fmh6mAkCrR2PnoMWzzCfZLCJoVJfjZCkKFp92k4bH6 4UhWQf8C+jjbm5mJkw0WL5AFVJ8KeHOFvggTSYiq0iVAf6HpVImR5PC2GYm/n5SI+DRy JLsMPVpADgrdxoMiRNqYkinsuePydiuLR0yFOrLM+DinXll+HA5nSZvyMxdxMKBS4WdL 5sEA== X-Gm-Message-State: AKaTC00hMIajyfC4ytx3/ZNN4Jc5j9X+jvYlpJFTB3GMnNh4t79pR2B9FiHLInMMTrd5bg== X-Received: by 10.84.150.231 with SMTP id h94mr15662651plh.3.1480067793105; Fri, 25 Nov 2016 01:56:33 -0800 (PST) Received: from localhost.localdomain.localdomain ([114.120.239.149]) by smtp.gmail.com with ESMTPSA id 16sm66396377pfk.54.2016.11.25.01.56.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2016 01:56:32 -0800 (PST) From: Muhammad Faiz To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Nov 2016 16:55:34 +0700 Message-Id: <1480067735-15589-1-git-send-email-mfcc64@gmail.com> X-Mailer: git-send-email 2.5.0 Subject: [FFmpeg-devel] [PATCH 1/2] swresample/soxr: fix invalid use of linear_interp 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" give very bad quality for soxr resampler. linear_interp is intended for using linear interpolation between filter bank so quality will be better. i guess this is misunderstood as 'do not use filter bank, but directly interpolate linearly between samples'. Signed-off-by: Muhammad Faiz --- libswresample/soxr_resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/soxr_resample.c b/libswresample/soxr_resample.c index b9c6735..8181c74 100644 --- a/libswresample/soxr_resample.c +++ b/libswresample/soxr_resample.c @@ -46,7 +46,7 @@ static struct ResampleContext *create(struct ResampleContext *c, int out_rate, i soxr_io_spec_t io_spec = soxr_io_spec(type, type); soxr_quality_spec_t q_spec = soxr_quality_spec((int)((precision-2)/4), (SOXR_HI_PREC_CLOCK|SOXR_ROLLOFF_NONE)*!!cheby); - q_spec.precision = linear? 0 : precision; + q_spec.precision = precision; #if !defined SOXR_VERSION /* Deprecated @ March 2013: */ q_spec.bw_pc = cutoff? FFMAX(FFMIN(cutoff,.995),.8)*100 : q_spec.bw_pc; #else