[x265] [PATCH] modify the minimum keyint value

Deepthi Nandakumar deepthipnandakumar at gmail.com
Tue Sep 27 21:20:11 CEST 2016


Ok - makes sense to err on the side of extra i-frames during a scenecut,
but guaranteeing fixed GOPs at the same time. Maybe an addendum to the 2.1
release notes?

On Mon, Sep 26, 2016 at 8:35 PM, Pradeep Ramachandran <
pradeep at multicorewareinc.com> wrote:

> Deepthi,
> The behavior of scene-cut doesn't change in anyway. For closed-gop, if a
> scenecut is detected beyond min-keyint, an IDR frame is introduced, else, a
> non-IDR I-frame is introduced. Like Tom mentioned, disabling the automatic
> clipping of min-keyint enables x265 to guarantee a fixed-GOP length
> (between IDR-frames) when min-keyint is set to keyint even with
> scenecut-enabled. From our experiments, this seems to give better encoding
> efficiency than turning off scencut detection to guarantee fixed GOP
> lengths.
>
> Pradeep.
>
> On Tue, Sep 27, 2016 at 12:39 AM, Tom Vaughan <
> tom.vaughan at multicorewareinc.com> wrote:
>
>> We concluded that it doesn’t make sense to prevent the ability to encode
>> with a fixed GOP size, regardless of whether or not a user wants scenecut
>> enabled.  This patch enables users to specify a min-keyint that is equal to
>> keyint (a fixed keyint) that x265 does not override.  Separately, we’ve
>> also fixed our scenecut option to enable the benefits of scenecut detection
>> with fixed GOP structures.
>>
>>
>>
>> *From:* x265-devel [mailto:x265-devel-bounces at videolan.org] *On Behalf
>> Of *Deepthi Nandakumar
>> *Sent:* Monday, September 26, 2016 12:01 PM
>> *To:* Development for x265
>> *Subject:* Re: [x265] [PATCH] modify the minimum keyint value
>>
>>
>>
>> Earlier, keyframeMin was fixed to the range (1, keyframeMax/2 + 1). This
>> patch removes the upper bound, but does not change behaviour wrt scenecut
>> threshold in any way.
>>
>>
>>
>> On Thu, Sep 22, 2016 at 3:14 AM, <gopi.satykrishna at multicorewareinc.com>
>> wrote:
>>
>> # HG changeset patch
>> # User Gopi Satykrishna Akisetty <gopi.satykrishna at multicorewareinc.com>
>> # Date 1474539223 -19800
>> #      Thu Sep 22 15:43:43 2016 +0530
>> # Node ID 24ecccf7b435e849545e161a0992f452875f6bbc
>> # Parent  bdf098eefd35b70b68419f5a204e60f1df4aeae1
>> modify the minimum keyint value
>>
>> This patch enables fixed gop size even when scenecut option is enabled
>>
>> diff -r bdf098eefd35 -r 24ecccf7b435 doc/reST/cli.rst
>> --- a/doc/reST/cli.rst  Thu Sep 22 13:26:57 2016 +0530
>> +++ b/doc/reST/cli.rst  Thu Sep 22 15:43:43 2016 +0530
>> @@ -1141,10 +1141,10 @@
>>  .. option:: --min-keyint, -i <integer>
>>
>>         Minimum GOP size. Scenecuts closer together than this are coded
>> as I
>> -       or P, not IDR. Minimum keyint is clamped to be at least half of
>> -       :option:`--keyint`. If you wish to force regular keyframe
>> intervals
>> +       or P, not IDR. If you wish to force regular keyframe intervals
>>         and disable adaptive I frame placement, you must use
>> -       :option:`--no-scenecut`.
>> +       :option:`--no-scenecut` or give minimum keyint equal to keyint
>> +       with scenecut enabled.
>>
>>         **Range of values:** >=0 (0: auto)
>>
>> diff -r bdf098eefd35 -r 24ecccf7b435 source/encoder/encoder.cpp
>> --- a/source/encoder/encoder.cpp        Thu Sep 22 13:26:57 2016 +0530
>> +++ b/source/encoder/encoder.cpp        Thu Sep 22 15:43:43 2016 +0530
>> @@ -1660,7 +1660,7 @@
>>          double fps = (double)p->fpsNum / p->fpsDenom;
>>          p->keyframeMin = X265_MIN((int)fps, p->keyframeMax / 10);
>>      }
>> -    p->keyframeMin = X265_MAX(1, X265_MIN(p->keyframeMin, p->keyframeMax
>> / 2 + 1));
>> +    p->keyframeMin = X265_MAX(1, p->keyframeMin);
>>
>>      if (!p->bframes)
>>          p->bBPyramid = 0;
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>>
>>
>>
>>
>> --
>>
>> Deepthi
>>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>


-- 
Deepthi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20160927/ddcfbf01/attachment-0001.html>


More information about the x265-devel mailing list