Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

H.264 1080p bitrate vs PSNR trajectory

RyanS
New Contributor I
661 Views

From this test and analysis "Quick Sync H.264 Encoding Performance and Quality Test" (which uses q264.exe) here: http://www.tetrachromesoftware.com/q264Test1Analysis/q264test_5.html

The PSNR (quality) vs bitrate trajectory falls off for 1080p above about 4000 Kbps, meaning that increasing the bitrate doesn't increase the quality like one would expect. Lower resolutions don't show this trajectory fall-off. This looks to me like something fundamental, but is there some setting q264.exe could be messing up to cause this?

 

 

0 Kudos
9 Replies
celli4
New Contributor I
661 Views

One thing to keep in mind, is I believe how this works is dramatically different between Haswell and Ivy Bridge, Sandy Bridge.

 

0 Kudos
RyanS
New Contributor I
661 Views

Yes, thanks, page 4 of the analysis compares those three generations and shows the same trajectory.

0 Kudos
Petter_L_Intel
Employee
661 Views

Hi Ryan,

can you please provide the specific encoder configuration you are using for the encode workload where you see observe the quality degradation.   You can use the Media SDK tracer tool to fetch the configuration details.

Regards,
Petter

0 Kudos
RyanS
New Contributor I
661 Views

Here is the tracer output. 

Note that the settings (other than bitrate) are the same for all of the runs that create the bitrate vs PSNR curves.

0 Kudos
Petter_L_Intel
Employee
661 Views

Thanks for the details Ryan.

We are investigating this and will get back to you shortly.

Regards,
Petter

0 Kudos
Petter_L_Intel
Employee
661 Views

Hi again Ryan,

We have studied the behavior for the encoder configuration you provided in further detail.

For configurations with high number of B frames (in your case 4) the HW encoder is known to have limitations with regards to quality on high bit rates. So, in essence this behavior is expected.

You should be getting better results using for instance 2 B-frames. You may also explore other rate control modes than AVBR to see if it produced better results.

Regards,
Petter

0 Kudos
RyanS
New Contributor I
661 Views

q264 uses the normal GopPicSize, GopRefDist, and IdrInterval parameters in mfxInfoMFX to determine encoded frame types. 

Can you clarify what you mean when you say "2 B frames"? Do you mean the number of consecutive B frames? Do you mean reduce the number of consecutive B-frames by setting GopRefDist?

 

0 Kudos
Petter_L_Intel
Employee
661 Views

Hi Ryan,

Right. The number of B-frames following a P frame can be controlled by the GopRefDist parameter. If you set GopRefDist to 3 you will generate two consecutive B-frames, such as the following pattern IPBBPBBPBBPBB...

BTW. GopRefDist = 1 means no B-frames.

Regards,
Petter

 

0 Kudos
RyanS
New Contributor I
661 Views

Okay, thanks. I tried other bitrate control methods and GOP params (including GopRefDist) and saw slight changes in PSNR, but no significant differences.

Ryan

0 Kudos
Reply