Changeset 815 in SHVCSoftware for trunk/source/Lib/TLibCommon/TComPicYuv.cpp
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-6-dev merged: 715-751,753-814
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-6-dev/source merged: 715-726,728-744,746-751,753-802,804-814
- Property svn:mergeinfo changed
-
trunk/source/Lib/TLibCommon/TComPicYuv.cpp
r713 r815 67 67 { 68 68 } 69 70 #if SVC_EXTENSION 69 71 #if AUXILIARY_PICTURES 70 #if SVC_UPSAMPLING71 72 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps ) 72 73 #else 73 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, ChromaFormat chromaFormatIDC, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth )74 #endif75 #else76 #if SVC_UPSAMPLING77 74 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth, TComSPS* pcSps ) 75 #endif 78 76 #else 79 77 Void TComPicYuv::create( Int iPicWidth, Int iPicHeight, UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxCUDepth ) 80 78 #endif 81 #endif82 79 { 83 80 m_iPicWidth = iPicWidth; 84 81 m_iPicHeight = iPicHeight; 85 82 86 #if SVC_ UPSAMPLING83 #if SVC_EXTENSION 87 84 if(pcSps != NULL) 88 85 { … … 369 366 } 370 367 368 #if SVC_EXTENSION 369 Void TComPicYuv::dump( Char* pFileName, Bool bAdd, Int bitDepth ) 370 { 371 FILE* pFile; 372 if (!bAdd) 373 { 374 pFile = fopen (pFileName, "wb"); 375 } 376 else 377 { 378 pFile = fopen (pFileName, "ab"); 379 } 380 381 if( bitDepth == 8 ) 382 { 383 dump( pFileName, bAdd ); 384 return; 385 } 386 387 Int x, y; 388 UChar uc; 389 390 Pel* piY = getLumaAddr(); 391 Pel* piCb = getCbAddr(); 392 Pel* piCr = getCrAddr(); 393 394 for ( y = 0; y < m_iPicHeight; y++ ) 395 { 396 for ( x = 0; x < m_iPicWidth; x++ ) 397 { 398 uc = piY[x] & 0xff; 399 fwrite( &uc, sizeof(UChar), 1, pFile ); 400 uc = (piY[x] >> 8) & 0xff; 401 fwrite( &uc, sizeof(UChar), 1, pFile ); 402 } 403 piY += getStride(); 404 } 405 406 for ( y = 0; y < m_iPicHeight >> 1; y++ ) 407 { 408 for ( x = 0; x < m_iPicWidth >> 1; x++ ) 409 { 410 uc = piCb[x] & 0xff; 411 fwrite( &uc, sizeof(UChar), 1, pFile ); 412 uc = (piCb[x] >> 8) & 0xff; 413 fwrite( &uc, sizeof(UChar), 1, pFile ); 414 } 415 piCb += getCStride(); 416 } 417 418 for ( y = 0; y < m_iPicHeight >> 1; y++ ) 419 { 420 for ( x = 0; x < m_iPicWidth >> 1; x++ ) 421 { 422 uc = piCr[x] & 0xff; 423 fwrite( &uc, sizeof(UChar), 1, pFile ); 424 uc = (piCr[x] >> 8) & 0xff; 425 fwrite( &uc, sizeof(UChar), 1, pFile ); 426 } 427 piCr += getCStride(); 428 } 429 430 fclose(pFile); 431 } 432 433 #endif 371 434 372 435 //! \}
Note: See TracChangeset for help on using the changeset viewer.