Changeset 1104 in SHVCSoftware
- Timestamp:
- 6 Jul 2015, 20:36:06 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1103 r1104 255 255 #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 256 256 257 #define VPS_FIX_TO_MATCH_SPEC 1258 259 257 /// scalability types 260 258 enum ScalabilityType -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1102 r1104 3041 3041 for(i = 1; i < numOutputLayerSets; i++) 3042 3042 { 3043 #if VPS_FIX_TO_MATCH_SPEC3044 3043 if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() ) 3045 #else3046 if( i > (vps->getNumLayerSets() - 1) )3047 #endif3048 3044 { 3049 3045 Int numBits = 1; … … 3060 3056 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 3061 3057 #if Q0078_ADD_LAYER_SETS 3062 #if VPS_FIX_TO_MATCH_SPEC3063 3058 if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() == 2 ) 3064 3059 #else 3065 if( i > vps->getVpsNumLayerSetsMinus1() || vps->getDefaultTargetOutputLayerIdc() >= 2 )3066 #endif3067 #else3068 #if VPS_FIX_TO_MATCH_SPEC3069 3060 if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() == 2 ) 3070 #else3071 if( i > (vps->getNumLayerSets() - 1) || vps->getDefaultTargetOutputLayerIdc() >= 2 )3072 #endif3073 3061 #endif 3074 3062 { … … 3113 3101 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 3114 3102 { 3115 #if VPS_FIX_TO_MATCH_SPEC3116 3103 if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel()-1) > 0 ) 3117 #else3118 if( vps->getNecessaryLayerFlag(i, j) )3119 #endif3120 3104 { 3121 3105 READ_CODE( numBitsForPtlIdx, uiCode, "profile_tier_level_idx[i]" ); … … 3317 3301 if( vps->getRepFormatIdxPresentFlag() ) 3318 3302 { 3319 #if VPS_FIX_TO_MATCH_SPEC3320 3303 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 3321 #else3322 for (i = 1; i < vps->getMaxLayers(); i++)3323 #endif3324 3304 { 3325 3305 Int numBits = 1; … … 3452 3432 #endif 3453 3433 3454 #if VPS_FIX_TO_MATCH_SPEC3455 3434 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 3456 #else 3457 for(i = 1; i < vps->getMaxLayers(); i++) 3458 #endif 3459 { 3460 #if VPS_FIX_TO_MATCH_SPEC 3435 { 3461 3436 for( j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 3462 #else3463 for(j = 0; j < i; j++)3464 #endif3465 3437 { 3466 3438 if (vps->getDirectDependencyFlag(i, j)) … … 3820 3792 uiCode=0; 3821 3793 3822 #if VPS_FIX_TO_MATCH_SPEC3823 3794 if( vps->getNecessaryLayerFlag(i, k) && ( vps->getBaseLayerInternalFlag() || vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) ) ) 3824 #else3825 if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0 ) )3826 #endif3827 3795 #endif 3828 3796 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1[i][k][j]" ); vps->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); … … 4070 4038 if (!uiCode) 4071 4039 { 4072 #if VPS_FIX_TO_MATCH_SPEC4073 4040 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 4074 #else4075 for (i = 0; i < vps->getMaxLayers(); i++)4076 #endif4077 4041 { 4078 4042 READ_FLAG( uiCode, "tiles_in_use_flag[ i ]" ); vps->setTilesInUseFlag(i, (uiCode == 1)); … … 4088 4052 #endif 4089 4053 4090 #if VPS_FIX_TO_MATCH_SPEC4091 4054 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 4092 #else4093 for (i = 1; i < vps->getMaxLayers(); i++)4094 #endif4095 4055 { 4096 4056 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) … … 4113 4073 if (!uiCode) 4114 4074 { 4115 #if VPS_FIX_TO_MATCH_SPEC4116 4075 for (i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++) 4117 #else4118 for (i = 0; i < vps->getMaxLayers(); i++)4119 #endif4120 4076 { 4121 4077 READ_FLAG( uiCode, "wpp_in_use_flag[ i ]" ); vps->setWppInUseFlag(i, (uiCode == 1)); … … 4146 4102 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 4147 4103 { 4148 #if VPS_FIX_TO_MATCH_SPEC4149 4104 if( vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j) ) 4150 4105 { 4151 #endif4152 4106 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1[i][j]" ); vps->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 4153 4107 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) … … 4159 4113 } 4160 4114 } 4161 #if VPS_FIX_TO_MATCH_SPEC 4162 } 4163 #endif 4115 } 4164 4116 } 4165 4117 } … … 4575 4527 } 4576 4528 } 4577 #if VPS_FIX_TO_MATCH_SPEC4578 4529 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 ) 4579 4530 { 4580 #endif4581 4531 for (Int h = 1; h < vps->getNumOutputLayerSets(); h++) 4582 4532 { 4583 4533 Int lsIdx = vps->getOutputLayerSetIdx(h); 4584 4534 READ_UVLC(uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode); 4585 #if VPS_FIX_TO_MATCH_SPEC4586 4535 for (Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++) 4587 #else4588 for (Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++)4589 #endif4590 4536 { 4591 4537 READ_UVLC(uiCode, "num_partitions_in_scheme_minus1[h][j]"); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode); … … 4605 4551 for (Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++) 4606 4552 { 4607 #if VPS_FIX_TO_MATCH_SPEC4608 4553 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 4609 #else4610 for (Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++)4611 #endif4612 4554 { 4613 #if VPS_FIX_TO_MATCH_SPEC4614 4555 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1 ) 4615 4556 { … … 4621 4562 READ_CODE(numBits, uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode); 4622 4563 } 4623 #else4624 READ_UVLC(uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode);4625 #endif4626 4564 READ_UVLC(uiCode, "bsp_comb_sched_idx[h][i][t][j][k]"); vps->setBspSchedIdx(h, i, t, j, k, uiCode); 4627 4565 } … … 4634 4572 4635 4573 } 4636 #if VPS_FIX_TO_MATCH_SPEC 4637 } 4638 #endif 4574 } 4639 4575 } 4640 4576 #endif -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1101 r1104 2248 2248 { 2249 2249 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 2250 #if VPS_FIX_TO_MATCH_SPEC2251 2250 if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() ) 2252 #else2253 if( i > (vps->getNumLayerSets() - 1) )2254 #endif2255 2251 { 2256 2252 Int numBits = 1; … … 2281 2277 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 2282 2278 { 2283 #if VPS_FIX_TO_MATCH_SPEC2284 2279 if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel() - 1) > 0 ) 2285 #else2286 if( vps->getNecessaryLayerFlag(i, j) )2287 #endif2288 2280 { 2289 2281 WRITE_CODE( vps->getProfileLevelTierIdx(i, j), numBitsForPtlIdx, "profile_level_tier_idx[i]" ); … … 2354 2346 if( vps->getRepFormatIdxPresentFlag() ) 2355 2347 { 2356 #if VPS_FIX_TO_MATCH_SPEC2357 2348 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 2358 #else2359 for(i = 1; i < vps->getMaxLayers(); i++)2360 #endif2361 2349 { 2362 2350 Int numBits = 1; … … 2447 2435 else 2448 2436 { 2449 #if VPS_FIX_TO_MATCH_SPEC2450 2437 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 2451 #else 2452 for(i = 1; i < vps->getMaxLayers(); i++) 2453 #endif 2454 { 2455 #if VPS_FIX_TO_MATCH_SPEC 2438 { 2456 2439 for( j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 2457 #else2458 for(j = 0; j < i; j++)2459 #endif2460 2440 { 2461 2441 if (vps->getDirectDependencyFlag(i, j)) … … 2666 2646 { 2667 2647 #if DPB_INTERNAL_BL_SIG 2668 #if VPS_FIX_TO_MATCH_SPEC2669 2648 if( vps->getNecessaryLayerFlag(i, k) && (vps->getBaseLayerInternalFlag() || (vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0)) ) 2670 #else2671 if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0 ) )2672 #endif2673 2649 #endif 2674 2650 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); … … 2797 2773 if (!vps->getTilesNotInUseFlag()) 2798 2774 { 2799 #if VPS_FIX_TO_MATCH_SPEC2800 2775 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 2801 #else2802 for(i = 0; i < vps->getMaxLayers(); i++)2803 #endif2804 2776 { 2805 2777 WRITE_FLAG( vps->getTilesInUseFlag(i) ? 1 : 0 , "tiles_in_use_flag[ i ]" ); … … 2811 2783 #endif 2812 2784 2813 #if VPS_FIX_TO_MATCH_SPEC2814 2785 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 2815 #else2816 for(i = 1; i < vps->getMaxLayers(); i++)2817 #endif2818 2786 { 2819 2787 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) … … 2836 2804 if (!vps->getWppNotInUseFlag()) 2837 2805 { 2838 #if VPS_FIX_TO_MATCH_SPEC2839 2806 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 2840 #else2841 for(i = 0; i < vps->getMaxLayers(); i++)2842 #endif2843 2807 { 2844 2808 WRITE_FLAG( vps->getWppInUseFlag(i) ? 1 : 0 , "wpp_in_use_flag[ i ]" ); … … 2869 2833 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 2870 2834 { 2871 #if VPS_FIX_TO_MATCH_SPEC2872 2835 if (vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j)) 2873 2836 { 2874 #endif2875 2837 WRITE_UVLC(vps->getMinSpatialSegmentOffsetPlus1( i, j), "min_spatial_segment_offset_plus1[i][j]"); 2876 2838 … … 2884 2846 } 2885 2847 } 2886 #if VPS_FIX_TO_MATCH_SPEC 2887 } 2888 #endif 2848 } 2889 2849 } 2890 2850 } … … 3231 3191 } 3232 3192 3233 #if VPS_FIX_TO_MATCH_SPEC3234 3193 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 ) 3235 3194 { 3236 #endif 3237 for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ ) 3238 { 3239 Int lsIdx = vps->getOutputLayerSetIdx( h ); 3240 WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]"); 3241 3242 #if VPS_FIX_TO_MATCH_SPEC 3243 for( Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++ ) 3244 #else 3245 for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ ) 3246 #endif 3247 { 3248 WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" ); 3249 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ ) 3250 { 3251 for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ ) 3252 { 3253 WRITE_FLAG( vps->getLayerIncludedInPartitionFlag(h, j, k, r), "layer_included_in_partition_flag[h][j][k][r]" ); 3254 } 3255 } 3256 } 3257 3258 for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ ) 3259 { 3260 for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ ) 3261 { 3262 WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]"); 3263 3264 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ ) 3265 { 3266 #if VPS_FIX_TO_MATCH_SPEC 3267 for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++) 3268 #else 3269 for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 3270 #endif 3195 for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ ) 3196 { 3197 Int lsIdx = vps->getOutputLayerSetIdx( h ); 3198 WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]"); 3199 3200 for( Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++ ) 3201 { 3202 WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" ); 3203 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ ) 3204 { 3205 for( Int r = 0; r < vps->getNumLayersInIdList( lsIdx ); r++ ) 3271 3206 { 3272 #if VPS_FIX_TO_MATCH_SPEC 3273 if (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1) 3207 WRITE_FLAG( vps->getLayerIncludedInPartitionFlag(h, j, k, r), "layer_included_in_partition_flag[h][j][k][r]" ); 3208 } 3209 } 3210 } 3211 3212 for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ ) 3213 { 3214 for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ ) 3215 { 3216 WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]"); 3217 3218 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ ) 3219 { 3220 for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++) 3274 3221 { 3275 Int numBits = 1; 3276 while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams())) 3222 if (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1) 3277 3223 { 3278 numBits++; 3224 Int numBits = 1; 3225 while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams())) 3226 { 3227 numBits++; 3228 } 3229 WRITE_CODE(vps->getBspHrdIdx(h, i, t, j, k), numBits, "bsp_comb_hrd_idx[h][i][t][j][k]"); 3279 3230 } 3280 WRITE_ CODE(vps->getBspHrdIdx(h, i, t, j, k), numBits, "bsp_comb_hrd_idx[h][i][t][j][k]");3231 WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]"); 3281 3232 } 3282 #else3283 WRITE_UVLC( vps->getBspHrdIdx(h, i, t, j, k), "bsp_comb_hrd_idx[h][i][t][j][k]");3284 #endif3285 WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]");3286 3233 } 3287 3234 } … … 3289 3236 } 3290 3237 } 3291 #if VPS_FIX_TO_MATCH_SPEC3292 }3293 #endif3294 3238 } 3295 3239 #endif
Note: See TracChangeset for help on using the changeset viewer.