AR# 71546

|

Zynq UltraScale+ MPSoC - Video Codec Unit (VCU) - Why do the QP values not always follow my QPs.hex file?

描述

Why do the QP values not always follow my QPs.hex file?

LOAD_QP only works for I frames, but NOT for P and B frames in my example.

Example:

The expected table is 10 11 12 13 14 15 16 10 11 12 13 14 15 16 for both I and P frames according to the QPs.hex provided. 

However, only the I frame follows the QPs.hex pointed to by LOAD_QP, while the P frame does not follow the QPs.hex as expected.

This can be seen when using the following command:

ffprobe -debug qp


 

LOAD_QP | RELATIVE_QP does not work for I, P, or B frames.

Neither I nor P follow the QPs.hex as expected.

This can be seen when using the following command:

ffprobe -debug qp


 

 

解决方案

This is the expected behavior.

1) LOAD_QP

The concern here is with the QP values of the P and B frames as shown by ffprobe. The reason that the QP values do not follow the expected load pattern is that this clip has a lot of static frames in which there is little motion in the macroblocks. 

As a result, macroblocks are marked as type 'skip' or their transform size is zero, which means that it does not matter what the QP value is for these macroblocks. 

The reason this might be a bit confusing is that 'ffprobe -debug qp' does not show all of this information. It is only showing the QP values, but you also need to know the macroblock type as well as the transform size. 


For example if the macroblock is marked as 'skip', then it does not matter what the QP value is as it does not affect the outcome.

With that said, if the user were to look at the macroblocks which are not marked as skip or do not have a transform size of zero, you will see that the QP values are as expected.

This is a bit easier to see in a stream where there is a lot of motion as there are fewer macroblocks with a size or zero or that are marked as type skip.

This can be seen when using the following command:

ffprobe -debug qp -debug mb_type


 

2) LOAD_QP | RELATIVE_QP

In this case the sequence will never exactly follow the QP input values, even for the I frames. This is because by definition the final QP values is only relative to the loaded QP values.

The P and B frames are the same as above where if there is little to no motion, then the macroblocks will be marked as skip and the QP value does not matter, and then the relative QP values are used for the macroblocks which do not have a transform size of zero or are not marked as type skip.

Note: There are some other analysis tools like Elecard StreamEye, which allow the user to see both at the same time.

链接问答记录

主要问答记录

AR# 71546
日期 09/21/2018
状态 Active
Type 综合文章
器件
IP
People Also Viewed