关于VPU的IDR很大的问题。

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

关于VPU的IDR很大的问题。

Jump to solution
1,848 Views
tukenan
Contributor II

      我之前用TI的DM368做VPU编码,每秒插一个I帧,也是1.2M的码率,I帧大小在10000多。用IMX6Q的板子,码率在3W-6W不等,移动的时候更高。这样,我用SPI分包发送会很占用时间。是不是有地方可以限制I帧大小呢?

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,486 Views
frank_zhang
NXP Employee
NXP Employee

Hi,

    Please refer to the VPU application programing reference manual.

rcIntraQp is the quantization parameter for I frame. When this value is -1, the quantization parameter for I frames is
automatically determined by VPU. In MPEG4/H.263 mode, the range is 1-31. In H.264 mode, the range is from 0-51. This is
ignored for STD_MJPG.

userQpMax sets the maximum quantized step parameter for the encoding process. -1 disables this setting and VPU uses the
default maximum quantized step. In MPEG-4/H.263 mode, the value of userQpMax is in the range of 1 to 31. In H.264
mode, the value of userQpMax is in the range of 0 to 51. userQpMin and userQpMax must be set simultaneously.
userQpMinEnable userQpMinEable equal to 1 indicates that macroblock QP, generated in rate control, is cropped to be
bigger than, or equal to, userQpMin.
userQpMaxEnable userQpMaxEable equal to 1 indicates that macroblock QP, generated in rate control, is cropped to be
smaller than, or equal to, userQpMax.

      And you can also control the GOP size by " gopSize". Thank you!

Best Regards.

Frank

View solution in original post

0 Kudos
4 Replies
1,486 Views
frank_zhang
NXP Employee
NXP Employee

Hi 

    不好意思,我并不了解如何解答SPI的问题,建议你查阅一下datasheet是否有有关时序限制的说明。希望其他同事能帮助你解答这个问题。谢谢!

Best Regards,

Frank

0 Kudos
1,486 Views
tukenan
Contributor II

好吧,还是很感谢你~

0 Kudos
1,487 Views
frank_zhang
NXP Employee
NXP Employee

Hi,

    Please refer to the VPU application programing reference manual.

rcIntraQp is the quantization parameter for I frame. When this value is -1, the quantization parameter for I frames is
automatically determined by VPU. In MPEG4/H.263 mode, the range is 1-31. In H.264 mode, the range is from 0-51. This is
ignored for STD_MJPG.

userQpMax sets the maximum quantized step parameter for the encoding process. -1 disables this setting and VPU uses the
default maximum quantized step. In MPEG-4/H.263 mode, the value of userQpMax is in the range of 1 to 31. In H.264
mode, the value of userQpMax is in the range of 0 to 51. userQpMin and userQpMax must be set simultaneously.
userQpMinEnable userQpMinEable equal to 1 indicates that macroblock QP, generated in rate control, is cropped to be
bigger than, or equal to, userQpMin.
userQpMaxEnable userQpMaxEable equal to 1 indicates that macroblock QP, generated in rate control, is cropped to be
smaller than, or equal to, userQpMax.

      And you can also control the GOP size by " gopSize". Thank you!

Best Regards.

Frank

0 Kudos
1,486 Views
tukenan
Contributor II

thank you! 我英语能看懂,扣字不利索,用中文回你。

        这个问题,我前几天已经解决,确实如你所述。修改 rcIntraQp 即可。现在我的VPU码率降到0.8M了,I帧大小控制在12000左右了,但是我发现SPI发送的时候有个问题(SPI发送速率1.8),.就是SPI发送每个burst之间有一个2.7us的waitstates,我的一个字节才4us左右。我的burst是一个8bit的。我看 ECSPIx_PERIODREG[SAMPLE_PERIOD]这位已经是最小了。一个I帧12000字节,这样就多了30ms,效率很低的。我每秒25帧的VPU压缩的图像,每秒一个I帧,这样子我的图像每秒会卡一下。。很难受。有没有什么解决办法,尝试修改寄存器很多次,困惑再次burst.jpgpastedImage_2.png

0 Kudos