Changeset 296 in 3DVCSoftware for trunk/source/Lib/TLibVideoIO/TVideoIOYuv.cpp


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

Reintegrated branch 5.1-dev0 rev. 295.

File:
1 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;
Note: See TracChangeset for help on using the changeset viewer.