Changeset 11 in 3DVCSoftware for branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
- Timestamp:
- 5 Feb 2012, 22:00:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.2-poznan-univ/source/App/TAppEncoder/TAppEncTop.cpp
r5 r11 435 435 #endif 436 436 437 #if POZNAN_SYNTH 438 //m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,0,true, 0,0,0,0,0,0,0,1,0,0 ); //GT: simplest configuration 439 m_cAvailabilityRenderer.init(m_iSourceWidth, m_iSourceHeight,true,0,LOG2_DISP_PREC_LUT,true, 0,0,0,0,0,6,4,1,0,6 ); //GT: simplest configuration 440 #endif 441 437 442 #if HHI_INTERVIEW_SKIP 438 443 m_cUsedPelsRenderer.init(m_iSourceWidth, m_iSourceHeight, true, 0, LOG2_DISP_PREC_LUT, true, 0, 0, 0, 0, 0, 6, 4, 1, 0, 6 ); … … 692 697 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) // Start encoding 693 698 { 699 #if POZNAN_SYNTH 700 xStoreSynthPicsInBuffer(iViewIdx,false); 701 #endif 694 702 bool bThisViewContinueReadingPics = bContinueReadingPics[iViewIdx]; 695 703 m_acTEncTopList[iViewIdx]->encode( bEos[iViewIdx], m_cListPicYuvRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingPics ); … … 708 716 if( m_bUsingDepthMaps ) 709 717 { 718 #if POZNAN_SYNTH 719 xStoreSynthPicsInBuffer(iViewIdx,true); 720 #endif 710 721 bool bThisViewContinueReadingDepthPics = bContinueReadingDepthPics[iViewIdx]; 711 722 m_acTEncDepthTopList[iViewIdx]->encode( bDepthEos[iViewIdx], m_cListPicYuvDepthRecMap[iViewIdx], pcBitstream, bThisViewContinueReadingDepthPics ); … … 1177 1188 #endif 1178 1189 1190 #if POZNAN_SYNTH 1191 Void TAppEncTop::xStoreSynthPicsInBuffer(Int iCoddedViewIdx,Bool bDepth) 1192 { 1193 Int iCurPoc; 1194 if(bDepth) 1195 { 1196 iCurPoc = m_acTEncDepthTopList[ iCoddedViewIdx ]->getNextFrameId(); 1197 if (!(m_acTEncDepthTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1198 } 1199 else 1200 { 1201 iCurPoc = m_acTEncTopList[ iCoddedViewIdx ]->getNextFrameId(); 1202 if (!(m_acTEncTopList[ iCoddedViewIdx ]->currentPocWillBeCoded())) return; 1203 } 1204 1205 Int iNumberOfReferenceViews = 0; 1206 UInt iSynthViewIdx; 1207 // Get Left and right view 1208 Int iLeftViewIdx = -1; 1209 Int iRightViewIdx = -1; 1210 Int iNearestViewIdx = -1; 1211 Bool bIsBaseView; 1212 Bool bRenderFromLeft; 1213 1214 Int iRelDistToLeft; 1215 if(iCoddedViewIdx==0) //First on View Coded List 1216 { 1217 //TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, false ); 1218 return; 1219 } 1220 m_cCameraData.getNearestBaseView(iCoddedViewIdx, iNearestViewIdx, iRelDistToLeft, bRenderFromLeft); 1221 1222 m_cAvailabilityRenderer.setShiftLUTs( 1223 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx], 1224 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1225 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1226 m_cCameraData.getBaseViewShiftLUTD()[iNearestViewIdx][iCoddedViewIdx],//right 1227 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1228 m_cCameraData.getBaseViewShiftLUTI()[iNearestViewIdx][iCoddedViewIdx], 1229 iRelDistToLeft 1230 ); 1231 1232 1233 TComPicYuv* pcPicYuvERView = new TComPicYuv; 1234 pcPicYuvERView->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1235 1236 TComPic* pcPic = xGetPicFromView( iCoddedViewIdx, iCurPoc, bDepth ); 1237 pcPic->addSynthesisBuffer(); 1238 pcPic->addAvailabilityBuffer(); 1239 TComPicYuv* pcPicYuvSynthView = pcPic->getPicYuvSynth(); 1240 TComPicYuv* pcPicYuvAvailView = pcPic->getPicYuvAvail(); 1241 1242 //m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, false )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvERView, pcPicYuvAvailView, bRenderFromLeft ); 1243 m_cAvailabilityRenderer.extrapolateAvailabilityView( xGetPicFromView( iNearestViewIdx, iCurPoc, bDepth )->getPicYuvRec(), xGetPicFromView( iNearestViewIdx, iCurPoc, true )->getPicYuvRec(), pcPicYuvSynthView, pcPicYuvAvailView, bRenderFromLeft ); 1244 1245 pcPicYuvAvailView->setBorderExtension( false );//Needed?? 1246 pcPicYuvAvailView->extendPicBorder();//Needed?? 1247 1248 pcPicYuvSynthView->setBorderExtension( false );//Needed?? 1249 pcPicYuvSynthView->extendPicBorder();//Needed?? 1250 1251 //TComPic* pcPicDepth = xGetPicFromView( iCoddedViewIdx, iCurPoc, true ); 1252 //pcPicDepth->addAvailabilityBuffer(); 1253 //pcPicDepth->addSynthesisBuffer(); 1254 //pcPicYuvAvailView->copyToPic(pcPicDepth->getPicYuvAvail()); 1255 1256 #if POZNAN_OUTPUT_AVAILABLE_MAP 1257 { 1258 Char acFilenameBase[1024]; 1259 ::sprintf( acFilenameBase, "Available_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1260 pcPicYuvAvailView->dump(acFilenameBase, iCurPoc!=0); 1261 } 1262 #endif 1263 #if POZNAN_OUTPUT_SYNTH 1264 { 1265 Char acFilenameBase[1024]; 1266 ::sprintf( acFilenameBase, "Synth_%s_%s_V%d.yuv", (bDepth?"Depth":"Tex"),( false ? "Dec" : "Enc" ),iCoddedViewIdx ); 1267 pcPicYuvERView->dump(acFilenameBase, iCurPoc!=0); 1268 } 1269 #endif 1270 1271 //Usun pcPicYuvERView i inne bufforki 1272 } 1273 #endif 1274 1179 1275 #if HHI_INTERVIEW_SKIP 1180 1276 Void TAppEncTop::getUsedPelsMap( Int iViewIdx, Int iPoc, TComPicYuv* pcPicYuvUsedSplsMap )
Note: See TracChangeset for help on using the changeset viewer.