Changeset 981 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibEncoder
- Timestamp:
- 13 Jan 2015, 23:17:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/Lib/TLibEncoder/TEncCavlc.cpp
r972 r981 2370 2370 { 2371 2371 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx(i); 2372 #if VPS_FIX_TO_MATCH_SPEC 2373 if( vps->getNumLayerSets() > 2 && i >= vps->getNumLayerSets() ) 2374 #else 2372 2375 if( i > (vps->getNumLayerSets() - 1) ) 2376 #endif 2373 2377 { 2374 2378 Int numBits = 1; … … 2399 2403 for(j = 0; j < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet) ; j++) 2400 2404 { 2405 #if VPS_FIX_TO_MATCH_SPEC 2406 if( vps->getNecessaryLayerFlag(i, j) && (vps->getNumProfileTierLevel() - 1) > 0 ) 2407 #else 2401 2408 if( vps->getNecessaryLayerFlag(i, j) ) 2409 #endif 2402 2410 { 2403 2411 WRITE_CODE( vps->getProfileLevelTierIdx(i, j), numBitsForPtlIdx, "profile_level_tier_idx[i]" ); … … 2468 2476 if( vps->getRepFormatIdxPresentFlag() ) 2469 2477 { 2478 #if VPS_FIX_TO_MATCH_SPEC 2479 for( i = vps->getBaseLayerInternalFlag() ? 1 : 0; i < vps->getMaxLayers(); i++ ) 2480 #else 2470 2481 for(i = 1; i < vps->getMaxLayers(); i++) 2482 #endif 2471 2483 { 2472 2484 Int numBits = 1; … … 2560 2572 else 2561 2573 { 2574 #if VPS_FIX_TO_MATCH_SPEC 2575 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 2576 #else 2562 2577 for(i = 1; i < vps->getMaxLayers(); i++) 2563 { 2578 #endif 2579 { 2580 #if VPS_FIX_TO_MATCH_SPEC 2581 for( j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 2582 #else 2564 2583 for(j = 0; j < i; j++) 2584 #endif 2565 2585 { 2566 2586 if (vps->getDirectDependencyFlag(i, j)) … … 2775 2795 { 2776 2796 #if DPB_INTERNAL_BL_SIG 2797 #if VPS_FIX_TO_MATCH_SPEC 2798 if( vps->getNecessaryLayerFlag(i, k) && (vps->getBaseLayerInternalFlag() || (vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0)) ) 2799 #else 2777 2800 if(vps->getBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, k) != 0 ) ) 2801 #endif 2778 2802 #endif 2779 2803 WRITE_UVLC( vps->getMaxVpsDecPicBufferingMinus1( i, k, j), "max_vps_dec_pic_buffering_minus1[i][k][j]" ); … … 2905 2929 if (!vps->getTilesNotInUseFlag()) 2906 2930 { 2931 #if VPS_FIX_TO_MATCH_SPEC 2932 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 2933 #else 2907 2934 for(i = 0; i < vps->getMaxLayers(); i++) 2935 #endif 2908 2936 { 2909 2937 WRITE_FLAG( vps->getTilesInUseFlag(i) ? 1 : 0 , "tiles_in_use_flag[ i ]" ); … … 2915 2943 #endif 2916 2944 2945 #if VPS_FIX_TO_MATCH_SPEC 2946 for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ ) 2947 #else 2917 2948 for(i = 1; i < vps->getMaxLayers(); i++) 2949 #endif 2918 2950 { 2919 2951 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) … … 2936 2968 if (!vps->getWppNotInUseFlag()) 2937 2969 { 2970 #if VPS_FIX_TO_MATCH_SPEC 2971 for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ ) 2972 #else 2938 2973 for(i = 0; i < vps->getMaxLayers(); i++) 2974 #endif 2939 2975 { 2940 2976 WRITE_FLAG( vps->getWppInUseFlag(i) ? 1 : 0 , "wpp_in_use_flag[ i ]" ); … … 2967 3003 { 2968 3004 for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++) 2969 { 2970 WRITE_UVLC(vps->getMinSpatialSegmentOffsetPlus1( i, j), "min_spatial_segment_offset_plus1[i][j]"); 2971 2972 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 2973 { 2974 WRITE_FLAG( vps->getCtuBasedOffsetEnabledFlag( i, j) ? 1 : 0 , "ctu_based_offset_enabled_flag[i][j]" ); 2975 2976 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 2977 { 2978 WRITE_UVLC(vps->getMinHorizontalCtuOffsetPlus1( i, j), "min_horizontal_ctu_offset_plus1[i][j]"); 3005 { 3006 #if VPS_FIX_TO_MATCH_SPEC 3007 if (vps->getBaseLayerInternalFlag() || vps->getRefLayerId(vps->getLayerIdInNuh(i), j)) 3008 { 3009 #endif 3010 WRITE_UVLC(vps->getMinSpatialSegmentOffsetPlus1( i, j), "min_spatial_segment_offset_plus1[i][j]"); 3011 3012 if( vps->getMinSpatialSegmentOffsetPlus1(i,j ) > 0 ) 3013 { 3014 WRITE_FLAG( vps->getCtuBasedOffsetEnabledFlag( i, j) ? 1 : 0 , "ctu_based_offset_enabled_flag[i][j]" ); 3015 3016 if(vps->getCtuBasedOffsetEnabledFlag(i,j)) 3017 { 3018 WRITE_UVLC(vps->getMinHorizontalCtuOffsetPlus1( i, j), "min_horizontal_ctu_offset_plus1[i][j]"); 3019 } 2979 3020 } 2980 } 3021 #if VPS_FIX_TO_MATCH_SPEC 3022 } 3023 #endif 2981 3024 } 2982 3025 } … … 3351 3394 codeHrdParameters(vps->getBspHrd(j), i == 0 ? true : vps->getCprmsAddPresentFlag(j), vps->getNumSubLayerHrdMinus1(j)); 3352 3395 } 3396 3397 #if VPS_FIX_TO_MATCH_SPEC 3398 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 ) 3399 { 3400 #endif 3353 3401 for( Int h = 1; h < vps->getNumOutputLayerSets(); h++ ) 3354 3402 { 3355 3403 Int lsIdx = vps->getOutputLayerSetIdx( h ); 3356 3404 WRITE_UVLC( vps->getNumSignalledPartitioningSchemes(h), "num_signalled_partitioning_schemes[h]"); 3405 3406 #if VPS_FIX_TO_MATCH_SPEC 3407 for( Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++ ) 3408 #else 3357 3409 for( Int j = 0; j < vps->getNumSignalledPartitioningSchemes(h); j++ ) 3410 #endif 3358 3411 { 3359 3412 WRITE_UVLC( vps->getNumPartitionsInSchemeMinus1(h, j), "num_partitions_in_scheme_minus1[h][j]" ); … … 3366 3419 } 3367 3420 } 3421 3368 3422 for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ ) 3369 3423 { … … 3371 3425 { 3372 3426 WRITE_UVLC(vps->getNumBspSchedulesMinus1(h, i, t), "num_bsp_schedules_minus1[h][i][t]"); 3427 3373 3428 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++ ) 3374 3429 { 3430 #if VPS_FIX_TO_MATCH_SPEC 3431 for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++) 3432 #else 3375 3433 for( Int k = 0; k < vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) 3434 #endif 3376 3435 { 3436 #if VPS_FIX_TO_MATCH_SPEC 3437 if (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 1) 3438 { 3439 Int numBits = 1; 3440 while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams())) 3441 { 3442 numBits++; 3443 } 3444 WRITE_CODE(vps->getBspHrdIdx(h, i, t, j, k), numBits, "bsp_comb_hrd_idx[h][i][t][j][k]"); 3445 } 3446 #else 3377 3447 WRITE_UVLC( vps->getBspHrdIdx(h, i, t, j, k), "bsp_comb_hrd_idx[h][i][t][j][k]"); 3448 #endif 3378 3449 WRITE_UVLC( vps->getBspSchedIdx(h, i, t, j, k), "bsp_comb_sched_idx[h][i][t][j][k]"); 3379 3450 } … … 3382 3453 } 3383 3454 } 3455 #if VPS_FIX_TO_MATCH_SPEC 3456 } 3457 #endif 3384 3458 } 3385 3459 #endif
Note: See TracChangeset for help on using the changeset viewer.