i.MX6Q VPU: Enabling intraRefresh encoding

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

i.MX6Q VPU: Enabling intraRefresh encoding

Jump to solution
1,451 Views
rebelalliance
Contributor III

Hi,

I am interested in using the i.MX6Q VPU to encode H.264 streams with intra-refresh enabled.  For this I looked up in the i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual, Rev L3.0.35_4.0.0, 05/2013, page 24 where it states that setting the intraRefresh field to a non-zero value in EncOpenParam structure and passing to the vpu_EncOpen() API will enable intra-refresh:

intraRefresh where 0 = Intra MB refresh is not used. Otherwise = At least N MB's in every P-frame are encoded as intra MB's. This value is ignored in for STD_MJPG.

So, following the above directions, I set intraRefresh to different non-zero values (800, 2400, etc) and encoded 1080 H.264 streams from the camera.  Upon examination of the streams, it looks likes there are still I-frames in the video.  I am under the impression that when intra-refresh parameter is enabled then there would be no I frames in the video, just P frames with the Intra MBs embedded within. 

I am modifying vpu_wrapper.c from the 4.0.0 LTIB release.  In VPU_EncOpen(), I set sEncOpenParam.intraRefresh = 2400.  Also tried other values.

My question is why the VPU is still generating I-frames despite the intra-refresh option set?

Also whether there are other options I need to enable/modify to get this to encode properly?


Thanks.

Labels (3)
0 Kudos
Reply
1 Solution
805 Views
eaglezhou
NXP Employee
NXP Employee

Hi, rebelalliance

    The parameter intraRefresh only affect the P frame, it isn't related with I frame.

    If you want to encode clip with rare I frame, you can enlarge the I frame interval through assign one big GOP size.

Regard

Eagle

View solution in original post

0 Kudos
Reply
1 Reply
806 Views
eaglezhou
NXP Employee
NXP Employee

Hi, rebelalliance

    The parameter intraRefresh only affect the P frame, it isn't related with I frame.

    If you want to encode clip with rare I frame, you can enlarge the I frame interval through assign one big GOP size.

Regard

Eagle

0 Kudos
Reply