diff options
author | Srinu Gorle <sgorle@codeaurora.org> | 2013-05-13 18:45:03 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-06-28 04:57:04 -0700 |
commit | 6193d230edb64d685ada4dfde3549ce5a7c5c63c (patch) | |
tree | 5c39c4c2e1282a671a15737fd29ab2c9fdbc0951 /mm-video | |
parent | d4f83efc62a7f2b3aba5f5464b49e8b00d6c6630 (diff) | |
download | android_hardware_qcom_media-6193d230edb64d685ada4dfde3549ce5a7c5c63c.tar.gz android_hardware_qcom_media-6193d230edb64d685ada4dfde3549ce5a7c5c63c.tar.bz2 android_hardware_qcom_media-6193d230edb64d685ada4dfde3549ce5a7c5c63c.zip |
mm-video: Adjust 3 byte start code address, if multiple DMX entries found
- Core is not able to decode bit stream, when three byte start code
0X000001 is a part of consecutive NAL's provided in single ETB.
- Start address of NAL entry in DMX should be moved one byte backward
as video core skipping 0X0000 skipping in every NAL bit stream.
Change-Id: Ia816175e7b821dcb30200a3bd934896efd3ea20f
CRs-Fixed: 468664
Diffstat (limited to 'mm-video')
-rw-r--r-- | mm-video/vidc/vdec/src/omx_vdec.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/mm-video/vidc/vdec/src/omx_vdec.cpp b/mm-video/vidc/vdec/src/omx_vdec.cpp index 8d672242..49de51b5 100644 --- a/mm-video/vidc/vdec/src/omx_vdec.cpp +++ b/mm-video/vidc/vdec/src/omx_vdec.cpp @@ -9361,23 +9361,29 @@ void omx_vdec::extract_demux_addr_offsets(OMX_BUFFERHEADERTYPE *buf_hdr) while (index < bytes_to_parse) { - if ( ((buf[index] == 0x00) && (buf[index+1] == 0x00) && - (buf[index+2] == 0x00) && (buf[index+3] == 0x01)) || - ((buf[index] == 0x00) && (buf[index+1] == 0x00) && - (buf[index+2] == 0x01)) ) - { - if ((((index+3) - prev_sc_index) <= 4) && m_demux_entries) - { - DEBUG_PRINT_ERROR("FOUND Consecutive start Code, Hence skip one"); - m_demux_entries--; + if (((buf[index] == 0x00) && (buf[index+1] == 0x00) && + (buf[index+2] == 0x00) && (buf[index+3] == 0x01))) { // 4 byte start code + if ((((index+3) - prev_sc_index) <= 4) && m_demux_entries) { + DEBUG_PRINT_ERROR("FOUND Consecutive start Code, Hence skip one"); + m_demux_entries--; } //Found start code, insert address offset insert_demux_addr_offset(index); - if (buf[index+2] == 0x01) // 3 byte start code + index += 4; + } + else if ((buf[index] == 0x00) && (buf[index+1] == 0x00) && // 3 byte start code + (buf[index+2] == 0x01)) { + if ((((index+3) - prev_sc_index) <= 4) && m_demux_entries) { + DEBUG_PRINT_ERROR("FOUND Consecutive start Code, Hence skip one"); + m_demux_entries--; + } + + if (m_demux_entries>0) + insert_demux_addr_offset(index-1); + else + insert_demux_addr_offset(index); + index += 3; - else //4 byte start code - index += 4; - prev_sc_index = index; } else index++; |