summaryrefslogtreecommitdiff
authorHui Zhang <hui.zhang@amlogic.com>2019-01-30 11:34:12 (GMT)
committer Shen Liu <shen.liu@amlogic.com>2019-04-02 05:26:49 (GMT)
commitb534691fd5c6d78cc3a0d342b240723d96902851 (patch)
tree61b4836fbe8fb69f72e4891dadf538a80be59fef
parentf8685fdc0fbaa36a9e3045833186101fdfba0d3f (diff)
downloadmedia_modules-b534691fd5c6d78cc3a0d342b240723d96902851.zip
media_modules-b534691fd5c6d78cc3a0d342b240723d96902851.tar.gz
media_modules-b534691fd5c6d78cc3a0d342b240723d96902851.tar.bz2
media_module: vmh264: skip crop handle in mmu mode [1/1]
PD#SWPL-4349 Problem: some stream with crop info. it cause decoding size is different with display size. if using display size, timeout will be happened in mmu hardware. it's root cause of cts fail Solution: use acurate decoding size to mmu hardware instead of display size Verify: X301 Change-Id: Ib93f061c50c7ccb941950c8eeb3591fe4e65e00c Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
Diffstat
-rw-r--r--drivers/frame_provider/decoder/h264_multi/vmh264.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/vmh264.c b/drivers/frame_provider/decoder/h264_multi/vmh264.c
index 17b4a1a..22696db 100644
--- a/drivers/frame_provider/decoder/h264_multi/vmh264.c
+++ b/drivers/frame_provider/decoder/h264_multi/vmh264.c
@@ -1446,7 +1446,7 @@ static void hevc_sao_set_pic_buffer(struct vdec_h264_hw_s *hw,
#endif
ret = hevc_alloc_mmu(hw, pic->buf_spec_num,
- hw->frame_width, hw->frame_height, 0x0,
+ (hw->mb_width << 4), (hw->mb_height << 4), 0x0,
hw->frame_mmu_map_addr);
if (ret != 0) {
dpb_print(DECODE_ID(hw),
@@ -3952,13 +3952,17 @@ static int vh264_set_params(struct vdec_h264_hw_s *hw,
if (hw->frame_height == 1088)
hw->frame_height = 1080;
#endif
-
- mb_width = (mb_width+3) & 0xfffffffc;
- mb_height = (mb_height+3) & 0xfffffffc;
+ if (!hw->mmu_enable) {
+ mb_width = (mb_width+3) & 0xfffffffc;
+ mb_height = (mb_height+3) & 0xfffffffc;
+ }
mb_total = mb_width * mb_height;
+ hw->mb_width = mb_width;
+ hw->mb_height = mb_height;
+ hw->mb_total = mb_total;
if (hw->mmu_enable)
hevc_mcr_sao_global_hw_init(hw,
- hw->frame_width, hw->frame_height);
+ (hw->mb_width << 4), (hw->mb_height << 4));
reg_val = param4;
level_idc = reg_val & 0xff;
@@ -3969,10 +3973,6 @@ static int vh264_set_params(struct vdec_h264_hw_s *hw,
level_idc, max_reference_size);
p_H264_Dpb->colocated_buf_size = mb_total * 96;
- hw->mb_total = mb_total;
- hw->mb_width = mb_width;
- hw->mb_height = mb_height;
-
hw->dpb.reorder_pic_num =
get_max_dec_frame_buf_size(level_idc,
max_reference_size, mb_width, mb_height);
@@ -7376,7 +7376,7 @@ static void run(struct vdec_s *vdec, unsigned long mask,
amhevc_start();
if (hw->config_bufmgr_done) {
hevc_mcr_sao_global_hw_init(hw,
- hw->frame_width, hw->frame_height);
+ (hw->mb_width << 4), (hw->mb_height << 4));
hevc_mcr_config_canv2axitbl(hw, 1);
}
}