# HG changeset patch # User Bhavna Hariharan <bha...@multicorewareinc.com> # Date 1506344707 -19800 # Mon Sep 25 18:35:07 2017 +0530 # Node ID 0fb6bc88eb81b22ae1ec693f67b715606025fe8d # Parent f8ae7afc1f61ed0db3b2f23f5d581706fe6ed677 fix multiple insertion of payloadSize into bitstream
bitbucket issue #369 diff -r f8ae7afc1f61 -r 0fb6bc88eb81 source/encoder/encoder.cpp --- a/source/encoder/encoder.cpp Mon Sep 11 11:12:19 2017 +0530 +++ b/source/encoder/encoder.cpp Mon Sep 25 18:35:07 2017 +0530 @@ -631,12 +631,12 @@ int32_t i = 0; toneMap.payloadSize = 0; while (m_cim[currentPOC][i] == 0xFF) - toneMap.payloadSize += m_cim[currentPOC][i++] + 1; - toneMap.payloadSize += m_cim[currentPOC][i] + 1; + toneMap.payloadSize += m_cim[currentPOC][i++]; + toneMap.payloadSize += m_cim[currentPOC][i]; toneMap.payload = (uint8_t*)x265_malloc(sizeof(uint8_t) * toneMap.payloadSize); toneMap.payloadType = USER_DATA_REGISTERED_ITU_T_T35; - memcpy(toneMap.payload, m_cim[currentPOC], toneMap.payloadSize); + memcpy(toneMap.payload, &m_cim[currentPOC][i+1], toneMap.payloadSize); } } #endif
# HG changeset patch # User Bhavna Hariharan <bha...@multicorewareinc.com> # Date 1506344707 -19800 # Mon Sep 25 18:35:07 2017 +0530 # Node ID 0fb6bc88eb81b22ae1ec693f67b715606025fe8d # Parent f8ae7afc1f61ed0db3b2f23f5d581706fe6ed677 fix multiple insertion of payloadSize into bitstream bitbucket issue #369 diff -r f8ae7afc1f61 -r 0fb6bc88eb81 source/encoder/encoder.cpp --- a/source/encoder/encoder.cpp Mon Sep 11 11:12:19 2017 +0530 +++ b/source/encoder/encoder.cpp Mon Sep 25 18:35:07 2017 +0530 @@ -631,12 +631,12 @@ int32_t i = 0; toneMap.payloadSize = 0; while (m_cim[currentPOC][i] == 0xFF) - toneMap.payloadSize += m_cim[currentPOC][i++] + 1; - toneMap.payloadSize += m_cim[currentPOC][i] + 1; + toneMap.payloadSize += m_cim[currentPOC][i++]; + toneMap.payloadSize += m_cim[currentPOC][i]; toneMap.payload = (uint8_t*)x265_malloc(sizeof(uint8_t) * toneMap.payloadSize); toneMap.payloadType = USER_DATA_REGISTERED_ITU_T_T35; - memcpy(toneMap.payload, m_cim[currentPOC], toneMap.payloadSize); + memcpy(toneMap.payload, &m_cim[currentPOC][i+1], toneMap.payloadSize); } } #endif
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel