Ticket #1282: ticket_1282.patch

File ticket_1282.patch, 1.1 KB (added by barrouxg, 8 years ago)

patch to solve the problem of frame equivalent PSNR computation being performed at the wrong moment in field mode

  • Lib/TLibEncoder/TEncGOP.cpp

     
    17531753    xCalculateAddPSNR( pcPic, pcPic->getPicYuvRec(), accessUnit, dEncTime );
    17541754   
    17551755    //In case of field coding, compute the interlaced PSNR for both fields
    1756     if (isField && ((!pcPic->isTopField() && isTff) || (pcPic->isTopField() && !isTff)) && (pcPic->getPOC()%m_iGopSize != 1))
     1756    if (isField && ( (!pcPic->isTopField() && isTff) || (pcPic->isTopField() && !isTff) ) && (!IRAPtoReorder || (pcPic->getPOC() != m_associatedIRAPPOC)) )
    17571757    {
    17581758      //get complementary top field
    17591759      TComPic* pcPicTop;
     
    17651765      pcPicTop = *(iterPic);
    17661766      xCalculateInterlacedAddPSNR(pcPicTop, pcPic, pcPicTop->getPicYuvRec(), pcPic->getPicYuvRec(), accessUnit, dEncTime );
    17671767    }
    1768     else if (isField && pcPic->getPOC()!= 0 && (pcPic->getPOC()%m_iGopSize == 0))
     1768    else if (isField && (IRAPtoReorder && (pcPic->getPOC() == m_associatedIRAPPOC-1) ))
    17691769    {
    17701770      //get complementary bottom field
    17711771      TComPic* pcPicBottom;