Showing the changes to test/decoder/DecUT_ParseSyntax.cpp (1 of 9 files). Show all
Unified · Split
| @@ -259,17 +259,25 @@ void DecoderParseSyntaxTest::TestScalingList() { · 258 unmodified lines | ||
| 259 | 259 | {10, 14, 20, 24, 14, 20, 24, 27, 20, 24, 27, 30, 24, 27, 30, 34 }, |
| 260 | 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]; | |
| 263 | − memset (iScalingListPPS, 0, 6 * 16 * sizeof (uint8_t)); | |
| 262 | + uint8_t iScalingListPPS[6][16] = { | |
| 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 | 272 | //Scalinglist matrix not written into sps or pps |
| 265 | 273 | int32_t iRet = ERR_NONE; |
| 266 | 274 | iRet = Init(); |
| 267 | 275 | ASSERT_EQ (iRet, ERR_NONE); |
| 268 | 276 | DecodeBs ("res/BA_MW_D.264"); |
| 269 | 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 | 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 | 281 | Uninit(); |
| 274 | 282 | //Scalinglist value just written into sps and pps |
| 275 | 283 | iRet = Init(); |
| @@ -280,8 +288,10 @@ void DecoderParseSyntaxTest::TestScalingList() { · 4 unmodified lines | ||
| 280 | 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); | |
| 284 | − EXPECT_EQ (0, memcmp (iScalingListPPS, m_pCtx->sPpsBuffer[0].iScalingList4x4, 6 * 16 * sizeof (uint8_t))); | |
| 291 | + ASSERT_TRUE (m_pCtx->sPpsBuffer[0].bPicScalingMatrixPresentFlag == true); | |
| 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 | 295 | Uninit(); |
| 286 | 296 | } |
| 287 | 297 | |