Changeset 1201 in SHVCSoftware
- Timestamp:
- 8 Jul 2015, 20:30:17 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1200 r1201 1129 1129 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 1130 1130 ("CrossLayerAlignedIdrOnlyFlag", m_crossLayerAlignedIdrOnlyFlag, true, "only idr for IRAP across layers" ) 1131 #if O0194_WEIGHTED_PREDICTION_CGS1132 1131 ("InterLayerWeightedPred", m_useInterLayerWeightedPred, false, "enable IL WP parameters estimation at encoder" ) 1133 #endif1134 1132 #if AVC_BASE 1135 1133 ("NonHEVCBase,-nonhevc", m_nonHEVCBaseLayerFlag, 0, "BL is available but not internal") … … 4344 4342 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag ); 4345 4343 printf("IDR only for IRAP : %d\n", m_crossLayerAlignedIdrOnlyFlag ); 4346 #if O0194_WEIGHTED_PREDICTION_CGS4347 4344 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 4348 #endif4349 4345 printf("\n"); 4350 4346 for(UInt layer=0; layer<m_numLayers; layer++) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1200 r1201 510 510 Bool m_crossLayerAlignedIdrOnlyFlag; 511 511 Bool m_crossLayerBLAFlag; 512 #if O0194_WEIGHTED_PREDICTION_CGS513 512 Bool m_useInterLayerWeightedPred; 514 #endif515 513 #if Q0048_CGS_3D_ASYMLUT 516 514 Int m_nCGSFlag; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1200 r1201 228 228 g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_acLayerCfg[layer].m_layerId] = g_bitDepth[CHANNEL_TYPE_CHROMA]; 229 229 230 #if O0194_WEIGHTED_PREDICTION_CGS231 230 m_acTEncTop[layer].setInterLayerWeightedPredFlag ( m_useInterLayerWeightedPred ); 232 #endif233 231 234 232 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; … … 503 501 m_acTEncTop[layer].setUseFastIntraScalable ( m_useFastIntraScalable ); 504 502 #endif 505 #if O0194_WEIGHTED_PREDICTION_CGS 503 506 504 if( layer != 0 && m_useInterLayerWeightedPred ) 507 505 { … … 510 508 m_acTEncTop[layer].setWPBiPred ( true ); 511 509 } 512 #endif 510 513 511 //====== Parallel Merge Estimation ======== 514 512 m_acTEncTop[layer].setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 ); -
branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
r1200 r1201 142 142 #if SVC_EXTENSION 143 143 extern Int g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 144 #endif145 #if O0194_WEIGHTED_PREDICTION_CGS146 144 extern void* g_refWeightACDCParam; //type:wpACDCParam 147 145 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp
r1029 r1201 340 340 Void TComRdCost::setDistParam( TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME ) 341 341 { 342 #if O0194_WEIGHTED_PREDICTION_CGS343 // Bug fix: The correct bit depth has not been usedfor weighted cost calculation342 #if SVC_EXTENSION 343 // Set bit depth for weighted cost calculation 344 344 rcDistParam.bitDepth = g_bitDepth[CHANNEL_TYPE_LUMA]; 345 345 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1200 r1201 679 679 #endif 680 680 Int g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 681 #if O0194_WEIGHTED_PREDICTION_CGS682 681 void * g_refWeightACDCParam; // type=wpACDCParam 683 #endif684 682 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 685 683 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1199 r1201 1885 1885 Int64 iAC; 1886 1886 Int64 iDC; 1887 #if O0194_WEIGHTED_PREDICTION_CGS1887 #if SVC_EXTENSION 1888 1888 Int iSamples; 1889 1889 #endif -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1200 r1201 70 70 #define R0179_ENC_OPT_3DLUT_SIZE 0 ///< JCTVC-R0179: RD decision based LUT size selection 71 71 #endif 72 #define O0194_WEIGHTED_PREDICTION_CGS 1 ///< JCTVC-O0194: Weighted prediction for colour gamut scalability73 72 #define POC_RESET_IDC 1 ///< JCTVC-P0041: Include poc_reset_idc and related derivation 74 73 #if POC_RESET_IDC -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1199 r1201 2253 2253 { 2254 2254 pcPic->getPicYuvOrg()->copyToPic( pcPic->getPicYuvRec() ); 2255 #if O0194_WEIGHTED_PREDICTION_CGS 2255 2256 2256 // Calculate for the base layer to be used in EL as Inter layer reference 2257 2257 if( m_pcEncTop->getInterLayerWeightedPredFlag() ) … … 2259 2259 m_pcSliceEncoder->estimateILWpParam( pcSlice ); 2260 2260 } 2261 #endif 2261 2262 2262 return; 2263 2263 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1057 r1201 3943 3943 3944 3944 // prediction pattern 3945 #if O0194_WEIGHTED_PREDICTION_CGS3946 // Bug Fix (It did not check WP for BSlices)3945 #if SVC_EXTENSION 3946 // Check WP for B-slices 3947 3947 if ( pcCU->getSlice()->getPPS()->getUseWP()) 3948 3948 #else … … 3957 3957 } 3958 3958 3959 #if O0194_WEIGHTED_PREDICTION_CGS3960 if ( pcCU->getSlice()->getPPS()->getUseWP())3961 ///< Bug Fix (It did not check WP for BSlices)3959 #if SVC_EXTENSION 3960 // Check WP for B-slices 3961 if( pcCU->getSlice()->getPPS()->getUseWP()) 3962 3962 #else 3963 3963 if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE ) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp
r1128 r1201 771 771 xCalcACDCParamSlice(pcSlice); 772 772 } 773 #if O0194_WEIGHTED_PREDICTION_CGS773 #if SVC_EXTENSION 774 774 else if( m_ppcTEncTop[pcSlice->getLayerIdx()]->getInterLayerWeightedPredFlag() ) 775 775 { … … 1348 1348 } 1349 1349 #endif 1350 #if O0194_WEIGHTED_PREDICTION_CGS 1350 1351 1351 Void TEncSlice::estimateILWpParam( TComSlice* pcSlice ) 1352 1352 { … … 1357 1357 g_refWeightACDCParam = (void *) temp_weightACDCParam; 1358 1358 } 1359 #endif1360 1359 #endif //SVC_EXTENSION 1361 1360 //! \} -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.h
r1029 r1201 122 122 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 123 123 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS, TComVPS *vps, Bool isField ); 124 #if O0194_WEIGHTED_PREDICTION_CGS125 124 Void estimateILWpParam ( TComSlice* pcSlice ); 126 #endif127 125 #else 128 126 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h
r1199 r1201 144 144 Bool m_noOutputOfPriorPicsFlags; 145 145 #endif 146 #if O0194_WEIGHTED_PREDICTION_CGS147 146 Bool m_interLayerWeightedPredFlag; 148 #endif149 147 Int m_numAddLayerSets; 150 148 Bool m_pocDecrementedInDPBFlag; … … 241 239 Bool getMFMEnabledFlag() { return m_bMFMEnabledFlag; } 242 240 #endif 243 #if O0194_WEIGHTED_PREDICTION_CGS244 241 Void setInterLayerWeightedPredFlag(Bool flag) { m_interLayerWeightedPredFlag = flag; } 245 242 Bool getInterLayerWeightedPredFlag() { return m_interLayerWeightedPredFlag; } 246 #endif 243 247 244 Void encode ( TComPicYuv* pcPicYuvOrg, const InputColourSpaceConversion snrCSC, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP ); 248 245 Void encodePrep( TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvTrueOrg ); -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1029 r1201 111 111 112 112 const Int fixedBitShift = (slice->getSPS()->getUseHighPrecisionPredictionWeighting())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0; 113 #if O0194_WEIGHTED_PREDICTION_CGS114 weightACDCParam[compID].iSamples = iSample;115 #endif116 113 weightACDCParam[compID].iDC = (((iOrgDC<<fixedBitShift)+(iSample>>1)) / iSample); 117 114 weightACDCParam[compID].iAC = iOrgAC; 115 #if SVC_EXTENSION 116 weightACDCParam[compID].iSamples = iSample; 117 #endif 118 118 } 119 119 … … 242 242 slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(refWeightACDCParam); 243 243 244 #if O0194_WEIGHTED_PREDICTION_CGS244 #if SVC_EXTENSION 245 245 UInt currLayerId = slice->getLayerId(); 246 246 UInt refLayerId = slice->getRefPic(eRefPicList, refIdxTemp)->getLayerId(); … … 264 264 const Int64 currAC = currWeightACDCParam[comp].iAC; 265 265 // reference frame 266 #if O0194_WEIGHTED_PREDICTION_CGS266 #if SVC_EXTENSION 267 267 Int64 refDC = refWeightACDCParam[comp].iDC; 268 268 Int64 refAC = refWeightACDCParam[comp].iAC; … … 282 282 283 283 // calculating iWeight and iOffset params 284 #if O0194_WEIGHTED_PREDICTION_CGS284 #if SVC_EXTENSION 285 285 Double dWeight = (refAC==0) ? (Double)1.0 : Clip3( -16.0, 15.0, ((Double)currAC / (Double)refAC) ); 286 286 Int weight = (Int)( 0.5 + dWeight * (Double)(1<<log2Denom) ); … … 319 319 return false; 320 320 321 #if O0194_WEIGHTED_PREDICTION_CGS321 #if SVC_EXTENSION 322 322 // make sure the reference frames other than ILR are not using weighted prediction 323 323 else
Note: See TracChangeset for help on using the changeset viewer.