Ticket #13: fix8bitout.patch

File fix8bitout.patch, 1.5 KB (added by gordon, 8 years ago)
  • source/Lib/TLibVideoIO/TVideoIOYuv.cpp

    diff --git a/source/Lib/TLibVideoIO/TVideoIOYuv.cpp b/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
    index 1aa3a55..af09c66 100644
    a b Bool TVideoIOYuv::write( TComPicYuv* pPicYuvUser, const InputColourSpaceConversi 
    799799  {
    800800    dstPicYuv = new TComPicYuv;
    801801    dstPicYuv->create( pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), pPicYuv->getChromaFormat(), pPicYuv->getWidth(COMPONENT_Y), pPicYuv->getHeight(COMPONENT_Y), 0, false );
    802     pPicYuv->copyToPic(dstPicYuv);
     802    pPicYuv->copyToPic(dstPicYuv, MAX_NUM_COMPONENT, false); // don't include margin.
    803803
    804804    for(UInt comp=0; comp<dstPicYuv->getNumberValidComponents(); comp++)
    805805    {
    Bool TVideoIOYuv::write( TComPicYuv* pPicYuvUser, const InputColourSpaceConversi 
    824824    const UInt csx = pPicYuv->getComponentScaleX(compID);
    825825    const UInt csy = pPicYuv->getComponentScaleY(compID);
    826826    const Int planeOffset =  (confLeft>>csx) + (confTop>>csy) * pPicYuv->getStride(compID);
    827     if (! writePlane(m_cHandle, dstPicYuv->getAddr(compID) + planeOffset, is16bit, iStride444, width444, height444, compID, dstPicYuv->getChromaFormat(), format, m_fileBitdepth[ch]))
     827    if (! writePlane(m_cHandle, dstPicYuv->getAddr(compID) + planeOffset, is16bit, dstPicYuv->getStride(COMPONENT_Y), width444, height444, compID, dstPicYuv->getChromaFormat(), format, m_fileBitdepth[ch]))
    828828    {
    829829      retval=false;
    830830    }