From patchwork Fri Sep 9 10:13:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sven C. Dack" X-Patchwork-Id: 489 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp237303vsd; Fri, 9 Sep 2016 03:14:13 -0700 (PDT) X-Received: by 10.28.13.149 with SMTP id 143mr2209013wmn.113.1473416053197; Fri, 09 Sep 2016 03:14:13 -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 cj5si212247wjb.1.2016.09.09.03.14.09; Fri, 09 Sep 2016 03:14:13 -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=@sky.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 DC37768A0BC; Fri, 9 Sep 2016 13:13:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nm14-vm9.bullet.mail.ir2.yahoo.com (nm14-vm9.bullet.mail.ir2.yahoo.com [212.82.96.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7C5F0689D3A for ; Fri, 9 Sep 2016 13:13:48 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sky.com; s=s1024; t=1473416036; bh=Ln6/xSJtKaAaTXCzhrKeQ/dTvoTWdPV70f186qSOTNo=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=KSJ1nVUkqHjAei/XE9xySqGmpirJYksACAgYn2kG37ew4V8oDkiP7L/4v9jBNBkbG1ovIO9g5fMwSjz5jn46zXOCiDzEkDKZvKR3/1jLnjgpIdpaoLt1TJiefDb1FpPdLgdWo3dia6Sc8Ar5aiThwkz8ALtkGaJwLDi9tGeMKsg= Received: from [212.82.98.60] by nm14.bullet.mail.ir2.yahoo.com with NNFMP; 09 Sep 2016 10:13:56 -0000 Received: from [46.228.39.72] by tm13.bullet.mail.ir2.yahoo.com with NNFMP; 09 Sep 2016 10:13:56 -0000 Received: from [127.0.0.1] by smtp109.mail.ir2.yahoo.com with NNFMP; 09 Sep 2016 10:13:56 -0000 X-Yahoo-Newman-Id: 527006.45889.bm@smtp109.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Bqxe_pQVM1lZvpTkPALRSTuj6ljCfSfTubnlif0Y79wbPwn 7DgZnE8e0t5lEHSd34K1LejTyCfagLZZF296DXuaSc7HjbFkPZ6aJiFXDUnl _h4HDX_5FUUUvBP2cigDDcJdv_oQRM924t2ypV.md361Qp.yEvBd470VEs60 2NMxcyO1a.vGDkDmGjaUur_1_WzmF0dBu3akEmHDM9THcm8PxgZK5mYTAAYR pdpDNlwqLLJh2y4WSFIzezxr1vIepLfoFmS0JG7aipIEP1bs_JYxh1up5iT9 uBYfOjtNp_MGuW463GQgPRhxcKD3bL.KISQPaIKTCHbkc1.IQPQG.DsWWzv4 Z3e2IxDypxzjR_XmWhtdw8L4MmR8e3ysALLERTThqmTI36vlMwwQ.DM1Q0Xk FK7mg0dV5DUfnzSKrDtNwLPbUIpklc1hXSWh2gwvhVxF1uSdZt1fV1UYbKp3 FOVs90WjyOBAo5AxBKavNxgJauZhgmx9HM1yAgRp_MpNm3rNnsSd_b1csVfE Qh._olnpYK.sDoCxewiO35tos6HvWNACORvGQZ5IdNyu.zrxQeMUL4peD1Ow TR_sro9ireA-- X-Yahoo-SMTP: vPZU.OKswBC.RMkOW9onWi6Zk8BriyC1yj0kMdBuqpLuLjitZVXhzK.Ofd5b To: FFmpeg development discussions and patches References: <5110d61f-f58f-11f7-df3e-03e4a35ca3e6@sky.com> From: "Sven C. Dack" Message-ID: <1406ead0-d114-12e4-927b-2c53a9ba8057@sky.com> Date: Fri, 9 Sep 2016 11:13:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] Select cubic and lanczos as alternative where super-sampling is not supported 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" On 09/09/16 11:03, Carl Eugen Hoyos wrote: > 2016-09-09 11:55 GMT+02:00 Sven C. Dack : > >> Super-sampling is currently only supported by CUDA/NPP when the output >> dimensions are both smaller than the input dimensions. The patch lets ffmpeg >> select an alternative algorithm and prints a warning in such cases. > Tabs (as in your patch) cannot be committed to our git repository, please > remove them. > You can use the script tools/patcheck to find them. > Ok, thank you. It tells me my change log entry is missing. I've commited it with: git commit vf_scale_npp.c Entered my comment and applied format-patch: git format-patch -1 vf_scale_npp.c How would I get the missing change log entry in there? Sven From aacd8ecc2f39a45bbfdf6780d9b3b13e6ed0fb41 Mon Sep 17 00:00:00 2001 From: "Sven C. Dack" Date: Fri, 9 Sep 2016 10:18:07 +0100 Subject: [PATCH] Select cubic and lanczos as alternative where super-sampling is not supported --- libavfilter/vf_scale_npp.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 68cee39..82ba2f4 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -294,10 +294,21 @@ static int init_processing_chain(AVFilterContext *ctx, int in_width, int in_heig /* figure out which stages need to be done */ if (in_width != out_width || in_height != out_height || - in_deinterleaved_format != out_deinterleaved_format) + in_deinterleaved_format != out_deinterleaved_format) { s->stages[STAGE_RESIZE].stage_needed = 1; + if (s->interp_algo == NPPI_INTER_SUPER && + (out_width > in_width && out_height > in_height)) { + s->interp_algo = NPPI_INTER_LANCZOS; + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using lanczos instead.\n"); + } + if (s->interp_algo == NPPI_INTER_SUPER && + !(out_width < in_width && out_height < in_height)) { + s->interp_algo = NPPI_INTER_CUBIC; + av_log(ctx, AV_LOG_WARNING, "super-sampling not supported for output dimensions, using cubic instead.\n"); + } + } + if (!s->stages[STAGE_RESIZE].stage_needed && in_format == out_format) s->passthrough = 1; -- 2.9.3