Changeset 636 in 3DVCSoftware
- Timestamp:
- 16 Oct 2013, 11:27:16 (11 years ago)
- Location:
- branches/HTM-8.2-dev0-KWU
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-8.2-dev0-KWU/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r635 r636 224 224 RCForceIntraQP : 0 # Rate control: force intra QP to be equal to initial QP 225 225 226 DepthMADPred : 0# 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view227 TargetBitAssign : 0# Manual assignment of target bit-rate228 ViewWiseTargetBits : 950000 315000 358000# View-wise target bit-rate setting226 DepthMADPred : 0 # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view 227 TargetBitAssign : 0 # Manual assignment of target bit-rate 228 ViewWiseTargetBits : 950000 315000 358000 # View-wise target bit-rate setting 229 229 230 230 #============ Rate Control URQ ====================== 231 #RateC ontrol: 0 # 0: Disable rate control 1: Enable rate control with total target232 #DepthMADPred : 0# 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view233 #TargetBitAssign : 0# Manual assignment of target bit-rate234 #ViewWiseTargetBits : 952 315 360# View-wise target bit-rate setting235 #TargetBitrate 236 #NumLCUInUnit 231 #RateCtrl : 0 # 0: Disable rate control 1: Enable rate control with total target 232 #DepthMADPred : 0 # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view 233 #TargetBitAssign : 0 # Manual assignment of target bit-rate 234 #ViewWiseTargetBits : 952 315 360 # View-wise target bit-rate setting 235 #TargetBitrate : 1500 # input target bitrate when RateCtrl is enable 236 #NumLCUInUnit : 1 # Number of LCU in an Unit. Fraction is not allowed 237 237 238 238 #========== multiview coding tools ========== -
branches/HTM-8.2-dev0-KWU/cfg/3D-HEVC/fullCfg.cfg
r635 r636 230 230 RCForceIntraQP : 0 # Rate control: force intra QP to be equal to initial QP 231 231 232 DepthMADPred : 0# 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view233 TargetBitAssign : 0# Manual assignment of target bit-rate234 ViewWiseTargetBits : 950000 315000 358000# View-wise target bit-rate setting232 DepthMADPred : 0 # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view 233 TargetBitAssign : 0 # Manual assignment of target bit-rate 234 ViewWiseTargetBits : 950000 315000 358000 # View-wise target bit-rate setting 235 235 236 236 #============ Rate Control URQ ====================== 237 #RateC ontrol: 0 # 0: Disable rate control 1: Enable rate control with total target238 #DepthMADPred : 0# 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view239 #TargetBitAssign : 0# Manual assignment of target bit-rate240 #ViewWiseTargetBits : 952 315 360# View-wise target bit-rate setting241 #TargetBitrate 242 #NumLCUInUnit 237 #RateCtrl : 0 # 0: Disable rate control 1: Enable rate control with total target 238 #DepthMADPred : 0 # 0: Disable Depth based MAD prediction for extended view 1: Enable Depth based MAD prediction for extended view 239 #TargetBitAssign : 0 # Manual assignment of target bit-rate 240 #ViewWiseTargetBits : 952 315 360 # View-wise target bit-rate setting 241 #TargetBitrate : 1500 # input target bitrate when RateCtrl is enable 242 #NumLCUInUnit : 1 # Number of LCU in an Unit. Fraction is not allowed 243 243 244 244 #========== multiview coding tools ========== -
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 } -
branches/HTM-8.2-dev0-KWU/source/Lib/TAppCommon/TAppComCamPara.cpp
r635 r636 1530 1530 #if KWU_RC_MADPRED_E0227 1531 1531 Void 1532 TAppComCamPara:: RCGetZNearZFar( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar )1532 TAppComCamPara::getZNearZFar( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar ) 1533 1533 { 1534 1534 UInt uiFoundLine = -1; … … 1547 1547 1548 1548 Void 1549 TAppComCamPara:: RCGetGeometryData( Int iView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated )1549 TAppComCamPara::getGeometryData( Int iView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated ) 1550 1550 { 1551 1551 UInt uiFoundLine = -1; -
branches/HTM-8.2-dev0-KWU/source/Lib/TAppCommon/TAppComCamPara.h
r635 r636 222 222 223 223 #if KWU_RC_MADPRED_E0227 224 Void RCGetZNearZFar ( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar );225 Void RCGetGeometryData ( Int dView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated );224 Void getZNearZFar ( Int iView, UInt uiFrame, Double& rdZNear, Double& rdZFar ); 225 Void getGeometryData ( Int dView, UInt uiFrame, Double& rdFocalLength, Double& rdPosition, Double& rdCameraShift, Bool& rbInterpolated ); 226 226 #endif 227 227 }; -
branches/HTM-8.2-dev0-KWU/source/Lib/TLibCommon/TypeDef.h
r635 r636 310 310 #define RATE_CONTROL_INTRA 1 ///< JCTVC-M0257, rate control for intra 311 311 #endif 312 #define KWU_RC_VIEWRC_E0227 0///< JCT3V-E0227, view-wise target bitrate allocation313 #define KWU_RC_MADPRED_E0227 0///< JCT3V-E0227, inter-view MAD prediction312 #define KWU_RC_VIEWRC_E0227 1 ///< JCT3V-E0227, view-wise target bitrate allocation 313 #define KWU_RC_MADPRED_E0227 1 ///< JCT3V-E0227, inter-view MAD prediction 314 314 315 315 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) -
branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncCu.cpp
r635 r636 242 242 243 243 m_bUseSBACRD = pcEncTop->getUseSBACRD(); 244 245 #if KWU_RC_MADPRED_E0227 244 246 if(!pcEncTop->getIsDepth()) 247 { 245 248 m_pcRateCtrl = pcEncTop->getRateCtrl(); 249 } 246 250 else 247 251 { 248 252 m_pcRateCtrl = NULL; 249 253 } 254 #else 255 m_pcRateCtrl = pcEncTop->getRateCtrl(); 256 #endif 250 257 } 251 258 … … 2124 2131 #endif 2125 2132 2126 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT 2127 #if KWU_RC_MADPRED_E0227 2133 #if RATE_CONTROL_LAMBDA_DOMAIN && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227) 2128 2134 if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && ePartSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth ) 2129 2135 { … … 2133 2139 m_temporalSAD = (Int)SAD; 2134 2140 } 2135 #endif2136 2141 #endif 2137 2142 #if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227 … … 2268 2273 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 2269 2274 2270 #if RATE_CONTROL_LAMBDA_DOMAIN && !M0036_RC_IMPROVEMENT 2271 #if KWU_RC_MADPRED_E0227 2275 #if RATE_CONTROL_LAMBDA_DOMAIN && (!M0036_RC_IMPROVEMENT || KWU_RC_MADPRED_E0227) 2272 2276 UChar uhDepth = rpcTempCU->getDepth( 0 ); 2273 2277 if ( m_pcEncCfg->getUseRateCtrl() && m_pcEncCfg->getLCULevelRC() && eSize == SIZE_2Nx2N && uhDepth <= m_addSADDepth ) … … 2278 2282 m_spatialSAD = (Int)SAD; 2279 2283 } 2280 #endif2281 2284 #endif 2282 2285 #if !RATE_CONTROL_LAMBDA_DOMAIN && KWU_RC_MADPRED_E0227 -
branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncGOP.cpp
r635 r636 984 984 #if KWU_RC_MADPRED_E0227 985 985 if(m_pcCfg->getLayerId() != 0) 986 { 986 987 m_pcRateCtrl->getRCPic()->setIVPic( m_pcEncTop->getEncTop()->getTEncTop(0)->getRateCtrl()->getRCPic() ); 987 //getEncTop()->getEncTop();//->getTEncTop(0);//->getUseRateCtrl()->getRCPic();988 } 988 989 #endif 989 990 … … 1037 1038 list<TEncRCPic*> listPreviousPicture = m_pcRateCtrl->getPicList(); 1038 1039 lambda = m_pcRateCtrl->getRCPic()->estimatePicLambdaIV( listPreviousPicture, pcSlice->getPOC() ); 1039 //printf("lambda : %lf\n", lambda);1040 1040 sliceQP = m_pcRateCtrl->getRCPic()->estimatePicQP( lambda, listPreviousPicture ); 1041 1041 } -
branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncRateCtrl.cpp
r635 r636 726 726 m_lastPicture = NULL; 727 727 list<TEncRCPic*>::reverse_iterator it; 728 #if KWU_RC_MADPRED_E0227 728 729 for ( it = listPreviousPictures.rbegin(); it != listPreviousPictures.rend(); it++ ) 729 730 { … … 734 735 } 735 736 } 737 #endif 736 738 #endif 737 739 … … 1092 1094 { 1093 1095 Pel* pOrg = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0); 1094 Pel* pRec = pcCU->getSlice()->getIvPic(false, 0)->getPicYuv Pred()->getLumaAddr(pcCU->getAddr(), 0);1096 Pel* pRec = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0); 1095 1097 Pel* pDep = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0); 1096 1098 Int iStride = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getStride(); … … 1121 1123 pcCU->getPosInPic(0, PosX, PosY); 1122 1124 if((PosX + *iDisparity) < 0 || (PosX + *iDisparity + iWidth) >= pcCU->getSlice()->getSPS()->getMaxCUWidth()) 1125 { 1123 1126 Disp = 0; 1127 } 1124 1128 1125 1129 for( y = 0; y < iHeight; y++ ) … … 1138 1142 m_LCUs[ LCUIdx ].m_IVMAD = IVMAD; 1139 1143 if(m_lastPicture) 1144 { 1140 1145 m_LCUs[ LCUIdx ].m_MAD = m_lastPicture->getLCU(LCUIdx).m_MAD; 1146 } 1141 1147 1142 1148 MAD = m_LCUs[ LCUIdx ].m_IVMAD; … … 2076 2082 m_sourceHeightInLCU = (sourceHeight / maxCUHeight) + (( sourceHeight % maxCUHeight) ? 1 : 0); 2077 2083 m_isLowdelay = (sizeIntraPeriod == -1) ? true : false; 2084 #if KWU_RC_MADPRED_E0227 2078 2085 m_prevBitrate = ( targetKbps * 1000 ); // in units of 1,024 bps 2079 2086 m_currBitrate = ( targetKbps * 1000 ); 2087 #else 2088 m_prevBitrate = ( targetKbps << 10 ); // in units of 1,024 bps 2089 m_currBitrate = ( targetKbps << 10 ); 2090 #endif 2080 2091 m_frameRate = frameRate; 2081 2092 m_refFrameNum = m_isLowdelay ? (sizeGOP) : (sizeGOP>>1); … … 2453 2464 2454 2465 Pel* pOrg = pcCU->getPic()->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0); 2455 Pel* pRec = pcCU->getPic()->getPicYuv Pred()->getLumaAddr(pcCU->getAddr(), 0);2466 Pel* pRec = pcCU->getPic()->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0); 2456 2467 Int stride = pcCU->getPic()->getStride(); 2457 2468 … … 2483 2494 2484 2495 Pel* pOrg = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0); 2485 Pel* pRec = pcCU->getSlice()->getIvPic(false, 0)->getPicYuv Pred()->getLumaAddr(pcCU->getAddr(), 0);2496 Pel* pRec = pcCU->getSlice()->getIvPic(false, 0)->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), 0); 2486 2497 Pel* pDep = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getLumaAddr(pcCU->getAddr(), 0); 2487 2498 Int iStride = pcCU->getSlice()->getIvPic(true, pcCU->getSlice()->getViewIndex())->getPicYuvOrg()->getStride(); -
branches/HTM-8.2-dev0-KWU/source/Lib/TLibEncoder/TEncSlice.cpp
r635 r636 157 157 m_pdRdPicQp = (Double*)xMalloc( Double, m_pcCfg->getDeltaQpRD() * 2 + 1 ); 158 158 m_piRdPicQp = (Int* )xMalloc( Int, m_pcCfg->getDeltaQpRD() * 2 + 1 ); 159 #if KWU_RC_MADPRED_E0227 159 160 if(m_pcCfg->getUseRateCtrl()) 161 { 160 162 m_pcRateCtrl = pcEncTop->getRateCtrl(); 163 } 161 164 else 165 { 162 166 m_pcRateCtrl = NULL; 167 } 168 #else 169 m_pcRateCtrl = pcEncTop->getRateCtrl(); 170 #endif 163 171 } 164 172 … … 1136 1144 Int Direction = pcSlice->getViewId() - pcCU->getSlice()->getIvPic(false, 0)->getViewId(); 1137 1145 1138 pcEncTop->getCamParam()-> RCGetZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);1139 pcEncTop->getCamParam()-> RCGetGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);1140 pcEncTop->getCamParam()-> RCGetGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);1146 pcEncTop->getCamParam()->getZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf); 1147 pcEncTop->getCamParam()->getGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated); 1148 pcEncTop->getCamParam()->getGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated); 1141 1149 1142 1150 m_pcRateCtrl->updateLCUDataEnhancedView(pcCU, pcCU->getTotalBits(), pcCU->getQP(0), BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1)); … … 1250 1258 Int iDisparity; 1251 1259 1252 pcEncTop->getCamParam()-> RCGetZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf);1253 pcEncTop->getCamParam()-> RCGetGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated);1254 pcEncTop->getCamParam()-> RCGetGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated);1260 pcEncTop->getCamParam()->getZNearZFar(pcSlice->getViewId(), pcSlice->getPOC(), Zn, Zf); 1261 pcEncTop->getCamParam()->getGeometryData(0, pcSlice->getPOC(), FocalLength, BasePos, CamShift, bInterpolated); 1262 pcEncTop->getCamParam()->getGeometryData(pcSlice->getViewId(), pcSlice->getPOC(), FocalLength, Position, CamShift, bInterpolated); 1255 1263 bpp = m_pcRateCtrl->getRCPic()->getLCUTargetBppforInterView( m_pcRateCtrl->getPicList(), pcCU, 1256 1264 BasePos, Position, FocalLength, Zn, Zf, (Direction > 0 ? 1 : -1), &iDisparity );
Note: See TracChangeset for help on using the changeset viewer.