Changeset 529 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibCommon
- Timestamp:
- 25 Dec 2013, 05:53:40 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComRom.cpp
r494 r529 541 541 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 542 542 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 543 544 #if IL_SL_SIGNALLING_N0371545 Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM];546 Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM];547 Int activeRefPPSId [MAX_LAYERS];548 Int activeRefSPSId [MAX_LAYERS];549 #endif550 543 #endif 551 544 -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComRom.h
r494 r529 291 291 #if SVC_EXTENSION 292 292 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 293 extern Int g_posScalingFactor [MAX_LAYERS][2]; 294 295 #if IL_SL_SIGNALLING_N0371 296 extern Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 297 extern Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM]; 298 extern Int activeRefPPSId [MAX_LAYERS]; 299 extern Int activeRefSPSId [MAX_LAYERS]; 300 #endif 293 extern Int g_posScalingFactor [MAX_LAYERS][2]; 301 294 #endif 302 295 -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r528 r529 48 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 49 Int ParameterSetManager::m_activeVPSId = -1; 50 #if IL_SL_SIGNALLING_N037151 TComSPS* TComSPS::m_pcSPS[MAX_LAYERS];52 TComPPS* TComPPS::m_pcPPS[MAX_LAYERS];53 #endif54 50 #endif 55 51 … … 2233 2229 setNumSubDpbs( i, getNumLayersInIdList( getOutputLayerSetIdx(i)) ); 2234 2230 } 2235 }2236 #endif2237 2238 #if IL_SL_SIGNALLING_N03712239 Bool TComVPS::checkLayerDependency(UInt i, UInt j)2240 {2241 if( this->getDirectDependencyFlag(i, j) == true )2242 {2243 return true;2244 }2245 else2246 {2247 for(UInt k=i-1; k>j; k--)2248 {2249 if( this->getDirectDependencyFlag(i, k) == true )2250 {2251 checkLayerDependency( k,j );2252 }2253 }2254 }2255 return false;2256 2231 } 2257 2232 #endif … … 2822 2797 /** set default quantization matrix to array 2823 2798 */ 2824 #if IL_SL_SIGNALLING_N03712825 Void TComSlice::setDefaultScalingList( UInt layerId )2826 #else2827 2799 Void TComSlice::setDefaultScalingList() 2828 #endif2829 2800 { 2830 2801 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 2832 2803 for(UInt listId=0;listId<g_scalingListNum[sizeId];listId++) 2833 2804 { 2834 #if IL_SL_SIGNALLING_N03712835 getScalingList()->processDefaultMarix(sizeId, listId, layerId);2836 #else2837 2805 getScalingList()->processDefaultMarix(sizeId, listId); 2838 #endif2839 2806 } 2840 2807 } … … 3011 2978 * \param Index of input matrix 3012 2979 */ 3013 #if IL_SL_SIGNALLING_N03713014 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId, UInt layerId)3015 #else3016 2980 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId) 3017 #endif 3018 { 3019 #if IL_SL_SIGNALLING_N0371 3020 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 3021 UInt* scan = (sizeId == 0) ? g_auiSigLastScan [ SCAN_DIAG ] [ 1 ] : g_sigLastScanCG32x32; 3022 Int *src = getScalingListDefaultAddress(sizeId, listId); 3023 #endif 3024 2981 { 3025 2982 ::memcpy(getScalingListAddress(sizeId, listId),getScalingListDefaultAddress(sizeId,listId),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])); 3026 3027 #if IL_SL_SIGNALLING_N03713028 for(i = 0; i < coefNum; i++)3029 {3030 ref_scalingListCoef[layerId][sizeId][listId][i] = src[scan[i]];3031 }3032 #endif3033 3034 2983 setScalingListDC(sizeId,listId,SCALING_LIST_DC); 3035 #if IL_SL_SIGNALLING_N03713036 ref_scalingListDC[layerId][sizeId][listId] = SCALING_LIST_DC;3037 #endif3038 2984 } 3039 2985 3040 2986 /** check DC value of matrix for default matrix signaling 3041 2987 */ 3042 #if IL_SL_SIGNALLING_N03713043 Void TComScalingList::checkDcOfMatrix( UInt layerId )3044 #else3045 2988 Void TComScalingList::checkDcOfMatrix() 3046 #endif3047 2989 { 3048 2990 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 3053 2995 if(getScalingListDC(sizeId,listId) == 0) 3054 2996 { 3055 #if IL_SL_SIGNALLING_N03713056 processDefaultMarix(sizeId, listId, layerId);3057 #else3058 2997 processDefaultMarix(sizeId, listId); 3059 #endif3060 2998 } 3061 2999 } … … 3138 3076 m_activeVPSId = vpsId; 3139 3077 m_activeSPSId = spsId; 3140 3141 #if IL_SL_SIGNALLING_N03713142 activeRefPPSId[ sps->getLayerId() ] = ppsId;3143 activeRefSPSId[ sps->getLayerId() ] = spsId;3144 #endif3145 3078 3146 3079 return true; -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComSlice.h
r528 r529 157 157 Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } 158 158 159 #if IL_SL_SIGNALLING_N0371160 UInt m_layerId;161 162 Void setPredScalingListFlag (Bool b) { m_predScalingListFlag = b; }163 Bool getPredScalingListFlag () { return m_predScalingListFlag; }164 Void setScalingListRefLayerId (UInt b) { m_scalingListRefLayerId = b; }165 UInt getScalingListRefLayerId () { return m_scalingListRefLayerId; }166 #endif167 168 159 Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient 169 160 Bool checkPredMode (UInt sizeId, UInt listId); … … 171 162 UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID 172 163 Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient 173 174 #if IL_SL_SIGNALLING_N0371175 Void processDefaultMarix (UInt sizeId, UInt listId, UInt layerId );176 #else177 164 Void processDefaultMarix (UInt sizeId, UInt listId); 178 #endif179 180 165 Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value 181 182 166 Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value 183 184 #if IL_SL_SIGNALLING_N0371185 Void setLayerId(UInt layerId) { m_layerId = layerId; }186 UInt getLayerId() { return m_layerId; }187 Void checkDcOfMatrix ( UInt m_layerId );188 #else189 167 Void checkDcOfMatrix (); 190 #endif191 192 168 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 193 169 Bool xParseScalingList (Char* pchFile); … … 200 176 UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID 201 177 Bool m_scalingListPresentFlag; //!< flag for using default matrix 202 203 #if IL_SL_SIGNALLING_N0371204 Bool m_predScalingListFlag; //!< flag for inter-layer scaling-list prediction205 UInt m_scalingListRefLayerId; //!< scaling_list_ref_layer_id206 #endif207 208 178 UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index 209 179 Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix … … 512 482 Int m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1]; 513 483 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 514 #endif515 #if IL_SL_SIGNALLING_N0371516 Bool m_scalingListLayerDependency[MAX_LAYERS][MAX_LAYERS]; // layer dependency for scaling list517 484 #endif 518 485 #if VPS_EXTN_OFFSET … … 730 697 #if VPS_DPB_SIZE_TABLE 731 698 Void deriveNumberOfSubDpbs(); 732 #endif733 #if IL_SL_SIGNALLING_N0371734 Bool checkLayerDependency(UInt i, UInt j);735 Bool getScalingListLayerDependency ( UInt layerId, UInt refLayerId ) { return m_scalingListLayerDependency[layerId][refLayerId]; }736 Void setScalingListLayerDependency ( UInt layerId, UInt refLayerId, Bool val ) { m_scalingListLayerDependency[layerId][refLayerId] = val; }737 699 #endif 738 700 … … 1293 1255 1294 1256 UInt m_layerId; 1295 1296 #if IL_SL_SIGNALLING_N03711297 TComVPS* m_pVPS;1298 static TComSPS* m_pcSPS[MAX_LAYERS];1299 Bool m_predScalingListFlag;1300 UInt m_scalingListRefLayerId;1301 #endif1302 1257 1303 1258 #if REF_IDX_MFM … … 1441 1396 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1442 1397 1443 #if IL_SL_SIGNALLING_N03711444 Bool getPredScalingListFlag() { return m_predScalingListFlag; }1445 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; }1446 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; }1447 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; }1448 1449 TComVPS* getVPS() { return m_pVPS; }1450 Void setVPS( TComVPS* vps ) { m_pVPS = vps; }1451 static TComSPS* getSPS(UInt layerId) { return m_pcSPS[layerId]; }1452 static Void setSPS(UInt layerId, TComSPS* sps) { m_pcSPS[layerId] = sps; }1453 #endif1454 1455 1398 #if SCALINGLIST_INFERRING 1456 1399 Void setScalingList( TComScalingList *scalingList ) { m_scalingList = scalingList; } … … 1607 1550 Bool m_scalingListPresentFlag; 1608 1551 1609 #if SVC_EXTENSION1610 UInt m_layerId;1611 1612 #if IL_SL_SIGNALLING_N03711613 static TComPPS* m_pcPPS[MAX_LAYERS];1614 Bool m_predScalingListFlag;1615 UInt m_scalingListRefLayerId;1616 #endif1617 1618 #endif1619 1620 1552 TComScalingList* m_scalingList; //!< ScalingList class pointer 1621 1553 … … 1624 1556 Int m_numExtraSliceHeaderBits; 1625 1557 1558 #if SVC_EXTENSION 1626 1559 #if SCALINGLIST_INFERRING 1560 UInt m_layerId; 1627 1561 Bool m_inferScalingListFlag; 1628 1562 UInt m_scalingListRefLayerId; 1563 #endif 1629 1564 #endif 1630 1565 … … 1746 1681 Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } 1747 1682 Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } 1748 #endif1749 #if IL_SL_SIGNALLING_N03711750 Void setLayerId(UInt layerId) { m_layerId = layerId; }1751 UInt getLayerId() { return m_layerId; }1752 1753 Bool getPredScalingListFlag() { return m_predScalingListFlag; }1754 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; }1755 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; }1756 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; }1757 1758 static TComPPS* getPPS(UInt layerId) { return m_pcPPS[layerId]; }1759 static Void setPPS(UInt layerId, TComPPS* pps) { m_pcPPS[layerId] = pps; }1760 1683 #endif 1761 1684 … … 2159 2082 Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } 2160 2083 TComScalingList* getScalingList () { return m_scalingList; } 2161 2162 #if IL_SL_SIGNALLING_N03712163 Void setDefaultScalingList ( UInt m_layerId );2164 #else2165 2084 Void setDefaultScalingList (); 2166 #endif2167 2168 2085 Bool checkDefaultScalingList (); 2169 2086 Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r442 r529 2494 2494 /** set flat matrix value to quantized coefficient 2495 2495 */ 2496 #if IL_SL_SIGNALLING_N03712497 Void TComTrQuant::setFlatScalingList( UInt m_layerId )2498 #else2499 2496 Void TComTrQuant::setFlatScalingList() 2500 #endif2501 2497 { 2502 2498 UInt size,list; … … 2507 2503 for(list = 0; list < g_scalingListNum[size]; list++) 2508 2504 { 2509 #if IL_SL_SIGNALLING_N03712510 ref_scalingListDC[m_layerId][size][list] = SCALING_LIST_DC;2511 for(UInt i=0; i<MAX_MATRIX_COEF_NUM; i++)2512 {2513 ref_scalingListCoef[m_layerId][size][list][i] = SCALING_LIST_DC;2514 }2515 #endif2516 2517 2505 for(qp=0;qp<SCALING_LIST_REM_NUM;qp++) 2518 2506 { -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TComTrQuant.h
r442 r529 181 181 Void setUseScalingList ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; }; 182 182 Bool getUseScalingList (){ return m_scalingListEnabledFlag; }; 183 184 #if IL_SL_SIGNALLING_N0371185 Void setFlatScalingList ( UInt m_layerId );186 #else187 183 Void setFlatScalingList (); 188 #endif189 190 184 Void xsetFlatScalingList ( UInt list, UInt size, UInt qp); 191 185 Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, UInt qp); -
branches/SHM-4.1-dev/source/Lib/TLibCommon/TypeDef.h
r528 r529 63 63 #define RPL_INIT_N0316_N0082 1 ///< JCTVC-N0316, JCTVC-N0082: initial reference picture list construction 64 64 65 #define IL_SL_SIGNALLING_N0371 0 ///< JCTVC-N0371: inter-layer scaling list66 65 #define SCALINGLIST_INFERRING 1 ///< JCTVC-N0371: inter-layer scaling list 67 66 #define M0463_VUI_EXT_ILP_REF 0 ///< JCTVC-M0463: VUI extension inter-layer dependency offset signalling
Note: See TracChangeset for help on using the changeset viewer.