From patchwork Fri Jan 5 04:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 7133 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp294583jaa; Thu, 4 Jan 2018 20:11:44 -0800 (PST) X-Google-Smtp-Source: ACJfBosYv8EwSHzq8m6AZXKvjYx5xeRL90QOq4i0TpxAdR/veDl0zog+MNi1aB9b9O/S0BTMWD75 X-Received: by 10.28.13.140 with SMTP id 134mr1138673wmn.106.1515125504058; Thu, 04 Jan 2018 20:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515125504; cv=none; d=google.com; s=arc-20160816; b=yb78Of/LkkVme00JkFzJaoNzNWabbtXNbQJ/GmYOdtjY5dI4btqyJgG4/bc/cUeJxu car8j1t0eTgWPn6y5WunzqfDCcvZiyXlq1UcE1iO+AciGw+DXtSLB0N7s8l0JjXb2D+f xlA7umm4RapzFQfY5BV+TE6ztFyUZKOB91QOzx+WSic+Oem1jzVqmc52K2bfgV7v3AQ3 HSGhl2lRfvYOcnfM8QvhmJCucs3PQGhgAxqEKSEXxvYvTA5KwVuygxQckdk3HRX/7IWn hv+d4zN9avqPJ/IT0pj9HYByBlUt3iIrcm+nkkQfou9uAmjZHHnQ9FYnWNSYG3FwkLyl E1Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:delivered-to:arc-authentication-results; bh=39TgIdlx1pCK9s2BQx8MQlHYrG1JaiCYGRymYMHOpnA=; b=F7vmCnn+3xCgftPkIR/wgd01rn8p92aUv0E0PnM3t87tz/1ZFh/nSn/b/an7XTQPST sQVXY9RQeW7HUIRPz+gt9SEspOHjAzWscuSX4GOKg+PkaW2S8HgWYQnaCvlb7WaLttVi LDtpnSjS1zjUrfxiuVMi+SX8Eyf9fYy5mXrHTwzyl7me2rWXHN2VL6sXIrhwmBXHM3kG k/SwXhr7n8t5NKUOdt0dFe/p3jAlr5ika3EXcwzU+lR499gE56DdyNhLQlxc9X2IAkkr AeExu1gTnqX85A7gSfpB0Lui7C1OIZcUsUcLrC3wcnuf5/jahsgmoCYr4dBwxna8uoiW hQSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=S9SEmzPH; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id b68si3193647wmf.157.2018.01.04.20.11.42; Thu, 04 Jan 2018 20:11:44 -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 header.s=20161025 header.b=S9SEmzPH; 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 912536898C4; Fri, 5 Jan 2018 06:11:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f46.google.com (mail-it0-f46.google.com [209.85.214.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6D2C2689811 for ; Fri, 5 Jan 2018 06:11:16 +0200 (EET) Received: by mail-it0-f46.google.com with SMTP id c16so201158itc.5 for ; Thu, 04 Jan 2018 20:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=SOBsmjNTWWUSoUO9g8CqQ6QhTw8Dj4yvjWmkmGbOb5M=; b=S9SEmzPHWBRoJtFDUZtpZEX7vMmia7g96LxvDNEirZmVQ6DLhThK/ppgVcdEy28V8v tS3mTbeamjL/lFUmnD3zaRe2cOXAL5Jh8cfv8le5ljVkb356bOYK18LMqbC27bmWGj8P lYsAxFuXUmykzY36MS606wvHABCDOT0z1YlAH+upUfVODlxvSnkvOE9HWv2R03ry7XqM z5NSq4PK6KcCRTokzGZEFLWSeRJLlHCXgXqllBK52jGs7wmurGsPlOC9/ZgAsBy/3KhI y9+93fgPeAOq6SZee7Zuj1YfwW0rOjYRj1oLzUCoB0ArZp10IJewASmsQo08BsrdjOTV DaFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=SOBsmjNTWWUSoUO9g8CqQ6QhTw8Dj4yvjWmkmGbOb5M=; b=RX/AcSz5xcgX1gXJNAoYumPmPdx3ScvfSWAh+PXsdlHGYwnL0sHUq92rfNSHhH1dcW fgJqLdnyl89gVq2rCii9kw1+NQvNbm1jKT5xkCIPdSfBY7FSTytrWLU0RFm7AMF2mP4j b9Wt0QJsn4QwoU6mnfFJiQRGF2mOD/mgDcnlINN7biuJxLcUwy+a8TFUnfI73TI+Hvxk O9xlz6qR9IxhGeHVzZpMlzb3DtiiV/WDd283xp0P4TDjFefG29gpo2sLbbd2XI9RURS1 Rsv9vCMZBSN/CAp9KFlWpwckRWnUjLRh36wuHdXM5YYsgVcOso2pJSK+aoFPB6Loivvo XKnQ== X-Gm-Message-State: AKGB3mLPUyc9hH81uHteqqypdfMETpHD21VfGaGJ1kJ3oHmBNpVwsKZu 1oboMfLjF+9cV/z5m1IqUeO0j05UGxENZ+RFMWM= X-Received: by 10.36.3.209 with SMTP id e200mr1972812ite.113.1515125492003; Thu, 04 Jan 2018 20:11:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.119.211 with HTTP; Thu, 4 Jan 2018 20:11:11 -0800 (PST) In-Reply-To: References: From: Carl Eugen Hoyos Date: Fri, 5 Jan 2018 05:11:11 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH]lavc/opusenc_psy: Remove a write-only variable 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 2018-01-05 3:24 GMT+01:00 Rostislav Pehlivanov : > On 4 January 2018 at 04:38, Carl Eugen Hoyos wrote: >> Attached patch fixes a warning here when compiling the opus encoder. > I don't like this patch and I'm planning on using that variable in the > future. New patch attached. Thank you, Carl Eugen From 55ef093222ff162bfaffc95e1546f95e88532c0f Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 5 Jan 2018 05:09:49 +0100 Subject: [PATCH] lavc/opusenc_psy: Split variable declarations and code. Fixes a warning: libavcodec/opusenc_psy.c:407:5: warning: ISO C90 forbids mixed declarations and code --- libavcodec/opusenc_psy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c index b712603..2df2eb3 100644 --- a/libavcodec/opusenc_psy.c +++ b/libavcodec/opusenc_psy.c @@ -398,14 +398,12 @@ static void celt_search_for_dual_stereo(OpusPsyContext *s, CeltFrame *f) static void celt_search_for_intensity(OpusPsyContext *s, CeltFrame *f) { int i, best_band = CELT_MAX_BANDS - 1; - float dist, best_dist = FLT_MAX; + float dist, best_dist = FLT_MAX, end_band = 0; if (s->avctx->channels < 2) return; /* TODO: fix, make some heuristic up here using the lambda value */ - float end_band = 0; - for (i = f->end_band; i >= end_band; i--) { f->intensity_stereo = i; bands_dist(s, f, &dist); -- 1.7.10.4