Changeset 636 in 3DVCSoftware for branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder
- Timestamp:
- 16 Oct 2013, 11:27:16 (11 years ago)
- Location:
- branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncCfg.cpp
r635 r636 84 84 85 85 #if KWU_RC_MADPRED_E0227 86 m_ uiDepthMADPred = 0;86 m_DepthMADPred = 0; 87 87 #endif 88 88 } … … 600 600 601 601 #if KWU_RC_VIEWRC_E0227 602 ("ViewWiseTargetBits, -vtbr" , m_ pchViewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting")603 ("TargetBitAssign, -ta", m_ bViewWiseRateCtrl, false, "View-wise rate control on/off")602 ("ViewWiseTargetBits, -vtbr" , m_ViewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting") 603 ("TargetBitAssign, -ta", m_ViewWiseRateCtrl, false, "View-wise rate control on/off") 604 604 #endif 605 605 #if KWU_RC_MADPRED_E0227 606 ("DepthMADPred, -dm", m_ uiDepthMADPred, (UInt)0, "Depth based MAD prediction on/off")607 #endif 608 #else 609 ("RateC ontrol,-rc", m_enableRateCtrl, false, "Rate control on/off")606 ("DepthMADPred, -dm", m_DepthMADPred, (UInt)0, "Depth based MAD prediction on/off") 607 #endif 608 #else 609 ("RateCtrl,-rc", m_enableRateCtrl, false, "Rate control on/off") 610 610 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate") 611 611 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit") 612 612 613 613 #if KWU_RC_VIEWRC_E0227 614 ("ViewWiseTargetBits, -vtbr" , m_ pchViewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting")615 ("TargetBitAssign, -ta", m_ bViewWiseRateCtrl, false, "View-wise rate control on/off")614 ("ViewWiseTargetBits, -vtbr" , m_ViewTargetBits, std::vector<Int>(1, 32), "View-wise target bit-rate setting") 615 ("TargetBitAssign, -ta", m_ViewWiseRateCtrl, false, "View-wise rate control on/off") 616 616 #endif 617 617 #if KWU_RC_MADPRED_E0227 618 ("DepthMADPred, -dm", m_ uiDepthMADPred, (UInt)0, "Depth based MAD prediction on/off")618 ("DepthMADPred, -dm", m_DepthMADPred, (UInt)0, "Depth based MAD prediction on/off") 619 619 #endif 620 620 #endif … … 2179 2179 xConfirmPara( (numLCUInPic % m_numLCUInUnit) != 0, "total number of LCUs in a frame should be completely divided by NumLCUInUnit" ); 2180 2180 2181 //m_iMaxDeltaQP = MAX_DELTA_QP; 2181 #if !(KWU_RC_MADPRED_E0227 || KWU_RC_VIEWRC_E0227) 2182 m_iMaxDeltaQP = MAX_DELTA_QP; 2183 #endif 2182 2184 m_iMaxCuDQPDepth = MAX_CUDQP_DEPTH; 2183 2185 } … … 2323 2325 2324 2326 #if KWU_RC_MADPRED_E0227 2325 printf("Depth based MAD prediction : %d\n", m_ uiDepthMADPred);2327 printf("Depth based MAD prediction : %d\n", m_DepthMADPred); 2326 2328 #endif 2327 2329 #if KWU_RC_VIEWRC_E0227 2328 printf("View-wise Rate control : %d\n", m_ bViewWiseRateCtrl);2329 if(m_ bViewWiseRateCtrl)2330 printf("View-wise Rate control : %d\n", m_ViewWiseRateCtrl); 2331 if(m_ViewWiseRateCtrl) 2330 2332 { 2331 2333 2332 2334 printf("ViewWiseTargetBits : "); 2333 2335 for (int i = 0 ; i < m_iNumberOfViews ; i++) 2334 printf("%d ", m_ pchViewTargetBits[i]);2336 printf("%d ", m_ViewTargetBits[i]); 2335 2337 printf("\n"); 2336 2338 } … … 2349 2351 2350 2352 #if KWU_RC_MADPRED_E0227 2351 printf("Depth based MAD prediction : %d\n", m_ uiDepthMADPred);2353 printf("Depth based MAD prediction : %d\n", m_DepthMADPred); 2352 2354 #endif 2353 2355 #if KWU_RC_VIEWRC_E0227 2354 printf("View-wise Rate control : %d\n", m_ bViewWiseRateCtrl);2355 if(m_ bViewWiseRateCtrl)2356 printf("View-wise Rate control : %d\n", m_ViewWiseRateCtrl); 2357 if(m_ViewWiseRateCtrl) 2356 2358 { 2357 2359 2358 2360 printf("ViewWiseTargetBits : "); 2359 2361 for (int i = 0 ; i < m_iNumberOfViews ; i++) 2360 printf("%d ", m_ pchViewTargetBits[i]);2362 printf("%d ", m_ViewTargetBits[i]); 2361 2363 printf("\n"); 2362 2364 } -
branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncCfg.h
r635 r636 369 369 370 370 #if KWU_RC_VIEWRC_E0227 371 vector<Int> m_ pchViewTargetBits;372 bool m_ bViewWiseRateCtrl; ///< Flag for using view-wise rate control371 vector<Int> m_ViewTargetBits; 372 bool m_ViewWiseRateCtrl; ///< Flag for using view-wise rate control 373 373 #endif 374 374 #if KWU_RC_MADPRED_E0227 375 UInt m_ uiDepthMADPred;375 UInt m_DepthMADPred; 376 376 #endif 377 377 #else … … 381 381 382 382 #if KWU_RC_VIEWRC_E0227 383 vector<Int> m_ pchViewTargetBits;384 bool m_ bViewWiseRateCtrl; ///< Flag for using view-wise rate control383 vector<Int> m_ViewTargetBits; 384 bool m_ViewWiseRateCtrl; ///< Flag for using view-wise rate control 385 385 #endif 386 386 #if KWU_RC_MADPRED_E0227 387 UInt m_ uiDepthMADPred;387 UInt m_DepthMADPred; 388 388 #endif 389 389 #endif -
branches/HTM-8.2-dev0-KWU/source/App/TAppEncoder/TAppEncTop.cpp
r635 r636 512 512 m_cTEncTop.setSignHideFlag(m_signHideFlag); 513 513 #if RATE_CONTROL_LAMBDA_DOMAIN 514 #if KWU_RC_MADPRED_E0227 514 515 if(!m_cTEncTop.getIsDepth()) //only for texture 516 { 515 517 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 518 } 516 519 else 520 { 517 521 m_cTEncTop.setUseRateCtrl ( 0 ); 522 } 523 #else 524 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); 525 #endif 518 526 #if !KWU_RC_VIEWRC_E0227 519 527 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); … … 528 536 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) 529 537 { 530 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_ uiDepthMADPred : 0);538 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_DepthMADPred : 0); 531 539 532 540 if(m_cTEncTop.getUseDepthMADPred()) 541 { 533 542 m_cTEncTop.setCamParam(&m_cCameraData); 543 } 534 544 } 535 545 #endif … … 537 547 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) 538 548 { 539 m_cTEncTop.setUseViewWiseRateCtrl(m_ bViewWiseRateCtrl);549 m_cTEncTop.setUseViewWiseRateCtrl(m_ViewWiseRateCtrl); 540 550 541 551 if(m_iNumberOfViews == 1) 542 552 { 543 if(m_ bViewWiseRateCtrl)544 { 545 m_cTEncTop.setTargetBitrate(m_ pchViewTargetBits[layerIdInVps>>1]);553 if(m_ViewWiseRateCtrl) 554 { 555 m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]); 546 556 } 547 557 else 558 { 548 559 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); 560 } 549 561 } 550 562 else 551 563 { 552 if(m_ bViewWiseRateCtrl)553 { 554 m_cTEncTop.setTargetBitrate(m_ pchViewTargetBits[layerIdInVps>>1]);564 if(m_ViewWiseRateCtrl) 565 { 566 m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]); 555 567 } 556 568 else … … 559 571 { 560 572 if(m_cTEncTop.getViewId() == 0) 573 { 561 574 m_cTEncTop.setTargetBitrate ( (m_RCTargetBitrate*80)/100 ); 575 } 562 576 else if(m_cTEncTop.getViewId() == 1) 577 { 563 578 m_cTEncTop.setTargetBitrate ( (m_RCTargetBitrate*20)/100 ); 579 } 564 580 } 565 581 else if(m_iNumberOfViews == 3) 566 582 { 567 583 if(m_cTEncTop.getViewId() == 0) 584 { 568 585 m_cTEncTop.setTargetBitrate ( (m_RCTargetBitrate*66)/100 ); 586 } 569 587 else if(m_cTEncTop.getViewId() == 1) 588 { 570 589 m_cTEncTop.setTargetBitrate ( (m_RCTargetBitrate*17)/100 ); 590 } 571 591 else if(m_cTEncTop.getViewId() == 2) 592 { 572 593 m_cTEncTop.setTargetBitrate ( (m_RCTargetBitrate*17)/100 ); 594 } 573 595 } 574 596 else 597 { 575 598 m_cTEncTop.setTargetBitrate ( m_RCTargetBitrate ); 576 } 577 } 578 } 579 #endif 580 #else 599 } 600 } 601 } 602 } 603 #endif 604 #else 605 #if KWU_RC_MADPRED_E0227 581 606 if(!m_cTEncTop.getIsDepth()) //only for texture 582 607 { … … 588 613 } 589 614 else 615 { 590 616 m_cTEncTop.setUseRateCtrl ( 0 ); 617 } 618 #else 619 m_cTEncTop.setUseRateCtrl ( m_enableRateCtrl); 620 m_cTEncTop.setTargetBitrate ( m_targetBitrate); 621 m_cTEncTop.setNumLCUInUnit ( m_numLCUInUnit); 622 #endif 591 623 592 624 #if KWU_RC_MADPRED_E0227 593 625 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) 594 626 { 595 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_ uiDepthMADPred : 0);627 m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_DepthMADPred : 0); 596 628 597 629 if(m_cTEncTop.getUseDepthMADPred()) 630 { 598 631 m_cTEncTop.setCamParam(&m_cCameraData); 632 } 599 633 } 600 634 #endif … … 603 637 if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth()) 604 638 { 605 m_cTEncTop.setUseViewWiseRateCtrl(m_ bViewWiseRateCtrl);639 m_cTEncTop.setUseViewWiseRateCtrl(m_ViewWiseRateCtrl); 606 640 if(m_iNumberOfViews == 1) 607 641 { 608 if(m_ bViewWiseRateCtrl)609 { 610 m_cTEncTop.setTargetBitrate(m_ pchViewTargetBits[layerIdInVps>>1]);642 if(m_ViewWiseRateCtrl) 643 { 644 m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]); 611 645 } 612 646 else 647 { 613 648 m_cTEncTop.setTargetBitrate ( m_targetBitrate ); 649 } 614 650 } 615 651 else 616 652 { 617 if(m_ bViewWiseRateCtrl)618 { 619 m_cTEncTop.setTargetBitrate(m_ pchViewTargetBits[layerIdInVps>>1]);653 if(m_ViewWiseRateCtrl) 654 { 655 m_cTEncTop.setTargetBitrate(m_ViewTargetBits[layerIdInVps>>1]); 620 656 } 621 657 else … … 624 660 { 625 661 if(m_cTEncTop.getViewId() == 0) 662 { 626 663 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*80)/100 ); 664 } 627 665 else if(m_cTEncTop.getViewId() == 1) 666 { 628 667 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*20)/100 ); 668 } 629 669 } 630 670 else if(m_iNumberOfViews == 3) 631 671 { 632 672 if(m_cTEncTop.getViewId() == 0) 673 { 633 674 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*66)/100 ); 675 } 634 676 else if(m_cTEncTop.getViewId() == 1) 677 { 635 678 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*17)/100 ); 679 } 636 680 else if(m_cTEncTop.getViewId() == 2) 681 { 637 682 m_cTEncTop.setTargetBitrate ( (m_targetBitrate*17)/100 ); 683 } 638 684 } 639 685 else 686 { 640 687 m_cTEncTop.setTargetBitrate ( m_targetBitrate ); 688 } 641 689 } 642 690 }
Note: See TracChangeset for help on using the changeset viewer.