Changeset 1029 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder
- Timestamp:
- 26 Feb 2015, 00:21:54 (10 years ago)
- Location:
- branches/SHM-dev
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev
- Property svn:mergeinfo changed
-
branches/SHM-dev/source
- Property svn:mergeinfo changed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1005 r1029 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 40 40 #include <cstring> 41 41 #include <string> 42 #include <limits> 42 43 #include "TLibCommon/TComRom.h" 43 44 #include "TAppEncCfg.h" 44 45 static istream& operator>>(istream &, Level::Name &);46 static istream& operator>>(istream &, Level::Tier &);47 static istream& operator>>(istream &, Profile::Name &);48 49 45 #include "TAppCommon/program_options_lite.h" 50 46 #include "TLibEncoder/TEncRateCtrl.h" … … 53 49 #endif 54 50 51 #define MACRO_TO_STRING_HELPER(val) #val 52 #define MACRO_TO_STRING(val) MACRO_TO_STRING_HELPER(val) 53 55 54 using namespace std; 56 55 namespace po = df::program_options_lite; 56 57 58 59 enum ExtendedProfileName // this is used for determining profile strings, where multiple profiles map to a single profile idc with various constraint flag combinations 60 { 61 NONE = 0, 62 MAIN = 1, 63 MAIN10 = 2, 64 MAINSTILLPICTURE = 3, 65 MAINREXT = 4, 66 HIGHTHROUGHPUTREXT = 5, // Placeholder profile for development 67 #if MULTIPLE_PTL_SUPPORT 68 MULTIVIEWMAIN = 6, 69 SCALABLEMAIN = 7, 70 SCALABLEMAIN10 = 8, 71 #endif 72 // The following are RExt profiles, which would map to the MAINREXT profile idc. 73 // The enumeration indicates the bit-depth constraint in the bottom 2 digits 74 // the chroma format in the next digit 75 // the intra constraint in the top digit 76 MONOCHROME_8 = 1008, 77 MONOCHROME_12 = 1012, 78 MONOCHROME_16 = 1016, 79 MAIN_12 = 1112, 80 MAIN_422_10 = 1210, 81 MAIN_422_12 = 1212, 82 MAIN_444 = 1308, 83 MAIN_444_10 = 1310, 84 MAIN_444_12 = 1312, 85 MAIN_444_16 = 1316, // non-standard profile definition, used for development purposes 86 MAIN_INTRA = 2108, 87 MAIN_10_INTRA = 2110, 88 MAIN_12_INTRA = 2112, 89 MAIN_422_10_INTRA = 2210, 90 MAIN_422_12_INTRA = 2212, 91 MAIN_444_INTRA = 2308, 92 MAIN_444_10_INTRA = 2310, 93 MAIN_444_12_INTRA = 2312, 94 MAIN_444_16_INTRA = 2316, 95 96 }; 97 57 98 58 99 //! \ingroup TAppEncoder … … 78 119 , m_numOutputLayerSets (-1) 79 120 #endif 121 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 122 , m_snrInternalColourSpace(false) 123 , m_outputInternalColourSpace(false) 80 124 , m_scalingListFile() 81 125 , m_elRapSliceBEnabled(0) … … 92 136 , m_pchBitstreamFile() 93 137 , m_pchReconFile() 138 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 139 , m_snrInternalColourSpace(false) 140 , m_outputInternalColourSpace(false) 94 141 , m_pchdQPFile() 95 142 , m_scalingListFile() … … 139 186 m_targetPivotValue = NULL; 140 187 } 188 141 189 free(m_pchInputFile); 142 190 free(m_pchBitstreamFile); … … 242 290 } 243 291 244 #if AUXILIARY_PICTURES 292 Bool confirmPara(Bool bflag, const Char* message); 293 245 294 static inline ChromaFormat numberToChromaFormat(const Int val) 246 295 { … … 254 303 } 255 304 } 256 #endif257 305 258 306 #if SVC_EXTENSION … … 282 330 #endif 283 331 284 static const struct MapStrToProfile { 332 static const struct MapStrToProfile 333 { 285 334 const Char* str; 286 335 Profile::Name value; 287 } strToProfile[] = { 288 {"none", Profile::NONE}, 289 {"main", Profile::MAIN}, 290 {"main10", Profile::MAIN10}, 291 {"main-still-picture", Profile::MAINSTILLPICTURE}, 336 } 337 strToProfile[] = 338 { 339 {"none", Profile::NONE }, 340 {"main", Profile::MAIN }, 341 {"main10", Profile::MAIN10 }, 342 {"main-still-picture", Profile::MAINSTILLPICTURE }, 343 {"main-RExt", Profile::MAINREXT }, 344 {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT }, 292 345 #if MULTIPLE_PTL_SUPPORT 293 {"range-extension", Profile::RANGEEXTENSION}, //This is not used in this software 294 {"range-extension-high", Profile::RANGEEXTENSIONHIGH}, //This is not used in this software 295 {"multiview-main", Profile::MULTIVIEWMAIN}, //This is not used in this software 296 {"scalable-main", Profile::SCALABLEMAIN}, 297 {"scalable-main10", Profile::SCALABLEMAIN10}, 346 {"multiview-main", Profile::MULTIVIEWMAIN }, //This is not used in this software 347 {"scalable-main", Profile::SCALABLEMAIN }, 348 {"scalable-main10", Profile::SCALABLEMAIN10 }, 298 349 #endif 299 350 }; 300 351 301 static const struct MapStrToTier { 352 static const struct MapStrToExtendedProfile 353 { 354 const Char* str; 355 ExtendedProfileName value; 356 } 357 strToExtendedProfile[] = 358 { 359 {"none", NONE }, 360 {"main", MAIN }, 361 {"main10", MAIN10 }, 362 {"main-still-picture", MAINSTILLPICTURE }, 363 {"main-RExt", MAINREXT }, 364 {"high-throughput-RExt", HIGHTHROUGHPUTREXT }, 365 {"monochrome", MONOCHROME_8 }, 366 {"monochrome12", MONOCHROME_12 }, 367 {"monochrome16", MONOCHROME_16 }, 368 {"main12", MAIN_12 }, 369 {"main_422_10", MAIN_422_10 }, 370 {"main_422_12", MAIN_422_12 }, 371 {"main_444", MAIN_444 }, 372 {"main_444_10", MAIN_444_10 }, 373 {"main_444_12", MAIN_444_12 }, 374 {"main_444_16", MAIN_444_16 }, 375 {"main_intra", MAIN_INTRA }, 376 {"main_10_intra", MAIN_10_INTRA }, 377 {"main_12_intra", MAIN_12_INTRA }, 378 {"main_422_10_intra", MAIN_422_10_INTRA}, 379 {"main_422_12_intra", MAIN_422_12_INTRA}, 380 {"main_444_intra", MAIN_444_INTRA }, 381 {"main_444_10_intra", MAIN_444_10_INTRA}, 382 {"main_444_12_intra", MAIN_444_12_INTRA}, 383 {"main_444_16_intra", MAIN_444_16_INTRA}, 384 #if MULTIPLE_PTL_SUPPORT 385 {"multiview-main", MULTIVIEWMAIN }, 386 {"scalable-main", SCALABLEMAIN }, 387 {"scalable-main10", SCALABLEMAIN10 }, 388 #endif 389 }; 390 391 static const ExtendedProfileName validRExtProfileNames[2/* intraConstraintFlag*/][4/* bit depth constraint 8=0, 10=1, 12=2, 16=3*/][4/*chroma format*/]= 392 { 393 { 394 { MONOCHROME_8, NONE, NONE, MAIN_444 }, // 8-bit inter for 400, 420, 422 and 444 395 { NONE, NONE, MAIN_422_10, MAIN_444_10 }, // 10-bit inter for 400, 420, 422 and 444 396 { MONOCHROME_12, MAIN_12, MAIN_422_12, MAIN_444_12 }, // 12-bit inter for 400, 420, 422 and 444 397 { MONOCHROME_16, NONE, NONE, MAIN_444_16 } // 16-bit inter for 400, 420, 422 and 444 (the latter is non standard used for development) 398 }, 399 { 400 { NONE, MAIN_INTRA, NONE, MAIN_444_INTRA }, // 8-bit intra for 400, 420, 422 and 444 401 { NONE, MAIN_10_INTRA, MAIN_422_10_INTRA, MAIN_444_10_INTRA }, // 10-bit intra for 400, 420, 422 and 444 402 { NONE, MAIN_12_INTRA, MAIN_422_12_INTRA, MAIN_444_12_INTRA }, // 12-bit intra for 400, 420, 422 and 444 403 { NONE, NONE, NONE, MAIN_444_16_INTRA } // 16-bit intra for 400, 420, 422 and 444 404 } 405 }; 406 407 static const struct MapStrToTier 408 { 302 409 const Char* str; 303 410 Level::Tier value; 304 } strToTier[] = { 411 } 412 strToTier[] = 413 { 305 414 {"main", Level::MAIN}, 306 415 {"high", Level::HIGH}, 307 416 }; 308 417 309 static const struct MapStrToLevel { 418 static const struct MapStrToLevel 419 { 310 420 const Char* str; 311 421 Level::Name value; 312 } strToLevel[] = { 422 } 423 strToLevel[] = 424 { 313 425 {"none",Level::NONE}, 314 426 {"1", Level::LEVEL1}, … … 325 437 {"6.1", Level::LEVEL6_1}, 326 438 {"6.2", Level::LEVEL6_2}, 439 {"8.5", Level::LEVEL8_5}, 327 440 }; 328 441 442 static const struct MapStrToCostMode 443 { 444 const Char* str; 445 CostMode value; 446 } 447 strToCostMode[] = 448 { 449 {"lossy", COST_STANDARD_LOSSY}, 450 {"sequence_level_lossless", COST_SEQUENCE_LEVEL_LOSSLESS}, 451 {"lossless", COST_LOSSLESS_CODING}, 452 {"mixed_lossless_lossy", COST_MIXED_LOSSLESS_LOSSY_CODING} 453 }; 454 455 static const struct MapStrToScalingListMode 456 { 457 const Char* str; 458 ScalingListMode value; 459 } 460 strToScalingListMode[] = 461 { 462 {"0", SCALING_LIST_OFF}, 463 {"1", SCALING_LIST_DEFAULT}, 464 {"2", SCALING_LIST_FILE_READ}, 465 {"off", SCALING_LIST_OFF}, 466 {"default", SCALING_LIST_DEFAULT}, 467 {"file", SCALING_LIST_FILE_READ} 468 }; 469 329 470 template<typename T, typename P> 330 static istream& readStrToEnum(P map[], unsigned long mapLen, istream &in, T &val) 471 static std::string enumToString(P map[], UInt mapLen, const T val) 472 { 473 for (UInt i = 0; i < mapLen; i++) 474 { 475 if (val == map[i].value) 476 { 477 return map[i].str; 478 } 479 } 480 return std::string(); 481 } 482 483 template<typename T, typename P> 484 static istream& readStrToEnum(P map[], UInt mapLen, istream &in, T &val) 331 485 { 332 486 string str; 333 487 in >> str; 334 488 335 for ( Int i = 0; i < mapLen; i++)489 for (UInt i = 0; i < mapLen; i++) 336 490 { 337 491 if (str == map[i].str) … … 347 501 } 348 502 349 static istream& operator>>(istream &in, Profile::Name &profile) 503 //inline to prevent compiler warnings for "unused static function" 504 505 static inline istream& operator >> (istream &in, ExtendedProfileName &profile) 350 506 { 351 return readStrToEnum(strTo Profile, sizeof(strToProfile)/sizeof(*strToProfile), in, profile);507 return readStrToEnum(strToExtendedProfile, sizeof(strToExtendedProfile)/sizeof(*strToExtendedProfile), in, profile); 352 508 } 353 509 354 static istream& operator>>(istream &in, Level::Tier &tier) 510 namespace Level 355 511 { 356 return readStrToEnum(strToTier, sizeof(strToTier)/sizeof(*strToTier), in, tier); 512 static inline istream& operator >> (istream &in, Tier &tier) 513 { 514 return readStrToEnum(strToTier, sizeof(strToTier)/sizeof(*strToTier), in, tier); 515 } 516 517 static inline istream& operator >> (istream &in, Name &level) 518 { 519 return readStrToEnum(strToLevel, sizeof(strToLevel)/sizeof(*strToLevel), in, level); 520 } 357 521 } 358 522 359 static i stream& operator>>(istream &in, Level::Name &level)523 static inline istream& operator >> (istream &in, CostMode &mode) 360 524 { 361 return readStrToEnum(strTo Level, sizeof(strToLevel)/sizeof(*strToLevel), in, level);525 return readStrToEnum(strToCostMode, sizeof(strToCostMode)/sizeof(*strToCostMode), in, mode); 362 526 } 363 527 528 static inline istream& operator >> (istream &in, ScalingListMode &mode) 529 { 530 return readStrToEnum(strToScalingListMode, sizeof(strToScalingListMode)/sizeof(*strToScalingListMode), in, mode); 531 } 532 533 #if MULTIPLE_PTL_SUPPORT 534 namespace Profile 535 { 536 static inline istream& operator >> (istream &in, Name &profile) 537 { 538 return readStrToEnum(strToProfile, sizeof(strToProfile)/sizeof(*strToProfile), in, profile); 539 } 540 } 541 #endif 542 543 template <class T> 544 struct SMultiValueInput 545 { 546 const T minValIncl; 547 const T maxValIncl; // Use 0 for unlimited 548 const std::size_t minNumValuesIncl; 549 const std::size_t maxNumValuesIncl; // Use 0 for unlimited 550 std::vector<T> values; 551 SMultiValueInput() : minValIncl(0), maxValIncl(0), minNumValuesIncl(0), maxNumValuesIncl(0), values() { } 552 SMultiValueInput(std::vector<T> &defaults) : minValIncl(0), maxValIncl(0), minNumValuesIncl(0), maxNumValuesIncl(0), values(defaults) { } 553 SMultiValueInput(const T &minValue, const T &maxValue, std::size_t minNumberValues=0, std::size_t maxNumberValues=0) 554 : minValIncl(minValue), maxValIncl(maxValue), minNumValuesIncl(minNumberValues), maxNumValuesIncl(maxNumberValues), values() { } 555 SMultiValueInput(const T &minValue, const T &maxValue, std::size_t minNumberValues, std::size_t maxNumberValues, const T* defValues, const UInt numDefValues) 556 : minValIncl(minValue), maxValIncl(maxValue), minNumValuesIncl(minNumberValues), maxNumValuesIncl(maxNumberValues), values(defValues, defValues+numDefValues) { } 557 SMultiValueInput<T> &operator=(const std::vector<T> &userValues) { values=userValues; return *this; } 558 SMultiValueInput<T> &operator=(const SMultiValueInput<T> &userValues) { values=userValues.values; return *this; } 559 }; 560 561 static inline istream& operator >> (istream &in, SMultiValueInput<UInt> &values) 562 { 563 values.values.clear(); 564 string str; 565 in >> str; 566 if (!str.empty()) 567 { 568 const Char *pStr=str.c_str(); 569 // soak up any whitespace 570 for(;isspace(*pStr);pStr++); 571 572 while (*pStr != 0) 573 { 574 Char *eptr; 575 UInt val=strtoul(pStr, &eptr, 0); 576 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 577 { 578 in.setstate(ios::failbit); 579 break; 580 } 581 if (val<values.minValIncl || val>values.maxValIncl) 582 { 583 in.setstate(ios::failbit); 584 break; 585 } 586 587 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 588 { 589 in.setstate(ios::failbit); 590 break; 591 } 592 values.values.push_back(val); 593 // soak up any whitespace and up to 1 comma. 594 pStr=eptr; 595 for(;isspace(*pStr);pStr++); 596 if (*pStr == ',') pStr++; 597 for(;isspace(*pStr);pStr++); 598 } 599 } 600 if (values.values.size() < values.minNumValuesIncl) 601 { 602 in.setstate(ios::failbit); 603 } 604 return in; 605 } 606 607 static inline istream& operator >> (istream &in, SMultiValueInput<Int> &values) 608 { 609 values.values.clear(); 610 string str; 611 in >> str; 612 if (!str.empty()) 613 { 614 const Char *pStr=str.c_str(); 615 // soak up any whitespace 616 for(;isspace(*pStr);pStr++); 617 618 while (*pStr != 0) 619 { 620 Char *eptr; 621 Int val=strtol(pStr, &eptr, 0); 622 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 623 { 624 in.setstate(ios::failbit); 625 break; 626 } 627 if (val<values.minValIncl || val>values.maxValIncl) 628 { 629 in.setstate(ios::failbit); 630 break; 631 } 632 633 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 634 { 635 in.setstate(ios::failbit); 636 break; 637 } 638 values.values.push_back(val); 639 // soak up any whitespace and up to 1 comma. 640 pStr=eptr; 641 for(;isspace(*pStr);pStr++); 642 if (*pStr == ',') pStr++; 643 for(;isspace(*pStr);pStr++); 644 } 645 } 646 if (values.values.size() < values.minNumValuesIncl) 647 { 648 in.setstate(ios::failbit); 649 } 650 return in; 651 } 652 653 static inline istream& operator >> (istream &in, SMultiValueInput<Bool> &values) 654 { 655 values.values.clear(); 656 string str; 657 in >> str; 658 if (!str.empty()) 659 { 660 const Char *pStr=str.c_str(); 661 // soak up any whitespace 662 for(;isspace(*pStr);pStr++); 663 664 while (*pStr != 0) 665 { 666 Char *eptr; 667 Int val=strtol(pStr, &eptr, 0); 668 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 669 { 670 in.setstate(ios::failbit); 671 break; 672 } 673 if (val<Int(values.minValIncl) || val>Int(values.maxValIncl)) 674 { 675 in.setstate(ios::failbit); 676 break; 677 } 678 679 if (values.maxNumValuesIncl != 0 && values.values.size() >= values.maxNumValuesIncl) 680 { 681 in.setstate(ios::failbit); 682 break; 683 } 684 values.values.push_back(val!=0); 685 // soak up any whitespace and up to 1 comma. 686 pStr=eptr; 687 for(;isspace(*pStr);pStr++); 688 if (*pStr == ',') pStr++; 689 for(;isspace(*pStr);pStr++); 690 } 691 } 692 if (values.values.size() < values.minNumValuesIncl) 693 { 694 in.setstate(ios::failbit); 695 } 696 return in; 697 } 698 699 static Void 700 automaticallySelectRExtProfile(const Bool bUsingGeneralRExtTools, 701 const Bool bUsingChromaQPAdjustment, 702 const Bool bUsingExtendedPrecision, 703 const Bool bIntraConstraintFlag, 704 UInt &bitDepthConstraint, 705 ChromaFormat &chromaFormatConstraint, 706 const Int maxBitDepth, 707 const ChromaFormat chromaFormat) 708 { 709 // Try to choose profile, according to table in Q1013. 710 UInt trialBitDepthConstraint=maxBitDepth; 711 if (trialBitDepthConstraint<8) trialBitDepthConstraint=8; 712 else if (trialBitDepthConstraint==9 || trialBitDepthConstraint==11) trialBitDepthConstraint++; 713 else if (trialBitDepthConstraint>12) trialBitDepthConstraint=16; 714 715 // both format and bit depth constraints are unspecified 716 if (bUsingExtendedPrecision || trialBitDepthConstraint==16) 717 { 718 bitDepthConstraint = 16; 719 chromaFormatConstraint = (!bIntraConstraintFlag && chromaFormat==CHROMA_400) ? CHROMA_400 : CHROMA_444; 720 } 721 else if (bUsingGeneralRExtTools) 722 { 723 if (chromaFormat == CHROMA_400 && !bIntraConstraintFlag) 724 { 725 bitDepthConstraint = 16; 726 chromaFormatConstraint = CHROMA_400; 727 } 728 else 729 { 730 bitDepthConstraint = trialBitDepthConstraint; 731 chromaFormatConstraint = CHROMA_444; 732 } 733 } 734 else if (chromaFormat == CHROMA_400) 735 { 736 if (bIntraConstraintFlag) 737 { 738 chromaFormatConstraint = CHROMA_420; // there is no intra 4:0:0 profile. 739 bitDepthConstraint = trialBitDepthConstraint; 740 } 741 else 742 { 743 chromaFormatConstraint = CHROMA_400; 744 bitDepthConstraint = trialBitDepthConstraint == 8 ? 8 : 12; 745 } 746 } 747 else 748 { 749 bitDepthConstraint = trialBitDepthConstraint; 750 chromaFormatConstraint = chromaFormat; 751 if (bUsingChromaQPAdjustment && chromaFormat == CHROMA_420) chromaFormatConstraint = CHROMA_422; // 4:2:0 cannot use the chroma qp tool. 752 if (chromaFormatConstraint == CHROMA_422 && bitDepthConstraint == 8) bitDepthConstraint = 10; // there is no 8-bit 4:2:2 profile. 753 if (chromaFormatConstraint == CHROMA_420 && !bIntraConstraintFlag) bitDepthConstraint = 12; // there is no 8 or 10-bit 4:2:0 inter RExt profile. 754 } 755 } 364 756 // ==================================================================================================================== 365 757 // Public member functions … … 387 779 Int* cfg_FrameRate [MAX_LAYERS]; 388 780 Int* cfg_IntraPeriod [MAX_LAYERS]; 389 Int* cfg_conformanceMode[MAX_LAYERS];390 781 Int* cfg_confWinLeft [MAX_LAYERS]; 391 782 Int* cfg_confWinRight [MAX_LAYERS]; … … 394 785 Int* cfg_aiPadX [MAX_LAYERS]; 395 786 Int* cfg_aiPadY [MAX_LAYERS]; 787 Int* cfg_conformanceMode [MAX_LAYERS]; 788 Bool* cfg_useExtendedPrecision [MAX_LAYERS]; 396 789 #if LAYER_CTB 397 790 // coding unit (CU) definition … … 408 801 #endif 409 802 #if AUXILIARY_PICTURES 410 Int cfg_tmpChromaFormatIDC [MAX_LAYERS];411 Int cfg_tmpInputChromaFormat[MAX_LAYERS];412 803 Int* cfg_auxId [MAX_LAYERS]; 413 804 #endif … … 487 878 #endif 488 879 #if O0194_DIFFERENT_BITDEPTH_EL_BL 489 Int* cfg_InputBitDepthY [MAX_LAYERS]; 490 Int* cfg_InternalBitDepthY [MAX_LAYERS]; 491 Int* cfg_InputBitDepthC [MAX_LAYERS]; 492 Int* cfg_InternalBitDepthC [MAX_LAYERS]; 493 Int* cfg_OutputBitDepthY [MAX_LAYERS]; 494 Int* cfg_OutputBitDepthC [MAX_LAYERS]; 880 Int* cfg_InputBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 881 Int* cfg_InternalBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 882 Int* cfg_OutputBitDepth [MAX_NUM_CHANNEL_TYPE][MAX_LAYERS]; 495 883 #endif 496 884 Int* cfg_maxTidIlRefPicsPlus1[MAX_LAYERS]; … … 499 887 #endif 500 888 Int* cfg_waveFrontSynchro[MAX_LAYERS]; 889 501 890 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 502 891 Int* cfg_layerSwitchOffBegin[MAX_LAYERS]; 503 892 Int* cfg_layerSwitchOffEnd[MAX_LAYERS]; 893 #endif 894 895 #if MULTIPLE_PTL_SUPPORT 896 Bool tmpIntraConstraintFlag; 897 Bool tmpLowerBitRateConstraintFlag; 898 UInt tmpBitDepthConstraint; 899 Int* cfg_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; 504 900 #endif 505 901 … … 515 911 cfg_repFormatIdx[layer] = &m_acLayerCfg[layer].m_repFormatIdx; 516 912 #endif 517 cfg_SourceWidth[layer] = &m_acLayerCfg[layer].m_iSourceWidth; 518 cfg_SourceHeight[layer] = &m_acLayerCfg[layer].m_iSourceHeight; 519 cfg_FrameRate[layer] = &m_acLayerCfg[layer].m_iFrameRate; 520 cfg_IntraPeriod[layer] = &m_acLayerCfg[layer].m_iIntraPeriod; 521 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 522 cfg_confWinLeft[layer] = &m_acLayerCfg[layer].m_confWinLeft; 523 cfg_confWinRight[layer] = &m_acLayerCfg[layer].m_confWinRight; 524 cfg_confWinTop[layer] = &m_acLayerCfg[layer].m_confWinTop; 525 cfg_confWinBottom[layer]= &m_acLayerCfg[layer].m_confWinBottom; 526 cfg_aiPadX[layer] = &m_acLayerCfg[layer].m_aiPad[0]; 527 cfg_aiPadY[layer] = &m_acLayerCfg[layer].m_aiPad[1]; 913 cfg_SourceWidth[layer] = &m_acLayerCfg[layer].m_iSourceWidth; 914 cfg_SourceHeight[layer] = &m_acLayerCfg[layer].m_iSourceHeight; 915 cfg_FrameRate[layer] = &m_acLayerCfg[layer].m_iFrameRate; 916 cfg_IntraPeriod[layer] = &m_acLayerCfg[layer].m_iIntraPeriod; 917 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 918 cfg_confWinLeft[layer] = &m_acLayerCfg[layer].m_confWinLeft; 919 cfg_confWinRight[layer] = &m_acLayerCfg[layer].m_confWinRight; 920 cfg_confWinTop[layer] = &m_acLayerCfg[layer].m_confWinTop; 921 cfg_confWinBottom[layer] = &m_acLayerCfg[layer].m_confWinBottom; 922 cfg_aiPadX[layer] = &m_acLayerCfg[layer].m_aiPad[0]; 923 cfg_aiPadY[layer] = &m_acLayerCfg[layer].m_aiPad[1]; 924 cfg_useExtendedPrecision[layer] = &m_acLayerCfg[layer].m_useExtendedPrecision; 528 925 #if LAYER_CTB 529 926 // coding unit (CU) definition … … 587 984 #endif 588 985 #if O0194_DIFFERENT_BITDEPTH_EL_BL 589 cfg_InputBitDepthY [layer] = &m_acLayerCfg[layer].m_inputBitDepthY;590 cfg_InternalBitDepthY[layer] = &m_acLayerCfg[layer].m_internalBitDepthY;591 cfg_InputBitDepthC [layer] = &m_acLayerCfg[layer].m_inputBitDepthC;592 cfg_InternalBitDepthC[layer] = &m_acLayerCfg[layer].m_internalBitDepthC;593 cfg_OutputBitDepthY [layer] = &m_acLayerCfg[layer].m_outputBitDepthY;594 cfg_OutputBitDepthC [layer] = &m_acLayerCfg[layer].m_outputBitDepthC;595 #endif 596 cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1;986 cfg_InputBitDepth [CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA]; 987 cfg_InternalBitDepth[CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 988 cfg_OutputBitDepth [CHANNEL_TYPE_LUMA][layer] = &m_acLayerCfg[layer].m_outputBitDepth[CHANNEL_TYPE_LUMA]; 989 cfg_InternalBitDepth[CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 990 cfg_InputBitDepth [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA]; 991 cfg_OutputBitDepth [CHANNEL_TYPE_CHROMA][layer] = &m_acLayerCfg[layer].m_outputBitDepth[CHANNEL_TYPE_CHROMA]; 992 #endif 993 cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1; 597 994 #if AUXILIARY_PICTURES 598 995 cfg_auxId[layer] = &m_acLayerCfg[layer].m_auxId; … … 601 998 cfg_layerSwitchOffBegin[layer] = &m_acLayerCfg[layer].m_layerSwitchOffBegin; 602 999 cfg_layerSwitchOffEnd[layer] = &m_acLayerCfg[layer].m_layerSwitchOffEnd; 1000 #endif 1001 #if MULTIPLE_PTL_SUPPORT 1002 cfg_layerPTLIdx[layer] = &m_acLayerCfg[layer].m_layerPTLIdx; 603 1003 #endif 604 1004 } … … 641 1041 #endif 642 1042 #endif //SVC_EXTENSION 643 string cfgColumnWidth;644 string cfgRowHeight;645 1043 string cfg_ScalingListFile; 646 string cfg_startOfCodedInterval; 647 string cfg_codedPivotValue; 648 string cfg_targetPivotValue; 649 #if P0050_KNEE_FUNCTION_SEI 650 string cfg_kneeSEIInputKneePointValue; 651 string cfg_kneeSEIOutputKneePointValue; 652 #endif 1044 1045 Int tmpChromaFormat; 1046 Int tmpInputChromaFormat; 1047 Int tmpConstraintChromaFormat; 1048 string inputColourSpaceConvert; 1049 #if MULTIPLE_PTL_SUPPORT 1050 ExtendedProfileName extendedProfile[MAX_NUM_LAYER_IDS + 1]; 1051 #else 1052 ExtendedProfileName extendedProfile; 1053 #endif 1054 Int saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE]; 1055 1056 // Multi-value input fields: // minval, maxval (incl), min_entries, max_entries (incl) [, default values, number of default values] 1057 SMultiValueInput<UInt> cfg_ColumnWidth (0, std::numeric_limits<UInt>::max(), 0, std::numeric_limits<UInt>::max()); 1058 SMultiValueInput<UInt> cfg_RowHeight (0, std::numeric_limits<UInt>::max(), 0, std::numeric_limits<UInt>::max()); 1059 SMultiValueInput<Int> cfg_startOfCodedInterval (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, 1<<16); 1060 SMultiValueInput<Int> cfg_codedPivotValue (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, 1<<16); 1061 SMultiValueInput<Int> cfg_targetPivotValue (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, 1<<16); 1062 1063 const UInt defaultInputKneeCodes[3] = { 600, 800, 900 }; 1064 const UInt defaultOutputKneeCodes[3] = { 100, 250, 450 }; 1065 SMultiValueInput<UInt> cfg_kneeSEIInputKneePointValue (1, 999, 0, 999, defaultInputKneeCodes, sizeof(defaultInputKneeCodes )/sizeof(UInt)); 1066 SMultiValueInput<UInt> cfg_kneeSEIOutputKneePointValue (0, 1000, 0, 999, defaultOutputKneeCodes, sizeof(defaultOutputKneeCodes)/sizeof(UInt)); 1067 const Int defaultPrimaryCodes[6] = { 0,50000, 0,0, 50000,0 }; 1068 const Int defaultWhitePointCode[2] = { 16667, 16667 }; 1069 SMultiValueInput<Int> cfg_DisplayPrimariesCode (0, 50000, 3, 3, defaultPrimaryCodes, sizeof(defaultPrimaryCodes )/sizeof(Int)); 1070 SMultiValueInput<Int> cfg_DisplayWhitePointCode (0, 50000, 2, 2, defaultWhitePointCode, sizeof(defaultWhitePointCode)/sizeof(Int)); 1071 1072 SMultiValueInput<Bool> cfg_timeCodeSeiTimeStampFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1073 SMultiValueInput<Bool> cfg_timeCodeSeiNumUnitFieldBasedFlag(0, 1, 0, MAX_TIMECODE_SEI_SETS); 1074 SMultiValueInput<Int> cfg_timeCodeSeiCountingType (0, 6, 0, MAX_TIMECODE_SEI_SETS); 1075 SMultiValueInput<Bool> cfg_timeCodeSeiFullTimeStampFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1076 SMultiValueInput<Bool> cfg_timeCodeSeiDiscontinuityFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1077 SMultiValueInput<Bool> cfg_timeCodeSeiCntDroppedFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1078 SMultiValueInput<Int> cfg_timeCodeSeiNumberOfFrames (0,511, 0, MAX_TIMECODE_SEI_SETS); 1079 SMultiValueInput<Int> cfg_timeCodeSeiSecondsValue (0, 59, 0, MAX_TIMECODE_SEI_SETS); 1080 SMultiValueInput<Int> cfg_timeCodeSeiMinutesValue (0, 59, 0, MAX_TIMECODE_SEI_SETS); 1081 SMultiValueInput<Int> cfg_timeCodeSeiHoursValue (0, 23, 0, MAX_TIMECODE_SEI_SETS); 1082 SMultiValueInput<Bool> cfg_timeCodeSeiSecondsFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1083 SMultiValueInput<Bool> cfg_timeCodeSeiMinutesFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1084 SMultiValueInput<Bool> cfg_timeCodeSeiHoursFlag (0, 1, 0, MAX_TIMECODE_SEI_SETS); 1085 SMultiValueInput<Int> cfg_timeCodeSeiTimeOffsetLength (0, 31, 0, MAX_TIMECODE_SEI_SETS); 1086 SMultiValueInput<Int> cfg_timeCodeSeiTimeOffsetValue (std::numeric_limits<Int>::min(), std::numeric_limits<Int>::max(), 0, MAX_TIMECODE_SEI_SETS); 1087 653 1088 #if Q0096_OVERLAY_SEI 654 1089 const Int CFG_MAX_OVERLAYS = 3; … … 669 1104 po::Options opts; 670 1105 opts.addOptions() 671 ("help", do_help,false, "this help text")672 ("c", po::parseConfigFile, "configuration file name")673 1106 ("help", do_help, false, "this help text") 1107 ("c", po::parseConfigFile, "configuration file name") 1108 674 1109 // File, I/O and source parameters 675 1110 #if SVC_EXTENSION 676 ("InputFile%d,-i%d", cfg_InputFile,string(""), MAX_LAYERS, "original YUV input file name for layer %d")677 ("ReconFile%d,-o%d", cfg_ReconFile,string(""), MAX_LAYERS, "reconstruction YUV input file name for layer %d")678 ("LayerConfig%d,-lc%d", cfg_LayerCfgFile,string(""), MAX_LAYERS, "layer %d configuration file name")679 ("SourceWidth%d,-wdt%d", cfg_SourceWidth,0, MAX_LAYERS, "Source picture width for layer %d")680 ("SourceHeight%d,-hgt%d", cfg_SourceHeight,0, MAX_LAYERS, "Source picture height for layer %d")681 ("FrameRate%d,-fr%d", cfg_FrameRate,0, MAX_LAYERS, "Frame rate for layer %d")682 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, ( double )1.0, MAX_TLAYER, "Lambda modifier for temporal layer %d")1111 ("InputFile%d,-i%d", cfg_InputFile, string(""), MAX_LAYERS, "original YUV input file name for layer %d") 1112 ("ReconFile%d,-o%d", cfg_ReconFile, string(""), MAX_LAYERS, "reconstruction YUV input file name for layer %d") 1113 ("LayerConfig%d,-lc%d", cfg_LayerCfgFile, string(""), MAX_LAYERS, "layer %d configuration file name") 1114 ("SourceWidth%d,-wdt%d", cfg_SourceWidth, 0, MAX_LAYERS, "Source picture width for layer %d") 1115 ("SourceHeight%d,-hgt%d", cfg_SourceHeight, 0, MAX_LAYERS, "Source picture height for layer %d") 1116 ("FrameRate%d,-fr%d", cfg_FrameRate, 0, MAX_LAYERS, "Frame rate for layer %d") 1117 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, Double(1.0), MAX_TLAYER, "Lambda modifier for temporal layer %d") 683 1118 #if O0215_PHASE_ALIGNMENT 684 ("PhaseAlignment", m_phaseAlignFlag,false, "indicate the sample location alignment between layers (0: zero position aligned, 1: central position aligned)")1119 ("PhaseAlignment", m_phaseAlignFlag, false, "indicate the sample location alignment between layers (0: zero position aligned, 1: central position aligned)") 685 1120 #endif 686 1121 #if REPN_FORMAT_IN_VPS 687 ("RepFormatIdx%d", cfg_repFormatIdx,-1, MAX_LAYERS, "Index to the representation format structure used from the VPS")1122 ("RepFormatIdx%d", cfg_repFormatIdx, -1, MAX_LAYERS, "Index to the representation format structure used from the VPS") 688 1123 #endif 689 1124 #if VPS_EXTN_DIRECT_REF_LAYERS 690 ("NumSamplePredRefLayers%d", cfg_numSamplePredRefLayers,-1, MAX_LAYERS, "Number of sample prediction reference layers")691 ("SamplePredRefLayerIds%d", cfg_samplePredRefLayerIdsPtr,string(""), MAX_LAYERS, "sample pred reference layer IDs")692 ("NumMotionPredRefLayers%d", cfg_numMotionPredRefLayers,-1, MAX_LAYERS, "Number of motion prediction reference layers")693 ("MotionPredRefLayerIds%d", cfg_motionPredRefLayerIdsPtr,string(""), MAX_LAYERS, "motion pred reference layer IDs")694 ("NumActiveRefLayers%d", cfg_numActiveRefLayers,-1, MAX_LAYERS, "Number of active reference layers")695 ("PredLayerIds%d", cfg_predLayerIdsPtr,string(""), MAX_LAYERS, "inter-layer prediction layer IDs")696 #endif 697 ("NumLayers", m_numLayers,1, "Number of layers to code")1125 ("NumSamplePredRefLayers%d", cfg_numSamplePredRefLayers, -1, MAX_LAYERS, "Number of sample prediction reference layers") 1126 ("SamplePredRefLayerIds%d", cfg_samplePredRefLayerIdsPtr, string(""), MAX_LAYERS, "sample pred reference layer IDs") 1127 ("NumMotionPredRefLayers%d", cfg_numMotionPredRefLayers, -1, MAX_LAYERS, "Number of motion prediction reference layers") 1128 ("MotionPredRefLayerIds%d", cfg_motionPredRefLayerIdsPtr, string(""), MAX_LAYERS, "motion pred reference layer IDs") 1129 ("NumActiveRefLayers%d", cfg_numActiveRefLayers, -1, MAX_LAYERS, "Number of active reference layers") 1130 ("PredLayerIds%d", cfg_predLayerIdsPtr, string(""), MAX_LAYERS, "inter-layer prediction layer IDs") 1131 #endif 1132 ("NumLayers", m_numLayers, 1, "Number of layers to code") 698 1133 #if Q0078_ADD_LAYER_SETS 699 1134 #if OUTPUT_LAYER_SETS_CONFIG 700 ("NumLayerSets", m_numLayerSets,1, "Number of layer sets")701 #else 702 ("NumLayerSets", m_numLayerSets,0, "Number of layer sets")703 #endif 704 ("NumLayerInIdList%d", cfg_numLayerInIdList,0, MAX_VPS_LAYER_ID_PLUS1, "Number of layers in the set")705 ("LayerSetLayerIdList%d", cfg_layerSetLayerIdListPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Layer IDs for the set")706 ("NumAddLayerSets", m_numAddLayerSets,0, "Number of additional layer sets")707 ("NumHighestLayerIdx%d", cfg_numHighestLayerIdx,0, MAX_VPS_LAYER_ID_PLUS1, "Number of highest layer idx")708 ("HighestLayerIdx%d", cfg_highestLayerIdxPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Highest layer idx for an additional layer set")1135 ("NumLayerSets", m_numLayerSets, 1, "Number of layer sets") 1136 #else 1137 ("NumLayerSets", m_numLayerSets, 0, "Number of layer sets") 1138 #endif 1139 ("NumLayerInIdList%d", cfg_numLayerInIdList, 0, MAX_VPS_LAYER_ID_PLUS1, "Number of layers in the set") 1140 ("LayerSetLayerIdList%d", cfg_layerSetLayerIdListPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Layer IDs for the set") 1141 ("NumAddLayerSets", m_numAddLayerSets, 0, "Number of additional layer sets") 1142 ("NumHighestLayerIdx%d", cfg_numHighestLayerIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Number of highest layer idx") 1143 ("HighestLayerIdx%d", cfg_highestLayerIdxPtr, string(""), MAX_VPS_LAYER_ID_PLUS1, "Highest layer idx for an additional layer set") 709 1144 #endif 710 1145 #if OUTPUT_LAYER_SETS_CONFIG 711 ("DefaultTargetOutputLayerIdc", m_defaultTargetOutputLayerIdc,1, "Default target output layers. 0: All layers are output layer, 1: Only highest layer is output layer, 2 or 3: No default output layers")712 ("NumOutputLayerSets", m_numOutputLayerSets,1, "Number of output layer sets excluding the 0-th output layer set")713 ("NumOutputLayersInOutputLayerSet", cfg_numOutputLayersInOutputLayerSet, string(""), 1, "List containing number of output layers in the output layer sets")714 ("ListOfOutputLayers%d", cfg_listOfOutputLayers, string(""), MAX_VPS_LAYER_ID_PLUS1, "Layer IDs for the set, in terms of layer ID in the output layer set Range: [0..NumLayersInOutputLayerSet-1]")715 ("OutputLayerSetIdx", cfg_outputLayerSetIdx,string(""), 1, "Corresponding layer set index, only for non-default output layer sets")1146 ("DefaultTargetOutputLayerIdc", m_defaultTargetOutputLayerIdc, 1, "Default target output layers. 0: All layers are output layer, 1: Only highest layer is output layer, 2 or 3: No default output layers") 1147 ("NumOutputLayerSets", m_numOutputLayerSets, 1, "Number of output layer sets excluding the 0-th output layer set") 1148 ("NumOutputLayersInOutputLayerSet", cfg_numOutputLayersInOutputLayerSet, string(""), 1, "List containing number of output layers in the output layer sets") 1149 ("ListOfOutputLayers%d", cfg_listOfOutputLayers, string(""), MAX_VPS_LAYER_ID_PLUS1, "Layer IDs for the set, in terms of layer ID in the output layer set Range: [0..NumLayersInOutputLayerSet-1]") 1150 ("OutputLayerSetIdx", cfg_outputLayerSetIdx, string(""), 1, "Corresponding layer set index, only for non-default output layer sets") 716 1151 #endif 717 1152 #if AUXILIARY_PICTURES 718 ("InputChromaFormat%d", cfg_tmpInputChromaFormat, 420, MAX_LAYERS, "InputChromaFormatIDC for layer %d") 719 ("ChromaFormatIDC%d,-cf", cfg_tmpChromaFormatIDC, 420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d") 720 ("AuxId%d", cfg_auxId, 0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh") 721 #endif 722 ("ConformanceMode%d", cfg_conformanceMode, 0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 723 ("ConfLeft%d", cfg_confWinLeft, 0, MAX_LAYERS, "Deprecated alias of ConfWinLeft") 724 ("ConfRight%d", cfg_confWinRight, 0, MAX_LAYERS, "Deprecated alias of ConfWinRight") 725 ("ConfTop%d", cfg_confWinTop, 0, MAX_LAYERS, "Deprecated alias of ConfWinTop") 726 ("ConfBottom%d", cfg_confWinBottom, 0, MAX_LAYERS, "Deprecated alias of ConfWinBottom") 727 ("ConfWinLeft%d", cfg_confWinLeft, 0, MAX_LAYERS, "Left offset for window conformance mode 3") 728 ("ConfWinRight%d", cfg_confWinRight, 0, MAX_LAYERS, "Right offset for window conformance mode 3") 729 ("ConfWinTop%d", cfg_confWinTop, 0, MAX_LAYERS, "Top offset for window conformance mode 3") 730 ("ConfWinBottom%d", cfg_confWinBottom, 0, MAX_LAYERS, "Bottom offset for window conformance mode 3") 731 ("HorizontalPadding%d,-pdx%d", cfg_aiPadX, 0, MAX_LAYERS, "Horizontal source padding for conformance window mode 2") 732 ("VerticalPadding%d,-pdy%d", cfg_aiPadY, 0, MAX_LAYERS, "Vertical source padding for conformance window mode 2") 733 ("ScalabilityMask1", m_scalabilityMask[1], 0, "scalability_mask[1] (multiview)") 734 ("ScalabilityMask2", m_scalabilityMask[2], 1, "scalability_mask[2] (scalable)" ) 1153 ("AuxId%d", cfg_auxId, 0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh") 1154 #endif 1155 ("ExtendedPrecision%d", cfg_useExtendedPrecision, false, MAX_LAYERS, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)") 1156 ("ConformanceMode%d", cfg_conformanceMode, 0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 1157 ("ConfLeft%d", cfg_confWinLeft, 0, MAX_LAYERS, "Deprecated alias of ConfWinLeft") 1158 ("ConfRight%d", cfg_confWinRight, 0, MAX_LAYERS, "Deprecated alias of ConfWinRight") 1159 ("ConfTop%d", cfg_confWinTop, 0, MAX_LAYERS, "Deprecated alias of ConfWinTop") 1160 ("ConfBottom%d", cfg_confWinBottom, 0, MAX_LAYERS, "Deprecated alias of ConfWinBottom") 1161 ("ConfWinLeft%d", cfg_confWinLeft, 0, MAX_LAYERS, "Left offset for window conformance mode 3") 1162 ("ConfWinRight%d", cfg_confWinRight, 0, MAX_LAYERS, "Right offset for window conformance mode 3") 1163 ("ConfWinTop%d", cfg_confWinTop, 0, MAX_LAYERS, "Top offset for window conformance mode 3") 1164 ("ConfWinBottom%d", cfg_confWinBottom, 0, MAX_LAYERS, "Bottom offset for window conformance mode 3") 1165 ("HorizontalPadding%d,-pdx%d", cfg_aiPadX, 0, MAX_LAYERS, "Horizontal source padding for conformance window mode 2") 1166 ("VerticalPadding%d,-pdy%d", cfg_aiPadY, 0, MAX_LAYERS, "Vertical source padding for conformance window mode 2") 1167 ("ScalabilityMask1", m_scalabilityMask[VIEW_ORDER_INDEX], 0, "scalability_mask[1] (multiview)") 1168 ("ScalabilityMask2", m_scalabilityMask[SCALABILITY_ID], 1, "scalability_mask[2] (scalable)" ) 735 1169 #if AUXILIARY_PICTURES 736 ("ScalabilityMask3", m_scalabilityMask[3],0, "scalability_mask[3] (auxiliary pictures)" )737 #endif 738 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name")1170 ("ScalabilityMask3", m_scalabilityMask[AUX_ID], 0, "scalability_mask[3] (auxiliary pictures)" ) 1171 #endif 1172 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 739 1173 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 740 ("InputBitDepth", m_inputBitDepthY,8, "Bit-depth of input file")741 ("OutputBitDepth", m_outputBitDepthY,0, "Bit-depth of output file (default:InternalBitDepth)")742 ("InternalBitDepth", m_internalBitDepthY,0, "Bit-depth the codec operates at. (default:InputBitDepth)"743 "If different to InputBitDepth, source data will be converted")744 ("InputBitDepthC", m_inputBitDepthC,0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")745 ("OutputBitDepthC", m_outputBitDepthC,0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")746 ("InternalBitDepthC", m_internalBitDepthC,0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")747 #endif 748 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets,0, MAX_LAYERS, "Number of scaled offset layer sets ")1174 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 1175 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") 1176 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)" 1177 "If different to InputBitDepth, source data will be converted") 1178 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)") 1179 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 1180 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 1181 #endif 1182 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 749 1183 #if O0098_SCALED_REF_LAYER_ID 750 ("ScaledRefLayerId%d", cfg_scaledRefLayerIdPtr,string(""), MAX_LAYERS, "Layer ID of scaled base layer picture")751 #endif 752 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr,string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to"753 " top-left luma sample of the EL picture, in units of two luma samples")754 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffsetPtr, string(""), MAX_LAYERS,"Vertical offset of top-left luma sample of scaled base layer picture with respect to"755 " top-left luma sample of the EL picture, in units of two luma samples")756 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffsetPtr,string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to"757 " bottom-right luma sample of the EL picture, in units of two luma samples")758 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to"759 "bottom-right luma sample of the EL picture, in units of two luma samples")1184 ("ScaledRefLayerId%d", cfg_scaledRefLayerIdPtr, string(""), MAX_LAYERS, "Layer ID of scaled base layer picture") 1185 #endif 1186 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" 1187 " top-left luma sample of the EL picture, in units of two luma samples") 1188 ("ScaledRefLayerTopOffset%d", cfg_scaledRefLayerTopOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of top-left luma sample of scaled base layer picture with respect to" 1189 " top-left luma sample of the EL picture, in units of two luma samples") 1190 ("ScaledRefLayerRightOffset%d", cfg_scaledRefLayerRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of scaled base layer picture with respect to" 1191 " bottom-right luma sample of the EL picture, in units of two luma samples") 1192 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 1193 " bottom-right luma sample of the EL picture, in units of two luma samples") 760 1194 #if REF_REGION_OFFSET 761 ("ScaledRefLayerOffsetPresentFlag%d", cfg_scaledRefLayerOffsetPresentFlagPtr,string(""), MAX_LAYERS, "presense flag of scaled reference layer offsets")762 ("RefRegionOffsetPresentFlag%d", cfg_refRegionOffsetPresentFlagPtr,string(""), MAX_LAYERS, "presense flag of reference region offsets")763 ("RefRegionLeftOffset%d", cfg_refRegionLeftOffsetPtr,string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of ref region with respect to"764 "top-left luma sample of the BL picture, in units of two luma samples")765 ("RefRegionTopOffset%d", cfg_refRegionTopOffsetPtr, string(""), MAX_LAYERS,"Vertical offset of top-left luma sample of ref region with respect to"766 "top-left luma sample of the BL picture, in units of two luma samples")767 ("RefRegionRightOffset%d", cfg_refRegionRightOffsetPtr,string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of ref region with respect to"768 "bottom-right luma sample of the BL picture, in units of two luma samples")769 ("RefRegionBottomOffset%d", cfg_refRegionBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of ref region with respect to"770 "bottom-right luma sample of the BL picture, in units of two luma samples")1195 ("ScaledRefLayerOffsetPresentFlag%d", cfg_scaledRefLayerOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of scaled reference layer offsets") 1196 ("RefRegionOffsetPresentFlag%d", cfg_refRegionOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of reference region offsets") 1197 ("RefRegionLeftOffset%d", cfg_refRegionLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of ref region with respect to" 1198 " top-left luma sample of the BL picture, in units of two luma samples") 1199 ("RefRegionTopOffset%d", cfg_refRegionTopOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of top-left luma sample of ref region with respect to" 1200 " top-left luma sample of the BL picture, in units of two luma samples") 1201 ("RefRegionRightOffset%d", cfg_refRegionRightOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of bottom-right luma sample of ref region with respect to" 1202 " bottom-right luma sample of the BL picture, in units of two luma samples") 1203 ("RefRegionBottomOffset%d", cfg_refRegionBottomOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of ref region with respect to" 1204 " bottom-right luma sample of the BL picture, in units of two luma samples") 771 1205 #endif 772 1206 #if R0209_GENERIC_PHASE 773 ("ResamplePhaseSetPresentFlag%d", cfg_resamplePhaseSetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of resample phase set")774 ("PhaseHorLuma%d", cfg_phaseHorLumaPtr,string(""), MAX_LAYERS, "luma shift in the horizontal direction used in resampling proces")775 ("PhaseVerLuma%d", cfg_phaseVerLumaPtr,string(""), MAX_LAYERS, "luma shift in the vertical direction used in resampling proces")776 ("PhaseHorChroma%d", cfg_phaseHorChromaPtr,string(""), MAX_LAYERS, "chroma shift in the horizontal direction used in resampling proces")777 ("PhaseVerChroma%d", cfg_phaseVerChromaPtr,string(""), MAX_LAYERS, "chroma shift in the vertical direction used in resampling proces")1207 ("ResamplePhaseSetPresentFlag%d", cfg_resamplePhaseSetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of resample phase set") 1208 ("PhaseHorLuma%d", cfg_phaseHorLumaPtr, string(""), MAX_LAYERS, "luma shift in the horizontal direction used in resampling proces") 1209 ("PhaseVerLuma%d", cfg_phaseVerLumaPtr, string(""), MAX_LAYERS, "luma shift in the vertical direction used in resampling proces") 1210 ("PhaseHorChroma%d", cfg_phaseHorChromaPtr, string(""), MAX_LAYERS, "chroma shift in the horizontal direction used in resampling proces") 1211 ("PhaseVerChroma%d", cfg_phaseVerChromaPtr, string(""), MAX_LAYERS, "chroma shift in the vertical direction used in resampling proces") 778 1212 #endif 779 1213 #if P0312_VERT_PHASE_ADJ 780 ("VertPhasePositionEnableFlag%d", cfg_vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d")1214 ("VertPhasePositionEnableFlag%d", cfg _vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d") 781 1215 #endif 782 1216 #if Q0074_COLOUR_REMAPPING_SEI 783 ("SEIColourRemappingInfoFile%d", cfg_colourRemapSEIFile,string(""), MAX_LAYERS, "Colour Remapping Information SEI parameters file name for layer %d")1217 ("SEIColourRemappingInfoFile%d", cfg_colourRemapSEIFile, string(""), MAX_LAYERS, "Colour Remapping Information SEI parameters file name for layer %d") 784 1218 #endif 785 1219 #if O0194_DIFFERENT_BITDEPTH_EL_BL 786 ("InputBitDepth%d", cfg_InputBitDepthY,8, MAX_LAYERS, "Bit-depth of input file for layer %d")787 ("InternalBitDepth%d", cfg_InternalBitDepthY, 0, MAX_LAYERS, "Bit-depth the codec operates at. (default:InputBitDepth) for layer %d ")788 // "If different to InputBitDepth, source data will be converted")789 (" InputBitDepthC%d", cfg_InputBitDepthC, 0, MAX_LAYERS, "As per InputBitDepth but for chroma component. (default:InputBitDepth) for layer %d")790 ("In ternalBitDepthC%d", cfg_InternalBitDepthC, 0, MAX_LAYERS, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth) for layer %d")791 (" OutputBitDepth%d", cfg_OutputBitDepthY, 0, MAX_LAYERS, "Bit-depth of output file (default:InternalBitDepth)")792 ("OutputBitDepthC%d", cfg_OutputBitDepthC, 0, MAX_LAYERS, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")793 #endif 794 ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, true, "max_tid_ref_present_flag (0: not present, 1: present(default)) " )795 ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 1, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction")1220 ("InputBitDepth%d", cfg_InputBitDepth[CHANNEL_TYPE_LUMA], 8, MAX_LAYERS, "Bit-depth of input file for layer %d") 1221 ("InternalBitDepth%d", cfg_InternalBitDepth[CHANNEL_TYPE_LUMA], 0, MAX_LAYERS, "Bit-depth the codec operates at. (default:InputBitDepth) for layer %d " 1222 " If different to InputBitDepth, source data will be converted") 1223 ("OutputBitDepth%d", cfg_OutputBitDepth[CHANNEL_TYPE_LUMA], 0, MAX_LAYERS, "Bit-depth of output file (default:InternalBitDepth)") 1224 ("InputBitDepthC%d", cfg_InputBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per InputBitDepth but for chroma component. (default:InputBitDepth) for layer %d") 1225 ("InternalBitDepthC%d", cfg_InternalBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth) for layer %d") 1226 ("OutputBitDepthC%d", cfg_OutputBitDepth[CHANNEL_TYPE_CHROMA], 0, MAX_LAYERS, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 1227 #endif 1228 ("MaxTidRefPresentFlag", m_maxTidRefPresentFlag, false, "max_tid_ref_present_flag (0: not present, 1: present) " ) 1229 ("MaxTidIlRefPicsPlus1%d", cfg_maxTidIlRefPicsPlus1, 7, MAX_LAYERS, "allowed maximum temporal_id for inter-layer prediction") 796 1230 #if O0223_PICTURE_TYPES_ALIGN_FLAG 797 ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag,true, "align picture type across layers" )798 #endif 799 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag,true, "align IRAP across layers" )1231 ("CrossLayerPictureTypeAlignFlag", m_crossLayerPictureTypeAlignFlag, true, "align picture type across layers" ) 1232 #endif 1233 ("CrossLayerIrapAlignFlag", m_crossLayerIrapAlignFlag, true, "align IRAP across layers" ) 800 1234 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG 801 ("CrossLayerAlignedIdrOnlyFlag", m_crossLayerAlignedIdrOnlyFlag,true, "only idr for IRAP across layers" )1235 ("CrossLayerAlignedIdrOnlyFlag", m_crossLayerAlignedIdrOnlyFlag, true, "only idr for IRAP across layers" ) 802 1236 #endif 803 1237 #if O0194_WEIGHTED_PREDICTION_CGS 804 ("InterLayerWeightedPred", m_useInterLayerWeightedPred,false, "enable IL WP parameters estimation at encoder" )1238 ("InterLayerWeightedPred", m_useInterLayerWeightedPred, false, "enable IL WP parameters estimation at encoder" ) 805 1239 #endif 806 1240 #if AVC_BASE 807 1241 #if VPS_AVC_BL_FLAG_REMOVAL 808 ("NonHEVCBase,-nonhevc", m_nonHEVCBaseLayerFlag, 0, "BL is available but not internal") 809 #else 810 ("AvcBase,-avc", m_avcBaseLayerFlag, 0, "avc_base_layer_flag") 811 #endif 812 ("InputBLFile,-ibl", cfg_BLInputFile, string(""), "Base layer rec YUV input file name") 813 #endif 814 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 1242 ("NonHEVCBase,-nonhevc", m_nonHEVCBaseLayerFlag, 0, "BL is available but not internal") 1243 #else 1244 ("AvcBase,-avc", m_avcBaseLayerFlag, 0, "avc_base_layer_flag") 1245 #endif 1246 ("InputBLFile,-ibl", cfg_BLInputFile, string(""), "Base layer rec YUV input file name") 1247 #endif 1248 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, 0, "Set ILP over base-layer I picture to B picture (default is P picture)") 1249 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 1250 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 815 1251 #else //SVC_EXTENSION 816 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 817 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 818 ("ReconFile,o", cfg_ReconFile, string(""), "Reconstructed YUV output file name") 819 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width") 820 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") 821 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 822 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") 823 ("InternalBitDepth", m_internalBitDepthY, 0, "Bit-depth the codec operates at. (default:InputBitDepth)" 824 "If different to InputBitDepth, source data will be converted") 825 ("InputBitDepthC", m_inputBitDepthC, 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)") 826 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 827 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 828 #if AUXILIARY_PICTURES 829 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 830 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 831 #endif 832 ("ConformanceMode", m_conformanceWindowMode, 0, "Deprecated alias of ConformanceWindowMode") 833 ("ConformanceWindowMode", m_conformanceWindowMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 834 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") 835 ("VerticalPadding,-pdy", m_aiPad[1], 0, "Vertical source padding for conformance window mode 2") 836 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft") 837 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight") 838 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop") 839 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom") 840 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3") 841 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") 842 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 843 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 844 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 1252 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 1253 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 1254 ("ReconFile,o", cfg_ReconFile, string(""), "Reconstructed YUV output file name") 1255 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width") 1256 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") 1257 ("InputBitDepth", m_inputBitDepth[CHANNEL_TYPE_LUMA], 8, "Bit-depth of input file") 1258 ("OutputBitDepth", m_outputBitDepth[CHANNEL_TYPE_LUMA], 0, "Bit-depth of output file (default:InternalBitDepth)") 1259 ("MSBExtendedBitDepth", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], 0, "bit depth of luma component after addition of MSBs of value 0 (used for synthesising High Dynamic Range source material). (default:InputBitDepth)") 1260 ("InternalBitDepth", m_internalBitDepth[CHANNEL_TYPE_LUMA], 0, "Bit-depth the codec operates at. (default:MSBExtendedBitDepth). If different to MSBExtendedBitDepth, source data will be converted") 1261 ("InputBitDepthC", m_inputBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)") 1262 ("OutputBitDepthC", m_outputBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 1263 ("MSBExtendedBitDepthC", m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per MSBExtendedBitDepth but for chroma component. (default:MSBExtendedBitDepth)") 1264 ("InternalBitDepthC", m_internalBitDepth[CHANNEL_TYPE_CHROMA], 0, "As per InternalBitDepth but for chroma component. (default:InternalBitDepth)") 1265 ("ExtendedPrecision", m_useExtendedPrecision, false, "Increased internal accuracies to support high bit depths (not valid in V1 profiles)") 1266 ("HighPrecisionPredictionWeighting", m_useHighPrecisionPredictionWeighting, false, "Use high precision option for weighted prediction (not valid in V1 profiles)") 1267 ("InputColourSpaceConvert", inputColourSpaceConvert, string(""), "Colour space conversion to apply to input video. Permitted values are (empty string=UNCHANGED) " + getListOfColourSpaceConverts(true)) 1268 ("SNRInternalColourSpace", m_snrInternalColourSpace, false, "If true, then no colour space conversion is applied prior to SNR, otherwise inverse of input is applied.") 1269 ("OutputInternalColourSpace", m_outputInternalColourSpace, false, "If true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied.") 1270 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 1271 ("MSEBasedSequencePSNR", m_printMSEBasedSequencePSNR, false, "0 (default) emit sequence PSNR only as a linear average of the frame PSNRs, 1 = also emit a sequence PSNR based on an average of the frame MSEs") 1272 ("PrintFrameMSE", m_printFrameMSE, false, "0 (default) emit only bit count and PSNRs for each frame, 1 = also emit MSE values") 1273 ("PrintSequenceMSE", m_printSequenceMSE, false, "0 (default) emit only bit rate and PSNRs for the whole sequence, 1 = also emit MSE values") 1274 ("CabacZeroWordPaddingEnabled", m_cabacZeroWordPaddingEnabled, false, "0 (default) do not add conforming cabac-zero-words to bit streams, 1 = add cabac-zero-words") 1275 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 1276 ("ConformanceMode", m_conformanceWindowMode, 0, "Deprecated alias of ConformanceWindowMode") 1277 ("ConformanceWindowMode", m_conformanceWindowMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 1278 ("HorizontalPadding,-pdx", m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") 1279 ("VerticalPadding,-pdy", m_aiPad[1], 0, "Vertical source padding for conformance window mode 2") 1280 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft") 1281 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight") 1282 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop") 1283 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom") 1284 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3") 1285 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") 1286 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 1287 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 1288 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 845 1289 #if Q0074_COLOUR_REMAPPING_SEI 846 ("SEIColourRemappingInfoFile", cfg_colourRemapSEIFile, string(""), "Colour Remapping Information SEI parameters file name")1290 ("SEIColourRemappingInfoFile", cfg_colourRemapSEIFile, string(""), "Colour Remapping Information SEI parameters file name") 847 1291 #endif 848 1292 #endif //SVC_EXTENSION 849 ("FrameSkip,-fs", m_FrameSkip,0u, "Number of frames to skip at start of input YUV")850 ("FramesToBeEncoded,f", m_framesToBeEncoded,0, "Number of frames to be encoded (default=all)")1293 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") 1294 ("FramesToBeEncoded,f", m_framesToBeEncoded, 0, "Number of frames to be encoded (default=all)") 851 1295 852 1296 //Field coding parameters 853 ("FieldCoding", m_isField, false, "Signals if it's a field based coding") 854 ("TopFieldFirst, Tff", m_isTopFieldFirst, false, "In case of field based coding, signals whether if it's a top field first or not") 1297 ("FieldCoding", m_isField, false, "Signals if it's a field based coding") 1298 ("TopFieldFirst, Tff", m_isTopFieldFirst, false, "In case of field based coding, signals whether if it's a top field first or not") 1299 1300 // Profile and level 1301 #if MULTIPLE_PTL_SUPPORT 1302 ("NumProfileTierLevel", m_numPTLInfo, 1, "Number of Profile, Tier and Level information") 1303 ("Profile%d", extendedProfile, NONE, (MAX_NUM_LAYER_IDS + 1), "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none") 1304 ("Level%d", m_levelList, Level::NONE, (MAX_NUM_LAYER_IDS + 1), "Level limit to be used, eg 5.1, or none") 1305 ("Tier%d", m_levelTierList, Level::MAIN, (MAX_NUM_LAYER_IDS + 1), "Tier to use for interpretation of --Level (main or high only)") 1306 ("MaxBitDepthConstraint", tmpBitDepthConstraint, 0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1307 ("MaxChromaFormatConstraint", tmpConstraintChromaFormat, 0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1308 ("IntraConstraintFlag", tmpIntraConstraintFlag, false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)") 1309 ("LowerBitRateConstraintFlag", tmpLowerBitRateConstraintFlag, true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles") 1310 1311 ("ProfileCompatibility%d", m_profileCompatibility, Profile::NONE, (MAX_NUM_LAYER_IDS + 1), "Compatible profile to be used when encoding") 1312 ("ProgressiveSource%d", m_progressiveSourceFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is progressive") 1313 ("InterlacedSource%d", m_interlacedSourceFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source is interlaced") 1314 ("NonPackedSource%d", m_nonPackedConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that source does not contain frame packing") 1315 ("FrameOnly%d", m_frameOnlyConstraintFlagList, false, (MAX_NUM_LAYER_IDS + 1), "Indicate that the bitstream contains only frames") 855 1316 856 // Profile and level 857 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT 858 ("NumProfileTierLevel", m_numPTLInfo, 1, "Number of Profile, Tier and Level information") 859 ("Profile%d", m_profileList, Profile::NONE, MAX_NUM_LAYER_IDS + 1, "Profile to be used when encoding (Incomplete)") 860 ("Level%d", m_levelList, Level::NONE, MAX_NUM_LAYER_IDS + 1, "Level limit to be used, eg 5.1 (Incomplete)") 861 ("Tier%d", m_levelTierList, Level::MAIN, MAX_NUM_LAYER_IDS + 1, "Tier to use for interpretation of --Level") 862 ("ProfileCompatibility%d", m_profileCompatibility, Profile::NONE, MAX_NUM_LAYER_IDS + 1, "Compatible profile to be used when encoding") 863 ("ProgressiveSource%d", m_progressiveSourceFlagList, false, MAX_NUM_LAYER_IDS + 1, "Indicate that source is progressive") 864 ("InterlacedSource%d", m_interlacedSourceFlagList, false, MAX_NUM_LAYER_IDS + 1, "Indicate that source is interlaced") 865 ("NonPackedSource%d", m_nonPackedConstraintFlagList, false, MAX_NUM_LAYER_IDS + 1, "Indicate that source does not contain frame packing") 866 ("FrameOnly%d", m_frameOnlyConstraintFlagList, false, MAX_NUM_LAYER_IDS + 1, "Indicate that the bitstream contains only frames") 867 868 ("LayerPTLIndex%d", m_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer") 869 ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_OUTPUT_LAYER_SETS_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1") 870 #else 871 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") 872 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1 (Incomplete)") 873 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level") 874 875 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 876 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") 877 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 878 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 1317 ("LayerPTLIndex%d", cfg_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer") 1318 ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_OUTPUT_LAYER_SETS_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1") 1319 #else 1320 ("Profile", extendedProfile, NONE, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none") 1321 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1, or none") 1322 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level (main or high only)") 1323 ("MaxBitDepthConstraint", m_bitDepthConstraint, 0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1324 ("MaxChromaFormatConstraint", tmpConstraintChromaFormat, 0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1325 ("IntraConstraintFlag", m_intraConstraintFlag, false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)") 1326 ("LowerBitRateConstraintFlag", m_lowerBitRateConstraintFlag, true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles") 1327 1328 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 1329 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") 1330 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 1331 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 879 1332 #endif 880 1333 881 1334 #if LAYER_CTB 882 1335 // Unit definition parameters 883 ("MaxCUWidth%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width")884 ("MaxCUHeight%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height")1336 ("MaxCUWidth%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 1337 ("MaxCUHeight%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 885 1338 // todo: remove defaults from MaxCUSize 886 ("MaxCUSize%d,s%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size")887 ("MaxCUSize%d,s%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size")888 ("MaxPartitionDepth%d,h%d", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth")1339 ("MaxCUSize%d,s%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 1340 ("MaxCUSize%d,s%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 1341 ("MaxPartitionDepth%d,h%d", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 889 1342 890 ("QuadtreeTULog2MaxSize%d", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2")891 ("QuadtreeTULog2MinSize%d", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2")1343 ("QuadtreeTULog2MaxSize%d", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 1344 ("QuadtreeTULog2MinSize%d", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 892 1345 893 ("QuadtreeTUMaxDepthIntra%d", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs")894 ("QuadtreeTUMaxDepthInter%d", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs")1346 ("QuadtreeTUMaxDepthIntra%d", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 1347 ("QuadtreeTUMaxDepthInter%d", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 895 1348 896 1349 897 1350 // set the same CU realted settings across all the layers if config file parameters are not layer specific 898 ("MaxCUWidth", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width")899 ("MaxCUHeight", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height")1351 ("MaxCUWidth", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 1352 ("MaxCUHeight", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 900 1353 // todo: remove defaults from MaxCUSize 901 ("MaxCUSize,s", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size")902 ("MaxCUSize,s", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size")903 ("MaxPartitionDepth,h", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth")1354 ("MaxCUSize,s", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 1355 ("MaxCUSize,s", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 1356 ("MaxPartitionDepth,h", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 904 1357 905 ("QuadtreeTULog2MaxSize", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2")906 ("QuadtreeTULog2MinSize", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2")1358 ("QuadtreeTULog2MaxSize", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 1359 ("QuadtreeTULog2MinSize", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 907 1360 908 ("QuadtreeTUMaxDepthIntra", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs")909 ("QuadtreeTUMaxDepthInter", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs")1361 ("QuadtreeTUMaxDepthIntra", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 1362 ("QuadtreeTUMaxDepthInter", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 910 1363 #else 911 1364 // Unit definition parameters 912 ("MaxCUWidth", m_uiMaxCUWidth,64u)913 ("MaxCUHeight", m_uiMaxCUHeight,64u)1365 ("MaxCUWidth", m_uiMaxCUWidth, 64u) 1366 ("MaxCUHeight", m_uiMaxCUHeight, 64u) 914 1367 // todo: remove defaults from MaxCUSize 915 ("MaxCUSize,s", m_uiMaxCUWidth,64u, "Maximum CU size")916 ("MaxCUSize,s", m_uiMaxCUHeight,64u, "Maximum CU size")917 ("MaxPartitionDepth,h", m_uiMaxCUDepth,4u, "CU depth")918 919 ("QuadtreeTULog2MaxSize", m_uiQuadtreeTULog2MaxSize,6u, "Maximum TU size in logarithm base 2")920 ("QuadtreeTULog2MinSize", m_uiQuadtreeTULog2MinSize,2u, "Minimum TU size in logarithm base 2")921 922 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra,1u, "Depth of TU tree for intra CUs")923 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter,2u, "Depth of TU tree for inter CUs")1368 ("MaxCUSize,s", m_uiMaxCUWidth, 64u, "Maximum CU size") 1369 ("MaxCUSize,s", m_uiMaxCUHeight, 64u, "Maximum CU size") 1370 ("MaxPartitionDepth,h", m_uiMaxCUDepth, 4u, "CU depth") 1371 1372 ("QuadtreeTULog2MaxSize", m_uiQuadtreeTULog2MaxSize, 6u, "Maximum TU size in logarithm base 2") 1373 ("QuadtreeTULog2MinSize", m_uiQuadtreeTULog2MinSize, 2u, "Minimum TU size in logarithm base 2") 1374 1375 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs") 1376 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 924 1377 #endif 925 1378 926 1379 // Coding structure paramters 927 1380 #if SVC_EXTENSION 928 ("IntraPeriod%d,-ip%d", cfg_IntraPeriod, -1, MAX_LAYERS, "intra period in frames for layer %d, (-1: only first frame)")929 #else 930 ("IntraPeriod,-ip", m_iIntraPeriod,-1, "Intra period in frames, (-1: only first frame)")1381 ("IntraPeriod%d,-ip%d", cfg_IntraPeriod, -1, MAX_LAYERS, "intra period in frames for layer %d, (-1: only first frame)") 1382 #else 1383 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 931 1384 #endif 932 1385 #if ALLOW_RECOVERY_POINT_AS_RAP 933 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 934 #else 935 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 936 #endif 937 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 938 // motion options 939 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 940 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 941 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") 942 ("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel") 943 ("ASR", m_bUseASR, false, "Adaptive motion search range") 1386 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 1387 #else 1388 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 1389 #endif 1390 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 1391 1392 // motion search options 1393 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 1394 ("SearchRange,-sr", m_iSearchRange, 96, "Motion search range") 1395 ("BipredSearchRange", m_bipredSearchRange, 4, "Motion search range for bipred refinement") 1396 ("HadamardME", m_bUseHADME, true, "Hadamard ME for fractional-pel") 1397 ("ASR", m_bUseASR, false, "Adaptive motion search range") 944 1398 945 1399 #if SVC_EXTENSION 946 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, ( double )1.0, MAX_TLAYER, "Lambda modifier for temporal layer %d")1400 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, ( double )1.0, MAX_TLAYER, "Lambda modifier for temporal layer %d") 947 1401 #else 948 1402 // Mode decision parameters 949 ("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( Double )1.0, "Lambda modifier for temporal layer 0") 950 ("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( Double )1.0, "Lambda modifier for temporal layer 1") 951 ("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( Double )1.0, "Lambda modifier for temporal layer 2") 952 ("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( Double )1.0, "Lambda modifier for temporal layer 3") 953 ("LambdaModifier4,-LM4", m_adLambdaModifier[ 4 ], ( Double )1.0, "Lambda modifier for temporal layer 4") 954 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5") 955 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6") 1403 // Mode decision parameters 1404 ("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( Double )1.0, "Lambda modifier for temporal layer 0") 1405 ("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( Double )1.0, "Lambda modifier for temporal layer 1") 1406 ("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( Double )1.0, "Lambda modifier for temporal layer 2") 1407 ("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( Double )1.0, "Lambda modifier for temporal layer 3") 1408 ("LambdaModifier4,-LM4", m_adLambdaModifier[ 4 ], ( Double )1.0, "Lambda modifier for temporal layer 4") 1409 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5") 1410 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6") 956 1411 #endif 957 1412 958 1413 /* Quantization parameters */ 959 1414 #if SVC_EXTENSION 960 ("QP%d,-q%d", cfg_fQP, 30.0, MAX_LAYERS, "Qp value for layer %d, if value is float, QP is switched once during encoding") 961 #else 962 ("QP,q", m_fQP, 30.0, "Qp value, if value is float, QP is switched once during encoding") 963 #endif 964 ("DeltaQpRD,-dqr",m_uiDeltaQpRD, 0u, "max dQp offset for slice") 965 ("MaxDeltaQP,d", m_iMaxDeltaQP, 0, "max dQp offset for block") 966 ("MaxCuDQPDepth,-dqd", m_iMaxCuDQPDepth, 0, "max depth for a minimum CuDQP") 967 968 ("CbQpOffset,-cbqpofs", m_cbQpOffset, 0, "Chroma Cb QP Offset") 969 ("CrQpOffset,-crqpofs", m_crQpOffset, 0, "Chroma Cr QP Offset") 1415 ("QP%d,-q%d", cfg_fQP, 30.0, MAX_LAYERS, "Qp value for layer %d, if value is float, QP is switched once during encoding") 1416 #else 1417 ("QP,q", m_fQP, 30.0, "Qp value, if value is float, QP is switched once during encoding") 1418 #endif 1419 ("DeltaQpRD,-dqr", m_uiDeltaQpRD, 0u, "max dQp offset for slice") 1420 ("MaxDeltaQP,d", m_iMaxDeltaQP, 0, "max dQp offset for block") 1421 ("MaxCuDQPDepth,-dqd", m_iMaxCuDQPDepth, 0, "max depth for a minimum CuDQP") 1422 ("MaxCUChromaQpAdjustmentDepth", m_maxCUChromaQpAdjustmentDepth, -1, "Maximum depth for CU chroma Qp adjustment - set less than 0 to disable") 1423 1424 ("CbQpOffset,-cbqpofs", m_cbQpOffset, 0, "Chroma Cb QP Offset") 1425 ("CrQpOffset,-crqpofs", m_crQpOffset, 0, "Chroma Cr QP Offset") 970 1426 971 1427 #if ADAPTIVE_QP_SELECTION 972 ("AdaptiveQpSelection,-aqps", m_bUseAdaptQpSelect,false, "AdaptiveQpSelection")973 #endif 974 975 ("AdaptiveQP,-aq", m_bUseAdaptiveQP,false, "QP adaptation based on a psycho-visual model")976 ("MaxQPAdaptationRange,-aqr", m_iQPAdaptationRange,6, "QP adaptation range")1428 ("AdaptiveQpSelection,-aqps", m_bUseAdaptQpSelect, false, "AdaptiveQpSelection") 1429 #endif 1430 1431 ("AdaptiveQP,-aq", m_bUseAdaptiveQP, false, "QP adaptation based on a psycho-visual model") 1432 ("MaxQPAdaptationRange,-aqr", m_iQPAdaptationRange, 6, "QP adaptation range") 977 1433 #if !SVC_EXTENSION 978 ("dQPFile,m", cfg_dQPFile,string(""), "dQP file name")979 #endif 980 ("RDOQ", m_useRDOQ, true)981 ("RDOQTS", m_useRDOQTS, true)982 ("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disbaled 1:RD-penalty 2:maximum RD-penalty")983 1434 ("dQPFile,m", cfg_dQPFile, string(""), "dQP file name") 1435 #endif 1436 ("RDOQ", m_useRDOQ, true) 1437 ("RDOQTS", m_useRDOQTS, true) 1438 ("RDpenalty", m_rdPenalty, 0, "RD-penalty for 32x32 TU for intra in non-intra slices. 0:disabled 1:RD-penalty 2:maximum RD-penalty") 1439 984 1440 // Deblocking filter parameters 985 ("LoopFilterDisable", m_bLoopFilterDisable, false)986 ("LoopFilterOffsetInPPS", m_loopFilterOffsetInPPS, false)987 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0)988 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0)989 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false)990 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false)1441 ("LoopFilterDisable", m_bLoopFilterDisable, false) 1442 ("LoopFilterOffsetInPPS", m_loopFilterOffsetInPPS, false) 1443 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0) 1444 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0) 1445 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false) 1446 ("DeblockingFilterMetric", m_DeblockingFilterMetric, false) 991 1447 992 1448 // Coding tools 993 ("AMP", m_enableAMP, true, "Enable asymmetric motion partitions") 994 ("TransformSkip", m_useTransformSkip, false, "Intra transform skipping") 995 ("TransformSkipFast", m_useTransformSkipFast, false, "Fast intra transform skipping") 996 ("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset") 997 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 998 ("SAOLcuBoundary", m_saoLcuBoundary, false, "0: right/bottom LCU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 999 ("SliceMode", m_sliceMode, 0, "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1000 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" 1001 "\t1: max number of CTUs per slice" 1002 "\t2: max number of bytes per slice" 1003 "\t3: max number of tiles per slice") 1004 ("SliceSegmentMode", m_sliceSegmentMode, 0, "0: Disable all slice segment limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1005 ("SliceSegmentArgument", m_sliceSegmentArgument, 0, "Depending on SliceSegmentMode being:" 1006 "\t1: max number of CTUs per slice segment" 1007 "\t2: max number of bytes per slice segment" 1008 "\t3: max number of tiles per slice segment") 1009 ("LFCrossSliceBoundaryFlag", m_bLFCrossSliceBoundaryFlag, true) 1010 1011 ("ConstrainedIntraPred", m_bUseConstrainedIntraPred, false, "Constrained Intra Prediction") 1012 1013 ("PCMEnabledFlag", m_usePCM, false) 1014 ("PCMLog2MaxSize", m_pcmLog2MaxSize, 5u) 1015 ("PCMLog2MinSize", m_uiPCMLog2MinSize, 3u) 1016 ("PCMInputBitDepthFlag", m_bPCMInputBitDepthFlag, true) 1017 ("PCMFilterDisableFlag", m_bPCMFilterDisableFlag, false) 1018 1019 ("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices") 1020 ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") 1021 ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") 1022 1023 //deprecated copies of renamed tile parameters 1024 ("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing") 1025 ("ColumnWidthArray", cfgColumnWidth, string(""), "deprecated alias of TileColumnWidthArray") 1026 ("RowHeightArray", cfgRowHeight, string(""), "deprecated alias of TileRowHeightArray") 1027 1028 ("TileUniformSpacing", m_tileUniformSpacingFlag, false, "Indicates that tile columns and rows are distributed uniformly") 1029 ("NumTileColumnsMinus1", m_numTileColumnsMinus1, 0, "Number of tile columns in a picture minus 1") 1030 ("NumTileRowsMinus1", m_numTileRowsMinus1, 0, "Number of rows in a picture minus 1") 1031 ("TileColumnWidthArray", cfgColumnWidth, string(""), "Array containing tile column width values in units of LCU") 1032 ("TileRowHeightArray", cfgRowHeight, string(""), "Array containing tile row height values in units of LCU") 1033 ("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering") 1449 ("AMP", m_enableAMP, true, "Enable asymmetric motion partitions") 1450 ("CrossComponentPrediction", m_useCrossComponentPrediction, false, "Enable the use of cross-component prediction (not valid in V1 profiles)") 1451 ("ReconBasedCrossCPredictionEstimate", m_reconBasedCrossCPredictionEstimate, false, "When determining the alpha value for cross-component prediction, use the decoded residual rather than the pre-transform encoder-side residual") 1452 ("SaoLumaOffsetBitShift", saoOffsetBitShift[CHANNEL_TYPE_LUMA], 0, "Specify the luma SAO bit-shift. If negative, automatically calculate a suitable value based upon bit depth and initial QP") 1453 ("SaoChromaOffsetBitShift", saoOffsetBitShift[CHANNEL_TYPE_CHROMA], 0, "Specify the chroma SAO bit-shift. If negative, automatically calculate a suitable value based upon bit depth and initial QP") 1454 ("TransformSkip", m_useTransformSkip, false, "Intra transform skipping") 1455 ("TransformSkipFast", m_useTransformSkipFast, false, "Fast intra transform skipping") 1456 ("TransformSkipLog2MaxSize", m_transformSkipLog2MaxSize, 2U, "Specify transform-skip maximum size. Minimum 2. (not valid in V1 profiles)") 1457 ("ImplicitResidualDPCM", m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT], false, "Enable implicitly signalled residual DPCM for intra (also known as sample-adaptive intra predict) (not valid in V1 profiles)") 1458 ("ExplicitResidualDPCM", m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT], false, "Enable explicitly signalled residual DPCM for inter (not valid in V1 profiles)") 1459 ("ResidualRotation", m_useResidualRotation, false, "Enable rotation of transform-skipped and transquant-bypassed TUs through 180 degrees prior to entropy coding (not valid in V1 profiles)") 1460 ("SingleSignificanceMapContext", m_useSingleSignificanceMapContext, false, "Enable, for transform-skipped and transquant-bypassed TUs, the selection of a single significance map context variable for all coefficients (not valid in V1 profiles)") 1461 ("GolombRiceParameterAdaptation", m_useGolombRiceParameterAdaptation, false, "Enable the adaptation of the Golomb-Rice parameter over the course of each slice") 1462 ("AlignCABACBeforeBypass", m_alignCABACBeforeBypass, false, "Align the CABAC engine to a defined fraction of a bit prior to coding bypass data. Must be 1 in high bit rate profile, 0 otherwise" ) 1463 ("SAO", m_bUseSAO, true, "Enable Sample Adaptive Offset") 1464 ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "Max number of SAO offset per picture (Default: 2048)") 1465 ("SAOLcuBoundary", m_saoCtuBoundary, false, "0: right/bottom CTU boundary areas skipped from SAO parameter estimation, 1: non-deblocked pixels are used for those areas") 1466 ("SliceMode", m_sliceMode, 0, "0: Disable all Recon slice limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1467 ("SliceArgument", m_sliceArgument, 0, "Depending on SliceMode being:" 1468 "\t1: max number of CTUs per slice" 1469 "\t2: max number of bytes per slice" 1470 "\t3: max number of tiles per slice") 1471 ("SliceSegmentMode", m_sliceSegmentMode, 0, "0: Disable all slice segment limits, 1: Enforce max # of CTUs, 2: Enforce max # of bytes, 3:specify tiles per dependent slice") 1472 ("SliceSegmentArgument", m_sliceSegmentArgument, 0, "Depending on SliceSegmentMode being:" 1473 "\t1: max number of CTUs per slice segment" 1474 "\t2: max number of bytes per slice segment" 1475 "\t3: max number of tiles per slice segment") 1476 ("LFCrossSliceBoundaryFlag", m_bLFCrossSliceBoundaryFlag, true) 1477 1478 ("ConstrainedIntraPred", m_bUseConstrainedIntraPred, false, "Constrained Intra Prediction") 1479 ("PCMEnabledFlag", m_usePCM, false) 1480 ("PCMLog2MaxSize", m_pcmLog2MaxSize, 5u) 1481 ("PCMLog2MinSize", m_uiPCMLog2MinSize, 3u) 1482 1483 ("PCMInputBitDepthFlag", m_bPCMInputBitDepthFlag, true) 1484 ("PCMFilterDisableFlag", m_bPCMFilterDisableFlag, false) 1485 ("IntraReferenceSmoothing", m_enableIntraReferenceSmoothing, true, "0: Disable use of intra reference smoothing. 1: Enable use of intra reference smoothing (not valid in V1 profiles)") 1486 ("WeightedPredP,-wpP", m_useWeightedPred, false, "Use weighted prediction in P slices") 1487 ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") 1488 ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") 1489 //deprecated copies of renamed tile parameters 1490 ("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing") 1491 ("ColumnWidthArray", cfg_ColumnWidth, cfg_ColumnWidth, "deprecated alias of TileColumnWidthArray") 1492 ("RowHeightArray", cfg_RowHeight, cfg_RowHeight, "deprecated alias of TileRowHeightArray") 1493 1494 ("TileUniformSpacing", m_tileUniformSpacingFlag, false, "Indicates that tile columns and rows are distributed uniformly") 1495 ("NumTileColumnsMinus1", m_numTileColumnsMinus1, 0, "Number of tile columns in a picture minus 1") 1496 ("NumTileRowsMinus1", m_numTileRowsMinus1, 0, "Number of rows in a picture minus 1") 1497 ("TileColumnWidthArray", cfg_ColumnWidth, cfg_ColumnWidth, "Array containing tile column width values in units of CTU") 1498 ("TileRowHeightArray", cfg_RowHeight, cfg_RowHeight, "Array containing tile row height values in units of CTU") 1499 ("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering") 1034 1500 #if SVC_EXTENSION 1035 ("WaveFrontSynchro%d", cfg_waveFrontSynchro, 0, MAX_LAYERS, "0: no synchro; 1 synchro with TR; 2 TRR etc") 1036 #else 1037 ("WaveFrontSynchro", m_iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with TR; 2 TRR etc") 1038 #endif 1039 ("ScalingList", m_useScalingListId, 0, "0: no scaling list, 1: default scaling lists, 2: scaling lists specified in ScalingListFile") 1040 ("ScalingListFile", cfg_ScalingListFile, string(""), "Scaling list file name") 1041 ("SignHideFlag,-SBH", m_signHideFlag, 1) 1042 ("MaxNumMergeCand", m_maxNumMergeCand, 5u, "Maximum number of merge candidates") 1043 1501 ("WaveFrontSynchro%d", cfg_waveFrontSynchro, 0, MAX_LAYERS, "0: no synchro; 1 synchro with TR; 2 TRR etc") 1502 #else 1503 ("WaveFrontSynchro", m_iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with top-right-right") 1504 #endif 1505 ("ScalingList", m_useScalingListId, SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile") 1506 ("ScalingListFile", cfg_ScalingListFile, string(""), "Scaling list file name. Use an empty string to produce help.") 1507 ("SignHideFlag,-SBH", m_signHideFlag, 1) 1508 ("MaxNumMergeCand", m_maxNumMergeCand, 5u, "Maximum number of merge candidates") 1044 1509 /* Misc. */ 1045 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled,0, "Control generation of decode picture hash SEI messages\n"1046 "\t3: checksum\n"1047 "\t2: CRC\n"1048 "\t1: use MD5\n"1049 "\t0: disable")1050 ("SEIpictureDigest", m_decodedPictureHashSEIEnabled,0, "deprecated alias for SEIDecodedPictureHash")1051 ("TMVPMode", m_TMVPModeId,1, "TMVP mode 0: TMVP disable for all slices. 1: TMVP enable for all slices (default) 2: TMVP enable for certain slices only")1052 ("FEN", m_bUseFastEnc,false, "fast encoder setting")1053 ("ECU", m_bUseEarlyCU, false, "Early CU setting")1054 ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost")1055 ("CFM", m_bUseCbfFastMode,false, "Cbf fast mode setting")1056 ("ESD", m_useEarlySkipDetection,false, "Early SKIP detection setting")1510 ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 0, "Control generation of decode picture hash SEI messages\n" 1511 "\t3: checksum\n" 1512 "\t2: CRC\n" 1513 "\t1: use MD5\n" 1514 "\t0: disable") 1515 ("SEIpictureDigest", m_decodedPictureHashSEIEnabled, 0, "deprecated alias for SEIDecodedPictureHash") 1516 ("TMVPMode", m_TMVPModeId, 1, "TMVP mode 0: TMVP disable for all slices. 1: TMVP enable for all slices (default) 2: TMVP enable for certain slices only") 1517 ("FEN", m_bUseFastEnc, false, "fast encoder setting") 1518 ("ECU", m_bUseEarlyCU, false, "Early CU setting") 1519 ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost") 1520 ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting") 1521 ("ESD", m_useEarlySkipDetection, false, "Early SKIP detection setting") 1057 1522 #if FAST_INTRA_SHVC 1058 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC")1523 ("FIS", m_useFastIntraScalable, false, "Fast Intra Decision for Scalable HEVC") 1059 1524 #endif 1060 1525 #if RC_SHVC_HARMONIZATION 1061 ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d") 1062 ("TargetBitrate%d", cfg_RCTargetBitRate, 0, MAX_LAYERS, "Rate control: target bitrate for layer %d") 1063 ("KeepHierarchicalBit%d", cfg_RCKeepHierarchicalBit, false, MAX_LAYERS, "Rate control: keep hierarchical bit allocation for layer %d") 1064 ("LCULevelRateControl%d", cfg_RCLCULevelRC, true, MAX_LAYERS, "Rate control: LCU level RC") 1065 ("RCLCUSeparateModel%d", cfg_RCUseLCUSeparateModel, true, MAX_LAYERS, "Rate control: Use LCU level separate R-lambda model") 1066 ("InitialQP%d", cfg_RCInitialQP, 0, MAX_LAYERS, "Rate control: initial QP") 1067 ("RCForceIntraQP%d", cfg_RCForceIntraQP, false, MAX_LAYERS, "Rate control: force intra QP to be equal to initial QP") 1068 #else 1069 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 1070 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bitrate" ) 1071 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 1072 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: LCU level RC; false: picture level RC" ) 1073 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use LCU level separate R-lambda model" ) 1074 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 1075 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 1076 #endif 1077 1078 ("TransquantBypassEnableFlag", m_TransquantBypassEnableFlag, false, "transquant_bypass_enable_flag indicator in PPS") 1079 ("CUTransquantBypassFlagForce", m_CUTransquantBypassFlagForce, false, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled") 1080 ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case") 1081 ("StrongIntraSmoothing,-sis", m_useStrongIntraSmoothing, true, "Enable strong intra smoothing for 32x32 blocks") 1082 ("SEIActiveParameterSets", m_activeParameterSetsSEIEnabled, 0, "Enable generation of active parameter sets SEI messages") 1083 ("VuiParametersPresent,-vui", m_vuiParametersPresentFlag, false, "Enable generation of vui_parameters()") 1084 ("AspectRatioInfoPresent", m_aspectRatioInfoPresentFlag, false, "Signals whether aspect_ratio_idc is present") 1085 ("AspectRatioIdc", m_aspectRatioIdc, 0, "aspect_ratio_idc") 1086 ("SarWidth", m_sarWidth, 0, "horizontal size of the sample aspect ratio") 1087 ("SarHeight", m_sarHeight, 0, "vertical size of the sample aspect ratio") 1088 ("OverscanInfoPresent", m_overscanInfoPresentFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n") 1089 ("OverscanAppropriate", m_overscanAppropriateFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n") 1090 ("VideoSignalTypePresent", m_videoSignalTypePresentFlag, false, "Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present") 1091 ("VideoFormat", m_videoFormat, 5, "Indicates representation of pictures") 1092 ("VideoFullRange", m_videoFullRangeFlag, false, "Indicates the black level and range of luma and chroma signals") 1093 ("ColourDescriptionPresent", m_colourDescriptionPresentFlag, false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present") 1094 ("ColourPrimaries", m_colourPrimaries, 2, "Indicates chromaticity coordinates of the source primaries") 1095 ("TransferCharacteristics", m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source") 1096 ("MatrixCoefficients", m_matrixCoefficients, 2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries") 1097 ("ChromaLocInfoPresent", m_chromaLocInfoPresentFlag, false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present") 1098 ("ChromaSampleLocTypeTopField", m_chromaSampleLocTypeTopField, 0, "Specifies the location of chroma samples for top field") 1099 ("ChromaSampleLocTypeBottomField", m_chromaSampleLocTypeBottomField, 0, "Specifies the location of chroma samples for bottom field") 1100 ("NeutralChromaIndication", m_neutralChromaIndicationFlag, false, "Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1)") 1101 ("DefaultDisplayWindowFlag", m_defaultDisplayWindowFlag, false, "Indicates the presence of the Default Window parameters") 1102 ("DefDispWinLeftOffset", m_defDispWinLeftOffset, 0, "Specifies the left offset of the default display window from the conformance window") 1103 ("DefDispWinRightOffset", m_defDispWinRightOffset, 0, "Specifies the right offset of the default display window from the conformance window") 1104 ("DefDispWinTopOffset", m_defDispWinTopOffset, 0, "Specifies the top offset of the default display window from the conformance window") 1105 ("DefDispWinBottomOffset", m_defDispWinBottomOffset, 0, "Specifies the bottom offset of the default display window from the conformance window") 1106 ("FrameFieldInfoPresentFlag", m_frameFieldInfoPresentFlag, false, "Indicates that pic_struct and field coding related values are present in picture timing SEI messages") 1107 ("PocProportionalToTimingFlag", m_pocProportionalToTimingFlag, false, "Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS") 1108 ("NumTicksPocDiffOneMinus1", m_numTicksPocDiffOneMinus1, 0, "Number of ticks minus 1 that for a POC difference of one") 1109 ("BitstreamRestriction", m_bitstreamRestrictionFlag, false, "Signals whether bitstream restriction parameters are present") 1110 ("TilesFixedStructure", m_tilesFixedStructureFlag, false, "Indicates that each active picture parameter set has the same values of the syntax elements related to tiles") 1111 ("MotionVectorsOverPicBoundaries", m_motionVectorsOverPicBoundariesFlag, false, "Indicates that no samples outside the picture boundaries are used for inter prediction") 1112 ("MaxBytesPerPicDenom", m_maxBytesPerPicDenom, 2, "Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture") 1113 ("MaxBitsPerMinCuDenom", m_maxBitsPerMinCuDenom, 1, "Indicates an upper bound for the number of bits of coding_unit() data") 1114 ("Log2MaxMvLengthHorizontal", m_log2MaxMvLengthHorizontal, 15, "Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units") 1115 ("Log2MaxMvLengthVertical", m_log2MaxMvLengthVertical, 15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units") 1116 ("SEIRecoveryPoint", m_recoveryPointSEIEnabled, 0, "Control generation of recovery point SEI messages") 1117 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 1118 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 1119 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 1120 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") 1121 ("SEIToneMapCancelFlag", m_toneMapCancelFlag, false, "Indicates that Tone Mapping SEI message cancels the persistance or follows") 1122 ("SEIToneMapPersistenceFlag", m_toneMapPersistenceFlag, true, "Specifies the persistence of the Tone Mapping SEI message") 1123 ("SEIToneMapCodedDataBitDepth", m_toneMapCodedDataBitDepth, 8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages") 1124 ("SEIToneMapTargetBitDepth", m_toneMapTargetBitDepth, 8, "Specifies Output BitDepth of Tome mapping function") 1125 ("SEIToneMapModelId", m_toneMapModelId, 0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n" 1126 "\t0: linear mapping with clipping\n" 1127 "\t1: sigmoidal mapping\n" 1128 "\t2: user-defined table mapping\n" 1129 "\t3: piece-wise linear mapping\n" 1130 "\t4: luminance dynamic range information ") 1131 ("SEIToneMapMinValue", m_toneMapMinValue, 0, "Specifies the minimum value in mode 0") 1132 ("SEIToneMapMaxValue", m_toneMapMaxValue, 1023, "Specifies the maxmum value in mode 0") 1133 ("SEIToneMapSigmoidMidpoint", m_sigmoidMidpoint, 512, "Specifies the centre point in mode 1") 1134 ("SEIToneMapSigmoidWidth", m_sigmoidWidth, 960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1") 1135 ("SEIToneMapStartOfCodedInterval", cfg_startOfCodedInterval, string(""), "Array of user-defined mapping table") 1136 ("SEIToneMapNumPivots", m_numPivots, 0, "Specifies the number of pivot points in mode 3") 1137 ("SEIToneMapCodedPivotValue", cfg_codedPivotValue, string(""), "Array of pivot point") 1138 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, string(""), "Array of pivot point") 1139 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 1140 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 1141 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 1142 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the cameran of Extended_ISO") 1143 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 1144 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") 1145 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue") 1146 ("SEIToneMapRefScreenLuminanceWhite", m_refScreenLuminanceWhite, 350, "Specifies reference screen brightness setting in units of candela per square metre") 1147 ("SEIToneMapExtendedRangeWhiteLevel", m_extendedRangeWhiteLevel, 800, "Indicates the luminance dynamic range") 1148 ("SEIToneMapNominalBlackLevelLumaCodeValue", m_nominalBlackLevelLumaCodeValue, 16, "Specifies luma sample value of the nominal black level assigned decoded pictures") 1149 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 1150 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 1151 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 1152 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" 1153 "\t0: checkerboard - pixels alternatively represent either frames\n" 1154 "\t1: column alternation - frames are interlaced by column\n" 1155 "\t2: row alternation - frames are interlaced by row\n" 1156 "\t3: side by side - frames are displayed horizontally\n" 1157 "\t4: top bottom - frames are displayed vertically\n" 1158 "\t5: frame alternation - one frame is alternated with the other") 1159 ("SEIFramePackingId", m_framePackingSEIId, 0, "Id of frame packing SEI message for a given session") 1160 ("SEIFramePackingQuincunx", m_framePackingSEIQuincunx, 0, "Indicate the presence of a Quincunx type video frame") 1161 ("SEIFramePackingInterpretation", m_framePackingSEIInterpretation, 0, "Indicate the interpretation of the frame pair\n" 1162 "\t0: unspecified\n" 1163 "\t1: stereo pair, frame0 represents left view\n" 1164 "\t2: stereo pair, frame0 represents right view") 1165 ("SEIDisplayOrientation", m_displayOrientationSEIAngle, 0, "Control generation of display orientation SEI messages\n" 1166 "\tN: 0 < N < (2^16 - 1) enable display orientation SEI message with anticlockwise_rotation = N and display_orientation_repetition_period = 1\n" 1167 "\t0: disable") 1168 ("SEITemporalLevel0Index", m_temporalLevel0IndexSEIEnabled, 0, "Control generation of temporal level 0 index SEI messages") 1169 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 1170 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 1526 ("RateControl%d", cfg_RCEnableRateControl, false, MAX_LAYERS, "Rate control: enable rate control for layer %d") 1527 ("TargetBitrate%d", cfg_RCTargetBitRate, 0, MAX_LAYERS, "Rate control: target bitrate for layer %d") 1528 ("KeepHierarchicalBit%d", cfg_RCKeepHierarchicalBit, false, MAX_LAYERS, "Rate control: keep hierarchical bit allocation for layer %d") 1529 ("LCULevelRateControl%d", cfg_RCLCULevelRC, true, MAX_LAYERS, "Rate control: LCU level RC") 1530 ("RCLCUSeparateModel%d", cfg_RCUseLCUSeparateModel, true, MAX_LAYERS, "Rate control: Use LCU level separate R-lambda model") 1531 ("InitialQP%d", cfg_RCInitialQP, 0, MAX_LAYERS, "Rate control: initial QP") 1532 ("RCForceIntraQP%d", cfg_RCForceIntraQP, false, MAX_LAYERS, "Rate control: force intra QP to be equal to initial QP") 1533 #else 1534 ( "RateControl", m_RCEnableRateControl, false, "Rate control: enable rate control" ) 1535 ( "TargetBitrate", m_RCTargetBitrate, 0, "Rate control: target bit-rate" ) 1536 ( "KeepHierarchicalBit", m_RCKeepHierarchicalBit, 0, "Rate control: 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation" ) 1537 ( "LCULevelRateControl", m_RCLCULevelRC, true, "Rate control: true: CTU level RC; false: picture level RC" ) 1538 ( "RCLCUSeparateModel", m_RCUseLCUSeparateModel, true, "Rate control: use CTU level separate R-lambda model" ) 1539 ( "InitialQP", m_RCInitialQP, 0, "Rate control: initial QP" ) 1540 ( "RCForceIntraQP", m_RCForceIntraQP, false, "Rate control: force intra QP to be equal to initial QP" ) 1541 #endif 1542 1543 ("TransquantBypassEnableFlag", m_TransquantBypassEnableFlag, false, "transquant_bypass_enable_flag indicator in PPS") 1544 ("CUTransquantBypassFlagForce", m_CUTransquantBypassFlagForce, false, "Force transquant bypass mode, when transquant_bypass_enable_flag is enabled") 1545 ("CostMode", m_costMode, COST_STANDARD_LOSSY, "Use alternative cost functions: choose between 'lossy', 'sequence_level_lossless', 'lossless' (which forces QP to " MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP) ") and 'mixed_lossless_lossy' (which used QP'=" MACRO_TO_STRING(LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME) " for pre-estimates of transquant-bypass blocks).") 1546 ("RecalculateQPAccordingToLambda", m_recalculateQPAccordingToLambda, false, "Recalculate QP values according to lambda values. Do not suggest to be enabled in all intra case") 1547 ("StrongIntraSmoothing,-sis", m_useStrongIntraSmoothing, true, "Enable strong intra smoothing for 32x32 blocks") 1548 ("SEIActiveParameterSets", m_activeParameterSetsSEIEnabled, 0, "Enable generation of active parameter sets SEI messages") 1549 ("VuiParametersPresent,-vui", m_vuiParametersPresentFlag, false, "Enable generation of vui_parameters()") 1550 ("AspectRatioInfoPresent", m_aspectRatioInfoPresentFlag, false, "Signals whether aspect_ratio_idc is present") 1551 ("AspectRatioIdc", m_aspectRatioIdc, 0, "aspect_ratio_idc") 1552 ("SarWidth", m_sarWidth, 0, "horizontal size of the sample aspect ratio") 1553 ("SarHeight", m_sarHeight, 0, "vertical size of the sample aspect ratio") 1554 ("OverscanInfoPresent", m_overscanInfoPresentFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n") 1555 ("OverscanAppropriate", m_overscanAppropriateFlag, false, "Indicates whether conformant decoded pictures are suitable for display using overscan\n") 1556 ("VideoSignalTypePresent", m_videoSignalTypePresentFlag, false, "Signals whether video_format, video_full_range_flag, and colour_description_present_flag are present") 1557 ("VideoFormat", m_videoFormat, 5, "Indicates representation of pictures") 1558 ("VideoFullRange", m_videoFullRangeFlag, false, "Indicates the black level and range of luma and chroma signals") 1559 ("ColourDescriptionPresent", m_colourDescriptionPresentFlag, false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present") 1560 ("ColourPrimaries", m_colourPrimaries, 2, "Indicates chromaticity coordinates of the source primaries") 1561 ("TransferCharacteristics", m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source") 1562 ("MatrixCoefficients", m_matrixCoefficients, 2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries") 1563 ("ChromaLocInfoPresent", m_chromaLocInfoPresentFlag, false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present") 1564 ("ChromaSampleLocTypeTopField", m_chromaSampleLocTypeTopField, 0, "Specifies the location of chroma samples for top field") 1565 ("ChromaSampleLocTypeBottomField", m_chromaSampleLocTypeBottomField, 0, "Specifies the location of chroma samples for bottom field") 1566 ("NeutralChromaIndication", m_neutralChromaIndicationFlag, false, "Indicates that the value of all decoded chroma samples is equal to 1<<(BitDepthCr-1)") 1567 ("DefaultDisplayWindowFlag", m_defaultDisplayWindowFlag, false, "Indicates the presence of the Default Window parameters") 1568 ("DefDispWinLeftOffset", m_defDispWinLeftOffset, 0, "Specifies the left offset of the default display window from the conformance window") 1569 ("DefDispWinRightOffset", m_defDispWinRightOffset, 0, "Specifies the right offset of the default display window from the conformance window") 1570 ("DefDispWinTopOffset", m_defDispWinTopOffset, 0, "Specifies the top offset of the default display window from the conformance window") 1571 ("DefDispWinBottomOffset", m_defDispWinBottomOffset, 0, "Specifies the bottom offset of the default display window from the conformance window") 1572 ("FrameFieldInfoPresentFlag", m_frameFieldInfoPresentFlag, false, "Indicates that pic_struct and field coding related values are present in picture timing SEI messages") 1573 ("PocProportionalToTimingFlag", m_pocProportionalToTimingFlag, false, "Indicates that the POC value is proportional to the output time w.r.t. first picture in CVS") 1574 ("NumTicksPocDiffOneMinus1", m_numTicksPocDiffOneMinus1, 0, "Number of ticks minus 1 that for a POC difference of one") 1575 ("BitstreamRestriction", m_bitstreamRestrictionFlag, false, "Signals whether bitstream restriction parameters are present") 1576 ("TilesFixedStructure", m_tilesFixedStructureFlag, false, "Indicates that each active picture parameter set has the same values of the syntax elements related to tiles") 1577 ("MotionVectorsOverPicBoundaries", m_motionVectorsOverPicBoundariesFlag, false, "Indicates that no samples outside the picture boundaries are used for inter prediction") 1578 ("MaxBytesPerPicDenom", m_maxBytesPerPicDenom, 2, "Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units associated with any coded picture") 1579 ("MaxBitsPerMinCuDenom", m_maxBitsPerMinCuDenom, 1, "Indicates an upper bound for the number of bits of coding_unit() data") 1580 ("Log2MaxMvLengthHorizontal", m_log2MaxMvLengthHorizontal, 15, "Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units") 1581 ("Log2MaxMvLengthVertical", m_log2MaxMvLengthVertical, 15, "Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units") 1582 ("SEIRecoveryPoint", m_recoveryPointSEIEnabled, 0, "Control generation of recovery point SEI messages") 1583 ("SEIBufferingPeriod", m_bufferingPeriodSEIEnabled, 0, "Control generation of buffering period SEI messages") 1584 ("SEIPictureTiming", m_pictureTimingSEIEnabled, 0, "Control generation of picture timing SEI messages") 1585 ("SEIToneMappingInfo", m_toneMappingInfoSEIEnabled, false, "Control generation of Tone Mapping SEI messages") 1586 ("SEIToneMapId", m_toneMapId, 0, "Specifies Id of Tone Mapping SEI message for a given session") 1587 ("SEIToneMapCancelFlag", m_toneMapCancelFlag, false, "Indicates that Tone Mapping SEI message cancels the persistence or follows") 1588 ("SEIToneMapPersistenceFlag", m_toneMapPersistenceFlag, true, "Specifies the persistence of the Tone Mapping SEI message") 1589 ("SEIToneMapCodedDataBitDepth", m_toneMapCodedDataBitDepth, 8, "Specifies Coded Data BitDepth of Tone Mapping SEI messages") 1590 ("SEIToneMapTargetBitDepth", m_toneMapTargetBitDepth, 8, "Specifies Output BitDepth of Tone mapping function") 1591 ("SEIToneMapModelId", m_toneMapModelId, 0, "Specifies Model utilized for mapping coded data into target_bit_depth range\n" 1592 "\t0: linear mapping with clipping\n" 1593 "\t1: sigmoidal mapping\n" 1594 "\t2: user-defined table mapping\n" 1595 "\t3: piece-wise linear mapping\n" 1596 "\t4: luminance dynamic range information ") 1597 ("SEIToneMapMinValue", m_toneMapMinValue, 0, "Specifies the minimum value in mode 0") 1598 ("SEIToneMapMaxValue", m_toneMapMaxValue, 1023, "Specifies the maximum value in mode 0") 1599 ("SEIToneMapSigmoidMidpoint", m_sigmoidMidpoint, 512, "Specifies the centre point in mode 1") 1600 ("SEIToneMapSigmoidWidth", m_sigmoidWidth, 960, "Specifies the distance between 5% and 95% values of the target_bit_depth in mode 1") 1601 ("SEIToneMapStartOfCodedInterval", cfg_startOfCodedInterval, cfg_startOfCodedInterval, "Array of user-defined mapping table") 1602 ("SEIToneMapNumPivots", m_numPivots, 0, "Specifies the number of pivot points in mode 3") 1603 ("SEIToneMapCodedPivotValue", cfg_codedPivotValue, cfg_codedPivotValue, "Array of pivot point") 1604 ("SEIToneMapTargetPivotValue", cfg_targetPivotValue, cfg_targetPivotValue, "Array of pivot point") 1605 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 1606 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 1607 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 1608 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the camera of Extended_ISO") 1609 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 1610 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") 1611 ("SEIToneMapExposureCompensationValueDenomIdc", m_exposureCompensationValueDenomIdc, 2, "Specifies the denominator of ExposureCompensationValue") 1612 ("SEIToneMapRefScreenLuminanceWhite", m_refScreenLuminanceWhite, 350, "Specifies reference screen brightness setting in units of candela per square metre") 1613 ("SEIToneMapExtendedRangeWhiteLevel", m_extendedRangeWhiteLevel, 800, "Indicates the luminance dynamic range") 1614 ("SEIToneMapNominalBlackLevelLumaCodeValue", m_nominalBlackLevelLumaCodeValue, 16, "Specifies luma sample value of the nominal black level assigned decoded pictures") 1615 ("SEIToneMapNominalWhiteLevelLumaCodeValue", m_nominalWhiteLevelLumaCodeValue, 235, "Specifies luma sample value of the nominal white level assigned decoded pictures") 1616 ("SEIToneMapExtendedWhiteLevelLumaCodeValue", m_extendedWhiteLevelLumaCodeValue, 300, "Specifies luma sample value of the extended dynamic range assigned decoded pictures") 1617 ("SEIChromaSamplingFilterHint", m_chromaSamplingFilterSEIenabled, false, "Control generation of the chroma sampling filter hint SEI message") 1618 ("SEIChromaSamplingHorizontalFilterType", m_chromaSamplingHorFilterIdc, 2, "Defines the Index of the chroma sampling horizontal filter\n" 1619 "\t0: unspecified - Chroma filter is unknown or is determined by the application" 1620 "\t1: User-defined - Filter coefficients are specified in the chroma sampling filter hint SEI message" 1621 "\t2: Standards-defined - ITU-T Rec. T.800 | ISO/IEC15444-1, 5/3 filter") 1622 ("SEIChromaSamplingVerticalFilterType", m_chromaSamplingVerFilterIdc, 2, "Defines the Index of the chroma sampling vertical filter\n" 1623 "\t0: unspecified - Chroma filter is unknown or is determined by the application" 1624 "\t1: User-defined - Filter coefficients are specified in the chroma sampling filter hint SEI message" 1625 "\t2: Standards-defined - ITU-T Rec. T.800 | ISO/IEC15444-1, 5/3 filter") 1626 ("SEIFramePacking", m_framePackingSEIEnabled, 0, "Control generation of frame packing SEI messages") 1627 ("SEIFramePackingType", m_framePackingSEIType, 0, "Define frame packing arrangement\n" 1628 "\t3: side by side - frames are displayed horizontally\n" 1629 "\t4: top bottom - frames are displayed vertically\n" 1630 "\t5: frame alternation - one frame is alternated with the other") 1631 ("SEIFramePackingId", m_framePackingSEIId, 0, "Id of frame packing SEI message for a given session") 1632 ("SEIFramePackingQuincunx", m_framePackingSEIQuincunx, 0, "Indicate the presence of a Quincunx type video frame") 1633 ("SEIFramePackingInterpretation", m_framePackingSEIInterpretation, 0, "Indicate the interpretation of the frame pair\n" 1634 "\t0: unspecified\n" 1635 "\t1: stereo pair, frame0 represents left view\n" 1636 "\t2: stereo pair, frame0 represents right view") 1637 ("SEISegmentedRectFramePacking", m_segmentedRectFramePackingSEIEnabled, 0, "Controls generation of segmented rectangular frame packing SEI messages") 1638 ("SEISegmentedRectFramePackingCancel", m_segmentedRectFramePackingSEICancel, false, "If equal to 1, cancels the persistence of any previous SRFPA SEI message") 1639 ("SEISegmentedRectFramePackingType", m_segmentedRectFramePackingSEIType, 0, "Specifies the arrangement of the frames in the reconstructed picture") 1640 ("SEISegmentedRectFramePackingPersistence", m_segmentedRectFramePackingSEIPersistence, false, "If equal to 0, the SEI applies to the current frame only") 1641 ("SEIDisplayOrientation", m_displayOrientationSEIAngle, 0, "Control generation of display orientation SEI messages\n" 1642 "\tN: 0 < N < (2^16 - 1) enable display orientation SEI message with anticlockwise_rotation = N and display_orientation_repetition_period = 1\n" 1643 "\t0: disable") 1644 ("SEITemporalLevel0Index", m_temporalLevel0IndexSEIEnabled, 0, "Control generation of temporal level 0 index SEI messages") 1645 ("SEIGradualDecodingRefreshInfo", m_gradualDecodingRefreshInfoEnabled, 0, "Control generation of gradual decoding refresh information SEI message") 1646 ("SEINoDisplay", m_noDisplaySEITLayer, 0, "Control generation of no display SEI message\n" 1647 "\tN: 0 < N enable no display SEI message for temporal layer N or higher\n" 1648 "\t0: disable") 1649 ("SEIDecodingUnitInfo", m_decodingUnitInfoSEIEnabled, 0, "Control generation of decoding unit information SEI message.") 1171 1650 #if LAYERS_NOT_PRESENT_SEI 1172 ("SEILayersNotPresent", m_layersNotPresentSEIEnabled, 0, "Control generation of layers not present SEI message") 1173 #endif 1174 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 1175 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 1176 #if P0050_KNEE_FUNCTION_SEI 1177 ("SEIKneeFunctionInfo", m_kneeSEIEnabled, false, "Control generation of Knee function SEI messages") 1178 ("SEIKneeFunctionId", m_kneeSEIId, 0, "Specifies Id of Knee function SEI message for a given session") 1179 ("SEIKneeFunctionCancelFlag", m_kneeSEICancelFlag, false, "Indicates that Knee function SEI message cancels the persistance or follows") 1180 ("SEIKneeFunctionPersistenceFlag", m_kneeSEIPersistenceFlag, true, "Specifies the persistence of the Knee function SEI message") 1181 ("SEIKneeFunctionMappingFlag", m_kneeSEIMappingFlag, false, "Specifies the mapping mode of the Knee function SEI message") 1182 ("SEIKneeFunctionInputDrange", m_kneeSEIInputDrange, 1000, "Specifies the peak luminance level for the input picture of Knee function SEI messages") 1183 ("SEIKneeFunctionInputDispLuminance", m_kneeSEIInputDispLuminance, 100, "Specifies the expected display brightness for the input picture of Knee function SEI messages") 1184 ("SEIKneeFunctionOutputDrange", m_kneeSEIOutputDrange, 4000, "Specifies the peak luminance level for the output picture of Knee function SEI messages") 1185 ("SEIKneeFunctionOutputDispLuminance", m_kneeSEIOutputDispLuminance, 800, "Specifies the expected display brightness for the output picture of Knee function SEI messages") 1186 ("SEIKneeFunctionNumKneePointsMinus1", m_kneeSEINumKneePointsMinus1, 2, "Specifies the number of knee points - 1") 1187 ("SEIKneeFunctionInputKneePointValue", cfg_kneeSEIInputKneePointValue, string("600 800 900"), "Array of input knee point") 1188 ("SEIKneeFunctionOutputKneePointValue", cfg_kneeSEIOutputKneePointValue, string("100 250 450"), "Array of output knee point") 1189 #endif 1651 ("SEILayersNotPresent", m_layersNotPresentSEIEnabled, 0, "Control generation of layers not present SEI message") 1652 #endif 1653 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 1654 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 1655 ("SEITempMotionConstrainedTileSets", m_tmctsSEIEnabled, false, "Control generation of temporal motion constrained tile sets SEI message") 1656 ("SEITimeCodeEnabled", m_timeCodeSEIEnabled, false, "Control generation of time code information SEI message") 1657 ("SEITimeCodeNumClockTs", m_timeCodeSEINumTs, 0, "Number of clock time sets [0..3]") 1658 ("SEITimeCodeTimeStampFlag", cfg_timeCodeSeiTimeStampFlag, cfg_timeCodeSeiTimeStampFlag, "Time stamp flag associated to each time set") 1659 ("SEITimeCodeFieldBasedFlag", cfg_timeCodeSeiNumUnitFieldBasedFlag, cfg_timeCodeSeiNumUnitFieldBasedFlag, "Field based flag associated to each time set") 1660 ("SEITimeCodeCountingType", cfg_timeCodeSeiCountingType, cfg_timeCodeSeiCountingType, "Counting type associated to each time set") 1661 ("SEITimeCodeFullTsFlag", cfg_timeCodeSeiFullTimeStampFlag, cfg_timeCodeSeiFullTimeStampFlag, "Full time stamp flag associated to each time set") 1662 ("SEITimeCodeDiscontinuityFlag", cfg_timeCodeSeiDiscontinuityFlag, cfg_timeCodeSeiDiscontinuityFlag, "Discontinuity flag associated to each time set") 1663 ("SEITimeCodeCntDroppedFlag", cfg_timeCodeSeiCntDroppedFlag, cfg_timeCodeSeiCntDroppedFlag, "Counter dropped flag associated to each time set") 1664 ("SEITimeCodeNumFrames", cfg_timeCodeSeiNumberOfFrames, cfg_timeCodeSeiNumberOfFrames, "Number of frames associated to each time set") 1665 ("SEITimeCodeSecondsValue", cfg_timeCodeSeiSecondsValue, cfg_timeCodeSeiSecondsValue, "Seconds value for each time set") 1666 ("SEITimeCodeMinutesValue", cfg_timeCodeSeiMinutesValue, cfg_timeCodeSeiMinutesValue, "Minutes value for each time set") 1667 ("SEITimeCodeHoursValue", cfg_timeCodeSeiHoursValue, cfg_timeCodeSeiHoursValue, "Hours value for each time set") 1668 ("SEITimeCodeSecondsFlag", cfg_timeCodeSeiSecondsFlag, cfg_timeCodeSeiSecondsFlag, "Flag to signal seconds value presence in each time set") 1669 ("SEITimeCodeMinutesFlag", cfg_timeCodeSeiMinutesFlag, cfg_timeCodeSeiMinutesFlag, "Flag to signal minutes value presence in each time set") 1670 ("SEITimeCodeHoursFlag", cfg_timeCodeSeiHoursFlag, cfg_timeCodeSeiHoursFlag, "Flag to signal hours value presence in each time set") 1671 ("SEITimeCodeOffsetLength", cfg_timeCodeSeiTimeOffsetLength, cfg_timeCodeSeiTimeOffsetLength, "Time offset length associated to each time set") 1672 ("SEITimeCodeTimeOffset", cfg_timeCodeSeiTimeOffsetValue, cfg_timeCodeSeiTimeOffsetValue, "Time offset associated to each time set") 1673 ("SEIKneeFunctionInfo", m_kneeSEIEnabled, false, "Control generation of Knee function SEI messages") 1674 ("SEIKneeFunctionId", m_kneeSEIId, 0, "Specifies Id of Knee function SEI message for a given session") 1675 ("SEIKneeFunctionCancelFlag", m_kneeSEICancelFlag, false, "Indicates that Knee function SEI message cancels the persistence or follows") 1676 ("SEIKneeFunctionPersistenceFlag", m_kneeSEIPersistenceFlag, true, "Specifies the persistence of the Knee function SEI message") 1677 ("SEIKneeFunctionInputDrange", m_kneeSEIInputDrange, 1000, "Specifies the peak luminance level for the input picture of Knee function SEI messages") 1678 ("SEIKneeFunctionInputDispLuminance", m_kneeSEIInputDispLuminance, 100, "Specifies the expected display brightness for the input picture of Knee function SEI messages") 1679 ("SEIKneeFunctionOutputDrange", m_kneeSEIOutputDrange, 4000, "Specifies the peak luminance level for the output picture of Knee function SEI messages") 1680 ("SEIKneeFunctionOutputDispLuminance", m_kneeSEIOutputDispLuminance, 800, "Specifies the expected display brightness for the output picture of Knee function SEI messages") 1681 ("SEIKneeFunctionNumKneePointsMinus1", m_kneeSEINumKneePointsMinus1, 2, "Specifies the number of knee points - 1") 1682 ("SEIKneeFunctionInputKneePointValue", cfg_kneeSEIInputKneePointValue, cfg_kneeSEIInputKneePointValue, "Array of input knee point") 1683 ("SEIKneeFunctionOutputKneePointValue", cfg_kneeSEIOutputKneePointValue, cfg_kneeSEIOutputKneePointValue, "Array of output knee point") 1684 ("SEIMasteringDisplayColourVolume", m_masteringDisplay.colourVolumeSEIEnabled, false, "Control generation of mastering display colour volume SEI messages") 1685 ("SEIMasteringDisplayMaxLuminance", m_masteringDisplay.maxLuminance, 10000u, "Specifies the mastering display maximum luminance value in units of 1/10000 candela per square metre (32-bit code value)") 1686 ("SEIMasteringDisplayMinLuminance", m_masteringDisplay.minLuminance, 0u, "Specifies the mastering display minimum luminance value in units of 1/10000 candela per square metre (32-bit code value)") 1687 ("SEIMasteringDisplayPrimaries", cfg_DisplayPrimariesCode, cfg_DisplayPrimariesCode, "Mastering display primaries for all three colour planes in CIE xy coordinates in increments of 1/50000 (results in the ranges 0 to 50000 inclusive)") 1688 ("SEIMasteringDisplayWhitePoint", cfg_DisplayWhitePointCode, cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)") 1689 1190 1690 #if Q0096_OVERLAY_SEI 1191 1691 ("SEIOverlayInfo", m_overlaySEIEnabled, false, "Control generation of Selectable Overlays SEI messages") … … 1277 1777 #endif 1278 1778 ; 1279 1779 1280 1780 for(Int i=1; i<MAX_GOP+1; i++) { 1281 1781 std::ostringstream cOSS; … … 1318 1818 } 1319 1819 #endif 1320 1321 if(m_isField)1322 {1323 #if SVC_EXTENSION1324 for(Int layer = 0; layer < MAX_LAYERS; layer++)1325 {1326 //Frame height1327 m_acLayerCfg[layer].m_iSourceHeightOrg = m_acLayerCfg[layer].m_iSourceHeight;1328 //Field height1329 m_acLayerCfg[layer].m_iSourceHeight = m_acLayerCfg[layer].m_iSourceHeight >> 1;1330 }1331 #else1332 //Frame height1333 m_iSourceHeightOrg = m_iSourceHeight;1334 //Field height1335 m_iSourceHeight = m_iSourceHeight >> 1;1336 #endif1337 //number of fields to encode1338 m_framesToBeEncoded *= 2;1339 }1340 1820 1341 1821 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) … … 1343 1823 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); 1344 1824 } 1345 1825 1346 1826 if (argc == 1 || do_help) 1347 1827 { … … 1350 1830 return false; 1351 1831 } 1352 1832 1353 1833 /* 1354 1834 * Set any derived parameters … … 1378 1858 1379 1859 1380 Char* pColumnWidth = cfgColumnWidth.empty() ? NULL: strdup(cfgColumnWidth.c_str()); 1381 Char* pRowHeight = cfgRowHeight.empty() ? NULL : strdup(cfgRowHeight.c_str()); 1860 if(m_isField) 1861 { 1862 #if SVC_EXTENSION 1863 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1864 { 1865 //Frame height 1866 m_acLayerCfg[layer].m_iSourceHeightOrg = m_acLayerCfg[layer].m_iSourceHeight; 1867 //Field height 1868 m_acLayerCfg[layer].m_iSourceHeight = m_acLayerCfg[layer].m_iSourceHeight >> 1; 1869 } 1870 #else 1871 //Frame height 1872 m_iSourceHeightOrg = m_iSourceHeight; 1873 //Field height 1874 m_iSourceHeight = m_iSourceHeight >> 1; 1875 #endif 1876 //number of fields to encode 1877 m_framesToBeEncoded *= 2; 1878 } 1382 1879 1383 1880 if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) 1384 1881 { 1385 char *str; 1386 int i=0; 1387 m_tileColumnWidth.resize( m_numTileColumnsMinus1 ); 1388 str = strtok(pColumnWidth, " ,-"); 1389 while(str!=NULL) 1390 { 1391 if( i >= m_numTileColumnsMinus1 ) 1392 { 1393 printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1394 exit( EXIT_FAILURE ); 1395 } 1396 m_tileColumnWidth[i] = atoi( str ); 1397 str = strtok(NULL, " ,-"); 1398 i++; 1399 } 1400 if( i < m_numTileColumnsMinus1 ) 1882 if (cfg_ColumnWidth.values.size() > m_numTileColumnsMinus1) 1883 { 1884 printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 1885 exit( EXIT_FAILURE ); 1886 } 1887 else if (cfg_ColumnWidth.values.size() < m_numTileColumnsMinus1) 1401 1888 { 1402 1889 printf( "The width of some columns is not defined.\n" ); 1403 1890 exit( EXIT_FAILURE ); 1404 1891 } 1892 else 1893 { 1894 m_tileColumnWidth.resize(m_numTileColumnsMinus1); 1895 for(UInt i=0; i<cfg_ColumnWidth.values.size(); i++) 1896 m_tileColumnWidth[i]=cfg_ColumnWidth.values[i]; 1897 } 1405 1898 } 1406 1899 else … … 1411 1904 if( !m_tileUniformSpacingFlag && m_numTileRowsMinus1 > 0 ) 1412 1905 { 1413 char *str; 1414 int i=0; 1415 m_tileRowHeight.resize(m_numTileRowsMinus1); 1416 str = strtok(pRowHeight, " ,-"); 1417 while(str!=NULL) 1418 { 1419 if( i>=m_numTileRowsMinus1 ) 1420 { 1421 printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" ); 1422 exit( EXIT_FAILURE ); 1423 } 1424 m_tileRowHeight[i] = atoi( str ); 1425 str = strtok(NULL, " ,-"); 1426 i++; 1427 } 1428 if( i < m_numTileRowsMinus1 ) 1906 if (cfg_RowHeight.values.size() > m_numTileRowsMinus1) 1907 { 1908 printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" ); 1909 exit( EXIT_FAILURE ); 1910 } 1911 else if (cfg_RowHeight.values.size() < m_numTileRowsMinus1) 1429 1912 { 1430 1913 printf( "The height of some rows is not defined.\n" ); 1431 1914 exit( EXIT_FAILURE ); 1432 } 1915 } 1916 else 1917 { 1918 m_tileRowHeight.resize(m_numTileRowsMinus1); 1919 for(UInt i=0; i<cfg_RowHeight.values.size(); i++) 1920 m_tileRowHeight[i]=cfg_RowHeight.values[i]; 1921 } 1433 1922 } 1434 1923 else … … 1436 1925 m_tileRowHeight.clear(); 1437 1926 } 1927 1928 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 1929 1930 1931 1932 /* rules for input, output and internal bitdepths as per help text */ 1933 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1934 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1935 { 1936 m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_LUMA ]; 1937 m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; 1938 1939 if (m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1940 if (m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1941 if (m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1942 if (m_acLayerCfg[layer].m_outputBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_acLayerCfg[layer].m_outputBitDepth [CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1943 if (m_acLayerCfg[layer].m_outputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_CHROMA]; } 1944 1945 m_acLayerCfg[layer].m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1946 m_acLayerCfg[layer].m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1947 1948 m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false; 1949 m_acLayerCfg[layer].m_useExtendedPrecision = false; 1950 } 1951 #else 1952 /* rules for input, output and internal bitdepths as per help text */ 1953 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1954 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1955 if (m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1956 if (m_internalBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1957 if (m_inputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_inputBitDepth [CHANNEL_TYPE_CHROMA] = m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1958 if (m_outputBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_outputBitDepth [CHANNEL_TYPE_LUMA ] = m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } 1959 if (m_outputBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_outputBitDepth [CHANNEL_TYPE_CHROMA] = m_internalBitDepth [CHANNEL_TYPE_CHROMA]; } 1960 1961 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1962 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1963 #endif 1964 1965 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1966 for (Int layer = 0; layer < MAX_LAYERS; layer++) 1967 { 1968 if (m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd) 1969 { 1970 if (m_iGOPSize > 0 && (m_acLayerCfg[layer].m_layerSwitchOffBegin % m_iGOPSize) != 0) 1971 { 1972 printf("LayerSwitchOffBegin%d: Must be multiple of GOP size.\n", layer); 1973 exit(EXIT_FAILURE); 1974 } 1975 if (m_acLayerCfg[layer].m_iIntraPeriod > 0 && (m_acLayerCfg[layer].m_layerSwitchOffEnd % m_acLayerCfg[layer].m_iIntraPeriod) != 0) 1976 { 1977 printf("LayerSwitchOffEnd%d: Must be IRAP picture.\n", layer); 1978 exit(EXIT_FAILURE); 1979 } 1980 } 1981 } 1982 #endif 1983 1984 #if MULTIPLE_PTL_SUPPORT 1985 for( Int layer = 0; layer < MAX_LAYERS; layer++ ) 1986 { 1987 m_acLayerCfg[layer].m_bitDepthConstraint = tmpBitDepthConstraint; 1988 m_acLayerCfg[layer].m_intraConstraintFlag = tmpIntraConstraintFlag; 1989 m_acLayerCfg[layer].m_lowerBitRateConstraintFlag = tmpLowerBitRateConstraintFlag; 1990 1991 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 1992 { 1993 m_acLayerCfg[layer].m_saoOffsetBitShift[channelType] = 0; 1994 } 1995 1996 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; 1997 1998 if( extendedProfile[layerPTLIdx] >= 1000 && extendedProfile[layerPTLIdx] <= 2316 ) 1999 { 2000 m_profileList[layerPTLIdx] = Profile::MAINREXT; 2001 2002 if( m_acLayerCfg[layer].m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0) 2003 { 2004 fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n"); 2005 exit(EXIT_FAILURE); 2006 } 2007 m_acLayerCfg[layer].m_bitDepthConstraint = (extendedProfile[layerPTLIdx]%100); 2008 m_acLayerCfg[layer].m_intraConstraintFlag = (extendedProfile[layerPTLIdx]>=2000); 2009 switch ((extendedProfile[layerPTLIdx]/100)%10) 2010 { 2011 case 0: tmpConstraintChromaFormat=400; break; 2012 case 1: tmpConstraintChromaFormat=420; break; 2013 case 2: tmpConstraintChromaFormat=422; break; 2014 default: tmpConstraintChromaFormat=444; break; 2015 } 2016 } 2017 else 2018 { 2019 m_profileList[layerPTLIdx] = Profile::Name(extendedProfile[layerPTLIdx]); 2020 } 2021 2022 if( m_profileList[layerPTLIdx] == Profile::HIGHTHROUGHPUTREXT ) 2023 { 2024 if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 ) m_acLayerCfg[layer].m_bitDepthConstraint = 16; 2025 m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_444 : numberToChromaFormat(tmpConstraintChromaFormat); 2026 } 2027 else if( m_profileList[layerPTLIdx] == Profile::MAINREXT ) 2028 { 2029 if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 && tmpConstraintChromaFormat == 0 ) 2030 { 2031 // produce a valid combination, if possible. 2032 const Bool bUsingGeneralRExtTools = m_useResidualRotation || 2033 m_useSingleSignificanceMapContext || 2034 m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] || 2035 m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] || 2036 !m_enableIntraReferenceSmoothing || 2037 m_useGolombRiceParameterAdaptation || 2038 m_transformSkipLog2MaxSize!=2; 2039 const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0; 2040 const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_useExtendedPrecision; 2041 m_acLayerCfg[layer].m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 2042 automaticallySelectRExtProfile(bUsingGeneralRExtTools, 2043 bUsingChromaQPAdjustment, 2044 bUsingExtendedPrecision, 2045 m_acLayerCfg[layer].m_intraConstraintFlag, 2046 m_acLayerCfg[layer].m_bitDepthConstraint, 2047 m_acLayerCfg[layer].m_chromaFormatConstraint, 2048 m_acLayerCfg[layer].m_chromaFormatIDC==CHROMA_400 ? m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]), 2049 m_acLayerCfg[layer].m_chromaFormatIDC); 2050 } 2051 else if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 || tmpConstraintChromaFormat == 0) 2052 { 2053 fprintf(stderr, "Error: The bit depth and chroma format constraints must either both be specified or both be configured automatically\n"); 2054 exit(EXIT_FAILURE); 2055 } 2056 else 2057 { 2058 m_acLayerCfg[layer].m_chromaFormatConstraint = numberToChromaFormat(tmpConstraintChromaFormat); 2059 } 2060 } 2061 else 2062 { 2063 m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? m_acLayerCfg[layer].m_chromaFormatIDC : numberToChromaFormat(tmpConstraintChromaFormat); 2064 m_acLayerCfg[layer].m_bitDepthConstraint = (m_profileList[layerPTLIdx] == Profile::MAIN10 || m_profileList[layerPTLIdx] == Profile::SCALABLEMAIN10) ? 10 : 8; 2065 } 2066 } 2067 #else 2068 if (extendedProfile >= 1000 && extendedProfile <= 2316) 2069 { 2070 m_profile = Profile::MAINREXT; 2071 if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0) 2072 { 2073 fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n"); 2074 exit(EXIT_FAILURE); 2075 } 2076 m_bitDepthConstraint = (extendedProfile%100); 2077 m_intraConstraintFlag = (extendedProfile>=2000); 2078 switch ((extendedProfile/100)%10) 2079 { 2080 case 0: tmpConstraintChromaFormat=400; break; 2081 case 1: tmpConstraintChromaFormat=420; break; 2082 case 2: tmpConstraintChromaFormat=422; break; 2083 default: tmpConstraintChromaFormat=444; break; 2084 } 2085 } 2086 else 2087 { 2088 m_profile = Profile::Name(extendedProfile); 2089 } 2090 1438 2091 #if SVC_EXTENSION 1439 if( pColumnWidth ) 1440 { 1441 free( pColumnWidth ); 1442 pColumnWidth = NULL; 1443 } 1444 1445 if( pRowHeight ) 1446 { 1447 free( pRowHeight ); 1448 pRowHeight = NULL; 1449 } 1450 2092 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC; 2093 #endif 2094 2095 if (m_profile == Profile::HIGHTHROUGHPUTREXT ) 2096 { 2097 if (m_bitDepthConstraint == 0) m_bitDepthConstraint = 16; 2098 m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_444 : numberToChromaFormat(tmpConstraintChromaFormat); 2099 } 2100 else if (m_profile == Profile::MAINREXT) 2101 { 2102 if (m_bitDepthConstraint == 0 && tmpConstraintChromaFormat == 0) 2103 { 2104 #if SVC_EXTENSION 2105 Bool m_useExtendedPrecision = m_acLayerCfg[0].m_useExtendedPrecision; 2106 Int m_internalBitDepth[] = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 2107 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC; 2108 #endif 2109 // produce a valid combination, if possible. 2110 const Bool bUsingGeneralRExtTools = m_useResidualRotation || 2111 m_useSingleSignificanceMapContext || 2112 m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] || 2113 m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] || 2114 !m_enableIntraReferenceSmoothing || 2115 m_useGolombRiceParameterAdaptation || 2116 m_transformSkipLog2MaxSize!=2; 2117 const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0; 2118 const Bool bUsingExtendedPrecision = m_useExtendedPrecision; 2119 m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 2120 automaticallySelectRExtProfile(bUsingGeneralRExtTools, 2121 bUsingChromaQPAdjustment, 2122 bUsingExtendedPrecision, 2123 m_intraConstraintFlag, 2124 m_bitDepthConstraint, 2125 m_chromaFormatConstraint, 2126 m_chromaFormatIDC==CHROMA_400 ? m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA]), 2127 m_chromaFormatIDC); 2128 } 2129 else if (m_bitDepthConstraint == 0 || tmpConstraintChromaFormat == 0) 2130 { 2131 fprintf(stderr, "Error: The bit depth and chroma format constraints must either both be specified or both be configured automatically\n"); 2132 exit(EXIT_FAILURE); 2133 } 2134 else 2135 { 2136 m_chromaFormatConstraint = numberToChromaFormat(tmpConstraintChromaFormat); 2137 } 2138 } 2139 else 2140 { 2141 m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? m_chromaFormatIDC : numberToChromaFormat(tmpConstraintChromaFormat); 2142 m_bitDepthConstraint = (m_profile == Profile::MAIN10?10:8); 2143 } 2144 #endif 2145 2146 m_inputColourSpaceConvert = stringToInputColourSpaceConvert(inputColourSpaceConvert, true); 2147 2148 #if SVC_EXTENSION 1451 2149 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1452 2150 { 2151 #if !MULTIPLE_PTL_SUPPORT 2152 m_acLayerCfg[layer].m_chromaFormatConstraint = m_chromaFormatConstraint; 2153 m_acLayerCfg[layer].m_bitDepthConstraint = m_bitDepthConstraint; 2154 #endif 2155 1453 2156 // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified 1454 2157 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) … … 1471 2174 Bool phaseSetFlag = 1472 2175 strcmp(cfg_phaseHorLuma [layer].c_str(), "") || 1473 strcmp(cfg_phaseVerLuma [layer].c_str(), "") ||1474 strcmp(cfg_phaseHorChroma 2176 strcmp(cfg_phaseVerLuma [layer].c_str(), "") || 2177 strcmp(cfg_phaseHorChroma [layer].c_str(), "") || 1475 2178 strcmp(cfg_phaseVerChroma [layer].c_str(), ""); 1476 2179 assert( srloFlag || rroFlag || phaseSetFlag); … … 1820 2523 } 1821 2524 1822 #if AUXILIARY_PICTURES1823 for(UInt layer = 0; layer < MAX_LAYERS; layer++)1824 {1825 m_acLayerCfg[layer].m_InputChromaFormat = numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]);1826 m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormat ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer])));1827 }1828 #endif1829 2525 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1830 2526 { … … 1996 2692 } 1997 2693 #else 1998 Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr;1999 2694 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr] ); 2000 2695 #endif … … 2017 2712 (m_profileCompatibility[m_listOfLayerPTLofOlss[olsCtr][ii]] == m_profileList[m_listOfLayerPTLofOlss[olsCtr][ii - 1]]) ); 2018 2713 } 2019 } 2714 } 2020 2715 #if R0235_SMALLEST_LAYER_ID 2021 2716 } … … 2024 2719 } 2025 2720 #if MULTIPLE_PTL_SUPPORT 2026 m_listOfLayerPTLofOlss[0].push_back( m_layerPTLIdx[0]);2721 m_listOfLayerPTLofOlss[0].push_back(*cfg_layerPTLIdx[0]); 2027 2722 delete [] cfg_listOfLayerPTLOfOlss; 2028 2723 #endif … … 2031 2726 delete cfg_outputLayerSetIdx; 2032 2727 #endif 2033 #endif //SVC_EXTENSION 2034 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 2035 2036 /* rules for input, output and internal bitdepths as per help text */ 2037 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2038 for(Int layer = 0; layer < MAX_LAYERS; layer++) 2039 { 2040 if (!m_acLayerCfg[layer].m_internalBitDepthY) { m_acLayerCfg[layer].m_internalBitDepthY = m_acLayerCfg[layer].m_inputBitDepthY; } 2041 if (!m_acLayerCfg[layer].m_internalBitDepthC) { m_acLayerCfg[layer].m_internalBitDepthC = m_acLayerCfg[layer].m_internalBitDepthY; } 2042 if (!m_acLayerCfg[layer].m_inputBitDepthC) { m_acLayerCfg[layer].m_inputBitDepthC = m_acLayerCfg[layer].m_inputBitDepthY; } 2043 if (!m_acLayerCfg[layer].m_outputBitDepthY) { m_acLayerCfg[layer].m_outputBitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; } 2044 if (!m_acLayerCfg[layer].m_outputBitDepthC) { m_acLayerCfg[layer].m_outputBitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; } 2045 } 2046 #else 2047 if (!m_internalBitDepthY) { m_internalBitDepthY = m_inputBitDepthY; } 2048 if (!m_internalBitDepthC) { m_internalBitDepthC = m_internalBitDepthY; } 2049 if (!m_inputBitDepthC) { m_inputBitDepthC = m_inputBitDepthY; } 2050 if (!m_outputBitDepthY) { m_outputBitDepthY = m_internalBitDepthY; } 2051 if (!m_outputBitDepthC) { m_outputBitDepthC = m_internalBitDepthC; } 2052 #endif 2053 2054 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 2055 for (Int layer = 0; layer < MAX_LAYERS; layer++) 2056 { 2057 if (m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd) 2058 { 2059 if (m_iGOPSize > 0 && (m_acLayerCfg[layer].m_layerSwitchOffBegin % m_iGOPSize) != 0) 2060 { 2061 printf("LayerSwitchOffBegin%d: Must be multiple of GOP size.\n", layer); 2062 exit(EXIT_FAILURE); 2063 } 2064 if (m_acLayerCfg[layer].m_iIntraPeriod > 0 && (m_acLayerCfg[layer].m_layerSwitchOffEnd % m_acLayerCfg[layer].m_iIntraPeriod) != 0) 2065 { 2066 printf("LayerSwitchOffEnd%d: Must be IRAP picture.\n", layer); 2067 exit(EXIT_FAILURE); 2068 } 2069 } 2070 } 2071 #endif 2072 2073 #if !SVC_EXTENSION 2074 // TODO:ChromaFmt assumes 4:2:0 below 2728 #else //SVC_EXTENSION 2075 2729 switch (m_conformanceWindowMode) 2076 2730 { … … 2101 2755 } 2102 2756 } 2103 if (m_aiPad[0] % TComSPS::getWinUnitX( CHROMA_420) != 0)2757 if (m_aiPad[0] % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0) 2104 2758 { 2105 2759 fprintf(stderr, "Error: picture width is not an integer multiple of the specified chroma subsampling\n"); 2106 2760 exit(EXIT_FAILURE); 2107 2761 } 2108 if (m_aiPad[1] % TComSPS::getWinUnitY( CHROMA_420) != 0)2762 if (m_aiPad[1] % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0) 2109 2763 { 2110 2764 fprintf(stderr, "Error: picture height is not an integer multiple of the specified chroma subsampling\n"); … … 2137 2791 } 2138 2792 } 2139 2793 2140 2794 // allocate slice-based dQP values 2141 2795 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; 2142 2796 ::memset( m_aidQP, 0, sizeof(Int)*( m_framesToBeEncoded + m_iGOPSize + 1 ) ); 2143 2797 2144 2798 // handling of floating-point QP values 2145 2799 // if QP is not integer, sequence is split into two sections having QP and QP+1 … … 2148 2802 { 2149 2803 Int iSwitchPOC = (Int)( m_framesToBeEncoded - (m_fQP - m_iQP)*m_framesToBeEncoded + 0.5 ); 2150 2804 2151 2805 iSwitchPOC = (Int)( (Double)iSwitchPOC / m_iGOPSize + 0.5 )*m_iGOPSize; 2152 2806 for ( Int i=iSwitchPOC; i<m_framesToBeEncoded + m_iGOPSize + 1; i++ ) … … 2155 2809 } 2156 2810 } 2157 2811 2812 for(UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++) 2813 { 2814 if (saoOffsetBitShift[ch]<0) 2815 { 2816 if (m_internalBitDepth[ch]>10) 2817 { 2818 m_saoOffsetBitShift[ch]=UInt(Clip3<Int>(0, m_internalBitDepth[ch]-10, Int(m_internalBitDepth[ch]-10 + 0.165*m_iQP - 3.22 + 0.5) ) ); 2819 } 2820 else 2821 { 2822 m_saoOffsetBitShift[ch]=0; 2823 } 2824 } 2825 else 2826 { 2827 m_saoOffsetBitShift[ch]=UInt(saoOffsetBitShift[ch]); 2828 } 2829 } 2830 2158 2831 // reading external dQP description from file 2159 2832 if ( m_pchdQPFile ) … … 2175 2848 m_iWaveFrontSubstreams = m_iWaveFrontSynchro ? (m_iSourceHeight + m_uiMaxCUHeight - 1) / m_uiMaxCUHeight : 1; 2176 2849 #endif 2850 if( m_masteringDisplay.colourVolumeSEIEnabled ) 2851 { 2852 for(UInt idx=0; idx<6; idx++) 2853 { 2854 m_masteringDisplay.primaries[idx/2][idx%2] = UShort((cfg_DisplayPrimariesCode.values.size() > idx) ? cfg_DisplayPrimariesCode.values[idx] : 0); 2855 } 2856 for(UInt idx=0; idx<2; idx++) 2857 { 2858 m_masteringDisplay.whitePoint[idx] = UShort((cfg_DisplayWhitePointCode.values.size() > idx) ? cfg_DisplayWhitePointCode.values[idx] : 0); 2859 } 2860 } 2861 2177 2862 if( m_toneMappingInfoSEIEnabled && !m_toneMapCancelFlag ) 2178 2863 { 2179 Char* pcStartOfCodedInterval = cfg_startOfCodedInterval.empty() ? NULL: strdup(cfg_startOfCodedInterval.c_str()); 2180 Char* pcCodedPivotValue = cfg_codedPivotValue.empty() ? NULL: strdup(cfg_codedPivotValue.c_str()); 2181 Char* pcTargetPivotValue = cfg_targetPivotValue.empty() ? NULL: strdup(cfg_targetPivotValue.c_str()); 2182 if( m_toneMapModelId == 2 && pcStartOfCodedInterval ) 2183 { 2184 char *startOfCodedInterval; 2185 UInt num = 1u<< m_toneMapTargetBitDepth; 2864 if( m_toneMapModelId == 2 && !cfg_startOfCodedInterval.values.empty() ) 2865 { 2866 const UInt num = 1u<< m_toneMapTargetBitDepth; 2186 2867 m_startOfCodedInterval = new Int[num]; 2187 ::memset( m_startOfCodedInterval, 0, sizeof(Int)*num ); 2188 startOfCodedInterval = strtok(pcStartOfCodedInterval, " ."); 2189 int i = 0; 2190 while( startOfCodedInterval && ( i < num ) ) 2191 { 2192 m_startOfCodedInterval[i] = atoi( startOfCodedInterval ); 2193 startOfCodedInterval = strtok(NULL, " ."); 2194 i++; 2195 } 2196 } 2868 for(UInt i=0; i<num; i++) 2869 { 2870 m_startOfCodedInterval[i] = cfg_startOfCodedInterval.values.size() > i ? cfg_startOfCodedInterval.values[i] : 0; 2871 } 2872 } 2197 2873 else 2198 2874 { … … 2201 2877 if( ( m_toneMapModelId == 3 ) && ( m_numPivots > 0 ) ) 2202 2878 { 2203 if( pcCodedPivotValue && pcTargetPivotValue ) 2204 { 2205 char *codedPivotValue; 2206 char *targetPivotValue; 2207 m_codedPivotValue = new Int[m_numPivots]; 2879 if( !cfg_codedPivotValue.values.empty() && !cfg_targetPivotValue.values.empty() ) 2880 { 2881 m_codedPivotValue = new Int[m_numPivots]; 2208 2882 m_targetPivotValue = new Int[m_numPivots]; 2209 ::memset( m_codedPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 2210 ::memset( m_targetPivotValue, 0, sizeof(Int)*( m_numPivots ) ); 2211 codedPivotValue = strtok(pcCodedPivotValue, " ."); 2212 int i=0; 2213 while(codedPivotValue&&i<m_numPivots) 2883 for(UInt i=0; i<m_numPivots; i++) 2214 2884 { 2215 m_codedPivotValue[i] = atoi( codedPivotValue ); 2216 codedPivotValue = strtok(NULL, " ."); 2217 i++; 2218 } 2219 i=0; 2220 targetPivotValue = strtok(pcTargetPivotValue, " ."); 2221 while(targetPivotValue&&i<m_numPivots) 2222 { 2223 m_targetPivotValue[i]= atoi( targetPivotValue ); 2224 targetPivotValue = strtok(NULL, " ."); 2225 i++; 2885 m_codedPivotValue[i] = cfg_codedPivotValue.values.size() > i ? cfg_codedPivotValue.values [i] : 0; 2886 m_targetPivotValue[i] = cfg_targetPivotValue.values.size() > i ? cfg_targetPivotValue.values[i] : 0; 2226 2887 } 2227 2888 } … … 2232 2893 m_targetPivotValue = NULL; 2233 2894 } 2234 2235 if( pcStartOfCodedInterval ) 2236 { 2237 free( pcStartOfCodedInterval ); 2238 pcStartOfCodedInterval = NULL; 2239 } 2240 2241 if( pcCodedPivotValue ) 2242 { 2243 free( pcCodedPivotValue ); 2244 pcCodedPivotValue = NULL; 2245 } 2246 2247 if( pcTargetPivotValue ) 2248 { 2249 free( pcTargetPivotValue ); 2250 pcTargetPivotValue = NULL; 2251 } 2252 } 2253 #if P0050_KNEE_FUNCTION_SEI 2895 } 2896 2254 2897 if( m_kneeSEIEnabled && !m_kneeSEICancelFlag ) 2255 2898 { 2256 Char* pcInputKneePointValue = cfg_kneeSEIInputKneePointValue.empty() ? NULL : strdup(cfg_kneeSEIInputKneePointValue.c_str());2257 Char* pcOutputKneePointValue = cfg_kneeSEIOutputKneePointValue.empty() ? NULL : strdup(cfg_kneeSEIOutputKneePointValue.c_str());2258 2899 assert ( m_kneeSEINumKneePointsMinus1 >= 0 && m_kneeSEINumKneePointsMinus1 < 999 ); 2259 m_kneeSEIInputKneePoint = new Int[m_kneeSEINumKneePointsMinus1+1];2900 m_kneeSEIInputKneePoint = new Int[m_kneeSEINumKneePointsMinus1+1]; 2260 2901 m_kneeSEIOutputKneePoint = new Int[m_kneeSEINumKneePointsMinus1+1]; 2261 char *InputVal = strtok(pcInputKneePointValue, " .,"); 2262 Int i=0; 2263 while( InputVal && i<(m_kneeSEINumKneePointsMinus1+1) ) 2264 { 2265 m_kneeSEIInputKneePoint[i] = (UInt) atoi( InputVal ); 2266 InputVal = strtok(NULL, " .,"); 2267 i++; 2268 } 2269 char *OutputVal = strtok(pcOutputKneePointValue, " .,"); 2270 i=0; 2271 while( OutputVal && i<(m_kneeSEINumKneePointsMinus1+1) ) 2272 { 2273 m_kneeSEIOutputKneePoint[i] = (UInt) atoi( OutputVal ); 2274 OutputVal = strtok(NULL, " .,"); 2275 i++; 2276 } 2277 2278 if( pcInputKneePointValue ) 2279 { 2280 free( pcInputKneePointValue ); 2281 pcInputKneePointValue = NULL; 2282 } 2283 2284 if( pcOutputKneePointValue ) 2285 { 2286 free( pcOutputKneePointValue ); 2287 pcOutputKneePointValue = NULL; 2288 } 2289 } 2290 #endif 2902 for(Int i=0; i<(m_kneeSEINumKneePointsMinus1+1); i++) 2903 { 2904 m_kneeSEIInputKneePoint[i] = cfg_kneeSEIInputKneePointValue.values.size() > i ? cfg_kneeSEIInputKneePointValue.values[i] : 1; 2905 m_kneeSEIOutputKneePoint[i] = cfg_kneeSEIOutputKneePointValue.values.size() > i ? cfg_kneeSEIOutputKneePointValue.values[i] : 0; 2906 } 2907 } 2908 2909 if(m_timeCodeSEIEnabled) 2910 { 2911 for(Int i = 0; i < m_timeCodeSEINumTs && i < MAX_TIMECODE_SEI_SETS; i++) 2912 { 2913 m_timeSetArray[i].clockTimeStampFlag = cfg_timeCodeSeiTimeStampFlag .values.size()>i ? cfg_timeCodeSeiTimeStampFlag .values [i] : false; 2914 m_timeSetArray[i].numUnitFieldBasedFlag = cfg_timeCodeSeiNumUnitFieldBasedFlag.values.size()>i ? cfg_timeCodeSeiNumUnitFieldBasedFlag.values [i] : 0; 2915 m_timeSetArray[i].countingType = cfg_timeCodeSeiCountingType .values.size()>i ? cfg_timeCodeSeiCountingType .values [i] : 0; 2916 m_timeSetArray[i].fullTimeStampFlag = cfg_timeCodeSeiFullTimeStampFlag .values.size()>i ? cfg_timeCodeSeiFullTimeStampFlag .values [i] : 0; 2917 m_timeSetArray[i].discontinuityFlag = cfg_timeCodeSeiDiscontinuityFlag .values.size()>i ? cfg_timeCodeSeiDiscontinuityFlag .values [i] : 0; 2918 m_timeSetArray[i].cntDroppedFlag = cfg_timeCodeSeiCntDroppedFlag .values.size()>i ? cfg_timeCodeSeiCntDroppedFlag .values [i] : 0; 2919 m_timeSetArray[i].numberOfFrames = cfg_timeCodeSeiNumberOfFrames .values.size()>i ? cfg_timeCodeSeiNumberOfFrames .values [i] : 0; 2920 m_timeSetArray[i].secondsValue = cfg_timeCodeSeiSecondsValue .values.size()>i ? cfg_timeCodeSeiSecondsValue .values [i] : 0; 2921 m_timeSetArray[i].minutesValue = cfg_timeCodeSeiMinutesValue .values.size()>i ? cfg_timeCodeSeiMinutesValue .values [i] : 0; 2922 m_timeSetArray[i].hoursValue = cfg_timeCodeSeiHoursValue .values.size()>i ? cfg_timeCodeSeiHoursValue .values [i] : 0; 2923 m_timeSetArray[i].secondsFlag = cfg_timeCodeSeiSecondsFlag .values.size()>i ? cfg_timeCodeSeiSecondsFlag .values [i] : 0; 2924 m_timeSetArray[i].minutesFlag = cfg_timeCodeSeiMinutesFlag .values.size()>i ? cfg_timeCodeSeiMinutesFlag .values [i] : 0; 2925 m_timeSetArray[i].hoursFlag = cfg_timeCodeSeiHoursFlag .values.size()>i ? cfg_timeCodeSeiHoursFlag .values [i] : 0; 2926 m_timeSetArray[i].timeOffsetLength = cfg_timeCodeSeiTimeOffsetLength .values.size()>i ? cfg_timeCodeSeiTimeOffsetLength .values [i] : 0; 2927 m_timeSetArray[i].timeOffsetValue = cfg_timeCodeSeiTimeOffsetValue .values.size()>i ? cfg_timeCodeSeiTimeOffsetValue .values [i] : 0; 2928 } 2929 } 2291 2930 #if Q0096_OVERLAY_SEI 2292 2931 if( m_overlaySEIEnabled && !m_overlayInfoCancelFlag ) … … 2367 3006 #if !SVC_EXTENSION 2368 3007 // reading external Colour Remapping Information SEI message parameters from file 2369 if( m_colourRemapSEIFile .size() > 0)3008 if( m_colourRemapSEIFile ) 2370 3009 { 2371 3010 FILE* fic; … … 2373 3012 if((fic = fopen(m_colourRemapSEIFile.c_str(),"r")) == (FILE*)NULL) 2374 3013 { 2375 fprintf(stderr, "Can't open Colour Remapping Information SEI parameters file %s\n", m_colourRemapSEIFile .c_str());3014 fprintf(stderr, "Can't open Colour Remapping Information SEI parameters file %s\n", m_colourRemapSEIFile); 2376 3015 exit(EXIT_FAILURE); 2377 3016 } … … 2574 3213 #endif 2575 3214 // check validity of input parameters 3215 #if SVC_EXTENSION 3216 for( UInt layerId = 0; layerId < m_numLayers; layerId++ ) 3217 { 3218 xCheckParameter(layerId); 3219 } 3220 #else 2576 3221 xCheckParameter(); 2577 3222 #endif 3223 2578 3224 // set global varibles 2579 3225 #if LAYER_CTB … … 2588 3234 // print-out parameters 2589 3235 xPrintParameter(); 2590 3236 2591 3237 return true; 2592 3238 } 3239 3240 2593 3241 // ==================================================================================================================== 2594 3242 // Private member functions 2595 3243 // ==================================================================================================================== 2596 3244 2597 Bool confirmPara(Bool bflag, const Char* message); 2598 3245 #if SVC_EXTENSION 3246 Void TAppEncCfg::xCheckParameter(UInt layerId) 3247 { 3248 Bool m_useExtendedPrecision = m_acLayerCfg[layerId].m_useExtendedPrecision; 3249 Bool m_useHighPrecisionPredictionWeighting = m_acLayerCfg[layerId].m_useHighPrecisionPredictionWeighting; 3250 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerId].m_chromaFormatIDC; 3251 ChromaFormat m_chromaFormatConstraint = m_acLayerCfg[layerId].m_chromaFormatConstraint; 3252 ChromaFormat m_InputChromaFormatIDC = m_acLayerCfg[layerId].m_InputChromaFormatIDC; 3253 3254 Int m_inputBitDepth[] = {m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA]}; 3255 Int m_internalBitDepth[] = {m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 3256 Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]}; 3257 3258 m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]; 3259 m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]; 3260 3261 #if MULTIPLE_PTL_SUPPORT 3262 Int layerPTLIdx = m_acLayerCfg[layerId].m_layerPTLIdx; 3263 Profile::Name m_profile = m_profileList[layerPTLIdx]; 3264 UInt m_bitDepthConstraint = m_acLayerCfg[layerId].m_bitDepthConstraint; 3265 Bool m_intraConstraintFlag = m_acLayerCfg[layerId].m_intraConstraintFlag; 3266 Bool m_lowerBitRateConstraintFlag = m_acLayerCfg[layerId].m_lowerBitRateConstraintFlag; 3267 #endif 3268 #else 2599 3269 Void TAppEncCfg::xCheckParameter() 2600 3270 { 3271 #endif 3272 2601 3273 if (!m_decodedPictureHashSEIEnabled) 2602 3274 { … … 2607 3279 fprintf(stderr, "******************************************************************\n"); 2608 3280 } 2609 2610 3281 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT 2611 3282 Int ii = 0; 2612 while 3283 while( ii < m_numPTLInfo ) 2613 3284 { 2614 3285 if( m_profileList[ii] == Profile::NONE ) … … 2626 3297 ii++; 2627 3298 } 2628 if (m_numLayers > 1 && m_numPTLInfo > 1 && !m_nonHEVCBaseLayerFlag)3299 if( m_numLayers > 1 && m_numPTLInfo > 1 && !m_nonHEVCBaseLayerFlag ) 2629 3300 { 2630 3301 assert(m_profileList[0] <= Profile::MULTIVIEWMAIN); //Profile IDC of PTL in VPS shall be one of single-layer profile IDCs … … 2651 3322 Bool check_failed = false; /* abort if there is a fatal configuration problem */ 2652 3323 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) 3324 3325 const UInt maxBitDepth=(m_chromaFormatIDC==CHROMA_400) ? m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 3326 xConfirmPara(m_bitDepthConstraint<maxBitDepth, "The internalBitDepth must not be greater than the bitDepthConstraint value"); 3327 xConfirmPara(m_chromaFormatConstraint<m_chromaFormatIDC, "The chroma format used must not be greater than the chromaFormatConstraint value"); 3328 3329 if (m_profile==Profile::MAINREXT || m_profile==Profile::HIGHTHROUGHPUTREXT) 3330 { 3331 xConfirmPara(m_lowerBitRateConstraintFlag==false && m_intraConstraintFlag==false, "The lowerBitRateConstraint flag cannot be false when intraConstraintFlag is false"); 3332 xConfirmPara(m_alignCABACBeforeBypass && m_profile!=Profile::HIGHTHROUGHPUTREXT, "AlignCABACBeforeBypass must not be enabled unless the high throughput profile is being used."); 3333 if (m_profile == Profile::MAINREXT) 3334 { 3335 const UInt intraIdx = m_intraConstraintFlag ? 1:0; 3336 const UInt bitDepthIdx = (m_bitDepthConstraint == 8 ? 0 : (m_bitDepthConstraint ==10 ? 1 : (m_bitDepthConstraint == 12 ? 2 : (m_bitDepthConstraint == 16 ? 3 : 4 )))); 3337 const UInt chromaFormatIdx = UInt(m_chromaFormatConstraint); 3338 const Bool bValidProfile = (bitDepthIdx > 3 || chromaFormatIdx>3) ? false : (validRExtProfileNames[intraIdx][bitDepthIdx][chromaFormatIdx] != NONE); 3339 xConfirmPara(!bValidProfile, "Invalid intra constraint flag, bit depth constraint flag and chroma format constraint flag combination for a RExt profile"); 3340 const Bool bUsingGeneralRExtTools = m_useResidualRotation || 3341 m_useSingleSignificanceMapContext || 3342 m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] || 3343 m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] || 3344 !m_enableIntraReferenceSmoothing || 3345 m_useGolombRiceParameterAdaptation || 3346 m_transformSkipLog2MaxSize!=2; 3347 const Bool bUsingChromaQPTool = m_maxCUChromaQpAdjustmentDepth >= 0; 3348 const Bool bUsingExtendedPrecision = m_useExtendedPrecision; 3349 3350 xConfirmPara((m_chromaFormatConstraint==CHROMA_420 || m_chromaFormatConstraint==CHROMA_400) && bUsingChromaQPTool, "CU Chroma QP adjustment cannot be used for 4:0:0 or 4:2:0 RExt profiles"); 3351 xConfirmPara(m_bitDepthConstraint != 16 && bUsingExtendedPrecision, "Extended precision can only be used in 16-bit RExt profiles"); 3352 if (!(m_chromaFormatConstraint == CHROMA_400 && m_bitDepthConstraint == 16) && m_chromaFormatConstraint!=CHROMA_444) 3353 { 3354 xConfirmPara(bUsingGeneralRExtTools, "Combination of tools and profiles are not possible in the specified RExt profile."); 3355 } 3356 if (!m_intraConstraintFlag && m_bitDepthConstraint==16 && m_chromaFormatConstraint==CHROMA_444) 3357 { 3358 fprintf(stderr, "********************************************************************************************************\n"); 3359 fprintf(stderr, "** WARNING: The RExt constraint flags describe a non standard combination (used for development only) **\n"); 3360 fprintf(stderr, "********************************************************************************************************\n"); 3361 } 3362 } 3363 else 3364 { 3365 xConfirmPara( m_chromaFormatConstraint != CHROMA_444, "chroma format constraint must be 4:4:4 in the High Throughput 4:4:4 16-bit Intra profile."); 3366 xConfirmPara( m_bitDepthConstraint != 16, "bit depth constraint must be 4:4:4 in the High Throughput 4:4:4 16-bit Intra profile."); 3367 xConfirmPara( m_intraConstraintFlag != 1, "intra constraint flag must be 1 in the High Throughput 4:4:4 16-bit Intra profile."); 3368 } 3369 } 3370 else 3371 { 3372 #if MULTIPLE_PTL_SUPPORT 3373 xConfirmPara(m_bitDepthConstraint!=((m_profile==Profile::MAIN10 || m_profile==Profile::SCALABLEMAIN10)?10:8), "BitDepthConstraint must be 8 for MAIN profile and 10 for MAIN10 or Scalable-main10 profile."); 3374 #else 3375 xConfirmPara(m_bitDepthConstraint!=((m_profile==Profile::MAIN10)?10:8), "BitDepthConstraint must be 8 for MAIN profile and 10 for MAIN10 profile."); 3376 #endif 3377 xConfirmPara(m_chromaFormatConstraint!=CHROMA_420, "ChromaFormatConstraint must be 420 for non main-RExt profiles."); 3378 xConfirmPara(m_intraConstraintFlag==true, "IntraConstraintFlag must be false for non main_RExt profiles."); 3379 xConfirmPara(m_lowerBitRateConstraintFlag==false, "LowerBitrateConstraintFlag must be true for non main-RExt profiles."); 3380 3381 xConfirmPara(m_useCrossComponentPrediction==true, "CrossComponentPrediction must not be used for non main-RExt profiles."); 3382 xConfirmPara(m_transformSkipLog2MaxSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles."); 3383 xConfirmPara(m_useResidualRotation==true, "UseResidualRotation must not be enabled for non main-RExt profiles."); 3384 xConfirmPara(m_useSingleSignificanceMapContext==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles."); 3385 xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles."); 3386 xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles."); 3387 xConfirmPara(m_useGolombRiceParameterAdaptation==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles."); 3388 xConfirmPara(m_useExtendedPrecision==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles."); 3389 xConfirmPara(m_useHighPrecisionPredictionWeighting==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles."); 3390 xConfirmPara(m_enableIntraReferenceSmoothing==false, "EnableIntraReferenceSmoothing must be enabled for non main-RExt profiles."); 3391 xConfirmPara(m_alignCABACBeforeBypass, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles."); 3392 } 3393 2653 3394 // check range of parameters 2654 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2655 for(UInt layer=0; layer<m_numLayers; layer++) 2656 { 2657 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 2658 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); 2659 } 2660 #else 2661 xConfirmPara( m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 2662 xConfirmPara( m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); 2663 #endif 3395 xConfirmPara( m_inputBitDepth[CHANNEL_TYPE_LUMA ] < 8, "InputBitDepth must be at least 8" ); 3396 xConfirmPara( m_inputBitDepth[CHANNEL_TYPE_CHROMA] < 8, "InputBitDepthC must be at least 8" ); 3397 3398 #if !RExt__HIGH_BIT_DEPTH_SUPPORT 3399 if (m_useExtendedPrecision) 3400 { 3401 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 3402 { 3403 xConfirmPara((m_internalBitDepth[channelType] > 8) , "Model is not configured to support high enough internal accuracies - enable RExt__HIGH_BIT_DEPTH_SUPPORT to use increased precision internal data types etc..."); 3404 } 3405 } 3406 else 3407 { 3408 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 3409 { 3410 xConfirmPara((m_internalBitDepth[channelType] > 12) , "Model is not configured to support high enough internal accuracies - enable RExt__HIGH_BIT_DEPTH_SUPPORT to use increased precision internal data types etc..."); 3411 } 3412 } 3413 #endif 3414 3415 xConfirmPara( (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] < m_inputBitDepth[CHANNEL_TYPE_LUMA ]), "MSB-extended bit depth for luma channel (--MSBExtendedBitDepth) must be greater than or equal to input bit depth for luma channel (--InputBitDepth)" ); 3416 xConfirmPara( (m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] < m_inputBitDepth[CHANNEL_TYPE_CHROMA]), "MSB-extended bit depth for chroma channel (--MSBExtendedBitDepthC) must be greater than or equal to input bit depth for chroma channel (--InputBitDepthC)" ); 3417 3418 xConfirmPara( m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] > (m_internalBitDepth[CHANNEL_TYPE_LUMA ]<10?0:(m_internalBitDepth[CHANNEL_TYPE_LUMA ]-10)), "SaoLumaOffsetBitShift must be in the range of 0 to InternalBitDepth-10, inclusive"); 3419 xConfirmPara( m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] > (m_internalBitDepth[CHANNEL_TYPE_CHROMA]<10?0:(m_internalBitDepth[CHANNEL_TYPE_CHROMA]-10)), "SaoChromaOffsetBitShift must be in the range of 0 to InternalBitDepthC-10, inclusive"); 3420 3421 xConfirmPara( m_chromaFormatIDC >= NUM_CHROMA_FORMAT, "ChromaFormatIDC must be either 400, 420, 422 or 444" ); 3422 std::string sTempIPCSC="InputColourSpaceConvert must be empty, "+getListOfColourSpaceConverts(true); 3423 xConfirmPara( m_inputColourSpaceConvert >= NUMBER_INPUT_COLOUR_SPACE_CONVERSIONS, sTempIPCSC.c_str() ); 3424 xConfirmPara( m_InputChromaFormatIDC >= NUM_CHROMA_FORMAT, "InputChromaFormatIDC must be either 400, 420, 422 or 444" ); 3425 2664 3426 #if !SVC_EXTENSION 2665 3427 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" ); … … 2680 3442 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 2681 3443 #endif 3444 3445 if (m_isField) 3446 { 3447 if (!m_pictureTimingSEIEnabled) 3448 { 3449 fprintf(stderr, "****************************************************************************\n"); 3450 fprintf(stderr, "** WARNING: Picture Timing SEI should be enabled for field coding! **\n"); 3451 fprintf(stderr, "****************************************************************************\n"); 3452 } 3453 } 3454 if ( m_bufferingPeriodSEIEnabled && !m_activeParameterSetsSEIEnabled) 3455 { 3456 fprintf(stderr, "****************************************************************************\n"); 3457 fprintf(stderr, "** WARNING: using buffering period SEI requires SPS activation with **\n"); 3458 fprintf(stderr, "** active parameter sets SEI. Enabling active parameter sets SEI **\n"); 3459 fprintf(stderr, "****************************************************************************\n"); 3460 m_activeParameterSetsSEIEnabled = 1; 3461 } 3462 if ( m_pictureTimingSEIEnabled && !m_activeParameterSetsSEIEnabled) 3463 { 3464 fprintf(stderr, "****************************************************************************\n"); 3465 fprintf(stderr, "** WARNING: using picture timing SEI requires SPS activation with active **\n"); 3466 fprintf(stderr, "** parameter sets SEI. Enabling active parameter sets SEI. **\n"); 3467 fprintf(stderr, "****************************************************************************\n"); 3468 m_activeParameterSetsSEIEnabled = 1; 3469 } 3470 3471 if(m_useCrossComponentPrediction && (m_chromaFormatIDC != CHROMA_444)) 3472 { 3473 fprintf(stderr, "****************************************************************************\n"); 3474 fprintf(stderr, "** WARNING: Cross-component prediction is specified for 4:4:4 format only **\n"); 3475 fprintf(stderr, "****************************************************************************\n"); 3476 3477 m_useCrossComponentPrediction = false; 3478 } 3479 3480 if ( m_CUTransquantBypassFlagForce && m_bUseHADME ) 3481 { 3482 fprintf(stderr, "****************************************************************************\n"); 3483 fprintf(stderr, "** WARNING: --HadamardME has been disabled due to the enabling of **\n"); 3484 fprintf(stderr, "** --CUTransquantBypassFlagForce **\n"); 3485 fprintf(stderr, "****************************************************************************\n"); 3486 3487 m_bUseHADME = false; // this has been disabled so that the lambda is calculated slightly differently for lossless modes (as a result of JCTVC-R0104). 3488 } 3489 3490 xConfirmPara (m_transformSkipLog2MaxSize < 2, "Transform Skip Log2 Max Size must be at least 2 (4x4)"); 3491 3492 if (m_transformSkipLog2MaxSize!=2 && m_useTransformSkipFast) 3493 { 3494 fprintf(stderr, "***************************************************************************\n"); 3495 fprintf(stderr, "** WARNING: Transform skip fast is enabled (which only tests NxN splits),**\n"); 3496 fprintf(stderr, "** but transform skip log2 max size is not 2 (4x4) **\n"); 3497 fprintf(stderr, "** It may be better to disable transform skip fast mode **\n"); 3498 fprintf(stderr, "***************************************************************************\n"); 3499 } 3500 2682 3501 #if !SVC_EXTENSION 2683 xConfirmPara( m_iQP < -6 * (m_internalBitDepth Y - 8) || m_iQP > 51,"QP exceeds supported range (-QpBDOffsety to 51)" );2684 #endif 2685 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, 2686 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, 3502 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 3503 #endif 3504 xConfirmPara( m_loopFilterBetaOffsetDiv2 < -6 || m_loopFilterBetaOffsetDiv2 > 6, "Loop Filter Beta Offset div. 2 exceeds supported range (-6 to 6)"); 3505 xConfirmPara( m_loopFilterTcOffsetDiv2 < -6 || m_loopFilterTcOffsetDiv2 > 6, "Loop Filter Tc Offset div. 2 exceeds supported range (-6 to 6)"); 2687 3506 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 2688 3507 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); … … 2724 3543 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); 2725 3544 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller."); 2726 xConfirmPara( (1<<m_uiQuadtreeTULog2MaxSize) > m_uiMaxCUWidth, "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller.");2727 2728 3545 xConfirmPara( m_uiQuadtreeTULog2MaxSize < m_uiQuadtreeTULog2MinSize, "QuadtreeTULog2MaxSize must be greater than or equal to m_uiQuadtreeTULog2MinSize."); 2729 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUWidth >>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 2730 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUHeight>>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 2731 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUWidth >> m_uiMaxCUDepth ), "Minimum CU width must be greater than minimum transform size." ); 2732 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUHeight >> m_uiMaxCUDepth ), "Minimum CU height must be greater than minimum transform size." ); 3546 xConfirmPara( (1<<m_uiQuadtreeTULog2MaxSize) > m_uiMaxCUWidth, "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller."); 3547 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) >= ( m_uiMaxCUWidth >> (m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than or equal to minimum CU size" ); 3548 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) >= ( m_uiMaxCUHeight >> (m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than or equal to minimum CU size" ); 2733 3549 xConfirmPara( m_uiQuadtreeTUMaxDepthInter < 1, "QuadtreeTUMaxDepthInter must be greater than or equal to 1" ); 2734 3550 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthInter - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); … … 2749 3565 if( m_usePCM) 2750 3566 { 3567 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 3568 { 3569 xConfirmPara(((m_MSBExtendedBitDepth[channelType] > m_internalBitDepth[channelType]) && m_bPCMInputBitDepthFlag), "PCM bit depth cannot be greater than internal bit depth (PCMInputBitDepthFlag cannot be used when InputBitDepth or MSBExtendedBitDepth > InternalBitDepth)"); 3570 } 2751 3571 xConfirmPara( m_uiPCMLog2MinSize < 3, "PCMLog2MinSize must be 3 or greater."); 2752 3572 xConfirmPara( m_uiPCMLog2MinSize > 5, "PCMLog2MinSize must be 5 or smaller."); … … 2768 3588 #if !SVC_EXTENSION 2769 3589 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 ); 2770 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together"); 2771 2772 //TODO:ChromaFmt assumes 4:2:0 below 2773 xConfirmPara( m_iSourceWidth % TComSPS::getWinUnitX(CHROMA_420) != 0, "Picture width must be an integer multiple of the specified chroma subsampling"); 2774 xConfirmPara( m_iSourceHeight % TComSPS::getWinUnitY(CHROMA_420) != 0, "Picture height must be an integer multiple of the specified chroma subsampling"); 2775 2776 xConfirmPara( m_aiPad[0] % TComSPS::getWinUnitX(CHROMA_420) != 0, "Horizontal padding must be an integer multiple of the specified chroma subsampling"); 2777 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 2778 2779 xConfirmPara( m_confWinLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 2780 xConfirmPara( m_confWinRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 2781 xConfirmPara( m_confWinTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 2782 xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 3590 if (m_profile!=Profile::HIGHTHROUGHPUTREXT) 3591 { 3592 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together, except in the High Throughput Intra 4:4:4 16 profile"); 3593 } 3594 3595 xConfirmPara( m_iSourceWidth % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Picture width must be an integer multiple of the specified chroma subsampling"); 3596 xConfirmPara( m_iSourceHeight % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Picture height must be an integer multiple of the specified chroma subsampling"); 3597 3598 xConfirmPara( m_aiPad[0] % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Horizontal padding must be an integer multiple of the specified chroma subsampling"); 3599 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 3600 3601 xConfirmPara( m_confWinLeft % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 3602 xConfirmPara( m_confWinRight % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 3603 xConfirmPara( m_confWinTop % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 3604 xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 2783 3605 2784 3606 xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window"); … … 2786 3608 if (m_defaultDisplayWindowFlag) 2787 3609 { 2788 xConfirmPara( m_defDispWinLeftOffset % TComSPS::getWinUnitX( CHROMA_420) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling");2789 xConfirmPara( m_defDispWinRightOffset % TComSPS::getWinUnitX( CHROMA_420) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling");2790 xConfirmPara( m_defDispWinTopOffset % TComSPS::getWinUnitY( CHROMA_420) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling");2791 xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY( CHROMA_420) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling");3610 xConfirmPara( m_defDispWinLeftOffset % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling"); 3611 xConfirmPara( m_defDispWinRightOffset % TComSPS::getWinUnitX(m_chromaFormatIDC) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling"); 3612 xConfirmPara( m_defDispWinTopOffset % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling"); 3613 xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY(m_chromaFormatIDC) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling"); 2792 3614 } 2793 3615 #endif … … 2824 3646 m_GOPList[0].m_numRefPicsActive = 4; 2825 3647 } 2826 2827 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 2828 { 2829 if (m_acLayerCfg[layer].m_iIntraPeriod == 1 && m_EhGOPList[layer][0].m_POC == -1) { 2830 m_EhGOPList[layer][0] = GOPEntry(); 2831 m_EhGOPList[layer][0].m_QPFactor = 1; 2832 m_EhGOPList[layer][0].m_betaOffsetDiv2 = 0; 2833 m_EhGOPList[layer][0].m_tcOffsetDiv2 = 0; 2834 m_EhGOPList[layer][0].m_POC = 1; 2835 m_EhGOPList[layer][0].m_numRefPicsActive = 4; 2836 } 3648 else 3649 { 3650 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences"); 3651 } 3652 3653 if (m_acLayerCfg[layerId].m_iIntraPeriod == 1 && m_EhGOPList[layerId][0].m_POC == -1) { 3654 m_EhGOPList[layerId][0] = GOPEntry(); 3655 m_EhGOPList[layerId][0].m_QPFactor = 1; 3656 m_EhGOPList[layerId][0].m_betaOffsetDiv2 = 0; 3657 m_EhGOPList[layerId][0].m_tcOffsetDiv2 = 0; 3658 m_EhGOPList[layerId][0].m_POC = 1; 3659 m_EhGOPList[layerId][0].m_numRefPicsActive = 4; 3660 } 3661 else 3662 { 3663 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences"); 2837 3664 } 2838 3665 #else … … 2848 3675 m_GOPList[0].m_numRefPicsActive = 4; 2849 3676 } 2850 } 2851 #endif 2852 #else 2853 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) { 3677 else 3678 { 3679 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences"); 3680 } 3681 } 3682 #endif 3683 #else 3684 if (m_iIntraPeriod == 1 && m_GOPList[0].m_POC == -1) 3685 { 2854 3686 m_GOPList[0] = GOPEntry(); 2855 3687 m_GOPList[0].m_QPFactor = 1; … … 2858 3690 m_GOPList[0].m_POC = 1; 2859 3691 m_GOPList[0].m_numRefPicsActive = 4; 3692 } 3693 else 3694 { 3695 xConfirmPara( m_intraConstraintFlag, "IntraConstraintFlag cannot be 1 for inter sequences"); 2860 3696 } 2861 3697 #endif … … 2872 3708 } 2873 3709 Bool isOK[MAX_GOP]; 2874 for(Int i=0; i<MAX_GOP; i++) 3710 for(Int i=0; i<MAX_GOP; i++) 2875 3711 { 2876 3712 isOK[i]=false; … … 2906 3742 2907 3743 // verify layer configuration parameters 2908 for(UInt layer=0; layer<m_numLayers; layer++) 2909 { 2910 if(m_acLayerCfg[layer].xCheckParameter(m_isField)) 2911 { 2912 printf("\nError: invalid configuration parameter found in layer %d \n", layer); 2913 check_failed = true; 2914 } 3744 if(m_acLayerCfg[layerId].xCheckParameter(m_isField)) 3745 { 3746 printf("\nError: invalid configuration parameter found in layer %d \n", layerId); 3747 check_failed = true; 2915 3748 } 2916 3749 2917 3750 // verify layer configuration parameters 2918 for(UInt layer=0; layer<m_numLayers; layer++) 2919 { 2920 Int m_iIntraPeriod = m_acLayerCfg[layer].m_iIntraPeriod; 3751 Int m_iIntraPeriod = m_acLayerCfg[layerId].m_iIntraPeriod; 2921 3752 #endif 2922 3753 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) ) … … 2928 3759 } 2929 3760 } 2930 #if SVC_EXTENSION2931 }2932 #endif2933 3761 2934 3762 #if !Q0108_TSA_STSA 2935 m_extraRPSs = 0;3763 m_extraRPSs=0; 2936 3764 #else 2937 3765 memset( m_extraRPSs, 0, sizeof( m_extraRPSs ) ); 2938 3766 #endif 2939 3767 //start looping through frames in coding order until we can verify that the GOP structure is correct. 2940 while(!verifiedGOP&&!errorGOP) 3768 while(!verifiedGOP&&!errorGOP) 2941 3769 { 2942 3770 Int curGOP = (checkGOP-1)%m_iGOPSize; 2943 Int curPOC = ((checkGOP-1)/m_iGOPSize)*m_iGOPSize + m_GOPList[curGOP].m_POC; 2944 if(m_GOPList[curGOP].m_POC<0) 3771 Int curPOC = ((checkGOP-1)/m_iGOPSize)*m_iGOPSize + m_GOPList[curGOP].m_POC; 3772 if(m_GOPList[curGOP].m_POC<0) 2945 3773 { 2946 3774 printf("\nError: found fewer Reference Picture Sets than GOPSize\n"); 2947 3775 errorGOP=true; 2948 3776 } 2949 else 3777 else 2950 3778 { 2951 3779 //check that all reference pictures are available, or have a POC < 0 meaning they might be available in the next GOP. 2952 3780 Bool beforeI = false; 2953 for(Int i = 0; i< m_GOPList[curGOP].m_numRefPics; i++) 3781 for(Int i = 0; i< m_GOPList[curGOP].m_numRefPics; i++) 2954 3782 { 2955 3783 Int absPOC = curPOC+m_GOPList[curGOP].m_referencePics[i]; … … 2958 3786 beforeI=true; 2959 3787 } 2960 else 3788 else 2961 3789 { 2962 3790 Bool found=false; 2963 for(Int j=0; j<numRefs; j++) 3791 for(Int j=0; j<numRefs; j++) 2964 3792 { 2965 if(refList[j]==absPOC) 3793 if(refList[j]==absPOC) 2966 3794 { 2967 3795 found=true; … … 2989 3817 { 2990 3818 //all ref frames were present 2991 if(!isOK[curGOP]) 3819 if(!isOK[curGOP]) 2992 3820 { 2993 3821 numOK++; … … 2999 3827 } 3000 3828 } 3001 else 3829 else 3002 3830 { 3003 3831 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0) … … 3008 3836 #endif 3009 3837 Int newRefs=0; 3010 for(Int i = 0; i< m_GOPList[curGOP].m_numRefPics; i++) 3838 for(Int i = 0; i< m_GOPList[curGOP].m_numRefPics; i++) 3011 3839 { 3012 3840 Int absPOC = curPOC+m_GOPList[curGOP].m_referencePics[i]; … … 3024 3852 } 3025 3853 Int numPrefRefs = m_GOPList[curGOP].m_numRefPicsActive; 3026 3854 3027 3855 for(Int offset = -1; offset>-checkGOP; offset--) 3028 3856 { … … 3040 3868 } 3041 3869 } 3042 for(Int i=0; i<newRefs; i++) 3870 for(Int i=0; i<newRefs; i++) 3043 3871 { 3044 3872 #if !Q0108_TSA_STSA … … 3051 3879 } 3052 3880 } 3053 if(newRef) 3881 if(newRef) 3054 3882 { 3055 3883 Int insertPoint=newRefs; … … 3204 4032 3205 4033 #if SVC_EXTENSION && Q0108_TSA_STSA 3206 for ( Int layerId = 1; layerId < m_numLayers; layerId++)4034 if( layerId > 0 ) 3207 4035 { 3208 4036 verifiedGOP=false; … … 3234 4062 for(UInt layer=0; layer<m_numLayers; layer++) 3235 4063 { 3236 Int m_iIntraPeriod = m_acLayerCfg[layer].m_iIntraPeriod; 3237 if ( (m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) ) 4064 if ( (m_acLayerCfg[layer].m_iIntraPeriod != 1) && !m_loopFilterOffsetInPPS && m_DeblockingFilterControlPresent && (!m_bLoopFilterDisable) ) 3238 4065 { 3239 4066 for(Int i=0; i<m_iGOPSize; i++) … … 3450 4277 m_maxTempLayer = m_GOPList[i].m_temporalId+1; 3451 4278 } 3452 xConfirmPara(m_GOPList[i].m_sliceType!='B' &&m_GOPList[i].m_sliceType!='P'&&m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I");4279 xConfirmPara(m_GOPList[i].m_sliceType!='B' && m_GOPList[i].m_sliceType!='P' && m_GOPList[i].m_sliceType!='I', "Slice type must be equal to B or P or I"); 3453 4280 } 3454 4281 3455 4282 #if Q0108_TSA_STSA 3456 for ( Int layerId = 1; layerId < m_numLayers; layerId++)4283 if( layerId > 0 ) 3457 4284 { 3458 4285 m_EhMaxTempLayer[layerId] = 1; … … 3473 4300 m_maxDecPicBuffering[i] = 1; 3474 4301 } 3475 for(Int i=0; i<m_iGOPSize; i++) 4302 for(Int i=0; i<m_iGOPSize; i++) 3476 4303 { 3477 4304 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) … … 3479 4306 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 3480 4307 } 3481 Int highestDecodingNumberWithLowerPOC = 0; 4308 Int highestDecodingNumberWithLowerPOC = 0; 3482 4309 for(Int j=0; j<m_iGOPSize; j++) 3483 4310 { … … 3490 4317 for(Int j=0; j<highestDecodingNumberWithLowerPOC; j++) 3491 4318 { 3492 if(m_GOPList[j].m_temporalId <= m_GOPList[i].m_temporalId && 4319 if(m_GOPList[j].m_temporalId <= m_GOPList[i].m_temporalId && 3493 4320 m_GOPList[j].m_POC > m_GOPList[i].m_POC) 3494 4321 { 3495 4322 numReorder++; 3496 4323 } 3497 } 4324 } 3498 4325 if(numReorder > m_numReorderPics[m_GOPList[i].m_temporalId]) 3499 4326 { … … 3501 4328 } 3502 4329 } 3503 for(Int i=0; i<MAX_TLAYER-1; i++) 4330 for(Int i=0; i<MAX_TLAYER-1; i++) 3504 4331 { 3505 4332 // a lower layer can not have higher value of m_numReorderPics than a higher layer … … 3520 4347 } 3521 4348 3522 3523 4349 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 3524 4350 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) … … 3528 4354 3529 4355 #if SVC_EXTENSION // ToDo: it should be checked for the case when parameters are different for the layers 3530 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 3531 { 3532 Int m_iSourceWidth = m_acLayerCfg[layer].m_iSourceWidth; 3533 Int m_iSourceHeight = m_acLayerCfg[layer].m_iSourceHeight; 4356 Int m_iSourceWidth = m_acLayerCfg[layerId].m_iSourceWidth; 4357 Int m_iSourceHeight = m_acLayerCfg[layerId].m_iSourceHeight; 3534 4358 #if LAYER_CTB 3535 Int m_uiMaxCUWidth = m_acLayerCfg[layer].m_uiMaxCUWidth;3536 Int m_uiMaxCUHeight = m_acLayerCfg[layer].m_uiMaxCUHeight;3537 #endif 3538 3539 3540 Int m_iWaveFrontSynchro = m_acLayerCfg[layer].m_waveFrontSynchro;3541 4359 Int m_uiMaxCUWidth = m_acLayerCfg[layerId].m_uiMaxCUWidth; 4360 Int m_uiMaxCUHeight = m_acLayerCfg[layerId].m_uiMaxCUHeight; 4361 #endif 4362 4363 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 ); 4364 Int m_iWaveFrontSynchro = m_acLayerCfg[layerId].m_waveFrontSynchro; 4365 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together"); 3542 4366 #endif 3543 4367 3544 4368 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) 3545 { 4369 { 3546 4370 Int PicSizeInSamplesY = m_iSourceWidth * m_iSourceHeight; 3547 4371 if(tileFlag) … … 3555 4379 maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_numTileColumnsMinus1)/(m_numTileColumnsMinus1+1)); 3556 4380 maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_numTileRowsMinus1)/(m_numTileRowsMinus1+1)); 3557 // if only the last tile-row is one treeblock higher than the others 4381 // if only the last tile-row is one treeblock higher than the others 3558 4382 // the maxTileHeight becomes smaller if the last row of treeblocks has lower height than the others 3559 4383 if(!((heightInCU-1)%(m_numTileRowsMinus1+1))) 3560 4384 { 3561 4385 maxTileHeight = maxTileHeight - m_uiMaxCUHeight + (m_iSourceHeight % m_uiMaxCUHeight); 3562 } 3563 // if only the last tile-column is one treeblock wider than the others 3564 // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others 4386 } 4387 // if only the last tile-column is one treeblock wider than the others 4388 // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others 3565 4389 if(!((widthInCU-1)%(m_numTileColumnsMinus1+1))) 3566 4390 { … … 3606 4430 m_minSpatialSegmentationIdc = 4*PicSizeInSamplesY/((2*m_iSourceHeight+m_iSourceWidth)*m_uiMaxCUHeight)-4; 3607 4431 } 3608 else if(m_sliceMode == 1)4432 else if(m_sliceMode == FIXED_NUMBER_OF_CTU) 3609 4433 { 3610 4434 m_minSpatialSegmentationIdc = 4*PicSizeInSamplesY/(m_sliceArgument*m_uiMaxCUWidth*m_uiMaxCUHeight)-4; … … 3615 4439 } 3616 4440 } 3617 #if SVC_EXTENSION3618 }3619 #endif3620 4441 #if !SVC_EXTENSION 3621 4442 xConfirmPara( m_iWaveFrontSynchro < 0, "WaveFrontSynchro cannot be negative" ); … … 3637 4458 xConfirmPara( m_extendedWhiteLevelLumaCodeValue < m_nominalWhiteLevelLumaCodeValue, "SEIToneMapExtendedWhiteLevelLumaCodeValue shall be greater than or equal to SEIToneMapNominalWhiteLevelLumaCodeValue"); 3638 4459 } 3639 #if P0050_KNEE_FUNCTION_SEI 4460 3640 4461 if (m_kneeSEIEnabled && !m_kneeSEICancelFlag) 3641 4462 { … … 3646 4467 if ( i > 0 ) 3647 4468 { 3648 xConfirmPara( m_kneeSEIInputKneePoint[i-1] >= m_kneeSEIInputKneePoint[i], "The i-th SEIKneeFunctionInputKneePointValue must be greather than the (i-1)-th value"); 3649 } 3650 } 3651 } 3652 #endif 4469 xConfirmPara( m_kneeSEIInputKneePoint[i-1] >= m_kneeSEIInputKneePoint[i], "The i-th SEIKneeFunctionInputKneePointValue must be greater than the (i-1)-th value"); 4470 xConfirmPara( m_kneeSEIOutputKneePoint[i-1] > m_kneeSEIOutputKneePoint[i], "The i-th SEIKneeFunctionOutputKneePointValue must be greater than or equal to the (i-1)-th value"); 4471 } 4472 } 4473 } 4474 3653 4475 #if Q0096_OVERLAY_SEI 3654 4476 if( m_overlaySEIEnabled && !m_overlayInfoCancelFlag ) … … 3667 4489 #if Q0074_COLOUR_REMAPPING_SEI 3668 4490 #if !SVC_EXTENSION 3669 if ( ( m_colourRemapSEIFile.size() > 0 )&& !m_colourRemapSEICancelFlag )4491 if ( m_colourRemapSEIFile && !m_colourRemapSEICancelFlag ) 3670 4492 { 3671 4493 xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive"); … … 3700 4522 3701 4523 #if RC_SHVC_HARMONIZATION 3702 for ( Int layer=0; layer<m_numLayers; layer++ ) 3703 { 3704 if ( m_acLayerCfg[layer].m_RCEnableRateControl ) 3705 { 3706 if ( m_acLayerCfg[layer].m_RCForceIntraQP ) 3707 { 3708 if ( m_acLayerCfg[layer].m_RCInitialQP == 0 ) 3709 { 3710 printf( "\nInitial QP for rate control is not specified. Reset not to use force intra QP!" ); 3711 m_acLayerCfg[layer].m_RCForceIntraQP = false; 3712 } 3713 } 3714 } 3715 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 3716 } 4524 if ( m_acLayerCfg[layerId].m_RCEnableRateControl ) 4525 { 4526 if ( m_acLayerCfg[layerId].m_RCForceIntraQP ) 4527 { 4528 if ( m_acLayerCfg[layerId].m_RCInitialQP == 0 ) 4529 { 4530 printf( "\nInitial QP for rate control is not specified. Reset not to use force intra QP!" ); 4531 m_acLayerCfg[layerId].m_RCForceIntraQP = false; 4532 } 4533 } 4534 } 4535 xConfirmPara( m_uiDeltaQpRD > 0, "Rate control cannot be used together with slice level multiple-QP optimization!\n" ); 3717 4536 #else 3718 4537 if ( m_RCEnableRateControl ) … … 3733 4552 3734 4553 xConfirmPara(m_log2ParallelMergeLevel < 2, "Log2ParallelMergeLevel should be larger than or equal to 2"); 4554 3735 4555 if (m_framePackingSEIEnabled) 3736 4556 { 3737 4557 xConfirmPara(m_framePackingSEIType < 3 || m_framePackingSEIType > 5 , "SEIFramePackingType must be in rage 3 to 5"); 4558 } 4559 4560 if (m_segmentedRectFramePackingSEIEnabled) 4561 { 4562 xConfirmPara(m_framePackingSEIEnabled > 0 , "SEISegmentedRectFramePacking must be 0 when SEIFramePacking is 1"); 4563 } 4564 4565 if((m_numTileColumnsMinus1 <= 0) && (m_numTileRowsMinus1 <= 0) && m_tmctsSEIEnabled) 4566 { 4567 printf("SEITempMotionConstrainedTileSets is set to false to disable 'temporal_motion_constrained_tile_sets' SEI because there are no tiles enabled\n"); 4568 m_tmctsSEIEnabled = false; 4569 } 4570 4571 if(m_timeCodeSEIEnabled) 4572 { 4573 xConfirmPara(m_timeCodeSEINumTs > MAX_TIMECODE_SEI_SETS, "Number of time sets cannot exceed 3"); 3738 4574 } 3739 4575 … … 3742 4578 xConfirmPara( (m_acLayerCfg[0].m_numSamplePredRefLayers != 0) && (m_acLayerCfg[0].m_numSamplePredRefLayers != -1), "Layer 0 cannot have any reference layers" ); 3743 4579 // NOTE: m_numSamplePredRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 3744 for(Int layer = 1; layer < MAX_LAYERS; layer++)3745 { 3746 xConfirmPara(m_acLayerCfg[layer ].m_numSamplePredRefLayers > layer, "Cannot reference more layers than before current layer");3747 for(Int i = 0; i < m_acLayerCfg[layer ].m_numSamplePredRefLayers; i++)3748 { 3749 xConfirmPara(m_acLayerCfg[layer ].m_samplePredRefLayerIds[i] > layer, "Cannot reference higher layers");3750 xConfirmPara(m_acLayerCfg[layer ].m_samplePredRefLayerIds[i] == layer, "Cannot reference the current layer itself");4580 if( layerId > 0 ) 4581 { 4582 xConfirmPara(m_acLayerCfg[layerId].m_numSamplePredRefLayers > layerId, "Cannot reference more layers than before current layer"); 4583 for(Int i = 0; i < m_acLayerCfg[layerId].m_numSamplePredRefLayers; i++) 4584 { 4585 xConfirmPara(m_acLayerCfg[layerId].m_samplePredRefLayerIds[i] > layerId, "Cannot reference higher layers"); 4586 xConfirmPara(m_acLayerCfg[layerId].m_samplePredRefLayerIds[i] == layerId, "Cannot reference the current layer itself"); 3751 4587 } 3752 4588 } 3753 4589 xConfirmPara( (m_acLayerCfg[0].m_numMotionPredRefLayers != 0) && (m_acLayerCfg[0].m_numMotionPredRefLayers != -1), "Layer 0 cannot have any reference layers" ); 3754 4590 // NOTE: m_numMotionPredRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 3755 for(Int layer = 1; layer < MAX_LAYERS; layer++)3756 { 3757 xConfirmPara(m_acLayerCfg[layer ].m_numMotionPredRefLayers > layer, "Cannot reference more layers than before current layer");3758 for(Int i = 0; i < m_acLayerCfg[layer ].m_numMotionPredRefLayers; i++)3759 { 3760 xConfirmPara(m_acLayerCfg[layer ].m_motionPredRefLayerIds[i] > layer, "Cannot reference higher layers");3761 xConfirmPara(m_acLayerCfg[layer ].m_motionPredRefLayerIds[i] == layer, "Cannot reference the current layer itself");4591 if( layerId > 0 ) 4592 { 4593 xConfirmPara(m_acLayerCfg[layerId].m_numMotionPredRefLayers > layerId, "Cannot reference more layers than before current layer"); 4594 for(Int i = 0; i < m_acLayerCfg[layerId].m_numMotionPredRefLayers; i++) 4595 { 4596 xConfirmPara(m_acLayerCfg[layerId].m_motionPredRefLayerIds[i] > layerId, "Cannot reference higher layers"); 4597 xConfirmPara(m_acLayerCfg[layerId].m_motionPredRefLayerIds[i] == layerId, "Cannot reference the current layer itself"); 3762 4598 } 3763 4599 } … … 3765 4601 xConfirmPara( (m_acLayerCfg[0].m_numActiveRefLayers != 0) && (m_acLayerCfg[0].m_numActiveRefLayers != -1), "Layer 0 cannot have any active reference layers" ); 3766 4602 // NOTE: m_numActiveRefLayers (for any layer) could be -1 (not signalled in cfg), in which case only the "previous layer" would be taken for reference 3767 for(Int layer = 1; layer < MAX_LAYERS; layer++)4603 if( layerId > 0 ) 3768 4604 { 3769 4605 Bool predEnabledFlag[MAX_LAYERS]; 3770 for (Int refLayer = 0; refLayer < layer ; refLayer++)4606 for (Int refLayer = 0; refLayer < layerId; refLayer++) 3771 4607 { 3772 4608 predEnabledFlag[refLayer] = false; 3773 4609 } 3774 for(Int i = 0; i < m_acLayerCfg[layer ].m_numSamplePredRefLayers; i++)3775 { 3776 predEnabledFlag[m_acLayerCfg[layer ].m_samplePredRefLayerIds[i]] = true;3777 } 3778 for(Int i = 0; i < m_acLayerCfg[layer ].m_numMotionPredRefLayers; i++)3779 { 3780 predEnabledFlag[m_acLayerCfg[layer ].m_motionPredRefLayerIds[i]] = true;4610 for(Int i = 0; i < m_acLayerCfg[layerId].m_numSamplePredRefLayers; i++) 4611 { 4612 predEnabledFlag[m_acLayerCfg[layerId].m_samplePredRefLayerIds[i]] = true; 4613 } 4614 for(Int i = 0; i < m_acLayerCfg[layerId].m_numMotionPredRefLayers; i++) 4615 { 4616 predEnabledFlag[m_acLayerCfg[layerId].m_motionPredRefLayerIds[i]] = true; 3781 4617 } 3782 4618 Int numDirectRefLayers = 0; 3783 for (Int refLayer = 0; refLayer < layer ; refLayer++)4619 for (Int refLayer = 0; refLayer < layerId; refLayer++) 3784 4620 { 3785 4621 if (predEnabledFlag[refLayer] == true) numDirectRefLayers++; 3786 4622 } 3787 xConfirmPara(m_acLayerCfg[layer ].m_numActiveRefLayers > numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers");3788 for(Int i = 0; i < m_acLayerCfg[layer ].m_numActiveRefLayers; i++)3789 { 3790 xConfirmPara(m_acLayerCfg[layer ].m_predLayerIds[i] >= numDirectRefLayers, "Cannot reference higher layers");4623 xConfirmPara(m_acLayerCfg[layerId].m_numActiveRefLayers > numDirectRefLayers, "Cannot reference more layers than NumDirectRefLayers"); 4624 for(Int i = 0; i < m_acLayerCfg[layerId].m_numActiveRefLayers; i++) 4625 { 4626 xConfirmPara(m_acLayerCfg[layerId].m_predLayerIds[i] >= numDirectRefLayers, "Cannot reference higher layers"); 3791 4627 } 3792 4628 } … … 3809 4645 } 3810 4646 #endif 3811 for (UInt layer=0; layer < MAX_LAYERS-1; layer++)3812 { 3813 xConfirmPara(m_acLayerCfg[layer ].m_maxTidIlRefPicsPlus1 < 0 || m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1 > 7, "MaxTidIlRefPicsPlus1 must be in range 0 to 7");4647 if( layerId < MAX_LAYERS-1 ) 4648 { 4649 xConfirmPara(m_acLayerCfg[layerId].m_maxTidIlRefPicsPlus1 < 0 || m_acLayerCfg[layerId].m_maxTidIlRefPicsPlus1 > 7, "MaxTidIlRefPicsPlus1 must be in range 0 to 7"); 3814 4650 } 3815 4651 #if AUXILIARY_PICTURES 3816 for (UInt layer=0; layer < MAX_LAYERS-1; layer++)4652 if( layerId < MAX_LAYERS-1 ) 3817 4653 { 3818 4654 #if R0062_AUX_PSEUDO_MONOCHROME 3819 xConfirmPara(m_acLayerCfg[layer ].m_auxId < 0 || m_acLayerCfg[layer].m_auxId > 2, "AuxId must be in range 0 to 2");3820 #else 3821 xConfirmPara(m_acLayerCfg[layer ].m_auxId < 0 || m_acLayerCfg[layer].m_auxId > 4, "AuxId must be in range 0 to 4");3822 xConfirmPara(m_acLayerCfg[layer ].m_auxId > 0 && m_acLayerCfg[layer].m_chromaFormatIDC != CHROMA_400, "Auxiliary picture must be monochrome picture");4655 xConfirmPara(m_acLayerCfg[layerId].m_auxId < 0 || m_acLayerCfg[layerId].m_auxId > 2, "AuxId must be in range 0 to 2"); 4656 #else 4657 xConfirmPara(m_acLayerCfg[layerId].m_auxId < 0 || m_acLayerCfg[layerId].m_auxId > 4, "AuxId must be in range 0 to 4"); 4658 xConfirmPara(m_acLayerCfg[layerId].m_auxId > 0 && m_acLayerCfg[layerId].m_chromaFormatIDC != CHROMA_400, "Auxiliary picture must be monochrome picture"); 3823 4659 #endif 3824 4660 } … … 3871 4707 Void TAppEncCfg::xSetGlobal() 3872 4708 { 4709 #if SVC_EXTENSION 4710 // Check for layerId equal to 0, it has to pe extended to other layers. 4711 UInt layerId = 0; 4712 Bool m_useExtendedPrecision = m_acLayerCfg[layerId].m_useExtendedPrecision; 4713 Int m_internalBitDepth[] = {m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 4714 Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]}; 4715 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerId].m_chromaFormatIDC; 4716 #endif 4717 3873 4718 // set max CU width & height 3874 4719 g_uiMaxCUWidth = m_uiMaxCUWidth; 3875 4720 g_uiMaxCUHeight = m_uiMaxCUHeight; 3876 4721 3877 4722 // compute actual CU depth with respect to config depth and max transform size 3878 4723 g_uiAddCUDepth = 0; 3879 4724 while( (m_uiMaxCUWidth>>m_uiMaxCUDepth) > ( 1 << ( m_uiQuadtreeTULog2MinSize + g_uiAddCUDepth ) ) ) g_uiAddCUDepth++; 3880 4725 4726 g_uiAddCUDepth+=getMaxCUDepthOffset(m_chromaFormatIDC, m_uiQuadtreeTULog2MinSize); // if minimum TU larger than 4x4, allow for additional part indices for 4:2:2 SubTUs. 4727 3881 4728 m_uiMaxCUDepth += g_uiAddCUDepth; 3882 4729 g_uiAddCUDepth++; 3883 4730 g_uiMaxCUDepth = m_uiMaxCUDepth; 3884 3885 #if O0194_DIFFERENT_BITDEPTH_EL_BL 3886 // set internal bit-depth to constant value to make sure to be updated later3887 g_bitDepthY = -1;3888 g_bitDepthC = -1; 3889 3890 g_uiPCMBitDepthLuma = -1; 3891 g_uiPCMBitDepthChroma = -1;3892 #e lse3893 g_bitDepthY = m_internalBitDepthY;3894 g_bitDepthC = m_internalBitDepthC; 3895 3896 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY;3897 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC;3898 #endif 4731 4732 // set internal bit-depth and constants 4733 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 4734 { 4735 #if O0043_BEST_EFFORT_DECODING 4736 g_bitDepthInStream[channelType] = g_bitDepth[channelType] = m_internalBitDepth[channelType]; 4737 #else 4738 g_bitDepth [channelType] = m_internalBitDepth[channelType]; 4739 #endif 4740 g_PCMBitDepth[channelType] = m_bPCMInputBitDepthFlag ? m_MSBExtendedBitDepth[channelType] : m_internalBitDepth[channelType]; 4741 4742 if (m_useExtendedPrecision) g_maxTrDynamicRange[channelType] = std::max<Int>(15, (g_bitDepth[channelType] + 6)); 4743 else g_maxTrDynamicRange[channelType] = 15; 4744 } 4745 3899 4746 } 3900 4747 #endif 4748 4749 const Char *profileToString(const Profile::Name profile) 4750 { 4751 static const UInt numberOfProfiles = sizeof(strToProfile)/sizeof(*strToProfile); 4752 4753 for (UInt profileIndex = 0; profileIndex < numberOfProfiles; profileIndex++) 4754 { 4755 if (strToProfile[profileIndex].value == profile) return strToProfile[profileIndex].str; 4756 } 4757 4758 //if we get here, we didn't find this profile in the list - so there is an error 4759 std::cerr << "ERROR: Unknown profile \"" << profile << "\" in profileToString" << std::endl; 4760 assert(false); 4761 exit(1); 4762 return ""; 4763 } 3901 4764 3902 4765 Void TAppEncCfg::xPrintParameter() … … 3904 4767 printf("\n"); 3905 4768 #if SVC_EXTENSION 3906 printf("Total number of layers : %d\n", m_numLayers );3907 printf("Multiview : %d\n", m_scalabilityMask[VIEW_ORDER_INDEX] );3908 printf("Scalable : %d\n", m_scalabilityMask[SCALABILITY_ID] );4769 printf("Total number of layers : %d\n", m_numLayers ); 4770 printf("Multiview : %d\n", m_scalabilityMask[VIEW_ORDER_INDEX] ); 4771 printf("Scalable : %d\n", m_scalabilityMask[SCALABILITY_ID] ); 3909 4772 #if AVC_BASE 3910 4773 #if VPS_AVC_BL_FLAG_REMOVAL 3911 printf("Base layer : %s\n", m_nonHEVCBaseLayerFlag ? "Non-HEVC" : "HEVC");3912 #else 3913 printf("Base layer : %s\n", m_avcBaseLayerFlag ? "AVC" : "HEVC");4774 printf("Base layer : %s\n", m_nonHEVCBaseLayerFlag ? "Non-HEVC" : "HEVC"); 4775 #else 4776 printf("Base layer : %s\n", m_avcBaseLayerFlag ? "AVC" : "HEVC"); 3914 4777 #endif 3915 4778 #endif 3916 4779 #if AUXILIARY_PICTURES 3917 printf("Auxiliary pictures : %d\n", m_scalabilityMask[AUX_ID] );4780 printf("Auxiliary pictures : %d\n", m_scalabilityMask[AUX_ID] ); 3918 4781 #endif 3919 4782 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 3920 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange );4783 printf("Adaptive Resolution Change : %d\n", m_adaptiveResolutionChange ); 3921 4784 #endif 3922 4785 #if HIGHER_LAYER_IRAP_SKIP_FLAG 3923 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch );4786 printf("Skip picture at ARC switch : %d\n", m_skipPictureAtArcSwitch ); 3924 4787 #endif 3925 4788 #if O0223_PICTURE_TYPES_ALIGN_FLAG 3926 printf("Align picture type : %d\n", m_crossLayerPictureTypeAlignFlag );3927 #endif 3928 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag );4789 printf("Align picture type : %d\n", m_crossLayerPictureTypeAlignFlag ); 4790 #endif 4791 printf("Cross layer IRAP alignment : %d\n", m_crossLayerIrapAlignFlag ); 3929 4792 #if P0068_CROSS_LAYER_ALIGNED_IDR_ONLY_FOR_IRAP_FLAG 3930 printf("IDR only for IRAP : %d\n", m_crossLayerAlignedIdrOnlyFlag );4793 printf("IDR only for IRAP : %d\n", m_crossLayerAlignedIdrOnlyFlag ); 3931 4794 #endif 3932 4795 #if O0194_WEIGHTED_PREDICTION_CGS 3933 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 3934 #endif 4796 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 4797 #endif 4798 #if O0215_PHASE_ALIGNMENT 4799 printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag); 4800 #endif 4801 printf("\n"); 3935 4802 for(UInt layer=0; layer<m_numLayers; layer++) 3936 4803 { … … 3940 4807 } 3941 4808 printf("=== Common configuration settings === \n"); 3942 printf("Bitstream File : %s\n", m_pBitstreamFile );4809 printf("Bitstream File : %s\n", m_pBitstreamFile ); 3943 4810 #else //SVC_EXTENSION 3944 printf("Input File : %s\n", m_pchInputFile );3945 printf("Bitstream File : %s\n", m_pchBitstreamFile );3946 printf("Reconstruction File : %s\n", m_pchReconFile );3947 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate );3948 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );4811 printf("Input File : %s\n", m_pchInputFile ); 4812 printf("Bitstream File : %s\n", m_pchBitstreamFile ); 4813 printf("Reconstruction File : %s\n", m_pchReconFile ); 4814 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 4815 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 3949 4816 #endif //SVC_EXTENSION 4817 4818 printf("Sequence PSNR output : %s\n", (m_printMSEBasedSequencePSNR ? "Linear average, MSE-based" : "Linear average only") ); 4819 printf("Sequence MSE output : %s\n", (m_printSequenceMSE ? "Enabled" : "Disabled") ); 4820 printf("Frame MSE output : %s\n", (m_printFrameMSE ? "Enabled" : "Disabled") ); 4821 printf("Cabac-zero-word-padding : %s\n", (m_cabacZeroWordPaddingEnabled? "Enabled" : "Disabled") ); 3950 4822 if (m_isField) 3951 4823 { 3952 printf("Frame/Field : Field based coding\n"); 3953 printf("Field index : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 3954 if (m_isTopFieldFirst) 3955 { 3956 printf("Field Order : Top field first\n"); 3957 } 3958 else 3959 { 3960 printf("Field Order : Bottom field first\n"); 3961 } 4824 printf("Frame/Field : Field based coding\n"); 4825 printf("Field index : %u - %d (%d fields)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4826 printf("Field Order : %s field first\n", m_isTopFieldFirst?"Top":"Bottom"); 4827 3962 4828 } 3963 4829 else 3964 4830 { 3965 printf("Frame/Field : Frame based coding\n"); 3966 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 3967 } 4831 printf("Frame/Field : Frame based coding\n"); 4832 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4833 } 4834 #if !MULTIPLE_PTL_SUPPORT 4835 if (m_profile == Profile::MAINREXT) 4836 { 4837 const UInt intraIdx = m_intraConstraintFlag ? 1:0; 4838 const UInt bitDepthIdx = (m_bitDepthConstraint == 8 ? 0 : (m_bitDepthConstraint ==10 ? 1 : (m_bitDepthConstraint == 12 ? 2 : (m_bitDepthConstraint == 16 ? 3 : 4 )))); 4839 const UInt chromaFormatIdx = UInt(m_chromaFormatConstraint); 4840 const ExtendedProfileName validProfileName = (bitDepthIdx > 3 || chromaFormatIdx>3) ? NONE : validRExtProfileNames[intraIdx][bitDepthIdx][chromaFormatIdx]; 4841 std::string rextSubProfile; 4842 if (validProfileName!=NONE) rextSubProfile=enumToString(strToExtendedProfile, sizeof(strToExtendedProfile)/sizeof(*strToExtendedProfile), validProfileName); 4843 if (rextSubProfile == "main_444_16") rextSubProfile="main_444_16 [NON STANDARD]"; 4844 printf("Profile : %s (%s)\n", profileToString(m_profile), (rextSubProfile.empty())?"INVALID REXT PROFILE":rextSubProfile.c_str() ); 4845 } 4846 else 4847 { 4848 printf("Profile : %s\n", profileToString(m_profile) ); 4849 } 4850 #endif 3968 4851 #if !LAYER_CTB 3969 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth );3970 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );3971 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter);3972 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra);3973 #endif 3974 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize);3975 printf("Motion search range : %d\n", m_iSearchRange );4852 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 4853 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 4854 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 4855 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 4856 #endif 4857 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 4858 printf("Motion search range : %d\n", m_iSearchRange ); 3976 4859 #if !SVC_EXTENSION 3977 printf("Intra period : %d\n", m_iIntraPeriod );3978 #endif 3979 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType );4860 printf("Intra period : %d\n", m_iIntraPeriod ); 4861 #endif 4862 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); 3980 4863 #if !SVC_EXTENSION 3981 printf("QP : %5.2f\n", m_fQP );3982 #endif 3983 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth);3984 3985 printf("Cb QP Offset : %d\n", m_cbQpOffset );3986 printf("Cr QP Offset : %d\n", m_crQpOffset);3987 3988 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) );3989 printf("GOP size : %d\n", m_iGOPSize );4864 printf("QP : %5.2f\n", m_fQP ); 4865 #endif 4866 printf("Max dQP signaling depth : %d\n", m_iMaxCuDQPDepth); 4867 4868 printf("Cb QP Offset : %d\n", m_cbQpOffset ); 4869 printf("Cr QP Offset : %d\n", m_crQpOffset); 4870 printf("Max CU chroma QP adjustment depth : %d\n", m_maxCUChromaQpAdjustmentDepth); 4871 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 4872 printf("GOP size : %d\n", m_iGOPSize ); 3990 4873 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 3991 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC ); 3992 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma ); 3993 #endif 3994 #if O0215_PHASE_ALIGNMENT 3995 printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag); 3996 #endif 4874 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 4875 printf("MSB-extended bit depth : (Y:%d, C:%d)\n", m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] ); 4876 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 4877 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_PCMBitDepth[CHANNEL_TYPE_LUMA], g_PCMBitDepth[CHANNEL_TYPE_CHROMA] ); 4878 printf("Extended precision processing : %s\n", (m_useExtendedPrecision ? "Enabled" : "Disabled") ); 4879 #endif 4880 printf("Intra reference smoothing : %s\n", (m_enableIntraReferenceSmoothing ? "Enabled" : "Disabled") ); 4881 printf("Implicit residual DPCM : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] ? "Enabled" : "Disabled") ); 4882 printf("Explicit residual DPCM : %s\n", (m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] ? "Enabled" : "Disabled") ); 4883 printf("Residual rotation : %s\n", (m_useResidualRotation ? "Enabled" : "Disabled") ); 4884 printf("Single significance map context : %s\n", (m_useSingleSignificanceMapContext ? "Enabled" : "Disabled") ); 4885 printf("Cross-component prediction : %s\n", (m_useCrossComponentPrediction ? (m_reconBasedCrossCPredictionEstimate ? "Enabled (reconstructed-residual-based estimate)" : "Enabled (encoder-side-residual-based estimate)") : "Disabled") ); 4886 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 4887 printf("High-precision prediction weight : %s\n", (m_useHighPrecisionPredictionWeighting ? "Enabled" : "Disabled") ); 4888 #endif 4889 printf("Golomb-Rice parameter adaptation : %s\n", (m_useGolombRiceParameterAdaptation ? "Enabled" : "Disabled") ); 4890 printf("CABAC bypass bit alignment : %s\n", (m_alignCABACBeforeBypass ? "Enabled" : "Disabled") ); 4891 if (m_bUseSAO) 4892 { 4893 printf("Sao Luma Offset bit shifts : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]); 4894 printf("Sao Chroma Offset bit shifts : %d\n", m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]); 4895 } 4896 4897 switch (m_costMode) 4898 { 4899 case COST_STANDARD_LOSSY: printf("Cost function: : Lossy coding (default)\n"); break; 4900 case COST_SEQUENCE_LEVEL_LOSSLESS: printf("Cost function: : Sequence_level_lossless coding\n"); break; 4901 case COST_LOSSLESS_CODING: printf("Cost function: : Lossless coding with fixed QP of %d\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP); break; 4902 case COST_MIXED_LOSSLESS_LOSSY_CODING: printf("Cost function: : Mixed_lossless_lossy coding with QP'=%d for lossless evaluation\n", LOSSLESS_AND_MIXED_LOSSLESS_RD_COST_TEST_QP_PRIME); break; 4903 default: printf("Cost function: : Unknown\n"); break; 4904 } 4905 3997 4906 #if !RC_SHVC_HARMONIZATION 3998 printf("RateControl : %d\n", m_RCEnableRateControl ); 4907 printf("RateControl : %d\n", m_RCEnableRateControl ); 4908 3999 4909 if(m_RCEnableRateControl) 4000 4910 { 4001 printf("TargetBitrate : %d\n", m_RCTargetBitrate );4002 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit );4003 printf("LCULevelRC : %d\n", m_RCLCULevelRC );4004 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel );4005 printf("InitialQP : %d\n", m_RCInitialQP );4006 printf("ForceIntraQP : %d\n", m_RCForceIntraQP );4007 } 4008 #endif 4009 4010 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand);4911 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 4912 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit ); 4913 printf("LCULevelRC : %d\n", m_RCLCULevelRC ); 4914 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel ); 4915 printf("InitialQP : %d\n", m_RCInitialQP ); 4916 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 4917 } 4918 #endif 4919 4920 printf("Max Num Merge Candidates : %d\n", m_maxNumMergeCand); 4011 4921 printf("\n"); 4012 4922 4013 4923 printf("TOOL CFG: "); 4014 4924 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 4015 printf("IBD:%d ", g_bitDepthY > m_inputBitDepthY || g_bitDepthC > m_inputBitDepthC);4925 printf("IBD:%d ", ((g_bitDepth[CHANNEL_TYPE_LUMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA]) || (g_bitDepth[CHANNEL_TYPE_CHROMA] > m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]))); 4016 4926 #endif 4017 4927 printf("HAD:%d ", m_bUseHADME ); … … 4032 4942 printf("TransformSkip:%d ", m_useTransformSkip ); 4033 4943 printf("TransformSkipFast:%d ", m_useTransformSkipFast ); 4944 printf("TransformSkipLog2MaxSize:%d ", m_transformSkipLog2MaxSize); 4034 4945 printf("Slice: M=%d ", m_sliceMode); 4035 if (m_sliceMode!= 0)4946 if (m_sliceMode!=NO_SLICES) 4036 4947 { 4037 4948 printf("A=%d ", m_sliceArgument); 4038 4949 } 4039 4950 printf("SliceSegment: M=%d ",m_sliceSegmentMode); 4040 if (m_sliceSegmentMode!= 0)4951 if (m_sliceSegmentMode!=NO_SLICES) 4041 4952 { 4042 4953 printf("A=%d ", m_sliceSegmentArgument); … … 4047 4958 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 4048 4959 #endif 4960 4049 4961 if (m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagForce) 4050 4962 { 4051 printf("TransQuantBypassEnabled: =1 4963 printf("TransQuantBypassEnabled: =1"); 4052 4964 } 4053 4965 else … … 4055 4967 printf("TransQuantBypassEnabled:%d ", (m_TransquantBypassEnableFlag)? 1:0 ); 4056 4968 } 4969 4057 4970 printf("WPP:%d ", (Int)m_useWeightedPred); 4058 4971 printf("WPB:%d ", (Int)m_useWeightedBiPred); … … 4091 5004 4092 5005 printf("\n\n"); 4093 5006 4094 5007 fflush(stdout); 4095 5008 } … … 4099 5012 if (!bflag) 4100 5013 return false; 4101 5014 4102 5015 printf("Error: %s\n",message); 4103 5016 return true; … … 4194 5107 } 4195 5108 #endif 4196 #endif //SVC_EXTENSION 4197 4198 #if SVC_EXTENSION 5109 4199 5110 #if R0235_SMALLEST_LAYER_ID 4200 5111 #if OUTPUT_LAYER_SETS_CONFIG … … 4269 5180 #endif // R0235 4270 5181 #endif //SVC_EXTENSION 4271 4272 4273 5182 //! \} -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1005 r1029 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 91 91 std::vector< std::vector<Int> > m_listOfOutputLayers; 92 92 #endif 93 Bool m_isField; ///< enable field coding 94 Bool m_isTopFieldFirst; 93 95 #else 94 96 Char* m_pchInputFile; ///< source file name … … 98 100 // source specification 99 101 Int m_iFrameRate; ///< source frame-rates (Hz) 100 UInt m_FrameSkip; 102 UInt m_FrameSkip; ///< number of skipped frames from the beginning 101 103 Int m_iSourceWidth; ///< source width in pixel 102 104 Int m_iSourceHeight; ///< source height in pixel (when interlaced = field height) 103 105 104 106 Int m_iSourceHeightOrg; ///< original source height in pixel (when interlaced = frame height) 105 106 107 108 Bool m_isField; ///< enable field coding 109 Bool m_isTopFieldFirst; 110 107 111 Int m_conformanceWindowMode; 108 112 Int m_confWinLeft; … … 113 117 Int m_aiPad[2]; ///< number of padded pixels for width and height 114 118 #endif 115 #if AUXILIARY_PICTURES 119 InputColourSpaceConversion m_inputColourSpaceConvert; ///< colour space conversion to apply to input video 120 Bool m_snrInternalColourSpace; ///< if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied. 121 Bool m_outputInternalColourSpace; ///< if true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied. 122 #if !SVC_EXTENSION 116 123 ChromaFormat m_InputChromaFormatIDC; 117 124 #endif 118 Bool m_isField; ///< enable field coding 119 Bool m_isTopFieldFirst; 120 121 // profile/level 122 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT 125 126 Bool m_printMSEBasedSequencePSNR; 127 Bool m_printFrameMSE; 128 Bool m_printSequenceMSE; 129 Bool m_cabacZeroWordPaddingEnabled; 130 131 #if MULTIPLE_PTL_SUPPORT 123 132 Int m_numPTLInfo; 124 Int m_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; ///< scalability_mask125 133 Profile::Name m_profileList[MAX_NUM_LAYER_IDS + 1]; 126 134 Level::Tier m_levelTierList[MAX_NUM_LAYER_IDS + 1]; … … 134 142 std::vector< std::vector<Int> > m_listOfLayerPTLofOlss; 135 143 #else 144 // profile/level 136 145 Profile::Name m_profile; 137 146 Level::Tier m_levelTier; 138 147 Level::Name m_level; 148 UInt m_bitDepthConstraint; 149 ChromaFormat m_chromaFormatConstraint; 150 Bool m_intraConstraintFlag; 151 Bool m_lowerBitRateConstraintFlag; 139 152 Bool m_progressiveSourceFlag; 140 153 Bool m_interlacedSourceFlag; … … 164 177 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 165 178 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 179 Bool m_useCrossComponentPrediction; ///< flag enabling the use of cross-component prediction 180 Bool m_reconBasedCrossCPredictionEstimate; ///< causes the alpha calculation in encoder search to be based on the decoded residual rather than the pre-transform encoder-side residual 181 UInt m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE]; ///< number of bits for the upward bit shift operation on the decoded SAO offsets 166 182 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 167 183 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping 184 UInt m_transformSkipLog2MaxSize; ///< transform-skip maximum size (minimum of 2) 185 Bool m_useResidualRotation; ///< control flag for transform-skip/transquant-bypass residual rotation 186 Bool m_useSingleSignificanceMapContext; ///< control flag for transform-skip/transquant-bypass single significance map context 187 Bool m_useResidualDPCM[NUMBER_OF_RDPCM_SIGNALLING_MODES];///< control flags for residual DPCM 168 188 Bool m_enableAMP; 189 Bool m_useGolombRiceParameterAdaptation; ///< control flag for Golomb-Rice parameter adaptation over each slice 190 Bool m_alignCABACBeforeBypass; 191 169 192 // coding quality 170 193 #if !SVC_EXTENSION … … 177 200 UInt m_uiDeltaQpRD; ///< dQP range for multi-pass slice QP optimization 178 201 Int m_iMaxCuDQPDepth; ///< Max. depth for a minimum CuDQPSize (0:default) 179 180 Int m_cbQpOffset; ///< Chroma Cb QP Offset (0:default) 202 Int m_maxCUChromaQpAdjustmentDepth; 203 204 Int m_cbQpOffset; ///< Chroma Cb QP Offset (0:default) 181 205 Int m_crQpOffset; ///< Chroma Cr QP Offset (0:default) 182 206 … … 184 208 Bool m_bUseAdaptQpSelect; 185 209 #endif 210 TComSEIMasteringDisplay m_masteringDisplay; 186 211 187 212 Bool m_bUseAdaptiveQP; ///< Flag for enabling QP adaptation based on a psycho-visual model 188 213 Int m_iQPAdaptationRange; ///< dQP range by QP adaptation 189 214 190 215 Int m_maxTempLayer; ///< Max temporal layer 191 216 #if Q0108_TSA_STSA … … 195 220 #if !LAYER_CTB 196 221 // coding unit (CU) definition 222 // TODO: Remove MaxCUWidth/MaxCUHeight and replace with MaxCUSize. 197 223 UInt m_uiMaxCUWidth; ///< max. CU width in pixel 198 224 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 199 225 UInt m_uiMaxCUDepth; ///< max. CU depth 200 226 201 227 // transfom unit (TU) definition 202 228 UInt m_uiQuadtreeTULog2MaxSize; 203 229 UInt m_uiQuadtreeTULog2MinSize; 204 230 205 231 UInt m_uiQuadtreeTUMaxDepthInter; 206 232 UInt m_uiQuadtreeTUMaxDepthIntra; … … 209 235 // coding tools (bit-depth) 210 236 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 211 Int m_inputBitDepthY; ///< bit-depth of input file (luma component) 212 Int m_inputBitDepthC; ///< bit-depth of input file (chroma component) 213 Int m_outputBitDepthY; ///< bit-depth of output file (luma component) 214 Int m_outputBitDepthC; ///< bit-depth of output file (chroma component) 215 Int m_internalBitDepthY; ///< bit-depth codec operates at in luma (input/output files will be converted) 216 Int m_internalBitDepthC; ///< bit-depth codec operates at in chroma (input/output files will be converted) 217 #endif 218 #if AUXILIARY_PICTURES 237 Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input file 238 Int m_outputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of output file 239 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 240 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 241 Bool m_useExtendedPrecision; 242 Bool m_useHighPrecisionPredictionWeighting; 243 #endif 244 //coding tools (chroma format) 245 #if !SVC_EXTENSION 219 246 ChromaFormat m_chromaFormatIDC; 220 247 #endif … … 224 251 225 252 // coding tool (SAO) 226 Bool m_bUseSAO; 253 Bool m_bUseSAO; 227 254 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture 228 Bool m_sao LcuBoundary; ///< SAO parameter estimation using non-deblocked pixels for LCU bottom and right boundary areas255 Bool m_saoCtuBoundary; ///< SAO parameter estimation using non-deblocked pixels for CTU bottom and right boundary areas 229 256 // coding tools (loop filter) 230 257 Bool m_bLoopFilterDisable; ///< flag for using deblocking filter … … 234 261 Bool m_DeblockingFilterControlPresent; ///< deblocking filter control present flag in PPS 235 262 Bool m_DeblockingFilterMetric; ///< blockiness metric in encoder 236 263 237 264 // coding tools (PCM) 238 265 Bool m_usePCM; ///< flag for using IPCM … … 240 267 UInt m_uiPCMLog2MinSize; ///< log2 of minimum PCM block size 241 268 Bool m_bPCMFilterDisableFlag; ///< PCM filter disable flag 269 Bool m_enableIntraReferenceSmoothing; ///< flag for enabling(default)/disabling intra reference smoothing/filtering 242 270 243 271 // coding tools (encoder-only parameters) … … 246 274 Bool m_useRDOQ; ///< flag for using RD optimized quantization 247 275 Bool m_useRDOQTS; ///< flag for using RD optimized quantization for transform skip 248 Int m_rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) 276 Int m_rdPenalty; ///< RD-penalty for 32x32 TU for intra in non-intra slices (0: no RD-penalty, 1: RD-penalty, 2: maximum RD-penalty) 249 277 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 250 278 Int m_iSearchRange; ///< ME search range … … 252 280 Bool m_bUseFastEnc; ///< flag for using fast encoder setting 253 281 Bool m_bUseEarlyCU; ///< flag for using Early CU setting 254 Bool m_useFastDecisionForMerge; ///< flag for using Fast Decision Merge RD-Cost 282 Bool m_useFastDecisionForMerge; ///< flag for using Fast Decision Merge RD-Cost 255 283 Bool m_bUseCbfFastMode; ///< flag for using Cbf Fast PU Mode Decision 256 284 Bool m_useEarlySkipDetection; ///< flag for using Early SKIP Detection 257 #if FAST_INTRA_SHVC 258 Bool m_useFastIntraScalable; ///< flag for using Fast Intra Decision for Scalable HEVC 259 #endif 260 Int m_sliceMode; ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice, 285 Int m_sliceMode; ///< 0: no slice limits, 1 : max number of CTBs per slice, 2: max number of bytes per slice, 261 286 ///< 3: max number of tiles per slice 262 287 Int m_sliceArgument; ///< argument according to selected slice mode 263 Int m_sliceSegmentMode; ///< 0: no slice segment limits, 1 : max number of CTBs per slice segment, 2: max number of bytes per slice segment, 288 Int m_sliceSegmentMode; ///< 0: no slice segment limits, 1 : max number of CTBs per slice segment, 2: max number of bytes per slice segment, 264 289 ///< 3: max number of tiles per slice segment 265 290 Int m_sliceSegmentArgument; ///< argument according to selected slice segment mode … … 274 299 #if !SVC_EXTENSION 275 300 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 301 Int m_iWaveFrontFlush; //< enable(1)/disable(0) the CABAC flush at the end of each line of LCUs. 276 302 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). 277 303 #endif 278 304 Bool m_bUseConstrainedIntraPred; ///< flag for using constrained intra prediction 305 279 306 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 280 307 Int m_recoveryPointSEIEnabled; … … 282 309 Int m_pictureTimingSEIEnabled; 283 310 Bool m_toneMappingInfoSEIEnabled; 311 Bool m_chromaSamplingFilterSEIenabled; 312 Int m_chromaSamplingHorFilterIdc; 313 Int m_chromaSamplingVerFilterIdc; 284 314 Int m_toneMapId; 285 315 Bool m_toneMapCancelFlag; … … 287 317 Int m_toneMapCodedDataBitDepth; 288 318 Int m_toneMapTargetBitDepth; 289 Int m_toneMapModelId; 319 Int m_toneMapModelId; 290 320 Int m_toneMapMinValue; 291 321 Int m_toneMapMaxValue; … … 313 343 Int m_framePackingSEIQuincunx; 314 344 Int m_framePackingSEIInterpretation; 345 Int m_segmentedRectFramePackingSEIEnabled; 346 Bool m_segmentedRectFramePackingSEICancel; 347 Int m_segmentedRectFramePackingSEIType; 348 Bool m_segmentedRectFramePackingSEIPersistence; 315 349 Int m_displayOrientationSEIAngle; 316 350 Int m_temporalLevel0IndexSEIEnabled; 317 351 Int m_gradualDecodingRefreshInfoEnabled; 352 Int m_noDisplaySEITLayer; 318 353 Int m_decodingUnitInfoSEIEnabled; 319 #if LAYERS_NOT_PRESENT_SEI320 Int m_layersNotPresentSEIEnabled;321 #endif322 354 Int m_SOPDescriptionSEIEnabled; 323 355 Int m_scalableNestingSEIEnabled; 324 #if Q0189_TMVP_CONSTRAINTS 325 Int m_TMVPConstraintsSEIEnabled; 326 #endif 356 Bool m_tmctsSEIEnabled; 357 Bool m_timeCodeSEIEnabled; 358 Int m_timeCodeSEINumTs; 359 TComSEITimeSet m_timeSetArray[MAX_TIMECODE_SEI_SETS]; 360 Bool m_kneeSEIEnabled; 361 Int m_kneeSEIId; 362 Bool m_kneeSEICancelFlag; 363 Bool m_kneeSEIPersistenceFlag; 364 Int m_kneeSEIInputDrange; 365 Int m_kneeSEIInputDispLuminance; 366 Int m_kneeSEIOutputDrange; 367 Int m_kneeSEIOutputDispLuminance; 368 Int m_kneeSEINumKneePointsMinus1; 369 Int* m_kneeSEIInputKneePoint; 370 Int* m_kneeSEIOutputKneePoint; 327 371 // weighted prediction 328 372 Bool m_useWeightedPred; ///< Use of weighted prediction in P slices 329 373 Bool m_useWeightedBiPred; ///< Use of bi-directional weighted prediction in B slices 330 374 331 375 UInt m_log2ParallelMergeLevel; ///< Parallel merge estimation region 332 376 UInt m_maxNumMergeCand; ///< Max number of merge candidates … … 338 382 Int m_RCTargetBitrate; ///< target bitrate when rate control is enabled 339 383 Int m_RCKeepHierarchicalBit; ///< 0: equal bit allocation; 1: fixed ratio bit allocation; 2: adaptive ratio bit allocation 340 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control 341 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level 384 Bool m_RCLCULevelRC; ///< true: LCU level rate control; false: picture level rate control NOTE: code-tidy - rename to m_RCCtuLevelRC 385 Bool m_RCUseLCUSeparateModel; ///< use separate R-lambda model at LCU level NOTE: code-tidy - rename to m_RCUseCtuSeparateModel 342 386 Int m_RCInitialQP; ///< inital QP for rate control 343 387 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 344 388 #endif 345 Int m_useScalingListId;///< using quantization matrix389 ScalingListMode m_useScalingListId; ///< using quantization matrix 346 390 Char* m_scalingListFile; ///< quantization matrix file name 347 391 348 392 Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. 349 393 Bool m_CUTransquantBypassFlagForce; ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true. 394 CostMode m_costMode; ///< Cost mode to use 350 395 351 396 Bool m_recalculateQPAccordingToLambda; ///< recalculate QP value according to the lambda value … … 387 432 Int m_log2MaxMvLengthHorizontal; ///< Indicate the maximum absolute value of a decoded horizontal MV component in quarter-pel luma units 388 433 Int m_log2MaxMvLengthVertical; ///< Indicate the maximum absolute value of a decoded vertical MV component in quarter-pel luma units 434 435 #if LAYERS_NOT_PRESENT_SEI 436 Int m_layersNotPresentSEIEnabled; 437 #endif 438 439 #if SVC_EXTENSION 440 #if FAST_INTRA_SHVC 441 Bool m_useFastIntraScalable; ///< flag for using Fast Intra Decision for Scalable HEVC 442 #endif 443 #if Q0189_TMVP_CONSTRAINTS 444 Int m_TMVPConstraintsSEIEnabled; 445 #endif 389 446 #if O0153_ALT_OUTPUT_LAYER_FLAG 390 447 Bool m_altOutputLayerFlag; ///< Specifies the value of alt_output_laye_flag in VPS extension 391 448 #endif 392 393 #if SVC_EXTENSION394 449 Int m_elRapSliceBEnabled; 395 450 #endif 396 451 #if Q0074_COLOUR_REMAPPING_SEI 397 452 #if !SVC_EXTENSION 398 stringm_colourRemapSEIFile;453 Char* m_colourRemapSEIFile; 399 454 Int m_colourRemapSEIId; 400 455 Bool m_colourRemapSEICancelFlag; … … 424 479 Void xSetGlobal (); ///< set global variables 425 480 #endif 481 #if SVC_EXTENSION 482 Void xCheckParameter (UInt layerId); ///< check validity of configuration values per layer 483 #else 426 484 Void xCheckParameter (); ///< check validity of configuration values 485 #endif 427 486 Void xPrintParameter (); ///< print configuration values 428 487 Void xPrintUsage (); ///< print usage … … 452 511 #endif 453 512 Bool m_crossLayerIrapAlignFlag; 454 #if P0050_KNEE_FUNCTION_SEI455 Bool m_kneeSEIEnabled;456 Int m_kneeSEIId;457 Bool m_kneeSEICancelFlag;458 Bool m_kneeSEIPersistenceFlag;459 Bool m_kneeSEIMappingFlag;460 Int m_kneeSEIInputDrange;461 Int m_kneeSEIInputDispLuminance;462 Int m_kneeSEIOutputDrange;463 Int m_kneeSEIOutputDispLuminance;464 Int m_kneeSEINumKneePointsMinus1;465 Int* m_kneeSEIInputKneePoint;466 Int* m_kneeSEIOutputKneePoint;467 #endif468 513 #if Q0096_OVERLAY_SEI 469 514 Bool m_overlaySEIEnabled; … … 514 559 TAppEncCfg(); 515 560 virtual ~TAppEncCfg(); 516 561 517 562 public: 518 563 Void create (); ///< create option handling class … … 525 570 Int getGOPSize() {return m_iGOPSize; } 526 571 #if O0194_DIFFERENT_BITDEPTH_EL_BL 527 UInt getInternalBitDepthY(Int iLayer) {return m_acLayerCfg[iLayer].m_internalBitDepthY; } 528 UInt getInternalBitDepthC(Int iLayer) {return m_acLayerCfg[iLayer].m_internalBitDepthC; } 572 UInt getInternalBitDepth(Int iLayer, ChannelType type) {return m_acLayerCfg[iLayer].m_internalBitDepth[type]; } 529 573 Bool getPCMInputBitDepthFlag() {return m_bPCMInputBitDepthFlag; } 530 574 #else 531 UInt getInternalBitDepthY() {return m_internalBitDepthY; } 532 UInt getInternalBitDepthC() {return m_internalBitDepthC; } 575 UInt getInternalBitDepth( ChannelType type ) {return m_internalBitDepth[type]; } 533 576 #endif 534 577 #if !LAYER_CTB -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r925 r1029 192 192 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 193 193 #if AUXILIARY_PICTURES 194 m_InputChromaFormat = numberToChromaFormat(tmpInputChromaFormat);195 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormat ) : (numberToChromaFormat(tmpChromaFormat)));194 m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 195 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 196 196 #endif 197 197 #if Q0074_COLOUR_REMAPPING_SEI … … 300 300 Void TAppEncLayerCfg::xPrintParameter() 301 301 { 302 printf("Input File : %s\n", m_cInputFile.c_str() );303 printf("Reconstruction File : %s\n", m_cReconFile.c_str() );302 printf("Input File : %s\n", m_cInputFile.c_str() ); 303 printf("Reconstruction File : %s\n", m_cReconFile.c_str() ); 304 304 #if REPN_FORMAT_IN_VPS 305 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate );305 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - ( m_confWinLeft + m_confWinRight ) * TComSPS::getWinUnitX( m_chromaFormatIDC ), m_iSourceHeight - ( m_confWinTop + m_confWinBottom ) * TComSPS::getWinUnitY( m_chromaFormatIDC ), m_iFrameRate ); 306 306 #else 307 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 308 #endif 309 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 307 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 308 #endif 309 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 310 #if MULTIPLE_PTL_SUPPORT 311 printf("PTL index : %d\n", m_layerPTLIdx ); 312 #endif 310 313 #if O0194_DIFFERENT_BITDEPTH_EL_BL 311 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepthY , m_inputBitDepthC ); 312 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC ); 313 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepthY : m_internalBitDepthY, m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepthC : m_internalBitDepthC ); 314 #endif 314 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); 315 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 316 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 317 #endif 318 std::cout << "Input ChromaFormatIDC :"; 319 320 switch (m_InputChromaFormatIDC) 321 { 322 case CHROMA_400: std::cout << " 4:0:0"; break; 323 case CHROMA_420: std::cout << " 4:2:0"; break; 324 case CHROMA_422: std::cout << " 4:2:2"; break; 325 case CHROMA_444: std::cout << " 4:4:4"; break; 326 default: 327 std::cerr << "Invalid"; 328 exit(1); 329 } 330 std::cout << std::endl; 331 332 std::cout << "Output (internal) ChromaFormatIDC :"; 333 switch (m_chromaFormatIDC) 334 { 335 case CHROMA_400: std::cout << " 4:0:0"; break; 336 case CHROMA_420: std::cout << " 4:2:0"; break; 337 case CHROMA_422: std::cout << " 4:2:2"; break; 338 case CHROMA_444: std::cout << " 4:4:4"; break; 339 default: 340 std::cerr << "Invalid"; 341 exit(1); 342 } 343 printf("\n"); 315 344 #if LAYER_CTB 316 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth );317 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize );318 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter);319 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra);320 #endif 321 printf("QP : %5.2f\n", m_fQP );322 printf("Intra period : %d\n", m_iIntraPeriod );323 #if RC_SHVC_HARMONIZATION 324 printf("RateControl : %d\n", m_RCEnableRateControl );345 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 346 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 347 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 348 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 349 #endif 350 printf("QP : %5.2f\n", m_fQP ); 351 printf("Intra period : %d\n", m_iIntraPeriod ); 352 #if RC_SHVC_HARMONIZATION 353 printf("RateControl : %d\n", m_RCEnableRateControl ); 325 354 if(m_RCEnableRateControl) 326 355 { 327 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 328 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit ); 329 printf("LCULevelRC : %d\n", m_RCLCULevelRC ); 330 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel ); 331 printf("InitialQP : %d\n", m_RCInitialQP ); 332 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 333 } 334 #endif 335 printf("WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_waveFrontSynchro, m_iWaveFrontSubstreams); 356 printf("TargetBitrate : %d\n", m_RCTargetBitrate ); 357 printf("KeepHierarchicalBit : %d\n", m_RCKeepHierarchicalBit ); 358 printf("LCULevelRC : %d\n", m_RCLCULevelRC ); 359 printf("UseLCUSeparateModel : %d\n", m_RCUseLCUSeparateModel ); 360 printf("InitialQP : %d\n", m_RCInitialQP ); 361 printf("ForceIntraQP : %d\n", m_RCForceIntraQP ); 362 } 363 #endif 364 printf("WaveFrontSynchro : %d\n", m_waveFrontSynchro); 365 printf("WaveFrontSubstreams : %d\n", m_iWaveFrontSubstreams); 336 366 #if LAYER_CTB 337 printf("PCM :%d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0);367 printf("PCM : %d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0); 338 368 #endif 339 369 } … … 363 393 fprintf(stderr, "Warning: Automatic padding enabled, but padding parameters are also set\n"); 364 394 } 395 365 396 // automatic padding to minimum CU size 366 397 #if LAYER_CTB … … 399 430 fprintf(stderr, "Warning: Automatic padding enabled, but cropping parameters are set. Undesired size possible.\n"); 400 431 } 432 401 433 //padding 402 434 m_iSourceWidth += m_aiPad[0]; … … 470 502 471 503 #if O0194_DIFFERENT_BITDEPTH_EL_BL 472 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 473 { 474 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY(layer) - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 475 } 504 xConfirmPara( m_iQP < -6 * (m_internalBitDepth[CHANNEL_TYPE_LUMA] - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 476 505 #else 477 506 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY() - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r978 r1029 10 10 #include "TLibEncoder/TEncCfg.h" 11 11 #include <sstream> 12 #include <iomanip> 12 13 13 14 using namespace std; … … 42 43 Int m_iIntraPeriod; ///< period of I-slice (random access period) 43 44 Double m_fQP; ///< QP value of key-picture (floating point) 45 ChromaFormat m_chromaFormatIDC; 46 ChromaFormat m_InputChromaFormatIDC; 47 ChromaFormat m_chromaFormatConstraint; 48 UInt m_bitDepthConstraint; 49 Bool m_intraConstraintFlag; 50 Bool m_lowerBitRateConstraintFlag; 44 51 #if AUXILIARY_PICTURES 45 ChromaFormat m_chromaFormatIDC; 46 ChromaFormat m_InputChromaFormat; 47 Int m_auxId; 52 Int m_auxId; 48 53 #endif 49 54 #if VPS_EXTN_DIRECT_REF_LAYERS … … 88 93 Int* m_aidQP; ///< array of slice QP values 89 94 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 90 Int m_numScaledRefLayerOffsets 95 Int m_numScaledRefLayerOffsets; 91 96 #if O0098_SCALED_REF_LAYER_ID 92 97 Int m_scaledRefLayerId [MAX_LAYERS]; … … 115 120 #endif 116 121 117 #if O0194_DIFFERENT_BITDEPTH_EL_BL 118 Int m_ inputBitDepthY; ///< bit-depth of input file (luma component)119 Int m_ inputBitDepthC; ///< bit-depth of input file (chroma component)120 Int m_internalBitDepth Y; ///< bit-depth codec operates at in luma(input/output files will be converted)121 Int m_internalBitDepthC; ///< bit-depth codec operates at in chroma (input/output files will be converted)122 Int m_outputBitDepthY; ///< bit-depth of output file (luma component)123 Int m_outputBitDepthC; ///< bit-depth of output file (chroma component)124 #endif 122 Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input file 123 Int m_outputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of output file 124 Int m_MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input samples after MSB extension 125 Int m_internalBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit-depth codec operates at (input/output files will be converted) 126 UInt m_saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE]; 127 Bool m_useExtendedPrecision; 128 Bool m_useHighPrecisionPredictionWeighting; 129 125 130 #if REPN_FORMAT_IN_VPS 126 131 Int m_repFormatIdx; … … 154 159 #endif 155 160 161 #if MULTIPLE_PTL_SUPPORT 162 // profile/level 163 Int m_layerPTLIdx; 164 #endif 165 156 166 public: 157 167 TAppEncLayerCfg(); … … 182 192 Int getConfWinBottom() {return m_confWinBottom; } 183 193 #if AUXILIARY_PICTURES 184 ChromaFormat getInputChromaFormat() {return m_InputChromaFormat ;}194 ChromaFormat getInputChromaFormat() {return m_InputChromaFormatIDC;} 185 195 ChromaFormat getChromaFormatIDC() {return m_chromaFormatIDC; } 186 196 Int getAuxId() {return m_auxId; } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1011 r1029 42 42 #include <fcntl.h> 43 43 #include <assert.h> 44 #if !SVC_EXTENSION 45 #include <iomanip> 46 #endif 44 47 45 48 #include "TAppEncTop.h" … … 80 83 vps->setVpsPocLsbAlignedFlag(false); 81 84 #endif 82 vps->setMaxTLayers ( m_maxTempLayer );85 vps->setMaxTLayers ( m_maxTempLayer ); 83 86 if (m_maxTempLayer == 1) 84 87 { … … 87 90 for(Int i = 0; i < MAX_TLAYER; i++) 88 91 { 89 vps->setNumReorderPics ( m_numReorderPics[i], i );90 vps->setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i );92 vps->setNumReorderPics ( m_numReorderPics[i], i ); 93 vps->setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 91 94 } 92 95 … … 107 110 #endif 108 111 #if O0194_DIFFERENT_BITDEPTH_EL_BL 109 && m_acLayerCfg[layer].m_internalBitDepth Y == m_acLayerCfg[idx].m_internalBitDepthY && m_acLayerCfg[layer].m_internalBitDepthC == m_acLayerCfg[idx].m_internalBitDepthC112 && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_LUMA] && m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA] == m_acLayerCfg[idx].m_internalBitDepth[CHANNEL_TYPE_CHROMA] 110 113 #endif 111 114 ) … … 150 153 } 151 154 152 vps->setVpsNumRepFormats ( maxRepFormatIdx + 1 );155 vps->setVpsNumRepFormats ( maxRepFormatIdx + 1 ); 153 156 154 157 #if Q0195_REP_FORMAT_CLEANUP 155 158 // When not present, the value of rep_format_idx_present_flag is inferred to be equal to 0 156 vps->setRepFormatIdxPresentFlag ( vps->getVpsNumRepFormats() > 1 ? true : false );157 #else 158 vps->setRepFormatIdxPresentFlag ( true );159 vps->setRepFormatIdxPresentFlag ( vps->getVpsNumRepFormats() > 1 ? true : false ); 160 #else 161 vps->setRepFormatIdxPresentFlag ( true ); 159 162 #endif 160 163 … … 163 166 RepFormat *repFormat = vps->getVpsRepFormat( idx ); 164 167 #if REPN_FORMAT_CONTROL_FLAG 165 repFormat->setChromaAndBitDepthVpsPresentFlag ( true );168 repFormat->setChromaAndBitDepthVpsPresentFlag ( true ); 166 169 if (idx==0) 167 170 { … … 169 172 } 170 173 #endif 171 repFormat->setPicWidthVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceWidth() );172 repFormat->setPicHeightVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceHeight() );174 repFormat->setPicWidthVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceWidth() ); 175 repFormat->setPicHeightVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceHeight() ); 173 176 #if AUXILIARY_PICTURES 174 repFormat->setChromaFormatVpsIdc ( m_acLayerCfg[mapIdxToLayer[idx]].getChromaFormatIDC() );175 #else 176 repFormat->setChromaFormatVpsIdc ( 1); // Need modification to change for each layer - corresponds to 420177 #endif 178 repFormat->setSeparateColourPlaneVpsFlag ( 0); // Need modification to change for each layer177 repFormat->setChromaFormatVpsIdc ( m_acLayerCfg[mapIdxToLayer[idx]].getChromaFormatIDC() ); 178 #else 179 repFormat->setChromaFormatVpsIdc ( 1 ); // Need modification to change for each layer - corresponds to 420 180 #endif 181 repFormat->setSeparateColourPlaneVpsFlag ( 0 ); // Need modification to change for each layer 179 182 #if O0194_DIFFERENT_BITDEPTH_EL_BL 180 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY(mapIdxToLayer[idx]) ); // Need modification to change for each layer181 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC(mapIdxToLayer[idx])); // Need modification to change for each layer182 #else 183 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY() ); // Need modification to change for each layer184 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC()); // Need modification to change for each layer183 repFormat->setBitDepthVpsLuma ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_LUMA) ); // Need modification to change for each layer 184 repFormat->setBitDepthVpsChroma ( getInternalBitDepth(mapIdxToLayer[idx], CHANNEL_TYPE_CHROMA) ); // Need modification to change for each layer 185 #else 186 repFormat->setBitDepthVpsLuma ( getInternalBitDepth(CHANNEL_TYPE_LUMA) ); // Need modification to change for each layer 187 repFormat->setBitDepthVpsChroma ( getInternalBitDepth(CHANNEL_TYPE_CHROMA) ); // Need modification to change for each layer 185 188 #endif 186 189 187 190 #if R0156_CONF_WINDOW_IN_REP_FORMAT 188 repFormat->getConformanceWindowVps().setWindow( 189 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinLeft, 190 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinRight, 191 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinTop, 192 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinBottom ); 191 repFormat->getConformanceWindowVps().setWindow ( m_acLayerCfg[mapIdxToLayer[idx]].m_confWinLeft, 192 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinRight, 193 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinTop, 194 m_acLayerCfg[mapIdxToLayer[idx]].m_confWinBottom ); 193 195 #endif 194 196 195 197 #if HIGHER_LAYER_IRAP_SKIP_FLAG 196 m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch ( m_skipPictureAtArcSwitch );198 m_acTEncTop[mapIdxToLayer[idx]].setSkipPictureAtArcSwitch ( m_skipPictureAtArcSwitch ); 197 199 #endif 198 200 } … … 203 205 //Populate PTL in VPS 204 206 TComVPS *pVPS = m_acTEncTop[0].getVPS(); 205 for (int ii = 0; ii < m_numPTLInfo; ii++)207 for( Int ii = 0; ii < m_numPTLInfo; ii++ ) 206 208 { 207 209 pVPS->getPTL(ii)->getGeneralPTL()->setLevelIdc(m_levelList[ii]); … … 221 223 { 222 224 myvector = m_listOfLayerPTLofOlss[ii]; 225 223 226 for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it) 224 227 { … … 226 229 } 227 230 } 228 229 //pVPS->setProfileLevelTierIdx(230 231 #endif 231 232 … … 236 237 #if O0194_DIFFERENT_BITDEPTH_EL_BL 237 238 //1 238 g_bitDepth Y = m_acLayerCfg[layer].m_internalBitDepthY;239 g_bitDepth C = m_acLayerCfg[layer].m_internalBitDepthC;240 241 g_ uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;242 g_ uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;239 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 240 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 241 242 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 243 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 243 244 244 245 // Set this to be used in Upsampling filter in function "TComUpsampleFilter::upsampleBasePic" 245 g_bitDepth YLayer[layer] = g_bitDepthY;246 g_bitDepth CLayer[layer] = g_bitDepthC;246 g_bitDepthLayer[CHANNEL_TYPE_LUMA][layer] = g_bitDepth[CHANNEL_TYPE_LUMA]; 247 g_bitDepthLayer[CHANNEL_TYPE_CHROMA][layer] = g_bitDepth[CHANNEL_TYPE_CHROMA]; 247 248 248 249 #if O0194_WEIGHTED_PREDICTION_CGS 249 m_acTEncTop[layer].setInterLayerWeightedPredFlag( m_useInterLayerWeightedPred ); 250 #endif 251 #endif 252 //m_acTEncTop[layer].setVPS(&vps); 253 m_acTEncTop[layer].setFrameRate ( m_acLayerCfg[layer].getFrameRate() ); 254 m_acTEncTop[layer].setFrameSkip ( m_FrameSkip ); 255 m_acTEncTop[layer].setSourceWidth ( m_acLayerCfg[layer].getSourceWidth() ); 256 m_acTEncTop[layer].setSourceHeight ( m_acLayerCfg[layer].getSourceHeight() ); 257 m_acTEncTop[layer].setConformanceWindow ( m_acLayerCfg[layer].m_confWinLeft, m_acLayerCfg[layer].m_confWinRight, m_acLayerCfg[layer].m_confWinTop, m_acLayerCfg[layer].m_confWinBottom ); 258 m_acTEncTop[layer].setFramesToBeEncoded ( m_framesToBeEncoded ); 259 260 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT 261 m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]); 262 m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]); 263 m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]); 264 m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]); 265 m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]); 266 m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]); 267 #else 268 m_acTEncTop[layer].setProfile(m_profile); 269 m_acTEncTop[layer].setLevel(m_levelTier, m_level); 270 m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlag); 271 m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlag); 272 m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 273 m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 274 #endif 250 m_acTEncTop[layer].setInterLayerWeightedPredFlag ( m_useInterLayerWeightedPred ); 251 #endif 252 #endif 253 254 #if MULTIPLE_PTL_SUPPORT 255 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; 256 m_acTEncTop[layer].setProfile ( m_profileList[layerPTLIdx] ); 257 m_acTEncTop[layer].setLevel ( m_levelTierList[layerPTLIdx], m_levelList[layerPTLIdx] ); 258 m_acTEncTop[layer].setProgressiveSourceFlag ( m_progressiveSourceFlagList[layerPTLIdx] ); 259 m_acTEncTop[layer].setInterlacedSourceFlag ( m_interlacedSourceFlagList[layerPTLIdx] ); 260 m_acTEncTop[layer].setNonPackedConstraintFlag ( m_nonPackedConstraintFlagList[layerPTLIdx] ); 261 m_acTEncTop[layer].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlagList[layerPTLIdx] ); 262 m_acTEncTop[layer].setBitDepthConstraintValue ( m_acLayerCfg[layer].m_bitDepthConstraint ); 263 m_acTEncTop[layer].setChromaFormatConstraintValue ( m_acLayerCfg[layer].m_chromaFormatConstraint ); 264 m_acTEncTop[layer].setIntraConstraintFlag ( m_acLayerCfg[layer].m_intraConstraintFlag ); 265 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_acLayerCfg[layer].m_lowerBitRateConstraintFlag ); 266 #else 267 m_acTEncTop[layer].setProfile ( m_profile ); 268 m_acTEncTop[layer].setLevel ( m_levelTier, m_level ); 269 m_acTEncTop[layer].setProgressiveSourceFlag ( m_progressiveSourceFlag ); 270 m_acTEncTop[layer].setInterlacedSourceFlag ( m_interlacedSourceFlag ); 271 m_acTEncTop[layer].setNonPackedConstraintFlag ( m_nonPackedConstraintFlag ); 272 m_acTEncTop[layer].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag ); 273 m_acTEncTop[layer].setBitDepthConstraintValue ( m_bitDepthConstraint ); 274 m_acTEncTop[layer].setChromaFormatConstraintValue ( m_acLayerCfg[layer].m_chromaFormatConstraint ); 275 m_acTEncTop[layer].setIntraConstraintFlag ( m_intraConstraintFlag ); 276 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_lowerBitRateConstraintFlag ); 277 #endif 278 279 m_acTEncTop[layer].setPrintMSEBasedSequencePSNR ( m_printMSEBasedSequencePSNR); 280 m_acTEncTop[layer].setPrintFrameMSE ( m_printFrameMSE); 281 m_acTEncTop[layer].setPrintSequenceMSE ( m_printSequenceMSE); 282 m_acTEncTop[layer].setCabacZeroWordPaddingEnabled ( m_cabacZeroWordPaddingEnabled ); 283 284 m_acTEncTop[layer].setFrameRate ( m_acLayerCfg[layer].getFrameRate() ); 285 m_acTEncTop[layer].setFrameSkip ( m_FrameSkip ); 286 m_acTEncTop[layer].setSourceWidth ( m_acLayerCfg[layer].getSourceWidth() ); 287 m_acTEncTop[layer].setSourceHeight ( m_acLayerCfg[layer].getSourceHeight() ); 288 m_acTEncTop[layer].setConformanceWindow ( m_acLayerCfg[layer].m_confWinLeft, m_acLayerCfg[layer].m_confWinRight, m_acLayerCfg[layer].m_confWinTop, m_acLayerCfg[layer].m_confWinBottom ); 289 m_acTEncTop[layer].setFramesToBeEncoded ( m_framesToBeEncoded ); 275 290 276 291 #if REF_IDX_MFM 277 292 #if AVC_BASE 278 293 #if VPS_AVC_BL_FLAG_REMOVAL 279 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_nonHEVCBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());280 #else 281 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers());282 #endif 283 #else 284 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) );294 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_nonHEVCBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers()); 295 #else 296 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_avcBaseLayerFlag ? false : true ) && m_acLayerCfg[layer].getNumMotionPredRefLayers()); 297 #endif 298 #else 299 m_acTEncTop[layer].setMFMEnabledFlag (layer == 0 ? false : ( m_acLayerCfg[layer].getNumMotionPredRefLayers() > 0 ) ); 285 300 #endif 286 301 #endif … … 291 306 292 307 //====== Coding Structure ======== 293 m_acTEncTop[layer].setIntraPeriod ( m_acLayerCfg[layer].m_iIntraPeriod );294 m_acTEncTop[layer].setDecodingRefreshType ( m_iDecodingRefreshType );295 m_acTEncTop[layer].setGOPSize ( m_iGOPSize );308 m_acTEncTop[layer].setIntraPeriod ( m_acLayerCfg[layer].m_iIntraPeriod ); 309 m_acTEncTop[layer].setDecodingRefreshType ( m_iDecodingRefreshType ); 310 m_acTEncTop[layer].setGOPSize ( m_iGOPSize ); 296 311 #if Q0108_TSA_STSA 297 m_acTEncTop[layer].setGopList ( layer ? m_EhGOPList[layer] : m_GOPList );298 #else 299 m_acTEncTop[layer].setGopList ( m_GOPList );312 m_acTEncTop[layer].setGopList ( layer ? m_EhGOPList[layer] : m_GOPList ); 313 #else 314 m_acTEncTop[layer].setGopList ( m_GOPList ); 300 315 #endif 301 316 302 317 #if !Q0108_TSA_STSA 303 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs );304 #else 305 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs[layer] );318 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs ); 319 #else 320 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs[layer] ); 306 321 #endif 307 322 for(Int i = 0; i < MAX_TLAYER; i++) 308 323 { 309 m_acTEncTop[layer].setNumReorderPics ( m_numReorderPics[i], i );310 m_acTEncTop[layer].setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i );324 m_acTEncTop[layer].setNumReorderPics ( m_numReorderPics[i], i ); 325 m_acTEncTop[layer].setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 311 326 } 312 327 for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop ) 313 328 { 314 m_acTEncTop[layer].setLambdaModifier ( uiLoop, m_adLambdaModifier[ uiLoop ] );315 } 316 m_acTEncTop[layer].setQP ( m_acLayerCfg[layer].getIntQP() );317 318 m_acTEncTop[layer].setPad ( m_acLayerCfg[layer].getPad() );329 m_acTEncTop[layer].setLambdaModifier ( uiLoop, m_adLambdaModifier[ uiLoop ] ); 330 } 331 m_acTEncTop[layer].setQP ( m_acLayerCfg[layer].getIntQP() ); 332 333 m_acTEncTop[layer].setPad ( m_acLayerCfg[layer].getPad() ); 319 334 #if !Q0108_TSA_STSA 320 m_acTEncTop[layer].setMaxTempLayer ( m_maxTempLayer );335 m_acTEncTop[layer].setMaxTempLayer ( m_maxTempLayer ); 321 336 #else 322 337 if (layer== 0) 323 338 { 324 m_acTEncTop[layer].setMaxTempLayer ( m_maxTempLayer );339 m_acTEncTop[layer].setMaxTempLayer ( m_maxTempLayer ); 325 340 } 326 341 else 327 342 { 328 m_acTEncTop[layer].setMaxTempLayer ( m_EhMaxTempLayer[layer] );343 m_acTEncTop[layer].setMaxTempLayer ( m_EhMaxTempLayer[layer] ); 329 344 } 330 345 #endif … … 333 348 if( layer < m_numLayers - 1 ) 334 349 { 335 m_acTEncTop[layer].setMaxTidIlRefPicsPlus1 ( m_acLayerCfg[layer].getMaxTidIlRefPicsPlus1());350 m_acTEncTop[layer].setMaxTidIlRefPicsPlus1 ( m_acLayerCfg[layer].getMaxTidIlRefPicsPlus1()); 336 351 } 337 352 … … 341 356 for(Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1; i++) 342 357 { 343 m_acTEncTop[layer].setSamplePredEnabledFlag (i, false);344 m_acTEncTop[layer].setMotionPredEnabledFlag (i, false);358 m_acTEncTop[layer].setSamplePredEnabledFlag (i, false); 359 m_acTEncTop[layer].setMotionPredEnabledFlag (i, false); 345 360 } 346 361 if(m_acLayerCfg[layer].getNumSamplePredRefLayers() == -1) 347 362 { 348 363 // Not included in the configuration file; assume that each layer depends on previous layer 349 m_acTEncTop[layer].setNumSamplePredRefLayers (1); // One sample pred ref. layer350 m_acTEncTop[layer].setSamplePredRefLayerId (0, layer - 1); // Previous layer351 m_acTEncTop[layer].setSamplePredEnabledFlag (layer - 1, true);364 m_acTEncTop[layer].setNumSamplePredRefLayers (1); // One sample pred ref. layer 365 m_acTEncTop[layer].setSamplePredRefLayerId (0, layer - 1); // Previous layer 366 m_acTEncTop[layer].setSamplePredEnabledFlag (layer - 1, true); 352 367 } 353 368 else 354 369 { 355 m_acTEncTop[layer].setNumSamplePredRefLayers ( m_acLayerCfg[layer].getNumSamplePredRefLayers() );370 m_acTEncTop[layer].setNumSamplePredRefLayers ( m_acLayerCfg[layer].getNumSamplePredRefLayers() ); 356 371 for(Int i = 0; i < m_acTEncTop[layer].getNumSamplePredRefLayers(); i++) 357 372 { 358 m_acTEncTop[layer].setSamplePredRefLayerId ( i, m_acLayerCfg[layer].getSamplePredRefLayerId(i));359 m_acTEncTop[layer].setSamplePredEnabledFlag (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true);373 m_acTEncTop[layer].setSamplePredRefLayerId ( i, m_acLayerCfg[layer].getSamplePredRefLayerId(i)); 374 m_acTEncTop[layer].setSamplePredEnabledFlag (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true); 360 375 } 361 376 } … … 363 378 { 364 379 // Not included in the configuration file; assume that each layer depends on previous layer 365 m_acTEncTop[layer].setNumMotionPredRefLayers (1); // One motion pred ref. layer366 m_acTEncTop[layer].setMotionPredRefLayerId (0, layer - 1); // Previous layer367 m_acTEncTop[layer].setMotionPredEnabledFlag (layer - 1, true);380 m_acTEncTop[layer].setNumMotionPredRefLayers (1); // One motion pred ref. layer 381 m_acTEncTop[layer].setMotionPredRefLayerId (0, layer - 1); // Previous layer 382 m_acTEncTop[layer].setMotionPredEnabledFlag (layer - 1, true); 368 383 } 369 384 else 370 385 { 371 m_acTEncTop[layer].setNumMotionPredRefLayers ( m_acLayerCfg[layer].getNumMotionPredRefLayers() );386 m_acTEncTop[layer].setNumMotionPredRefLayers ( m_acLayerCfg[layer].getNumMotionPredRefLayers() ); 372 387 for(Int i = 0; i < m_acTEncTop[layer].getNumMotionPredRefLayers(); i++) 373 388 { 374 m_acTEncTop[layer].setMotionPredRefLayerId ( i, m_acLayerCfg[layer].getMotionPredRefLayerId(i));375 m_acTEncTop[layer].setMotionPredEnabledFlag (m_acLayerCfg[layer].getMotionPredRefLayerId(i), true);389 m_acTEncTop[layer].setMotionPredRefLayerId ( i, m_acLayerCfg[layer].getMotionPredRefLayerId(i)); 390 m_acTEncTop[layer].setMotionPredEnabledFlag (m_acLayerCfg[layer].getMotionPredRefLayerId(i), true); 376 391 } 377 392 } … … 384 399 if (m_acTEncTop[layer].getSamplePredEnabledFlag(i) || m_acTEncTop[layer].getMotionPredEnabledFlag(i)) 385 400 { 386 m_acTEncTop[layer].setRefLayerId (numDirectRefLayers, i);401 m_acTEncTop[layer].setRefLayerId (numDirectRefLayers, i); 387 402 numDirectRefLayers++; 388 403 } 389 404 } 390 m_acTEncTop[layer].setNumDirectRefLayers (numDirectRefLayers);405 m_acTEncTop[layer].setNumDirectRefLayers (numDirectRefLayers); 391 406 392 407 if(m_acLayerCfg[layer].getNumActiveRefLayers() == -1) 393 408 { 394 m_acTEncTop[layer].setNumActiveRefLayers ( m_acTEncTop[layer].getNumDirectRefLayers() );409 m_acTEncTop[layer].setNumActiveRefLayers ( m_acTEncTop[layer].getNumDirectRefLayers() ); 395 410 for( Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++ ) 396 411 { … … 400 415 else 401 416 { 402 m_acTEncTop[layer].setNumActiveRefLayers ( m_acLayerCfg[layer].getNumActiveRefLayers() );417 m_acTEncTop[layer].setNumActiveRefLayers ( m_acLayerCfg[layer].getNumActiveRefLayers() ); 403 418 for(Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++) 404 419 { 405 m_acTEncTop[layer].setPredLayerId ( i, m_acLayerCfg[layer].getPredLayerId(i));420 m_acTEncTop[layer].setPredLayerId ( i, m_acLayerCfg[layer].getPredLayerId(i)); 406 421 } 407 422 } … … 417 432 Int rlSubHeightC = 2; 418 433 #endif 419 m_acTEncTop[layer].setRefRegionOffsetPresentFlag ( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] );420 m_acTEncTop[layer].getRefLayerWindow(i).setWindow ( rlSubWidthC * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC * m_acLayerCfg[layer].m_refRegionRightOffset[i],421 rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i], rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]);434 m_acTEncTop[layer].setRefRegionOffsetPresentFlag ( i, m_acLayerCfg[layer].m_refRegionOffsetPresentFlag[i] ); 435 m_acTEncTop[layer].getRefLayerWindow(i).setWindow ( rlSubWidthC * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC * m_acLayerCfg[layer].m_refRegionRightOffset[i], 436 rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i], rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]); 422 437 } 423 438 #endif … … 432 447 433 448 //====== Loop/Deblock Filter ======== 434 m_acTEncTop[layer].setLoopFilterDisable ( m_bLoopFilterDisable );435 m_acTEncTop[layer].setLoopFilterOffsetInPPS ( m_loopFilterOffsetInPPS );436 m_acTEncTop[layer].setLoopFilterBetaOffset ( m_loopFilterBetaOffsetDiv2 );437 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 );438 m_acTEncTop[layer].setDeblockingFilterControlPresent ( m_DeblockingFilterControlPresent);439 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric );449 m_acTEncTop[layer].setLoopFilterDisable ( m_bLoopFilterDisable ); 450 m_acTEncTop[layer].setLoopFilterOffsetInPPS ( m_loopFilterOffsetInPPS ); 451 m_acTEncTop[layer].setLoopFilterBetaOffset ( m_loopFilterBetaOffsetDiv2 ); 452 m_acTEncTop[layer].setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 453 m_acTEncTop[layer].setDeblockingFilterControlPresent ( m_DeblockingFilterControlPresent); 454 m_acTEncTop[layer].setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 440 455 441 456 //====== Motion search ======== 442 m_acTEncTop[layer].setFastSearch ( m_iFastSearch );443 m_acTEncTop[layer].setSearchRange ( m_iSearchRange );444 m_acTEncTop[layer].setBipredSearchRange ( m_bipredSearchRange );457 m_acTEncTop[layer].setFastSearch ( m_iFastSearch ); 458 m_acTEncTop[layer].setSearchRange ( m_iSearchRange ); 459 m_acTEncTop[layer].setBipredSearchRange ( m_bipredSearchRange ); 445 460 446 461 //====== Quality control ======== 447 m_acTEncTop[layer].setMaxDeltaQP ( m_iMaxDeltaQP ); 448 m_acTEncTop[layer].setMaxCuDQPDepth ( m_iMaxCuDQPDepth ); 449 450 m_acTEncTop[layer].setChromaCbQpOffset ( m_cbQpOffset ); 451 m_acTEncTop[layer].setChromaCrQpOffset ( m_crQpOffset ); 462 m_acTEncTop[layer].setMaxDeltaQP ( m_iMaxDeltaQP ); 463 m_acTEncTop[layer].setMaxCuDQPDepth ( m_iMaxCuDQPDepth ); 464 m_acTEncTop[layer].setMaxCUChromaQpAdjustmentDepth ( m_maxCUChromaQpAdjustmentDepth ); 465 m_acTEncTop[layer].setChromaCbQpOffset ( m_cbQpOffset ); 466 m_acTEncTop[layer].setChromaCrQpOffset ( m_crQpOffset ); 467 468 m_acTEncTop[layer].setChromaFormatIdc ( m_acLayerCfg[layer].m_chromaFormatIDC ); 452 469 453 470 #if ADAPTIVE_QP_SELECTION 454 m_acTEncTop[layer].setUseAdaptQpSelect ( m_bUseAdaptQpSelect );471 m_acTEncTop[layer].setUseAdaptQpSelect ( m_bUseAdaptQpSelect ); 455 472 #endif 456 473 457 m_acTEncTop[layer].setUseAdaptiveQP ( m_bUseAdaptiveQP ); 458 m_acTEncTop[layer].setQPAdaptationRange ( m_iQPAdaptationRange ); 474 m_acTEncTop[layer].setUseAdaptiveQP ( m_bUseAdaptiveQP ); 475 m_acTEncTop[layer].setQPAdaptationRange ( m_iQPAdaptationRange ); 476 m_acTEncTop[layer].setUseExtendedPrecision ( m_acLayerCfg[layer].m_useExtendedPrecision ); 477 m_acTEncTop[layer].setUseHighPrecisionPredictionWeighting ( m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting ); 459 478 460 479 //====== Tool list ======== 461 m_acTEncTop[layer].setDeltaQpRD ( m_uiDeltaQpRD );462 m_acTEncTop[layer].setUseASR ( m_bUseASR );463 m_acTEncTop[layer].setUseHADME ( m_bUseHADME );464 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() );465 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ );466 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS );467 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty );480 m_acTEncTop[layer].setDeltaQpRD ( m_uiDeltaQpRD ); 481 m_acTEncTop[layer].setUseASR ( m_bUseASR ); 482 m_acTEncTop[layer].setUseHADME ( m_bUseHADME ); 483 m_acTEncTop[layer].setdQPs ( m_acLayerCfg[layer].getdQPs() ); 484 m_acTEncTop[layer].setUseRDOQ ( m_useRDOQ ); 485 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS ); 486 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty ); 468 487 #if LAYER_CTB 469 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); 470 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize ); 471 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter ); 472 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra ); 473 #else 474 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 475 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); 476 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 477 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 478 #endif 479 m_acTEncTop[layer].setUseFastEnc ( m_bUseFastEnc ); 480 m_acTEncTop[layer].setUseEarlyCU ( m_bUseEarlyCU ); 481 m_acTEncTop[layer].setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); 482 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); 483 m_acTEncTop[layer].setUseEarlySkipDetection ( m_useEarlySkipDetection ); 488 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); 489 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize ); 490 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter ); 491 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra ); 492 #else 493 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 494 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); 495 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 496 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 497 #endif 498 m_acTEncTop[layer].setUseFastEnc ( m_bUseFastEnc ); 499 m_acTEncTop[layer].setUseEarlyCU ( m_bUseEarlyCU ); 500 m_acTEncTop[layer].setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); 501 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); 502 m_acTEncTop[layer].setUseEarlySkipDetection ( m_useEarlySkipDetection ); 503 m_acTEncTop[layer].setUseCrossComponentPrediction ( m_useCrossComponentPrediction ); 504 m_acTEncTop[layer].setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate ); 505 m_acTEncTop[layer].setSaoOffsetBitShift ( CHANNEL_TYPE_LUMA , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] ); 506 m_acTEncTop[layer].setSaoOffsetBitShift ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] ); 507 m_acTEncTop[layer].setUseTransformSkip ( m_useTransformSkip ); 508 m_acTEncTop[layer].setUseTransformSkipFast ( m_useTransformSkipFast ); 509 m_acTEncTop[layer].setUseResidualRotation ( m_useResidualRotation ); 510 m_acTEncTop[layer].setUseSingleSignificanceMapContext ( m_useSingleSignificanceMapContext ); 511 m_acTEncTop[layer].setUseGolombRiceParameterAdaptation ( m_useGolombRiceParameterAdaptation ); 512 m_acTEncTop[layer].setAlignCABACBeforeBypass ( m_alignCABACBeforeBypass ); 513 m_acTEncTop[layer].setTransformSkipLog2MaxSize ( m_transformSkipLog2MaxSize ); 514 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 515 { 516 m_acTEncTop[layer].setUseResidualDPCM ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]); 517 } 518 m_acTEncTop[layer].setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); 519 m_acTEncTop[layer].setPCMLog2MinSize ( m_uiPCMLog2MinSize); 520 m_acTEncTop[layer].setUsePCM ( m_usePCM ); 521 m_acTEncTop[layer].setPCMLog2MaxSize ( m_pcmLog2MaxSize); 522 m_acTEncTop[layer].setMaxNumMergeCand ( m_maxNumMergeCand ); 523 524 525 //====== Weighted Prediction ======== 526 m_acTEncTop[layer].setUseWP ( m_useWeightedPred ); 527 m_acTEncTop[layer].setWPBiPred ( m_useWeightedBiPred ); 484 528 #if FAST_INTRA_SHVC 485 m_acTEncTop[layer].setUseFastIntraScalable ( m_useFastIntraScalable ); 486 #endif 487 488 m_acTEncTop[layer].setUseTransformSkip ( m_useTransformSkip ); 489 m_acTEncTop[layer].setUseTransformSkipFast ( m_useTransformSkipFast ); 490 m_acTEncTop[layer].setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); 491 m_acTEncTop[layer].setPCMLog2MinSize ( m_uiPCMLog2MinSize); 492 m_acTEncTop[layer].setUsePCM ( m_usePCM ); 493 m_acTEncTop[layer].setPCMLog2MaxSize ( m_pcmLog2MaxSize); 494 m_acTEncTop[layer].setMaxNumMergeCand ( m_maxNumMergeCand ); 495 496 497 //====== Weighted Prediction ======== 498 m_acTEncTop[layer].setUseWP ( m_useWeightedPred ); 499 m_acTEncTop[layer].setWPBiPred ( m_useWeightedBiPred ); 529 m_acTEncTop[layer].setUseFastIntraScalable ( m_useFastIntraScalable ); 530 #endif 500 531 #if O0194_WEIGHTED_PREDICTION_CGS 501 532 if( layer != 0 && m_useInterLayerWeightedPred ) 502 533 { 503 534 // Enable weighted prediction for enhancement layer 504 m_acTEncTop[layer].setUseWP ( true );505 m_acTEncTop[layer].setWPBiPred ( true );535 m_acTEncTop[layer].setUseWP ( true ); 536 m_acTEncTop[layer].setWPBiPred ( true ); 506 537 } 507 538 #endif 508 539 //====== Parallel Merge Estimation ======== 509 m_acTEncTop[layer].setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 );540 m_acTEncTop[layer].setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 ); 510 541 511 542 //====== Slice ======== 512 m_acTEncTop[layer].setSliceMode ( m_sliceMode);513 m_acTEncTop[layer].setSliceArgument ( m_sliceArgument );543 m_acTEncTop[layer].setSliceMode ( (SliceConstraint) m_sliceMode ); 544 m_acTEncTop[layer].setSliceArgument ( m_sliceArgument ); 514 545 515 546 //====== Dependent Slice ======== 516 m_acTEncTop[layer].setSliceSegmentMode ( m_sliceSegmentMode ); 517 m_acTEncTop[layer].setSliceSegmentArgument ( m_sliceSegmentArgument ); 518 #if LAYER_CTB 519 Int iNumPartInCU = 1<<(m_acLayerCfg[layer].m_uiMaxCUDepth<<1); 520 #else 521 Int iNumPartInCU = 1<<(m_uiMaxCUDepth<<1); 522 #endif 523 if(m_sliceSegmentMode==FIXED_NUMBER_OF_LCU) 524 { 525 m_acTEncTop[layer].setSliceSegmentArgument ( m_sliceSegmentArgument * iNumPartInCU ); 526 } 527 if(m_sliceMode==FIXED_NUMBER_OF_LCU) 528 { 529 m_acTEncTop[layer].setSliceArgument ( m_sliceArgument * iNumPartInCU ); 530 } 531 if(m_sliceMode==FIXED_NUMBER_OF_TILES) 532 { 533 m_acTEncTop[layer].setSliceArgument ( m_sliceArgument ); 534 } 535 536 if(m_sliceMode == 0 ) 547 m_acTEncTop[layer].setSliceSegmentMode ( (SliceConstraint) m_sliceSegmentMode ); 548 m_acTEncTop[layer].setSliceSegmentArgument ( m_sliceSegmentArgument ); 549 550 if(m_sliceMode == NO_SLICES ) 537 551 { 538 552 m_bLFCrossSliceBoundaryFlag = true; 539 553 } 540 m_acTEncTop[layer].setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 541 m_acTEncTop[layer].setUseSAO ( m_bUseSAO ); 542 m_acTEncTop[layer].setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); 543 544 m_acTEncTop[layer].setSaoLcuBoundary (m_saoLcuBoundary); 545 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 546 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 547 548 m_acTEncTop[layer].setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 549 m_acTEncTop[layer].setRecoveryPointSEIEnabled( m_recoveryPointSEIEnabled ); 550 m_acTEncTop[layer].setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 551 m_acTEncTop[layer].setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 552 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 553 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); 554 m_acTEncTop[layer].setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 555 m_acTEncTop[layer].setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 556 m_acTEncTop[layer].setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 557 m_acTEncTop[layer].setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 558 m_acTEncTop[layer].setTMISEIModelID ( m_toneMapModelId ); 559 m_acTEncTop[layer].setTMISEIMinValue ( m_toneMapMinValue ); 560 m_acTEncTop[layer].setTMISEIMaxValue ( m_toneMapMaxValue ); 561 m_acTEncTop[layer].setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 562 m_acTEncTop[layer].setTMISEISigmoidWidth ( m_sigmoidWidth ); 563 m_acTEncTop[layer].setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 564 m_acTEncTop[layer].setTMISEINumPivots ( m_numPivots ); 565 m_acTEncTop[layer].setTMISEICodedPivotValue ( m_codedPivotValue ); 566 m_acTEncTop[layer].setTMISEITargetPivotValue ( m_targetPivotValue ); 567 m_acTEncTop[layer].setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 568 m_acTEncTop[layer].setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 569 m_acTEncTop[layer].setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 570 m_acTEncTop[layer].setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 571 m_acTEncTop[layer].setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 572 m_acTEncTop[layer].setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 573 m_acTEncTop[layer].setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 574 m_acTEncTop[layer].setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 575 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 576 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 577 #if P0050_KNEE_FUNCTION_SEI 578 m_acTEncTop[layer].setKneeSEIEnabled ( m_kneeSEIEnabled ); 579 m_acTEncTop[layer].setKneeSEIId ( m_kneeSEIId ); 580 m_acTEncTop[layer].setKneeSEICancelFlag ( m_kneeSEICancelFlag ); 581 m_acTEncTop[layer].setKneeSEIPersistenceFlag ( m_kneeSEIPersistenceFlag ); 582 m_acTEncTop[layer].setKneeSEIMappingFlag ( m_kneeSEIMappingFlag ); 583 m_acTEncTop[layer].setKneeSEIInputDrange ( m_kneeSEIInputDrange ); 584 m_acTEncTop[layer].setKneeSEIInputDispLuminance ( m_kneeSEIInputDispLuminance ); 585 m_acTEncTop[layer].setKneeSEIOutputDrange ( m_kneeSEIOutputDrange ); 586 m_acTEncTop[layer].setKneeSEIOutputDispLuminance ( m_kneeSEIOutputDispLuminance ); 587 m_acTEncTop[layer].setKneeSEINumKneePointsMinus1 ( m_kneeSEINumKneePointsMinus1 ); 588 m_acTEncTop[layer].setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 589 m_acTEncTop[layer].setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 590 #endif 554 555 m_acTEncTop[layer].setLFCrossSliceBoundaryFlag ( m_bLFCrossSliceBoundaryFlag ); 556 m_acTEncTop[layer].setUseSAO ( m_bUseSAO ); 557 m_acTEncTop[layer].setMaxNumOffsetsPerPic ( m_maxNumOffsetsPerPic ); 558 559 m_acTEncTop[layer].setSaoCtuBoundary ( m_saoCtuBoundary ); 560 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 561 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 562 563 m_acTEncTop[layer].setDisableIntraReferenceSmoothing (!m_enableIntraReferenceSmoothing ); 564 m_acTEncTop[layer].setDecodedPictureHashSEIEnabled ( m_decodedPictureHashSEIEnabled ); 565 m_acTEncTop[layer].setRecoveryPointSEIEnabled ( m_recoveryPointSEIEnabled ); 566 m_acTEncTop[layer].setBufferingPeriodSEIEnabled ( m_bufferingPeriodSEIEnabled ); 567 m_acTEncTop[layer].setPictureTimingSEIEnabled ( m_pictureTimingSEIEnabled ); 568 m_acTEncTop[layer].setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 569 m_acTEncTop[layer].setTMISEIToneMapId ( m_toneMapId ); 570 m_acTEncTop[layer].setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 571 m_acTEncTop[layer].setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 572 m_acTEncTop[layer].setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 573 m_acTEncTop[layer].setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 574 m_acTEncTop[layer].setTMISEIModelID ( m_toneMapModelId ); 575 m_acTEncTop[layer].setTMISEIMinValue ( m_toneMapMinValue ); 576 m_acTEncTop[layer].setTMISEIMaxValue ( m_toneMapMaxValue ); 577 m_acTEncTop[layer].setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 578 m_acTEncTop[layer].setTMISEISigmoidWidth ( m_sigmoidWidth ); 579 m_acTEncTop[layer].setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 580 m_acTEncTop[layer].setTMISEINumPivots ( m_numPivots ); 581 m_acTEncTop[layer].setTMISEICodedPivotValue ( m_codedPivotValue ); 582 m_acTEncTop[layer].setTMISEITargetPivotValue ( m_targetPivotValue ); 583 m_acTEncTop[layer].setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 584 m_acTEncTop[layer].setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 585 m_acTEncTop[layer].setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 586 m_acTEncTop[layer].setTMISEIExposureIndexValue ( m_exposureIndexValue ); 587 m_acTEncTop[layer].setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 588 m_acTEncTop[layer].setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 589 m_acTEncTop[layer].setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 590 m_acTEncTop[layer].setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 591 m_acTEncTop[layer].setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 592 m_acTEncTop[layer].setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 593 m_acTEncTop[layer].setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 594 m_acTEncTop[layer].setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 595 m_acTEncTop[layer].setChromaSamplingFilterHintEnabled ( m_chromaSamplingFilterSEIenabled ); 596 m_acTEncTop[layer].setChromaSamplingHorFilterIdc ( m_chromaSamplingHorFilterIdc ); 597 m_acTEncTop[layer].setChromaSamplingVerFilterIdc ( m_chromaSamplingVerFilterIdc ); 598 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled ( m_framePackingSEIEnabled ); 599 m_acTEncTop[layer].setFramePackingArrangementSEIType ( m_framePackingSEIType ); 600 m_acTEncTop[layer].setFramePackingArrangementSEIId ( m_framePackingSEIId ); 601 m_acTEncTop[layer].setFramePackingArrangementSEIQuincunx ( m_framePackingSEIQuincunx ); 602 m_acTEncTop[layer].setFramePackingArrangementSEIInterpretation ( m_framePackingSEIInterpretation ); 603 m_acTEncTop[layer].setSegmentedRectFramePackingArrangementSEIEnabled ( m_segmentedRectFramePackingSEIEnabled ); 604 m_acTEncTop[layer].setSegmentedRectFramePackingArrangementSEICancel ( m_segmentedRectFramePackingSEICancel ); 605 m_acTEncTop[layer].setSegmentedRectFramePackingArrangementSEIType ( m_segmentedRectFramePackingSEIType ); 606 m_acTEncTop[layer].setSegmentedRectFramePackingArrangementSEIPersistence( m_segmentedRectFramePackingSEIPersistence ); 607 m_acTEncTop[layer].setDisplayOrientationSEIAngle ( m_displayOrientationSEIAngle ); 608 m_acTEncTop[layer].setTemporalLevel0IndexSEIEnabled ( m_temporalLevel0IndexSEIEnabled ); 609 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled ( m_gradualDecodingRefreshInfoEnabled ); 610 m_acTEncTop[layer].setNoDisplaySEITLayer ( m_noDisplaySEITLayer ); 611 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled ( m_decodingUnitInfoSEIEnabled ); 612 m_acTEncTop[layer].setSOPDescriptionSEIEnabled ( m_SOPDescriptionSEIEnabled ); 613 m_acTEncTop[layer].setScalableNestingSEIEnabled ( m_scalableNestingSEIEnabled ); 614 m_acTEncTop[layer].setTMCTSSEIEnabled ( m_tmctsSEIEnabled ); 615 m_acTEncTop[layer].setTimeCodeSEIEnabled ( m_timeCodeSEIEnabled ); 616 m_acTEncTop[layer].setNumberOfTimeSets ( m_timeCodeSEINumTs ); 617 for(Int i = 0; i < m_timeCodeSEINumTs; i++) { m_acTEncTop[layer].setTimeSet(m_timeSetArray[i], i); } 618 m_acTEncTop[layer].setKneeSEIEnabled ( m_kneeSEIEnabled ); 619 m_acTEncTop[layer].setKneeSEIId ( m_kneeSEIId ); 620 m_acTEncTop[layer].setKneeSEICancelFlag ( m_kneeSEICancelFlag ); 621 m_acTEncTop[layer].setKneeSEIPersistenceFlag ( m_kneeSEIPersistenceFlag ); 622 m_acTEncTop[layer].setKneeSEIInputDrange ( m_kneeSEIInputDrange ); 623 m_acTEncTop[layer].setKneeSEIInputDispLuminance ( m_kneeSEIInputDispLuminance ); 624 m_acTEncTop[layer].setKneeSEIOutputDrange ( m_kneeSEIOutputDrange ); 625 m_acTEncTop[layer].setKneeSEIOutputDispLuminance ( m_kneeSEIOutputDispLuminance ); 626 m_acTEncTop[layer].setKneeSEINumKneePointsMinus1 ( m_kneeSEINumKneePointsMinus1 ); 627 m_acTEncTop[layer].setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 628 m_acTEncTop[layer].setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 629 m_acTEncTop[layer].setMasteringDisplaySEI ( m_masteringDisplay ); 591 630 #if Q0096_OVERLAY_SEI 592 m_acTEncTop[layer].setOverlaySEIEnabled ( m_overlaySEIEnabled );593 m_acTEncTop[layer].setOverlaySEICancelFlag ( m_overlayInfoCancelFlag );594 m_acTEncTop[layer].setOverlaySEIContentAuxIdMinus128 ( m_overlayContentAuxIdMinus128 );595 m_acTEncTop[layer].setOverlaySEILabelAuxIdMinus128 ( m_overlayLabelAuxIdMinus128 );596 m_acTEncTop[layer].setOverlaySEIAlphaAuxIdMinus128 ( m_overlayAlphaAuxIdMinus128 );597 m_acTEncTop[layer].setOverlaySEIElementLabelValueLengthMinus8 ( m_overlayElementLabelValueLengthMinus8 );598 m_acTEncTop[layer].setOverlaySEINumOverlaysMinus1 ( m_numOverlaysMinus1 );599 m_acTEncTop[layer].setOverlaySEIIdx ( m_overlayIdx );600 m_acTEncTop[layer].setOverlaySEILanguagePresentFlag ( m_overlayLanguagePresentFlag );601 m_acTEncTop[layer].setOverlaySEIContentLayerId ( m_overlayContentLayerId );602 m_acTEncTop[layer].setOverlaySEILabelPresentFlag ( m_overlayLabelPresentFlag );603 m_acTEncTop[layer].setOverlaySEILabelLayerId ( m_overlayLabelLayerId );604 m_acTEncTop[layer].setOverlaySEIAlphaPresentFlag ( m_overlayAlphaPresentFlag );605 m_acTEncTop[layer].setOverlaySEIAlphaLayerId ( m_overlayAlphaLayerId );606 m_acTEncTop[layer].setOverlaySEINumElementsMinus1 ( m_numOverlayElementsMinus1 );607 m_acTEncTop[layer].setOverlaySEIElementLabelMin ( m_overlayElementLabelMin );608 m_acTEncTop[layer].setOverlaySEIElementLabelMax ( m_overlayElementLabelMax );609 m_acTEncTop[layer].setOverlaySEILanguage ( m_overlayLanguage );610 m_acTEncTop[layer].setOverlaySEIName ( m_overlayName );611 m_acTEncTop[layer].setOverlaySEIElementName ( m_overlayElementName );612 m_acTEncTop[layer].setOverlaySEIPersistenceFlag ( m_overlayInfoPersistenceFlag );631 m_acTEncTop[layer].setOverlaySEIEnabled ( m_overlaySEIEnabled ); 632 m_acTEncTop[layer].setOverlaySEICancelFlag ( m_overlayInfoCancelFlag ); 633 m_acTEncTop[layer].setOverlaySEIContentAuxIdMinus128 ( m_overlayContentAuxIdMinus128 ); 634 m_acTEncTop[layer].setOverlaySEILabelAuxIdMinus128 ( m_overlayLabelAuxIdMinus128 ); 635 m_acTEncTop[layer].setOverlaySEIAlphaAuxIdMinus128 ( m_overlayAlphaAuxIdMinus128 ); 636 m_acTEncTop[layer].setOverlaySEIElementLabelValueLengthMinus8 ( m_overlayElementLabelValueLengthMinus8 ); 637 m_acTEncTop[layer].setOverlaySEINumOverlaysMinus1 ( m_numOverlaysMinus1 ); 638 m_acTEncTop[layer].setOverlaySEIIdx ( m_overlayIdx ); 639 m_acTEncTop[layer].setOverlaySEILanguagePresentFlag ( m_overlayLanguagePresentFlag ); 640 m_acTEncTop[layer].setOverlaySEIContentLayerId ( m_overlayContentLayerId ); 641 m_acTEncTop[layer].setOverlaySEILabelPresentFlag ( m_overlayLabelPresentFlag ); 642 m_acTEncTop[layer].setOverlaySEILabelLayerId ( m_overlayLabelLayerId ); 643 m_acTEncTop[layer].setOverlaySEIAlphaPresentFlag ( m_overlayAlphaPresentFlag ); 644 m_acTEncTop[layer].setOverlaySEIAlphaLayerId ( m_overlayAlphaLayerId ); 645 m_acTEncTop[layer].setOverlaySEINumElementsMinus1 ( m_numOverlayElementsMinus1 ); 646 m_acTEncTop[layer].setOverlaySEIElementLabelMin ( m_overlayElementLabelMin ); 647 m_acTEncTop[layer].setOverlaySEIElementLabelMax ( m_overlayElementLabelMax ); 648 m_acTEncTop[layer].setOverlaySEILanguage ( m_overlayLanguage ); 649 m_acTEncTop[layer].setOverlaySEIName ( m_overlayName ); 650 m_acTEncTop[layer].setOverlaySEIElementName ( m_overlayElementName ); 651 m_acTEncTop[layer].setOverlaySEIPersistenceFlag ( m_overlayInfoPersistenceFlag ); 613 652 #endif 614 653 #if Q0074_COLOUR_REMAPPING_SEI 615 m_acTEncTop[layer].setCRISEIFile ( const_cast<Char*>(m_acLayerCfg[layer].m_colourRemapSEIFile.c_str()) ); 616 m_acTEncTop[layer].setCRISEIId ( m_acLayerCfg[layer].m_colourRemapSEIId ); 617 m_acTEncTop[layer].setCRISEICancelFlag ( m_acLayerCfg[layer].m_colourRemapSEICancelFlag ); 618 m_acTEncTop[layer].setCRISEIPersistenceFlag ( m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag ); 619 m_acTEncTop[layer].setCRISEIVideoSignalInfoPresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag ); 620 m_acTEncTop[layer].setCRISEIFullRangeFlag ( m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag ); 621 m_acTEncTop[layer].setCRISEIPrimaries ( m_acLayerCfg[layer].m_colourRemapSEIPrimaries ); 622 m_acTEncTop[layer].setCRISEITransferFunction ( m_acLayerCfg[layer].m_colourRemapSEITransferFunction ); 623 m_acTEncTop[layer].setCRISEIMatrixCoefficients ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients ); 624 m_acTEncTop[layer].setCRISEIInputBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth ); 625 m_acTEncTop[layer].setCRISEIBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIBitDepth ); 626 m_acTEncTop[layer].setCRISEIPreLutNumValMinus1 ( m_acLayerCfg[layer].m_colourRemapSEIPreLutNumValMinus1 ); 627 m_acTEncTop[layer].setCRISEIPreLutCodedValue ( m_acLayerCfg[layer].m_colourRemapSEIPreLutCodedValue ); 628 m_acTEncTop[layer].setCRISEIPreLutTargetValue ( m_acLayerCfg[layer].m_colourRemapSEIPreLutTargetValue ); 629 m_acTEncTop[layer].setCRISEIMatrixPresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIMatrixPresentFlag ); 630 m_acTEncTop[layer].setCRISEILog2MatrixDenom ( m_acLayerCfg[layer].m_colourRemapSEILog2MatrixDenom ); 631 m_acTEncTop[layer].setCRISEICoeffs ( m_acLayerCfg[layer].m_colourRemapSEICoeffs ); 632 m_acTEncTop[layer].setCRISEIPostLutNumValMinus1 ( m_acLayerCfg[layer].m_colourRemapSEIPostLutNumValMinus1 ); 633 m_acTEncTop[layer].setCRISEIPostLutCodedValue ( m_acLayerCfg[layer]. m_colourRemapSEIPostLutCodedValue ); 634 m_acTEncTop[layer].setCRISEIPostLutTargetValue ( m_acLayerCfg[layer].m_colourRemapSEIPostLutTargetValue ); 635 #endif 636 m_acTEncTop[layer].setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled ); 637 m_acTEncTop[layer].setFramePackingArrangementSEIType( m_framePackingSEIType ); 638 m_acTEncTop[layer].setFramePackingArrangementSEIId( m_framePackingSEIId ); 639 m_acTEncTop[layer].setFramePackingArrangementSEIQuincunx( m_framePackingSEIQuincunx ); 640 m_acTEncTop[layer].setFramePackingArrangementSEIInterpretation( m_framePackingSEIInterpretation ); 641 m_acTEncTop[layer].setDisplayOrientationSEIAngle( m_displayOrientationSEIAngle ); 642 m_acTEncTop[layer].setTemporalLevel0IndexSEIEnabled( m_temporalLevel0IndexSEIEnabled ); 643 m_acTEncTop[layer].setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled ); 644 m_acTEncTop[layer].setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled ); 654 m_acTEncTop[layer].setCRISEIFile ( const_cast<Char*>(m_acLayerCfg[layer].m_colourRemapSEIFile.c_str()) ); 655 m_acTEncTop[layer].setCRISEIId ( m_acLayerCfg[layer].m_colourRemapSEIId ); 656 m_acTEncTop[layer].setCRISEICancelFlag ( m_acLayerCfg[layer].m_colourRemapSEICancelFlag ); 657 m_acTEncTop[layer].setCRISEIPersistenceFlag ( m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag ); 658 m_acTEncTop[layer].setCRISEIVideoSignalInfoPresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag ); 659 m_acTEncTop[layer].setCRISEIFullRangeFlag ( m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag ); 660 m_acTEncTop[layer].setCRISEIPrimaries ( m_acLayerCfg[layer].m_colourRemapSEIPrimaries ); 661 m_acTEncTop[layer].setCRISEITransferFunction ( m_acLayerCfg[layer].m_colourRemapSEITransferFunction ); 662 m_acTEncTop[layer].setCRISEIMatrixCoefficients ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients ); 663 m_acTEncTop[layer].setCRISEIInputBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth ); 664 m_acTEncTop[layer].setCRISEIBitDepth ( m_acLayerCfg[layer].m_colourRemapSEIBitDepth ); 665 m_acTEncTop[layer].setCRISEIPreLutNumValMinus1 ( m_acLayerCfg[layer].m_colourRemapSEIPreLutNumValMinus1 ); 666 m_acTEncTop[layer].setCRISEIPreLutCodedValue ( m_acLayerCfg[layer].m_colourRemapSEIPreLutCodedValue ); 667 m_acTEncTop[layer].setCRISEIPreLutTargetValue ( m_acLayerCfg[layer].m_colourRemapSEIPreLutTargetValue ); 668 m_acTEncTop[layer].setCRISEIMatrixPresentFlag ( m_acLayerCfg[layer].m_colourRemapSEIMatrixPresentFlag ); 669 m_acTEncTop[layer].setCRISEILog2MatrixDenom ( m_acLayerCfg[layer].m_colourRemapSEILog2MatrixDenom ); 670 m_acTEncTop[layer].setCRISEICoeffs ( m_acLayerCfg[layer].m_colourRemapSEICoeffs ); 671 m_acTEncTop[layer].setCRISEIPostLutNumValMinus1 ( m_acLayerCfg[layer].m_colourRemapSEIPostLutNumValMinus1 ); 672 m_acTEncTop[layer].setCRISEIPostLutCodedValue ( m_acLayerCfg[layer]. m_colourRemapSEIPostLutCodedValue ); 673 m_acTEncTop[layer].setCRISEIPostLutTargetValue ( m_acLayerCfg[layer].m_colourRemapSEIPostLutTargetValue ); 674 #endif 645 675 #if LAYERS_NOT_PRESENT_SEI 646 m_acTEncTop[layer].setLayersNotPresentSEIEnabled( m_layersNotPresentSEIEnabled ); 647 #endif 648 m_acTEncTop[layer].setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 649 m_acTEncTop[layer].setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 676 m_acTEncTop[layer].setLayersNotPresentSEIEnabled ( m_layersNotPresentSEIEnabled ); 677 #endif 650 678 #if Q0189_TMVP_CONSTRAINTS 651 m_acTEncTop[layer].setTMVPConstraintsSEIEnabled ( m_TMVPConstraintsSEIEnabled);679 m_acTEncTop[layer].setTMVPConstraintsSEIEnabled ( m_TMVPConstraintsSEIEnabled); 652 680 #endif 653 681 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 654 682 m_acTEncTop[layer].setInterLayerConstrainedTileSetsSEIEnabled( m_interLayerConstrainedTileSetsSEIEnabled ); 655 m_acTEncTop[layer].setIlNumSetsInMessage ( m_ilNumSetsInMessage );656 m_acTEncTop[layer].setSkippedTileSetPresentFlag ( m_skippedTileSetPresentFlag );657 m_acTEncTop[layer].setTopLeftTileIndex ( m_topLeftTileIndex );658 m_acTEncTop[layer].setBottomRightTileIndex ( m_bottomRightTileIndex );659 m_acTEncTop[layer].setIlcIdc ( m_ilcIdc );660 #endif 661 m_acTEncTop[layer].setTileUniformSpacingFlag ( m_tileUniformSpacingFlag );662 m_acTEncTop[layer].setNumColumnsMinus1 ( m_numTileColumnsMinus1 );663 m_acTEncTop[layer].setNumRowsMinus1 ( m_numTileRowsMinus1 );683 m_acTEncTop[layer].setIlNumSetsInMessage ( m_ilNumSetsInMessage ); 684 m_acTEncTop[layer].setSkippedTileSetPresentFlag ( m_skippedTileSetPresentFlag ); 685 m_acTEncTop[layer].setTopLeftTileIndex ( m_topLeftTileIndex ); 686 m_acTEncTop[layer].setBottomRightTileIndex ( m_bottomRightTileIndex ); 687 m_acTEncTop[layer].setIlcIdc ( m_ilcIdc ); 688 #endif 689 m_acTEncTop[layer].setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 690 m_acTEncTop[layer].setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 691 m_acTEncTop[layer].setNumRowsMinus1 ( m_numTileRowsMinus1 ); 664 692 if(!m_tileUniformSpacingFlag) 665 693 { 666 m_acTEncTop[layer].setColumnWidth ( m_tileColumnWidth );667 m_acTEncTop[layer].setRowHeight ( m_tileRowHeight );694 m_acTEncTop[layer].setColumnWidth ( m_tileColumnWidth ); 695 m_acTEncTop[layer].setRowHeight ( m_tileRowHeight ); 668 696 } 669 697 m_acTEncTop[layer].xCheckGSParameters(); … … 673 701 m_bLFCrossTileBoundaryFlag = true; 674 702 } 675 m_acTEncTop[layer].setLFCrossTileBoundaryFlag ( m_bLFCrossTileBoundaryFlag );676 m_acTEncTop[layer].setWaveFrontSynchro ( m_acLayerCfg[layer].m_waveFrontSynchro );677 m_acTEncTop[layer].setWaveFrontSubstreams ( m_acLayerCfg[layer].m_iWaveFrontSubstreams );678 m_acTEncTop[layer].setTMVPModeId ( m_TMVPModeId );679 m_acTEncTop[layer].setUseScalingListId ( m_useScalingListId );680 m_acTEncTop[layer].setScalingListFile ( m_scalingListFile );681 m_acTEncTop[layer].setSignHideFlag (m_signHideFlag);703 m_acTEncTop[layer].setLFCrossTileBoundaryFlag ( m_bLFCrossTileBoundaryFlag ); 704 m_acTEncTop[layer].setWaveFrontSynchro ( m_acLayerCfg[layer].m_waveFrontSynchro ); 705 m_acTEncTop[layer].setWaveFrontSubstreams ( m_acLayerCfg[layer].m_iWaveFrontSubstreams ); 706 m_acTEncTop[layer].setTMVPModeId ( m_TMVPModeId ); 707 m_acTEncTop[layer].setUseScalingListId ( m_useScalingListId ); 708 m_acTEncTop[layer].setScalingListFile ( m_scalingListFile ); 709 m_acTEncTop[layer].setSignHideFlag ( m_signHideFlag ); 682 710 #if RC_SHVC_HARMONIZATION 683 m_acTEncTop[layer].setUseRateCtrl (m_acLayerCfg[layer].getRCEnableRateControl()); 684 m_acTEncTop[layer].setTargetBitrate (m_acLayerCfg[layer].getRCTargetBitrate()); 685 m_acTEncTop[layer].setKeepHierBit (m_acLayerCfg[layer].getRCKeepHierarchicalBit()); 686 m_acTEncTop[layer].setLCULevelRC (m_acLayerCfg[layer].getRCLCULevelRC()); 687 m_acTEncTop[layer].setUseLCUSeparateModel (m_acLayerCfg[layer].getRCUseLCUSeparateModel()); 688 m_acTEncTop[layer].setInitialQP (m_acLayerCfg[layer].getRCInitialQP()); 689 m_acTEncTop[layer].setForceIntraQP (m_acLayerCfg[layer].getRCForceIntraQP()); 690 #else 691 m_acTEncTop[layer].setUseRateCtrl ( m_RCEnableRateControl ); 692 m_acTEncTop[layer].setTargetBitrate ( m_RCTargetBitrate ); 693 m_acTEncTop[layer].setKeepHierBit ( m_RCKeepHierarchicalBit ); 694 m_acTEncTop[layer].setLCULevelRC ( m_RCLCULevelRC ); 695 m_acTEncTop[layer].setUseLCUSeparateModel ( m_RCUseLCUSeparateModel ); 696 m_acTEncTop[layer].setInitialQP ( m_RCInitialQP ); 697 m_acTEncTop[layer].setForceIntraQP ( m_RCForceIntraQP ); 698 #endif 699 m_acTEncTop[layer].setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); 700 m_acTEncTop[layer].setCUTransquantBypassFlagForceValue(m_CUTransquantBypassFlagForce); 701 m_acTEncTop[layer].setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda ); 702 m_acTEncTop[layer].setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); 703 m_acTEncTop[layer].setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 704 m_acTEncTop[layer].setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 705 m_acTEncTop[layer].setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag); 706 m_acTEncTop[layer].setAspectRatioIdc( m_aspectRatioIdc ); 707 m_acTEncTop[layer].setSarWidth( m_sarWidth ); 708 m_acTEncTop[layer].setSarHeight( m_sarHeight ); 709 m_acTEncTop[layer].setOverscanInfoPresentFlag( m_overscanInfoPresentFlag ); 710 m_acTEncTop[layer].setOverscanAppropriateFlag( m_overscanAppropriateFlag ); 711 m_acTEncTop[layer].setVideoSignalTypePresentFlag( m_videoSignalTypePresentFlag ); 712 m_acTEncTop[layer].setVideoFormat( m_videoFormat ); 713 m_acTEncTop[layer].setVideoFullRangeFlag( m_videoFullRangeFlag ); 714 m_acTEncTop[layer].setColourDescriptionPresentFlag( m_colourDescriptionPresentFlag ); 715 m_acTEncTop[layer].setColourPrimaries( m_colourPrimaries ); 716 m_acTEncTop[layer].setTransferCharacteristics( m_transferCharacteristics ); 717 m_acTEncTop[layer].setMatrixCoefficients( m_matrixCoefficients ); 718 m_acTEncTop[layer].setChromaLocInfoPresentFlag( m_chromaLocInfoPresentFlag ); 719 m_acTEncTop[layer].setChromaSampleLocTypeTopField( m_chromaSampleLocTypeTopField ); 720 m_acTEncTop[layer].setChromaSampleLocTypeBottomField( m_chromaSampleLocTypeBottomField ); 721 m_acTEncTop[layer].setNeutralChromaIndicationFlag( m_neutralChromaIndicationFlag ); 722 m_acTEncTop[layer].setDefaultDisplayWindow( m_defDispWinLeftOffset, m_defDispWinRightOffset, m_defDispWinTopOffset, m_defDispWinBottomOffset ); 723 m_acTEncTop[layer].setFrameFieldInfoPresentFlag( m_frameFieldInfoPresentFlag ); 724 m_acTEncTop[layer].setPocProportionalToTimingFlag( m_pocProportionalToTimingFlag ); 725 m_acTEncTop[layer].setNumTicksPocDiffOneMinus1 ( m_numTicksPocDiffOneMinus1 ); 726 m_acTEncTop[layer].setBitstreamRestrictionFlag( m_bitstreamRestrictionFlag ); 727 m_acTEncTop[layer].setTilesFixedStructureFlag( m_tilesFixedStructureFlag ); 728 m_acTEncTop[layer].setMotionVectorsOverPicBoundariesFlag( m_motionVectorsOverPicBoundariesFlag ); 729 m_acTEncTop[layer].setMinSpatialSegmentationIdc( m_minSpatialSegmentationIdc ); 730 m_acTEncTop[layer].setMaxBytesPerPicDenom( m_maxBytesPerPicDenom ); 731 m_acTEncTop[layer].setMaxBitsPerMinCuDenom( m_maxBitsPerMinCuDenom ); 732 m_acTEncTop[layer].setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal ); 733 m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 734 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); 711 m_acTEncTop[layer].setUseRateCtrl ( m_acLayerCfg[layer].getRCEnableRateControl() ); 712 m_acTEncTop[layer].setTargetBitrate ( m_acLayerCfg[layer].getRCTargetBitrate() ); 713 m_acTEncTop[layer].setKeepHierBit ( m_acLayerCfg[layer].getRCKeepHierarchicalBit() ); 714 m_acTEncTop[layer].setLCULevelRC ( m_acLayerCfg[layer].getRCLCULevelRC() ); 715 m_acTEncTop[layer].setUseLCUSeparateModel ( m_acLayerCfg[layer].getRCUseLCUSeparateModel() ); 716 m_acTEncTop[layer].setInitialQP ( m_acLayerCfg[layer].getRCInitialQP() ); 717 m_acTEncTop[layer].setForceIntraQP ( m_acLayerCfg[layer].getRCForceIntraQP() ); 718 #else 719 m_acTEncTop[layer].setUseRateCtrl ( m_RCEnableRateControl ); 720 m_acTEncTop[layer].setTargetBitrate ( m_RCTargetBitrate ); 721 m_acTEncTop[layer].setKeepHierBit ( m_RCKeepHierarchicalBit ); 722 m_acTEncTop[layer].setLCULevelRC ( m_RCLCULevelRC ); 723 m_acTEncTop[layer].setUseLCUSeparateModel ( m_RCUseLCUSeparateModel ); 724 m_acTEncTop[layer].setInitialQP ( m_RCInitialQP ); 725 m_acTEncTop[layer].setForceIntraQP ( m_RCForceIntraQP ); 726 #endif 727 m_acTEncTop[layer].setTransquantBypassEnableFlag ( m_TransquantBypassEnableFlag ); 728 m_acTEncTop[layer].setCUTransquantBypassFlagForceValue ( m_CUTransquantBypassFlagForce ); 729 m_acTEncTop[layer].setCostMode ( m_costMode ); 730 m_acTEncTop[layer].setUseRecalculateQPAccordingToLambda ( m_recalculateQPAccordingToLambda ); 731 m_acTEncTop[layer].setUseStrongIntraSmoothing ( m_useStrongIntraSmoothing ); 732 m_acTEncTop[layer].setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 733 m_acTEncTop[layer].setVuiParametersPresentFlag ( m_vuiParametersPresentFlag ); 734 m_acTEncTop[layer].setAspectRatioInfoPresentFlag ( m_aspectRatioInfoPresentFlag); 735 m_acTEncTop[layer].setAspectRatioIdc ( m_aspectRatioIdc ); 736 m_acTEncTop[layer].setSarWidth ( m_sarWidth ); 737 m_acTEncTop[layer].setSarHeight ( m_sarHeight ); 738 m_acTEncTop[layer].setOverscanInfoPresentFlag ( m_overscanInfoPresentFlag ); 739 m_acTEncTop[layer].setOverscanAppropriateFlag ( m_overscanAppropriateFlag ); 740 m_acTEncTop[layer].setVideoSignalTypePresentFlag ( m_videoSignalTypePresentFlag ); 741 m_acTEncTop[layer].setVideoFormat ( m_videoFormat ); 742 m_acTEncTop[layer].setVideoFullRangeFlag ( m_videoFullRangeFlag ); 743 m_acTEncTop[layer].setColourDescriptionPresentFlag ( m_colourDescriptionPresentFlag ); 744 m_acTEncTop[layer].setColourPrimaries ( m_colourPrimaries ); 745 m_acTEncTop[layer].setTransferCharacteristics ( m_transferCharacteristics ); 746 m_acTEncTop[layer].setMatrixCoefficients ( m_matrixCoefficients ); 747 m_acTEncTop[layer].setChromaLocInfoPresentFlag ( m_chromaLocInfoPresentFlag ); 748 m_acTEncTop[layer].setChromaSampleLocTypeTopField ( m_chromaSampleLocTypeTopField ); 749 m_acTEncTop[layer].setChromaSampleLocTypeBottomField ( m_chromaSampleLocTypeBottomField ); 750 m_acTEncTop[layer].setNeutralChromaIndicationFlag ( m_neutralChromaIndicationFlag ); 751 m_acTEncTop[layer].setDefaultDisplayWindow ( m_defDispWinLeftOffset, m_defDispWinRightOffset, m_defDispWinTopOffset, m_defDispWinBottomOffset ); 752 m_acTEncTop[layer].setFrameFieldInfoPresentFlag ( m_frameFieldInfoPresentFlag ); 753 m_acTEncTop[layer].setPocProportionalToTimingFlag ( m_pocProportionalToTimingFlag ); 754 m_acTEncTop[layer].setNumTicksPocDiffOneMinus1 ( m_numTicksPocDiffOneMinus1 ); 755 m_acTEncTop[layer].setBitstreamRestrictionFlag ( m_bitstreamRestrictionFlag ); 756 m_acTEncTop[layer].setTilesFixedStructureFlag ( m_tilesFixedStructureFlag ); 757 m_acTEncTop[layer].setMotionVectorsOverPicBoundariesFlag ( m_motionVectorsOverPicBoundariesFlag ); 758 m_acTEncTop[layer].setMinSpatialSegmentationIdc ( m_minSpatialSegmentationIdc ); 759 m_acTEncTop[layer].setMaxBytesPerPicDenom ( m_maxBytesPerPicDenom ); 760 m_acTEncTop[layer].setMaxBitsPerMinCuDenom ( m_maxBitsPerMinCuDenom ); 761 m_acTEncTop[layer].setLog2MaxMvLengthHorizontal ( m_log2MaxMvLengthHorizontal ); 762 m_acTEncTop[layer].setLog2MaxMvLengthVertical ( m_log2MaxMvLengthVertical ); 763 m_acTEncTop[layer].setElRapSliceTypeB (layer == 0? 0 : m_elRapSliceBEnabled); 735 764 if( layer > 0 ) 736 765 { … … 745 774 #endif 746 775 #endif 747 m_acTEncTop[layer].setNumScaledRefLayerOffsets ( m_acLayerCfg[layer].m_numScaledRefLayerOffsets );776 m_acTEncTop[layer].setNumScaledRefLayerOffsets ( m_acLayerCfg[layer].m_numScaledRefLayerOffsets ); 748 777 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 749 778 { 750 779 #if O0098_SCALED_REF_LAYER_ID 751 m_acTEncTop[layer].setScaledRefLayerId (i, m_acLayerCfg[layer].m_scaledRefLayerId[i]);780 m_acTEncTop[layer].setScaledRefLayerId (i, m_acLayerCfg[layer].m_scaledRefLayerId[i]); 752 781 #endif 753 782 #if REF_REGION_OFFSET 754 m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag ( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] );755 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( subWidthC * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],756 subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);783 m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag ( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] ); 784 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( subWidthC * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 785 subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 757 786 #else 758 787 #if P0312_VERT_PHASE_ADJ 759 m_acTEncTop[layer].setVertPhasePositionEnableFlag ( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );760 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],761 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] );762 #else 763 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i],764 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]);788 m_acTEncTop[layer].setVertPhasePositionEnableFlag ( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] ); 789 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 790 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] ); 791 #else 792 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 793 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 765 794 #endif 766 795 #endif 767 796 #if R0209_GENERIC_PHASE 768 m_acTEncTop[layer].setResamplePhaseSetPresentFlag ( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] );769 m_acTEncTop[layer].setPhaseHorLuma ( i, m_acLayerCfg[layer].m_phaseHorLuma[i] );770 m_acTEncTop[layer].setPhaseVerLuma ( i, m_acLayerCfg[layer].m_phaseVerLuma[i] );771 m_acTEncTop[layer].setPhaseHorChroma ( i, m_acLayerCfg[layer].m_phaseHorChroma[i] );772 m_acTEncTop[layer].setPhaseVerChroma ( i, m_acLayerCfg[layer].m_phaseVerChroma[i] );797 m_acTEncTop[layer].setResamplePhaseSetPresentFlag ( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] ); 798 m_acTEncTop[layer].setPhaseHorLuma ( i, m_acLayerCfg[layer].m_phaseHorLuma[i] ); 799 m_acTEncTop[layer].setPhaseVerLuma ( i, m_acLayerCfg[layer].m_phaseVerLuma[i] ); 800 m_acTEncTop[layer].setPhaseHorChroma ( i, m_acLayerCfg[layer].m_phaseHorChroma[i] ); 801 m_acTEncTop[layer].setPhaseVerChroma ( i, m_acLayerCfg[layer].m_phaseVerChroma[i] ); 773 802 #endif 774 803 } 775 804 } 776 805 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 777 m_acTEncTop[layer].setAdaptiveResolutionChange ( m_adaptiveResolutionChange );806 m_acTEncTop[layer].setAdaptiveResolutionChange ( m_adaptiveResolutionChange ); 778 807 #endif 779 808 #if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 780 m_acTEncTop[layer].setLayerSwitchOffBegin (m_acLayerCfg[layer].m_layerSwitchOffBegin);781 m_acTEncTop[layer].setLayerSwitchOffEnd (m_acLayerCfg[layer].m_layerSwitchOffEnd);809 m_acTEncTop[layer].setLayerSwitchOffBegin (m_acLayerCfg[layer].m_layerSwitchOffBegin); 810 m_acTEncTop[layer].setLayerSwitchOffEnd (m_acLayerCfg[layer].m_layerSwitchOffEnd); 782 811 #endif 783 812 #if AUXILIARY_PICTURES 784 m_acTEncTop[layer].setChromaFormatIDC ( m_acLayerCfg[layer].m_chromaFormatIDC );813 m_acTEncTop[layer].setChromaFormatIDC ( m_acLayerCfg[layer].m_chromaFormatIDC ); 785 814 #endif 786 815 #if O0153_ALT_OUTPUT_LAYER_FLAG 787 m_acTEncTop[layer].setAltOuputLayerFlag ( m_altOutputLayerFlag );816 m_acTEncTop[layer].setAltOuputLayerFlag ( m_altOutputLayerFlag ); 788 817 #endif 789 818 #if O0149_CROSS_LAYER_BLA_FLAG 790 m_acTEncTop[layer].setCrossLayerBLAFlag ( m_crossLayerBLAFlag );819 m_acTEncTop[layer].setCrossLayerBLAFlag ( m_crossLayerBLAFlag ); 791 820 #endif 792 821 #if Q0048_CGS_3D_ASYMLUT 793 m_acTEncTop[layer].setCGSFlag ( layer == 0 ? 0 : m_nCGSFlag );794 m_acTEncTop[layer].setCGSMaxOctantDepth ( m_nCGSMaxOctantDepth );795 m_acTEncTop[layer].setCGSMaxYPartNumLog2 ( m_nCGSMaxYPartNumLog2 );796 m_acTEncTop[layer].setCGSLUTBit ( m_nCGSLUTBit );822 m_acTEncTop[layer].setCGSFlag ( layer == 0 ? 0 : m_nCGSFlag ); 823 m_acTEncTop[layer].setCGSMaxOctantDepth ( m_nCGSMaxOctantDepth ); 824 m_acTEncTop[layer].setCGSMaxYPartNumLog2 ( m_nCGSMaxYPartNumLog2 ); 825 m_acTEncTop[layer].setCGSLUTBit ( m_nCGSLUTBit ); 797 826 #if R0151_CGS_3D_ASYMLUT_IMPROVE 798 m_acTEncTop[layer].setCGSAdaptChroma ( m_nCGSAdaptiveChroma );827 m_acTEncTop[layer].setCGSAdaptChroma ( m_nCGSAdaptiveChroma ); 799 828 #endif 800 829 #if R0179_ENC_OPT_3DLUT_SIZE 801 m_acTEncTop[layer].setCGSLutSizeRDO ( m_nCGSLutSizeRDO );830 m_acTEncTop[layer].setCGSLutSizeRDO ( m_nCGSLutSizeRDO ); 802 831 #endif 803 832 #endif 804 833 #if Q0078_ADD_LAYER_SETS 805 m_acTEncTop[layer].setNumAddLayerSets ( m_numAddLayerSets );834 m_acTEncTop[layer].setNumAddLayerSets ( m_numAddLayerSets ); 806 835 #endif 807 836 } … … 812 841 TComVPS vps; 813 842 814 vps.setMaxTLayers ( m_maxTempLayer );843 vps.setMaxTLayers ( m_maxTempLayer ); 815 844 if (m_maxTempLayer == 1) 816 845 { 817 846 vps.setTemporalNestingFlag(true); 818 847 } 819 vps.setMaxLayers ( 1 );848 vps.setMaxLayers ( 1 ); 820 849 for(Int i = 0; i < MAX_TLAYER; i++) 821 850 { 822 vps.setNumReorderPics ( m_numReorderPics[i], i );823 vps.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i );851 vps.setNumReorderPics ( m_numReorderPics[i], i ); 852 vps.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 824 853 } 825 854 m_cTEncTop.setVPS(&vps); 826 855 827 m_cTEncTop.setProfile(m_profile); 828 m_cTEncTop.setLevel(m_levelTier, m_level); 829 m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag); 830 m_cTEncTop.setInterlacedSourceFlag(m_interlacedSourceFlag); 831 m_cTEncTop.setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 832 m_cTEncTop.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 833 834 m_cTEncTop.setFrameRate ( m_iFrameRate ); 835 m_cTEncTop.setFrameSkip ( m_FrameSkip ); 836 m_cTEncTop.setSourceWidth ( m_iSourceWidth ); 837 m_cTEncTop.setSourceHeight ( m_iSourceHeight ); 838 m_cTEncTop.setConformanceWindow ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 839 m_cTEncTop.setFramesToBeEncoded ( m_framesToBeEncoded ); 856 m_cTEncTop.setProfile ( m_profile); 857 m_cTEncTop.setLevel ( m_levelTier, m_level); 858 m_cTEncTop.setProgressiveSourceFlag ( m_progressiveSourceFlag); 859 m_cTEncTop.setInterlacedSourceFlag ( m_interlacedSourceFlag); 860 m_cTEncTop.setNonPackedConstraintFlag ( m_nonPackedConstraintFlag); 861 m_cTEncTop.setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag); 862 m_cTEncTop.setBitDepthConstraintValue ( m_bitDepthConstraint ); 863 m_cTEncTop.setChromaFormatConstraintValue ( m_chromaFormatConstraint ); 864 m_cTEncTop.setIntraConstraintFlag ( m_intraConstraintFlag ); 865 m_cTEncTop.setLowerBitRateConstraintFlag ( m_lowerBitRateConstraintFlag ); 866 867 m_cTEncTop.setPrintMSEBasedSequencePSNR ( m_printMSEBasedSequencePSNR); 868 m_cTEncTop.setPrintFrameMSE ( m_printFrameMSE); 869 m_cTEncTop.setPrintSequenceMSE ( m_printSequenceMSE); 870 m_cTEncTop.setCabacZeroWordPaddingEnabled ( m_cabacZeroWordPaddingEnabled ); 871 872 m_cTEncTop.setFrameRate ( m_iFrameRate ); 873 m_cTEncTop.setFrameSkip ( m_FrameSkip ); 874 m_cTEncTop.setSourceWidth ( m_iSourceWidth ); 875 m_cTEncTop.setSourceHeight ( m_iSourceHeight ); 876 m_cTEncTop.setConformanceWindow ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 877 m_cTEncTop.setFramesToBeEncoded ( m_framesToBeEncoded ); 840 878 841 879 //====== Coding Structure ======== 842 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod );843 m_cTEncTop.setDecodingRefreshType ( m_iDecodingRefreshType );844 m_cTEncTop.setGOPSize ( m_iGOPSize );845 m_cTEncTop.setGopList ( m_GOPList );846 m_cTEncTop.setExtraRPSs ( m_extraRPSs );880 m_cTEncTop.setIntraPeriod ( m_iIntraPeriod ); 881 m_cTEncTop.setDecodingRefreshType ( m_iDecodingRefreshType ); 882 m_cTEncTop.setGOPSize ( m_iGOPSize ); 883 m_cTEncTop.setGopList ( m_GOPList ); 884 m_cTEncTop.setExtraRPSs ( m_extraRPSs ); 847 885 for(Int i = 0; i < MAX_TLAYER; i++) 848 886 { 849 m_cTEncTop.setNumReorderPics ( m_numReorderPics[i], i );850 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i );887 m_cTEncTop.setNumReorderPics ( m_numReorderPics[i], i ); 888 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBuffering[i], i ); 851 889 } 852 890 for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop ) 853 891 { 854 m_cTEncTop.setLambdaModifier ( uiLoop, m_adLambdaModifier[ uiLoop ] );855 } 856 m_cTEncTop.setQP ( m_iQP );857 858 m_cTEncTop.setPad ( m_aiPad );859 860 m_cTEncTop.setMaxTempLayer ( m_maxTempLayer );892 m_cTEncTop.setLambdaModifier ( uiLoop, m_adLambdaModifier[ uiLoop ] ); 893 } 894 m_cTEncTop.setQP ( m_iQP ); 895 896 m_cTEncTop.setPad ( m_aiPad ); 897 898 m_cTEncTop.setMaxTempLayer ( m_maxTempLayer ); 861 899 m_cTEncTop.setUseAMP( m_enableAMP ); 862 900 … … 864 902 865 903 //====== Loop/Deblock Filter ======== 866 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable );867 m_cTEncTop.setLoopFilterOffsetInPPS ( m_loopFilterOffsetInPPS );868 m_cTEncTop.setLoopFilterBetaOffset ( m_loopFilterBetaOffsetDiv2 );869 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 );870 m_cTEncTop.setDeblockingFilterControlPresent ( m_DeblockingFilterControlPresent);871 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric );904 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable ); 905 m_cTEncTop.setLoopFilterOffsetInPPS ( m_loopFilterOffsetInPPS ); 906 m_cTEncTop.setLoopFilterBetaOffset ( m_loopFilterBetaOffsetDiv2 ); 907 m_cTEncTop.setLoopFilterTcOffset ( m_loopFilterTcOffsetDiv2 ); 908 m_cTEncTop.setDeblockingFilterControlPresent ( m_DeblockingFilterControlPresent); 909 m_cTEncTop.setDeblockingFilterMetric ( m_DeblockingFilterMetric ); 872 910 873 911 //====== Motion search ======== 874 m_cTEncTop.setFastSearch ( m_iFastSearch );875 m_cTEncTop.setSearchRange ( m_iSearchRange );876 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange );912 m_cTEncTop.setFastSearch ( m_iFastSearch ); 913 m_cTEncTop.setSearchRange ( m_iSearchRange ); 914 m_cTEncTop.setBipredSearchRange ( m_bipredSearchRange ); 877 915 878 916 //====== Quality control ======== 879 m_cTEncTop.setMaxDeltaQP ( m_iMaxDeltaQP ); 880 m_cTEncTop.setMaxCuDQPDepth ( m_iMaxCuDQPDepth ); 881 882 m_cTEncTop.setChromaCbQpOffset ( m_cbQpOffset ); 883 m_cTEncTop.setChromaCrQpOffset ( m_crQpOffset ); 917 m_cTEncTop.setMaxDeltaQP ( m_iMaxDeltaQP ); 918 m_cTEncTop.setMaxCuDQPDepth ( m_iMaxCuDQPDepth ); 919 m_cTEncTop.setMaxCUChromaQpAdjustmentDepth ( m_maxCUChromaQpAdjustmentDepth ); 920 m_cTEncTop.setChromaCbQpOffset ( m_cbQpOffset ); 921 m_cTEncTop.setChromaCrQpOffset ( m_crQpOffset ); 922 923 m_cTEncTop.setChromaFormatIdc ( m_chromaFormatIDC ); 884 924 885 925 #if ADAPTIVE_QP_SELECTION 886 m_cTEncTop.setUseAdaptQpSelect ( m_bUseAdaptQpSelect ); 887 #endif 888 889 m_cTEncTop.setUseAdaptiveQP ( m_bUseAdaptiveQP ); 890 m_cTEncTop.setQPAdaptationRange ( m_iQPAdaptationRange ); 891 926 m_cTEncTop.setUseAdaptQpSelect ( m_bUseAdaptQpSelect ); 927 #endif 928 929 m_cTEncTop.setUseAdaptiveQP ( m_bUseAdaptiveQP ); 930 m_cTEncTop.setQPAdaptationRange ( m_iQPAdaptationRange ); 931 m_cTEncTop.setUseExtendedPrecision ( m_useExtendedPrecision ); 932 m_cTEncTop.setUseHighPrecisionPredictionWeighting ( m_useHighPrecisionPredictionWeighting ); 892 933 //====== Tool list ======== 893 m_cTEncTop.setDeltaQpRD ( m_uiDeltaQpRD );894 m_cTEncTop.setUseASR ( m_bUseASR );895 m_cTEncTop.setUseHADME ( m_bUseHADME );896 m_cTEncTop.setdQPs ( m_aidQP );897 m_cTEncTop.setUseRDOQ ( m_useRDOQ );898 m_cTEncTop.setUseRDOQTS ( m_useRDOQTS );899 m_cTEncTop.setRDpenalty ( m_rdPenalty );900 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize );901 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize );902 m_cTEncTop.setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter );903 m_cTEncTop.setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra );904 m_cTEncTop.setUseFastEnc ( m_bUseFastEnc );905 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU );906 m_cTEncTop.setUseFastDecisionForMerge ( m_useFastDecisionForMerge );907 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode );908 m_cTEncTop.setUseEarlySkipDetection ( m_useEarlySkipDetection );934 m_cTEncTop.setDeltaQpRD ( m_uiDeltaQpRD ); 935 m_cTEncTop.setUseASR ( m_bUseASR ); 936 m_cTEncTop.setUseHADME ( m_bUseHADME ); 937 m_cTEncTop.setdQPs ( m_aidQP ); 938 m_cTEncTop.setUseRDOQ ( m_useRDOQ ); 939 m_cTEncTop.setUseRDOQTS ( m_useRDOQTS ); 940 m_cTEncTop.setRDpenalty ( m_rdPenalty ); 941 m_cTEncTop.setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 942 m_cTEncTop.setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); 943 m_cTEncTop.setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 944 m_cTEncTop.setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 945 m_cTEncTop.setUseFastEnc ( m_bUseFastEnc ); 946 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 947 m_cTEncTop.setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); 948 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode ); 949 m_cTEncTop.setUseEarlySkipDetection ( m_useEarlySkipDetection ); 909 950 #if FAST_INTRA_SHVC 910 m_cTEncTop.setUseFastIntraScalable ( m_useFastIntraScalable ); 911 #endif 912 913 m_cTEncTop.setUseTransformSkip ( m_useTransformSkip ); 914 m_cTEncTop.setUseTransformSkipFast ( m_useTransformSkipFast ); 915 m_cTEncTop.setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); 916 m_cTEncTop.setPCMLog2MinSize ( m_uiPCMLog2MinSize); 917 m_cTEncTop.setUsePCM ( m_usePCM ); 918 m_cTEncTop.setPCMLog2MaxSize ( m_pcmLog2MaxSize); 919 m_cTEncTop.setMaxNumMergeCand ( m_maxNumMergeCand ); 951 m_cTEncTop.setUseFastIntraScalable ( m_useFastIntraScalable ); 952 #endif 953 m_cTEncTop.setUseCrossComponentPrediction ( m_useCrossComponentPrediction ); 954 m_cTEncTop.setUseReconBasedCrossCPredictionEstimate ( m_reconBasedCrossCPredictionEstimate ); 955 m_cTEncTop.setSaoOffsetBitShift ( CHANNEL_TYPE_LUMA , m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] ); 956 m_cTEncTop.setSaoOffsetBitShift ( CHANNEL_TYPE_CHROMA, m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] ); 957 m_cTEncTop.setUseTransformSkip ( m_useTransformSkip ); 958 m_cTEncTop.setUseTransformSkipFast ( m_useTransformSkipFast ); 959 m_cTEncTop.setUseResidualRotation ( m_useResidualRotation ); 960 m_cTEncTop.setUseSingleSignificanceMapContext ( m_useSingleSignificanceMapContext ); 961 m_cTEncTop.setUseGolombRiceParameterAdaptation ( m_useGolombRiceParameterAdaptation ); 962 m_cTEncTop.setAlignCABACBeforeBypass ( m_alignCABACBeforeBypass ); 963 m_cTEncTop.setTransformSkipLog2MaxSize ( m_transformSkipLog2MaxSize ); 964 for (UInt signallingModeIndex = 0; signallingModeIndex < NUMBER_OF_RDPCM_SIGNALLING_MODES; signallingModeIndex++) 965 { 966 m_cTEncTop.setUseResidualDPCM ( RDPCMSignallingMode(signallingModeIndex), m_useResidualDPCM[signallingModeIndex]); 967 } 968 m_cTEncTop.setUseConstrainedIntraPred ( m_bUseConstrainedIntraPred ); 969 m_cTEncTop.setPCMLog2MinSize ( m_uiPCMLog2MinSize); 970 m_cTEncTop.setUsePCM ( m_usePCM ); 971 m_cTEncTop.setPCMLog2MaxSize ( m_pcmLog2MaxSize); 972 m_cTEncTop.setMaxNumMergeCand ( m_maxNumMergeCand ); 920 973 921 974 922 975 //====== Weighted Prediction ======== 923 m_cTEncTop.setUseWP ( m_useWeightedPred );924 m_cTEncTop.setWPBiPred ( m_useWeightedBiPred );976 m_cTEncTop.setUseWP ( m_useWeightedPred ); 977 m_cTEncTop.setWPBiPred ( m_useWeightedBiPred ); 925 978 //====== Parallel Merge Estimation ======== 926 m_cTEncTop.setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 );979 m_cTEncTop.setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 ); 927 980 928 981 //====== Slice ======== 929 m_cTEncTop.setSliceMode ( m_sliceMode);930 m_cTEncTop.setSliceArgument ( m_sliceArgument );982 m_cTEncTop.setSliceMode ( (SliceConstraint) m_sliceMode ); 983 m_cTEncTop.setSliceArgument ( m_sliceArgument ); 931 984 932 985 //====== Dependent Slice ======== 933 m_cTEncTop.setSliceSegmentMode ( m_sliceSegmentMode ); 934 m_cTEncTop.setSliceSegmentArgument ( m_sliceSegmentArgument ); 935 Int iNumPartInCU = 1<<(m_uiMaxCUDepth<<1); 936 if(m_sliceSegmentMode==FIXED_NUMBER_OF_LCU) 937 { 938 m_cTEncTop.setSliceSegmentArgument ( m_sliceSegmentArgument * iNumPartInCU ); 939 } 940 if(m_sliceMode==FIXED_NUMBER_OF_LCU) 941 { 942 m_cTEncTop.setSliceArgument ( m_sliceArgument * iNumPartInCU ); 943 } 944 if(m_sliceMode==FIXED_NUMBER_OF_TILES) 945 { 946 m_cTEncTop.setSliceArgument ( m_sliceArgument ); 947 } 948 949 if(m_sliceMode == 0 ) 986 m_cTEncTop.setSliceSegmentMode ( (SliceConstraint) m_sliceSegmentMode ); 987 m_cTEncTop.setSliceSegmentArgument ( m_sliceSegmentArgument ); 988 989 if(m_sliceMode == NO_SLICES ) 950 990 { 951 991 m_bLFCrossSliceBoundaryFlag = true; 952 992 } 953 m_cTEncTop.setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 954 m_cTEncTop.setUseSAO ( m_bUseSAO ); 955 m_cTEncTop.setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); 956 957 m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary); 958 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 959 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 960 961 m_cTEncTop.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 962 m_cTEncTop.setRecoveryPointSEIEnabled( m_recoveryPointSEIEnabled ); 963 m_cTEncTop.setBufferingPeriodSEIEnabled( m_bufferingPeriodSEIEnabled ); 964 m_cTEncTop.setPictureTimingSEIEnabled( m_pictureTimingSEIEnabled ); 965 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 966 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); 967 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 968 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 969 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 970 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 971 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId ); 972 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue ); 973 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue ); 974 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 975 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth ); 976 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 977 m_cTEncTop.setTMISEINumPivots ( m_numPivots ); 978 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue ); 979 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 980 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 981 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 982 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 983 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 984 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 985 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 986 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 987 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 988 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 989 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 990 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 991 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 992 #if P0050_KNEE_FUNCTION_SEI 993 m_cTEncTop.setKneeSEIEnabled ( m_kneeSEIEnabled ); 994 m_cTEncTop.setKneeSEIId ( m_kneeSEIId ); 995 m_cTEncTop.setKneeSEICancelFlag ( m_kneeSEICancelFlag ); 996 m_cTEncTop.setKneeSEIPersistenceFlag ( m_kneeSEIPersistenceFlag ); 997 m_cTEncTop.setKneeSEIMappingFlag ( m_kneeSEIMappingFlag ); 998 m_cTEncTop.setKneeSEIInputDrange ( m_kneeSEIInputDrange ); 999 m_cTEncTop.setKneeSEIInputDispLuminance ( m_kneeSEIInputDispLuminance ); 1000 m_cTEncTop.setKneeSEIOutputDrange ( m_kneeSEIOutputDrange ); 1001 m_cTEncTop.setKneeSEIOutputDispLuminance ( m_kneeSEIOutputDispLuminance ); 1002 m_cTEncTop.setKneeSEINumKneePointsMinus1 ( m_kneeSEINumKneePointsMinus1 ); 1003 m_cTEncTop.setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 1004 m_cTEncTop.setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 1005 #endif 993 m_cTEncTop.setLFCrossSliceBoundaryFlag ( m_bLFCrossSliceBoundaryFlag ); 994 m_cTEncTop.setUseSAO ( m_bUseSAO ); 995 m_cTEncTop.setMaxNumOffsetsPerPic ( m_maxNumOffsetsPerPic); 996 997 m_cTEncTop.setSaoCtuBoundary ( m_saoCtuBoundary); 998 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 999 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 1000 1001 m_cTEncTop.setDisableIntraReferenceSmoothing (!m_enableIntraReferenceSmoothing ); 1002 m_cTEncTop.setDecodedPictureHashSEIEnabled ( m_decodedPictureHashSEIEnabled ); 1003 m_cTEncTop.setRecoveryPointSEIEnabled ( m_recoveryPointSEIEnabled ); 1004 m_cTEncTop.setBufferingPeriodSEIEnabled ( m_bufferingPeriodSEIEnabled ); 1005 m_cTEncTop.setPictureTimingSEIEnabled ( m_pictureTimingSEIEnabled ); 1006 m_cTEncTop.setToneMappingInfoSEIEnabled ( m_toneMappingInfoSEIEnabled ); 1007 m_cTEncTop.setTMISEIToneMapId ( m_toneMapId ); 1008 m_cTEncTop.setTMISEIToneMapCancelFlag ( m_toneMapCancelFlag ); 1009 m_cTEncTop.setTMISEIToneMapPersistenceFlag ( m_toneMapPersistenceFlag ); 1010 m_cTEncTop.setTMISEICodedDataBitDepth ( m_toneMapCodedDataBitDepth ); 1011 m_cTEncTop.setTMISEITargetBitDepth ( m_toneMapTargetBitDepth ); 1012 m_cTEncTop.setTMISEIModelID ( m_toneMapModelId ); 1013 m_cTEncTop.setTMISEIMinValue ( m_toneMapMinValue ); 1014 m_cTEncTop.setTMISEIMaxValue ( m_toneMapMaxValue ); 1015 m_cTEncTop.setTMISEISigmoidMidpoint ( m_sigmoidMidpoint ); 1016 m_cTEncTop.setTMISEISigmoidWidth ( m_sigmoidWidth ); 1017 m_cTEncTop.setTMISEIStartOfCodedInterva ( m_startOfCodedInterval ); 1018 m_cTEncTop.setTMISEINumPivots ( m_numPivots ); 1019 m_cTEncTop.setTMISEICodedPivotValue ( m_codedPivotValue ); 1020 m_cTEncTop.setTMISEITargetPivotValue ( m_targetPivotValue ); 1021 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 1022 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 1023 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 1024 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 1025 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 1026 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); 1027 m_cTEncTop.setTMISEIExposureCompensationValueDenomIdc ( m_exposureCompensationValueDenomIdc ); 1028 m_cTEncTop.setTMISEIRefScreenLuminanceWhite ( m_refScreenLuminanceWhite ); 1029 m_cTEncTop.setTMISEIExtendedRangeWhiteLevel ( m_extendedRangeWhiteLevel ); 1030 m_cTEncTop.setTMISEINominalBlackLevelLumaCodeValue ( m_nominalBlackLevelLumaCodeValue ); 1031 m_cTEncTop.setTMISEINominalWhiteLevelLumaCodeValue ( m_nominalWhiteLevelLumaCodeValue ); 1032 m_cTEncTop.setTMISEIExtendedWhiteLevelLumaCodeValue ( m_extendedWhiteLevelLumaCodeValue ); 1033 m_cTEncTop.setChromaSamplingFilterHintEnabled ( m_chromaSamplingFilterSEIenabled ); 1034 m_cTEncTop.setChromaSamplingHorFilterIdc ( m_chromaSamplingHorFilterIdc ); 1035 m_cTEncTop.setChromaSamplingVerFilterIdc ( m_chromaSamplingVerFilterIdc ); 1036 m_cTEncTop.setFramePackingArrangementSEIEnabled ( m_framePackingSEIEnabled ); 1037 m_cTEncTop.setFramePackingArrangementSEIType ( m_framePackingSEIType ); 1038 m_cTEncTop.setFramePackingArrangementSEIId ( m_framePackingSEIId ); 1039 m_cTEncTop.setFramePackingArrangementSEIQuincunx ( m_framePackingSEIQuincunx ); 1040 m_cTEncTop.setFramePackingArrangementSEIInterpretation ( m_framePackingSEIInterpretation ); 1041 m_cTEncTop.setSegmentedRectFramePackingArrangementSEIEnabled ( m_segmentedRectFramePackingSEIEnabled ); 1042 m_cTEncTop.setSegmentedRectFramePackingArrangementSEICancel ( m_segmentedRectFramePackingSEICancel ); 1043 m_cTEncTop.setSegmentedRectFramePackingArrangementSEIType ( m_segmentedRectFramePackingSEIType ); 1044 m_cTEncTop.setSegmentedRectFramePackingArrangementSEIPersistence( m_segmentedRectFramePackingSEIPersistence ); 1045 m_cTEncTop.setDisplayOrientationSEIAngle ( m_displayOrientationSEIAngle ); 1046 m_cTEncTop.setTemporalLevel0IndexSEIEnabled ( m_temporalLevel0IndexSEIEnabled ); 1047 m_cTEncTop.setGradualDecodingRefreshInfoEnabled ( m_gradualDecodingRefreshInfoEnabled ); 1048 m_cTEncTop.setNoDisplaySEITLayer ( m_noDisplaySEITLayer ); 1049 m_cTEncTop.setDecodingUnitInfoSEIEnabled ( m_decodingUnitInfoSEIEnabled ); 1050 m_cTEncTop.setSOPDescriptionSEIEnabled ( m_SOPDescriptionSEIEnabled ); 1051 m_cTEncTop.setScalableNestingSEIEnabled ( m_scalableNestingSEIEnabled ); 1052 m_cTEncTop.setTMCTSSEIEnabled ( m_tmctsSEIEnabled ); 1053 m_cTEncTop.setTimeCodeSEIEnabled ( m_timeCodeSEIEnabled ); 1054 m_cTEncTop.setNumberOfTimeSets ( m_timeCodeSEINumTs ); 1055 for(Int i = 0; i < m_timeCodeSEINumTs; i++) { m_cTEncTop.setTimeSet(m_timeSetArray[i], i); } 1056 m_cTEncTop.setKneeSEIEnabled ( m_kneeSEIEnabled ); 1057 m_cTEncTop.setKneeSEIId ( m_kneeSEIId ); 1058 m_cTEncTop.setKneeSEICancelFlag ( m_kneeSEICancelFlag ); 1059 m_cTEncTop.setKneeSEIPersistenceFlag ( m_kneeSEIPersistenceFlag ); 1060 m_cTEncTop.setKneeSEIInputDrange ( m_kneeSEIInputDrange ); 1061 m_cTEncTop.setKneeSEIInputDispLuminance ( m_kneeSEIInputDispLuminance ); 1062 m_cTEncTop.setKneeSEIOutputDrange ( m_kneeSEIOutputDrange ); 1063 m_cTEncTop.setKneeSEIOutputDispLuminance ( m_kneeSEIOutputDispLuminance ); 1064 m_cTEncTop.setKneeSEINumKneePointsMinus1 ( m_kneeSEINumKneePointsMinus1 ); 1065 m_cTEncTop.setKneeSEIInputKneePoint ( m_kneeSEIInputKneePoint ); 1066 m_cTEncTop.setKneeSEIOutputKneePoint ( m_kneeSEIOutputKneePoint ); 1067 m_cTEncTop.setMasteringDisplaySEI ( m_masteringDisplay ); 1006 1068 #if Q0074_COLOUR_REMAPPING_SEI 1007 m_cTEncTop.setCRISEIFile ( const_cast<Char*>(m_colourRemapSEIFile.c_str()));1069 m_cTEncTop.setCRISEIFile ( m_colourRemapSEIFile ); 1008 1070 m_cTEncTop.setCRISEIId ( m_colourRemapSEIId ); 1009 1071 m_cTEncTop.setCRISEICancelFlag ( m_colourRemapSEICancelFlag ); … … 1026 1088 m_cTEncTop.setCRISEIPostLutTargetValue ( m_colourRemapSEIPostLutTargetValue ); 1027 1089 #endif 1028 m_cTEncTop.setFramePackingArrangementSEIEnabled( m_framePackingSEIEnabled );1029 m_cTEncTop.setFramePackingArrangementSEIType( m_framePackingSEIType );1030 m_cTEncTop.setFramePackingArrangementSEIId( m_framePackingSEIId );1031 m_cTEncTop.setFramePackingArrangementSEIQuincunx( m_framePackingSEIQuincunx );1032 m_cTEncTop.setFramePackingArrangementSEIInterpretation( m_framePackingSEIInterpretation );1033 m_cTEncTop.setDisplayOrientationSEIAngle( m_displayOrientationSEIAngle );1034 m_cTEncTop.setTemporalLevel0IndexSEIEnabled( m_temporalLevel0IndexSEIEnabled );1035 m_cTEncTop.setGradualDecodingRefreshInfoEnabled( m_gradualDecodingRefreshInfoEnabled );1036 m_cTEncTop.setDecodingUnitInfoSEIEnabled( m_decodingUnitInfoSEIEnabled );1037 1090 #if LAYERS_NOT_PRESENT_SEI 1038 1091 m_cTEncTop.setLayersNotPresentSEIEnabled( m_layersNotPresentSEIEnabled ); 1039 1092 #endif 1040 m_cTEncTop.setSOPDescriptionSEIEnabled( m_SOPDescriptionSEIEnabled ); 1041 m_cTEncTop.setScalableNestingSEIEnabled( m_scalableNestingSEIEnabled ); 1042 m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 1043 m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 1044 m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 ); 1093 m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 1094 m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 1095 m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 ); 1045 1096 if(!m_tileUniformSpacingFlag) 1046 1097 { 1047 m_cTEncTop.setColumnWidth ( m_tileColumnWidth );1048 m_cTEncTop.setRowHeight ( m_tileRowHeight );1098 m_cTEncTop.setColumnWidth ( m_tileColumnWidth ); 1099 m_cTEncTop.setRowHeight ( m_tileRowHeight ); 1049 1100 } 1050 1101 m_cTEncTop.xCheckGSParameters(); 1051 Int uiTilesCount 1102 Int uiTilesCount = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1); 1052 1103 if(uiTilesCount == 1) 1053 1104 { 1054 1105 m_bLFCrossTileBoundaryFlag = true; 1055 1106 } 1056 m_cTEncTop.setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag ); 1057 m_cTEncTop.setWaveFrontSynchro ( m_iWaveFrontSynchro ); 1058 m_cTEncTop.setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 1059 m_cTEncTop.setTMVPModeId ( m_TMVPModeId ); 1060 m_cTEncTop.setUseScalingListId ( m_useScalingListId ); 1061 m_cTEncTop.setScalingListFile ( m_scalingListFile ); 1062 m_cTEncTop.setSignHideFlag(m_signHideFlag); 1063 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 1064 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); 1065 m_cTEncTop.setKeepHierBit ( m_RCKeepHierarchicalBit ); 1066 m_cTEncTop.setLCULevelRC ( m_RCLCULevelRC ); 1067 m_cTEncTop.setUseLCUSeparateModel ( m_RCUseLCUSeparateModel ); 1068 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 1069 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 1070 m_cTEncTop.setTransquantBypassEnableFlag(m_TransquantBypassEnableFlag); 1071 m_cTEncTop.setCUTransquantBypassFlagForceValue(m_CUTransquantBypassFlagForce); 1072 m_cTEncTop.setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda ); 1073 m_cTEncTop.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); 1074 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 1075 m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 1076 m_cTEncTop.setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag); 1077 m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc ); 1078 m_cTEncTop.setSarWidth( m_sarWidth ); 1079 m_cTEncTop.setSarHeight( m_sarHeight ); 1080 m_cTEncTop.setOverscanInfoPresentFlag( m_overscanInfoPresentFlag ); 1081 m_cTEncTop.setOverscanAppropriateFlag( m_overscanAppropriateFlag ); 1082 m_cTEncTop.setVideoSignalTypePresentFlag( m_videoSignalTypePresentFlag ); 1083 m_cTEncTop.setVideoFormat( m_videoFormat ); 1084 m_cTEncTop.setVideoFullRangeFlag( m_videoFullRangeFlag ); 1085 m_cTEncTop.setColourDescriptionPresentFlag( m_colourDescriptionPresentFlag ); 1086 m_cTEncTop.setColourPrimaries( m_colourPrimaries ); 1087 m_cTEncTop.setTransferCharacteristics( m_transferCharacteristics ); 1088 m_cTEncTop.setMatrixCoefficients( m_matrixCoefficients ); 1089 m_cTEncTop.setChromaLocInfoPresentFlag( m_chromaLocInfoPresentFlag ); 1090 m_cTEncTop.setChromaSampleLocTypeTopField( m_chromaSampleLocTypeTopField ); 1091 m_cTEncTop.setChromaSampleLocTypeBottomField( m_chromaSampleLocTypeBottomField ); 1092 m_cTEncTop.setNeutralChromaIndicationFlag( m_neutralChromaIndicationFlag ); 1093 m_cTEncTop.setDefaultDisplayWindow( m_defDispWinLeftOffset, m_defDispWinRightOffset, m_defDispWinTopOffset, m_defDispWinBottomOffset ); 1094 m_cTEncTop.setFrameFieldInfoPresentFlag( m_frameFieldInfoPresentFlag ); 1095 m_cTEncTop.setPocProportionalToTimingFlag( m_pocProportionalToTimingFlag ); 1096 m_cTEncTop.setNumTicksPocDiffOneMinus1 ( m_numTicksPocDiffOneMinus1 ); 1097 m_cTEncTop.setBitstreamRestrictionFlag( m_bitstreamRestrictionFlag ); 1098 m_cTEncTop.setTilesFixedStructureFlag( m_tilesFixedStructureFlag ); 1099 m_cTEncTop.setMotionVectorsOverPicBoundariesFlag( m_motionVectorsOverPicBoundariesFlag ); 1100 m_cTEncTop.setMinSpatialSegmentationIdc( m_minSpatialSegmentationIdc ); 1101 m_cTEncTop.setMaxBytesPerPicDenom( m_maxBytesPerPicDenom ); 1102 m_cTEncTop.setMaxBitsPerMinCuDenom( m_maxBitsPerMinCuDenom ); 1103 m_cTEncTop.setLog2MaxMvLengthHorizontal( m_log2MaxMvLengthHorizontal ); 1104 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 1107 m_cTEncTop.setLFCrossTileBoundaryFlag ( m_bLFCrossTileBoundaryFlag ); 1108 m_cTEncTop.setWaveFrontSynchro ( m_iWaveFrontSynchro ); 1109 m_cTEncTop.setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 1110 m_cTEncTop.setTMVPModeId ( m_TMVPModeId ); 1111 m_cTEncTop.setUseScalingListId ( m_useScalingListId ); 1112 m_cTEncTop.setScalingListFile ( m_scalingListFile ); 1113 m_cTEncTop.setSignHideFlag ( m_signHideFlag); 1114 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 1115 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); 1116 m_cTEncTop.setKeepHierBit ( m_RCKeepHierarchicalBit ); 1117 m_cTEncTop.setLCULevelRC ( m_RCLCULevelRC ); 1118 m_cTEncTop.setUseLCUSeparateModel ( m_RCUseLCUSeparateModel ); 1119 m_cTEncTop.setInitialQP ( m_RCInitialQP ); 1120 m_cTEncTop.setForceIntraQP ( m_RCForceIntraQP ); 1121 m_cTEncTop.setTransquantBypassEnableFlag ( m_TransquantBypassEnableFlag ); 1122 m_cTEncTop.setCUTransquantBypassFlagForceValue ( m_CUTransquantBypassFlagForce ); 1123 m_cTEncTop.setCostMode ( m_costMode ); 1124 m_cTEncTop.setUseRecalculateQPAccordingToLambda ( m_recalculateQPAccordingToLambda ); 1125 m_cTEncTop.setUseStrongIntraSmoothing ( m_useStrongIntraSmoothing ); 1126 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 1127 m_cTEncTop.setVuiParametersPresentFlag ( m_vuiParametersPresentFlag ); 1128 m_cTEncTop.setAspectRatioInfoPresentFlag ( m_aspectRatioInfoPresentFlag); 1129 m_cTEncTop.setAspectRatioIdc ( m_aspectRatioIdc ); 1130 m_cTEncTop.setSarWidth ( m_sarWidth ); 1131 m_cTEncTop.setSarHeight ( m_sarHeight ); 1132 m_cTEncTop.setOverscanInfoPresentFlag ( m_overscanInfoPresentFlag ); 1133 m_cTEncTop.setOverscanAppropriateFlag ( m_overscanAppropriateFlag ); 1134 m_cTEncTop.setVideoSignalTypePresentFlag ( m_videoSignalTypePresentFlag ); 1135 m_cTEncTop.setVideoFormat ( m_videoFormat ); 1136 m_cTEncTop.setVideoFullRangeFlag ( m_videoFullRangeFlag ); 1137 m_cTEncTop.setColourDescriptionPresentFlag ( m_colourDescriptionPresentFlag ); 1138 m_cTEncTop.setColourPrimaries ( m_colourPrimaries ); 1139 m_cTEncTop.setTransferCharacteristics ( m_transferCharacteristics ); 1140 m_cTEncTop.setMatrixCoefficients ( m_matrixCoefficients ); 1141 m_cTEncTop.setChromaLocInfoPresentFlag ( m_chromaLocInfoPresentFlag ); 1142 m_cTEncTop.setChromaSampleLocTypeTopField ( m_chromaSampleLocTypeTopField ); 1143 m_cTEncTop.setChromaSampleLocTypeBottomField ( m_chromaSampleLocTypeBottomField ); 1144 m_cTEncTop.setNeutralChromaIndicationFlag ( m_neutralChromaIndicationFlag ); 1145 m_cTEncTop.setDefaultDisplayWindow ( m_defDispWinLeftOffset, m_defDispWinRightOffset, m_defDispWinTopOffset, m_defDispWinBottomOffset ); 1146 m_cTEncTop.setFrameFieldInfoPresentFlag ( m_frameFieldInfoPresentFlag ); 1147 m_cTEncTop.setPocProportionalToTimingFlag ( m_pocProportionalToTimingFlag ); 1148 m_cTEncTop.setNumTicksPocDiffOneMinus1 ( m_numTicksPocDiffOneMinus1 ); 1149 m_cTEncTop.setBitstreamRestrictionFlag ( m_bitstreamRestrictionFlag ); 1150 m_cTEncTop.setTilesFixedStructureFlag ( m_tilesFixedStructureFlag ); 1151 m_cTEncTop.setMotionVectorsOverPicBoundariesFlag ( m_motionVectorsOverPicBoundariesFlag ); 1152 m_cTEncTop.setMinSpatialSegmentationIdc ( m_minSpatialSegmentationIdc ); 1153 m_cTEncTop.setMaxBytesPerPicDenom ( m_maxBytesPerPicDenom ); 1154 m_cTEncTop.setMaxBitsPerMinCuDenom ( m_maxBitsPerMinCuDenom ); 1155 m_cTEncTop.setLog2MaxMvLengthHorizontal ( m_log2MaxMvLengthHorizontal ); 1156 m_cTEncTop.setLog2MaxMvLengthVertical ( m_log2MaxMvLengthVertical ); 1105 1157 } 1106 1158 #endif //SVC_EXTENSION … … 1117 1169 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1118 1170 //2 1119 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;1120 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;1121 1122 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;1123 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;1171 for( UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 1172 { 1173 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1174 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1175 } 1124 1176 #endif 1125 1177 #if LAYER_CTB … … 1129 1181 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1130 1182 #endif 1183 // Video I/O 1131 1184 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1132 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_acLayerCfg[layer].m_inputBitDepth Y, m_acLayerCfg[layer].m_inputBitDepthC, m_acLayerCfg[layer].m_internalBitDepthY, m_acLayerCfg[layer].m_internalBitDepthC); // read mode1133 #else 1134 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_inputBitDepth Y, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC); // read mode1135 #endif 1136 m_acTVideoIOYuvInputFile[layer].skipFrames(m_FrameSkip, m_acLayerCfg[layer].getSourceWidth() - m_acLayerCfg[layer].getPad()[0], m_acLayerCfg[layer].getSourceHeight() - m_acLayerCfg[layer].getPad()[1] );1185 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_acLayerCfg[layer].m_inputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth ); // read mode 1186 #else 1187 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode 1188 #endif 1189 m_acTVideoIOYuvInputFile[layer].skipFrames(m_FrameSkip, m_acLayerCfg[layer].getSourceWidth() - m_acLayerCfg[layer].getPad()[0], m_acLayerCfg[layer].getSourceHeight() - m_acLayerCfg[layer].getPad()[1], m_acLayerCfg[layer].m_InputChromaFormatIDC); 1137 1190 1138 1191 if (!m_acLayerCfg[layer].getReconFile().empty()) 1139 1192 { 1140 1193 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1141 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_acLayerCfg[layer].m_outputBitDepthY, m_acLayerCfg[layer].m_outputBitDepthC, m_acLayerCfg[layer].m_internalBitDepthY, m_acLayerCfg[layer].m_internalBitDepthC ); // write mode 1142 #else 1143 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // write mode 1144 #endif 1145 } 1146 1194 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_acLayerCfg[layer].m_outputBitDepth, m_acLayerCfg[layer].m_MSBExtendedBitDepth, m_acLayerCfg[layer].m_internalBitDepth ); // write mode 1195 #else 1196 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_outputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // write mode 1197 #endif 1198 } 1199 1200 // Neo Decoder 1147 1201 m_acTEncTop[layer].create(); 1148 1202 } 1149 1203 #else //SVC_EXTENSION 1150 m_cTVideoIOYuvInputFile.open( m_pchInputFile, false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 1151 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1]); 1204 // Video I/O 1205 m_cTVideoIOYuvInputFile.open( m_pchInputFile, false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode 1206 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1], m_InputChromaFormatIDC); 1152 1207 1153 1208 if (m_pchReconFile) 1154 m_cTVideoIOYuvReconFile.open(m_pchReconFile, true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC); // write mode 1209 { 1210 m_cTVideoIOYuvReconFile.open(m_pchReconFile, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode 1211 } 1155 1212 1156 1213 // Neo Decoder … … 1216 1273 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1217 1274 //3 1218 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;1219 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;1220 1221 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;1222 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;1275 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 1276 { 1277 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1278 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 1279 } 1223 1280 #endif 1224 1281 #if LAYER_CTB … … 1258 1315 } 1259 1316 } 1260 for ( Int setId = 1; setId < vps->getNumLayerSets(); setId++)1317 for (Int setId = 1; setId < vps->getNumLayerSets(); setId++) 1261 1318 { 1262 1319 #if OUTPUT_LAYER_SETS_CONFIG … … 1271 1328 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1272 1329 //4 1273 g_bitDepth Y = m_acLayerCfg[layerId].m_internalBitDepthY;1274 g_bitDepth C = m_acLayerCfg[layerId].m_internalBitDepthC;1275 1276 g_ uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY;1277 g_ uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC;1330 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1331 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1332 1333 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1334 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1278 1335 #endif 1279 1336 … … 1293 1350 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1294 1351 //4 1295 g_bitDepth Y = m_acLayerCfg[layerId].m_internalBitDepthY;1296 g_bitDepth C = m_acLayerCfg[layerId].m_internalBitDepthC;1297 1298 g_ uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY;1299 g_ uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC;1352 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1353 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1354 1355 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 1356 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 1300 1357 #endif 1301 1358 if (layerId <= setId) … … 1611 1668 #endif 1612 1669 vps->setOutputLayerFlag( 0, 0, 1 ); 1670 1613 1671 // derive OutputLayerFlag[i][j] 1614 1672 #if !OUTPUT_LAYER_SETS_CONFIG … … 2016 2074 Bool bEos = false; 2017 2075 2076 const InputColourSpaceConversion ipCSC = m_inputColourSpaceConvert; 2077 const InputColourSpaceConversion snrCSC = (!m_snrInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED; 2078 2018 2079 list<AccessUnit> outputAccessUnits; ///< list of access units to write out. is populated by the encoding process 2080 2081 TComPicYuv acPicYuvTrueOrg[MAX_LAYERS]; 2019 2082 2020 2083 for(UInt layer=0; layer<m_numLayers; layer++) … … 2022 2085 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2023 2086 //5 2024 g_bitDepth Y = m_acLayerCfg[layer].m_internalBitDepthY;2025 g_bitDepth C = m_acLayerCfg[layer].m_internalBitDepthC;2026 2027 g_ uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;2028 g_ uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;2087 g_bitDepth[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 2088 g_bitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 2089 2090 g_PCMBitDepth[CHANNEL_TYPE_LUMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA]; 2091 g_PCMBitDepth[CHANNEL_TYPE_CHROMA] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]; 2029 2092 #endif 2030 2093 // allocate original YUV buffer … … 2032 2095 if( m_isField ) 2033 2096 { 2034 #if SVC_EXTENSION2035 2097 #if LAYER_CTB 2036 #if AUXILIARY_PICTURES2037 2098 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2038 #else 2039 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2040 #endif 2041 #else 2042 #if AUXILIARY_PICTURES 2099 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2100 #else 2043 2101 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2044 #else 2045 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2046 #endif 2047 #endif 2048 #else 2049 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2102 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2050 2103 #endif 2051 2104 } 2052 2105 else 2053 2106 { 2054 #if SVC_EXTENSION2055 2107 #if LAYER_CTB 2056 #if AUXILIARY_PICTURES2057 2108 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2058 #else 2059 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2060 #endif 2061 #else 2062 #if AUXILIARY_PICTURES 2109 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2110 #else 2063 2111 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2064 #else 2065 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2066 #endif 2067 #endif 2068 #else 2069 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2112 acPicYuvTrueOrg[layer].create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2070 2113 #endif 2071 2114 } … … 2083 2126 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2084 2127 //6 2085 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;2086 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;2087 2088 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;2089 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;2128 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 2129 { 2130 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2131 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2132 } 2090 2133 #endif 2091 2134 #if LAYER_CTB … … 2100 2143 2101 2144 // read input YUV file 2102 m_acTVideoIOYuvInputFile[layer].read( pcPicYuvOrg[layer], m_acLayerCfg[layer].getPad() );2145 m_acTVideoIOYuvInputFile[layer].read( pcPicYuvOrg[layer], &acPicYuvTrueOrg[layer], ipCSC, m_acLayerCfg[layer].getPad(), m_acLayerCfg[layer].getInputChromaFormat() ); 2103 2146 2104 2147 #if AUXILIARY_PICTURES … … 2124 2167 if ( m_isField ) 2125 2168 { 2126 m_acTEncTop[layer].encodePrep( pcPicYuvOrg[layer], m_isTopFieldFirst );2169 m_acTEncTop[layer].encodePrep( pcPicYuvOrg[layer], &acPicYuvTrueOrg[layer], m_isTopFieldFirst ); 2127 2170 } 2128 2171 else 2129 2172 { 2130 m_acTEncTop[layer].encodePrep( pcPicYuvOrg[layer] );2173 m_acTEncTop[layer].encodePrep( pcPicYuvOrg[layer], &acPicYuvTrueOrg[layer] ); 2131 2174 } 2132 2175 } … … 2177 2220 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2178 2221 //7 2179 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;2180 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;2181 2182 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;2183 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;2222 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 2223 { 2224 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2225 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2226 } 2184 2227 #endif 2185 2228 #if LAYER_CTB … … 2195 2238 #endif 2196 2239 // call encoding function for one frame 2197 if ( m_isField ) 2198 { 2199 m_acTEncTop[layer].encode( flush ? 0 : pcPicYuvOrg[layer], m_acListPicYuvRec[layer], outputAccessUnits, iPicIdInGOP, m_isTopFieldFirst ); 2200 } 2201 else 2202 { 2203 m_acTEncTop[layer].encode( flush ? 0 : pcPicYuvOrg[layer], m_acListPicYuvRec[layer], outputAccessUnits, iPicIdInGOP ); 2204 } 2240 if ( m_isField ) m_acTEncTop[layer].encode( flush ? 0 : pcPicYuvOrg[layer], snrCSC, m_acListPicYuvRec[layer], outputAccessUnits, iPicIdInGOP, m_isTopFieldFirst ); 2241 else m_acTEncTop[layer].encode( flush ? 0 : pcPicYuvOrg[layer], snrCSC, m_acListPicYuvRec[layer], outputAccessUnits, iPicIdInGOP ); 2205 2242 } 2206 2243 } … … 2209 2246 { 2210 2247 list<AccessUnit>::iterator first_au = outputAccessUnits.begin(); 2248 if( m_nonHEVCBaseLayerFlag ) 2249 { 2250 first_au++; 2251 } 2211 2252 AccessUnit::iterator it_sps; 2212 2253 for (it_sps = first_au->begin(); it_sps != first_au->end(); it_sps++) … … 2248 2289 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2249 2290 //8 2250 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY;2251 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC;2252 2253 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY;2254 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC;2291 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) 2292 { 2293 g_bitDepth[channelTypeIndex] = m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2294 g_PCMBitDepth[channelTypeIndex] = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepth[channelTypeIndex] : m_acLayerCfg[layer].m_internalBitDepth[channelTypeIndex]; 2295 } 2255 2296 #endif 2256 2297 // write bistream to file if necessary … … 2289 2330 if (bEos) 2290 2331 { 2291 printOutSummary(m_isTopFieldFirst );2332 printOutSummary(m_isTopFieldFirst, m_printMSEBasedSequencePSNR, m_printSequenceMSE); 2292 2333 } 2293 2334 … … 2303 2344 // delete used buffers in encoder class 2304 2345 m_acTEncTop[layer].deletePicBuffer(); 2346 acPicYuvTrueOrg[layer].destroy(); 2305 2347 } 2306 2348 … … 2314 2356 } 2315 2357 2316 Void TAppEncTop::printOutSummary(Bool isField )2358 Void TAppEncTop::printOutSummary(Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE) 2317 2359 { 2318 2360 UInt layer; … … 2339 2381 //-- all 2340 2382 printf( "\n\nSUMMARY --------------------------------------------------------\n" ); 2341 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR \n" );2342 2383 for(layer = 0; layer < m_numLayers; layer++) 2343 2384 { 2344 m_gcAnalyzeAll[layer].printOut('a', layer);2385 m_gcAnalyzeAll[layer].printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, layer); 2345 2386 } 2346 2387 2347 2388 printf( "\n\nI Slices--------------------------------------------------------\n" ); 2348 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR \n" );2349 2389 for(layer = 0; layer < m_numLayers; layer++) 2350 2390 { 2351 m_gcAnalyzeI[layer].printOut('i', layer);2391 m_gcAnalyzeI[layer].printOut('i', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, layer); 2352 2392 } 2353 2393 2354 2394 printf( "\n\nP Slices--------------------------------------------------------\n" ); 2355 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR \n" );2356 2395 for(layer = 0; layer < m_numLayers; layer++) 2357 2396 { 2358 m_gcAnalyzeP[layer].printOut('p', layer);2397 m_gcAnalyzeP[layer].printOut('p', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, layer); 2359 2398 } 2360 2399 2361 2400 printf( "\n\nB Slices--------------------------------------------------------\n" ); 2362 printf( "\tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR \n" );2363 2401 for(layer = 0; layer < m_numLayers; layer++) 2364 2402 { 2365 m_gcAnalyzeB[layer].printOut('b', layer);2403 m_gcAnalyzeB[layer].printOut('b', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, layer); 2366 2404 } 2367 2405 … … 2372 2410 //-- interlaced summary 2373 2411 m_gcAnalyzeAll_in.setFrmRate( m_acLayerCfg[layer].getFrameRate()); 2412 m_gcAnalyzeAll_in.setBits(m_gcAnalyzeB[layer].getBits()); 2413 // prior to the above statement, the interlace analyser does not contain the correct total number of bits. 2414 2374 2415 printf( "\n\nSUMMARY INTERLACED ---------------------------------------------\n" ); 2375 m_gcAnalyzeAll_in.printOut Interlaced('a', m_gcAnalyzeAll[layer].getBits());2416 m_gcAnalyzeAll_in.printOut('a', m_acLayerCfg[layer].getChromaFormatIDC(), printMSEBasedSNR, printSequenceMSE, layer); 2376 2417 2377 2418 #if _SUMMARY_OUT_ … … 2380 2421 } 2381 2422 } 2423 2424 printf("\n"); 2425 //printf("\nRVM: %.3lf\n" , xCalculateRVM()); 2382 2426 } 2383 2427 2384 2428 #else 2429 // ==================================================================================================================== 2430 // Public member functions 2431 // ==================================================================================================================== 2432 2433 /** 2434 - create internal class 2435 - initialize internal variable 2436 - until the end of input YUV file, call encoding function in TEncTop class 2437 - delete allocated buffers 2438 - destroy internal class 2439 . 2440 */ 2385 2441 Void TAppEncTop::encode() 2386 2442 { … … 2400 2456 xInitLib(m_isField); 2401 2457 2458 printChromaFormat(); 2459 2402 2460 // main encoder loop 2403 2461 Int iNumEncoded = 0; 2404 2462 Bool bEos = false; 2405 2463 2464 const InputColourSpaceConversion ipCSC = m_inputColourSpaceConvert; 2465 const InputColourSpaceConversion snrCSC = (!m_snrInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED; 2466 2406 2467 list<AccessUnit> outputAccessUnits; ///< list of access units to write out. is populated by the encoding process 2468 2469 TComPicYuv cPicYuvTrueOrg; 2407 2470 2408 2471 // allocate original YUV buffer 2409 2472 if( m_isField ) 2410 2473 { 2411 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2474 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2475 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeightOrg, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth); 2412 2476 } 2413 2477 else 2414 2478 { 2415 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2479 pcPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2480 cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth); 2416 2481 } 2417 2482 … … 2422 2487 2423 2488 // read input YUV file 2424 m_cTVideoIOYuvInputFile.read( pcPicYuvOrg, m_aiPad);2489 m_cTVideoIOYuvInputFile.read( pcPicYuvOrg, &cPicYuvTrueOrg, ipCSC, m_aiPad, m_InputChromaFormatIDC ); 2425 2490 2426 2491 // increase number of received frames … … 2428 2493 2429 2494 bEos = (m_isField && (m_iFrameRcvd == (m_framesToBeEncoded >> 1) )) || ( !m_isField && (m_iFrameRcvd == m_framesToBeEncoded) ); 2495 2430 2496 Bool flush = 0; 2431 2497 // if end of file (which is only detected on a read failure) flush the encoder of any queued pictures … … 2439 2505 2440 2506 // call encoding function for one frame 2441 if ( m_isField ) 2442 { 2443 m_cTEncTop.encode( bEos, flush ? 0 : pcPicYuvOrg, m_cListPicYuvRec, outputAccessUnits, iNumEncoded, m_isTopFieldFirst); 2444 } 2445 else 2446 { 2447 m_cTEncTop.encode( bEos, flush ? 0 : pcPicYuvOrg, m_cListPicYuvRec, outputAccessUnits, iNumEncoded ); 2448 } 2507 if ( m_isField ) m_cTEncTop.encode( bEos, flush ? 0 : pcPicYuvOrg, flush ? 0 : &cPicYuvTrueOrg, snrCSC, m_cListPicYuvRec, outputAccessUnits, iNumEncoded, m_isTopFieldFirst ); 2508 else m_cTEncTop.encode( bEos, flush ? 0 : pcPicYuvOrg, flush ? 0 : &cPicYuvTrueOrg, snrCSC, m_cListPicYuvRec, outputAccessUnits, iNumEncoded ); 2449 2509 2450 2510 // write bistream to file if necessary … … 2465 2525 // delete used buffers in encoder class 2466 2526 m_cTEncTop.deletePicBuffer(); 2527 cPicYuvTrueOrg.destroy(); 2467 2528 2468 2529 // delete buffers & classes … … 2492 2553 2493 2554 // org. buffer 2494 if ( m_acListPicYuvRec[layer].size() == (UInt)m_iGOPSize )2555 if ( m_acListPicYuvRec[layer].size() >= (UInt)m_iGOPSize ) // buffer will be 1 element longer when using field coding, to maintain first field whilst processing second. 2495 2556 { 2496 2557 rpcPicYuvRec = m_acListPicYuvRec[layer].popFront(); … … 2502 2563 2503 2564 #if LAYER_CTB 2504 #if AUXILIARY_PICTURES2505 2565 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL ); 2506 2566 #else 2507 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].m_uiMaxCUWidth, m_acLayerCfg[layer].m_uiMaxCUHeight, m_acLayerCfg[layer].m_uiMaxCUDepth, NULL );2508 #endif2509 #else2510 #if AUXILIARY_PICTURES2511 2567 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 2512 #else2513 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL );2514 #endif2515 2568 #endif 2516 2569 … … 2544 2597 #endif 2545 2598 2599 const InputColourSpaceConversion ipCSC = (!m_outputInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED; 2600 2546 2601 if (m_isField) 2547 2602 { … … 2567 2622 { 2568 2623 #if REPN_FORMAT_IN_VPS 2569 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal,2570 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, m_isTopFieldFirst );2571 #else 2572 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom(), m_isTopFieldFirst );2624 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 2625 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2626 #else 2627 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom(), NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2573 2628 #endif 2574 2629 } … … 2596 2651 { 2597 2652 #if REPN_FORMAT_IN_VPS 2598 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal,2653 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, ipCSC, m_acLayerCfg[layer].getConfWinLeft() * xScal, m_acLayerCfg[layer].getConfWinRight() * xScal, 2599 2654 m_acLayerCfg[layer].getConfWinTop() * yScal, m_acLayerCfg[layer].getConfWinBottom() * yScal ); 2600 2655 #else 2601 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(),2656 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, ipCSC, m_acLayerCfg[layer].getConfWinLeft(), m_acLayerCfg[layer].getConfWinRight(), 2602 2657 m_acLayerCfg[layer].getConfWinTop(), m_acLayerCfg[layer].getConfWinBottom() ); 2603 2658 #endif … … 2655 2710 2656 2711 // org. buffer 2657 if ( m_cListPicYuvRec.size() == (UInt)m_iGOPSize )2712 if ( m_cListPicYuvRec.size() >= (UInt)m_iGOPSize ) // buffer will be 1 element longer when using field coding, to maintain first field whilst processing second. 2658 2713 { 2659 2714 rpcPicYuvRec = m_cListPicYuvRec.popFront(); … … 2664 2719 rpcPicYuvRec = new TComPicYuv; 2665 2720 2666 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_ uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );2721 rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 2667 2722 2668 2723 } … … 2689 2744 Void TAppEncTop::xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits) 2690 2745 { 2746 const InputColourSpaceConversion ipCSC = (!m_outputInternalColourSpace) ? m_inputColourSpaceConvert : IPCOLOURSPACE_UNCHANGED; 2747 2691 2748 if (m_isField) 2692 2749 { … … 2708 2765 if (m_pchReconFile) 2709 2766 { 2710 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst );2767 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); 2711 2768 } 2712 2769 … … 2723 2780 { 2724 2781 Int i; 2782 2725 2783 TComList<TComPicYuv*>::iterator iterPicYuvRec = m_cListPicYuvRec.end(); 2726 2784 list<AccessUnit>::const_iterator iterBitstream = accessUnits.begin(); … … 2736 2794 if (m_pchReconFile) 2737 2795 { 2738 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );2796 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 2739 2797 } 2740 2798 … … 2750 2808 * 2751 2809 */ 2752 void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes)2810 Void TAppEncTop::rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& annexBsizes) 2753 2811 { 2754 2812 AccessUnit::const_iterator it_au = au.begin(); … … 2788 2846 } 2789 2847 2790 void TAppEncTop::printRateSummary()2848 Void TAppEncTop::printRateSummary() 2791 2849 { 2792 2850 #if SVC_EXTENSION … … 2801 2859 } 2802 2860 2861 #if !SVC_EXTENSION 2862 Void TAppEncTop::printChromaFormat() 2863 { 2864 std::cout << std::setw(43) << "Input ChromaFormatIDC = "; 2865 switch (m_InputChromaFormatIDC) 2866 { 2867 case CHROMA_400: std::cout << " 4:0:0"; break; 2868 case CHROMA_420: std::cout << " 4:2:0"; break; 2869 case CHROMA_422: std::cout << " 4:2:2"; break; 2870 case CHROMA_444: std::cout << " 4:4:4"; break; 2871 default: 2872 std::cerr << "Invalid"; 2873 exit(1); 2874 } 2875 std::cout << std::endl; 2876 2877 std::cout << std::setw(43) << "Output (internal) ChromaFormatIDC = "; 2878 switch (m_cTEncTop.getChromaFormatIdc()) 2879 { 2880 case CHROMA_400: std::cout << " 4:0:0"; break; 2881 case CHROMA_420: std::cout << " 4:2:0"; break; 2882 case CHROMA_422: std::cout << " 4:2:2"; break; 2883 case CHROMA_444: std::cout << " 4:4:4"; break; 2884 default: 2885 std::cerr << "Invalid"; 2886 exit(1); 2887 } 2888 std::cout << "\n" << std::endl; 2889 } 2890 #endif 2891 2803 2892 //! \} -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.h
r595 r1029 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 70 70 TVideoIOYuv m_cTVideoIOYuvInputFile; ///< input YUV file 71 71 TVideoIOYuv m_cTVideoIOYuvReconFile; ///< output reconstruction file 72 72 73 73 TComList<TComPicYuv*> m_cListPicYuvRec; ///< list of reconstruction YUV files 74 74 #endif 75 75 76 76 Int m_iFrameRcvd; ///< number of received frames 77 77 78 78 UInt m_essentialBytes; 79 79 UInt m_totalBytes; 80 80 81 protected: 81 82 // initialization … … 84 85 Void xInitLib (Bool isFieldCoding); ///< initialize encoder class 85 86 Void xDestroyLib (); ///< destroy encoder class 86 87 87 88 /// obtain required buffers 88 89 #if SVC_EXTENSION … … 94 95 /// delete allocated buffers 95 96 Void xDeleteBuffer (); 96 97 97 98 // file I/O 98 99 #if SVC_EXTENSION 99 100 Void xWriteRecon(UInt layer, Int iNumEncoded); 100 101 Void xWriteStream(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); 101 Void printOutSummary(Bool isField );102 Void printOutSummary(Bool isField, const Bool printMSEBasedSNR, const Bool printSequenceMSE); 102 103 #else 103 104 Void xWriteOutput(std::ostream& bitstreamFile, Int iNumEncoded, const std::list<AccessUnit>& accessUnits); ///< write bitstream to file 105 Void printChromaFormat(); 104 106 #endif 105 void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);106 void printRateSummary();107 Void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats); 108 Void printRateSummary(); 107 109 108 110 public: 109 111 TAppEncTop(); 110 112 virtual ~TAppEncTop(); 111 113 112 114 Void encode (); ///< main encoding function 113 115 #if SVC_EXTENSION -
branches/SHM-dev/source/App/TAppEncoder/encmain.cpp
r595 r1029 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are 4 * granted under this license. 4 * granted under this license. 5 5 * 6 6 * Copyright (c) 2010-2014, ITU/ISO/IEC … … 41 41 #include "TAppCommon/program_options_lite.h" 42 42 43 using namespace std;44 namespace po = df::program_options_lite;45 46 43 //! \ingroup TAppEncoder 47 44 //! \{ 45 46 #include "../Lib/TLibCommon/Debug.h" 48 47 49 48 // ==================================================================================================================== … … 60 59 fprintf( stdout, "SHM software: Encoder Version [%s]", NV_VERSION ); 61 60 #else 62 fprintf( stdout, "HM software: Encoder Version [%s] ", NV_VERSION );61 fprintf( stdout, "HM software: Encoder Version [%s] (including RExt)", NV_VERSION ); 63 62 #endif 64 63 fprintf( stdout, NVM_ONOS ); 65 64 fprintf( stdout, NVM_COMPILEDBY ); 66 65 fprintf( stdout, NVM_BITS ); 67 fprintf( stdout, "\n " );66 fprintf( stdout, "\n\n" ); 68 67 69 68 // create application encoder class … … 76 75 { 77 76 cTAppEncTop.destroy(); 77 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 78 EnvVar::printEnvVar(); 79 #endif 78 80 return 1; 79 81 } 80 82 } 81 catch ( po::ParseFailure&e)83 catch (df::program_options_lite::ParseFailure &e) 82 84 { 83 cerr << "Error parsing option \""<< e.arg <<"\" with argument \""<< e.val <<"\"." <<endl;85 std::cerr << "Error parsing option \""<< e.arg <<"\" with argument \""<< e.val <<"\"." << std::endl; 84 86 return 1; 85 87 } 86 88 89 #if PRINT_MACRO_VALUES 90 printMacroSettings(); 91 #endif 92 93 #if ENVIRONMENT_VARIABLE_DEBUG_AND_TEST 94 EnvVar::printEnvVarInUse(); 95 #endif 96 87 97 // starting time 88 double dResult;89 longlBefore = clock();98 Double dResult; 99 clock_t lBefore = clock(); 90 100 91 101 // call encoding function … … 93 103 94 104 // ending time 95 dResult = ( double)(clock()-lBefore) / CLOCKS_PER_SEC;105 dResult = (Double)(clock()-lBefore) / CLOCKS_PER_SEC; 96 106 printf("\n Total Time: %12.3f sec.\n", dResult); 97 107
Note: See TracChangeset for help on using the changeset viewer.