From patchwork Sat Nov 3 21:01:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Zern X-Patchwork-Id: 10912 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 45B6E44D489 for ; Sat, 3 Nov 2018 23:09:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A98D468A73E; Sat, 3 Nov 2018 23:08:32 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 90FD468A722 for ; Sat, 3 Nov 2018 23:08:26 +0200 (EET) Received: by mail-pf1-f195.google.com with SMTP id j13-v6so2571843pff.11 for ; Sat, 03 Nov 2018 14:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=BJGq+quNpQRu0lORRr9Pg8lM6flCciYChh0n6B/fHxo=; b=s6YTy0BffMRkFTqJCDKOtmRD62ZFbznhlgn35/GZCrjs0YyHupo+pDDZw4j5niZvae M41bByjlSGOZXtEh7h6YFKjb9+h9IOFpULiVGEOtrHyB0KadrWKLV53Pk8HqzxOgmy1i uvQUyWp427bKPPJ+FLFNVWbcsXO2+5LEkKj8abDUNInwZCUoga1j8215+3kH2W+R1Wqx ISkfQ69rUA8MINl2P4afKuMqeqJOwyVtbFzk6+SFyrb/kSdoGNcqUakeQLQ3H3KemYbB JYYdgTgrGdSLS3Uiml2jGwPS5GAOw1NR6eLjUqYBKiTWLTOULGvEo0OA5Mi5hT1zE4ik P/Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=BJGq+quNpQRu0lORRr9Pg8lM6flCciYChh0n6B/fHxo=; b=mVyvN3nw4Cm2lRVaPQEy9Bb7dMkP0tzhW/Opfevq1vnwi4/sqJy6cSLZpMl3Oho7HX d3nHl61aAcFuZvUVY30mZ3qJcybBjjDQMpU+j9NR+ydUGy/qFyublq0iwB+G/whP3EUd 2+4wQ8qKpy/+6zWHIw8K7hIdwLqXifN1oFOZYuC4vxihPze5PW8z1KwHrn/e+A7kccot 44ObcVWqTZ2S2Hm+ASGg4lr1wEC7/DTdbcobJzeGK2GYxZFKWFDxSx264kU9zdeZHo4o gjZ9kVWB8cJa4dVaBiZ+g9YJ3F+mi0b/vytfxt7hw08GFXlF9chXlh3Q2aWoggQoUuos wnyw== X-Gm-Message-State: AGRZ1gLvIrPikcujgFq2xZNkgN7tYHr649mhVpa0Mckd5rEtZIiWrcNM bAJohBMD1xGkxr15x1KILAJDYyHG6rzPBQ== X-Google-Smtp-Source: AJdET5cONoq8yXIPd/Bm0DR6KQgHdjdQXNUorZwcnsnE9yn9puPbh+9A7NSegdSn1nSHsy8rx9gOTQ== X-Received: by 2002:a62:d8c3:: with SMTP id e186-v6mr2367850pfg.52.1541278888093; Sat, 03 Nov 2018 14:01:28 -0700 (PDT) Received: from jzern.mtv.corp.google.com ([100.99.16.200]) by smtp.gmail.com with ESMTPSA id a19-v6sm22034594pfi.138.2018.11.03.14.01.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Nov 2018 14:01:27 -0700 (PDT) Received: by jzern.mtv.corp.google.com (Postfix, from userid 105886) id 717D6801E1; Sat, 3 Nov 2018 14:01:26 -0700 (PDT) From: James Zern To: ffmpeg-devel@ffmpeg.org Date: Sat, 3 Nov 2018 14:01:26 -0700 Message-Id: <20181103210126.124147-1-jzern@google.com> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] libvpxenc,vp9: add enable-tpl option 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" enables temporal dependency model Signed-off-by: James Zern --- doc/encoders.texi | 2 ++ libavcodec/libvpxenc.c | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 899faac49b..fced8d7369 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -1692,6 +1692,8 @@ Corpus VBR mode is a variant of standard VBR where the complexity distribution midpoint is passed in rather than calculated for a specific clip or chunk. The valid range is [0, 10000]. 0 (default) uses standard VBR. +@item enable-tpl @var{boolean} +Enable temporal dependency model. @end table @end table diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 09f7a88452..e03dc3539a 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -111,6 +111,7 @@ typedef struct VPxEncoderContext { int row_mt; int tune_content; int corpus_complexity; + int tpl_model; } VPxContext; /** String mappings for enum vp8e_enc_control_id */ @@ -146,6 +147,9 @@ static const char *const ctlidstr[] = { #ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT [VP9E_SET_TUNE_CONTENT] = "VP9E_SET_TUNE_CONTENT", #endif +#ifdef VPX_CTRL_VP9E_SET_TPL + [VP9E_SET_TPL] = "VP9E_SET_TPL", +#endif #endif }; @@ -716,6 +720,10 @@ FF_ENABLE_DEPRECATION_WARNINGS #ifdef VPX_CTRL_VP9E_SET_TUNE_CONTENT if (ctx->tune_content >= 0) codecctl_int(avctx, VP9E_SET_TUNE_CONTENT, ctx->tune_content); +#endif +#ifdef VPX_CTRL_VP9E_SET_TPL + if (ctx->tpl_model >= 0) + codecctl_int(avctx, VP9E_SET_TPL, ctx->tpl_model); #endif } #endif @@ -1156,6 +1164,9 @@ static const AVOption vp9_options[] = { #endif #if VPX_ENCODER_ABI_VERSION >= 14 { "corpus-complexity", "corpus vbr complexity midpoint", OFFSET(corpus_complexity), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 10000, VE }, +#endif +#ifdef VPX_CTRL_VP9E_SET_TPL + { "enable-tpl", "Enable temporal dependency model", OFFSET(tpl_model), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE }, #endif LEGACY_OPTIONS { NULL }