Changeset 529 in SHVCSoftware for branches/SHM-4.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 25 Dec 2013, 05:53:40 (11 years ago)
- Location:
- branches/SHM-4.1-dev/source/Lib/TLibDecoder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r528 r529 313 313 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 314 314 315 #if IL_SL_SIGNALLING_N0371316 pcPPS->setPPS( pcPPS->getLayerId(), pcPPS );317 #endif318 319 315 if(pcPPS->getScalingListPresentFlag ()) 320 316 { 321 #if IL_SL_SIGNALLING_N0371322 pcPPS->getScalingList()->setLayerId( pcPPS->getLayerId() );323 324 if( pcPPS->getLayerId() > 0 )325 {326 READ_FLAG( uiCode, "pps_pred_scaling_list_flag" ); pcPPS->setPredScalingListFlag( uiCode ? true : false );327 pcPPS->getScalingList()->setPredScalingListFlag( pcPPS->getPredScalingListFlag() );328 329 if( pcPPS->getPredScalingListFlag() )330 {331 READ_UVLC ( uiCode, "scaling_list_pps_ref_layer_id" ); pcPPS->setScalingListRefLayerId( uiCode );332 333 // The value of pps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive334 assert( /*pcPPS->getScalingListRefLayerId() >= 0 &&*/ pcPPS->getScalingListRefLayerId() <= 62 );335 336 // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of pps_scaling_list_ref_layer_id shall be greater than 0337 if( pcPPS->getSPS()->getVPS()->getAvcBaseLayerFlag() )338 {339 assert( pcPPS->getScalingListRefLayerId() > 0 );340 }341 342 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and343 // pps_infer_scaling_list_flag in the PPS is equal to 1, pps_infer_scaling_list_flag shall be equal to 0 for the PPS that is active for the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id344 assert( pcPPS->getPPS( pcPPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false );345 346 // It is a requirement of bitstream conformance that, when a PPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB,347 // the layer with nuh_layer_id equal to pps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB348 assert( pcPPS->getSPS()->getVPS()->getScalingListLayerDependency( pcPPS->getLayerId(), pcPPS->getScalingListRefLayerId() ) == true );349 350 pcPPS->getScalingList()->setScalingListRefLayerId( pcPPS->getScalingListRefLayerId() );351 parseScalingList( pcPPS->getScalingList() );352 }353 else354 {355 parseScalingList( pcPPS->getScalingList() );356 }357 }358 else359 {360 parseScalingList( pcPPS->getScalingList() );361 }362 #else363 317 parseScalingList( pcPPS->getScalingList() ); 364 #endif365 318 } 366 319 … … 588 541 pcSPS->setTemporalIdNestingFlag( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId())->getTemporalNestingFlag() ); 589 542 } 590 #if IL_SL_SIGNALLING_N0371591 pcSPS->setVPS( parameterSetManager->getPrefetchedVPS(pcSPS->getVPSId()) );592 pcSPS->setSPS( pcSPS->getLayerId(), pcSPS );593 #endif594 543 #endif 595 544 if ( pcSPS->getMaxTLayers() == 1 ) … … 762 711 if(pcSPS->getScalingListPresentFlag ()) 763 712 { 764 765 #if IL_SL_SIGNALLING_N0371766 pcSPS->getScalingList()->setLayerId( pcSPS->getLayerId() );767 768 if( pcSPS->getLayerId() > 0 )769 {770 READ_FLAG( uiCode, "sps_pred_scaling_list_flag" ); pcSPS->setPredScalingListFlag ( uiCode );771 pcSPS->getScalingList()->setPredScalingListFlag( pcSPS->getPredScalingListFlag() );772 773 if( pcSPS->getPredScalingListFlag() )774 {775 READ_UVLC( uiCode, "scaling_list_sps_ref_layer_id" ); pcSPS->setScalingListRefLayerId( uiCode );776 777 // The value of sps_scaling_list_ref_layer_id shall be in the range of 0 to 62, inclusive778 assert( /*pcSPS->getScalingListRefLayerId() >= 0 &&*/ pcSPS->getScalingListRefLayerId() <= 62 );779 780 // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0781 if( pcSPS->getVPS()->getAvcBaseLayerFlag() )782 {783 assert( pcSPS->getScalingListRefLayerId() > 0 );784 }785 786 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB and787 // sps_infer_scaling_list_flag in the SPS is equal to 1, sps_infer_scaling_list_flag shall be equal to 0 for the SPS that is active for the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id788 assert( pcSPS->getSPS( pcSPS->getScalingListRefLayerId() )->getPredScalingListFlag() == false );789 790 // It is a requirement of bitstream conformance that, when an SPS with nuh_layer_id equal to nuhLayerIdA is active for a layer with nuh_layer_id equal to nuhLayerIdB,791 // the layer with nuh_layer_id equal to sps_scaling_list_ref_layer_id shall be a direct or indirect reference layer of the layer with nuh_layer_id equal to nuhLayerIdB792 assert( pcSPS->getVPS()->getScalingListLayerDependency( pcSPS->getLayerId(), pcSPS->getScalingListRefLayerId() ) == true );793 794 pcSPS->getScalingList()->setScalingListRefLayerId( pcSPS->getScalingListRefLayerId() );795 parseScalingList( pcSPS->getScalingList() );796 }797 else798 {799 parseScalingList( pcSPS->getScalingList() );800 }801 }802 else803 {804 parseScalingList( pcSPS->getScalingList() );805 }806 #else807 713 parseScalingList( pcSPS->getScalingList() ); 808 #endif809 810 714 } 811 715 #if SCALINGLIST_INFERRING … … 1502 1406 } 1503 1407 } 1504 #endif1505 1506 #if IL_SL_SIGNALLING_N03711507 for(i = 1; i < vps->getMaxLayers(); i++)1508 {1509 for(j = 0; j < i; j++)1510 {1511 vps->setScalingListLayerDependency( i, j, vps->checkLayerDependency( i,j ) );1512 }1513 }1514 1408 #endif 1515 1409 … … 2930 2824 for(listId = 0; listId < g_scalingListNum[sizeId]; listId++) 2931 2825 { 2932 #if IL_SL_SIGNALLING_N03712933 if ( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )2934 {2935 READ_FLAG( code, "scaling_list_pred_mode_flag");2936 scalingListPredModeFlag = (code) ? true : false;2937 if(!scalingListPredModeFlag) //Copy Mode2938 {2939 READ_UVLC( code, "scaling_list_pred_matrix_id_delta");2940 scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code)));2941 if( sizeId > SCALING_LIST_8x8 )2942 {2943 scalingList->setScalingListDC(sizeId,listId,((listId == scalingList->getRefMatrixId (sizeId,listId))? 16 :scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))));2944 }2945 scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));2946 2947 }2948 else //DPCM Mode2949 {2950 xDecodeScalingList(scalingList, sizeId, listId);2951 }2952 }2953 else2954 {2955 READ_FLAG( code, "scaling_list_pred_mode_flag");2956 scalingListPredModeFlag = (code) ? true : false;2957 if(!scalingListPredModeFlag) //Copy Mode2958 {2959 READ_UVLC( code, "scaling_list_pred_matrix_id_delta");2960 scalingList->setRefMatrixId (sizeId,listId,(UInt)((Int)(listId)-(code)));2961 if( sizeId > SCALING_LIST_8x8 )2962 {2963 scalingList->setScalingListDC(sizeId,listId,((listId == scalingList->getRefMatrixId (sizeId,listId))? 16 :scalingList->getScalingListDC(sizeId, scalingList->getRefMatrixId (sizeId,listId))));2964 }2965 scalingList->processRefMatrix( sizeId, listId, scalingList->getRefMatrixId (sizeId,listId));2966 2967 }2968 else //DPCM Mode2969 {2970 xDecodeScalingList(scalingList, sizeId, listId);2971 }2972 }2973 #else2974 2826 READ_FLAG( code, "scaling_list_pred_mode_flag"); 2975 2827 scalingListPredModeFlag = (code) ? true : false; … … 2989 2841 xDecodeScalingList(scalingList, sizeId, listId); 2990 2842 } 2991 #endif2992 2843 } 2993 2844 } … … 3011 2862 if( sizeId > SCALING_LIST_8x8 ) 3012 2863 { 3013 #if IL_SL_SIGNALLING_N03713014 if( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )3015 {3016 ref_scalingListDC[scalingList->getLayerId()][sizeId][listId] = scalingList->getScalingListDC(sizeId,listId);3017 scalingList->setScalingListDC(sizeId,listId,ref_scalingListDC[scalingList->getScalingListRefLayerId()][sizeId][listId]);3018 }3019 else3020 {3021 READ_SVLC( scalingListDcCoefMinus8, "scaling_list_dc_coef_minus8");3022 scalingList->setScalingListDC(sizeId,listId,scalingListDcCoefMinus8 + 8);3023 nextCoef = scalingList->getScalingListDC(sizeId,listId);3024 ref_scalingListDC[scalingList->getLayerId()][sizeId][listId] = scalingList->getScalingListDC(sizeId,listId);3025 }3026 #else3027 2864 READ_SVLC( scalingListDcCoefMinus8, "scaling_list_dc_coef_minus8"); 3028 2865 scalingList->setScalingListDC(sizeId,listId,scalingListDcCoefMinus8 + 8); 3029 2866 nextCoef = scalingList->getScalingListDC(sizeId,listId); 3030 #endif3031 2867 } 3032 2868 3033 2869 for(i = 0; i < coefNum; i++) 3034 2870 { 3035 #if IL_SL_SIGNALLING_N03713036 if( scalingList->getLayerId() > 0 && scalingList->getPredScalingListFlag() )3037 {3038 ref_scalingListCoef[scalingList->getLayerId()][sizeId][listId][i] = dst[scan[i]];3039 dst[scan[i]] = ref_scalingListCoef[scalingList->getScalingListRefLayerId()][sizeId][listId][i];3040 }3041 else3042 {3043 READ_SVLC( data, "scaling_list_delta_coef");3044 nextCoef = (nextCoef + data + 256 ) % 256;3045 dst[scan[i]] = nextCoef;3046 ref_scalingListCoef[scalingList->getLayerId()][sizeId][listId][i] = dst[scan[i]];3047 }3048 #else3049 2871 READ_SVLC( data, "scaling_list_delta_coef"); 3050 2872 nextCoef = (nextCoef + data + 256 ) % 256; 3051 2873 dst[scan[i]] = nextCoef; 3052 #endif3053 2874 } 3054 2875 } -
branches/SHM-4.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r528 r529 1465 1465 if(pcSlice->getSPS()->getScalingListFlag()) 1466 1466 { 1467 #if IL_SL_SIGNALLING_N03711468 pcSlice->getSPS()->getScalingList()->setLayerId( m_layerId );1469 #endif1470 1471 1467 pcSlice->setScalingList ( pcSlice->getSPS()->getScalingList() ); 1472 1468 1473 1469 if(pcSlice->getPPS()->getScalingListPresentFlag()) 1474 1470 { 1475 #if IL_SL_SIGNALLING_N03711476 pcSlice->getPPS()->getScalingList()->setLayerId( m_layerId );1477 #endif1478 1479 1471 pcSlice->setScalingList ( pcSlice->getPPS()->getScalingList() ); 1480 1472 } … … 1484 1476 if(!pcSlice->getPPS()->getScalingListPresentFlag() && !pcSlice->getSPS()->getScalingListPresentFlag()) 1485 1477 { 1486 #if IL_SL_SIGNALLING_N03711487 pcSlice->setDefaultScalingList( m_layerId );1488 #else1489 1478 pcSlice->setDefaultScalingList(); 1490 #endif1491 1479 } 1492 1480 m_cTrQuant.setScalingListDec(pcSlice->getScalingList()); … … 1495 1483 else 1496 1484 { 1497 #if IL_SL_SIGNALLING_N03711498 m_cTrQuant.setFlatScalingList( m_layerId );1499 #else1500 1485 m_cTrQuant.setFlatScalingList(); 1501 #endif1502 1486 m_cTrQuant.setUseScalingList(false); 1503 1487 } … … 1543 1527 TComPPS* pps = new TComPPS(); 1544 1528 1545 #if SCALINGLIST_INFERRING || IL_SL_SIGNALLING_N03711529 #if SCALINGLIST_INFERRING 1546 1530 pps->setLayerId( m_layerId ); 1547 1531 #endif
Note: See TracChangeset for help on using the changeset viewer.