Changeset 912 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder
- Timestamp:
- 31 Oct 2014, 18:18:38 (10 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r910 r912 620 620 string cfg_kneeSEIInputKneePointValue; 621 621 string cfg_kneeSEIOutputKneePointValue; 622 #endif 623 #if Q0096_OVERLAY_SEI 624 const Int CFG_MAX_OVERLAYS = 3; 625 UInt cfg_overlaySEIIdx[CFG_MAX_OVERLAYS]; 626 Bool cfg_overlaySEILanguagePresentFlag[CFG_MAX_OVERLAYS]; 627 UInt cfg_overlaySEIContentLayerId[CFG_MAX_OVERLAYS]; 628 Bool cfg_overlaySEILabelPresentFlag[CFG_MAX_OVERLAYS]; 629 UInt cfg_overlaySEILabelLayerId[CFG_MAX_OVERLAYS]; 630 Bool cfg_overlaySEIAlphaPresentFlag[CFG_MAX_OVERLAYS]; 631 UInt cfg_overlaySEIAlphaLayerId[CFG_MAX_OVERLAYS]; 632 UInt cfg_overlaySEINumElementsMinus1[CFG_MAX_OVERLAYS]; 633 string cfg_overlaySEIElementLabelRanges[CFG_MAX_OVERLAYS]; 634 string cfg_overlaySEILanguage[CFG_MAX_OVERLAYS]; 635 string cfg_overlaySEIName[CFG_MAX_OVERLAYS]; 636 string cfg_overlaySEIElementNames[CFG_MAX_OVERLAYS]; 622 637 #endif 623 638 … … 1118 1133 ("SEIKneeFunctionOutputKneePointValue", cfg_kneeSEIOutputKneePointValue, string("100 250 450"), "Array of output knee point") 1119 1134 #endif 1135 #if Q0096_OVERLAY_SEI 1136 ("SEIOverlayInfo", m_overlaySEIEnabled, false, "Control generation of Selectable Overlays SEI messages") 1137 ("SEIOverlayCancelFlag", m_overlayInfoCancelFlag, true, "Indicates that Selectable Overlay SEI message cancels the persistance or follows (default: 1)") 1138 ("SEIOverlayContentAuxIdMinus128", m_overlayContentAuxIdMinus128, UInt(0), "Indicates the AuxId value of auxiliary pictures containing overlay content - 128") 1139 ("SEIOverlayLabelAuxIdMinus128", m_overlayLabelAuxIdMinus128, UInt(1), "Indicates the AuxId value of auxiliary pictures containing label content - 128") 1140 ("SEIOverlayAlphaAuxIdMinus128", m_overlayAlphaAuxIdMinus128, UInt(2), "Indicates the AuxId value of auxiliary pictures containing alpha content - 128") 1141 ("SEIOverlayElementLabelValueLengthMinus8", m_overlayElementLabelValueLengthMinus8, UInt(0), "Indicates the number of bits used for coding min and max label values - 8") 1142 ("SEIOverlayNumOverlaysMinus1", m_numOverlaysMinus1, UInt(0), "Specifies the number of overlays described by this SEI message - 1") 1143 ("SEIOverlayIdx0", cfg_overlaySEIIdx[0], UInt(0), "Indicates the index of overlay 0") 1144 ("SEIOverlayIdx1", cfg_overlaySEIIdx[1], UInt(1), "Indicates the index of overlay 1") 1145 ("SEIOverlayIdx2", cfg_overlaySEIIdx[2], UInt(2), "Indicates the index of overlay 2") 1146 ("SEIOverlayLanguagePresentFlag0", cfg_overlaySEILanguagePresentFlag[0], false, "Indicates if the language for overlay 0 is specified") 1147 ("SEIOverlayLanguagePresentFlag1", cfg_overlaySEILanguagePresentFlag[1], false, "Indicates if the language for overlay 1 is specified") 1148 ("SEIOverlayLanguagePresentFlag2", cfg_overlaySEILanguagePresentFlag[2], false, "Indicates if the language for overlay 2 is specified") 1149 ("SEIOverlayContentLayerId0", cfg_overlaySEIContentLayerId[0], UInt(0), "Indicates the nuh_layer_id value of the overlay content of overlay 0") 1150 ("SEIOverlayContentLayerId1", cfg_overlaySEIContentLayerId[1], UInt(0), "Indicates the nuh_layer_id value of the overlay content of overlay 1") 1151 ("SEIOverlayContentLayerId2", cfg_overlaySEIContentLayerId[2], UInt(0), "Indicates the nuh_layer_id value of the overlay content of overlay 2") 1152 ("SEIOverlayLabelPresentFlag0", cfg_overlaySEILabelPresentFlag[0], false, "Specifies if label content 0 is present") 1153 ("SEIOverlayLabelPresentFlag1", cfg_overlaySEILabelPresentFlag[1], false, "Specifies if label content 1 is present") 1154 ("SEIOverlayLabelPresentFlag2", cfg_overlaySEILabelPresentFlag[2], false, "Specifies if label content 2 is present") 1155 ("SEIOverlayLabelLayerId0", cfg_overlaySEILabelLayerId[0], UInt(0), "Specifies the nuh_layer_id value of the label content of overlay 0") 1156 ("SEIOverlayLabelLayerId1", cfg_overlaySEILabelLayerId[1], UInt(0), "Specifies the nuh_layer_id value of the label content of overlay 1") 1157 ("SEIOverlayLabelLayerId2", cfg_overlaySEILabelLayerId[2], UInt(0), "Specifies the nuh_layer_id value of the label content of overlay 2") 1158 ("SEIOverlayAlphaPresentFlag0", cfg_overlaySEIAlphaPresentFlag[0], false, "Specifies if alpha content 0 is present") 1159 ("SEIOverlayAlphaPresentFlag1", cfg_overlaySEIAlphaPresentFlag[1], false, "Specifies if alpha content 1 is present") 1160 ("SEIOverlayAlphaPresentFlag2", cfg_overlaySEIAlphaPresentFlag[2], false, "Specifies if alpha content 2 is present") 1161 ("SEIOverlayAlphaLayerId0", cfg_overlaySEIAlphaLayerId[0], UInt(0), "Specifies the nuh_layer_id value of the alpha content of overlay 0") 1162 ("SEIOverlayAlphaLayerId1", cfg_overlaySEIAlphaLayerId[1], UInt(0), "Specifies the nuh_layer_id value of the alpha content of overlay 1") 1163 ("SEIOverlayAlphaLayerId2", cfg_overlaySEIAlphaLayerId[2], UInt(0), "Specifies the nuh_layer_id value of the alpha content of overlay 2") 1164 ("SEIOverlayNumElementsMinus1_0", cfg_overlaySEINumElementsMinus1[0], UInt(0), "Specifies the number of overlay elements in overlay 0") 1165 ("SEIOverlayNumElementsMinus1_1", cfg_overlaySEINumElementsMinus1[1], UInt(0), "Specifies the number of overlay elements in overlay 1") 1166 ("SEIOverlayNumElementsMinus1_2", cfg_overlaySEINumElementsMinus1[2], UInt(0), "Specifies the number of overlay elements in overlay 2") 1167 ("SEIOverlayElementLabelRange0", cfg_overlaySEIElementLabelRanges[0], string(""), "Array of minimum and maximum values in order min0, max0, min1, max1, etc.\n""" 1168 "indicating the range of sample values corresponding to overlay elements of overlay 0") 1169 ("SEIOverlayElementLabelRange1", cfg_overlaySEIElementLabelRanges[1], string(""), "Array of minimum and maximum values in order min0, max0, min1, max1, etc.\n""" 1170 "indicating the range of sample values corresponding to overlay elements of overlay 1") 1171 ("SEIOverlayElementLabelRange2", cfg_overlaySEIElementLabelRanges[2], string(""), "Array of minimum and maximum values in order min0, max0, min1, max1, etc.\n""" 1172 "indicating the range of sample values corresponding to overlay elements of overlay 2") 1173 ("SEIOverlayLanguage0", cfg_overlaySEILanguage[0], string(""), "Indicates the language of overlay 0 by a language tag according to RFC 5646") 1174 ("SEIOverlayLanguage1", cfg_overlaySEILanguage[1], string(""), "Indicates the language of overlay 1 by a language tag according to RFC 5646") 1175 ("SEIOverlayLanguage2", cfg_overlaySEILanguage[2], string(""), "Indicates the language of overlay 2 by a language tag according to RFC 5646") 1176 ("SEIOverlayName0", cfg_overlaySEIName[0], string("Overlay0"), "Indicates the name of overlay 0") 1177 ("SEIOverlayName1", cfg_overlaySEIName[1], string("Overlay1"), "Indicates the name of overlay 1") 1178 ("SEIOverlayName2", cfg_overlaySEIName[2], string("Overlay2"), "Indicates the name of overlay 2") 1179 ("SEIOverlayElementNames0", cfg_overlaySEIElementNames[0], string(""), "Indicates the names of all overlay elements of overlay 0 in the format name1|name2|name3|...") 1180 ("SEIOverlayElementNames1", cfg_overlaySEIElementNames[1], string(""), "Indicates the names of all overlay elements of overlay 1 in the format name1|name2|name3|...") 1181 ("SEIOverlayElementNames2", cfg_overlaySEIElementNames[2], string(""), "Indicates the names of all overlay elements of overlay 2 in the format name1|name2|name3|...") 1182 ("SEIOverlayPersistenceFlag", m_overlayInfoPersistenceFlag, true, "Indicates if the SEI message applies to the current picture only (0) or also to following pictures (1)") 1183 #endif 1120 1184 #if Q0189_TMVP_CONSTRAINTS 1121 1185 ("SEITemporalMotionVectorPredictionConstraints", m_TMVPConstraintsSEIEnabled, 0, "Control generation of TMVP constrants SEI message") … … 2097 2161 pcOutputKneePointValue = NULL; 2098 2162 } 2163 } 2164 #endif 2165 #if Q0096_OVERLAY_SEI 2166 if( m_overlaySEIEnabled && !m_overlayInfoCancelFlag ) 2167 { 2168 m_overlayIdx.resize ( m_numOverlaysMinus1+1 ); 2169 m_overlayLanguagePresentFlag.resize ( m_numOverlaysMinus1+1 ); 2170 m_overlayContentLayerId.resize ( m_numOverlaysMinus1+1 ); 2171 m_overlayLabelPresentFlag.resize ( m_numOverlaysMinus1+1 ); 2172 m_overlayLabelLayerId.resize ( m_numOverlaysMinus1+1 ); 2173 m_overlayAlphaPresentFlag.resize ( m_numOverlaysMinus1+1 ); 2174 m_overlayAlphaLayerId.resize ( m_numOverlaysMinus1+1 ); 2175 m_numOverlayElementsMinus1.resize ( m_numOverlaysMinus1+1 ); 2176 m_overlayElementLabelMin.resize ( m_numOverlaysMinus1+1 ); 2177 m_overlayElementLabelMax.resize ( m_numOverlaysMinus1+1 ); 2178 m_overlayLanguage.resize ( m_numOverlaysMinus1+1 ); 2179 m_overlayName.resize ( m_numOverlaysMinus1+1 ); 2180 m_overlayElementName.resize ( m_numOverlaysMinus1+1 ); 2181 for (Int i=0 ; i<=m_numOverlaysMinus1 ; i++) 2182 { 2183 m_overlayIdx[i] = cfg_overlaySEIIdx[i]; 2184 m_overlayLanguagePresentFlag[i] = cfg_overlaySEILanguagePresentFlag[i]; 2185 m_overlayContentLayerId[i] = cfg_overlaySEIContentLayerId[i]; 2186 m_overlayLabelPresentFlag[i] = cfg_overlaySEILabelPresentFlag[i]; 2187 m_overlayLabelLayerId[i] = cfg_overlaySEILabelLayerId[i]; 2188 m_overlayAlphaPresentFlag[i] = cfg_overlaySEIAlphaPresentFlag[i]; 2189 m_overlayAlphaLayerId[i] = cfg_overlaySEIAlphaLayerId[i]; 2190 m_numOverlayElementsMinus1[i] = cfg_overlaySEINumElementsMinus1[i]; 2191 m_overlayLanguage[i] = cfg_overlaySEILanguage[i]; 2192 m_overlayName[i] = cfg_overlaySEIName[i]; 2193 2194 //parse min and max values of label elements 2195 istringstream ranges(cfg_overlaySEIElementLabelRanges[i]); 2196 string range; 2197 UInt val; 2198 vector<UInt> vRanges; 2199 while ( getline(ranges, range, ' ') ) 2200 { 2201 istringstream(range) >> val; 2202 vRanges.push_back(val); 2203 } 2204 assert( vRanges.size()%2==0 ); 2205 assert( vRanges.size()==2*(m_numOverlayElementsMinus1[i]+1) ); 2206 m_overlayElementLabelMin[i].resize( m_numOverlayElementsMinus1[i]+1 ); 2207 m_overlayElementLabelMax[i].resize( m_numOverlayElementsMinus1[i]+1 ); 2208 for (Int j=0 ; j<=m_numOverlayElementsMinus1[i] ; j++) 2209 { 2210 m_overlayElementLabelMin[i][j] = vRanges[2*j]; 2211 m_overlayElementLabelMax[i][j] = vRanges[2*j+1]; 2212 } 2213 2214 //parse overlay element names 2215 istringstream elementNames(cfg_overlaySEIElementNames[i]); 2216 string elementName; 2217 vector<string> vElementName; 2218 while ( getline(elementNames, elementName, '|') ) 2219 { 2220 vElementName.push_back(elementName); 2221 } 2222 if ( m_overlayLabelPresentFlag[i] ) 2223 { 2224 m_overlayElementName[i].resize( m_numOverlayElementsMinus1[i]+1 ); 2225 for (Int j=0 ; j<=m_numOverlayElementsMinus1[i] ; j++) 2226 { 2227 if (j < vElementName.size()) 2228 { 2229 m_overlayElementName[i][j] = vElementName[j]; 2230 } 2231 else 2232 { 2233 m_overlayElementName[i][j] = string("NoElementName"); 2234 } 2235 } 2236 } 2237 } 2099 2238 } 2100 2239 #endif … … 3357 3496 } 3358 3497 #endif 3498 #if Q0096_OVERLAY_SEI 3499 if( m_overlaySEIEnabled && !m_overlayInfoCancelFlag ) 3500 { 3501 xConfirmPara( m_overlayContentAuxIdMinus128 < 0 || m_overlayContentAuxIdMinus128 > 31, "SEIOverlayContentAuxIdMinus128 must be in the range of 0 to 31"); 3502 xConfirmPara( m_overlayLabelAuxIdMinus128 < 0 || m_overlayLabelAuxIdMinus128 > 31, "SEIOverlayLabelAuxIdMinus128 must be in the range of 0 to 31"); 3503 xConfirmPara( m_overlayAlphaAuxIdMinus128 < 0 || m_overlayAlphaAuxIdMinus128 > 31, "SEIOverlayAlphaAuxIdMinus128 must be in the range of 0 to 31"); 3504 xConfirmPara( m_numOverlaysMinus1 < 0 || m_numOverlaysMinus1 > 15, "SEIOverlayNumOverlaysMinus1 must be in the range of 0 to 15"); 3505 for (Int i=0 ; i<=m_numOverlaysMinus1 ; i++ ) 3506 { 3507 xConfirmPara( m_overlayIdx[i] < 0 || m_overlayIdx[i] > 255, "SEIOverlayIdx must be in the range of 0 to 255"); 3508 xConfirmPara( m_numOverlayElementsMinus1[i] < 0 || m_numOverlayElementsMinus1[i] > 255, "SEIOverlayNumElementsMinus1 must be in the range of 0 to 255"); 3509 } 3510 } 3511 #endif 3359 3512 #if Q0074_COLOUR_REMAPPING_SEI 3360 3513 #if !SVC_EXTENSION -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r877 r912 451 451 Int* m_kneeSEIOutputKneePoint; 452 452 #endif 453 #if Q0096_OVERLAY_SEI 454 Bool m_overlaySEIEnabled; 455 Bool m_overlayInfoCancelFlag; 456 UInt m_overlayContentAuxIdMinus128; 457 UInt m_overlayLabelAuxIdMinus128; 458 UInt m_overlayAlphaAuxIdMinus128; 459 UInt m_overlayElementLabelValueLengthMinus8; 460 UInt m_numOverlaysMinus1; 461 std::vector<UInt> m_overlayIdx; 462 std::vector<Bool> m_overlayLanguagePresentFlag; 463 std::vector<UInt> m_overlayContentLayerId; 464 std::vector<Bool> m_overlayLabelPresentFlag; 465 std::vector<UInt> m_overlayLabelLayerId; 466 std::vector<Bool> m_overlayAlphaPresentFlag; 467 std::vector<UInt> m_overlayAlphaLayerId; 468 std::vector<UInt> m_numOverlayElementsMinus1; 469 std::vector< std::vector<UInt> > m_overlayElementLabelMin; 470 std::vector< std::vector<UInt> > m_overlayElementLabelMax; 471 std::vector<string> m_overlayLanguage; 472 std::vector<string> m_overlayName; 473 std::vector< std::vector<string> > m_overlayElementName; 474 Bool m_overlayInfoPersistenceFlag; 475 #endif 453 476 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG 454 477 Bool m_crossLayerAlignedIdrOnlyFlag; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r910 r912 549 549 m_acTEncTop[layer].setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 550 550 m_acTEncTop[layer].setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 551 #endif 552 #if Q0096_OVERLAY_SEI 553 m_acTEncTop[layer].setOverlaySEIEnabled ( m_overlaySEIEnabled ); 554 m_acTEncTop[layer].setOverlaySEICancelFlag ( m_overlayInfoCancelFlag ); 555 m_acTEncTop[layer].setOverlaySEIContentAuxIdMinus128 ( m_overlayContentAuxIdMinus128 ); 556 m_acTEncTop[layer].setOverlaySEILabelAuxIdMinus128 ( m_overlayLabelAuxIdMinus128 ); 557 m_acTEncTop[layer].setOverlaySEIAlphaAuxIdMinus128 ( m_overlayAlphaAuxIdMinus128 ); 558 m_acTEncTop[layer].setOverlaySEIElementLabelValueLengthMinus8 ( m_overlayElementLabelValueLengthMinus8 ); 559 m_acTEncTop[layer].setOverlaySEINumOverlaysMinus1 ( m_numOverlaysMinus1 ); 560 m_acTEncTop[layer].setOverlaySEIIdx ( m_overlayIdx ); 561 m_acTEncTop[layer].setOverlaySEILanguagePresentFlag ( m_overlayLanguagePresentFlag ); 562 m_acTEncTop[layer].setOverlaySEIContentLayerId ( m_overlayContentLayerId ); 563 m_acTEncTop[layer].setOverlaySEILabelPresentFlag ( m_overlayLabelPresentFlag ); 564 m_acTEncTop[layer].setOverlaySEILabelLayerId ( m_overlayLabelLayerId ); 565 m_acTEncTop[layer].setOverlaySEIAlphaPresentFlag ( m_overlayAlphaPresentFlag ); 566 m_acTEncTop[layer].setOverlaySEIAlphaLayerId ( m_overlayAlphaLayerId ); 567 m_acTEncTop[layer].setOverlaySEINumElementsMinus1 ( m_numOverlayElementsMinus1 ); 568 m_acTEncTop[layer].setOverlaySEIElementLabelMin ( m_overlayElementLabelMin ); 569 m_acTEncTop[layer].setOverlaySEIElementLabelMax ( m_overlayElementLabelMax ); 570 m_acTEncTop[layer].setOverlaySEILanguage ( m_overlayLanguage ); 571 m_acTEncTop[layer].setOverlaySEIName ( m_overlayName ); 572 m_acTEncTop[layer].setOverlaySEIElementName ( m_overlayElementName ); 573 m_acTEncTop[layer].setOverlaySEIPersistenceFlag ( m_overlayInfoPersistenceFlag ); 551 574 #endif 552 575 #if Q0074_COLOUR_REMAPPING_SEI
Note: See TracChangeset for help on using the changeset viewer.