Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibVideoIO


Ignore:
Timestamp:
20 Feb 2013, 22:07:43 (12 years ago)
Author:
tech
Message:

Reintegrated branch 5.1-dev0 rev. 295.

Location:
trunk/source/Lib/TLibVideoIO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp

    r56 r296  
    413413 * @return true for success, false in case of error
    414414 */
    415 #if PIC_CROPPING
    416415Bool TVideoIOYuv::write( TComPicYuv* pPicYuv, Int cropLeft, Int cropRight, Int cropTop, Int cropBottom )
    417 #else
    418 bool TVideoIOYuv::write( TComPicYuv* pPicYuv, Int aiPad[2] )
    419 #endif
    420416{
    421417  // compute actual YUV frame size excluding padding size
    422418  Int   iStride = pPicYuv->getStride();
    423 #if PIC_CROPPING
    424419  UInt  width  = pPicYuv->getWidth()  - cropLeft - cropRight;
    425420  UInt  height = pPicYuv->getHeight() - cropTop  - cropBottom;
    426 #else
    427   unsigned int width  = pPicYuv->getWidth() - aiPad[0];
    428   unsigned int height = pPicYuv->getHeight() - aiPad[1];
    429 #endif
    430421  bool is16bit = m_fileBitdepth > 8;
    431422  TComPicYuv *dstPicYuv = NULL;
     
    456447    dstPicYuv = pPicYuv;
    457448  }
    458 #if PIC_CROPPING
    459449  // location of upper left pel in a plane
    460450  Int planeOffset = 0; //cropLeft + cropTop * iStride;
    461451 
    462452  if (! writePlane(m_cHandle, dstPicYuv->getLumaAddr() + planeOffset, is16bit, iStride, width, height))
    463 #else
    464   if (! writePlane(m_cHandle, dstPicYuv->getLumaAddr(), is16bit, iStride, width, height))
    465 #endif
    466453  {
    467454    retval=false;
     
    472459  height >>= 1;
    473460  iStride >>= 1;
    474 #if PIC_CROPPING
    475461  cropLeft >>= 1;
    476462  cropRight >>= 1;
     
    479465
    480466  if (! writePlane(m_cHandle, dstPicYuv->getCbAddr() + planeOffset, is16bit, iStride, width, height))
    481 #else
    482   if (! writePlane(m_cHandle, dstPicYuv->getCbAddr(), is16bit, iStride, width, height))
    483 #endif
    484467  {
    485468    retval=false;
    486469    goto exit;
    487470  }
    488 #if PIC_CROPPING
    489471  if (! writePlane(m_cHandle, dstPicYuv->getCrAddr() + planeOffset, is16bit, iStride, width, height))
    490 #else
    491   if (! writePlane(m_cHandle, dstPicYuv->getCrAddr(), is16bit, iStride, width, height))
    492 #endif
    493472  {
    494473    retval=false;
  • trunk/source/Lib/TLibVideoIO/TVideoIOYuv.h

    r56 r296  
    6969 
    7070  bool  read  ( TComPicYuv*   pPicYuv, Int aiPad[2], Bool bRewind = false );     ///< read  one YUV frame with padding parameter
    71 #if PIC_CROPPING
    7271  Bool  write( TComPicYuv*    pPicYuv, Int cropLeft=0, Int cropRight=0, Int cropTop=0, Int cropBottom=0 );
    73 #else
    74   bool  write ( TComPicYuv*   pPicYuv, Int aiPad[2] );     ///< write one YUV frame with padding parameter
    75 #endif
    7672 
    7773  bool  isEof ();                                           ///< check for end-of-file
Note: See TracChangeset for help on using the changeset viewer.