Changeset 494 in SHVCSoftware for trunk/source/App
- Timestamp:
- 16 Nov 2013, 22:09:25 (11 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-4.0-dev (added) merged: 444-493
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-4.0-dev/source (added) merged: 445-471,473-479,481-486,488-493
- Property svn:mergeinfo changed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r442 r494 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-2013, ITU/ISO/IEC … … 80 80 m_pchBitstreamFile = NULL; 81 81 } 82 #if SVC_EXTENSION 82 #if SVC_EXTENSION 83 83 for( Int i = 0; i < m_tgtLayerId; i++ ) 84 84 { … … 88 88 m_pchReconFile[i] = NULL; 89 89 } 90 } 90 } 91 91 #if AVC_BASE 92 92 if( m_pchBLReconFile ) … … 225 225 if (bNewPicture || !bitstreamFile) 226 226 { 227 #if O0194_DIFFERENT_BITDEPTH_EL_BL 228 //Bug fix: The bit depth was not set correctly for each layer when doing DBF 229 g_bitDepthY = g_bitDepthYLayer[curLayerId]; 230 g_bitDepthC = g_bitDepthCLayer[curLayerId]; 231 #endif 227 232 m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic); 228 233 #if EARLY_REF_PIC_MARKING … … 235 240 if ( m_pchReconFile[curLayerId] && !openedReconFile[curLayerId] ) 236 241 { 237 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 242 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 238 243 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 239 244 … … 242 247 openedReconFile[curLayerId] = true; 243 248 } 244 if ( bNewPicture && bNewPOC && 249 if ( bNewPicture && bNewPOC && 245 250 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 246 251 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP … … 276 281 } 277 282 #endif 278 pcBLPic.destroy(); 283 pcBLPic.destroy(); 279 284 280 285 for(UInt layer = layerIdmin; layer <= m_tgtLayerId; layer++) … … 285 290 m_acTDecTop[layer].deletePicBuffer(); 286 291 } 287 292 288 293 // destroy internal classes 289 294 xDestroyDecLib(); … … 394 399 openedReconFile = true; 395 400 } 396 if ( bNewPicture && 401 if ( bNewPicture && 397 402 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 398 403 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP … … 410 415 } 411 416 } 412 417 413 418 #if SYNTAX_OUTPUT 414 419 if( streamSyntaxFile.is_open() ) … … 417 422 } 418 423 #endif 419 424 420 425 xFlushOutput( pcListPic ); 421 426 // delete buffers 422 427 m_cTDecTop.deletePicBuffer(); 423 428 424 429 // destroy internal classes 425 430 xDestroyDecLib(); … … 435 440 #if SVC_EXTENSION 436 441 // initialize global variables 437 initROM(); 442 initROM(); 438 443 439 444 for(UInt layer = 0; layer <= m_tgtLayerId; layer++) … … 445 450 m_acTDecTop[layer].create(); 446 451 447 m_acTDecTop[layer].setLayerDec(m_apcTDecTop); 452 m_acTDecTop[layer].setLayerDec(m_apcTDecTop); 448 453 } 449 454 #else … … 474 479 m_cTVideoIOYuvReconFile. close(); 475 480 } 476 481 477 482 // destroy decoder class 478 483 m_cTDecTop.destroy(); … … 566 571 567 572 #else 573 #if O0194_DIFFERENT_BITDEPTH_EL_BL 574 // Compile time bug-fix 575 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 576 #else 568 577 m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 578 #endif 569 579 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 570 580 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), … … 723 733 { 724 734 return; 725 } 735 } 726 736 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 727 737 … … 759 769 760 770 #else 771 #if O0194_DIFFERENT_BITDEPTH_EL_BL 772 // Compile time bug-fix 773 m_acTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 774 #else 761 775 m_cTVideoIOYuvReconFile[layerId].write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 776 #endif 762 777 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 763 778 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), … … 913 928 pcPic = NULL; 914 929 } 915 #endif 930 #endif 916 931 #endif 917 932 iterPic++; -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r442 r494 221 221 } 222 222 #endif 223 #if EXTERNAL_USEDBYCURR_N0082224 if(entry.m_numRefPics>0){225 in>>entry.m_UseExtusedByCurrPic;226 if(entry.m_UseExtusedByCurrPic)227 {228 for ( Int i = 0; i < entry.m_numRefPics; i++ )229 {230 in>>entry.m_ExtusedByCurrPic[i];231 }232 }233 }234 #endif235 223 return in; 236 224 } 225 226 #if AUXILIARY_PICTURES 227 static inline ChromaFormat numberToChromaFormat(const Int val) 228 { 229 switch (val) 230 { 231 case 400: return CHROMA_400; break; 232 case 420: return CHROMA_420; break; 233 case 422: return CHROMA_422; break; 234 case 444: return CHROMA_444; break; 235 default: return NUM_CHROMA_FORMAT; 236 } 237 } 238 #endif 237 239 238 240 #if SVC_EXTENSION … … 362 364 Int* cfg_IntraPeriod [MAX_LAYERS]; 363 365 Int* cfg_conformanceMode [MAX_LAYERS]; 366 #if LAYER_CTB 367 // coding unit (CU) definition 368 UInt* cfg_uiMaxCUWidth[MAX_LAYERS]; ///< max. CU width in pixel 369 UInt* cfg_uiMaxCUHeight[MAX_LAYERS]; ///< max. CU height in pixel 370 UInt* cfg_uiMaxCUDepth[MAX_LAYERS]; ///< max. CU depth 371 372 // transfom unit (TU) definition 373 UInt* cfg_uiQuadtreeTULog2MaxSize[MAX_LAYERS]; 374 UInt* cfg_uiQuadtreeTULog2MinSize[MAX_LAYERS]; 375 376 UInt* cfg_uiQuadtreeTUMaxDepthInter[MAX_LAYERS]; 377 UInt* cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS]; 378 #endif 379 #if AUXILIARY_PICTURES 380 Int cfg_tmpChromaFormatIDC [MAX_LAYERS]; 381 Int cfg_tmpInputChromaFormat[MAX_LAYERS]; 382 Int* cfg_auxId [MAX_LAYERS]; 383 #endif 364 384 #if VPS_EXTN_DIRECT_REF_LAYERS 365 385 #if M0457_PREDICTION_INDICATIONS … … 379 399 string* cfg_predLayerIdsPtr [MAX_LAYERS]; 380 400 #endif 381 #if SCALED_REF_LAYER_OFFSETS382 401 string cfg_scaledRefLayerLeftOffset [MAX_LAYERS]; 383 402 string cfg_scaledRefLayerTopOffset [MAX_LAYERS]; … … 390 409 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 391 410 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 392 #endif393 411 #if RC_SHVC_HARMONIZATION 394 412 Bool* cfg_RCEnableRateControl [MAX_LAYERS]; … … 400 418 Bool* cfg_RCForceIntraQP [MAX_LAYERS]; 401 419 #endif 420 #if O0194_DIFFERENT_BITDEPTH_EL_BL 421 Int* cfg_InputBitDepthY [MAX_LAYERS]; 422 Int* cfg_InternalBitDepthY [MAX_LAYERS]; 423 Int* cfg_InputBitDepthC [MAX_LAYERS]; 424 Int* cfg_InternalBitDepthC [MAX_LAYERS]; 425 Int* cfg_OutputBitDepthY [MAX_LAYERS]; 426 Int* cfg_OutputBitDepthC [MAX_LAYERS]; 427 #endif 402 428 #if N0120_MAX_TID_REF_CFG 403 429 Int* cfg_maxTidIlRefPicsPlus1[MAX_LAYERS]; … … 416 442 cfg_IntraPeriod[layer] = &m_acLayerCfg[layer].m_iIntraPeriod; 417 443 cfg_conformanceMode[layer] = &m_acLayerCfg[layer].m_conformanceMode; 444 #if LAYER_CTB 445 // coding unit (CU) definition 446 cfg_uiMaxCUWidth[layer] = &m_acLayerCfg[layer].m_uiMaxCUWidth; 447 cfg_uiMaxCUHeight[layer] = &m_acLayerCfg[layer].m_uiMaxCUHeight; 448 cfg_uiMaxCUDepth[layer] = &m_acLayerCfg[layer].m_uiMaxCUDepth; 449 450 // transfom unit (TU) definition. 451 cfg_uiQuadtreeTULog2MaxSize[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize; 452 cfg_uiQuadtreeTULog2MinSize[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize; 453 454 cfg_uiQuadtreeTUMaxDepthInter[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter; 455 cfg_uiQuadtreeTUMaxDepthIntra[layer] = &m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra; 456 #endif 418 457 #if VPS_EXTN_DIRECT_REF_LAYERS 419 458 #if M0457_PREDICTION_INDICATIONS … … 429 468 cfg_predLayerIdsPtr [layer] = &cfg_predLayerIds[layer]; 430 469 #endif 431 #if SCALED_REF_LAYER_OFFSETS432 470 cfg_numScaledRefLayerOffsets [layer] = &m_acLayerCfg[layer].m_numScaledRefLayerOffsets; 433 471 for(Int i = 0; i < MAX_LAYERS; i++) … … 438 476 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 439 477 } 440 #endif441 478 #if RC_SHVC_HARMONIZATION 442 479 cfg_RCEnableRateControl[layer] = &m_acLayerCfg[layer].m_RCEnableRateControl; … … 448 485 cfg_RCForceIntraQP[layer] = &m_acLayerCfg[layer].m_RCForceIntraQP; 449 486 #endif 487 #if O0194_DIFFERENT_BITDEPTH_EL_BL 488 cfg_InputBitDepthY [layer] = &m_acLayerCfg[layer].m_inputBitDepthY; 489 cfg_InternalBitDepthY[layer] = &m_acLayerCfg[layer].m_internalBitDepthY; 490 cfg_InputBitDepthC [layer] = &m_acLayerCfg[layer].m_inputBitDepthC; 491 cfg_InternalBitDepthC[layer] = &m_acLayerCfg[layer].m_internalBitDepthC; 492 cfg_OutputBitDepthY [layer] = &m_acLayerCfg[layer].m_outputBitDepthY; 493 cfg_OutputBitDepthC [layer] = &m_acLayerCfg[layer].m_outputBitDepthC; 494 #endif 450 495 #if N0120_MAX_TID_REF_CFG 451 496 cfg_maxTidIlRefPicsPlus1[layer] = &m_acLayerCfg[layer].m_maxTidIlRefPicsPlus1; 452 497 #endif 498 #if AUXILIARY_PICTURES 499 cfg_auxId[layer] = &m_acLayerCfg[layer].m_auxId; 500 #endif 453 501 } 454 502 #if AVC_BASE … … 461 509 string cfg_tileSets; 462 510 #endif 463 #else 511 #else //SVC_EXTENSION 464 512 string cfg_InputFile; 465 513 string cfg_BitstreamFile; 466 514 string cfg_ReconFile; 467 515 string cfg_dQPFile; 468 #endif 516 #endif //SVC_EXTENSION 469 517 string cfg_ColumnWidth; 470 518 string cfg_RowHeight; … … 487 535 ("FrameRate%d,-fr%d", cfg_FrameRate, 0, MAX_LAYERS, "Frame rate for layer %d") 488 536 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, ( double )1.0, MAX_TLAYER, "Lambda modifier for temporal layer %d") 537 #if O0215_PHASE_ALIGNMENT 538 ("PhaseAlignment", m_phaseAlignFlag, false, "indicate the sample location alignment between layers (0: zero position aligned, 1: central position aligned)") 539 #endif 489 540 #if REPN_FORMAT_IN_VPS 490 541 ("RepFormatIdx%d", cfg_repFormatIdx, -1, MAX_LAYERS, "Index to the representation format structure used from the VPS") … … 504 555 #endif 505 556 ("NumLayers", m_numLayers, 1, "Number of layers to code") 557 #if AUXILIARY_PICTURES 558 ("InputChromaFormat%d", cfg_tmpInputChromaFormat, 420, MAX_LAYERS, "InputChromaFormatIDC for layer %d") 559 ("ChromaFormatIDC%d,-cf", cfg_tmpChromaFormatIDC, 420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d") 560 ("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") 561 #endif 506 562 ("ConformanceMode%d", cfg_conformanceMode,0, MAX_LAYERS, "Window conformance mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 507 563 #if SCALABILITY_MASK_E0104 508 564 ("ScalabilityMask1", m_scalabilityMask[1], 0, "scalability_mask[1] (multiview)") 509 565 ("ScalabilityMask2", m_scalabilityMask[2], 1, "scalability_mask[2] (scalable)" ) 566 #if AUXILIARY_PICTURES 567 ("ScalabilityMask3", m_scalabilityMask[3], 0, "scalability_mask[3] (auxiliary pictures)" ) 568 #endif 510 569 #else 511 570 ("ScalabilityMask0", m_scalabilityMask[0], 0, "scalability_mask[0] (multiview)") … … 513 572 #endif 514 573 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") 574 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 515 575 ("InputBitDepth", m_inputBitDepthY, 8, "Bit-depth of input file") 516 576 ("OutputBitDepth", m_outputBitDepthY, 0, "Bit-depth of output file (default:InternalBitDepth)") … … 520 580 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 521 581 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 522 # if SCALED_REF_LAYER_OFFSETS582 #endif 523 583 ("NumScaledRefLayerOffsets%d", cfg_numScaledRefLayerOffsets, 0, MAX_LAYERS, "Number of scaled offset layer sets ") 524 584 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), MAX_LAYERS, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" … … 530 590 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr,string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 531 591 " bottom-right luma sample of the EL picture, in units of two luma samples") 592 #if O0194_DIFFERENT_BITDEPTH_EL_BL 593 ("InputBitDepth%d", cfg_InputBitDepthY, 8, MAX_LAYERS, "Bit-depth of input file for layer %d") 594 ("InternalBitDepth%d", cfg_InternalBitDepthY, 0, MAX_LAYERS, "Bit-depth the codec operates at. (default:InputBitDepth) for layer %d ") 595 // "If different to InputBitDepth, source data will be converted") 596 ("InputBitDepthC%d", cfg_InputBitDepthC, 0, MAX_LAYERS, "As per InputBitDepth but for chroma component. (default:InputBitDepth) for layer %d") 597 ("InternalBitDepthC%d", cfg_InternalBitDepthC, 0, MAX_LAYERS, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth) for layer %d") 598 ("OutputBitDepth%d", cfg_OutputBitDepthY, 0, MAX_LAYERS, "Bit-depth of output file (default:InternalBitDepth)") 599 ("OutputBitDepthC%d", cfg_OutputBitDepthC, 0, MAX_LAYERS, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 532 600 #endif 533 601 #if N0120_MAX_TID_REF_CFG … … 546 614 ("IlSampleOnlyPred%d", m_ilSampleOnlyPred, 0, MAX_LAYERS, "Set inter_layer_sample_pred_only_flag for all slices") 547 615 #endif 548 #else 616 #else //SVC_EXTENSION 549 617 ("InputFile,i", cfg_InputFile, string(""), "Original YUV input file name") 550 618 ("BitstreamFile,b", cfg_BitstreamFile, string(""), "Bitstream output file name") … … 559 627 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 560 628 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 629 #if AUXILIARY_PICTURES 630 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 631 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 632 #endif 561 633 ("ConformanceMode", m_conformanceMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 562 634 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") … … 567 639 ("ConfBottom", m_confBottom, 0, "Bottom offset for window conformance mode 3") 568 640 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 569 #endif 641 #endif //SVC_EXTENSION 570 642 571 643 //Field coding parameters … … 574 646 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") 575 647 ("FramesToBeEncoded,f", m_framesToBeEncoded, 0, "Number of frames to be encoded (default=all)") 576 577 648 // Profile and level 578 649 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") … … 585 656 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 586 657 658 #if LAYER_CTB 659 // Unit definition parameters 660 ("MaxCUWidth%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 661 ("MaxCUHeight%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 662 // todo: remove defaults from MaxCUSize 663 ("MaxCUSize%d,s%d", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 664 ("MaxCUSize%d,s%d", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 665 ("MaxPartitionDepth%d,h%d", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 666 667 ("QuadtreeTULog2MaxSize%d", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 668 ("QuadtreeTULog2MinSize%d", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 669 670 ("QuadtreeTUMaxDepthIntra%d", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 671 ("QuadtreeTUMaxDepthInter%d", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 672 673 674 // set the same CU realted settings across all the layers if config file parameters are not layer specific 675 ("MaxCUWidth", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU width") 676 ("MaxCUHeight", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU height") 677 // todo: remove defaults from MaxCUSize 678 ("MaxCUSize,s", cfg_uiMaxCUWidth, 64u, MAX_LAYERS, "Maximum CU size") 679 ("MaxCUSize,s", cfg_uiMaxCUHeight, 64u, MAX_LAYERS, "Maximum CU size") 680 ("MaxPartitionDepth,h", cfg_uiMaxCUDepth, 4u, MAX_LAYERS, "CU depth") 681 682 ("QuadtreeTULog2MaxSize", cfg_uiQuadtreeTULog2MaxSize, 6u, MAX_LAYERS, "Maximum TU size in logarithm base 2") 683 ("QuadtreeTULog2MinSize", cfg_uiQuadtreeTULog2MinSize, 2u, MAX_LAYERS, "Minimum TU size in logarithm base 2") 684 685 ("QuadtreeTUMaxDepthIntra", cfg_uiQuadtreeTUMaxDepthIntra, 1u, MAX_LAYERS, "Depth of TU tree for intra CUs") 686 ("QuadtreeTUMaxDepthInter", cfg_uiQuadtreeTUMaxDepthInter, 2u, MAX_LAYERS, "Depth of TU tree for inter CUs") 687 #else 587 688 // Unit definition parameters 588 689 ("MaxCUWidth", m_uiMaxCUWidth, 64u) … … 598 699 ("QuadtreeTUMaxDepthIntra", m_uiQuadtreeTUMaxDepthIntra, 1u, "Depth of TU tree for intra CUs") 599 700 ("QuadtreeTUMaxDepthInter", m_uiQuadtreeTUMaxDepthInter, 2u, "Depth of TU tree for inter CUs") 701 #endif 600 702 601 703 // Coding structure paramters … … 864 966 opts.addOptions()(cOSS.str(), m_GOPList[i-1], GOPEntry()); 865 967 } 866 #if FINAL_RPL_CHANGE_N0082867 for(Int i=1; i<MAX_GOP+1; i++) {868 std::ostringstream cOSS;869 cOSS<<"FrameEL"<<i;870 opts.addOptions()(cOSS.str(), m_acLayerCfg[1].m_GOPListLayer[i-1], GOPEntry());871 }872 #endif873 968 po::setDefaults(opts); 874 969 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv); … … 921 1016 m_BLSyntaxFile = cfg_BLSyntaxFile.empty() ? NULL : strdup(cfg_BLSyntaxFile.c_str()); 922 1017 #endif 923 #else 1018 #else //SVC_EXTENSION 924 1019 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str()); 925 1020 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 926 1021 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 927 1022 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 928 #endif 1023 #endif //SVC_EXTENSION 929 1024 930 1025 Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); … … 985 1080 m_pRowHeight = NULL; 986 1081 } 987 #if S CALED_REF_LAYER_OFFSETS1082 #if SVC_EXTENSION 988 1083 for(Int layer = 0; layer < MAX_LAYERS; layer++) 989 1084 { … … 1055 1150 } 1056 1151 } 1057 #endif1058 1152 #if VPS_EXTN_DIRECT_REF_LAYERS 1059 1153 #if M0457_PREDICTION_INDICATIONS … … 1153 1247 } 1154 1248 #endif 1249 #if AUXILIARY_PICTURES 1250 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 1251 { 1252 m_acLayerCfg[layer].m_InputChromaFormat = numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]); 1253 m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormat ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]))); 1254 } 1255 #endif 1155 1256 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1156 1257 { … … 1185 1286 } 1186 1287 #endif 1288 #endif //SVC_EXTENSION 1187 1289 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 1188 1290 1189 #if REPN_FORMAT_IN_VPS_123 1291 /* rules for input, output and internal bitdepths as per help text */ 1292 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1190 1293 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1191 1294 { 1192 m_acLayerCfg[layer].setSourceHeight( m_repFormatCfg[ m_acLayerCfg[layer].getRepFormatIdx() ].m_picHeightInLumaSamples); 1193 m_acLayerCfg[layer].setSourceWidth ( m_repFormatCfg[ m_acLayerCfg[layer].getRepFormatIdx() ].m_picWidthInLumaSamples ); 1194 } 1195 #endif 1196 /* rules for input, output and internal bitdepths as per help text */ 1295 if (!m_acLayerCfg[layer].m_internalBitDepthY) { m_acLayerCfg[layer].m_internalBitDepthY = m_acLayerCfg[layer].m_inputBitDepthY; } 1296 if (!m_acLayerCfg[layer].m_internalBitDepthC) { m_acLayerCfg[layer].m_internalBitDepthC = m_acLayerCfg[layer].m_internalBitDepthY; } 1297 if (!m_acLayerCfg[layer].m_inputBitDepthC) { m_acLayerCfg[layer].m_inputBitDepthC = m_acLayerCfg[layer].m_inputBitDepthY; } 1298 if (!m_acLayerCfg[layer].m_outputBitDepthY) { m_acLayerCfg[layer].m_outputBitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; } 1299 if (!m_acLayerCfg[layer].m_outputBitDepthC) { m_acLayerCfg[layer].m_outputBitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; } 1300 } 1301 #else 1197 1302 if (!m_internalBitDepthY) { m_internalBitDepthY = m_inputBitDepthY; } 1198 1303 if (!m_internalBitDepthC) { m_internalBitDepthC = m_internalBitDepthY; } … … 1200 1305 if (!m_outputBitDepthY) { m_outputBitDepthY = m_internalBitDepthY; } 1201 1306 if (!m_outputBitDepthC) { m_outputBitDepthC = m_internalBitDepthC; } 1307 #endif 1202 1308 1203 1309 #if !SVC_EXTENSION … … 1411 1517 1412 1518 // set global varibles 1519 #if LAYER_CTB 1520 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1521 { 1522 xSetGlobal(layer); 1523 } 1524 #else 1413 1525 xSetGlobal(); 1526 #endif 1414 1527 1415 1528 // print-out parameters … … 1450 1563 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) 1451 1564 // check range of parameters 1565 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1566 for(UInt layer=0; layer<m_numLayers; layer++) 1567 { 1568 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 1569 xConfirmPara( m_acLayerCfg[layer].m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); 1570 } 1571 #else 1452 1572 xConfirmPara( m_inputBitDepthY < 8, "InputBitDepth must be at least 8" ); 1453 1573 xConfirmPara( m_inputBitDepthC < 8, "InputBitDepthC must be at least 8" ); 1574 #endif 1454 1575 #if !SVC_EXTENSION 1455 1576 xConfirmPara( m_iFrameRate <= 0, "Frame rate must be more than 1" ); … … 1471 1592 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 1472 1593 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); 1594 #if LAYER_CTB 1595 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 1596 { 1597 xConfirmPara( m_iMaxCuDQPDepth > m_acLayerCfg[layer].m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 1598 } 1599 #else 1473 1600 xConfirmPara( m_iMaxCuDQPDepth > m_uiMaxCUDepth - 1, "Absolute depth for a minimum CuDQP exceeds maximum coding unit depth" ); 1601 #endif 1474 1602 1475 1603 xConfirmPara( m_cbQpOffset < -12, "Min. Chroma Cb QP Offset is -12" ); … … 1485 1613 } 1486 1614 #endif 1615 #if !LAYER_CTB 1487 1616 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); 1488 1617 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8"); 1489 1618 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16"); 1490 1619 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16"); 1620 #endif 1491 1621 #if !SVC_EXTENSION 1492 1622 xConfirmPara( (m_iSourceWidth % (m_uiMaxCUWidth >> (m_uiMaxCUDepth-1)))!=0, "Resulting coded frame width must be a multiple of the minimum CU size"); … … 1494 1624 #endif 1495 1625 1626 #if !LAYER_CTB 1496 1627 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); 1497 1628 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller."); … … 1507 1638 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 1508 1639 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 1640 #endif 1509 1641 1510 1642 xConfirmPara( m_maxNumMergeCand < 1, "MaxNumMergeCand must be 1 or greater."); … … 1554 1686 #endif 1555 1687 1688 #if !LAYER_CTB 1556 1689 // max CU width and height should be power of 2 1557 1690 UInt ui = m_uiMaxCUWidth; … … 1569 1702 xConfirmPara( ui != 1 , "Height should be 2^n"); 1570 1703 } 1571 1704 #endif 1572 1705 1573 1706 /* if this is an intra-only sequence, ie IntraPeriod=1, don't verify the GOP structure … … 1590 1723 #endif 1591 1724 1592 #if EXTERNAL_USEDBYCURR_N0082|| !FINAL_RPL_CHANGE_N0082 1725 1593 1726 Bool verifiedGOP=false; 1594 #endif1595 1727 Bool errorGOP=false; 1596 #if EXTERNAL_USEDBYCURR_N0082|| !FINAL_RPL_CHANGE_N00821597 1728 Int checkGOP=1; 1598 1729 Int numRefs = m_isField ? 2 : 1; 1599 #endif1600 1730 Int refList[MAX_NUM_REF_PICS+1]; 1601 1731 refList[0]=0; … … 1609 1739 isOK[i]=false; 1610 1740 } 1611 #if EXTERNAL_USEDBYCURR_N0082|| !FINAL_RPL_CHANGE_N00821612 1741 Int numOK=0; 1613 #endif1614 1742 #if !SVC_EXTENSION 1615 1743 xConfirmPara( m_iIntraPeriod >=0&&(m_iIntraPeriod%m_iGOPSize!=0), "Intra period must be a multiple of GOPSize, or -1" ); … … 1654 1782 } 1655 1783 #endif 1656 #if FINAL_RPL_CHANGE_N0082 1657 for(UInt layer=0; layer<m_numLayers; layer++) 1658 { 1659 if (m_acLayerCfg[layer].m_GOPListLayer[0].m_POC<0) 1660 { 1661 memcpy( m_acLayerCfg[layer].m_GOPListLayer, m_GOPList, sizeof(GOPEntry)*MAX_GOP ); 1662 } 1663 errorGOP = xconfirmExtraGOP( m_acLayerCfg[layer].m_GOPListLayer ); 1664 xConfirmPara(errorGOP,"Invalid GOP structure given"); 1665 } 1666 #if TEMP_SCALABILITY_FIX 1667 if( m_acLayerCfg[1].m_GOPListLayer[5].m_POC == 6 && m_acLayerCfg[1].m_GOPListLayer[7].m_POC == 7 && 1668 m_acLayerCfg[1].m_GOPListLayer[5].m_temporalId == 0 && m_acLayerCfg[1].m_GOPListLayer[7].m_temporalId == 0) 1669 #else 1670 //tentative for encoder 1671 if( m_acLayerCfg[1].m_GOPListLayer[5].m_POC == 6 && m_acLayerCfg[1].m_GOPListLayer[7].m_POC == 7 ) 1672 #endif 1673 { 1674 //RA, POC5 1675 m_acLayerCfg[1].m_GOPListLayer[5].m_usedByCurrPic[2] = 0; 1676 m_acLayerCfg[1].m_GOPListLayer[5].m_refIdc[2] = 0; 1677 //RA, POC7 1678 m_acLayerCfg[1].m_GOPListLayer[7].m_usedByCurrPic[2] = 0; 1679 m_acLayerCfg[1].m_GOPListLayer[7].m_refIdc[2] = 0; 1680 } 1681 #endif 1682 #if EXTERNAL_USEDBYCURR_N0082|| !FINAL_RPL_CHANGE_N0082 1784 1683 1785 m_extraRPSs=0; 1684 1786 //start looping through frames in coding order until we can verify that the GOP structure is correct. … … 1876 1978 } 1877 1979 xConfirmPara(errorGOP,"Invalid GOP structure given"); 1878 #endif 1879 #if EXTERNAL_USEDBYCURR_N0082 1880 for(UInt layer=0; layer<m_numLayers; layer++) 1881 { 1882 for (Int i=0; i< m_iGOPSize; i++){ 1883 if (m_acLayerCfg[layer].m_GOPListLayer[i].m_UseExtusedByCurrPic == 1 ) 1884 { 1885 for(Int j=0; j<m_acLayerCfg[layer].m_GOPListLayer[i].m_numRefPics; j++ ) 1886 { 1887 m_acLayerCfg[layer].m_GOPListLayer[i].m_usedByCurrPic[j] = m_acLayerCfg[layer].m_GOPListLayer[i].m_ExtusedByCurrPic[j]; 1888 m_acLayerCfg[layer].m_GOPListLayer[i].m_refIdc[j] = m_acLayerCfg[layer].m_GOPListLayer[i].m_ExtusedByCurrPic[j]; 1889 } 1890 } 1891 } 1892 } 1893 #endif 1980 1894 1981 m_maxTempLayer = 1; 1895 1982 for(Int i=0; i<m_iGOPSize; i++) … … 1966 2053 Int m_iSourceWidth = m_acLayerCfg[layer].m_iSourceWidth; 1967 2054 Int m_iSourceHeight = m_acLayerCfg[layer].m_iSourceHeight; 2055 #if LAYER_CTB 2056 Int m_uiMaxCUWidth = m_acLayerCfg[layer].m_uiMaxCUWidth; 2057 Int m_uiMaxCUHeight = m_acLayerCfg[layer].m_uiMaxCUHeight; 2058 #endif 1968 2059 #endif 1969 2060 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) … … 2201 2292 } 2202 2293 #endif 2294 #if AUXILIARY_PICTURES 2295 for (UInt layer=0; layer < MAX_LAYERS-1; layer++) 2296 { 2297 xConfirmPara(m_acLayerCfg[layer].m_auxId < 0 || m_acLayerCfg[layer].m_auxId > 4, "AuxId must be in range 0 to 4"); 2298 xConfirmPara(m_acLayerCfg[layer].m_auxId > 0 && m_acLayerCfg[layer].m_chromaFormatIDC != CHROMA_400, "Auxiliary picture must be monochrome picture"); 2299 } 2300 #endif 2203 2301 #undef xConfirmPara 2204 2302 if (check_failed) … … 2210 2308 /** \todo use of global variables should be removed later 2211 2309 */ 2310 #if LAYER_CTB 2311 Void TAppEncCfg::xSetGlobal(UInt layerId) 2312 { 2313 // set max CU width & height 2314 g_auiLayerMaxCUWidth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUWidth; 2315 g_auiLayerMaxCUHeight[layerId] = m_acLayerCfg[layerId].m_uiMaxCUHeight; 2316 2317 // compute actual CU depth with respect to config depth and max transform size 2318 g_auiLayerAddCUDepth[layerId] = 0; 2319 while( (m_acLayerCfg[layerId].m_uiMaxCUWidth>>m_acLayerCfg[layerId].m_uiMaxCUDepth) > ( 1 << ( m_acLayerCfg[layerId].m_uiQuadtreeTULog2MinSize + g_auiLayerAddCUDepth[layerId] ) ) ) g_auiLayerAddCUDepth[layerId]++; 2320 2321 m_acLayerCfg[layerId].m_uiMaxCUDepth += g_auiLayerAddCUDepth[layerId]; 2322 g_auiLayerAddCUDepth[layerId]++; 2323 g_auiLayerMaxCUDepth[layerId] = m_acLayerCfg[layerId].m_uiMaxCUDepth; 2324 2325 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2326 // set internal bit-depth to constant value to make sure to be updated later 2327 g_bitDepthY = -1; 2328 g_bitDepthC = -1; 2329 2330 g_uiPCMBitDepthLuma = -1; 2331 g_uiPCMBitDepthChroma = -1; 2332 #else 2333 // set internal bit-depth and constants 2334 g_bitDepthY = m_internalBitDepthY; 2335 g_bitDepthC = m_internalBitDepthC; 2336 2337 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY; 2338 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC; 2339 #endif 2340 } 2341 #else 2212 2342 Void TAppEncCfg::xSetGlobal() 2213 2343 { … … 2224 2354 g_uiMaxCUDepth = m_uiMaxCUDepth; 2225 2355 2226 // set internal bit-depth and constants 2356 #if O0194_DIFFERENT_BITDEPTH_EL_BL 2357 // set internal bit-depth to constant value to make sure to be updated later 2358 g_bitDepthY = -1; 2359 g_bitDepthC = -1; 2360 2361 g_uiPCMBitDepthLuma = -1; 2362 g_uiPCMBitDepthChroma = -1; 2363 #else 2227 2364 g_bitDepthY = m_internalBitDepthY; 2228 2365 g_bitDepthC = m_internalBitDepthC; … … 2230 2367 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_inputBitDepthY : m_internalBitDepthY; 2231 2368 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_inputBitDepthC : m_internalBitDepthC; 2369 #endif 2232 2370 } 2371 #endif 2233 2372 2234 2373 Void TAppEncCfg::xPrintParameter() … … 2240 2379 printf("Multiview : %d\n", m_scalabilityMask[1] ); 2241 2380 printf("Scalable : %d\n", m_scalabilityMask[2] ); 2381 #if AUXILIARY_PICTURES 2382 printf("Auxiliary pictures : %d\n", m_scalabilityMask[3] ); 2383 #endif 2242 2384 #else 2243 2385 printf("Multiview : %d\n", m_scalabilityMask[0] ); … … 2284 2426 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 2285 2427 } 2428 #if !LAYER_CTB 2286 2429 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 2287 2430 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 2288 2431 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 2289 2432 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 2433 #endif 2290 2434 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 2291 2435 printf("Motion search range : %d\n", m_iSearchRange ); … … 2304 2448 printf("QP adaptation : %d (range=%d)\n", m_bUseAdaptiveQP, (m_bUseAdaptiveQP ? m_iQPAdaptationRange : 0) ); 2305 2449 printf("GOP size : %d\n", m_iGOPSize ); 2450 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 2306 2451 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC ); 2307 2452 printf("PCM sample bit depth : (Y:%d, C:%d)\n", g_uiPCMBitDepthLuma, g_uiPCMBitDepthChroma ); 2453 #endif 2454 #if O0215_PHASE_ALIGNMENT 2455 printf("cross-layer sample alignment : %d\n", m_phaseAlignFlag); 2456 #endif 2308 2457 #if RATE_CONTROL_LAMBDA_DOMAIN 2309 2458 #if !RC_SHVC_HARMONIZATION … … 2331 2480 2332 2481 printf("TOOL CFG: "); 2482 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 2333 2483 printf("IBD:%d ", g_bitDepthY > m_inputBitDepthY || g_bitDepthC > m_inputBitDepthC); 2484 #endif 2334 2485 printf("HAD:%d ", m_bUseHADME ); 2335 2486 printf("SRD:%d ", m_bUseSBACRD ); … … 2362 2513 printf("CIP:%d ", m_bUseConstrainedIntraPred); 2363 2514 printf("SAO:%d ", (m_bUseSAO)?(1):(0)); 2515 #if !LAYER_CTB 2364 2516 printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0); 2517 #endif 2365 2518 printf("SAOLcuBasedOptimization:%d ", (m_saoLcuBasedOptimization)?(1):(0)); 2366 2519 … … 2394 2547 printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 ); 2395 2548 #endif 2549 printf("O0194_DIFFERENT_BITDEPTH_EL_BL: %d ", O0194_DIFFERENT_BITDEPTH_EL_BL); 2550 printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT); 2551 printf("O0194_WEIGHTED_PREDICTION_CGS: %d ",O0194_WEIGHTED_PREDICTION_CGS); 2396 2552 printf("\n\n"); 2397 2553 … … 2408 2564 } 2409 2565 2410 #if S CALED_REF_LAYER_OFFSETS2566 #if SVC_EXTENSION 2411 2567 Void TAppEncCfg::cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString) 2412 2568 { … … 2441 2597 } 2442 2598 } 2443 #endif 2444 2445 #if FINAL_RPL_CHANGE_N0082 2446 Bool TAppEncCfg::xconfirmExtraGOP (GOPEntry * ge) 2447 { 2448 Bool verifiedGOP=false; 2449 Bool errorGOP=false; 2450 Int checkGOP=1; 2451 Int numRefs = 1; 2452 Int refList[MAX_NUM_REF_PICS+1]; 2453 refList[0]=0; 2454 Bool isOK[MAX_GOP]; 2455 for(Int i=0; i<MAX_GOP; i++) 2456 { 2457 isOK[i]=false; 2458 } 2459 Int numOK=0; 2460 2461 m_extraRPSs=0; 2462 //start looping through frames in coding order until we can verify that the GOP structure is correct. 2463 while(!verifiedGOP&&!errorGOP) 2464 { 2465 Int curGOP = (checkGOP-1)%m_iGOPSize; 2466 Int curPOC = ((checkGOP-1)/m_iGOPSize)*m_iGOPSize + ge[curGOP].m_POC; 2467 if(ge[curGOP].m_POC<0) 2468 { 2469 printf("\nError: found fewer Reference Picture Sets than GOPSize\n"); 2470 errorGOP=true; 2471 } 2472 else 2473 { 2474 //check that all reference pictures are available, or have a POC < 0 meaning they might be available in the next GOP. 2475 Bool beforeI = false; 2476 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2477 { 2478 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2479 if(absPOC < 0) 2480 { 2481 beforeI=true; 2482 } 2483 else 2484 { 2485 Bool found=false; 2486 for(Int j=0; j<numRefs; j++) 2487 { 2488 if(refList[j]==absPOC) 2489 { 2490 found=true; 2491 for(Int k=0; k<m_iGOPSize; k++) 2492 { 2493 if(absPOC%m_iGOPSize == ge[k].m_POC%m_iGOPSize) 2494 { 2495 if(ge[k].m_temporalId==ge[curGOP].m_temporalId) 2496 { 2497 ge[k].m_refPic = true; 2498 } 2499 ge[curGOP].m_usedByCurrPic[i]=ge[k].m_temporalId<=ge[curGOP].m_temporalId; 2500 } 2501 } 2502 } 2503 } 2504 if(!found) 2505 { 2506 printf("\nError: ref pic %d is not available for GOP frame %d\n",ge[curGOP].m_referencePics[i],curGOP+1); 2507 errorGOP=true; 2508 } 2509 } 2510 } 2511 if(!beforeI&&!errorGOP) 2512 { 2513 //all ref frames were present 2514 if(!isOK[curGOP]) 2515 { 2516 numOK++; 2517 isOK[curGOP]=true; 2518 if(numOK==m_iGOPSize) 2519 { 2520 verifiedGOP=true; 2521 } 2522 } 2523 } 2524 else 2525 { 2526 //create a new GOPEntry for this frame containing all the reference pictures that were available (POC > 0) 2527 ge[m_iGOPSize+m_extraRPSs]=ge[curGOP]; 2528 Int newRefs=0; 2529 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2530 { 2531 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2532 if(absPOC>=0) 2533 { 2534 ge[m_iGOPSize+m_extraRPSs].m_referencePics[newRefs]=ge[curGOP].m_referencePics[i]; 2535 ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[newRefs]=ge[curGOP].m_usedByCurrPic[i]; 2536 newRefs++; 2537 } 2538 } 2539 Int numPrefRefs = ge[curGOP].m_numRefPicsActive; 2540 2541 for(Int offset = -1; offset>-checkGOP; offset--) 2542 { 2543 //step backwards in coding order and include any extra available pictures we might find useful to replace the ones with POC < 0. 2544 Int offGOP = (checkGOP-1+offset)%m_iGOPSize; 2545 Int offPOC = ((checkGOP-1+offset)/m_iGOPSize)*m_iGOPSize + ge[offGOP].m_POC; 2546 if(offPOC>=0&&ge[offGOP].m_temporalId<=ge[curGOP].m_temporalId) 2547 { 2548 Bool newRef=false; 2549 for(Int i=0; i<numRefs; i++) 2550 { 2551 if(refList[i]==offPOC) 2552 { 2553 newRef=true; 2554 } 2555 } 2556 for(Int i=0; i<newRefs; i++) 2557 { 2558 if(ge[m_iGOPSize+m_extraRPSs].m_referencePics[i]==offPOC-curPOC) 2559 { 2560 newRef=false; 2561 } 2562 } 2563 if(newRef) 2564 { 2565 Int insertPoint=newRefs; 2566 //this picture can be added, find appropriate place in list and insert it. 2567 if(ge[offGOP].m_temporalId==ge[curGOP].m_temporalId) 2568 { 2569 ge[offGOP].m_refPic = true; 2570 } 2571 for(Int j=0; j<newRefs; j++) 2572 { 2573 if(ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]<offPOC-curPOC||ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]>0) 2574 { 2575 insertPoint = j; 2576 break; 2577 } 2578 } 2579 Int prev = offPOC-curPOC; 2580 Int prevUsed = ge[offGOP].m_temporalId<=ge[curGOP].m_temporalId; 2581 for(Int j=insertPoint; j<newRefs+1; j++) 2582 { 2583 Int newPrev = ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]; 2584 Int newUsed = ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]; 2585 ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]=prev; 2586 ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]=prevUsed; 2587 prevUsed=newUsed; 2588 prev=newPrev; 2589 } 2590 newRefs++; 2591 } 2592 } 2593 if(newRefs>=numPrefRefs) 2594 { 2595 break; 2596 } 2597 } 2598 ge[m_iGOPSize+m_extraRPSs].m_numRefPics=newRefs; 2599 ge[m_iGOPSize+m_extraRPSs].m_POC = curPOC; 2600 if (m_extraRPSs == 0) 2601 { 2602 ge[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 0; 2603 ge[m_iGOPSize+m_extraRPSs].m_numRefIdc = 0; 2604 } 2605 else 2606 { 2607 Int rIdx = m_iGOPSize + m_extraRPSs - 1; 2608 Int refPOC = ge[rIdx].m_POC; 2609 Int refPics = ge[rIdx].m_numRefPics; 2610 Int newIdc=0; 2611 for(Int i = 0; i<= refPics; i++) 2612 { 2613 Int deltaPOC = ((i != refPics)? ge[rIdx].m_referencePics[i] : 0); // check if the reference abs POC is >= 0 2614 Int absPOCref = refPOC+deltaPOC; 2615 Int refIdc = 0; 2616 for (Int j = 0; j < ge[m_iGOPSize+m_extraRPSs].m_numRefPics; j++) 2617 { 2618 if ( (absPOCref - curPOC) == ge[m_iGOPSize+m_extraRPSs].m_referencePics[j]) 2619 { 2620 if (ge[m_iGOPSize+m_extraRPSs].m_usedByCurrPic[j]) 2621 { 2622 refIdc = 1; 2623 } 2624 else 2625 { 2626 refIdc = 2; 2627 } 2628 } 2629 } 2630 ge[m_iGOPSize+m_extraRPSs].m_refIdc[newIdc]=refIdc; 2631 newIdc++; 2632 } 2633 ge[m_iGOPSize+m_extraRPSs].m_interRPSPrediction = 1; 2634 ge[m_iGOPSize+m_extraRPSs].m_numRefIdc = newIdc; 2635 ge[m_iGOPSize+m_extraRPSs].m_deltaRPS = refPOC - ge[m_iGOPSize+m_extraRPSs].m_POC; 2636 } 2637 curGOP=m_iGOPSize+m_extraRPSs; 2638 m_extraRPSs++; 2639 } 2640 numRefs=0; 2641 for(Int i = 0; i< ge[curGOP].m_numRefPics; i++) 2642 { 2643 Int absPOC = curPOC+ge[curGOP].m_referencePics[i]; 2644 if(absPOC >= 0) 2645 { 2646 refList[numRefs]=absPOC; 2647 numRefs++; 2648 } 2649 } 2650 refList[numRefs]=curPOC; 2651 numRefs++; 2652 } 2653 checkGOP++; 2654 } 2655 2656 return errorGOP; //update 2657 } 2658 #endif 2599 2600 #endif //SVC_EXTENSION 2659 2601 //! \} -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r442 r494 101 101 Int m_aiPad[2]; ///< number of padded pixels for width and height 102 102 #endif 103 103 #if AUXILIARY_PICTURES 104 ChromaFormat m_InputChromaFormatIDC; 105 #endif 104 106 Bool m_isField; ///< enable field coding 105 107 Bool m_isTopFieldFirst; … … 150 152 Int m_maxTempLayer; ///< Max temporal layer 151 153 154 #if !LAYER_CTB 152 155 // coding unit (CU) definition 153 156 UInt m_uiMaxCUWidth; ///< max. CU width in pixel … … 161 164 UInt m_uiQuadtreeTUMaxDepthInter; 162 165 UInt m_uiQuadtreeTUMaxDepthIntra; 166 #endif 163 167 164 168 // coding tools (bit-depth) 169 #if !O0194_DIFFERENT_BITDEPTH_EL_BL 165 170 Int m_inputBitDepthY; ///< bit-depth of input file (luma component) 166 171 Int m_inputBitDepthC; ///< bit-depth of input file (chroma component) … … 169 174 Int m_internalBitDepthY; ///< bit-depth codec operates at in luma (input/output files will be converted) 170 175 Int m_internalBitDepthC; ///< bit-depth codec operates at in chroma (input/output files will be converted) 176 #endif 177 #if AUXILIARY_PICTURES 178 ChromaFormat m_chromaFormatIDC; 179 #endif 171 180 172 181 // coding tools (PCM bit-depth) … … 354 363 #endif 355 364 // internal member functions 365 #if LAYER_CTB 366 Void xSetGlobal (UInt layerId); ///< set global variables 367 #else 356 368 Void xSetGlobal (); ///< set global variables 369 #endif 357 370 Void xCheckParameter (); ///< check validity of configuration values 358 371 Void xPrintParameter (); ///< print configuration values 359 372 Void xPrintUsage (); ///< print usage 360 #if FINAL_RPL_CHANGE_N0082361 Bool xconfirmExtraGOP (GOPEntry * ge);362 #endif363 373 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 364 374 Int m_adaptiveResolutionChange; ///< Indicate adaptive resolution change frame … … 375 385 UInt m_ilcIdc[1024]; 376 386 #endif 387 #if O0215_PHASE_ALIGNMENT 388 bool m_phaseAlignFlag; 389 #endif 377 390 public: 378 391 TAppEncCfg(); … … 388 401 Int getNumLayer() {return m_numLayers; } 389 402 Int getGOPSize() {return m_iGOPSize; } 403 #if O0194_DIFFERENT_BITDEPTH_EL_BL 404 UInt getInternalBitDepthY(Int iLayer) {return m_acLayerCfg[iLayer].m_internalBitDepthY; } 405 UInt getInternalBitDepthC(Int iLayer) {return m_acLayerCfg[iLayer].m_internalBitDepthC; } 406 Bool getPCMInputBitDepthFlag() {return m_bPCMInputBitDepthFlag; } 407 #else 390 408 UInt getInternalBitDepthY() {return m_internalBitDepthY; } 391 409 UInt getInternalBitDepthC() {return m_internalBitDepthC; } 410 #endif 411 #if !LAYER_CTB 392 412 UInt getMaxCUWidth() {return m_uiMaxCUWidth; } 393 413 UInt getMaxCUHeight() {return m_uiMaxCUHeight; } 394 414 UInt getMaxCUDepth() {return m_uiMaxCUDepth; } 415 #endif 395 416 Int getDecodingRefreshType() {return m_iDecodingRefreshType; } 396 417 Int getWaveFrontSynchro() { return m_iWaveFrontSynchro; } … … 399 420 Char* getBLSyntaxFile() { return m_BLSyntaxFile; } 400 421 #endif 401 #if SCALED_REF_LAYER_OFFSETS402 422 Void cfgStringToArray(Int **arr, string cfgString, Int numEntries, const char* logString); 403 #endif404 423 #if REPN_FORMAT_IN_VPS 405 424 RepFormatCfg* getRepFormatCfg(Int i) { return &m_repFormatCfg[i]; } 406 425 #endif 426 #if LAYER_CTB 427 Bool getUsePCM() { return m_usePCM; } 428 UInt getPCMLog2MinSize () { return m_uiPCMLog2MinSize; } 429 #endif 407 430 #endif 408 431 };// END CLASS DEFINITION TAppEncCfg -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r442 r494 22 22 //! \{ 23 23 24 25 #if AUXILIARY_PICTURES 26 static inline ChromaFormat numberToChromaFormat(const Int val) 27 { 28 switch (val) 29 { 30 case 400: return CHROMA_400; break; 31 case 420: return CHROMA_420; break; 32 case 422: return CHROMA_422; break; 33 case 444: return CHROMA_444; break; 34 default: return NUM_CHROMA_FORMAT; 35 } 36 } 37 #endif 24 38 25 39 // ==================================================================================================================== … … 38 52 m_confLeft = m_confRight = m_confTop = m_confBottom = 0; 39 53 m_aiPad[1] = m_aiPad[0] = 0; 40 #if SCALED_REF_LAYER_OFFSETS41 54 m_numScaledRefLayerOffsets = 0; 42 55 ::memset(m_scaledRefLayerLeftOffset, 0, sizeof(m_scaledRefLayerLeftOffset)); … … 44 57 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 45 58 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 46 #endif47 59 } 48 60 … … 77 89 string cfg_ReconFile; 78 90 string cfg_dQPFile; 91 #if AUXILIARY_PICTURES 92 Int tmpInputChromaFormat; 93 Int tmpChromaFormat; 94 #endif 95 79 96 po::Options opts; 80 97 opts.addOptions() … … 87 104 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") 88 105 ("CroppingMode", m_conformanceMode, 0, "Cropping mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping") 106 #if AUXILIARY_PICTURES 107 ("InputChromaFormat", tmpInputChromaFormat, 420, "InputChromaFormatIDC") 108 ("ChromaFormatIDC", tmpChromaFormat, 420, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 109 #endif 89 110 ("CropLeft", m_confLeft, 0, "Left cropping/padding for cropping mode 3") 90 111 ("CropRight", m_confRight, 0, "Right cropping/padding for cropping mode 3") … … 105 126 m_cReconFile = cfg_ReconFile; 106 127 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 128 #if AUXILIARY_PICTURES 129 m_InputChromaFormat = numberToChromaFormat(tmpInputChromaFormat); 130 m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormat) : (numberToChromaFormat(tmpChromaFormat))); 131 #endif 107 132 108 133 // reading external dQP description from file … … 142 167 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confLeft - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate ); 143 168 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 169 #if O0194_DIFFERENT_BITDEPTH_EL_BL 170 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepthY , m_inputBitDepthC ); 171 printf("Internal bit depth : (Y:%d, C:%d)\n", m_internalBitDepthY, m_internalBitDepthC ); 172 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepthY : m_internalBitDepthY, m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepthC : m_internalBitDepthC ); 173 #endif 174 #if LAYER_CTB 175 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); 176 printf("RQT trans. size (min / max) : %d / %d\n", 1 << m_uiQuadtreeTULog2MinSize, 1 << m_uiQuadtreeTULog2MaxSize ); 177 printf("Max RQT depth inter : %d\n", m_uiQuadtreeTUMaxDepthInter); 178 printf("Max RQT depth intra : %d\n", m_uiQuadtreeTUMaxDepthIntra); 179 #endif 144 180 printf("QP : %5.2f\n", m_fQP ); 145 181 printf("Intra period : %d\n", m_iIntraPeriod ); … … 157 193 #endif 158 194 printf("WaveFrontSynchro:%d WaveFrontSubstreams:%d", m_cAppEncCfg->getWaveFrontSynchro(), m_iWaveFrontSubstreams); 195 #if LAYER_CTB 196 printf("PCM:%d ", (m_cAppEncCfg->getUsePCM() && (1<<m_cAppEncCfg->getPCMLog2MinSize()) <= m_uiMaxCUWidth)? 1 : 0); 197 #endif 159 198 } 160 199 … … 175 214 { 176 215 // automatic padding to minimum CU size 216 #if LAYER_CTB 217 Int minCuSize = m_uiMaxCUHeight >> (m_uiMaxCUDepth - 1); 218 #else 177 219 Int minCuSize = m_cAppEncCfg->getMaxCUHeight() >> (m_cAppEncCfg->getMaxCUDepth() - 1); 220 #endif 178 221 if (m_iSourceWidth % minCuSize) 179 222 { … … 240 283 } 241 284 285 #if LAYER_CTB 286 UInt maxCUWidth = m_uiMaxCUWidth; 287 UInt maxCUHeight = m_uiMaxCUHeight; 288 UInt maxCUDepth = m_uiMaxCUDepth; 289 #else 242 290 UInt maxCUWidth = m_cAppEncCfg->getMaxCUWidth(); 243 291 UInt maxCUHeight = m_cAppEncCfg->getMaxCUHeight(); 244 292 UInt maxCUDepth = m_cAppEncCfg->getMaxCUDepth(); 293 #endif 245 294 bool check_failed = false; /* abort if there is a fatal configuration problem */ 246 295 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) … … 255 304 } 256 305 306 #if O0194_DIFFERENT_BITDEPTH_EL_BL 307 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 308 { 309 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY(layer) - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 310 } 311 #else 257 312 xConfirmPara( m_iQP < -6 * ((Int)m_cAppEncCfg->getInternalBitDepthY() - 8) || m_iQP > 51, "QP exceeds supported range (-QpBDOffsety to 51)" ); 258 259 260 m_iWaveFrontSubstreams = m_cAppEncCfg->getWaveFrontSynchro() ? (m_iSourceHeight + m_cAppEncCfg->getMaxCUHeight() - 1) / m_cAppEncCfg->getMaxCUHeight() : 1; 313 #endif 314 315 316 m_iWaveFrontSubstreams = m_cAppEncCfg->getWaveFrontSynchro() ? (m_iSourceHeight + maxCUHeight - 1) / maxCUHeight : 1; 261 317 xConfirmPara( m_iWaveFrontSubstreams <= 0, "WaveFrontSubstreams must be positive" ); 262 318 xConfirmPara( m_iWaveFrontSubstreams > 1 && !m_cAppEncCfg->getWaveFrontSynchro(), "Must have WaveFrontSynchro > 0 in order to have WaveFrontSubstreams > 1" ); … … 273 329 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 274 330 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 331 332 #if LAYER_CTB 333 xConfirmPara( (m_uiMaxCUWidth >> m_uiMaxCUDepth) < 4, "Minimum partition width size should be larger than or equal to 8"); 334 xConfirmPara( (m_uiMaxCUHeight >> m_uiMaxCUDepth) < 4, "Minimum partition height size should be larger than or equal to 8"); 335 xConfirmPara( m_uiMaxCUWidth < 16, "Maximum partition width size should be larger than or equal to 16"); 336 xConfirmPara( m_uiMaxCUHeight < 16, "Maximum partition height size should be larger than or equal to 16"); 337 xConfirmPara( m_uiQuadtreeTULog2MinSize < 2, "QuadtreeTULog2MinSize must be 2 or greater."); 338 xConfirmPara( m_uiQuadtreeTULog2MaxSize > 5, "QuadtreeTULog2MaxSize must be 5 or smaller."); 339 xConfirmPara( (1<<m_uiQuadtreeTULog2MaxSize) > m_uiMaxCUWidth, "QuadtreeTULog2MaxSize must be log2(maxCUSize) or smaller."); 340 xConfirmPara( m_uiQuadtreeTULog2MaxSize < m_uiQuadtreeTULog2MinSize, "QuadtreeTULog2MaxSize must be greater than or equal to m_uiQuadtreeTULog2MinSize."); 341 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUWidth >>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 342 xConfirmPara( (1<<m_uiQuadtreeTULog2MinSize)>(m_uiMaxCUHeight>>(m_uiMaxCUDepth-1)), "QuadtreeTULog2MinSize must not be greater than minimum CU size" ); // HS 343 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUWidth >> m_uiMaxCUDepth ), "Minimum CU width must be greater than minimum transform size." ); 344 xConfirmPara( ( 1 << m_uiQuadtreeTULog2MinSize ) > ( m_uiMaxCUHeight >> m_uiMaxCUDepth ), "Minimum CU height must be greater than minimum transform size." ); 345 xConfirmPara( m_uiQuadtreeTUMaxDepthInter < 1, "QuadtreeTUMaxDepthInter must be greater than or equal to 1" ); 346 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" ); 347 xConfirmPara( m_uiQuadtreeTUMaxDepthIntra < 1, "QuadtreeTUMaxDepthIntra must be greater than or equal to 1" ); 348 xConfirmPara( m_uiMaxCUWidth < ( 1 << (m_uiQuadtreeTULog2MinSize + m_uiQuadtreeTUMaxDepthIntra - 1) ), "QuadtreeTUMaxDepthInter must be less than or equal to the difference between log2(maxCUSize) and QuadtreeTULog2MinSize plus 1" ); 349 350 // max CU width and height should be power of 2 351 UInt ui = m_uiMaxCUWidth; 352 while(ui) 353 { 354 ui >>= 1; 355 if( (ui & 1) == 1) 356 xConfirmPara( ui != 1 , "Width should be 2^n"); 357 } 358 ui = m_uiMaxCUHeight; 359 while(ui) 360 { 361 ui >>= 1; 362 if( (ui & 1) == 1) 363 xConfirmPara( ui != 1 , "Height should be 2^n"); 364 } 365 #endif 366 275 367 #undef xConfirmPara 276 368 return check_failed; 277 369 } 278 370 279 #endif 371 #endif //SVC_EXTENSION 280 372 281 373 -
trunk/source/App/TAppEncoder/TAppEncLayerCfg.h
r442 r494 6 6 #define __TAPPENCLAYERCFG__ 7 7 8 #if SVC_EXTENSION 8 9 #include "TLibCommon/CommonDef.h" 9 10 #include "TLibEncoder/TEncCfg.h" … … 11 12 12 13 using namespace std; 13 #if SVC_EXTENSION14 14 class TAppEncCfg; 15 #endif16 15 //! \ingroup TAppEncoder 17 16 //! \{ … … 43 42 Int m_iIntraPeriod; ///< period of I-slice (random access period) 44 43 Double m_fQP; ///< QP value of key-picture (floating point) 44 #if AUXILIARY_PICTURES 45 ChromaFormat m_chromaFormatIDC; 46 ChromaFormat m_InputChromaFormat; 47 Int m_auxId; 48 #endif 45 49 #if VPS_EXTN_DIRECT_REF_LAYERS 46 50 #if M0457_PREDICTION_INDICATIONS … … 55 59 Int *m_predLayerIds; 56 60 Int m_numActiveRefLayers; 61 #endif 62 63 #if LAYER_CTB 64 // coding unit (CU) definition 65 UInt m_uiMaxCUWidth; ///< max. CU width in pixel 66 UInt m_uiMaxCUHeight; ///< max. CU height in pixel 67 UInt m_uiMaxCUDepth; ///< max. CU depth 68 69 // transfom unit (TU) definition 70 UInt m_uiQuadtreeTULog2MaxSize; 71 UInt m_uiQuadtreeTULog2MinSize; 72 73 UInt m_uiQuadtreeTUMaxDepthInter; 74 UInt m_uiQuadtreeTUMaxDepthIntra; 57 75 #endif 58 76 … … 70 88 Int m_maxTidIlRefPicsPlus1; 71 89 #endif 72 #if SVC_EXTENSION73 90 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). 74 #endif75 91 76 92 Int m_iQP; ///< QP value of key-picture (integer) … … 78 94 Int* m_aidQP; ///< array of slice QP values 79 95 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config 80 #if SCALED_REF_LAYER_OFFSETS81 96 Int m_numScaledRefLayerOffsets ; 82 97 Int m_scaledRefLayerLeftOffset [MAX_LAYERS]; … … 84 99 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 85 100 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 86 #endif 87 #if FINAL_RPL_CHANGE_N0082 88 GOPEntry m_GOPListLayer[MAX_GOP]; ///< for layer 101 #if O0194_DIFFERENT_BITDEPTH_EL_BL 102 Int m_inputBitDepthY; ///< bit-depth of input file (luma component) 103 Int m_inputBitDepthC; ///< bit-depth of input file (chroma component) 104 Int m_internalBitDepthY; ///< bit-depth codec operates at in luma (input/output files will be converted) 105 Int m_internalBitDepthC; ///< bit-depth codec operates at in chroma (input/output files will be converted) 106 Int m_outputBitDepthY; ///< bit-depth of output file (luma component) 107 Int m_outputBitDepthC; ///< bit-depth of output file (chroma component) 89 108 #endif 90 109 #if REPN_FORMAT_IN_VPS … … 122 141 Int getConfTop() {return m_confTop; } 123 142 Int getConfBottom() {return m_confBottom; } 143 #if AUXILIARY_PICTURES 144 ChromaFormat getInputChromaFormat() {return m_InputChromaFormat;} 145 ChromaFormat getChromaFormatIDC() {return m_chromaFormatIDC; } 146 Int getAuxId() {return m_auxId; } 147 #endif 124 148 125 149 Int getIntQP() {return m_iQP; } … … 152 176 Bool getRCForceIntraQP() {return m_RCForceIntraQP; } 153 177 #endif 154 #if FINAL_RPL_CHANGE_N0082155 GOPEntry getGOPEntry(Int i ) {return m_GOPListLayer[i]; }156 #endif157 178 #if REPN_FORMAT_IN_VPS 158 179 Int getRepFormatIdx() { return m_repFormatIdx; } … … 164 185 Int getMaxTidIlRefPicsPlus1() { return m_maxTidIlRefPicsPlus1; } 165 186 #endif 187 #if LAYER_CTB 188 UInt getMaxCUWidth() {return m_uiMaxCUWidth; } 189 UInt getMaxCUHeight() {return m_uiMaxCUHeight; } 190 UInt getMaxCUDepth() {return m_uiMaxCUDepth; } 191 #endif 166 192 }; // END CLASS DEFINITION TAppEncLayerCfg 193 194 #endif //SVC_EXTENSION 167 195 168 196 //! \} -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r442 r494 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-2013, ITU/ISO/IEC … … 98 98 // Auto generation of the format index 99 99 if( m_acLayerCfg[layer].getRepFormatIdx() == -1 ) 100 { 101 // Currently only picture width and height are considred. It has to be updated if different chroma format and bit-depth will are used. 100 { 102 101 Bool found = false; 103 102 for( UInt idx = 0; idx < layer; idx++ ) 104 103 { 105 if( m_acLayerCfg[layer].getSourceWidth() == m_acLayerCfg[idx].getSourceWidth() && m_acLayerCfg[layer].getSourceHeight() == m_acLayerCfg[idx].getSourceHeight() ) 104 if( m_acLayerCfg[layer].getSourceWidth() == m_acLayerCfg[idx].getSourceWidth() && m_acLayerCfg[layer].getSourceHeight() == m_acLayerCfg[idx].getSourceHeight() 105 #if AUXILIARY_PICTURES 106 && m_acLayerCfg[layer].getChromaFormatIDC() == m_acLayerCfg[idx].getChromaFormatIDC() 107 #endif 108 #if O0194_DIFFERENT_BITDEPTH_EL_BL 109 && m_acLayerCfg[layer].m_internalBitDepthY == m_acLayerCfg[idx].m_internalBitDepthY && m_acLayerCfg[layer].m_internalBitDepthC == m_acLayerCfg[idx].m_internalBitDepthC 110 #endif 111 ) 106 112 { 107 113 found = true; … … 117 123 } 118 124 119 assert( m_acLayerCfg[layer].getRepFormatIdx() != -1 && "RepFormatIdx not assigned for a layer" ); 125 assert( m_acLayerCfg[layer].getRepFormatIdx() != -1 && "RepFormatIdx not assigned for a layer" ); 120 126 vps->setVpsRepFormatIdx( layer, m_acLayerCfg[layer].getRepFormatIdx() ); 121 127 maxRepFormatIdx = std::max( m_acLayerCfg[layer].getRepFormatIdx(), maxRepFormatIdx ); … … 141 147 for(UInt idx=0; idx < vps->getVpsNumRepFormats(); idx++) 142 148 { 143 RepFormat *repFormat = vps->getVpsRepFormat( idx ); 149 RepFormat *repFormat = vps->getVpsRepFormat( idx ); 144 150 repFormat->setPicWidthVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceWidth() ); 145 151 repFormat->setPicHeightVpsInLumaSamples ( m_acLayerCfg[mapIdxToLayer[idx]].getSourceHeight() ); 152 #if AUXILIARY_PICTURES 153 repFormat->setChromaFormatVpsIdc ( m_acLayerCfg[mapIdxToLayer[idx]].getChromaFormatIDC() ); 154 #else 146 155 repFormat->setChromaFormatVpsIdc ( 1 ); // Need modification to change for each layer - corresponds to 420 156 #endif 147 157 repFormat->setSeparateColourPlaneVpsFlag( 0 ); // Need modification to change for each layer 158 #if O0194_DIFFERENT_BITDEPTH_EL_BL 159 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY(mapIdxToLayer[idx]) ); // Need modification to change for each layer 160 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC(mapIdxToLayer[idx]) ); // Need modification to change for each layer 161 #else 148 162 repFormat->setBitDepthVpsLuma ( getInternalBitDepthY() ); // Need modification to change for each layer 149 163 repFormat->setBitDepthVpsChroma ( getInternalBitDepthC() ); // Need modification to change for each layer 164 #endif 150 165 } 151 166 delete [] mapIdxToLayer; … … 153 168 for(UInt layer=0; layer<m_numLayers; layer++) 154 169 { 170 #if O0194_DIFFERENT_BITDEPTH_EL_BL 171 //1 172 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 173 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 174 175 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 176 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 177 178 // Set this to be used in Upsampling filter in function "TComUpsampleFilter::upsampleBasePic" 179 g_bitDepthYLayer[layer] = g_bitDepthY; 180 g_bitDepthCLayer[layer] = g_bitDepthC; 181 #endif 155 182 //m_acTEncTop[layer].setVPS(&vps); 156 183 m_acTEncTop[layer].setFrameRate ( m_acLayerCfg[layer].getFrameRate() ); … … 187 214 #endif 188 215 #endif 189 // set layer ID 190 m_acTEncTop[layer].setLayerId ( layer ); 216 // set layer ID 217 m_acTEncTop[layer].setLayerId ( layer ); 191 218 m_acTEncTop[layer].setNumLayer ( m_numLayers ); 192 219 m_acTEncTop[layer].setLayerEnc(m_apcTEncTop); … … 196 223 m_acTEncTop[layer].setDecodingRefreshType ( m_iDecodingRefreshType ); 197 224 m_acTEncTop[layer].setGOPSize ( m_iGOPSize ); 198 #if FINAL_RPL_CHANGE_N0082199 m_acTEncTop[layer].setGopList ( m_acLayerCfg[layer].m_GOPListLayer );200 #else201 225 m_acTEncTop[layer].setGopList ( m_GOPList ); 202 #endif 226 203 227 m_acTEncTop[layer].setExtraRPSs ( m_extraRPSs ); 204 228 for(Int i = 0; i < MAX_TLAYER; i++) … … 220 244 if (layer<m_numLayers-1) 221 245 { 222 m_acTEncTop[layer].setMaxTidIlRefPicsPlus1 ( m_acLayerCfg[layer].getMaxTidIlRefPicsPlus1()); 223 } 224 #endif 246 m_acTEncTop[layer].setMaxTidIlRefPicsPlus1 ( m_acLayerCfg[layer].getMaxTidIlRefPicsPlus1()); 247 } 248 #endif 225 249 #if VPS_EXTN_DIRECT_REF_LAYERS 226 250 if(layer) … … 241 265 else 242 266 { 243 m_acTEncTop[layer].setNumSamplePredRefLayers ( m_acLayerCfg[layer].getNumSamplePredRefLayers() ); 267 m_acTEncTop[layer].setNumSamplePredRefLayers ( m_acLayerCfg[layer].getNumSamplePredRefLayers() ); 244 268 for(Int i = 0; i < m_acTEncTop[layer].getNumSamplePredRefLayers(); i++) 245 269 { 246 270 m_acTEncTop[layer].setSamplePredRefLayerId ( i, m_acLayerCfg[layer].getSamplePredRefLayerId(i)); 247 271 m_acTEncTop[layer].setSamplePredEnabledFlag (m_acLayerCfg[layer].getSamplePredRefLayerId(i), true); 248 } 272 } 249 273 } 250 274 if(m_acLayerCfg[layer].getNumMotionPredRefLayers() == -1) … … 257 281 else 258 282 { 259 m_acTEncTop[layer].setNumMotionPredRefLayers ( m_acLayerCfg[layer].getNumMotionPredRefLayers() ); 283 m_acTEncTop[layer].setNumMotionPredRefLayers ( m_acLayerCfg[layer].getNumMotionPredRefLayers() ); 260 284 for(Int i = 0; i < m_acTEncTop[layer].getNumMotionPredRefLayers(); i++) 261 285 { 262 286 m_acTEncTop[layer].setMotionPredRefLayerId ( i, m_acLayerCfg[layer].getMotionPredRefLayerId(i)); 263 287 m_acTEncTop[layer].setMotionPredEnabledFlag (m_acLayerCfg[layer].getMotionPredRefLayerId(i), true); 264 } 288 } 265 289 } 266 290 Int numDirectRefLayers = 0; … … 283 307 else 284 308 { 285 m_acTEncTop[layer].setNumDirectRefLayers ( m_acLayerCfg[layer].getNumDirectRefLayers() ); 309 m_acTEncTop[layer].setNumDirectRefLayers ( m_acLayerCfg[layer].getNumDirectRefLayers() ); 286 310 for(Int i = 0; i < m_acTEncTop[layer].getNumDirectRefLayers(); i++) 287 311 { … … 304 328 else 305 329 { 306 m_acTEncTop[layer].setNumActiveRefLayers ( m_acLayerCfg[layer].getNumActiveRefLayers() ); 330 m_acTEncTop[layer].setNumActiveRefLayers ( m_acLayerCfg[layer].getNumActiveRefLayers() ); 307 331 for(Int i = 0; i < m_acTEncTop[layer].getNumActiveRefLayers(); i++) 308 332 { … … 358 382 m_acTEncTop[layer].setUseRDOQTS ( m_useRDOQTS ); 359 383 m_acTEncTop[layer].setRDpenalty ( m_rdPenalty ); 384 #if LAYER_CTB 385 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MaxSize ); 386 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_acLayerCfg[layer].m_uiQuadtreeTULog2MinSize ); 387 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthInter ); 388 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_acLayerCfg[layer].m_uiQuadtreeTUMaxDepthIntra ); 389 #else 360 390 m_acTEncTop[layer].setQuadtreeTULog2MaxSize ( m_uiQuadtreeTULog2MaxSize ); 361 391 m_acTEncTop[layer].setQuadtreeTULog2MinSize ( m_uiQuadtreeTULog2MinSize ); 362 392 m_acTEncTop[layer].setQuadtreeTUMaxDepthInter ( m_uiQuadtreeTUMaxDepthInter ); 363 393 m_acTEncTop[layer].setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 394 #endif 364 395 m_acTEncTop[layer].setUseFastEnc ( m_bUseFastEnc ); 365 m_acTEncTop[layer].setUseEarlyCU ( m_bUseEarlyCU ); 396 m_acTEncTop[layer].setUseEarlyCU ( m_bUseEarlyCU ); 366 397 m_acTEncTop[layer].setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); 367 398 m_acTEncTop[layer].setUseCbfFastMode ( m_bUseCbfFastMode ); … … 383 414 m_acTEncTop[layer].setUseWP ( m_useWeightedPred ); 384 415 m_acTEncTop[layer].setWPBiPred ( m_useWeightedBiPred ); 416 #if O0194_WEIGHTED_PREDICTION_CGS 417 if (layer!=0) 418 { 419 // Enable weighted prediction for enhancement layer 420 m_acTEncTop[layer].setUseWP ( true ); 421 m_acTEncTop[layer].setWPBiPred ( true ); 422 } 423 #endif 385 424 //====== Parallel Merge Estimation ======== 386 425 m_acTEncTop[layer].setLog2ParallelMergeLevelMinus2 ( m_log2ParallelMergeLevel - 2 ); … … 393 432 m_acTEncTop[layer].setSliceSegmentMode ( m_sliceSegmentMode ); 394 433 m_acTEncTop[layer].setSliceSegmentArgument ( m_sliceSegmentArgument ); 434 #if LAYER_CTB 435 Int iNumPartInCU = 1<<(m_acLayerCfg[layer].m_uiMaxCUDepth<<1); 436 #else 395 437 Int iNumPartInCU = 1<<(m_uiMaxCUDepth<<1); 438 #endif 396 439 if(m_sliceSegmentMode==FIXED_NUMBER_OF_LCU) 397 440 { … … 417 460 m_acTEncTop[layer].setSaoLcuBoundary (m_saoLcuBoundary); 418 461 m_acTEncTop[layer].setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 419 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 420 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 462 m_acTEncTop[layer].setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 463 m_acTEncTop[layer].setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 421 464 422 465 m_acTEncTop[layer].setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); … … 483 526 if(uiTilesCount == 1) 484 527 { 485 m_bLFCrossTileBoundaryFlag = true; 528 m_bLFCrossTileBoundaryFlag = true; 486 529 } 487 530 m_acTEncTop[layer].setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag ); … … 519 562 m_acTEncTop[layer].setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda ); 520 563 m_acTEncTop[layer].setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); 521 m_acTEncTop[layer].setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 564 m_acTEncTop[layer].setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 522 565 m_acTEncTop[layer].setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 523 566 m_acTEncTop[layer].setAspectRatioIdc( m_aspectRatioIdc ); … … 550 593 m_acTEncTop[layer].setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 551 594 m_acTEncTop[layer].setElRapSliceTypeB(layer == 0? 0 : m_elRapSliceBEnabled); 552 #if SCALED_REF_LAYER_OFFSETS553 595 if( layer > 0 ) 554 596 { … … 557 599 { 558 600 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 559 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 560 } 561 } 562 #endif 601 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 602 } 603 } 563 604 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 564 605 m_acTEncTop[layer].setAdaptiveResolutionChange( m_adaptiveResolutionChange ); 565 606 #endif 607 #if AUXILIARY_PICTURES 608 m_acTEncTop[layer].setChromaFormatIDC( m_acLayerCfg[layer].m_chromaFormatIDC ); 609 #endif 566 610 } 567 611 } 568 #else 612 #else //SVC_EXTENSION 569 613 Void TAppEncTop::xInitLibCfg() 570 614 { … … 671 715 m_cTEncTop.setQuadtreeTUMaxDepthIntra ( m_uiQuadtreeTUMaxDepthIntra ); 672 716 m_cTEncTop.setUseFastEnc ( m_bUseFastEnc ); 673 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 717 m_cTEncTop.setUseEarlyCU ( m_bUseEarlyCU ); 674 718 m_cTEncTop.setUseFastDecisionForMerge ( m_useFastDecisionForMerge ); 675 719 m_cTEncTop.setUseCbfFastMode ( m_bUseCbfFastMode ); … … 725 769 m_cTEncTop.setSaoLcuBoundary (m_saoLcuBoundary); 726 770 m_cTEncTop.setSaoLcuBasedOptimization (m_saoLcuBasedOptimization); 727 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 728 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 771 m_cTEncTop.setPCMInputBitDepthFlag ( m_bPCMInputBitDepthFlag); 772 m_cTEncTop.setPCMFilterDisableFlag ( m_bPCMFilterDisableFlag); 729 773 730 774 m_cTEncTop.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); … … 783 827 if(uiTilesCount == 1) 784 828 { 785 m_bLFCrossTileBoundaryFlag = true; 829 m_bLFCrossTileBoundaryFlag = true; 786 830 } 787 831 m_cTEncTop.setLFCrossTileBoundaryFlag( m_bLFCrossTileBoundaryFlag ); … … 809 853 m_cTEncTop.setUseRecalculateQPAccordingToLambda( m_recalculateQPAccordingToLambda ); 810 854 m_cTEncTop.setUseStrongIntraSmoothing( m_useStrongIntraSmoothing ); 811 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 855 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 812 856 m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 813 857 m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc ); … … 840 884 m_cTEncTop.setLog2MaxMvLengthVertical( m_log2MaxMvLengthVertical ); 841 885 } 842 #endif 886 #endif //SVC_EXTENSION 843 887 844 888 Void TAppEncTop::xCreateLib() … … 851 895 for(UInt layer=0; layer<m_numLayers; layer++) 852 896 { 897 #if O0194_DIFFERENT_BITDEPTH_EL_BL 898 //2 899 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 900 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 901 902 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 903 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 904 #endif 905 #if LAYER_CTB 906 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 907 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 908 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 909 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 910 #endif 911 #if O0194_DIFFERENT_BITDEPTH_EL_BL 912 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_acLayerCfg[layer].m_inputBitDepthY, m_acLayerCfg[layer].m_inputBitDepthC, m_acLayerCfg[layer].m_internalBitDepthY, m_acLayerCfg[layer].m_internalBitDepthC ); // read mode 913 #else 853 914 m_acTVideoIOYuvInputFile[layer].open( (Char *)m_acLayerCfg[layer].getInputFile().c_str(), false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 915 #endif 854 916 m_acTVideoIOYuvInputFile[layer].skipFrames(m_FrameSkip, m_acLayerCfg[layer].getSourceWidth() - m_acLayerCfg[layer].getPad()[0], m_acLayerCfg[layer].getSourceHeight() - m_acLayerCfg[layer].getPad()[1]); 855 917 856 918 if (!m_acLayerCfg[layer].getReconFile().empty()) 857 919 { 920 #if O0194_DIFFERENT_BITDEPTH_EL_BL 921 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 922 #else 858 923 m_acTVideoIOYuvReconFile[layer].open((Char *)m_acLayerCfg[layer].getReconFile().c_str(), true, m_outputBitDepthY, m_outputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // write mode 924 #endif 859 925 } 860 926 861 927 m_acTEncTop[layer].create(); 862 928 } 863 #else 929 #else //SVC_EXTENSION 864 930 m_cTVideoIOYuvInputFile.open( m_pchInputFile, false, m_inputBitDepthY, m_inputBitDepthC, m_internalBitDepthY, m_internalBitDepthC ); // read mode 865 931 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1]); … … 870 936 // Neo Decoder 871 937 m_cTEncTop.create(); 872 #endif 938 #endif //SVC_EXTENSION 873 939 } 874 940 … … 882 948 for(UInt layer=0; layer<m_numLayers; layer++) 883 949 { 950 #if LAYER_CTB 951 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 952 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 953 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 954 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 955 #endif 956 884 957 m_acTVideoIOYuvInputFile[layer].close(); 885 958 m_acTVideoIOYuvReconFile[layer].close(); … … 887 960 m_acTEncTop[layer].destroy(); 888 961 } 889 #else 962 #else //SVC_EXTENSION 890 963 m_cTVideoIOYuvInputFile.close(); 891 964 m_cTVideoIOYuvReconFile.close(); … … 893 966 // Neo Decoder 894 967 m_cTEncTop.destroy(); 895 #endif 968 #endif //SVC_EXTENSION 896 969 } 897 970 … … 901 974 for(UInt layer=0; layer<m_numLayers; layer++) 902 975 { 976 #if O0194_DIFFERENT_BITDEPTH_EL_BL 977 //3 978 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 979 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 980 981 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 982 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 983 #endif 984 #if LAYER_CTB 985 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 986 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 987 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 988 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 989 990 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 991 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); 992 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 993 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 994 #endif 903 995 m_acTEncTop[layer].init(isFieldCoding); 904 996 } … … 915 1007 for(Int layerId = 0; layerId <= vps->getMaxLayerId(); layerId++) 916 1008 { 1009 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1010 //4 1011 g_bitDepthY = m_acLayerCfg[layerId].m_internalBitDepthY; 1012 g_bitDepthC = m_acLayerCfg[layerId].m_internalBitDepthC; 1013 1014 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthY : m_acLayerCfg[layerId].m_internalBitDepthY; 1015 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layerId].m_inputBitDepthC : m_acLayerCfg[layerId].m_internalBitDepthC; 1016 #endif 917 1017 vps->setLayerIdIncludedFlag(true, setId, layerId); 918 1018 } … … 930 1030 vps->setScalabilityMask(i, false); 931 1031 } 932 if(m_numLayers > 1) 1032 if(m_numLayers > 1) 933 1033 { 934 1034 Int scalabilityTypes = 0; … … 938 1038 scalabilityTypes += m_scalabilityMask[i]; 939 1039 } 1040 #if AUXILIARY_PICTURES 1041 assert( scalabilityTypes <= 2 ); 1042 #else 940 1043 assert( scalabilityTypes == 1 ); 1044 #endif 941 1045 vps->setNumScalabilityTypes(scalabilityTypes); 942 1046 } … … 959 1063 vps->setDimensionId(i, 0, i); 960 1064 } 1065 #if AUXILIARY_PICTURES 1066 if (m_scalabilityMask[3]) 1067 { 1068 UInt maxAuxId = 0; 1069 UInt auxDimIdLen = 0; 1070 for(i = 1; i < vps->getMaxLayers(); i++) 1071 { 1072 if (m_acLayerCfg[i].getAuxId() > maxAuxId) 1073 { 1074 maxAuxId = m_acLayerCfg[i].getAuxId(); 1075 } 1076 } 1077 while((1 << auxDimIdLen) < (maxAuxId + 1)) 1078 { 1079 auxDimIdLen++; 1080 } 1081 vps->setDimensionIdLen(1, auxDimIdLen); 1082 for(i = 1; i < vps->getMaxLayers(); i++) 1083 { 1084 vps->setDimensionId(i, 1, m_acLayerCfg[i].getAuxId()); 1085 } 1086 } 1087 #endif 961 1088 #endif 962 1089 #if N0120_MAX_TID_REF_PRESENT_FLAG 963 1090 #if N0120_MAX_TID_REF_CFG 964 1091 vps->setMaxTidRefPresentFlag(m_maxTidRefPresentFlag); 965 #else 1092 #else 966 1093 vps->setMaxTidRefPresentFlag(true); 1094 #endif 1095 if (vps->getMaxTidRefPresentFlag()) 1096 { 1097 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 1098 { 1099 #if N0120_MAX_TID_REF_CFG 1100 #if O0225_MAX_TID_FOR_REF_LAYERS 1101 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1102 { 1103 vps->setMaxTidIlRefPicsPlus1(i, j, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); 1104 } 1105 #else 1106 vps->setMaxTidIlRefPicsPlus1(i, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); 967 1107 #endif 968 if (vps->getMaxTidRefPresentFlag()) 1108 #else 1109 #if O0225_MAX_TID_FOR_REF_LAYERS 1110 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1111 { 1112 vps->setMaxTidIlRefPicsPlus1(i, j, vps->getMaxTLayers()+1); 1113 } 1114 #else 1115 vps->setMaxTidIlRefPicsPlus1(i, vps->getMaxTLayers()+1); 1116 #endif 1117 #endif 1118 } 1119 } 1120 else 969 1121 { 970 1122 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 971 1123 { 972 #if N0120_MAX_TID_REF_CFG 973 vps->setMaxTidIlRefPicsPlus1(i, m_acTEncTop[i].getMaxTidIlRefPicsPlus1()); 974 #else 975 vps->setMaxTidIlRefPicsPlus1(i, vps->getMaxTLayers()+1); 1124 #if O0225_MAX_TID_FOR_REF_LAYERS 1125 for( Int j = i+1; j <= MAX_VPS_LAYER_ID_PLUS1 - 1; j++) 1126 { 1127 vps->setMaxTidIlRefPicsPlus1(i, j, 7); 1128 } 1129 #else 1130 vps->setMaxTidIlRefPicsPlus1(i, 7); 976 1131 #endif 977 1132 } 978 1133 } 979 else 980 { 981 for( i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++ ) 982 { 983 vps->setMaxTidIlRefPicsPlus1(i, 7); 984 } 985 } 986 #endif 1134 #endif 987 1135 #if ILP_SSH_SIG 1136 #if ILP_SSH_SIG_FIX 1137 vps->setIlpSshSignalingEnabledFlag(false); 1138 #else 988 1139 vps->setIlpSshSignalingEnabledFlag(true); 1140 #endif 989 1141 #endif 990 1142 #if VPS_EXTN_PROFILE_INFO … … 998 1150 #endif 999 1151 // Target output layer 1000 #if VPS_PROFILE_OUTPUT_LAYERS 1001 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1002 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1152 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1153 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1003 1154 vps->setDefaultOneTargetOutputLayerFlag(true); 1004 1155 for(i = 1; i < vps->getNumLayerSets(); i++) 1005 1156 { 1006 1157 vps->setProfileLevelTierIdx(i, i); 1007 vps->setOutputLayerSetIdx(i, i); 1008 } 1009 #else 1010 vps->setNumOutputLayerSets(1); 1011 Int lsIdx = 1; 1012 vps->setOutputLayerSetIdx(0, lsIdx); // Because only one layer set 1013 #endif 1158 vps->setOutputLayerSetIdx(i, i); 1159 } 1160 1014 1161 for(Int lsIdx = 1; lsIdx < vps->getNumLayerSets(); lsIdx++) 1015 1162 { 1016 // Include the highest layer as output layer 1163 // Include the highest layer as output layer 1017 1164 for(UInt layer=0; layer <= vps->getMaxLayerId() ; layer++) 1018 1165 { … … 1073 1220 #endif 1074 1221 #endif 1075 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1076 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1077 #endif 1078 #if N0147_IRAP_ALIGN_FLAG 1079 vps->setCrossLayerIrapAlignFlag(true); 1222 #if JCTVC_M0458_INTERLAYER_RPS_SIG 1223 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1224 #endif 1225 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1226 for(i = 1; i< vps->getMaxLayers(); i++) 1227 { 1228 if( vps->getNumDirectRefLayers( vps->getLayerIdInNuh(i) ) == 0 ) 1229 { 1230 vps->setPocLsbNotPresentFlag(i, false); 1231 } 1232 } 1233 #endif 1234 #if N0147_IRAP_ALIGN_FLAG 1235 vps->setCrossLayerIrapAlignFlag(true); 1080 1236 for(UInt layerCtr = 1;layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 1081 1237 { … … 1083 1239 { 1084 1240 if (vps->getDirectDependencyFlag( layerCtr, refLayerCtr)) 1085 { 1241 { 1086 1242 if(m_acTEncTop[layerCtr].getIntraPeriod() != m_acTEncTop[refLayerCtr].getIntraPeriod()) 1087 1243 { … … 1097 1253 vps->setCrossLayerIrapAlignFlag(false); 1098 1254 } 1099 #endif 1255 #endif 1100 1256 #if M0040_ADAPTIVE_RESOLUTION_CHANGE 1101 1257 vps->setSingleLayerForNonIrapFlag(m_adaptiveResolutionChange > 0 ? true : false); 1102 1258 #endif 1259 #if !VPS_EXTN_OFFSET_CALC 1103 1260 #if VPS_EXTN_OFFSET 1104 1261 // to be updated according to the current semantics 1105 1262 vps->setExtensionOffset( 0xffff ); 1106 1263 #endif 1264 #endif 1265 1266 #if O0215_PHASE_ALIGNMENT 1267 vps->setPhaseAlignFlag( m_phaseAlignFlag ); 1268 #endif 1269 1107 1270 #else //SVC_EXTENSION 1108 1271 m_cTEncTop.init(isFieldCoding); … … 1148 1311 for(UInt layer=0; layer<m_numLayers; layer++) 1149 1312 { 1313 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1314 //5 1315 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1316 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1317 1318 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1319 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1320 #endif 1150 1321 // allocate original YUV buffer 1151 1322 pcPicYuvOrg[layer] = new TComPicYuv; … … 1153 1324 { 1154 1325 #if SVC_UPSAMPLING 1326 #if LAYER_CTB 1327 #if AUXILIARY_PICTURES 1328 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 ); 1329 #else 1330 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 ); 1331 #endif 1332 #else 1333 #if AUXILIARY_PICTURES 1334 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1335 #else 1155 1336 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1337 #endif 1338 #endif 1156 1339 #else 1157 1340 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeightOrg(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); … … 1161 1344 { 1162 1345 #if SVC_UPSAMPLING 1346 #if LAYER_CTB 1347 #if AUXILIARY_PICTURES 1348 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 ); 1349 #else 1350 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 ); 1351 #endif 1352 #else 1353 #if AUXILIARY_PICTURES 1354 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1355 #else 1163 1356 pcPicYuvOrg[layer]->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1357 #endif 1358 #endif 1164 1359 #else 1165 1360 pcPicYuvOrg->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); … … 1190 1385 while ( !bEos ) 1191 1386 { 1192 // Read enough frames 1387 // Read enough frames 1193 1388 Bool bFramesReadyToCode = false; 1194 1389 while(!bFramesReadyToCode) … … 1196 1391 for(UInt layer=0; layer<m_numLayers; layer++) 1197 1392 { 1393 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1394 //6 1395 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1396 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1397 1398 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1399 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1400 #endif 1401 #if LAYER_CTB 1402 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 1403 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 1404 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 1405 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1406 #endif 1407 1198 1408 // get buffers 1199 1409 xGetBuffer(pcPicYuvRec, layer); … … 1201 1411 // read input YUV file 1202 1412 m_acTVideoIOYuvInputFile[layer].read( pcPicYuvOrg[layer], m_acLayerCfg[layer].getPad() ); 1413 1414 #if AUXILIARY_PICTURES 1415 if (m_acLayerCfg[layer].getChromaFormatIDC() == CHROMA_400) 1416 { 1417 pcPicYuvOrg[layer]->convertToMonochrome(); 1418 } 1419 #endif 1203 1420 1204 1421 if(layer == m_numLayers-1) … … 1257 1474 #endif 1258 1475 1259 // loop through frames in one GOP 1476 // loop through frames in one GOP 1260 1477 for ( UInt iPicIdInGOP=0; iPicIdInGOP < (bFirstFrame? 1:m_iGOPSize); iPicIdInGOP++ ) 1261 1478 { … … 1263 1480 for(UInt layer=0; layer<m_numLayers; layer++) 1264 1481 { 1482 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1483 //7 1484 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1485 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1486 1487 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1488 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1489 #endif 1490 #if LAYER_CTB 1491 g_uiMaxCUWidth = g_auiLayerMaxCUWidth[layer]; 1492 g_uiMaxCUHeight = g_auiLayerMaxCUHeight[layer]; 1493 g_uiMaxCUDepth = g_auiLayerMaxCUDepth[layer]; 1494 g_uiAddCUDepth = g_auiLayerAddCUDepth[layer]; 1495 1496 memcpy( g_auiZscanToRaster, g_auiLayerZscanToRaster[layer], sizeof( g_auiZscanToRaster ) ); 1497 memcpy( g_auiRasterToZscan, g_auiLayerRasterToZscan[layer], sizeof( g_auiRasterToZscan ) ); 1498 memcpy( g_auiRasterToPelX, g_auiLayerRasterToPelX[layer], sizeof( g_auiRasterToPelX ) ); 1499 memcpy( g_auiRasterToPelY, g_auiLayerRasterToPelY[layer], sizeof( g_auiRasterToPelY ) ); 1500 #endif 1265 1501 // call encoding function for one frame 1266 1502 if ( m_isField ) … … 1288 1524 for(UInt layer=0; layer<m_numLayers; layer++) 1289 1525 { 1526 #if O0194_DIFFERENT_BITDEPTH_EL_BL 1527 //8 1528 g_bitDepthY = m_acLayerCfg[layer].m_internalBitDepthY; 1529 g_bitDepthC = m_acLayerCfg[layer].m_internalBitDepthC; 1530 1531 g_uiPCMBitDepthLuma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthY : m_acLayerCfg[layer].m_internalBitDepthY; 1532 g_uiPCMBitDepthChroma = m_bPCMInputBitDepthFlag ? m_acLayerCfg[layer].m_inputBitDepthC : m_acLayerCfg[layer].m_internalBitDepthC; 1533 #endif 1290 1534 // write bistream to file if necessary 1291 1535 iNumEncoded = m_acTEncTop[layer].getNumPicRcvd(); … … 1528 1772 1529 1773 #if SVC_UPSAMPLING 1774 #if LAYER_CTB 1775 #if AUXILIARY_PICTURES 1776 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 ); 1777 #else 1778 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 ); 1779 #endif 1780 #else 1781 #if AUXILIARY_PICTURES 1782 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_acLayerCfg[layer].getChromaFormatIDC(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1783 #else 1530 1784 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth, NULL ); 1785 #endif 1786 #endif 1531 1787 #else 1532 1788 rpcPicYuvRec->create( m_acLayerCfg[layer].getSourceWidth(), m_acLayerCfg[layer].getSourceHeight(), m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); … … 1551 1807 delete pcPicYuvRec; pcPicYuvRec = NULL; 1552 1808 } 1553 } 1809 } 1554 1810 } 1555 1811 … … 1602 1858 #endif 1603 1859 { 1604 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(), 1860 m_acTVideoIOYuvReconFile[layer].write( pcPicYuvRec, m_acLayerCfg[layer].getConfLeft(), m_acLayerCfg[layer].getConfRight(), 1605 1861 m_acLayerCfg[layer].getConfTop(), m_acLayerCfg[layer].getConfBottom() ); 1606 1862 } … … 1622 1878 for ( i = 0; i < iNumEncoded/2; i++ ) 1623 1879 #endif 1624 { 1880 { 1625 1881 const AccessUnit& auTop = *(iterBitstream++); 1626 1882 const vector<UInt>& statsTop = writeAnnexB(bitstreamFile, auTop); -
trunk/source/App/utils/convert_NtoMbit_YCbCr.cpp
r313 r494 82 82 83 83 TComPicYuv frame; 84 #if AUXILIARY_PICTURES 85 frame.create( width, height, CHROMA_420, 1, 1, 0 ); 86 #else 84 87 frame.create( width, height, 1, 1, 0 ); 88 #endif 85 89 86 90 int pad[2] = {0, 0};
Note: See TracChangeset for help on using the changeset viewer.