Changeset 550 in SHVCSoftware for branches/SHM-5.0-dev/source/Lib/TLibEncoder
- Timestamp:
- 21 Jan 2014, 18:47:46 (11 years ago)
- Location:
- branches/SHM-5.0-dev/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-5.0-dev/source
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev/source merged: 542-546 /trunk/source merged: 547 reverse-merged: 352
- Property svn:mergeinfo changed
-
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r540 r550 669 669 UInt numBytesInVps = this->m_pcBitIf->getNumberOfWrittenBits(); 670 670 #endif 671 #if VPS_VUI_OFFSET 672 m_vpsVuiCounter = this->m_pcBitIf->getNumberOfWrittenBits(); 673 #endif 671 674 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 672 675 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); … … 795 798 796 799 WRITE_FLAG( vps->getAvcBaseLayerFlag(), "avc_base_layer_flag" ); 800 #if O0109_MOVE_VPS_VUI_FLAG 801 #if !VPS_VUI 802 WRITE_FLAG( 0, "vps_vui_present_flag" ); 803 vps->setVpsVuiPresentFlag(false); 804 #else 805 WRITE_FLAG( 1, "vps_vui_present_flag" ); 806 vps->setVpsVuiPresentFlag(true); 807 #endif 808 if ( vps->getVpsVuiPresentFlag() ) 809 { 810 #if VPS_VUI_OFFSET 811 WRITE_CODE( vps->getVpsVuiOffset( ), 16, "vps_vui_offset" ); 812 #endif 813 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 814 } 815 #else 816 #if VPS_VUI_OFFSET 817 WRITE_CODE( vps->getVpsVuiOffset( ), 16, "vps_vui_offset" ); 818 #endif 797 819 WRITE_FLAG( vps->getSplittingFlag(), "splitting_flag" ); 820 #endif // O0109_MOVE_VPS_VUI_FLAG 798 821 799 822 for(i = 0; i < MAX_VPS_NUM_SCALABILITY_TYPES; i++) … … 841 864 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 842 865 { 866 #if O0109_VIEW_ID_LEN 867 WRITE_CODE( vps->getViewIdLen( ), 4, "view_id_len" ); 868 assert ( vps->getNumViews() >= (1<<vps->getViewIdLen()) ); 869 #else 843 870 WRITE_CODE( vps->getViewIdLenMinus1( ), 4, "view_id_len_minus1" ); 844 } 845 871 #endif 872 } 873 874 #if O0109_VIEW_ID_LEN 875 if ( vps->getViewIdLen() > 0 ) 876 { 877 #endif 846 878 for( i = 0; i < vps->getNumViews(); i++ ) 847 879 { 880 #if O0109_VIEW_ID_LEN 881 WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLen( ), "view_id_val[i]" ); 882 #else 848 883 WRITE_CODE( vps->getViewIdVal( i ), vps->getViewIdLenMinus1( ) + 1, "view_id_val[i]" ); 849 } 850 #endif 884 #endif 885 } 886 #if O0109_VIEW_ID_LEN 887 } 888 #endif 889 #endif // VIEW_ID_RELATED_SIGNALING 890 851 891 #if VPS_EXTN_DIRECT_REF_LAYERS 852 892 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) … … 931 971 if( numOutputLayerSets > 1 ) 932 972 { 973 #if O0109_DEFAULT_ONE_OUT_LAYER_IDC 974 WRITE_CODE( vps->getDefaultOneTargetOutputLayerIdc(), 2, "default_one_target_output_layer_idc" ); 975 #else 933 976 WRITE_FLAG( vps->getDefaultOneTargetOutputLayerFlag(), "default_one_target_output_layer_flag" ); 977 #endif 934 978 } 935 979 … … 1072 1116 #endif 1073 1117 #endif 1118 1119 #if !O0109_O0199_FLAGS_TO_VUI 1074 1120 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1075 1121 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); … … 1078 1124 WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" ); 1079 1125 #endif 1080 1126 #endif 1127 1128 #if !O0109_MOVE_VPS_VUI_FLAG 1081 1129 #if !VPS_VUI 1082 1130 WRITE_FLAG( 0, "vps_vui_present_flag" ); … … 1089 1137 WRITE_FLAG(1, "vps_vui_alignment_bit_equal_to_one"); 1090 1138 } 1139 #if VPS_VUI_OFFSET 1140 Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH 1141 assert( vpsVuiOffsetValeInBits % 8 == 0 ); 1142 vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 ); 1143 #endif 1091 1144 codeVPSVUI(vps); 1092 1145 } 1093 1146 #endif 1147 #else 1148 if(vps->getVpsVuiPresentFlag()) // Should be conditioned on the value of vps_vui_present_flag 1149 { 1150 while ( m_pcBitIf->getNumberOfWrittenBits() % 8 != 0 ) 1151 { 1152 WRITE_FLAG(1, "vps_vui_alignment_bit_equal_to_one"); 1153 } 1154 #if VPS_VUI_OFFSET 1155 Int vpsVuiOffsetValeInBits = this->m_pcBitIf->getNumberOfWrittenBits() - m_vpsVuiCounter + 16; // 2 bytes for NUH 1156 assert( vpsVuiOffsetValeInBits % 8 == 0 ); 1157 vps->setVpsVuiOffset( vpsVuiOffsetValeInBits >> 3 ); 1158 #endif 1159 codeVPSVUI(vps); 1160 } 1161 #endif // 0109_MOVE_VPS_FLAG 1094 1162 } 1095 1163 #endif … … 1225 1293 } 1226 1294 } 1295 #endif 1296 1297 #if O0109_O0199_FLAGS_TO_VUI 1298 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1299 WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" ); 1300 #endif 1301 #if HIGHER_LAYER_IRAP_SKIP_FLAG 1302 WRITE_FLAG(vps->getHigherLayerIrapSkipFlag(), "higher_layer_irap_skip_flag" ); 1303 #endif 1227 1304 #endif 1228 1305 #if N0160_VUI_EXT_ILP_REF -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncCavlc.h
r540 r550 68 68 TComSlice* m_pcSlice; 69 69 UInt m_uiCoeffCost; 70 70 #if VPS_VUI_OFFSET 71 Int m_vpsVuiCounter; 72 #endif 71 73 Void codeShortTermRefPicSet ( TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Bool calledFromSliceHeader, Int idx ); 72 74 Bool findMatchingLTRP ( TComSlice* pcSlice, UInt *ltrpsIndex, Int ltrpPOC, Bool usedFlag ); -
branches/SHM-5.0-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r549 r550 1753 1753 OutputNALUnit nalu(NAL_UNIT_VPS); 1754 1754 #endif 1755 #if VPS_VUI_OFFSET 1756 // The following code also calculates the VPS VUI offset 1757 #endif 1755 1758 #if VPS_EXTN_OFFSET_CALC 1756 1759 OutputNALUnit tempNalu(NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
Note: See TracChangeset for help on using the changeset viewer.