Changeset 966 in SHVCSoftware
- Timestamp:
- 6 Jan 2015, 19:15:01 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r964 r966 292 292 #endif 293 293 #define R0157_RESTRICT_PPSID_FOR_CGS_LUT 1 ///< JCTVC-R0157: when pps_pic_parameter_set_id greater than or equal to 8, colour_mapping_enabled_flag shall be equal to 0 294 295 #define VPS_FIX_TO_MATCH_SPEC 1 294 296 295 297 /// scalability types -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r964 r966 1726 1726 for(i = 1; i < numOutputLayerSets; i++) 1727 1727 { 1728 #if VPS_FIX_TO_MATCH_SPEC 1729 if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() ) 1730 #else 1728 1731 if( i > (vps->getNumLayerSets() - 1) ) 1732 #endif 1729 1733 { 1730 1734 Int numBits = 1; … … 1741 1745 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 1742 1746 #if Q0078_ADD_LAYER_SETS 1743 if ( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1744 #else 1745 if ( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1747 #if VPS_FIX_TO_MATCH_SPEC 1748 if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() == 2 ) 1749 #else 1750 if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1751 #endif 1752 #else 1753 #if VPS_FIX_TO_MATCH_SPEC 1754 if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() == 2 ) 1755 #else 1756 if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 ) 1757 #endif 1746 1758 #endif 1747 1759 { … … 1786 1798 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 1787 1799 { 1800 #if VPS_FIX_TO_MATCH_SPEC 1801 if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel()-1) > 0 ) 1802 #else 1788 1803 if( vps->getNecessaryLayerFlag(i, j) ) 1804 #endif 1789 1805 { 1790 1806 READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" ); … … 1977 1993 if( vps->getRepFormatIdxPresentFlag() ) 1978 1994 { 1979 for(i = 1; i < vps->getMaxLayers(); i++) 1995 #if VPS_FIX_TO_MATCH_SPEC 1996 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 1997 #else 1998 for (i = 1; i < vps->getMaxLayers(); i++) 1999 #endif 1980 2000 { 1981 2001 Int numBits = 1; … … 2466 2486 #if DPB_INTERNAL_BL_SIG 2467 2487 uiCode=0; 2468 if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0 ) ) 2488 2489 #if VPS_FIX_TO_MATCH_SPEC 2490 if( vps->getNecessaryLayerFlag(i, k) && ( vps->getBaseLayerInternalFlag() || vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) ) ) 2491 #else 2492 if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0 ) ) 2493 #endif 2469 2494 #endif 2470 2495 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); … … 2737 2762 if (!uiCode) 2738 2763 { 2739 for(i = 0; i < vps->getMaxLayers(); i++) 2764 #if VPS_FIX_TO_MATCH_SPEC 2765 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 2766 #else 2767 for (i = 0; i < vps->getMaxLayers(); i++) 2768 #endif 2740 2769 { 2741 2770 READ_FLAG( uiCode, "tiles_in_use_flag[ i ]" ); vps->setTilesInUseFlag(i, (uiCode == 1)); … … 2751 2780 #endif 2752 2781 2753 for(i = 1; i < vps->getMaxLayers(); i++) 2782 #if VPS_FIX_TO_MATCH_SPEC 2783 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 2784 #else 2785 for (i = 1; i < vps->getMaxLayers(); i++) 2786 #endif 2754 2787 { 2755 2788 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) … … 2772 2805 if (!uiCode) 2773 2806 { 2774 for(i = 0; i < vps->getMaxLayers(); i++) 2807 #if VPS_FIX_TO_MATCH_SPEC 2808 for (i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++) 2809 #else 2810 for (i = 0; i < vps->getMaxLayers(); i++) 2811 #endif 2775 2812 { 2776 2813 READ_FLAG( uiCode, "wpp_in_use_flag[ i ]" ); vps->setWppInUseFlag(i, (uiCode == 1)); … … 2804 2841 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 2805 2842 { 2806 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 2807 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 2808 { 2809 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[i][j]"); vps->setCtuBasedOffsetEnabledFlag(i, j, uiCode == 1 ); 2810 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 2843 #if VPS_FIX_TO_MATCH_SPEC 2844 if( vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j) ) 2845 { 2846 #endif 2847 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 2848 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 2811 2849 { 2812 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[i][j]"); vps->setMinHorizontalCtuOffsetPlus1( i,j, uiCode ); 2850 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag[i][j]"); vps->setCtuBasedOffsetEnabledFlag(i, j, uiCode == 1 ); 2851 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 2852 { 2853 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1[i][j]"); vps->setMinHorizontalCtuOffsetPlus1( i,j, uiCode ); 2854 } 2813 2855 } 2814 } 2856 #if VPS_FIX_TO_MATCH_SPEC 2857 } 2858 #endif 2815 2859 } 2816 2860 } … … 4812 4856 } 4813 4857 } 4814 for (Int h = 1; h < vps->getNumOutputLayerSets(); h++) 4815 { 4816 Int lsIdx = vps->getOutputLayerSetIdx( h ); 4817 READ_UVLC( uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode); 4818 for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ ) 4819 { 4820 READ_UVLC( uiCode, "num_partitions_in_scheme_minus1[h][j]" ); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode); 4821 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ ) 4822 { 4823 for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ ) 4824 { 4825 READ_FLAG( uiCode, "layer_included_in_partition_flag[h][j][k][r]" ); vps->setLayerIncludedInPartitionFlag(h, j, k, r, uiCode ? true : false); 4826 } 4827 } 4828 } 4829 for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ ) 4830 { 4831 for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ ) 4832 { 4833 READ_UVLC( uiCode, "num_bsp_schedules_minus1[h][i][t]"); vps->setNumBspSchedulesMinus1(h, i, t, uiCode); 4834 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ ) 4835 { 4836 for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 4858 #if VPS_FIX_TO_MATCH_SPEC 4859 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 ) 4860 { 4861 #endif 4862 for (Int h = 1; h < vps->getNumOutputLayerSets(); h++) 4863 { 4864 Int lsIdx = vps->getOutputLayerSetIdx(h); 4865 READ_UVLC(uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode); 4866 #if VPS_FIX_TO_MATCH_SPEC 4867 for (Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++) 4868 #else 4869 for (Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++) 4870 #endif 4871 { 4872 READ_UVLC(uiCode, "num_partitions_in_scheme_minus1[h][j]"); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode); 4873 for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++) 4874 { 4875 for (Int r = 0; r < vps->getNumLayersInIdList(lsIdx); r++) 4837 4876 { 4838 READ_UVLC( uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode); 4839 READ_UVLC( uiCode, "bsp_comb_sched_idx[h][i][t][j][k]"); vps->setBspSchedIdx(h, i, t, j, k, uiCode); 4877 READ_FLAG(uiCode, "layer_included_in_partition_flag[h][j][k][r]"); vps->setLayerIncludedInPartitionFlag(h, j, k, r, uiCode ? true : false); 4840 4878 } 4841 4879 } 4842 4880 } 4843 } 4844 4845 // To be done: Check each layer included in not more than one BSP in every partitioning scheme, 4846 // and other related checks associated with layers in bitstream partitions. 4847 4848 } 4881 for (Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++) 4882 { 4883 for (Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++) 4884 { 4885 READ_UVLC(uiCode, "num_bsp_schedules_minus1[h][i][t]"); vps->setNumBspSchedulesMinus1(h, i, t, uiCode); 4886 for (Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++) 4887 { 4888 #if VPS_FIX_TO_MATCH_SPEC 4889 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 4890 #else 4891 for (Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++) 4892 #endif 4893 { 4894 #if VPS_FIX_TO_MATCH_SPEC 4895 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1 ) 4896 { 4897 #endif 4898 #if VPS_FIX_TO_MATCH_SPEC 4899 Int numBits = 1; 4900 while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams())) 4901 { 4902 numBits++; 4903 } 4904 READ_CODE(numBits, uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode); 4905 #else 4906 READ_UVLC(uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode); 4907 #endif 4908 #if VPS_FIX_TO_MATCH_SPEC 4909 } 4910 #endif 4911 READ_UVLC(uiCode, "bsp_comb_sched_idx[h][i][t][j][k]"); vps->setBspSchedIdx(h, i, t, j, k, uiCode); 4912 } 4913 } 4914 } 4915 } 4916 4917 // To be done: Check each layer included in not more than one BSP in every partitioning scheme, 4918 // and other related checks associated with layers in bitstream partitions. 4919 4920 } 4921 #if VPS_FIX_TO_MATCH_SPEC 4922 } 4923 #endif 4849 4924 } 4850 4925 #endif
Note: See TracChangeset for help on using the changeset viewer.