Changeset 1104 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 6 Jul 2015, 20:36:06 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified 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.