History

fix subsetsps parse and scalinglist bug fix

huili2 committed 9 years ago

Commit c5a09fa1 parent d0719d59 files · +157 −36Browse files

Showing the changes to test/decoder/DecUT_ParseSyntax.cpp (1 of 9 files). Show all

Unified · Split

test/decoder/DecUT_ParseSyntax.cpp+16−6
@@ -259,17 +259,25 @@ void DecoderParseSyntaxTest::TestScalingList() { · 258 unmodified lines
259 {10, 14, 20, 24, 14, 20, 24, 27, 20, 24, 27, 30, 24, 27, 30, 34 },259 {10, 14, 20, 24, 14, 20, 24, 27, 20, 24, 27, 30, 24, 27, 30, 34 },
260 { 9, 13, 18, 21, 13, 18, 21, 24, 18, 21, 24, 27, 21, 24, 27, 27 }260 { 9, 13, 18, 21, 13, 18, 21, 24, 18, 21, 24, 27, 21, 24, 27, 27 }
261 };261 };
262 uint8_t iScalingListPPS[6][16];262 uint8_t iScalingListPPS[6][16] = {
263 memset (iScalingListPPS, 0, 6 * 16 * sizeof (uint8_t));263 { 17, 17, 16, 16, 17, 16, 15, 15, 16, 15, 15, 15, 16, 15, 15, 15 },
264 { 6, 12, 19, 26, 12, 19, 26, 31, 19, 26, 31, 35, 26, 31, 35, 39 },
265 { 6, 12, 19, 26, 12, 19, 26, 31, 19, 26, 31, 35, 26, 31, 35, 40 },
266 { 17, 17, 16, 16, 17, 16, 15, 15, 16, 15, 15, 15, 16, 15, 15, 14 },
267 { 10, 14, 20, 24, 14, 20, 24, 27, 20, 24, 27, 30, 24, 27, 30, 34 },
268 { 9, 13, 18, 21, 13, 18, 21, 24, 18, 21, 24, 27, 21, 24, 27, 27 }
269 };
270 uint8_t iScalingListZero[6][16];
271 memset (iScalingListZero, 0, 6 * 16 * sizeof (uint8_t));
264 //Scalinglist matrix not written into sps or pps272 //Scalinglist matrix not written into sps or pps
265 int32_t iRet = ERR_NONE;273 int32_t iRet = ERR_NONE;
266 iRet = Init();274 iRet = Init();
267 ASSERT_EQ (iRet, ERR_NONE);275 ASSERT_EQ (iRet, ERR_NONE);
268 DecodeBs ("res/BA_MW_D.264");276 DecodeBs ("res/BA_MW_D.264");
269 ASSERT_TRUE (m_pCtx->sSpsBuffer[0].bSeqScalingMatrixPresentFlag == false);277 ASSERT_TRUE (m_pCtx->sSpsBuffer[0].bSeqScalingMatrixPresentFlag == false);
270 EXPECT_EQ (0, memcmp (iScalingListPPS, m_pCtx->sSpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t)));278 EXPECT_EQ (0, memcmp (iScalingListZero, m_pCtx->sSpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t)));
271 ASSERT_TRUE (m_pCtx->sPpsBuffer[0].bPicScalingMatrixPresentFlag == false);279 ASSERT_TRUE (m_pCtx->sPpsBuffer[0].bPicScalingMatrixPresentFlag == false);
272 EXPECT_EQ (0, memcmp (iScalingListPPS, m_pCtx->sPpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t)));280 EXPECT_EQ (0, memcmp (iScalingListZero, m_pCtx->sPpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t)));
273 Uninit();281 Uninit();
274 //Scalinglist value just written into sps and pps282 //Scalinglist value just written into sps and pps
275 iRet = Init();283 iRet = Init();
@@ -280,8 +288,10 @@ void DecoderParseSyntaxTest::TestScalingList() { · 4 unmodified lines
280 EXPECT_EQ (0, memcmp (iScalingList[i], m_pCtx->sSpsBuffer[0].iScalingList4x4[i], 16 * sizeof (uint8_t)));288 EXPECT_EQ (0, memcmp (iScalingList[i], m_pCtx->sSpsBuffer[0].iScalingList4x4[i], 16 * sizeof (uint8_t)));
281 }289 }
282 290
283 ASSERT_TRUE (m_pCtx->sPpsBuffer[0].bPicScalingMatrixPresentFlag == false);291 ASSERT_TRUE (m_pCtx->sPpsBuffer[0].bPicScalingMatrixPresentFlag == true);
284 EXPECT_EQ (0, memcmp (iScalingListPPS, m_pCtx->sPpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t)));292 for (int i = 0; i < 6; i++) {
293 EXPECT_EQ (0, memcmp (iScalingListPPS[i], m_pCtx->sPpsBuffer[0].iScalingList4x4[i], 16 * sizeof (uint8_t)));
294 }
285 Uninit();295 Uninit();
286}296}
287 297

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t