Ticket #635: j0033-80dev-r2753.patch
File j0033-80dev-r2753.patch, 5.7 KB (added by gordon, 11 years ago) |
---|
-
source/Lib/TLibDecoder/TDecSlice.cpp
210 210 uiTileWidth = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getTileWidth(); 211 211 uiTileHeight = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iCUAddr))->getTileHeight(); 212 212 uiCol = iCUAddr % uiWidthInLCUs; 213 uiLin = iCUAddr / uiWidthInLCUs; 213 // The 'line' is now relative to the 1st line in the slice, not the 1st line in the picture. 214 uiLin = (iCUAddr/uiWidthInLCUs)-(iStartCUAddr/uiWidthInLCUs); 214 215 // inherit from TR if necessary, select substream to use. 215 216 #if DEPENDENT_SLICES 216 217 #if TILES_WPP_ENTROPYSLICES_FLAGS -
source/Lib/TLibDecoder/TDecGop.cpp
130 130 m_pcSbacDecoder->init( (TDecBinIf*)m_pcBinCABAC ); 131 131 m_pcEntropyDecoder->setEntropyDecoder (m_pcSbacDecoder); 132 132 133 UInt uiNumSubstreams = pcSlice->getPPS()->getNumSubstreams(); 133 #if TILES_WPP_ENTROPYSLICES_FLAGS 134 UInt uiNumSubstreams = pcSlice->getPPS()->getEntropyCodingSyncEnabledFlag() ? pcSlice->getNumEntryPointOffsets()+1 : pcSlice->getPPS()->getNumSubstreams(); 135 #else 136 UInt uiNumSubstreams = pcSlice->getPPS()->getTilesOrEntropyCodingSyncIdc() == 2 ? pcSlice->getNumEntryPointOffsets()+1 : pcSlice->getPPS()->getNumSubstreams(); 137 #endif 134 138 135 139 // init each couple {EntropyDecoder, Substream} 136 140 UInt *puiSubstreamSizes = pcSlice->getSubstreamSizes(); -
source/Lib/TLibDecoder/TDecCAVLC.cpp
1559 1559 else if ( pps->getEntropyCodingSyncEnabledFlag() ) 1560 1560 #endif 1561 1561 { 1562 Int numSubstreams = pps->getNumSubstreams();1562 Int numSubstreams = rpcSlice->getNumEntryPointOffsets()+1; 1563 1563 rpcSlice->allocSubstreamSizes(numSubstreams); 1564 1564 UInt *pSubstreamSizes = rpcSlice->getSubstreamSizes(); 1565 1565 for (Int idx=0; idx<numSubstreams-1; idx++) -
source/Lib/TLibEncoder/TEncGOP.cpp
1033 1033 } 1034 1034 } 1035 1035 #endif 1036 for ( UInt ui = 0 ; ui < pcSlice->getPPS()->getNumSubstreams(); ui++ ) 1037 { 1038 pcOut->addSubstream(&pcSubstreamsOut[ui]); 1036 Int offs = 0; 1037 Int nss = pcSlice->getPPS()->getNumSubstreams(); 1038 #if TILES_WPP_ENTROPYSLICES_FLAGS 1039 if (pcSlice->getPPS()->getEntropyCodingSyncEnabledFlag()) 1040 #else 1041 if (pcSlice->getPPS()->getTilesOrEntropyCodingSyncIdc() == 2) 1042 #endif 1043 { 1044 // 1st line present for WPP. 1045 offs = pcSlice->getSliceCurStartCUAddr()/pcSlice->getPic()->getNumPartInCU()/pcSlice->getPic()->getFrameWidthInCU(); 1046 nss = pcSlice->getNumEntryPointOffsets()+1; 1047 } 1048 for ( UInt ui = 0 ; ui < nss; ui++ ) 1049 { 1050 pcOut->addSubstream(&pcSubstreamsOut[ui+offs]); 1039 1051 } 1040 1052 } 1041 1053 -
source/Lib/TLibEncoder/TEncCavlc.cpp
1115 1115 } 1116 1116 1117 1117 UInt numEntryPointOffsets = 0, offsetLenMinus1 = 0, maxOffset = 0; 1118 Int numZeroSubstreamsAtStartOfSlice = 0; 1118 1119 UInt *entryPointOffset = NULL; 1119 1120 #if TILES_WPP_ENTROPYSLICES_FLAGS 1120 1121 if ( pSlice->getPPS()->getTilesEnabledFlag() ) … … 1147 1148 else if (tilesOrEntropyCodingSyncIdc == 2) // wavefront 1148 1149 #endif 1149 1150 { 1150 Int numZeroSubstreamsAtEndOfSlice = 0;1151 1151 UInt* pSubstreamSizes = pSlice->getSubstreamSizes(); 1152 // Find number of zero substreams at the end of slice 1153 for (Int idx=pSlice->getPPS()->getNumSubstreams()-2; idx>=0; idx--) 1154 { 1155 if ( pSubstreamSizes[ idx ] == 0 ) 1156 { 1157 numZeroSubstreamsAtEndOfSlice++; 1158 } 1159 else 1160 { 1161 break; 1162 } 1163 } 1164 numEntryPointOffsets = pSlice->getPPS()->getNumSubstreams() - 1 - numZeroSubstreamsAtEndOfSlice; 1152 Int maxNumParts = pSlice->getPic()->getNumPartInCU(); 1153 numZeroSubstreamsAtStartOfSlice = pSlice->getSliceCurStartCUAddr()/maxNumParts/pSlice->getPic()->getFrameWidthInCU(); 1154 Int numZeroSubstreamsAtEndOfSlice = pSlice->getPic()->getFrameHeightInCU()-1 - ((pSlice->getSliceCurEndCUAddr()-1)/maxNumParts/pSlice->getPic()->getFrameWidthInCU()); 1155 numEntryPointOffsets = pSlice->getPPS()->getNumSubstreams() - numZeroSubstreamsAtStartOfSlice - numZeroSubstreamsAtEndOfSlice - 1; 1156 pSlice->setNumEntryPointOffsets(numEntryPointOffsets); 1165 1157 entryPointOffset = new UInt[numEntryPointOffsets]; 1166 1158 for (Int idx=0; idx<numEntryPointOffsets; idx++) 1167 1159 { 1168 entryPointOffset[ idx ] = ( pSubstreamSizes[ idx ] >> 3 ) ;1160 entryPointOffset[ idx ] = ( pSubstreamSizes[ idx+numZeroSubstreamsAtStartOfSlice ] >> 3 ) ; 1169 1161 if ( entryPointOffset[ idx ] > maxOffset ) 1170 1162 { 1171 1163 maxOffset = entryPointOffset[ idx ];