diff options
author | Peng Yixin <yixin.peng@amlogic.com> | 2018-06-13 19:40:10 +0800 |
---|---|---|
committer | Zhi Zhou <zhi.zhou@amlogic.com> | 2018-07-18 20:11:42 -0700 |
commit | 4010e48fca98d2a151ab78cea149e02ec0ae20e9 (patch) | |
tree | da80da00044f318a9154c574e12bfb8a6dd75f4d | |
parent | 6da7a8e832c323e21e3cb7dc6dc218700236c29d (diff) | |
download | media_modules-4010e48fca98d2a151ab78cea149e02ec0ae20e9.tar.gz |
media_module: fix issue on h265
PD#167443:
1.fix allocate memory fail: add a judgment statement about the width and height of video.
2.add code to put mv buffer when already got mv buffer and allocation mmu memory failure.
Change-Id: I9934716cbe0157b02b5f64c6a53e73bb8e1d7fc2
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 40b02e9..a63cfe9 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -4581,6 +4581,7 @@ static struct PIC_s *get_new_pic(struct hevc_state_s *hevc, rpm_param->p.bit_depth, hevc->frame_mmu_map_addr); if (ret != 0) { + put_mv_buf(hevc, new_pic); hevc_print(hevc, 0, "can't alloc need mmu1,idx %d ret =%d\n", new_pic->decode_idx, @@ -8251,7 +8252,8 @@ pic_done: hevc->lcu_size = 1 << (log + 3 + log_s); hevc->lcu_size_log2 = log2i(hevc->lcu_size); if (hevc->pic_w == 0 || hevc->pic_h == 0 - || hevc->lcu_size == 0) { + || hevc->lcu_size == 0 + || OVER_SIZE(hevc->pic_w, hevc->pic_h)) { /* skip search next start code */ WRITE_VREG(HEVC_WAIT_FLAG, READ_VREG(HEVC_WAIT_FLAG) & (~0x2)); |