I'm trying to encode a video to H264 using the iMX6 vpu encoder and I noticed a distortion every time an IDR frame arrives, you can see the distortion as a blur in the image mainly in areas of high detail. I was able to reproduce the issue using both the gstreamer plugins and the mxc-vpu-test.
Attached is a couple of videos, one is generated with the mxc-vpu-test using this command:
mxc-vpu-test -E "-f 2 -c 1000 -w 1920 -h 1080 -b 5000 -g 30 -x 1 -o /video_test.264"
The test by default doesn't generate IDR frames, but I modified it to generate them as follows:
if(frame_id % enc->cmdl->gop == 0) enc_param.forceIPicture = 1;
else enc_param.forceIPicture = 0;
The other one is using gstreamer configured to generate the same bitrate and as you can see, the blur appears every second.
I also attached a video with no IDR frames (and using a GOP of 30) and as you can see there is no distortion.
The problem is that I need IDR frames in my stream and increasing the bitrate seems to improve the quality but the problem is still there.
Is there a way to improve/eliminate this distortion?
Is this the expected behaviour for the baseline profile? I'm asking this because I saw a similar behaviour in a stream generated by a TI SoC configured the same way.
The videos were generated using kernel 3.0.35 and this firmware version:
VPU firmware version: 2.3.10_r40778
VPU library version: 5.4.19
but I've also seen the problem in newer versions.
Thanks for your help,