From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 00DE6406D9 for ; Tue, 29 Mar 2022 20:58:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E991F68B0BE; Tue, 29 Mar 2022 23:58:30 +0300 (EEST) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6CF9E68A5CC for ; Tue, 29 Mar 2022 23:58:25 +0300 (EEST) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-2d07ae0b1c4so196768307b3.11 for ; Tue, 29 Mar 2022 13:58:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=4k+QxjFfLtu8z9jESVAfE4GbRxpnhQfNNchhYewU/dk=; b=C552UBk3V3wocpRWcfItsE3N/FRvTk+Y+A4d8eCw7YVJ67VW58liYUJ+fngrJGTO/p IHJqs04JRBdXRs/QZlKBn4SrJ6dgEbRsUeG86aqCkwjUYgonibNhWU9QO2hL8TKJ3Gd1 2q2D79BzY0gGt6u66x4euZ1rWAuA1+jcOVIpzTf61NwuSty5dcmWjfj9Eaug8xqt4g/c swoNbIdtGB4uZ2e14fhsdmXQTMc+ijhLW6oFh0kgLisES3f73p9nGXkH1KI71NfvMINi 1gi6RBVcDCqKcdyiN8PmVy7/s25jypc2NW9A0J1BuAKo9lpmOVTvU+AZZkaN4w3QQMdA LKrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=4k+QxjFfLtu8z9jESVAfE4GbRxpnhQfNNchhYewU/dk=; b=q8hKEuGuzqQ4fCeBX1nfl0AIHAMpIymr/5x7acRchddwGoauyhQ/aBOBBXpSZdjIwb l7poGaRpKUvQmipIdPhun8mw1HTAA5br9jmXejDUR0F0st8XcLkC7o5JnWSWpeOHk/tI NYlnicBncxQ5t+M+KAHdWP/LNzK1d/weGev7JBUV68iGRvr0/coFCUlWYqgGJjOH1tZg R5d61/boIOnlAfibrWgkcYPW9AGD3GQ8npnP6cubhhRG44VuOkTD0Gkgz/9DQ8M353/w fcfsPqC3jgp7USQC/7Xcq2BAHjpdo5gnZEwEP0Rj67XkN4pEkCrK0c/QvoUJ4eT85Wa1 DdxQ== X-Gm-Message-State: AOAM531yEPOcRiUkdzGHWBxSRyy+f4OKS6oQgJqaV9J9sZtuQMhRvc2R cL8Mpd1DUYnfaLaNB/Z6cnnyv+QlaaOS8B6jV7szPnRM8VY= X-Google-Smtp-Source: ABdhPJyjRjONtDScSoZpg3baVgy53l120mffyOPA91/TR50TJkjtfAJCd2Ou8U2HvbRTEoNGOVXFsuKqiAD0vMdE0Dk= X-Received: by 2002:a0d:e648:0:b0:2ea:9ba:c1cc with SMTP id p69-20020a0de648000000b002ea09bac1ccmr17761521ywe.197.1648587503467; Tue, 29 Mar 2022 13:58:23 -0700 (PDT) MIME-Version: 1.0 References: <20220316120759.2292546-1-danilchap@google.com> <20220324131116.825587-1-danilchap@google.com> In-Reply-To: From: James Zern Date: Tue, 29 Mar 2022 13:58:12 -0700 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] avcodec/libvpxenc: enable dynamic max quantizer parameter reconfiguration X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, Mar 28, 2022 at 7:05 AM Danil Chapovalov wrote: > > On Thu, Mar 24, 2022 at 7:27 PM James Zern wrote: > > > > On Thu, Mar 24, 2022 at 6:12 AM Danil Chapovalov > > wrote: > > > > > > --- > > > libavcodec/libvpxenc.c | 6 ++++++ > > > 1 file changed, 6 insertions(+) > > > > > > diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c > > > index dff1d06b0e..463a658bb0 100644 > > > --- a/libavcodec/libvpxenc.c > > > +++ b/libavcodec/libvpxenc.c > > > @@ -1625,6 +1625,12 @@ static int vpx_encode(AVCodecContext *avctx, AVPacket *pkt, > > > vpx_svc_layer_id_t layer_id; > > > int layer_id_valid = 0; > > > > > > + if (avctx->qmax >= 0 && enccfg->rc_max_quantizer != avctx->qmax) { > > > + struct vpx_codec_enc_cfg cfg = *enccfg; > > > + cfg.rc_max_quantizer = avctx->qmax; > > > + vpx_codec_enc_config_set(&ctx->encoder, &cfg); > > > + } > > > + > > > > Jan, I think this was what you were suggesting, no? > > The docs could be updated to note qmax can be changed per-frame > > [1][2]. Saying that, it does seem a bit unbalanced to only do qmax > > here. > > > > [1] https://ffmpeg.org/ffmpeg-codecs.html#libvpx > > [2] https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/doc/encoders.texi#l2000 > > As I understand, docs describe command line options. > I do not plan to expose changing qmax per frame as a command line > option, I do not see how that can be reasonably done. My intent is to > change max qp when ffmpeg is used as a library. > That is true, I was thinking about it from the library perspective. libx264 doesn't mention this behavior but the codec options section does talk about setting these from the API, so I think a note is worthwhile as this is the only point of documentation for the codec wrapper. > I agree it looks unbalanced to change just the qmax, but that is the > only parameter I currently need for my usecase. Personally I prefer to > only add features that are planned to be used. > Are there any particular configuration settings you want me to make > configurable, > or do you think it is better to support all settings that can be configurable? Since libvpx supports a reconfigure it should be safe to check the options again. There is some complexity in that, though, so we can leave this as a targeted approach similar to libx264 for now unless others have a strong opinion. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".