Ticket #635: j0033.patch
File j0033.patch, 5.6 KB (added by gordon, 11 years ago) |
---|
-
source/Lib/TLibDecoder/TDecSlice.cpp
200 200 uiTileWidth = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getTileWidth(); 201 201 uiTileHeight = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getTileHeight(); 202 202 uiCol = iCUAddr % uiWidthInLCUs; 203 uiLin = iCUAddr / uiWidthInLCUs; 203 // The 'line' is now relative to the 1st line in the slice, not the 1st line in the picture. 204 uiLin = (iCUAddr/uiWidthInLCUs)-(iStartCUAddr/uiWidthInLCUs); 204 205 // inherit from TR if necessary, select substream to use. 205 206 #if DEPENDENT_SLICES 206 207 if( (pcSlice->getPPS()->getNumSubstreams() > 1) || ( bAllowDependence && (uiCol == uiTileLCUX)&&(pcSlice->getPPS()->getTilesOrEntropyCodingSyncIdc()==2) )) -
source/Lib/TLibDecoder/TDecGop.cpp
229 229 m_pcSbacDecoder->init( (TDecBinIf*)m_pcBinCABAC ); 230 230 m_pcEntropyDecoder->setEntropyDecoder (m_pcSbacDecoder); 231 231 232 UInt uiNumSubstreams = pcSlice->getPPS()->get NumSubstreams();232 UInt uiNumSubstreams = pcSlice->getPPS()->getTilesOrEntropyCodingSyncIdc() == 2 ? pcSlice->getNumEntryPointOffsets()+1 : pcSlice->getPPS()->getNumSubstreams(); 233 233 234 234 //init each couple {EntropyDecoder, Substream} 235 235 UInt *puiSubstreamSizes = pcSlice->getSubstreamSizes(); -
source/Lib/TLibDecoder/TDecCAVLC.cpp
2245 2245 } 2246 2246 else if ( tilesOrEntropyCodingSyncIdc == 2 ) // wavefront 2247 2247 { 2248 Int numSubstreams = pps->getNumSubstreams();2248 Int numSubstreams = rpcSlice->getNumEntryPointOffsets()+1; 2249 2249 rpcSlice->allocSubstreamSizes(numSubstreams); 2250 2250 UInt *pSubstreamSizes = rpcSlice->getSubstreamSizes(); 2251 2251 for (Int idx=0; idx<numSubstreams-1; idx++) -
source/Lib/TLibEncoder/TEncGOP.cpp
1117 1117 #if !REMOVE_TILE_MARKERS 1118 1118 UInt uiAccumulatedLength = 0; 1119 1119 #endif 1120 for ( UInt ui = 0 ; ui < pcSlice->getPPS()->getNumSubstreams(); ui++ ) 1120 Int offs = 0; 1121 Int nss = pcSlice->getPPS()->getNumSubstreams(); 1122 if (pcSlice->getPPS()->getTilesOrEntropyCodingSyncIdc() == 2) 1121 1123 { 1122 pcOut->addSubstream(&pcSubstreamsOut[ui]); 1124 // 1st line present for WPP. 1125 offs = pcSlice->getSliceCurStartCUAddr()/pcSlice->getPic()->getNumPartInCU()/pcSlice->getPic()->getFrameWidthInCU(); 1126 nss = pcSlice->getNumEntryPointOffsets()+1; 1127 } 1128 for ( UInt ui = 0 ; ui < nss; ui++ ) 1129 { 1130 pcOut->addSubstream(&pcSubstreamsOut[ui+offs]); 1123 1131 1124 1132 #if !REMOVE_TILE_MARKERS 1125 1133 // Update tile marker location information -
source/Lib/TLibEncoder/TEncCavlc.cpp
1100 1100 } 1101 1101 1102 1102 UInt numEntryPointOffsets = 0, offsetLenMinus1 = 0, maxOffset = 0; 1103 Int numZeroSubstreamsAtStartOfSlice = 0; 1103 1104 UInt *entryPointOffset = NULL; 1104 1105 if (tilesOrEntropyCodingSyncIdc == 1) // tiles 1105 1106 { … … 1124 1125 } 1125 1126 else if (tilesOrEntropyCodingSyncIdc == 2) // wavefront 1126 1127 { 1127 Int numZeroSubstreamsAtEndOfSlice = 0;1128 1128 UInt* pSubstreamSizes = pSlice->getSubstreamSizes(); 1129 // Find number of zero substreams at the end of slice 1130 for (Int idx=pSlice->getPPS()->getNumSubstreams()-2; idx>=0; idx--) 1131 { 1132 if ( pSubstreamSizes[ idx ] == 0 ) 1133 { 1134 numZeroSubstreamsAtEndOfSlice++; 1135 } 1136 else 1137 { 1138 break; 1139 } 1140 } 1141 numEntryPointOffsets = pSlice->getPPS()->getNumSubstreams() - 1 - numZeroSubstreamsAtEndOfSlice; 1129 Int maxNumParts = pSlice->getPic()->getNumPartInCU(); 1130 numZeroSubstreamsAtStartOfSlice = pSlice->getSliceCurStartCUAddr()/maxNumParts/pSlice->getPic()->getFrameWidthInCU(); 1131 Int numZeroSubstreamsAtEndOfSlice = pSlice->getPic()->getFrameHeightInCU()-1 - ((pSlice->getSliceCurEndCUAddr()-1)/maxNumParts/pSlice->getPic()->getFrameWidthInCU()); 1132 numEntryPointOffsets = pSlice->getPPS()->getNumSubstreams() - numZeroSubstreamsAtStartOfSlice - numZeroSubstreamsAtEndOfSlice - 1; 1133 pSlice->setNumEntryPointOffsets(numEntryPointOffsets); 1142 1134 entryPointOffset = new UInt[numEntryPointOffsets]; 1143 1135 for (Int idx=0; idx<numEntryPointOffsets; idx++) 1144 1136 { 1145 entryPointOffset[ idx ] = ( pSubstreamSizes[ idx ] >> 3 ) ;1137 entryPointOffset[ idx ] = ( pSubstreamSizes[ idx+numZeroSubstreamsAtStartOfSlice ] >> 3 ) ; 1146 1138 if ( entryPointOffset[ idx ] > maxOffset ) 1147 1139 { 1148 1140 maxOffset = entryPointOffset[ idx ];