Changeset 133 in SHVCSoftware for branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
- Timestamp:
- 28 Apr 2013, 08:49:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
r125 r133 1 1 /* The copyright in this software is being made available under the BSD 2 * License, included below. This software may be subject to other third party3 * and contributor rights, including patent rights, and no such rights are4 * granted under this license.5 *6 * Copyright (c) 2010-2013, ITU/ISO/IEC7 * All rights reserved.8 *9 * Redistribution and use in source and binary forms, with or without10 * modification, are permitted provided that the following conditions are met:11 *12 * * Redistributions of source code must retain the above copyright notice,13 * this list of conditions and the following disclaimer.14 * * Redistributions in binary form must reproduce the above copyright notice,15 * this list of conditions and the following disclaimer in the documentation16 * and/or other materials provided with the distribution.17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may18 * be used to endorse or promote products derived from this software without19 * specific prior written permission.20 *21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF31 * THE POSSIBILITY OF SUCH DAMAGE.32 */2 * License, included below. This software may be subject to other third party 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 5 * 6 * Copyright (c) 2010-2013, ITU/ISO/IEC 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions are met: 11 * 12 * * Redistributions of source code must retain the above copyright notice, 13 * this list of conditions and the following disclaimer. 14 * * Redistributions in binary form must reproduce the above copyright notice, 15 * this list of conditions and the following disclaimer in the documentation 16 * and/or other materials provided with the distribution. 17 * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may 18 * be used to endorse or promote products derived from this software without 19 * specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 33 34 34 /** \file TAppEncTop.cpp 35 \brief Encoder application class35 \brief Encoder application class 36 36 */ 37 37 … … 167 167 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 168 168 m_acTEncTop[layer].setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 169 #if L0386_DB_METRIC 170 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 171 #endif 169 172 170 173 //====== Motion search ======== … … 200 203 m_acTEncTop[layer].setUseHADME ( m_bUseHADME ); 201 204 m_acTEncTop[layer].setUseLossless ( m_useLossless ); 202 m_acTEncTop[layer].setUseLComb ( m_bUseLComb ); 205 #if !L0034_COMBINED_LIST_CLEANUP 206 m_cTEncTop.setUseLComb ( m_bUseLComb ); 207 #endif 203 208 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() ); 204 209 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ ); … … 270 275 m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 271 276 m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 277 #if J0149_TONE_MAPPING_SEI 278 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 279 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); 280 m_acTEncTop[layer].setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 281 m_acTEncTop[layer].setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 282 m_acTEncTop[layer].setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 283 m_acTEncTop[layer].setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 284 m_acTEncTop[layer].setTMISEIModelID ( m_toneMapModelId ); 285 m_acTEncTop[layer].setTMISEIMinValue ( m_toneMapMinValue ); 286 m_acTEncTop[layer].setTMISEIMaxValue ( m_toneMapMaxValue ); 287 m_acTEncTop[layer].setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 288 m_acTEncTop[layer].setTMISEISigmoidWidth ( m_sigmoidWidth ); 289 m_acTEncTop[layer].setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 290 m_acTEncTop[layer].setTMISEINumPivots ( m_numPivots ); 291 m_acTEncTop[layer].setTMISEICodedPivotValue ( m_codedPivotValue ); 292 m_acTEncTop[layer].setTMISEITargetPivotValue ( m_targetPivotValue ); 293 m_acTEncTop[layer].setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 294 m_acTEncTop[layer].setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 295 m_acTEncTop[layer].setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 296 m_acTEncTop[layer].setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 297 m_acTEncTop[layer].setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 298 m_acTEncTop[layer].setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 299 m_acTEncTop[layer].setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 300 m_acTEncTop[layer].setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 301 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 302 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 303 #endif 272 304 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 273 305 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 279 311 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 280 312 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 313 #if L0208_SOP_DESCRIPTION_SEI 314 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 315 #endif 316 #if K0180_SCALABLE_NESTING_SEI 317 m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 318 #endif 281 319 m_acTEncTop[layer].setUniformSpacingIdr ( m_iUniformSpacingIdr ); 282 320 m_acTEncTop[layer].setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 442 480 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 443 481 m_cTEncTop.setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent); 482 #if L0386_DB_METRIC 483 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 484 #endif 444 485 445 486 //====== Motion search ======== … … 475 516 m_cTEncTop.setUseHADME ( m_bUseHADME ); 476 517 m_cTEncTop.setUseLossless ( m_useLossless ); 518 #if !L0034_COMBINED_LIST_CLEANUP 477 519 m_cTEncTop.setUseLComb ( m_bUseLComb ); 520 #endif 478 521 m_cTEncTop.setdQPs ( m_aidQP ); 479 522 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); … … 545 588 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 546 589 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 590 #if J0149_TONE_MAPPING_SEI 591 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 592 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); 593 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 594 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 595 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 596 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 597 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId ); 598 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue ); 599 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue ); 600 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 601 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth ); 602 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 603 m_cTEncTop.setTMISEINumPivots ( m_numPivots ); 604 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue ); 605 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 606 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 607 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 608 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 609 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 610 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 611 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 612 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 613 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 614 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 615 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 616 #endif 547 617 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 548 618 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType ); … … 554 624 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 555 625 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 626 #if L0208_SOP_DESCRIPTION_SEI 627 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 628 #endif 629 #if K0180_SCALABLE_NESTING_SEI 630 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 631 #endif 556 632 m_cTEncTop.setUniformSpacingIdr ( m_iUniformSpacingIdr ); 557 633 m_cTEncTop.setNumColumnsMinus1 ( m_iNumColumnsMinus1 ); … … 812 888 813 889 /** 814 - create internal class815 - initialize internal variable816 - until the end of input YUV file, call encoding function in TEncTop class817 - delete allocated buffers818 - destroy internal class819 .820 */890 - create internal class 891 - initialize internal variable 892 - until the end of input YUV file, call encoding function in TEncTop class 893 - delete allocated buffers 894 - destroy internal class 895 . 896 */ 821 897 #if SVC_EXTENSION 822 898 Void TAppEncTop::encode() … … 1102 1178 1103 1179 /** 1104 - application has picture buffer list with size of GOP1105 - picture buffer list acts as ring buffer1106 - end of the list has the latest picture1107 .1108 */1180 - application has picture buffer list with size of GOP 1181 - picture buffer list acts as ring buffer 1182 - end of the list has the latest picture 1183 . 1184 */ 1109 1185 #if SVC_EXTENSION 1110 1186 Void TAppEncTop::xGetBuffer( TComPicYuv*& rpcPicYuvRec, UInt layer) … … 1222 1298 1223 1299 /** \param iNumEncoded number of encoded frames 1224 */1300 */ 1225 1301 Void TAppEncTop::xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits) 1226 1302 { … … 1251 1327 1252 1328 /** 1253 *1254 */1329 * 1330 */ 1255 1331 void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes) 1256 1332 { … … 1264 1340 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1265 1341 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1266 case NAL_UNIT_CODED_SLICE_TLA :1342 case NAL_UNIT_CODED_SLICE_TLA_R: 1267 1343 case NAL_UNIT_CODED_SLICE_TSA_N: 1268 1344 case NAL_UNIT_CODED_SLICE_STSA_R: 1269 1345 case NAL_UNIT_CODED_SLICE_STSA_N: 1270 case NAL_UNIT_CODED_SLICE_BLA :1271 case NAL_UNIT_CODED_SLICE_BLA NT:1346 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 1347 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 1272 1348 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 1273 case NAL_UNIT_CODED_SLICE_IDR :1349 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 1274 1350 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 1275 1351 case NAL_UNIT_CODED_SLICE_CRA: 1276 1352 case NAL_UNIT_CODED_SLICE_RADL_N: 1277 case NAL_UNIT_CODED_SLICE_ DLP:1353 case NAL_UNIT_CODED_SLICE_RADL_R: 1278 1354 case NAL_UNIT_CODED_SLICE_RASL_N: 1279 case NAL_UNIT_CODED_SLICE_ TFD:1355 case NAL_UNIT_CODED_SLICE_RASL_R: 1280 1356 case NAL_UNIT_VPS: 1281 1357 case NAL_UNIT_SPS:
Note: See TracChangeset for help on using the changeset viewer.