Changeset 414 in SHVCSoftware for branches/SHM-3.1-dev/source/Lib/TLibCommon
- Timestamp:
- 8 Oct 2013, 11:25:37 (11 years ago)
- Location:
- branches/SHM-3.1-dev/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComRom.cpp
r370 r414 526 526 Int g_mvScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 527 527 Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}}; 528 529 #if IL_SL_SIGNALLING_N0371 530 Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 531 Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM]; 532 Int activeRefPPSId [MAX_LAYERS]; 533 Int activeRefSPSId [MAX_LAYERS]; 534 #endif 528 535 #endif 529 536 -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComRom.h
r370 r414 282 282 extern Int g_mvScalingFactor [MAX_LAYERS][2]; 283 283 extern Int g_posScalingFactor [MAX_LAYERS][2]; 284 285 #if IL_SL_SIGNALLING_N0371 286 extern Int ref_scalingListDC [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 287 extern Int ref_scalingListCoef [MAX_LAYERS][SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][MAX_MATRIX_COEF_NUM]; 288 extern Int activeRefPPSId [MAX_LAYERS]; 289 extern Int activeRefSPSId [MAX_LAYERS]; 290 #endif 284 291 #endif 285 292 -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r412 r414 46 46 47 47 #if SVC_EXTENSION 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 Int ParameterSetManager::m_activeVPSId = -1; 48 ParameterSetMap<TComVPS> ParameterSetManager::m_vpsMap(MAX_NUM_VPS); 49 Int ParameterSetManager::m_activeVPSId = -1; 50 #if IL_SL_SIGNALLING_N0371 51 TComSPS* TComSPS::m_pcSPS[MAX_LAYERS]; 52 TComPPS* TComPPS::m_pcPPS[MAX_LAYERS]; 53 #endif 50 54 #endif 51 55 … … 1879 1883 } 1880 1884 #endif 1885 <<<<<<< .mine 1886 1887 #if IL_SL_SIGNALLING_N0371 1888 Bool TComVPS::checkLayerDependency(UInt i, UInt j) 1889 { 1890 if( this->getDirectDependencyFlag(i, j) == true ) 1891 { 1892 return true; 1893 } 1894 else 1895 { 1896 for(UInt k=i-1; k>j; k--) 1897 { 1898 if( this->getDirectDependencyFlag(i, k) == true ) 1899 { 1900 checkLayerDependency( k,j ); 1901 } 1902 } 1903 } 1904 return false; 1905 } 1906 #endif 1907 1908 ======= 1881 1909 #if VIEW_ID_RELATED_SIGNALING 1882 1910 Int TComVPS::getNumViews() … … 1912 1940 } 1913 1941 #endif 1942 >>>>>>> .r413 1914 1943 // ------------------------------------------------------------------------------------------------ 1915 1944 // Sequence parameter set (SPS) … … 2382 2411 /** set default quantization matrix to array 2383 2412 */ 2413 #if IL_SL_SIGNALLING_N0371 2414 Void TComSlice::setDefaultScalingList( UInt layerId ) 2415 #else 2384 2416 Void TComSlice::setDefaultScalingList() 2417 #endif 2385 2418 { 2386 2419 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 2388 2421 for(UInt listId=0;listId<g_scalingListNum[sizeId];listId++) 2389 2422 { 2423 #if IL_SL_SIGNALLING_N0371 2424 getScalingList()->processDefaultMarix(sizeId, listId, layerId); 2425 #else 2390 2426 getScalingList()->processDefaultMarix(sizeId, listId); 2427 #endif 2391 2428 } 2392 2429 } … … 2449 2486 { 2450 2487 src = getScalingListAddress(sizeIdc, listIdc); 2451 2452 2488 fseek(fp,0,0); 2453 2489 do … … 2563 2599 * \param Index of input matrix 2564 2600 */ 2601 #if IL_SL_SIGNALLING_N0371 2602 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId, UInt layerId) 2603 #else 2565 2604 Void TComScalingList::processDefaultMarix(UInt sizeId, UInt listId) 2566 { 2605 #endif 2606 { 2607 #if IL_SL_SIGNALLING_N0371 2608 Int i,coefNum = min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId]); 2609 UInt* scan = (sizeId == 0) ? g_auiSigLastScan [ SCAN_DIAG ] [ 1 ] : g_sigLastScanCG32x32; 2610 Int *src = getScalingListDefaultAddress(sizeId, listId); 2611 #endif 2612 2567 2613 ::memcpy(getScalingListAddress(sizeId, listId),getScalingListDefaultAddress(sizeId,listId),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])); 2614 2615 #if IL_SL_SIGNALLING_N0371 2616 for(i = 0; i < coefNum; i++) 2617 { 2618 ref_scalingListCoef[layerId][sizeId][listId][i] = src[scan[i]]; 2619 } 2620 #endif 2621 2568 2622 setScalingListDC(sizeId,listId,SCALING_LIST_DC); 2623 #if IL_SL_SIGNALLING_N0371 2624 ref_scalingListDC[layerId][sizeId][listId] = SCALING_LIST_DC; 2625 #endif 2569 2626 } 2570 2627 2571 2628 /** check DC value of matrix for default matrix signaling 2572 2629 */ 2630 #if IL_SL_SIGNALLING_N0371 2631 Void TComScalingList::checkDcOfMatrix( UInt layerId ) 2632 #else 2573 2633 Void TComScalingList::checkDcOfMatrix() 2634 #endif 2574 2635 { 2575 2636 for(UInt sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) … … 2580 2641 if(getScalingListDC(sizeId,listId) == 0) 2581 2642 { 2643 #if IL_SL_SIGNALLING_N0371 2644 processDefaultMarix(sizeId, listId, layerId); 2645 #else 2582 2646 processDefaultMarix(sizeId, listId); 2647 #endif 2583 2648 } 2584 2649 } … … 2661 2726 m_activeVPSId = vpsId; 2662 2727 m_activeSPSId = spsId; 2728 2729 #if IL_SL_SIGNALLING_N0371 2730 activeRefPPSId[ sps->getLayerId() ] = ppsId; 2731 activeRefSPSId[ sps->getLayerId() ] = spsId; 2732 #endif 2733 2663 2734 return true; 2664 2735 } -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComSlice.h
r411 r414 156 156 Void setScalingListPresentFlag (Bool b) { m_scalingListPresentFlag = b; } 157 157 Bool getScalingListPresentFlag () { return m_scalingListPresentFlag; } 158 159 #if IL_SL_SIGNALLING_N0371 160 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 #endif 167 158 168 Bool getUseTransformSkip () { return m_useTransformSkip; } 159 169 Void setUseTransformSkip (Bool b) { m_useTransformSkip = b; } 170 160 171 Int* getScalingListAddress (UInt sizeId, UInt listId) { return m_scalingListCoef[sizeId][listId]; } //!< get matrix coefficient 172 161 173 Bool checkPredMode (UInt sizeId, UInt listId); 174 162 175 Void setRefMatrixId (UInt sizeId, UInt listId, UInt u) { m_refMatrixId[sizeId][listId] = u; } //!< set reference matrix ID 163 176 UInt getRefMatrixId (UInt sizeId, UInt listId) { return m_refMatrixId[sizeId][listId]; } //!< get reference matrix ID 164 177 Int* getScalingListDefaultAddress (UInt sizeId, UInt listId); //!< get default matrix coefficient 178 179 #if IL_SL_SIGNALLING_N0371 180 Void processDefaultMarix (UInt sizeId, UInt listId, UInt layerId ); 181 #else 165 182 Void processDefaultMarix (UInt sizeId, UInt listId); 183 #endif 184 166 185 Void setScalingListDC (UInt sizeId, UInt listId, UInt u) { m_scalingListDC[sizeId][listId] = u; } //!< set DC value 167 186 168 187 Int getScalingListDC (UInt sizeId, UInt listId) { return m_scalingListDC[sizeId][listId]; } //!< get DC value 188 189 #if IL_SL_SIGNALLING_N0371 190 Void setLayerId(UInt layerId) { m_layerId = layerId; } 191 UInt getLayerId() { return m_layerId; } 192 Void checkDcOfMatrix ( UInt m_layerId ); 193 #else 169 194 Void checkDcOfMatrix (); 195 #endif 196 170 197 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 171 198 Bool xParseScalingList (Char* pchFile); … … 174 201 Void init (); 175 202 Void destroy (); 203 176 204 Int m_scalingListDC [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< the DC value of the matrix coefficient for 16x16 177 205 Bool m_useDefaultScalingMatrixFlag [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< UseDefaultScalingMatrixFlag 178 206 UInt m_refMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< RefMatrixID 179 207 Bool m_scalingListPresentFlag; //!< flag for using default matrix 208 209 #if IL_SL_SIGNALLING_N0371 210 Bool m_predScalingListFlag; //!< flag for inter-layer scaling-list prediction 211 UInt m_scalingListRefLayerId; //!< scaling_list_ref_layer_id 212 #endif 213 180 214 UInt m_predMatrixId [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< reference list index 215 181 216 Int *m_scalingListCoef [SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; //!< quantization matrix 217 182 218 Bool m_useTransformSkip; //!< transform skipping flag for setting default scaling matrix for 4x4 183 219 }; … … 469 505 Int m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1]; 470 506 #endif 507 #if IL_SL_SIGNALLING_N0371 508 Bool m_scalingListLayerDependency[MAX_LAYERS][MAX_LAYERS]; // layer dependency for scaling list 509 #endif 471 510 TComPTL m_pcPTL; 472 511 TimingInfo m_timingInfo; … … 554 593 Int m_avgPicRate [MAX_VPS_LAYER_SETS_PLUS1][MAX_TLAYER]; 555 594 #endif 595 <<<<<<< .mine 596 597 ======= 556 598 #if REPN_FORMAT_IN_VPS 557 599 Bool m_repFormatIdxPresentFlag; … … 564 606 Int m_viewIdVal [MAX_LAYERS]; 565 607 #endif 608 >>>>>>> .r413 566 609 public: 567 610 TComVPS(); … … 629 672 Void deriveLayerIdListVariables(); 630 673 #endif 674 675 #if IL_SL_SIGNALLING_N0371 676 Bool checkLayerDependency(UInt i, UInt j); 677 Bool getScalingListLayerDependency ( UInt layerId, UInt refLayerId ) { return m_scalingListLayerDependency[layerId][refLayerId]; } 678 Void setScalingListLayerDependency ( UInt layerId, UInt refLayerId, Bool val ) { m_scalingListLayerDependency[layerId][refLayerId] = val; } 679 #endif 680 631 681 TComPTL* getPTL() { return &m_pcPTL; } 632 682 TimingInfo* getTimingInfo() { return &m_timingInfo; } … … 1083 1133 Bool m_scalingListEnabledFlag; 1084 1134 Bool m_scalingListPresentFlag; 1135 1085 1136 TComScalingList* m_scalingList; //!< ScalingList class pointer 1137 1086 1138 UInt m_uiMaxDecPicBuffering[MAX_TLAYER]; 1087 1139 UInt m_uiMaxLatencyIncrease[MAX_TLAYER]; // Really max latency increase plus 1 (value 0 expresses no limit) … … 1107 1159 #if SVC_EXTENSION 1108 1160 UInt m_layerId; 1161 1162 #if IL_SL_SIGNALLING_N0371 1163 TComVPS* m_pVPS; 1164 static TComSPS* m_pcSPS[MAX_LAYERS]; 1165 Bool m_predScalingListFlag; 1166 UInt m_scalingListRefLayerId; 1167 #endif 1168 1109 1169 #endif 1110 1170 #if REF_IDX_MFM … … 1229 1289 Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } 1230 1290 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1291 1292 #if IL_SL_SIGNALLING_N0371 1293 Bool getPredScalingListFlag() { return m_predScalingListFlag; } 1294 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } 1295 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1296 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } 1297 1298 TComVPS* getVPS() { return m_pVPS; } 1299 Void setVPS( TComVPS* vps ) { m_pVPS = vps; } 1300 static TComSPS* getSPS(UInt layerId) { return m_pcSPS[layerId]; } 1301 static Void setSPS(UInt layerId, TComSPS* sps) { m_pcSPS[layerId] = sps; } 1302 #endif 1303 1231 1304 Void setScalingList ( TComScalingList *scalingList); 1232 1305 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in SPS 1306 1233 1307 UInt getMaxDecPicBuffering (UInt tlayer) { return m_uiMaxDecPicBuffering[tlayer]; } 1234 1308 Void setMaxDecPicBuffering ( UInt ui, UInt tlayer ) { m_uiMaxDecPicBuffering[tlayer] = ui; } … … 1364 1438 Int m_deblockingFilterTcOffsetDiv2; //< tc offset for deblocking filter 1365 1439 Bool m_scalingListPresentFlag; 1440 1441 #if SVC_EXTENSION 1442 UInt m_layerId; 1443 1444 #if IL_SL_SIGNALLING_N0371 1445 static TComPPS* m_pcPPS[MAX_LAYERS]; 1446 Bool m_predScalingListFlag; 1447 UInt m_scalingListRefLayerId; 1448 #endif 1449 1450 #endif 1451 1366 1452 TComScalingList* m_scalingList; //!< ScalingList class pointer 1453 1367 1454 Bool m_listsModificationPresentFlag; 1368 1455 UInt m_log2ParallelMergeLevelMinus2; … … 1478 1565 Bool getScalingListPresentFlag() { return m_scalingListPresentFlag; } 1479 1566 Void setScalingListPresentFlag( Bool b ) { m_scalingListPresentFlag = b; } 1567 1568 #if IL_SL_SIGNALLING_N0371 1569 Void setLayerId(UInt layerId) { m_layerId = layerId; } 1570 UInt getLayerId() { return m_layerId; } 1571 1572 Bool getPredScalingListFlag() { return m_predScalingListFlag; } 1573 Void setPredScalingListFlag( Bool b ) { m_predScalingListFlag = b; } 1574 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1575 Void setScalingListRefLayerId( UInt b ) { m_scalingListRefLayerId = b; } 1576 1577 static TComPPS* getPPS(UInt layerId) { return m_pcPPS[layerId]; } 1578 static Void setPPS(UInt layerId, TComPPS* pps) { m_pcPPS[layerId] = pps; } 1579 #endif 1580 1480 1581 Void setScalingList ( TComScalingList *scalingList); 1481 1582 TComScalingList* getScalingList () { return m_scalingList; } //!< get ScalingList class pointer in PPS … … 1879 1980 Void setScalingList ( TComScalingList* scalingList ) { m_scalingList = scalingList; } 1880 1981 TComScalingList* getScalingList () { return m_scalingList; } 1982 1983 #if IL_SL_SIGNALLING_N0371 1984 Void setDefaultScalingList ( UInt m_layerId ); 1985 #else 1881 1986 Void setDefaultScalingList (); 1987 #endif 1988 1882 1989 Bool checkDefaultScalingList (); 1883 1990 Void setCabacInitFlag ( Bool val ) { m_cabacInitFlag = val; } //!< set CABAC initial flag -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComTrQuant.cpp
r389 r414 2494 2494 /** set flat matrix value to quantized coefficient 2495 2495 */ 2496 #if IL_SL_SIGNALLING_N0371 2497 Void TComTrQuant::setFlatScalingList( UInt m_layerId ) 2498 #else 2496 2499 Void TComTrQuant::setFlatScalingList() 2500 #endif 2497 2501 { 2498 2502 UInt size,list; … … 2503 2507 for(list = 0; list < g_scalingListNum[size]; list++) 2504 2508 { 2509 #if IL_SL_SIGNALLING_N0371 2510 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 #endif 2516 2505 2517 for(qp=0;qp<SCALING_LIST_REM_NUM;qp++) 2506 2518 { -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TComTrQuant.h
r313 r414 181 181 Void setUseScalingList ( Bool bUseScalingList){ m_scalingListEnabledFlag = bUseScalingList; }; 182 182 Bool getUseScalingList (){ return m_scalingListEnabledFlag; }; 183 184 #if IL_SL_SIGNALLING_N0371 185 Void setFlatScalingList ( UInt m_layerId ); 186 #else 183 187 Void setFlatScalingList (); 188 #endif 189 184 190 Void xsetFlatScalingList ( UInt list, UInt size, UInt qp); 185 191 Void xSetScalingListEnc ( TComScalingList *scalingList, UInt list, UInt size, UInt qp); -
branches/SHM-3.1-dev/source/Lib/TLibCommon/TypeDef.h
r413 r414 60 60 #define TEMP_SCALABILITY_FIX 1 ///< fix for temporal scalability 61 61 #endif 62 <<<<<<< .mine 63 #define IL_SL_SIGNALLING_N0371 1 ///< JCTVC-N0371: inter-layer scaling list 64 #define M0464_TILE_BOUNDARY_ALIGNED_FLAG 0 ///< VUI flag to indicate tile boundary alignment 65 ======= 66 >>>>>>> .r413 62 67 #define M0463_VUI_EXT_ILP_REF 0 ///< VUI extension inter-layer dependency offset signalling 63 68 #define SPS_EXTENSION 1 ///< Define sps_extension() syntax structure
Note: See TracChangeset for help on using the changeset viewer.