author | Hui Zhang <hui.zhang@amlogic.com> | 2018-12-31 09:53:57 (GMT) |
---|---|---|
committer | Luan Yuan <luan.yuan@amlogic.com> | 2019-01-09 03:15:30 (GMT) |
commit | 1f67eb9d58de6ea87d81d4bdae0b93ea95be3e13 (patch) | |
tree | 560911f5ffb76051d702662c6c56de65738cbdbb | |
parent | b0970a4891b88eaee944837486f4cafc8ad58be0 (diff) | |
download | media_modules-1f67eb9d58de6ea87d81d4bdae0b93ea95be3e13.zip media_modules-1f67eb9d58de6ea87d81d4bdae0b93ea95be3e13.tar.gz media_modules-1f67eb9d58de6ea87d81d4bdae0b93ea95be3e13.tar.bz2 |
media_module: fix cts test h265 hangup issue [1/1]
PD#SWPL-3089
Problem:
h265 decoder hangup, cause system reboot
Solution:
skip error data to avoid decoder crash
Verify:
Verified p212
Change-Id: I8834eb9d7897a1f0d95c0d9534febf35beba0c51
Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
-rw-r--r-- | drivers/frame_provider/decoder/h265/vh265.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/frame_provider/decoder/h265/vh265.c b/drivers/frame_provider/decoder/h265/vh265.c index 58676e8..c51c010 100644 --- a/drivers/frame_provider/decoder/h265/vh265.c +++ b/drivers/frame_provider/decoder/h265/vh265.c @@ -1648,6 +1648,7 @@ struct hevc_state_s { struct mutex chunks_mutex; int need_cache_size; u64 sc_start_time; + u32 skip_first_nal; } /*hevc_stru_t */; #ifdef AGAIN_HAS_THRESHOLD @@ -8630,10 +8631,15 @@ pic_done: hevc->lcu_size_log2 = log2i(hevc->lcu_size); if (hevc->pic_w == 0 || hevc->pic_h == 0 || hevc->lcu_size == 0 - || is_oversize(hevc->pic_w, hevc->pic_h)) { + || is_oversize(hevc->pic_w, hevc->pic_h) + || (!hevc->skip_first_nal && + (hevc->pic_h == 96) && (hevc->pic_w == 160))) { /* skip search next start code */ WRITE_VREG(HEVC_WAIT_FLAG, READ_VREG(HEVC_WAIT_FLAG) & (~0x2)); + if ( !hevc->skip_first_nal && + (hevc->pic_h == 96) && (hevc->pic_w == 160)) + hevc->skip_first_nal = 1; hevc->skip_flag = 1; WRITE_VREG(HEVC_DEC_STATUS_REG, HEVC_ACTION_DONE); /* Interrupt Amrisc to excute */ |