Changeset 1185 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
- Timestamp:
- 8 Jul 2015, 03:34:13 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1183 r1185 602 602 READ_CODE( 5, uiCode, "dpb_output_delay_length_minus1" ); hrd->setDpbOutputDelayLengthMinus1( uiCode ); 603 603 } 604 #if VPS_VUI_BSP_HRD_PARAMS604 #if SVC_EXTENSION 605 605 else 606 606 { … … 3529 3529 #if O0164_MULTI_LAYER_HRD 3530 3530 READ_FLAG(uiCode, "vps_vui_bsp_hrd_present_flag" ); vps->setVpsVuiBspHrdPresentFlag(uiCode); 3531 if (vps->getVpsVuiBspHrdPresentFlag()) 3532 {3533 #if VPS_VUI_BSP_HRD_PARAMS 3531 3532 if( vps->getVpsVuiBspHrdPresentFlag() ) 3533 { 3534 3534 parseVpsVuiBspHrdParams(vps); 3535 #else3536 #if R0227_VUI_BSP_HRD_FLAG3537 assert (vps->getTimingInfo()->getTimingInfoPresentFlag() == 1);3538 #endif3539 READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vps->setVpsNumBspHrdParametersMinus1(uiCode);3540 vps->createBspHrdParamBuffer(vps->getVpsNumBspHrdParametersMinus1() + 1);3541 for( i = 0; i <= vps->getVpsNumBspHrdParametersMinus1(); i++ )3542 {3543 if( i > 0 )3544 {3545 READ_FLAG( uiCode, "bsp_cprms_present_flag[i]" ); vps->setBspCprmsPresentFlag(i, uiCode);3546 }3547 parseHrdParameters(vps->getBspHrd(i), i==0 ? 1 : vps->getBspCprmsPresentFlag(i), vps->getMaxTLayers()-1);3548 }3549 for (UInt h = 1; h <= vps->getVpsNumLayerSetsMinus1(); h++)3550 {3551 READ_UVLC( uiCode, "num_bitstream_partitions[i]"); vps->setNumBitstreamPartitions(h, uiCode);3552 #if HRD_BPB3553 Int chkPart=0;3554 #endif3555 for( i = 0; i < vps->getNumBitstreamPartitions(h); i++ )3556 {3557 for( j = 0; j <= (vps->getMaxLayers()-1); j++ )3558 {3559 if( vps->getLayerIdIncludedFlag(h, j) )3560 {3561 READ_FLAG( uiCode, "layer_in_bsp_flag[h][i][j]" ); vps->setLayerInBspFlag(h, i, j, uiCode);3562 }3563 }3564 #if HRD_BPB3565 chkPart+=vps->getLayerInBspFlag(h, i, j);3566 #endif3567 }3568 #if HRD_BPB3569 assert(chkPart<=1);3570 #endif3571 #if HRD_BPB3572 if(vps->getNumBitstreamPartitions(h)==1)3573 {3574 Int chkPartition1=0; Int chkPartition2=0;3575 for( j = 0; j <= (vps->getMaxLayers()-1); j++ )3576 {3577 if( vps->getLayerIdIncludedFlag(h, j) )3578 {3579 chkPartition1+=vps->getLayerInBspFlag(h, 0, j);3580 chkPartition2++;3581 }3582 }3583 assert(chkPartition1!=chkPartition2);3584 }3585 #endif3586 if (vps->getNumBitstreamPartitions(h))3587 {3588 #if Q0182_MULTI_LAYER_HRD_UPDATE3589 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1[h]"); vps->setNumBspSchedCombinations(h, uiCode + 1);3590 #else3591 READ_UVLC( uiCode, "num_bsp_sched_combinations[h]"); vps->setNumBspSchedCombinations(h, uiCode);3592 #endif3593 for( i = 0; i < vps->getNumBspSchedCombinations(h); i++ )3594 {3595 for( j = 0; j < vps->getNumBitstreamPartitions(h); j++ )3596 {3597 READ_UVLC( uiCode, "bsp_comb_hrd_idx[h][i][j]"); vps->setBspCombHrdIdx(h, i, j, uiCode);3598 #if HRD_BPB3599 assert(uiCode <= vps->getVpsNumBspHrdParametersMinus1());3600 #endif3601 3602 READ_UVLC( uiCode, "bsp_comb_sched_idx[h][i][j]"); vps->setBspCombSchedIdx(h, i, j, uiCode);3603 #if HRD_BPB3604 assert(uiCode <= vps->getBspHrdParamBufferCpbCntMinus1(uiCode,vps->getMaxTLayers()-1));3605 #endif3606 }3607 }3608 }3609 }3610 #endif3611 3535 } 3612 3536 #endif … … 3635 3559 assert( uiCode == 0 ); 3636 3560 } 3637 #endif3638 3561 3639 3562 #if Q0048_CGS_3D_ASYMLUT … … 3846 3769 } 3847 3770 #endif 3848 #if VPS_VUI_BSP_HRD_PARAMS 3771 #endif 3772 3849 3773 Void TDecCavlc::parseVpsVuiBspHrdParams( TComVPS *vps ) 3850 3774 { … … 3868 3792 } 3869 3793 } 3794 3870 3795 READ_UVLC( uiCode, "num_sub_layer_hrd_minus1[i]" ); vps->setNumSubLayerHrdMinus1(j, uiCode ); 3871 3796 assert( uiCode <= vps->getMaxTLayers() - 1 ); 3872 3797 3873 3798 parseHrdParameters( vps->getBspHrd(j), vps->getCprmsAddPresentFlag(j), vps->getNumSubLayerHrdMinus1(j) ); 3799 3874 3800 if( i > 0 && !vps->getCprmsAddPresentFlag(i) ) 3875 3801 { … … 3885 3811 } 3886 3812 } 3813 3887 3814 if( vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams() > 0 ) 3888 3815 { … … 3891 3818 Int lsIdx = vps->getOutputLayerSetIdx(h); 3892 3819 READ_UVLC(uiCode, "num_signalled_partitioning_schemes[h]"); vps->setNumSignalledPartitioningSchemes(h, uiCode); 3820 3893 3821 for (Int j = 1; j < vps->getNumSignalledPartitioningSchemes(h) + 1; j++) 3894 3822 { 3895 3823 READ_UVLC(uiCode, "num_partitions_in_scheme_minus1[h][j]"); vps->setNumPartitionsInSchemeMinus1(h, j, uiCode); 3896 for (Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++) 3897 { 3898 for (Int r = 0; r < vps->getNumLayersInIdList(lsIdx); r++) 3824 3825 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, j); k++ ) 3826 { 3827 for( Int r = 0; r < vps->getNumLayersInIdList(lsIdx); r++ ) 3899 3828 { 3900 3829 READ_FLAG(uiCode, "layer_included_in_partition_flag[h][j][k][r]"); vps->setLayerIncludedInPartitionFlag(h, j, k, r, uiCode ? true : false); … … 3902 3831 } 3903 3832 } 3904 for (Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++) 3905 { 3906 for (Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++) 3833 3834 for( Int i = 0; i < vps->getNumSignalledPartitioningSchemes(h) + 1; i++ ) 3835 { 3836 for( Int t = 0; t <= vps->getMaxSLayersInLayerSetMinus1(lsIdx); t++ ) 3907 3837 { 3908 3838 READ_UVLC(uiCode, "num_bsp_schedules_minus1[h][i][t]"); vps->setNumBspSchedulesMinus1(h, i, t, uiCode); 3909 for (Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++) 3839 3840 for( Int j = 0; j <= vps->getNumBspSchedulesMinus1(h, i, t); j++) 3910 3841 { 3911 3842 for( Int k = 0; k <= vps->getNumPartitionsInSchemeMinus1(h, i); k++ ) … … 3914 3845 { 3915 3846 Int numBits = 1; 3916 while ((1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams())) 3847 3848 while( (1 << numBits) < (vps->getNumHrdParameters() + vps->getVpsNumAddHrdParams()) ) 3917 3849 { 3918 3850 numBits++; 3919 3851 } 3852 3920 3853 READ_CODE(numBits, uiCode, "bsp_comb_hrd_idx[h][i][t][j][k]"); vps->setBspHrdIdx(h, i, t, j, k, uiCode); 3921 3854 } 3855 3922 3856 READ_UVLC(uiCode, "bsp_comb_sched_idx[h][i][t][j][k]"); vps->setBspSchedIdx(h, i, t, j, k, uiCode); 3923 3857 } … … 3932 3866 } 3933 3867 } 3934 #endif 3935 #endif 3868 #endif //SVC_EXTENSION 3936 3869 //! \} 3937 3870
Note: See TracChangeset for help on using the changeset viewer.