PDA

View Full Version : x264 and max bitrate in HP@4.0


Atak_Snajpera
21st November 2008, 22:38
According to wiki maximum bitrate for High Profile 4.0 is 25000kbps but x264 claims that max should be 20000kbps. Who is right and who is wrong???

akupenguin
21st November 2008, 22:50
Max bitrate for a given level depends on profile and colorspace, but I think that's silly so x264 ignores it.

Atak_Snajpera
21st November 2008, 23:13
Max bitrate for a given level depends on profile and colorspace, but I think that's silly so x264 ignores it.
Yes I know that but the problem is that http://en.wikipedia.org/wiki/H.264#Levels says that max bitrate for High Profile 4.0 is 25mbps not 20mbps. However 20mbps is correct for BaseLine/Main Profile 4.0. x264 always complains if value is above 20mbps limit even if I use High Profile.

akupenguin
22nd November 2008, 00:00
Options acceptable to me:
* No change, and tell people to just deal
* Remove the warning, and assume people know what they're asking for if they type --level 4.0 --vbv-maxrate 9999999
* Use high profile numbers regardless of what profile is selected

Atak_Snajpera
22nd November 2008, 00:10
Wouldn't be more professional to adjust warning message according to selected profile (Main or High) and then compare --vbv-maxrate value? It would be peace of cake for you developers :)

* Remove the warning, and assume people know what they're asking for if they type --level 4.0 --vbv-maxrate 9999999
This option is also good

Dark Shikari
22nd November 2008, 00:14
Meh, I'll get around to looking at it sometime...

akupenguin
22nd November 2008, 00:59
Wouldn't be more professional
I don't want to be professional. I want to be sane, even when the standard isn't.

kemuri-_9
22nd November 2008, 01:01
according to the spec sheet,
there is a bit of stipulations in what the max is

Baseline, Main, and Extended Profiles
A. "For the VCL HRD parameters, BitRate[ SchedSelIdx ] <= 1000 * MaxBR"
B. "For the NAL HRD parameters, BitRate[ SchedSelIdx ] <= 1200 * MaxBR"
"where BitRate[ SchedSelIdx ] is given by Equation E-37"

for level 4.0 MaxBR is 20 000 bps.

High, High 10, High 4:2:2, High 4:4:4 Predictive, High 10 Intra,
High 4:2:2 Intra, High 4:4:4 Intra, and CAVLC 4:4:4 Intra Profiles
A. "VCL HRD parameters, BitRate[ SchedSelIdx ] <= cpbBrVclFactor * MaxBR"
B. "NAL HRD parameters, BitRate[ SchedSelIdx ] <= cpbBrNalFactor * MaxBR"
"where BitRate[ SchedSelIdx ] is given by Equation E-37"

the above factors are profile dependent and are as follows:
Profile | cpbBrVclFactor | cpbBrNalFactor
High | 1250 | 1500
High 10 | 3000 | 3600
High 10 Intra | 3000 | 3600
High 4:2:2 | 4000 | 4800
High 4:2:2 Intra | 4000 | 4800
High 4:4:4 Predictive | 4000 | 4800
High 4:4:4 Intra | 4000 | 4800
CAVLC 4:4:4 Inta | 4000 | 4800

so in effect there's several limits, as to which one gets used is dependent on what you have
Example Level 4.0 Max Bitrates:
VCL + Baseline = 20 000 kbps
NAL + Baseline = 24 000 kbps
VCL + High = 25 000 kbps
NAL + High = 30 000 kbps

all in all, this IS insane as it's so complicated

Manao
22nd November 2008, 09:43
I don't want to be professional. I want to be sane, even when the standard isn't. It's not a question of sanity. Either you want to do it or not. You obviously don't, which is fine by me, but you don't need to invoke bogus reasons to do so.

The bitrate increases for 422 / 444 / 10bits profiles makes perfect sense (without them, you would end up with useless levels, since the max bitrate wouldn't be coherent with the complexity of the content for a given application). The bitrate increase for high profile, in itself, makes less sense (since high profile actually increase compression). But it should be seen as a way to correct initial figures given for main profile, which were a bit low.

Atak_Snajpera
22nd November 2008, 11:37
all in all, this IS insane as it's so complicated
So I would remove those warnings from x264. This job belongs to guis.