Log in

View Full Version : SVTHevcEncApp and gop sizes


Selur
28th September 2019, 10:21
I'm trying to understand the setting of SVTHevcEncApp and stumbled over setting the gop size:

Reading:
IntraPeriod -intra-period [-2 - 255] -2
Distance Between Intra Frame inserted.
-1 denotes no intra update.
-2 denotes auto.
IntraRefreshType -irefresh-type [-1,N] -1
-1: CRA (Open GOP)
>=0: IDR (Closed GOP, N is headers insertion interval, 0 supported if CQP, >=0 supported if VBR)
source: https://github.com/OpenVisualCloud/SVT-HEVC/blob/master/Docs/svt-hevc_encoder_user_guide.md

How I understand this is that:
1. using CQP
-irefresh-type can only be -1 or 0
2. using VBR
-irefresh-type can only be -1 to N

Problem is, I struggle with the differentiation of 'headers insertion interval' and 'Distance Between Intra Frame'.

So what does '-intra-period X' do when I use:
a. CQP + openGOP (-irefresh-type -1)
b. CQP + closedGOP (-irefresh-type 0)
c. VBR + openGOP (-irefresh-type -1)
d. VBR + openGOP 0 (-irefresh-type 0)
e. VBR + openGOP 1000 (-irefresh-type 1000)

Can someone explain this ?


-intra-period integer [Optional]

The intra period defines the interval of frames after which you insert an Intra refresh. It is strongly recommended to use (multiple of 8) -1 the closest to 1 second (e.g. 55, 47, 31, 23 should be used for 60, 50, 30, (24 or 25) respectively)
here it sounds like this is what I normally understand as max key int
If that is the case, what does 'irefresh-type' with a value > 0 do?


Cu Selur

Jamaika
28th September 2019, 12:37
I'm trying to understand the setting of SVTHevcEncApp and stumbled over setting the gop size:
Rarely who reads manuals.:p

https://x265.readthedocs.io/en/default/svthevc.html

How I understand this is that:
1. using CQP
-irefresh-type can only be -1 or 0
2. using VBR
-irefresh-type can only be -1 to N

Problem is, I struggle with the differentiation of 'headers insertion interval' and 'Distance Between Intra Frame'.
/* Random access.
*
* -1 = CRA, open GOP.
* >=0 = IDR, closed GOP, and the value is headers insertion interval.
*
* Default is -1. */
int32_t intraRefreshType;

d. VBR + openGOP 0 (-irefresh-type 0) = false
e. VBR + openGOP 1000 (-irefresh-type 1000) = false

/* The intra period defines the interval of frames after which you insert an
* Intra refresh. It is strongly recommended to set the value to multiple of
* 8 minus 1 the closest to 1 second (e.g. 55, 47, 31, 23 should be used for
* 60, 50, 30, (24 or 25) respectively.
*
* -1 = no intra update.
* -2 = auto.
*
* Deault is -2. */
int32_t intraPeriodLength;

If that is the case, what does 'irefresh-type' with a value > 0 do?
'irefresh-type' sets the value is headers insertion interval.
'intra-period' sets the GOP value. For GOP 60 and closed GOP 'irefresh-type' is 59

PS This is a test codec. The codec only works correctly for 10bit bitdepth.

Selur
28th September 2019, 19:54
Sadly that explanation doesn't really help my understanding. :/

'intra-period' sets the GOP value. For GOP 60 and closed GOP 'irefresh-type' is 59
So where is the difference between:
'-intra-period 60 -irefresh-type 59' and '-intra-period 60 -irefresh-type 0' ?

Cu Selur

Jamaika
28th September 2019, 21:45
And rightly so, that you don't understand. My mistake
'intra-period' sets the GOP value. For GOP 60 and closed GOP 'intra-period' is 59.

Defines the frequency of sequence header placement relative to GOPs. Sequence Headers include information required to decode the clip, such as buffer size, frame size, aspect ratio, frame rate, and bit rate. Sequence headers should occur more frequently for footage that will be edited or will be broadcast in order to allow access at any point in the video. Video encoded for DVD can have a sequence header only at the beginning.

For this you need a HEVC analyzer. From what I understand, 'irefresh-type' is zero for BluRay. 'irefresh-type' is similar to 'intra-period' for video.