vmh264: fix the mosic when resolution changing [1/1]
authormiaohong chen <miaohong.chen@amlogic.com>
Fri, 19 Jun 2020 02:53:42 +0000 (10:53 +0800)
committerMiaohong Chen <miaohong.chen@amlogic.com>
Tue, 23 Jun 2020 07:53:35 +0000 (00:53 -0700)
PD#SWPL-28253

Problem:
Mosaic appears from small resolution to large resolution.

Solution:
causes:After conversion, the small resolution frame buffers are not released,
and are used by the large resolution code stream.
Mark the small resolution frame buffer as ready to release.

Verify:
u212

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

index 5c19e9ea2e46389eff41f14daef274fee528e682..ad557220d78a45d06ea7dc5b96f1eea83a5da369 100644 (file)
@@ -1678,7 +1678,7 @@ static void buf_spec_init(struct vdec_h264_hw_s *hw, bool buffer_reset_flag)
        }
        if (buffer_reset_flag) {
                for (i = 0; i < BUFSPEC_POOL_SIZE; i++) {
-                       if (hw->buffer_spec[i].used != -1)
+                       if (hw->buffer_spec[i].used == 1 || hw->buffer_spec[i].used == 2)
                                hw->buffer_spec[i].used = 0;
                }
        } else {