Changeset 750 in SHVCSoftware
- Timestamp:
- 25 Apr 2014, 23:44:16 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib/TLibCommon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r658 r750 369 369 } 370 370 371 #if SVC_EXTENSION 372 Void TComPicYuv::dump( Char* pFileName, Bool bAdd, Int bitDepth ) 373 { 374 FILE* pFile; 375 if (!bAdd) 376 { 377 pFile = fopen (pFileName, "wb"); 378 } 379 else 380 { 381 pFile = fopen (pFileName, "ab"); 382 } 383 384 if( bitDepth == 8 ) 385 { 386 dump( pFileName, bAdd ); 387 return; 388 } 389 390 Int x, y; 391 UChar uc; 392 393 Pel* piY = getLumaAddr(); 394 Pel* piCb = getCbAddr(); 395 Pel* piCr = getCrAddr(); 396 397 for ( y = 0; y < m_iPicHeight; y++ ) 398 { 399 for ( x = 0; x < m_iPicWidth; x++ ) 400 { 401 uc = piY[x] & 0xff; 402 fwrite( &uc, sizeof(UChar), 1, pFile ); 403 uc = (piY[x] >> 8) & 0xff; 404 fwrite( &uc, sizeof(UChar), 1, pFile ); 405 } 406 piY += getStride(); 407 } 408 409 for ( y = 0; y < m_iPicHeight >> 1; y++ ) 410 { 411 for ( x = 0; x < m_iPicWidth >> 1; x++ ) 412 { 413 uc = piCb[x] & 0xff; 414 fwrite( &uc, sizeof(UChar), 1, pFile ); 415 uc = (piCb[x] >> 8) & 0xff; 416 fwrite( &uc, sizeof(UChar), 1, pFile ); 417 } 418 piCb += getCStride(); 419 } 420 421 for ( y = 0; y < m_iPicHeight >> 1; y++ ) 422 { 423 for ( x = 0; x < m_iPicWidth >> 1; x++ ) 424 { 425 uc = piCr[x] & 0xff; 426 fwrite( &uc, sizeof(UChar), 1, pFile ); 427 uc = (piCr[x] >> 8) & 0xff; 428 fwrite( &uc, sizeof(UChar), 1, pFile ); 429 } 430 piCr += getCStride(); 431 } 432 433 fclose(pFile); 434 } 435 436 #endif 371 437 372 438 //! \} -
branches/SHM-6-dev/source/Lib/TLibCommon/TComPicYuv.h
r595 r750 199 199 Void convertToMonochrome(); 200 200 #endif 201 Void dump( Char* pFileName, Bool bAdd, Int bitDepth ); 201 202 #endif //SVC_EXTENSION 202 203
Note: See TracChangeset for help on using the changeset viewer.