vmh264: fix bug of stream not fluent [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Thu, 21 May 2020 02:16:07 +0000 (10:16 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Mon, 25 May 2020 04:22:42 +0000 (21:22 -0700)
PD#SWPL-26687

Problem:
Multi-instance h264 stream not fluent.

Solution:
The code stream has two sps but the id is 0.
As a result, the sps syntax is not updated,
and the original frame_mbs_only_flag is used,
resulting in an error.
update original frame_mbs_only_flag when reset.

Verify:
u212

Change-Id: I3d731b73d504d4bd9403382e088fcb31c64fd15f
Signed-off-by: miaohong chen <miaohong.chen@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c

index 19ffea79e2b78559bb073b1aef6cded434cd2305..99e51cba7732522466feead0118297fc922a1470 100644 (file)
@@ -9224,6 +9224,11 @@ static void h264_reset_bufmgr(struct vdec_s *vdec)
        /*hw->decode_pic_count = 0;
        hw->seq_info2 = 0;*/
 
+       hw->cfg_param1 = READ_VREG(AV_SCRATCH_1);
+       hw->cfg_param2 = READ_VREG(AV_SCRATCH_2);
+       hw->cfg_param3 = READ_VREG(AV_SCRATCH_6);
+       hw->cfg_param4 = READ_VREG(AV_SCRATCH_B);
+
        if (vh264_set_params(hw,
                hw->cfg_param1,
                hw->cfg_param2,