media_module: tiny h264 stream decode error [1/1]
authorGan Zhang <gan.zhang@amlogic.com>
Tue, 8 Oct 2019 05:14:40 +0000 (13:14 +0800)
committerGan Zhang <gan.zhang@amlogic.com>
Tue, 15 Oct 2019 11:38:21 +0000 (04:38 -0700)
PD#SWPL-13083

Problem:
tiny h264 stream decode error

Solution:
disable this read cache when frame width <= 64
IQIDCT_CONTROL, bit[16] – dcac_dma_read_cache_disable

Verify:
AC213

Change-Id: I8a07b70347b335709ebe7be44735f6aa667801c6
Signed-off-by: Gan Zhang <gan.zhang@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c

index 52feccc88e33ee78fac2a85f2b82a0e848ff59d1..32241458e715659e02da49acf7efb254e14b528b 100644 (file)
@@ -3214,6 +3214,13 @@ int config_decode_buf(struct vdec_h264_hw_s *hw, struct StorablePicture *pic)
        j = 0;
        h264_buffer_info_data_write_count = 0;
 
+       //disable this read cache when frame width <= 64 (4MBs)
+       //IQIDCT_CONTROL, bit[16] – dcac_dma_read_cache_disable
+       if (hw->frame_width <= 64)
+               SET_VREG_MASK(IQIDCT_CONTROL,(1 << 16));
+       else
+               CLEAR_VREG_MASK(IQIDCT_CONTROL,(1 << 16));
+
        if (last_pic)
                dpb_print(DECODE_ID(hw), PRINT_FLAG_ERRORFLAG_DBG,
                                "last_pic->data_flag %x   slice_type %x last_pic->slice_type %x\n",