Changeset 778 in SHVCSoftware for branches/SHM-6-dev/source/Lib/TLibEncoder
- Timestamp:
- 28 May 2014, 13:26:07 (11 years ago)
- Location:
- branches/SHM-6-dev/source/Lib/TLibEncoder
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r776 r778 130 130 break; 131 131 #endif 132 #if Q0078_ADD_LAYER_SETS 133 case SEI::OUTPUT_LAYER_SET_NESTING: 134 fprintf(g_hTrace, "=========== Output layer set nesting SEI message ===========\n"); 135 break; 136 case SEI::VPS_REWRITING: 137 fprintf(g_hTrace, "=========== VPS rewriting SEI message ===========\n"); 138 break; 139 #endif 132 140 #endif //SVC_EXTENSION 133 141 default: … … 227 235 case SEI::BSP_HRD: 228 236 xWriteSEIBspHrd(*static_cast<const SEIBspHrd*>(&sei), sps, nestingSei); 237 break; 238 #endif 239 #if Q0078_ADD_LAYER_SETS 240 case SEI::OUTPUT_LAYER_SET_NESTING: 241 xWriteSEIOutputLayerSetNesting(bs, *static_cast<const SEIOutputLayerSetNesting*>(&sei), vps, sps); 242 break; 243 case SEI::VPS_REWRITING: 244 xWriteSEIVPSRewriting(*static_cast<const SEIVPSRewriting*>(&sei)); 229 245 break; 230 246 #endif … … 1035 1051 #endif 1036 1052 1053 #if Q0078_ADD_LAYER_SETS 1054 1055 Void SEIWriter::xWriteSEIOutputLayerSetNesting(TComBitIf& bs, const SEIOutputLayerSetNesting &sei, TComVPS *vps, TComSPS *sps) 1056 { 1057 WRITE_FLAG(sei.m_olsFlag, "ols_flag"); 1058 WRITE_UVLC(sei.m_numOlsIndicesMinus1, "num_ols_indices_minus1"); 1059 1060 for (Int i = 0; i <= sei.m_numOlsIndicesMinus1; i++) 1061 { 1062 WRITE_UVLC(sei.m_olsIdx[i], "ols_idx[i]"); 1063 } 1064 1065 while (m_pcBitIf->getNumberOfWrittenBits() % 8 != 0) 1066 { 1067 WRITE_FLAG(0, "ols_nesting_zero_bit"); 1068 } 1069 1070 // write nested SEI messages 1071 for (SEIMessages::const_iterator it = sei.m_nestedSEIs.begin(); it != sei.m_nestedSEIs.end(); it++) 1072 { 1073 writeSEImessage(bs, *(*it), vps, sps); 1074 } 1075 } 1076 1077 Void SEIWriter::xWriteSEIVPSRewriting(const SEIVPSRewriting &sei) 1078 { 1079 //sei.nalu-> 1080 } 1081 1082 #endif 1083 1037 1084 #endif //SVC_EXTENSION 1038 1085 -
branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.h
r776 r778 101 101 Void xCodeHrdParameters( TComHRD *hrd, Bool commonInfPresentFlag, UInt maxNumSubLayersMinus1 ); 102 102 #endif 103 #if Q0078_ADD_LAYER_SETS 104 Void xWriteSEIOutputLayerSetNesting(TComBitIf& bs, const SEIOutputLayerSetNesting &sei, TComVPS *vps, TComSPS *sps); 105 Void xWriteSEIVPSRewriting(const SEIVPSRewriting &sei); 106 #endif 103 107 #endif //SVC_EXTENSION 104 108 }; -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r763 r778 1000 1000 #endif 1001 1001 1002 #if Q0078_ADD_LAYER_SETS 1003 if (vps->getNumIndependentLayers() > 1) 1004 { 1005 WRITE_UVLC( vps->getNumAddLayerSets(), "num_add_layer_sets" ); 1006 for (Int i = 0; i < vps->getNumAddLayerSets(); i++) 1007 { 1008 for (Int j = 1; j < vps->getNumIndependentLayers(); j++) 1009 { 1010 int len = 1; 1011 while ((1 << len) < (vps->getNumLayersInTreePartition(j) + 1)) 1012 { 1013 len++; 1014 } 1015 WRITE_CODE(vps->getHighestLayerIdxPlus1(i, j), len, "highest_layer_idx_plus1[i][j]"); 1016 } 1017 } 1018 } 1019 #endif 1020 1002 1021 #if !VPS_EXTN_UEV_CODING 1003 1022 Int numOutputLayerSets = vps->getNumOutputLayerSets() ; -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r776 r778 2170 2170 nalu = NALUnit(NAL_UNIT_SPS); 2171 2171 #endif 2172 #if Q0078_ADD_LAYER_SETS 2173 if (m_pcEncTop->getVPS()->getNumDirectRefLayers(m_layerId) == 0 && m_pcEncTop->getVPS()->getNumAddLayerSets() > 0) 2174 { 2175 nalu.m_layerId = 0; // For independent base layer rewriting 2176 } 2177 #endif 2172 2178 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 2173 2179 if (m_bSeqFirst) … … 2207 2213 #else 2208 2214 nalu = NALUnit(NAL_UNIT_PPS); 2215 #endif 2216 #if Q0078_ADD_LAYER_SETS 2217 if (m_pcEncTop->getVPS()->getNumDirectRefLayers(m_layerId) == 0 && m_pcEncTop->getVPS()->getNumAddLayerSets() > 0) 2218 { 2219 nalu.m_layerId = 0; // For independent base layer rewriting 2220 } 2209 2221 #endif 2210 2222 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.cpp
r762 r778 912 912 { 913 913 #if SVC_EXTENSION 914 #if Q0078_ADD_LAYER_SETS 915 if (getNumDirectRefLayers() == 0 && getNumAddLayerSets() > 0) 916 { 917 m_cSPS.setLayerId(0); // layer ID 0 for independent layers 918 } 919 else 920 { 921 m_cSPS.setLayerId(m_layerId); 922 } 923 #else 914 924 m_cSPS.setLayerId(m_layerId); 925 #endif 915 926 m_cSPS.setNumScaledRefLayerOffsets(m_numScaledRefLayerOffsets); 916 927 for(Int i = 0; i < m_cSPS.getNumScaledRefLayerOffsets(); i++) … … 1171 1182 #endif 1172 1183 1184 #if Q0078_ADD_LAYER_SETS 1185 if (getNumDirectRefLayers() == 0 && getNumAddLayerSets() > 0) 1186 { 1187 m_cPPS.setLayerId(0); // layer ID 0 for independent layers 1188 } 1189 #endif 1190 1173 1191 if( m_layerId > 0 ) 1174 1192 { -
branches/SHM-6-dev/source/Lib/TLibEncoder/TEncTop.h
r652 r778 154 154 Bool m_interLayerWeightedPredFlag; 155 155 #endif 156 #if Q0078_ADD_LAYER_SETS 157 int m_numAddLayerSets; 158 #endif 156 159 #endif //SVC_EXTENSION 157 160 protected: … … 268 271 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 269 272 #endif 273 #if Q0078_ADD_LAYER_SETS 274 Void setNumAddLayerSets(Int x) { m_numAddLayerSets = x; } 275 Int getNumAddLayerSets() { return m_numAddLayerSets; } 276 #endif 270 277 #else //SVC_EXTENSION 271 278 Void encode( Bool bEos, TComPicYuv* pcPicYuvOrg, TComList<TComPicYuv*>& rcListPicYuvRecOut,
Note: See TracChangeset for help on using the changeset viewer.