From patchwork Sun Oct 1 16:10:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 5357 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.61.8 with SMTP id n8csp619002jan; Sun, 1 Oct 2017 09:10:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBTwfr66i+SJfzSGa6BEfG46W3tON8F5AaR3EfwDpkSw7g53K+QZ4SgBgr+fOHl2PqkFfbK X-Received: by 10.223.174.201 with SMTP id y67mr13504193wrc.116.1506874252824; Sun, 01 Oct 2017 09:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506874252; cv=none; d=google.com; s=arc-20160816; b=SAFEuZeakBhh+Z0dzXaC8Z+RCZcX19VuruHqaBIZlUKEKh6ku6cDtA5VNlZzENYioK +MLRqSN/Grcu2xLnGFl4FUL7hP2tV1qppeuIcxq89Yyqwi4hFzm/VNfopEl+azQRVP2c 04DmUUbiz6Srz0a2GhxKuub6TRp9UXkQne85LMtdH9seyLe7APK0hadPSg3Q2q+fXhsu 8qBOp+w7iU3NfLb8nxlb/qJEZqdbPFxS8ndmJhLUKndyM+JMCUIXgF5/uhazN7dGky4c +EO4GRD/3xytUAKMXvABUWggK0qkxnM0tnmUuRB7LTF30dgWy3k6UwhVCMHZ6FMKbl1C +H1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=fowJuRRp2P8QjT5um5Znocbu83BPIMYCYKIf9dAA9rs=; b=bWheWPc2tEtWoL3viRcvyG2bzoT3VhXc/9XtkXzn8SetcbooVSPEaat7Z4WKFsE3AQ 0vmklikMeDzztbHdMCI8vG0DkmKX1h/Q7OmaT4XjMmwAwEuspBy42mnwyeWn4Km9IZki Euvccjy/iNRfGG5soA2GS0XcXagosB4FhCHt1Sdi5Ho5KZGkbbCNV1TITN8YosPJ/6Co c9jHDRhI+NL9nGjmIqgV00rTG4/TuJLjALTxefLBz7g1048cPxjAnkJQJ9553cwWO26x G0mLEoyYEy3U5nnrdkf/fXgaYJ2OLW18Co/ia7VHGufew/nugMM1EYnKr+x0xIuaoHCj AGKg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 1si7081777wrq.373.2017.10.01.09.10.52; Sun, 01 Oct 2017 09:10:52 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 42C70689AF9; Sun, 1 Oct 2017 19:10:37 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe08-2.mx.upcmail.net (vie01a-dmta-pe08-2.mx.upcmail.net [84.116.36.21]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF11A689A34 for ; Sun, 1 Oct 2017 19:10:30 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe08.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dygpI-0000n4-LK for ffmpeg-devel@ffmpeg.org; Sun, 01 Oct 2017 18:10:44 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id GGAe1w01F0S5wYM01GAffk; Sun, 01 Oct 2017 18:10:39 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 1 Oct 2017 18:10:36 +0200 Message-Id: <20171001161036.6133-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171001161036.6133-1-michael@niedermayer.cc> References: <20171001161036.6133-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/dvbsubdec: Split best score computation out of loop in compute_default_clut() 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 3% faster Signed-off-by: Michael Niedermayer --- libavcodec/dvbsubdec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index 6a40f2376f..e60bf41936 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -681,14 +681,17 @@ static void compute_default_clut(AVSubtitleRect *rect, int w, int h) int l_r = x+1 bestscore) { bestscore = score; - bestv = v; + bestv = x; } } }