From patchwork Thu Aug 9 17:16:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Lavrushkin X-Patchwork-Id: 9950 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp2482640jad; Thu, 9 Aug 2018 10:40:30 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwpat+VyTjXEw3JwF97HNeGIldGBj+hb8+xYw4HYv20tQ4DI+1PBCD3hcCrKfA8IUmSJkwc X-Received: by 2002:a1c:a009:: with SMTP id j9-v6mr2080515wme.132.1533836430813; Thu, 09 Aug 2018 10:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533836430; cv=none; d=google.com; s=arc-20160816; b=K057uHxQm7Xj5H6e53cNpw4tFN+fd2rIi1cqHjkSkhcEdvoNq3jQVsxFd6a03g3/Qz SwLt3Z6OopvB/zuOuDFmA0azQdXn6nVklXG5zeUoGfCYCM1+XyKavjhhKJRPcJ9pIV1z LbxOCvTZvbKlhlMXJ5WfD55gUfma8P+zNMoGsI5aNvvYtNSJlMj6EtMiJ3tSzkQ12n9L 0ZI1qL5rllX4OJkXGw7T1Cq9g4caqjmr1RdM5vqzxCxUNGdayGzXZdxYNLPazY16coqi +owGcmDpwzfjwFI6kkxKMo/J8ARB3BrbOLQN86nVYFq4Wm1HukbMcOPIBzWjf8s5Zcsp qb5Q== 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=LJPjq9bm1lVVdISI3WlOB/NKa0684X2kHPouJRtaFg0=; b=0+Iu5b0ulSsBnEoMkHejqxXR9tblbRTV+wHkMekCazEt6vhv14uSmPSqHeYV7t+SIC WAt6UG/oJ6d5aq+qh62WoGdmLHFhBuxUn3wXEJtt2cUq2oo6+T9y+/ChWfkyfxFD9ozH sdnQ2KQxofDrvFnDNRVFDJoVx5KgIkWMbouvYj8+4qe99RgvbZJT0ZRHDmuj3lpfmqso 0sLjpR94KrbKmkxn5Y6wfX2EDFTv2a6gI3Y8dhI/z8bBqV2fcLmZ3BPxb75rzpd9MQjt f27l+bvQ1hQcJiF0+qK6PAgEvlw6HrxL7hEquNeZRVMEV6Q1vbmbmTWrsovO0qSFyH+p t8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=c0djU4b3; 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 2-v6si6588770wrn.77.2018.08.09.10.40.30; Thu, 09 Aug 2018 10:40:30 -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=c0djU4b3; 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 EBBB3689E75; Thu, 9 Aug 2018 20:40:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7198368A10A for ; Thu, 9 Aug 2018 20:39:59 +0300 (EEST) Received: by mail-pg1-f194.google.com with SMTP id x5-v6so3072639pgp.7 for ; Thu, 09 Aug 2018 10:40:21 -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=EaMOtc0o6N8Z+c2Vo08PrkK2+F06XIpYhU1CUalftdk=; b=c0djU4b3UrbpsfVkm+K0n7GWAAVxzdXLzsP3z6GVyj4XftJwuYdtPAsg4bWJSxgRnf 1Yfjau1fabnVQvTgS4eJFzAHXmwFlHnmwKZ8s9G1CBo9jV9L83VOvfNM+VPJpHzRrcOV u3GXroSIAgTdI8wmTHuhRIK0k3ejccpqjgXQuNexV1X284cG8Kq1yj3yiFkuBkY/uLbz hLJxShAZUNusTIc0qFvHxr3KMfCsOM2CrMVVJbIkm5DLuLnedz7X8dh9BaghCM/jTTZo uxrcnk5tXNO1wvz0pv4EtjsbOy2hdwzoP9KjX4wgsSKbtHUUNbwAoERuKh7tIBuNdgJV gVxw== 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=EaMOtc0o6N8Z+c2Vo08PrkK2+F06XIpYhU1CUalftdk=; b=fyOtmNFeTN4Y6n5q23gsz7FkwArVZUd2e5nFyzjVsF+Bzb++XYp3O8JMCAaLxaCZhW UtpVNPl5gXXsCYdSyJ7yTKS+NiJ6wzqBzg6/y2IfYCGtdgVtPJ3diK397tkMnWKcHqp5 k+6QvG4hdV52S9Ty0/b9/ip5PTHj3PcsYXEYio46RFPCT0HKT1Ga2dqtn6WrhrYsGfW/ YC0FkxFIFS9TPJoMOR7MzABdBdzWeBKTpGz7wSrG+3wCy5DUfDzIg+AXPJZTwtvf1hH3 HgIk98oXwleD5NCG+DCJ3rbLDbqF27exUd6exBW42HVeKwJyd/LQjBdZk8AC+8cmuPMd kGVA== X-Gm-Message-State: AOUpUlGAXb9WzmHsE5WwPpKIb/AeIEsqZDBOG820NmS89QtrjUDZayey 5ZGosi8Euu1RtFCsafaKnymr3B3b4qkacN9CpWXE2Q== X-Received: by 2002:a63:35c3:: with SMTP id c186-v6mr2969904pga.217.1533834995677; Thu, 09 Aug 2018 10:16:35 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:501:0:0:0:0 with HTTP; Thu, 9 Aug 2018 10:16:34 -0700 (PDT) In-Reply-To: <20180807101401.GC21746@sunshine.barsnick.net> References: <20180807101401.GC21746@sunshine.barsnick.net> From: Sergey Lavrushkin Date: Thu, 9 Aug 2018 20:16:34 +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" 2018-08-07 13:14 GMT+03:00 Moritz Barsnick : > On Tue, Aug 07, 2018 at 00:24:29 +0300, Sergey Lavrushkin wrote: > > +@table @option > > +@item model > > +Specify what super-resolution model to use. This option accepts the > following values: > ^ nit: which > > > +Specify what DNN backend to use for model loading and execution. This > option accepts > Ditto > > > +Allowed values are @code{2}, @code{3} and @code{4}. Scale factor is > neccessary > ^ > necessary > > > +Note that different backends use different file format. If path to model > ^ formats > Here is updated patch. From 1fed1ea07a5727d937228307bffbde13e6727669 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..e2436a24e7 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 what 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 what 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 neccessary +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 format. 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