From patchwork Sat Aug 11 14:55:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Lavrushkin X-Patchwork-Id: 9955 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp1242485jad; Sat, 11 Aug 2018 07:55:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwHbwII3MvE0tcR+f5pHxdiQMfWB5/osPRNDZAIFU3epsYPWhEYWIz0+4K0xUpROLjh33c5 X-Received: by 2002:a1c:19c2:: with SMTP id 185-v6mr4177297wmz.79.1533999339253; Sat, 11 Aug 2018 07:55:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533999339; cv=none; d=google.com; s=arc-20160816; b=N+fHn25cEAaDxMFbcyODgDcm4eKYcvSan/LCVSWD/HD33QmSGdzAPCP2GW2KGBrO9b qpmSxaoTgn+7Ahxu3owZqM+YE+Gc2qERhgctj0hTnwvEZTlI1p9SCSLR3s6M0iHc16vl 50BqyELhE7PXGKg/2AHBAQblsCfb1bNn2Dcchtd3DX/AbVv5iX7RK6sRpnUaNalTFJEu PoQIA03AWrXP/j/81AKvRRTTCNL/zJYZP7zQxdVxzNQB9iu2U14wcTu3wvORpxnmQUF1 eGULnljqRVD8z4a10hAwM8ns/6WTFbXy01+1hi9HtVy29FnsAESl5VS/NKWg3tYdcryu hQOQ== 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=4aM6vEOKu9YE0kIMfNMAt3/Cto8ef28jZUNkw6SKysw=; b=oNmDBFzmvsHUQeLj/fl8KPN1SOkpQk6HTOXYAvCA29FuM28A8JoJuJytsyb0EnEj8c cTLDHUqE1yPEspt6aGUn9vQYG7MJ07+st/f0VM/EREMPNfn/TD4ngrTnvogs0ACxghhz X2VIHAU2acIWFj+ks3L3shHOwkHJucsJcdUaDV2c1N6DBAODX1CDOEGP3Nh5WA0dfmxX m2Hqqhaj1z9YTLM5R5PGB+SChMS8hxGlY/0SbQGqRqMUS+b4aj9O49YrKlkDYVDwOeeO QQRSjngB227uee2nPLTtZKWNwm89cwslNUupu0VrTN4v3ptthOb+8ZchGeARKRUz/hfa KxIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=MYF7aeb+; 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=QUARANTINE 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 o64-v6si3387291wmd.118.2018.08.11.07.55.38; Sat, 11 Aug 2018 07:55:39 -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 header.s=20161025 header.b=MYF7aeb+; 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=QUARANTINE 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 E9C6968A54F; Sat, 11 Aug 2018 17:55:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 440B668A253 for ; Sat, 11 Aug 2018 17:55:06 +0300 (EEST) Received: by mail-pf1-f180.google.com with SMTP id y10-v6so5795901pfn.8 for ; Sat, 11 Aug 2018 07:55:28 -0700 (PDT) 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=VTHtYf4oeVOL82w48UCx3UqNjAvD+LhlfSVkUPvHgLw=; b=MYF7aeb+h9d3q1n7qjDdPJ46anYcVNNNIOfxxjU22RIDjJYS3yB8/pThbQmJKLc54v xLm/ajuWc4lNhvGK8KLNj4IhcXPp7ir6myuNIE4tn/N+mO8m3TyaQ27ntnR9Es8ZcM5X LzCeD7RwJaBVLVuBj70z93WyXGSVWKSrjj80+OCCuA9akDEx9YlPK1ePsrRSV/+2Ei+7 bBVrs84nXoyyRkNcf1QHLmIhfqVMK92R86qv4MO9hDSboxw+NlWpug0YWZVPEmtTe4DM AMbsR3mDngtkiBp9Pb0UgTyHNYuVPZocVEjatWVy4f4FOlsUy1tukc6kF/gktkaep4hN 9rKA== 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=VTHtYf4oeVOL82w48UCx3UqNjAvD+LhlfSVkUPvHgLw=; b=sK35kyQdhyx813WQJbE3CcxQ1z0xPdSdSl8XLaVRQ+Zbu4TFRMiU9KjXS2SGzHRTIe 4B+MtISu1E55U2BKyuSZluHXnyknwztzYehvZj+17ena9rsPeF0OtsDFVJVsFi4gybIk 2k0Sn1I6A+xGkgdO0tzYBs1mpo3jVzBC+ru7GL9eV22GNMUyzDDd4j1g5vDcIATIxCnW P0x001ChZkrt3t2y6xKXxBWwmcJp7oVxSmNDM9sFVto5m33i4ofs4vOGGXwzJT1vgjys APwaX9sPUcCe3Klp+FclfEXNORl334Ob1agMB9jbuRnuU6DRlleMXGv/zicjl+UbIC0W DNkw== X-Gm-Message-State: AOUpUlHQmfWB00jilAKOZbP9/ImhgCDCg8fxfpO6Y/EufgSZ+0Ukj7xD N86Y9vWFpwS7SAA0XmQSQm2Bmx5+WhQkf5yvqjCgRvXO X-Received: by 2002:a62:9349:: with SMTP id b70-v6mr11613890pfe.193.1533999327185; Sat, 11 Aug 2018 07:55:27 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:501:0:0:0:0 with HTTP; Sat, 11 Aug 2018 07:55:26 -0700 (PDT) In-Reply-To: References: <20180807101401.GC21746@sunshine.barsnick.net> From: Sergey Lavrushkin Date: Sat, 11 Aug 2018 17:55:26 +0300 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: Re: [FFmpeg-devel] [PATCH] Documentation for sr filter 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" Sorry, I accidentally sent previous patch, here is updated version. From 99afeefe4add5b932140388f48ec4111734aa593 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 17:24:00 +0300 Subject: [PATCH 9/9] doc/filters.texi: Adds documentation for sr filter. --- doc/filters.texi | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 0b0903e5a7..9995ca532b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -15394,6 +15394,66 @@ option may cause flicker since the B-Frames have often larger QP. Default is @code{0} (not enabled). @end table +@section sr + +Scale the input by applying one of the super-resolution methods based on +convolutional neural networks. + +Training scripts as well as scripts for model generation are provided in +the repository @url{https://github.com/HighVoltageRocknRoll/sr.git}. + +The filter accepts the following options: + +@table @option +@item model +Specify which super-resolution model to use. This option accepts the following values: + +@table @samp +@item srcnn +Super-Resolution Convolutional Neural Network model +@url{https://arxiv.org/abs/1501.00092}. + +@item espcn +Efficient Sub-Pixel Convolutional Neural Network model +@url{https://arxiv.org/abs/1609.05158}. + +@end table + +Default value is @samp{srcnn}. + +@item dnn_backend +Specify which DNN backend to use for model loading and execution. This option accepts +the following values: + +@table @samp +@item native +Native implementation of DNN loading and execution. + +@item tensorflow +TensorFlow backend @url{https://www.tensorflow.org/}. To enable this backend you +need to install the TensorFlow for C library (see +@url{https://www.tensorflow.org/install/install_c}) and configure FFmpeg with +@code{--enable-libtensorflow} + +@end table + +Default value is @samp{native}. + +@item scale_factor +Set scale factor for SRCNN model, for which custom model file was provided. +Allowed values are @code{2}, @code{3} and @code{4}. Scale factor is necessary +for SRCNN model, because it accepts input upscaled using bicubic upscaling with +proper scale factor. + +Default value is @code{2}. + +@item model_filename +Set path to model file specifying network architecture and its parameters. +Note that different backends use different file formats. If path to model +file is not specified, built-in models for 2x upscaling are used. + +@end table + @anchor{subtitles} @section subtitles -- 2.14.1