Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibVideoIO
- Timestamp:
- 20 Feb 2013, 22:07:43 (12 years ago)
- Location:
- trunk/source/Lib/TLibVideoIO
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
r56 r296 413 413 * @return true for success, false in case of error 414 414 */ 415 #if PIC_CROPPING416 415 Bool TVideoIOYuv::write( TComPicYuv* pPicYuv, Int cropLeft, Int cropRight, Int cropTop, Int cropBottom ) 417 #else418 bool TVideoIOYuv::write( TComPicYuv* pPicYuv, Int aiPad[2] )419 #endif420 416 { 421 417 // compute actual YUV frame size excluding padding size 422 418 Int iStride = pPicYuv->getStride(); 423 #if PIC_CROPPING424 419 UInt width = pPicYuv->getWidth() - cropLeft - cropRight; 425 420 UInt height = pPicYuv->getHeight() - cropTop - cropBottom; 426 #else427 unsigned int width = pPicYuv->getWidth() - aiPad[0];428 unsigned int height = pPicYuv->getHeight() - aiPad[1];429 #endif430 421 bool is16bit = m_fileBitdepth > 8; 431 422 TComPicYuv *dstPicYuv = NULL; … … 456 447 dstPicYuv = pPicYuv; 457 448 } 458 #if PIC_CROPPING459 449 // location of upper left pel in a plane 460 450 Int planeOffset = 0; //cropLeft + cropTop * iStride; 461 451 462 452 if (! writePlane(m_cHandle, dstPicYuv->getLumaAddr() + planeOffset, is16bit, iStride, width, height)) 463 #else464 if (! writePlane(m_cHandle, dstPicYuv->getLumaAddr(), is16bit, iStride, width, height))465 #endif466 453 { 467 454 retval=false; … … 472 459 height >>= 1; 473 460 iStride >>= 1; 474 #if PIC_CROPPING475 461 cropLeft >>= 1; 476 462 cropRight >>= 1; … … 479 465 480 466 if (! writePlane(m_cHandle, dstPicYuv->getCbAddr() + planeOffset, is16bit, iStride, width, height)) 481 #else482 if (! writePlane(m_cHandle, dstPicYuv->getCbAddr(), is16bit, iStride, width, height))483 #endif484 467 { 485 468 retval=false; 486 469 goto exit; 487 470 } 488 #if PIC_CROPPING489 471 if (! writePlane(m_cHandle, dstPicYuv->getCrAddr() + planeOffset, is16bit, iStride, width, height)) 490 #else491 if (! writePlane(m_cHandle, dstPicYuv->getCrAddr(), is16bit, iStride, width, height))492 #endif493 472 { 494 473 retval=false; -
trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h
r56 r296 69 69 70 70 bool read ( TComPicYuv* pPicYuv, Int aiPad[2], Bool bRewind = false ); ///< read one YUV frame with padding parameter 71 #if PIC_CROPPING72 71 Bool write( TComPicYuv* pPicYuv, Int cropLeft=0, Int cropRight=0, Int cropTop=0, Int cropBottom=0 ); 73 #else74 bool write ( TComPicYuv* pPicYuv, Int aiPad[2] ); ///< write one YUV frame with padding parameter75 #endif76 72 77 73 bool isEof (); ///< check for end-of-file
Note: See TracChangeset for help on using the changeset viewer.