Changeset 193 in 3DVCSoftware
- Timestamp:
- 19 Nov 2012, 21:15:40 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0
- Files:
-
- 5 added
- 3 deleted
- 50 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg
r133 r193 51 51 DecodingRefreshType : 1 # Random Accesss 0:none, 1:CDR, 2:IDR 52 52 GOPSize : 8 # GOP Size (number of B slice = GOPSize-1) 53 # V0 Type POC QPoffset QPfactor temporal_id #ref_pics_active ref_pic #ref_pics reference pictures predict deltaRIdx-1 deltaRPS #ref_idcs reference idcs #IV_ref_pics IV reference pics IV ref list pos 54 Frame1 : B 8 1 0.442 0 4 1 4 -8 -10 -12 -16 0 0 55 Frame2 : B 4 2 0.3536 0 2 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 0 56 Frame3 : B 2 3 0.3536 0 2 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 0 57 Frame4 : B 1 4 0.68 0 2 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 0 58 Frame5 : B 3 4 0.68 0 2 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 0 59 Frame6 : B 6 3 0.3536 0 2 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 0 60 Frame7 : B 5 4 0.68 0 2 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 0 61 Frame8 : B 7 4 0.68 0 2 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 0 62 FrameI_v1 : P 0 3 0.442 0 1 1 0 0 1 -1 1 0 63 Frame1_v1 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -1 2 0 64 Frame2_v1 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -1 2 0 65 Frame3_v1 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -1 2 0 66 Frame4_v1 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -1 2 0 67 Frame5_v1 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -1 3 0 68 Frame6_v1 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -1 3 0 69 Frame7_v1 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -1 3 0 70 Frame8_v1 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -1 3 0 71 FrameI_v2 : P 0 3 0.442 0 1 1 0 0 1 -2 1 0 72 Frame1_v2 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -2 2 0 73 Frame2_v2 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -2 2 0 74 Frame3_v2 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -2 2 0 75 Frame4_v2 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -2 2 0 76 Frame5_v2 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -2 3 0 77 Frame6_v2 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -2 3 0 78 Frame7_v2 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -2 3 0 79 Frame8_v2 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -2 3 0 53 # V0 Type POC QPoffset QPfactor temporal_id #ref_pics_active ref_pic #ref_pics reference pictures predict deltaRIdx-1 deltaRPS #ref_idcs reference idcs #IV_ref_pics IV reference pics IV ref list pos #VSP_ref_pics VSP_ref_pics VSP_ref_list_pos 54 Frame1 : B 8 1 0.442 0 4 1 4 -8 -10 -12 -16 0 0 0 55 Frame2 : B 4 2 0.3536 0 2 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 0 0 56 Frame3 : B 2 3 0.3536 0 2 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 0 0 57 Frame4 : B 1 4 0.68 0 2 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 0 0 58 Frame5 : B 3 4 0.68 0 2 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 0 0 59 Frame6 : B 6 3 0.3536 0 2 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 0 0 60 Frame7 : B 5 4 0.68 0 2 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 0 0 61 Frame8 : B 7 4 0.68 0 2 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 0 0 62 FrameI_v1 : P 0 3 0.442 0 1 1 0 0 1 -1 1 0 1 -1 2 0 63 Frame1_v1 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -1 2 0 1 -1 3 0 64 Frame2_v1 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -1 2 0 1 -1 3 0 65 Frame3_v1 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -1 2 0 1 -1 3 0 66 Frame4_v1 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -1 2 0 1 -1 3 0 67 Frame5_v1 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 68 Frame6_v1 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 69 Frame7_v1 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -1 3 0 1 -1 4 0 70 Frame8_v1 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 71 FrameI_v2 : P 0 3 0.442 0 1 1 0 0 1 -2 1 0 1 -2 2 0 72 Frame1_v2 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -2 2 0 1 -2 3 0 73 Frame2_v2 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -2 2 0 1 -2 3 0 74 Frame3_v2 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -2 2 0 1 -2 3 0 75 Frame4_v2 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -2 2 0 1 -2 3 0 76 Frame5_v2 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 77 Frame6_v2 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 78 Frame7_v2 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -2 3 0 1 -2 4 0 79 Frame8_v2 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 80 80 81 81 ListCombination : 1 # Use combined list for uni-prediction in B-slices … … 203 203 204 204 205 #========== texture coding tools based on depth ========== 206 VSP : 1 207 VSPDepthDisable : 0 208 205 209 #========== view synthesis optimization (VSO) ========== 206 210 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)] # VSO configuration string 211 WVSO : 0 212 VSOWeight : 10 213 VSDWeight : 1 214 DWeight : 1 215 216 #========== Non-normative encoder techniques ========== 217 DPL : 0 207 218 208 219 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg
r133 r193 55 55 DecodingRefreshType : 1 # Random Accesss 0:none, 1:CDR, 2:IDR 56 56 GOPSize : 8 # GOP Size (number of B slice = GOPSize-1) 57 # V0 Type POC QPoffset QPfactor temporal_id #ref_pics_active ref_pic #ref_pics reference pictures predict deltaRIdx-1 deltaRPS #ref_idcs reference idcs #IV_ref_pics IV reference pics IV ref list pos 58 Frame1 : B 8 1 0.442 0 4 1 4 -8 -10 -12 -16 0 0 59 Frame2 : B 4 2 0.3536 0 2 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 0 60 Frame3 : B 2 3 0.3536 0 2 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 0 61 Frame4 : B 1 4 0.68 0 2 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 0 62 Frame5 : B 3 4 0.68 0 2 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 0 63 Frame6 : B 6 3 0.3536 0 2 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 0 64 Frame7 : B 5 4 0.68 0 2 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 0 65 Frame8 : B 7 4 0.68 0 2 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 0 66 FrameI_v1 : P 0 3 0.442 0 1 1 0 0 1 -1 1 0 67 Frame1_v1 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -1 2 0 68 Frame2_v1 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -1 2 0 69 Frame3_v1 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -1 2 0 70 Frame4_v1 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -1 2 0 71 Frame5_v1 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -1 3 0 72 Frame6_v1 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -1 3 0 73 Frame7_v1 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -1 3 0 74 Frame8_v1 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -1 3 0 75 FrameI_v2 : P 0 3 0.442 0 1 1 0 0 1 -2 1 0 76 Frame1_v2 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -2 2 0 77 Frame2_v2 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -2 2 0 78 Frame3_v2 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -2 2 0 79 Frame4_v2 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -2 2 0 80 Frame5_v2 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -2 3 0 81 Frame6_v2 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -2 3 0 82 Frame7_v2 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -2 3 0 83 Frame8_v2 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -2 3 0 57 # V0 Type POC QPoffset QPfactor temporal_id #ref_pics_active ref_pic #ref_pics reference pictures predict deltaRIdx-1 deltaRPS #ref_idcs reference idcs #IV_ref_pics IV reference pics IV ref list pos #VSP_ref_pics VSP_ref_pics VSP_ref_list_pos 58 Frame1 : B 8 1 0.442 0 4 1 4 -8 -10 -12 -16 0 0 0 59 Frame2 : B 4 2 0.3536 0 2 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 0 0 60 Frame3 : B 2 3 0.3536 0 2 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 0 0 61 Frame4 : B 1 4 0.68 0 2 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 0 0 62 Frame5 : B 3 4 0.68 0 2 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 0 0 63 Frame6 : B 6 3 0.3536 0 2 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 0 0 64 Frame7 : B 5 4 0.68 0 2 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 0 0 65 Frame8 : B 7 4 0.68 0 2 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 0 0 66 FrameI_v1 : P 0 3 0.442 0 1 1 0 0 1 -1 1 0 1 -1 2 0 67 Frame1_v1 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -1 2 0 1 -1 3 0 68 Frame2_v1 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -1 2 0 1 -1 3 0 69 Frame3_v1 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -1 2 0 1 -1 3 0 70 Frame4_v1 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -1 2 0 1 -1 3 0 71 Frame5_v1 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 72 Frame6_v1 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 73 Frame7_v1 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -1 3 0 1 -1 4 0 74 Frame8_v1 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -1 3 0 1 -1 4 0 75 FrameI_v2 : P 0 3 0.442 0 1 1 0 0 1 -2 1 0 1 -2 2 0 76 Frame1_v2 : B 8 4 0.442 0 4 1 4 -8 -10 -12 -16 0 1 -2 2 0 1 -2 3 0 77 Frame2_v2 : B 4 5 0.3536 0 3 1 3 -4 -6 4 1 0 4 5 1 1 0 0 1 1 -2 2 0 1 -2 3 0 78 Frame3_v2 : B 2 6 0.3536 0 3 1 4 -2 -4 2 6 1 0 2 4 1 1 1 1 1 -2 2 0 1 -2 3 0 79 Frame4_v2 : B 1 7 0.68 0 3 0 4 -1 1 3 7 1 0 1 5 1 0 1 1 1 1 -2 2 0 1 -2 3 0 80 Frame5_v2 : B 3 7 0.68 0 3 0 4 -1 -3 1 5 1 0 -2 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 81 Frame6_v2 : B 6 6 0.3536 0 3 1 4 -2 -4 -6 2 1 0 -3 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 82 Frame7_v2 : B 5 7 0.68 0 3 0 4 -1 -5 1 3 1 0 1 5 1 0 1 1 1 1 -2 3 0 1 -2 4 0 83 Frame8_v2 : B 7 7 0.68 0 3 0 4 -1 -3 -7 1 1 0 -2 5 1 1 1 1 0 1 -2 3 0 1 -2 4 0 84 84 85 85 ListCombination : 1 # Use combined list for uni-prediction in B-slices … … 206 206 VSO : 1 # use of view synthesis optimization for depth coding 207 207 208 #========== texture coding tools based on depth ========== 209 VSP : 1 210 VSPDepthDisable : 0 208 211 209 212 #========== view synthesis optimization (VSO) ========== 210 213 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string 214 WVSO : 0 215 VSOWeight : 10 216 VSDWeight : 1 217 DWeight : 1 218 219 #========== Non-normative encoder techniques ========== 220 DPL : 0 221 211 222 #============ Misc. ================ 212 223 SEIpictureDigest : 0 # Control generation of picture_digest SEI messages -
branches/HTM-4.0.1-VSP-dev0/build/vc9/TLibCommon_vc9.vcproj
r166 r193 292 292 </File> 293 293 <File 294 RelativePath="..\..\source\Lib\TLibCommon\DebugLog.cpp"295 >296 </File>297 <File298 294 RelativePath="..\..\source\Lib\libmd5\libmd5.c" 299 295 > … … 422 418 </File> 423 419 <File 424 RelativePath="..\..\source\Lib\TLibCommon\DebugLog.h"425 >426 </File>427 <File428 420 RelativePath="..\..\source\Lib\libmd5\libmd5.h" 429 421 > -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecCfg.cpp
r100 r193 103 103 if (!m_pchBitstreamFile) 104 104 { 105 fprintf(stderr, "No input file specif ed, aborting\n");105 fprintf(stderr, "No input file specified, aborting\n"); 106 106 return false; 107 107 } -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r166 r193 262 262 } 263 263 } 264 #if DEBUGIMGOUT265 for(Int viewDepthIdx=0; viewDepthIdx<m_tVideoIOYuvReconDbgFile.size() ; viewDepthIdx++)266 {267 if( m_tVideoIOYuvReconDbgFile[viewDepthIdx] )268 {269 m_tVideoIOYuvReconDbgFile[viewDepthIdx]->close();270 delete m_tVideoIOYuvReconDbgFile[viewDepthIdx];271 m_tVideoIOYuvReconDbgFile[viewDepthIdx] = NULL ;272 }273 }274 #endif275 264 276 265 for(Int viewDepthIdx=0; viewDepthIdx<m_tDecTop.size() ; viewDepthIdx++) … … 341 330 #endif 342 331 } 343 #if DEBUGIMGOUT344 #if PIC_CROPPING345 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );346 #else347 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );348 #endif349 #endif350 332 351 333 // update POC of display order … … 406 388 #endif 407 389 } 408 #if DEBUGIMGOUT409 #if PIC_CROPPING410 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), sps->getPicCropLeftOffset(), sps->getPicCropRightOffset(), sps->getPicCropTopOffset(), sps->getPicCropBottomOffset() );411 #else412 m_tVideoIOYuvReconDbgFile[viewDepthId]->write( pcPic->getPicYuvRecDbg(), pcPic->getSlice(0)->getSPS()->getPad() );413 #endif414 #endif415 390 416 391 // update POC of display order … … 501 476 } 502 477 #endif 503 #if DEBUGIMGOUT 504 while( m_tVideoIOYuvReconDbgFile.size() < newNumberOfViewDepth) 505 { 506 m_tVideoIOYuvReconDbgFile.push_back(new TVideoIOYuv); 507 Char buffer[4]; 508 sprintf(buffer,"_%i", (Int)(m_tVideoIOYuvReconDbgFile.size()-1) / 2 ); 509 Char* nextFilename = NULL; 510 if( (m_tVideoIOYuvReconDbgFile.size() % 2) == 0 ) 511 { 512 Char* pchTempFilename = NULL; 513 xAppendToFileNameEnd( "DebugImg.yuv", "_depth", pchTempFilename); 514 xAppendToFileNameEnd( pchTempFilename, buffer, nextFilename); 515 free ( pchTempFilename ); 516 } 517 else 518 { 519 xAppendToFileNameEnd( "DebugImg.yuv", buffer, nextFilename); 520 } 521 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconDbgFile.size() % 2) == 1 ) ) 522 { 523 m_tVideoIOYuvReconDbgFile.back()->open( nextFilename, true, m_outputBitDepth, g_uiBitDepth + g_uiBitIncrement ); 524 } 525 free ( nextFilename ); 526 } 527 #endif 478 528 479 while( m_pocLastDisplay.size() < newNumberOfViewDepth ) 529 480 { … … 587 538 { 588 539 //first view does not have VSP 589 #if VSP_TEXT_ONLY590 if((iCodedViewIdx == 0)||(bDepth))591 #else592 540 if((iCodedViewIdx == 0)) 593 #endif594 541 return; 595 542 pcPicVSP->getSlice(0)->setPOC( iCurPoc ); 543 pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx ); 596 544 Int iNeighborViewId = 0; 597 545 Bool bRenderFromLeft; -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h
r166 r193 68 68 69 69 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconFile; ///< reconstruction YUV class 70 #if DEBUGIMGOUT71 std::vector<TVideoIOYuv*> m_tVideoIOYuvReconDbgFile; ///< debug YUV class72 #endif73 70 74 71 // for output control -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r166 r193 120 120 #endif 121 121 122 #if FIX_MEM_LEAKS 123 if ( m_pchCameraParameterFile != NULL ) 124 free ( m_pchCameraParameterFile ); 125 126 if ( m_pchBaseViewCameraNumbers != NULL ) 127 free ( m_pchBaseViewCameraNumbers ); 128 129 if ( m_pchdQPFile != NULL ) 130 free ( m_pchdQPFile ); 131 132 if ( m_pchColumnWidth != NULL ) 133 free ( m_pchColumnWidth ); 134 135 if ( m_pchRowHeight != NULL ) 136 free ( m_pchRowHeight ); 137 138 if ( m_scalingListFile != NULL ) 139 free ( m_scalingListFile ); 140 141 #endif 142 122 143 } 123 144 … … 168 189 in>>entry.m_interViewRefPosL1[i]; 169 190 } 191 #if VSP_CFG 192 in>>entry.m_numVSPRefPics; 193 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 194 { 195 in>>entry.m_VSPRefPics[i]; 196 } 197 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 198 { 199 in>>entry.m_VSPRefPosL0[i]; 200 } 201 for( Int i = 0; i < entry.m_numVSPRefPics; i++ ) 202 { 203 in>>entry.m_VSPRefPosL1[i]; 204 } 205 #endif 206 170 207 return in; 171 208 } … … 339 376 ("AllowNegDist", m_bAllowNegDist , true , "Allow negative Distortion in VSO") 340 377 #endif 341 378 #if LGE_WVSO_A0119 379 ("WVSO", m_bUseWVSO , false , "Use depth fidelity term for VSO" ) 380 ("VSOWeight", m_iVSOWeight , 10 , "Synthesized View Distortion Change weight" ) 381 ("VSDWeight", m_iVSDWeight , 1 , "View Synthesis Distortion estimate weight" ) 382 ("DWeight", m_iDWeight , 1 , "Depth Distortion weight" ) 383 #endif 384 385 #if OL_DEPTHLIMIT_A0044 386 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 387 #endif 388 #endif 389 390 #if VSP_N 391 ("VSP", m_bUseVSP , false , "Use VSP" ) 392 ("VSPDepthDisable", m_bVSPDepthDisable , false , "Use VSP Depth Disable" ) 342 393 #endif 343 394 … … 498 549 m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); 499 550 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str()); 500 551 501 552 if ( m_bUsingDepthMaps ) 502 553 { … … 648 699 #endif 649 700 701 #if LGE_WVSO_A0119 702 m_bUseWVSO = m_bUseVSO && m_bUseWVSO && m_bUsingDepthMaps; 703 #endif 650 704 xCleanUpVectors(); 651 705 … … 1107 1161 } 1108 1162 xConfirmPara( bErrorIvpEnhV, "Invalid inter-view coding structure for enhancement views given" ); 1163 1164 #if VSP_CFG 1165 // validate vsp refs 1166 Bool bErrorVspEnhV = false; 1167 if( m_iNumberOfViews > 1 ) 1168 { 1169 for( Int k = 1; k < m_iNumberOfViews; k++ ) 1170 { 1171 for( Int i = 0; i < MAX_GOP+1; i++ ) 1172 { 1173 if( m_GOPListsMvc[k][i].m_numVSPRefPics < 0 || m_GOPListsMvc[k][i].m_numVSPRefPics > 1 ) 1174 { 1175 printf( "\nError: m_numVSPRefPics < 0 or m_numVSPRefPics > 1 \n" ); 1176 bErrorVspEnhV = true; 1177 } 1178 1179 for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics; j++ ) 1180 { 1181 Int iAbsViewId = m_GOPListsMvc[k][i].m_VSPRefPics[j] + k; 1182 if( iAbsViewId != 0 ) 1183 { 1184 printf( "\nError: VSP is allowed to reference only base view\n" ); 1185 bErrorVspEnhV = true; 1186 } 1187 if( m_GOPListsMvc[k][i].m_sliceType == 'P' && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 ) 1188 { 1189 printf( "\nError: m_sliceType == P and m_VSPRefPosL1 != 0\n" ); 1190 bErrorVspEnhV = true; 1191 } 1192 } 1193 1194 for( Int j = 0; j < m_GOPListsMvc[k][i].m_numVSPRefPics || j < m_GOPListsMvc[k][i].m_numInterViewRefPics; j++ ) 1195 { 1196 if( (m_GOPListsMvc[k][i].m_VSPRefPosL0[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL0[j] == m_GOPListsMvc[k][i].m_interViewRefPosL0[j]) 1197 || (m_GOPListsMvc[k][i].m_VSPRefPosL1[j] != 0 && m_GOPListsMvc[k][i].m_VSPRefPosL1[j] == m_GOPListsMvc[k][i].m_interViewRefPosL1[j]) ) 1198 { 1199 printf( "\nError: vsp_ref_list_pos[%d] == IV ref list pos[%d]\n", j, j ); 1200 bErrorVspEnhV = true; 1201 } 1202 } 1203 } 1204 } 1205 } 1206 xConfirmPara( bErrorVspEnhV, "Invalid VSP coding structure for enhancement views given" ); 1207 #endif 1109 1208 1110 1209 // validate temporal coding structure … … 1692 1791 #if HHI_VSO 1693 1792 printf("VSO:%d ", m_bUseVSO ); 1694 #endif 1793 #endif 1794 #if LGE_WVSO_A0119 1795 printf("WVSO:%d ", m_bUseWVSO ); 1796 #endif 1797 #if OL_DEPTHLIMIT_A0044 1798 printf("DPL:%d ", m_bDepthPartitionLimiting); 1799 #endif 1695 1800 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1696 1801 printf("DMM:%d ", m_bUseDMM ); … … 1698 1803 #if HHI_MPI 1699 1804 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1805 #endif 1806 #if LGE_WVSO_A0119 1807 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1700 1808 #endif 1701 1809 printf("\n\n"); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.h
r102 r193 297 297 Bool m_bUseEstimatedVSD; ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 298 298 #endif 299 #if LGE_WVSO_A0119 300 Bool m_bUseWVSO; ///< flag for using View Synthesis Optimization 301 Int m_iVSOWeight; 302 Int m_iVSDWeight; 303 Int m_iDWeight; 304 #endif 305 #if VSP_N 306 Bool m_bUseVSP; 307 Bool m_bVSPDepthDisable; 308 #endif 299 309 300 310 // coding tools (depth intra modes) 301 311 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 302 312 Bool m_bUseDMM; ///< flag for using DMM 313 #endif 314 315 #if OL_DEPTHLIMIT_A0044 316 Bool m_bDepthPartitionLimiting; 303 317 #endif 304 318 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r166 r193 207 207 m_acTEncTopList[iViewIdx]->setUseEstimatedVSD ( false ); 208 208 #endif 209 #if LGE_WVSO_A0119 210 m_acTEncTopList[iViewIdx]->setUseWVSO ( false ); 211 #endif 209 212 #endif 210 213 … … 361 364 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 362 365 #endif 366 #if OL_DEPTHLIMIT_A0044 367 m_acTEncTopList[iViewIdx]->setUseDPL ( false ); 368 #endif 363 369 #if HHI_MPI 364 370 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 371 #endif 372 373 #if VSP_N 374 m_acTEncTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 375 m_acTEncTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 365 376 #endif 366 377 } … … 524 535 m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD ( m_bUseEstimatedVSD ); 525 536 #endif 537 #if LGE_WVSO_A0119 538 m_acTEncDepthTopList[iViewIdx]->setUseWVSO ( m_bUseWVSO ); 539 #endif 526 540 #endif 527 541 … … 634 648 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 635 649 #endif 650 #if OL_DEPTHLIMIT_A0044 651 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 652 #endif 636 653 #if HHI_MPI 637 654 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 655 #endif 656 657 #if VSP_N 658 m_acTEncDepthTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 659 m_acTEncDepthTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 638 660 #endif 639 661 } … … 690 712 AOT(true); 691 713 } 714 #if LGE_WVSO_A0119 715 for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ ) 716 { 717 for (Int iContent = 0; iContent < 2; iContent++ ) 718 { 719 TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum]; 720 pcEncTop->setUseWVSO ( m_bUseWVSO ); 721 pcEncTop->setVSOWeight( m_iVSOWeight ); 722 pcEncTop->setVSDWeight( m_iVSDWeight ); 723 pcEncTop->setDWeight ( m_iDWeight ); 724 } 725 } 726 #endif 692 727 } 693 728 #endif … … 938 973 iNumEncoded = 0; 939 974 940 #if VSP_SLICE_HEADER 941 m_acTEncTopList [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );942 m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) );975 #if VSP_SLICE_HEADER && !VSP_CFG 976 if( m_acTEncTopList [iViewIdx]->getUseVSP() ) m_acTEncTopList [iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 977 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 943 978 #endif 944 979 … … 963 998 #if VSP_SLICE_HEADER 964 999 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) 1000 if( !m_acTEncDepthTopList[iViewIdx]->getVSPDepthDisable() ) 965 1001 #endif 966 1002 xStoreVSPInBuffer(m_acTEncDepthTopList[iViewIdx]->getVSPBuf(), m_acTEncDepthTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, true, gopId); … … 1003 1039 delete pcDepthPicYuvOrg; 1004 1040 pcDepthPicYuvOrg = NULL; 1041 1042 #if FIX_MEM_LEAKS 1043 if ( pcPdmDepthOrg != NULL ) 1044 { 1045 pcPdmDepthOrg->destroy(); 1046 delete pcPdmDepthOrg; 1047 pcPdmDepthOrg = NULL; 1048 }; 1049 #endif 1050 1005 1051 1006 1052 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1263 1309 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1264 1310 { 1311 #if FIX_VSO_SETUP 1312 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1313 #else 1265 1314 m_cRendererModel.setHorOffset( iHorOffset ); 1315 #endif 1266 1316 #else 1267 1317 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent ) … … 1410 1460 { 1411 1461 //first view does not have VSP 1412 #if VSP_TEXT_ONLY1413 if((iCodedViewIdx == 0)||(bDepth))1414 #else1415 1462 if((iCodedViewIdx == 0)) 1416 #endif1417 1463 return; 1418 1464 … … 1439 1485 } 1440 1486 pcPicVSP->getSlice(0)->setPOC( iCurPoc ); 1441 1442 Int iNeighborViewId = 0; 1487 pcPicVSP->getSlice(0)->setViewId( iCodedViewIdx ); 1488 1489 Int iNeighborViewId = 0; //iCodedViewIdx + m_GOPListsMvc[iCodedViewIdx][gopId].m_VSPRefPics[0]; 1443 1490 Bool bRenderFromLeft; 1444 1491 //check if the neighboring view is situated to the left of the current view -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
r101 r193 533 533 534 534 #if HHI_VSO_SPEEDUP_A0033 535 #if FIX_VSO_SETUP 536 cCurModel.setupPart( 0, m_iSourceHeight ); 537 #else 535 538 cCurModel.setHorOffset( 0 ); 539 #endif 536 540 #endif 537 541 … … 710 714 AOT( m_iLog2SamplingFactor != 0 ); 711 715 #if HHI_VSO_SPEEDUP_A0033 716 #if FIX_VSO_SETUP 717 cCurModel.setupPart( 0, m_iSourceHeight ); 718 #else 712 719 cCurModel.setHorOffset( 0 ); 720 #endif 713 721 #endif 714 722 #if LGE_VSO_EARLY_SKIP_A0093 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/CommonDef.h
r166 r193 58 58 59 59 #define HM_VERSION "6.1" 60 #define NV_VERSION "4. 0.1"///< Current software version60 #define NV_VERSION "4.1" ///< Current software version 61 61 62 62 // ==================================================================================================================== -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r166 r193 76 76 if( ucVspMergePos == VSP_MERGE_POS ) 77 77 { 78 #if VSP_TEXT_ONLY 79 if( !getSlice()->getSPS()->isDepth() ) 78 #if VSP_CFG 79 if( getSlice()->getSPS()->getVspDepthPresentFlag() || !getSlice()->getSPS()->isDepth() ) 80 #else 81 if( !getSlice()->getVspDepthDisableFlag() || !getSlice()->getSPS()->isDepth() ) 80 82 #endif 81 83 if( getSlice()->getSPS()->getViewId()!=0 && !bVspMvZeroDone ) … … 150 152 m_pcTrCoeffCr = NULL; 151 153 #if ADAPTIVE_QP_SELECTION 154 #if FIX_MEM_LEAKS 155 m_ArlCoeffIsAliasedAllocation = false; 152 156 m_pcArlCoeffY = NULL; 153 157 m_pcArlCoeffCb = NULL; 154 158 m_pcArlCoeffCr = NULL; 159 #endif 155 160 #endif 156 161 … … 211 216 m_piEdgeDeltaDC1 = NULL; 212 217 #endif 218 #endif 219 #if OL_DEPTHLIMIT_A0044 220 //add a variable to store the partition information 221 //a 2D array in part_symbol, uidepth format 222 //initialize m_partInfo to OL_END_CU 223 for (Int i=0; i < OL_PART_BUF_SIZE; i++) 224 { 225 for (Int j=0; j < 2; j++) 226 { 227 m_uiPartInfo[i][j] = OL_END_CU; 228 } 229 } 213 230 #endif 214 231 } … … 295 312 m_pcArlCoeffCb = m_pcGlbArlCoeffCb; 296 313 m_pcArlCoeffCr = m_pcGlbArlCoeffCr; 314 #if FIX_MEM_LEAKS 315 m_ArlCoeffIsAliasedAllocation = true; 316 #endif 297 317 } 298 318 else … … 410 430 if ( m_pcTrCoeffCr ) { xFree(m_pcTrCoeffCr); m_pcTrCoeffCr = NULL; } 411 431 #if ADAPTIVE_QP_SELECTION 432 #if FIX_MEM_LEAKS 433 if (!m_ArlCoeffIsAliasedAllocation) 434 { 435 xFree(m_pcArlCoeffY); m_pcArlCoeffY = 0; 436 xFree(m_pcArlCoeffCb); m_pcArlCoeffCb = 0; 437 xFree(m_pcArlCoeffCr); m_pcArlCoeffCr = 0; 438 } 439 #endif 412 440 if ( m_pcGlbArlCoeffY ) { xFree(m_pcGlbArlCoeffY); m_pcGlbArlCoeffY = NULL; } 413 441 if ( m_pcGlbArlCoeffCb ) { xFree(m_pcGlbArlCoeffCb); m_pcGlbArlCoeffCb = NULL; } … … 516 544 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr ) 517 545 { 546 #if OL_DEPTHLIMIT_A0044 547 TComDataCU* pcCU = pcPic->getCU(iCUAddr); 548 #endif 518 549 519 550 m_pcPic = pcPic; … … 732 763 m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr ); 733 764 } 765 #if OL_DEPTHLIMIT_A0044 766 setPartDumpFlag (pcCU->getPartDumpFlag()); 767 #endif 734 768 } 735 769 … … 1061 1095 memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1062 1096 memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1097 #if OL_DEPTHLIMIT_A0044 1098 setPartDumpFlag (pcCU->getPartDumpFlag()); 1099 #endif 1063 1100 } 1064 1101 … … 2346 2383 #if H0204_QP_PREDICTION 2347 2384 UInt lPartIdx, aPartIdx; 2385 #if FIX_COMP_WARNING_INIT 2386 lPartIdx = 0; 2387 aPartIdx = 0; 2388 #endif 2348 2389 TComDataCU* cULeft = getQpMinCuLeft ( lPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); 2349 2390 TComDataCU* cUAbove = getQpMinCuAbove( aPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); … … 3146 3187 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 3147 3188 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 3148 if(iBestRefIdx >= 0 && getSlice()->getViewId() == getSlice()->getRefViewId(eRefList, iBestRefIdx)) 3189 if(iBestRefIdx >= 0 && getSlice()->getViewId() == getSlice()->getRefViewId(eRefList, iBestRefIdx) 3190 #if VSP_N 3191 && getSlice()->getPOC() != getSlice()->getRefPOC(eRefList, iBestRefIdx) 3192 #endif 3193 ) 3149 3194 iAddResiShift++; 3150 3195 } … … 4614 4659 #endif 4615 4660 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4616 #if VSP_N4617 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4618 #endif4619 4661 { 4620 4662 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4625 4667 { 4626 4668 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4669 #if VSP_N & VSP_BUGFIX 4670 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId); 4671 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) ) 4672 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC()) 4673 #else 4627 4674 if (refViewIdx!= m_pcSlice->getViewId()) 4675 #endif 4628 4676 { 4629 4677 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4643 4691 4644 4692 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4645 #if VSP_N4646 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4647 #endif4648 4693 { 4649 4694 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4654 4699 { 4655 4700 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4701 #if VSP_N & VSP_BUGFIX 4702 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId); 4703 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) ) 4704 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC()) 4705 #else 4656 4706 if (refViewIdx!= m_pcSlice->getViewId()) 4707 #endif 4657 4708 { 4658 4709 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4672 4723 #endif 4673 4724 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4674 #if VSP_N4675 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4676 #endif4677 4725 { 4678 4726 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4683 4731 { 4684 4732 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4733 #if VSP_N & VSP_BUGFIX 4734 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId); 4735 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) ) 4736 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC()) 4737 #else 4685 4738 if (refViewIdx!= m_pcSlice->getViewId()) 4739 #endif 4686 4740 { 4687 4741 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4700 4754 #endif 4701 4755 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4702 #if VSP_N4703 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4704 #endif4705 4756 { 4706 4757 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4711 4762 { 4712 4763 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4764 #if VSP_N & VSP_BUGFIX 4765 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId); 4766 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) ) 4767 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC()) 4768 #else 4713 4769 if (refViewIdx!= m_pcSlice->getViewId()) 4770 #endif 4714 4771 { 4715 4772 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4731 4788 #endif 4732 4789 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4733 #if VSP_N4734 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4735 #endif4736 4790 { 4737 4791 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4742 4796 { 4743 4797 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4798 #if VSP_N & VSP_BUGFIX 4799 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId); 4800 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) ) 4801 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC()) 4802 #else 4744 4803 if (refViewIdx!= m_pcSlice->getViewId()) 4804 #endif 4745 4805 { 4746 4806 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4965 5025 UInt uiLeftPartIdx = uiIdx; 4966 5026 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4967 #if VSP_N4968 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)4969 #endif4970 5027 { 4971 5028 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 4985 5042 return; 4986 5043 } 5044 #if VSP_N & VSP_BUGFIX 5045 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5046 #else 4987 5047 else // MCP 5048 #endif 4988 5049 { 4989 5050 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5006 5067 5007 5068 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5008 #if VSP_N5009 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)5010 #endif5011 5069 { 5012 5070 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 5026 5084 return; 5027 5085 } 5086 #if VSP_N & VSP_BUGFIX 5087 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5088 #else 5028 5089 else // MCP 5090 #endif 5029 5091 { 5030 5092 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5046 5108 #endif 5047 5109 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5048 #if VSP_N5049 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)5050 #endif5051 5110 { 5052 5111 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 5066 5125 return; 5067 5126 } 5068 else // MCP 5127 #if VSP_N & VSP_BUGFIX 5128 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5129 #else 5130 else // MCP 5131 #endif 5069 5132 { 5070 5133 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5086 5149 #endif 5087 5150 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5088 #if VSP_N5089 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)5090 #endif5091 5151 { 5092 5152 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 5106 5166 return; 5107 5167 } 5168 #if VSP_N & VSP_BUGFIX 5169 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5170 #else 5108 5171 else // MCP 5172 #endif 5109 5173 { 5110 5174 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5128 5192 #endif 5129 5193 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5130 #if VSP_N5131 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP)5132 #endif5133 5194 { 5134 5195 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 5148 5209 return; 5149 5210 } 5211 #if VSP_N & VSP_BUGFIX 5212 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5213 #else 5150 5214 else // MCP 5215 #endif 5151 5216 { 5152 5217 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 5753 5818 { 5754 5819 aiRefIdx[iList] = getCUMvField( RefPicList(iList) )->getRefIdx( uiPartIdx ); 5755 if( aiRefIdx[iList] >= 0 && getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP)5820 if( aiRefIdx[iList] >= 0 && isVspRef( RefPicList(iList), aiRefIdx[iList] ) ) 5756 5821 { 5757 5822 iRet |= (iList ? 0x02 : 0x01); // L0=1, L1=2, BI=3 … … 5802 5867 return iRet; 5803 5868 } 5869 5870 Bool TComDataCU::isVspRef ( RefPicList e, Int iRefIdx ) 5871 { 5872 if( iRefIdx < 0 ) return false; 5873 5874 if( getSlice()->getRefPic( e, iRefIdx )->getViewId() == getSlice()->getViewId() 5875 && getSlice()->getRefPic( e, iRefIdx )->getPOC() == getSlice()->getPOC() ) 5876 { 5877 return true; 5878 } 5879 5880 return false; 5881 } 5804 5882 #endif 5805 5883 … … 5866 5944 5867 5945 #if AMVP_VSP_UNAVAILABLE 5868 if( pcTmpCU != NULL && pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU-> getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP)5946 if( pcTmpCU != NULL && pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) 5869 5947 { 5870 5948 return false; … … 5908 5986 return false; 5909 5987 } 5988 #if VSP_N /// 5989 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 5990 return false; 5991 #endif 5910 5992 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 5911 5993 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// … … 6035 6117 6036 6118 #if AMVP_VSP_UNAVAILABLE 6037 if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU-> getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP)6119 if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) 6038 6120 { 6039 6121 return false; … … 6061 6143 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6062 6144 return false; 6145 #if VSP_N /// 6146 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 6147 return false; 6148 #endif 6063 6149 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// 6064 6150 { … … 6084 6170 return false; 6085 6171 } 6172 #if VSP_N /// 6173 if( pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) 6174 return false; 6175 #endif 6086 6176 6087 6177 #if VSP_N 6088 if( pcTmpCU-> getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP)6178 if( pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) 6089 6179 { 6090 6180 bRefVsp = true; … … 6119 6209 return false; 6120 6210 } 6211 #if VSP_N /// 6212 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 6213 return false; 6214 #endif 6121 6215 6122 6216 #if VSP_N 6123 if( pcTmpCU-> getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP)6217 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 6124 6218 { 6125 6219 bRefVsp = true; … … 6161 6255 Int iColViewIdx, iColRefViewIdx; 6162 6256 TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx); 6163 #if VSP_MV_ZERO // shimizu 6257 #if VSP_N 6258 if( pColPic->getSlice(0)->getViewId() == getSlice()->getViewId() && pColPic->getSlice(0)->getPOC() == getSlice()->getPOC() ) 6259 { 6260 return false; 6261 } 6262 #endif 6164 6263 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 6165 6264 iColViewIdx = pColCU->getSlice()->getViewId(); 6166 #if VSP_N 6167 if( iColViewIdx == NUM_VIEW_VSP ) 6168 { 6169 return false; 6170 } 6171 #endif 6172 #else 6173 #if VSP_N 6174 if( pColPic->getSlice(0)->getViewId() == NUM_VIEW_VSP ) 6175 { 6176 return false; 6177 } 6178 #endif 6179 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 6180 iColViewIdx = pColCU->getSlice()->getViewId(); 6181 #endif 6265 6182 6266 6183 6267 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiAbsPartAddr)) … … 6207 6291 iColRefViewIdx = pColCU->getSlice()->getRefPic(eColRefPicList, iColRefIdx)->getViewId(); 6208 6292 #if VSP_N 6209 if( iColRefViewIdx == NUM_VIEW_VSP)6293 if( iColRefViewIdx == pColCU->getSlice()->getViewId() && pColCU->getSlice()->getRefPic(eColRefPicList, iColRefIdx)->getPOC() == pColCU->getSlice()->getPOC() ) 6210 6294 { 6211 6295 continue; … … 6351 6435 // UInt uiColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 6352 6436 UInt uiCurRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId(); 6353 if( uiCurRefViewId == NUM_VIEW_VSP)6437 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() ) 6354 6438 iScale = 4096; 6355 6439 else … … 6368 6452 { 6369 6453 #if VSP_MV_ZERO 6370 if( uiCurRefViewId == NUM_VIEW_VSP)6454 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() ) 6371 6455 rcMv.setZero(); 6372 6456 else … … 6481 6565 return false; 6482 6566 } 6567 #if VSP_N /// 6568 if( isVspRef( eRefPicList, iRefIdx ) ) 6569 { 6570 return false; 6571 } 6572 #endif 6483 6573 6484 6574 // Prefer a vector crossing us. Prefer shortest. … … 6495 6585 } 6496 6586 int iColRefPOC = pColCU->getSlice()->getRefPOC(RefPicList(l), iColRefIdx); 6587 #if VSP_N /// 6588 Bool bColVsp = pColCU->isVspRef( RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0), getSlice()->getColRefIdx() ); 6589 Bool bColRefVsp = pColCU->isVspRef( RefPicList(l), iColRefIdx ); 6590 if( ( bColRefVsp && !bColVsp) || (!bColRefVsp && bColVsp) ) 6591 #endif 6497 6592 if( pColCU->getSlice()->getRefViewId( RefPicList(l), iColRefIdx ) != pColCU->getSlice()->getViewId() ) 6498 6593 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.h
r166 r193 159 159 Int* m_pcArlCoeffCb; ///< ARL coefficient buffer (Cb) 160 160 Int* m_pcArlCoeffCr; ///< ARL coefficient buffer (Cr) 161 #if FIX_MEM_LEAKS 162 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 163 #endif 161 164 162 165 static Int* m_pcGlbArlCoeffY; ///< ARL coefficient buffer (Y) … … 237 240 UInt* m_uiSliceStartCU; ///< Start CU address of current slice 238 241 UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice 242 243 #if OL_DEPTHLIMIT_A0044 244 //add a variable to store the partition information 245 //a 2D array in uidepth, part_symbol format 246 UInt m_uiPartInfo[OL_PART_BUF_SIZE][2]; 247 UInt m_uiPartNum; 248 Bool m_dumpPartInfo; 249 #endif 239 250 240 251 // ------------------------------------------------------------------------------------------------------------------- … … 600 611 601 612 Void compressMV (); 613 614 #if OL_DEPTHLIMIT_A0044 615 Void resetPartInfo () {m_uiPartNum = 0;}; 616 Void incrementPartInfo () {m_uiPartNum ++;}; 617 Void updatePartInfo(UInt uiSymbol, UInt uiDepth) { m_uiPartInfo[m_uiPartNum][0] = uiSymbol; m_uiPartInfo[m_uiPartNum][1] = uiDepth;}; 618 UInt* readPartInfo() { return (UInt*)m_uiPartInfo;}; 619 Void setPartDumpFlag(Bool flag) { m_dumpPartInfo = flag; }; 620 Bool getPartDumpFlag() { return m_dumpPartInfo; }; 621 #endif 602 622 603 623 // ------------------------------------------------------------------------------------------------------------------- … … 665 685 Int isVspMode ( UInt uiPartIdx ); 666 686 Int isVspMode ( UInt uiPartIdx, TComMv cCompMv ); 687 Bool isVspRef ( RefPicList e, Int iRefIdx ); 667 688 #endif 668 689 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r166 r193 743 743 { 744 744 #if VSP_N 745 if( pcSlice->getRefViewId( eRefPicList, iPdmRefIdx ) != NUM_VIEW_VSP)745 if( !pcCU->isVspRef( eRefPicList, iPdmRefIdx ) ) 746 746 #endif 747 747 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC()) … … 846 846 Bool bInterview = ( uiRefViewId < m_uiCurrViewId ); 847 847 #if VSP_N 848 Bool bVsp = ( pcRefPic->getViewId() == NUM_VIEW_VSP);848 Bool bVsp = pcCU->isVspRef( eRefPicList, iRefIdx ); 849 849 AOT( bInterview && bVsp && iRefPoc != pcSlice->getPOC() ); 850 850 AOT( !bInterview && !bVsp && iRefPoc == pcSlice->getPOC() ); … … 947 947 Bool bInterview = ( uiRefViewId < m_uiCurrViewId ); 948 948 #if VSP_N 949 Bool bVsp = ( pcRefPic->getViewId() == NUM_VIEW_VSP);949 Bool bVsp = pcCU->isVspRef( eRefPicList, iRefIdx ); 950 950 AOT( bInterview && bVsp && iRefPoc != pcSlice->getPOC() ); 951 951 AOT( !bInterview && !bVsp && iRefPoc == pcSlice->getPOC() ); … … 1502 1502 Bool bUsesInterViewPrd = ( abCurrIntView[0] || abCurrIntView[1] ); 1503 1503 #if VSP_N 1504 if(( aiCurrRefIdx[0] >= 0 && pcCU-> getSlice()->getRefPic( REF_PIC_LIST_0, aiCurrRefIdx[0] )->getViewId() == NUM_VIEW_VSP) ||1505 ( aiCurrRefIdx[1] >= 0 && pcCU-> getSlice()->getRefPic( REF_PIC_LIST_1, aiCurrRefIdx[1] )->getViewId() == NUM_VIEW_VSP)) {1504 if(( aiCurrRefIdx[0] >= 0 && pcCU->isVspRef( REF_PIC_LIST_0, aiCurrRefIdx[0] ) ) || 1505 ( aiCurrRefIdx[1] >= 0 && pcCU->isVspRef( REF_PIC_LIST_1, aiCurrRefIdx[1] ) )) { 1506 1506 //if refpic is VSP, copy to Original cuurent PDM 1507 1507 TComPicYuv* pcPdm = pcCU->getPic()->getPredDepthMap(); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.cpp
r166 r193 69 69 m_pcResidual = NULL; 70 70 #endif 71 #if DEBUGIMGOUT72 m_acPicYuvDebug = NULL;73 #endif74 71 m_pcPicYuvPred = NULL; 75 72 m_pcPicYuvResi = NULL; … … 102 99 } 103 100 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 104 #if DEBUGIMGOUT 105 m_acPicYuvDebug = new TComPicYuv; m_acPicYuvDebug->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 106 #endif 107 101 108 102 /* there are no SEI messages associated with this picture initially */ 109 103 m_SEIs = NULL; … … 172 166 delete m_pcResidual; 173 167 m_pcResidual = NULL; 174 }175 #endif176 #if DEBUGIMGOUT177 if (m_acPicYuvDebug)178 {179 m_acPicYuvDebug->destroy();180 delete m_acPicYuvDebug;181 m_acPicYuvDebug = NULL;182 168 } 183 169 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.h
r166 r193 91 91 TComPicYuv* m_pcResidual; // residual buffer (coded or inter-view predicted residual) 92 92 #endif 93 #if DEBUGIMGOUT94 TComPicYuv* m_acPicYuvDebug; // debug image95 #endif96 93 97 94 TComPicYuv* m_pcPicYuvPred; // Prediction … … 120 117 Int** m_aaiCodedScale; 121 118 Int** m_aaiCodedOffset; 119 120 #if OL_DEPTHLIMIT_A0044 121 UInt* m_texPartInfo; 122 UInt m_uiTexPartIndex; 123 #endif 122 124 123 125 public: … … 183 185 #if HHI_INTER_VIEW_RESIDUAL_PRED 184 186 TComPicYuv* getResidual() { return m_pcResidual; } 185 #endif186 187 #if DEBUGIMGOUT188 TComPicYuv* getPicYuvRecDbg() { return m_acPicYuvDebug; }189 187 #endif 190 188 … … 262 260 Void removeResidualBuffer (); 263 261 #endif 262 263 #if OL_DEPTHLIMIT_A0044 264 UInt accessPartInfo ( UInt count ) { return m_texPartInfo[m_uiTexPartIndex + count]; }; 265 Void incrementTexPartIndex ( ) { m_uiTexPartIndex += 2; }; 266 UInt getTexPartIndex () { return m_uiTexPartIndex; }; 267 Void setTexPartIndex ( UInt idx ) { m_uiTexPartIndex = idx; }; 268 Void setPartInfo ( UInt* texPart) { m_texPartInfo = texPart; }; 269 #endif 270 264 271 Bool getValidSlice (Int sliceID) {return m_pbValidSlice[sliceID];} 265 272 Int getSliceGranularityForNDBFilter () {return m_sliceGranularityForNDBFilter;} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicSym.cpp
r166 r193 126 126 m_apcTComDataCU = NULL; 127 127 128 129 #if FIX_MEM_LEAKS 130 if( m_apcTComTile ) 131 { 132 for( i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ ) 133 { 134 if ( m_apcTComTile[i] ) delete m_apcTComTile[i]; 135 } 136 } 137 #endif 138 128 139 delete [] m_apcTComTile; 129 140 m_apcTComTile = NULL; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicYuv.h
r166 r193 184 184 Void setChromaTo ( Pel pVal ); 185 185 186 #if DEBUGIMGOUT187 // Degub tools188 public:189 Void colsetToPicYuv ( const UChar ucColor[3], Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );190 Void colsetToPicLuma ( const UChar ucLumaOffCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );191 Void colsetToPicChroma( const UChar ucUCol, const UChar ucVCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );192 Void drawLineToPicYuv ( bool bHor, bool bVer, UInt uiSize, TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );193 #endif194 195 186 };// END CLASS DEFINITION TComPicYuv 196 187 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.h
r166 r193 95 95 Void xPredInterPrdDepthMap ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ); 96 96 #endif 97 97 98 #if DEPTH_MAP_GENERATION 98 99 Void xWeightedAveragePdm ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst, UInt uiSubSampExpX, UInt uiSubSampExpY ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRdCost.h
r100 r193 377 377 Bool m_bUseEstimatedVSD; 378 378 #endif 379 #if LGE_WVSO_A0119 380 Int m_iDWeight; 381 Int m_iVSOWeight; 382 Int m_iVSDWeight; 383 Bool m_bUseWVSO; 384 #endif 379 385 380 386 Bool m_bUseVSO; … … 410 416 Void setVSOMode( UInt uiIn); 411 417 UInt getVSOMode( ) { return m_uiVSOMode; } 412 418 #if LGE_WVSO_A0119 419 Void setUseWVSO ( Bool bIn ) { m_bUseWVSO = bIn; }; 420 Bool getUseWVSO ( ) { return m_bUseWVSO;}; 421 Void setDWeight ( Int iDWeight ) { m_iDWeight = iDWeight; }; 422 Int getDWeight () { return m_iDWeight; }; 423 Void setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; }; 424 Int getVSOWeight () { return m_iVSOWeight; }; 425 Void setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; }; 426 Int getVSDWeight () { return m_iVSDWeight; }; 427 #endif 413 428 #if HHI_VSO_DIST_INT 414 429 Void setAllowNegDist ( Bool bAllowNegDist ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.cpp
r166 r193 112 112 , m_iViewOrderIdx ( 0 ) 113 113 #endif 114 #if VSP_CFG 115 , m_uiNumVspRefPics ( 0 ) 116 #endif 114 117 { 115 118 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = m_aiNumRefIdx[2] = 0; … … 146 149 #if VSP_SLICE_HEADER 147 150 m_bVspFlag = false; 151 #if VSP_CFG 152 memset( m_uiVspRefPos[0], 0, sizeof(UInt)*MAX_NUM_REF_PICS ); 153 memset( m_uiVspRefPos[1], 0, sizeof(UInt)*MAX_NUM_REF_PICS ); 154 #else 155 m_bVspDepthDisableFlag = false; 156 #endif 148 157 #endif 149 158 } … … 195 204 #if VSP_SLICE_HEADER 196 205 m_bVspFlag = false; 206 #if VSP_CFG 207 m_uiNumVspRefPics = 0; 208 memset( m_uiVspRefPos[0], 0, sizeof(UInt)*MAX_NUM_REF_PICS ); 209 memset( m_uiVspRefPos[1], 0, sizeof(UInt)*MAX_NUM_REF_PICS ); 210 #else 211 m_bVspDepthDisableFlag = false; 212 #endif 197 213 #endif 198 214 … … 544 560 } 545 561 562 #if VSP_CFG 563 UInt cIdxTmp; 564 for( cIdx = 0, cIdxTmp = 0; cIdx <= num_ref_idx_l0_active_minus1; cIdx ++ ) 565 #else 546 566 for( cIdx = 0; cIdx <= num_ref_idx_l0_active_minus1; cIdx ++ ) 567 #endif 547 568 { 548 569 #if VSP_N 570 #if VSP_CFG 571 Int iVspRefPos = getVspRefPos(REF_PIC_LIST_0, 0); 572 iVspRefPos = ( iVspRefPos > 0 ? iVspRefPos - 1 : -1 ); 573 if( pcVspPic && iVspRefPos != -1 && cIdx == (iVspRefPos >= num_ref_idx_l0_active_minus1 ? num_ref_idx_l0_active_minus1 : iVspRefPos) ) 574 #else 549 575 if( pcVspPic && cIdx == num_ref_idx_l0_active_minus1 ) 576 #endif 550 577 { 551 578 m_apcRefPicList[0][cIdx] = RefPicSetVspCurr[0]; … … 555 582 } 556 583 else 584 { 585 #if VSP_CFG 586 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdxTmp) ] : refPicListTemp0[cIdxTmp]; 587 cIdxTmp++; 588 #else 557 589 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; 590 #endif 591 } 558 592 #else 559 593 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; … … 567 601 else 568 602 { 603 #if VSP_CFG 604 for( cIdx = 0, cIdxTmp = 0; cIdx <= num_ref_idx_l1_active_minus1; cIdx ++ ) 605 #else 569 606 for( cIdx = 0; cIdx <= num_ref_idx_l1_active_minus1; cIdx ++ ) 607 #endif 570 608 { 571 609 #if VSP_N 610 #if VSP_CFG 611 Int iVspRefPos = getVspRefPos(REF_PIC_LIST_1, 0); 612 iVspRefPos = ( iVspRefPos > 0 ? iVspRefPos - 1 : -1 ); 613 if( pcVspPic && iVspRefPos != -1 && cIdx == (iVspRefPos >= num_ref_idx_l1_active_minus1 ? num_ref_idx_l1_active_minus1 : iVspRefPos) ) 614 #else 572 615 if( pcVspPic && cIdx == num_ref_idx_l1_active_minus1 ) 616 #endif 573 617 { 574 618 m_apcRefPicList[1][cIdx] = RefPicSetVspCurr[0]; … … 578 622 } 579 623 else 624 { 625 #if VSP_CFG 626 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdxTmp) ] : refPicListTemp1[cIdxTmp]; 627 cIdxTmp++; 628 #else 580 629 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; 630 #endif 631 } 581 632 #else 582 633 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; … … 1501 1552 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1502 1553 , m_bUseDMM (false) 1554 #endif 1555 #if OL_DEPTHLIMIT_A0044 1556 , m_bDepthPartitionLimiting (false) 1557 #endif 1558 #if VSP_N 1559 , m_bVspPresentFlag (false) 1560 #if VSP_CFG 1561 , m_bVspDepthPresentFlag (false) 1562 #endif 1503 1563 #endif 1504 1564 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.h
r166 r193 45 45 #include "TComRom.h" 46 46 #include "TComList.h" 47 47 48 //! \ingroup TLibCommon 48 49 //! \{ … … 353 354 #endif 354 355 356 #if OL_DEPTHLIMIT_A0044 357 Bool m_bDepthPartitionLimiting; 358 #endif 359 355 360 #if DEPTH_MAP_GENERATION 356 361 UInt m_uiPredDepthMapGeneration; … … 372 377 #if HHI_INTER_VIEW_RESIDUAL_PRED 373 378 TComResidualGenerator* m_pcResidualGenerator; 379 #endif 380 381 #if VSP_N 382 Bool m_bVspPresentFlag; 383 #if VSP_CFG 384 Bool m_bVspDepthPresentFlag; 385 #endif 374 386 #endif 375 387 … … 618 630 #endif 619 631 632 #if OL_DEPTHLIMIT_A0044 633 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 634 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 635 #endif 636 620 637 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 621 638 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); … … 660 677 Void setResidualGenerator( TComResidualGenerator* pcResidualGenerator ) { m_pcResidualGenerator = pcResidualGenerator; } 661 678 TComResidualGenerator* getResidualGenerator() { return m_pcResidualGenerator; } 679 #endif 680 681 #if VSP_N 682 Void setVspPresentFlag( Bool b ) { m_bVspPresentFlag = b; } 683 Bool getVspPresentFlag() { return m_bVspPresentFlag; } 684 #if VSP_CFG 685 Void setVspDepthPresentFlag( Bool b ) { m_bVspDepthPresentFlag = b; } 686 Bool getVspDepthPresentFlag() { return m_bVspDepthPresentFlag; } 687 #endif 662 688 #endif 663 689 }; … … 1277 1303 #if VSP_SLICE_HEADER 1278 1304 Bool m_bVspFlag; 1305 #if VSP_CFG 1306 UInt m_uiNumVspRefPics; 1307 UInt m_uiVspRefPos[2][MAX_NUM_REF_PICS]; 1308 #else 1309 Bool m_bVspDepthDisableFlag; 1310 #endif 1279 1311 #endif 1280 1312 … … 1584 1616 Void setVspFlag ( Bool val ) { m_bVspFlag = val; } 1585 1617 Bool getVspFlag () { return m_bVspFlag; } 1618 #if VSP_CFG 1619 Void setNumVspRefPics( UInt val ) { m_uiNumVspRefPics = val; } 1620 UInt getNumVspRefPics() { return m_uiNumVspRefPics; } 1621 Void setVspRefPos( UInt dir, UInt idx, UInt val ) { m_uiVspRefPos[dir][idx] = val; } 1622 UInt getVspRefPos( UInt dir, UInt idx ) { return m_uiVspRefPos[dir][idx]; } 1623 #else 1624 Void setVspDepthDisableFlag( Bool val ) { m_bVspDepthDisableFlag = val; } 1625 Bool getVspDepthDisableFlag() { return m_bVspDepthDisableFlag; } 1626 #endif 1586 1627 #endif 1587 1628 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComWedgelet.h
r56 r193 198 198 static UInt xGetSAD16 ( WedgeDistParam* pcDtParam ); 199 199 static UInt xGetSAD32 ( WedgeDistParam* pcDtParam ); 200 //static UInt xGetSAD64 ( WedgeDistParam* pcDtParam );201 200 202 201 static UInt xGetSSE4 ( WedgeDistParam* pcDtParam ); … … 204 203 static UInt xGetSSE16 ( WedgeDistParam* pcDtParam ); 205 204 static UInt xGetSSE32 ( WedgeDistParam* pcDtParam ); 206 //static UInt xGetSSE64 ( WedgeDistParam* pcDtParam );207 205 208 206 };// END CLASS DEFINITION TComWedgeDist -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComYuv.h
r166 r193 213 213 214 214 __inline Pel xClip (Pel x ) { return ( (x < 0) ? 0 : (x > (Pel)g_uiIBDI_MAX) ? (Pel)g_uiIBDI_MAX : x ); } 215 216 #if DEBUGIMGOUT217 public:218 Void colsetToPicYuv ( const UChar ucColor[3], Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );219 Void colsetToPicLuma ( const UChar ucLumaOffCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );220 Void colsetToPicChroma( const UChar ucUCol, const UChar ucVCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );221 Void drawLineToPicYuv ( bool bHor, bool bVer, UInt uiSize, TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 );222 #endif223 224 215 };// END CLASS DEFINITION TComYuv 225 216 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TypeDef.h
r166 r193 44 44 #define VSP_N 1 45 45 #if VSP_N 46 #define VSP_TEXT_ONLY 1 47 #define NUM_VIEW_VSP 99 46 #define VSP_BUGFIX 1 48 47 #define VSP_N_DUMP 0 49 48 #define FORCE_REF_VSP 2 // 0=NotUseVSPSKIP 1:VSPSKIPforFlag 2:VSPSKIPforMergeIdx 50 #define VSP_MV_ZERO 0// use zero vector for VSP49 #define VSP_MV_ZERO 1 // use zero vector for VSP 51 50 #if VSP_MV_ZERO 52 51 #define AMVP_VSP_UNAVAILABLE 1 … … 54 53 #define VSP_MERGE_POS 5 // position of vsp in merge list (0..5) 55 54 #define NTT_SUBPEL 1 56 #endif 57 #define DEBUGIMGOUT 0 //Debug YUVImage Out 58 #define DEBUGLOGOUT 0 //Debug Log Out 55 #define VSP_CFG 1 56 #endif 59 57 60 58 #define VSP_SLICE_HEADER 1 59 #if !VSP_CFG 61 60 #define VSP_FRAME_INTERVAL 2 61 #endif 62 62 63 63 #define FIXES 1 … … 66 66 #define FIX_INIT_ROM 1 67 67 #define FIX_VIRT_DESTRUCTOR 1 68 #define FIX_DBL_CONTROL_DEFAULT 1 68 #define FIX_MEM_LEAKS 1 69 #define FIX_VSO_SETUP 1 70 #define FIX_COMP_WARNING_INIT 1 69 71 #define FIX_RDO_MACRO 1 70 72 #define FIX_LG_RESTRICTEDRESPRED_M24766 1 73 #define FIX_REMOVE_TILE_DEPENDENCE 1 74 #define FIX_DBL_CONTROL_DEFAULT 1 71 75 72 76 … … 116 120 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 117 121 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT2-A0093 modification 4 118 122 #define LGE_WVSO_A0119 1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term 123 124 #define OL_DEPTHLIMIT_A0044 1 //JCT2-A0044 125 #if OL_DEPTHLIMIT_A0044 126 #define OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1 //Turn this on to not perform depth limiting for I-SLICES. 127 #define OL_END_CU MAX_INT //Default for initializing the partition information buffer 128 #define OL_PART_BUF_SIZE 86 //maximum number of possible partition bits in a CU 129 #endif 119 130 120 131 #define HHI_INTERVIEW_SKIP 1 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r166 r193 1757 1757 } 1758 1758 } 1759 #if VSP_N 1760 if( pcSPS->getViewId() ) 1761 { 1762 READ_FLAG( uiCode, "vsp_present_flag" ); 1763 pcSPS->setVspPresentFlag( (Bool)uiCode ); 1764 #if VSP_CFG 1765 if( pcSPS->getVspPresentFlag() ) 1766 { 1767 READ_FLAG( uiCode, "vsp_depth_present_flag" ); 1768 pcSPS->setVspDepthPresentFlag( (Bool)uiCode ); 1769 } 1770 #endif 1771 } 1772 #endif 1759 1773 READ_FLAG( uiCode, "sps_extension2_flag"); 1760 1774 if (uiCode) … … 1781 1795 UInt uiCode; 1782 1796 Int iCode; 1783 1797 #if VSP_CFG 1798 Int iNumOfVspRefsL0 = 0; 1799 Int iNumOfVspRefsL1 = 0; 1800 #endif 1784 1801 #if ENC_DEC_TRACE 1785 1802 xTraceSliceHeader(rpcSlice); … … 2006 2023 READ_UVLC ( uiCode, "aps_id" ); rpcSlice->setAPSId(uiCode); 2007 2024 } 2025 2026 #if VSP_SLICE_HEADER && VSP_CFG 2027 if( rpcSlice->getSPS()->getViewId()!=0 2028 && rpcSlice->getSliceType() != I_SLICE 2029 && rpcSlice->getSPS()->getVspPresentFlag() 2030 ) 2031 { 2032 if( !rpcSlice->getSPS()->isDepth() || rpcSlice->getSPS()->getVspDepthPresentFlag() ) 2033 { 2034 READ_UVLC( uiCode, "num_vsp_ref_pics"); 2035 rpcSlice->setVspFlag( uiCode > 0 ? true : false ); 2036 rpcSlice->setNumVspRefPics( uiCode ); 2037 //printf("SH:num_vsp_ref_pics(%d)\n",uiCode); 2038 for( UInt i = 0; i < rpcSlice->getNumVspRefPics(); i++ ) 2039 { 2040 READ_UVLC( uiCode, "vsp_ref_list0_pos"); 2041 rpcSlice->setVspRefPos( REF_PIC_LIST_0, i, uiCode ); 2042 //printf("SH:vsp_ref_list0_pos(%d)\n",uiCode); 2043 if( rpcSlice->getSliceType() == B_SLICE ) 2044 { 2045 READ_UVLC( uiCode, "vsp_ref_list1_pos"); 2046 rpcSlice->setVspRefPos( REF_PIC_LIST_1, i, uiCode ); 2047 //printf("SH:vsp_ref_list1_pos(%d)\n",uiCode); 2048 } 2049 } 2050 iNumOfVspRefsL0 = ( (rpcSlice->getSPS()->getViewId()==0 2051 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2052 || !rpcSlice->getVspFlag() 2053 || rpcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 ); 2054 iNumOfVspRefsL1 = ( (rpcSlice->getSPS()->getViewId()==0 2055 || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth()) 2056 || !rpcSlice->getVspFlag() 2057 || rpcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 ); 2058 } 2059 } 2060 #endif 2061 2008 2062 if (!rpcSlice->isIntra()) 2009 2063 { … … 2011 2065 if (uiCode) 2012 2066 { 2013 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2067 READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); 2068 #if VSP_CFG 2069 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 + iNumOfVspRefsL0 ); 2070 #else 2071 rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 ); 2072 #endif 2014 2073 if (rpcSlice->isInterB()) 2015 2074 { 2016 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2075 READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); 2076 #if VSP_CFG 2077 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 + iNumOfVspRefsL1 ); 2078 #else 2079 rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 ); 2080 #endif 2017 2081 } 2018 2082 else … … 2183 2247 if(uiCode) 2184 2248 { 2185 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2249 READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" ); 2250 #if VSP_CFG 2251 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 + iNumOfVspRefsL0 ); 2252 #else 2253 rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 ); 2254 #endif 2186 2255 2187 2256 #if H0412_REF_PIC_LIST_RESTRICTION … … 2348 2417 #endif 2349 2418 2419 #if !VSP_CFG 2350 2420 #if VSP_SLICE_HEADER 2351 2421 if( rpcSlice->getSPS()->getViewId()!=0 2352 #if VSP_TEXT_ONLY 2353 && !(rpcSlice->getSPS()->isDepth()) 2354 #endif 2422 && rpcSlice->getSPS()->getVspPresentFlag() 2355 2423 ) 2356 2424 { 2357 2425 READ_FLAG( uiCode, "vsp_flag" ); 2358 2426 rpcSlice->setVspFlag( uiCode ? true : false ); 2359 } 2427 if( rpcSlice->getVspFlag() ) 2428 { 2429 READ_FLAG( uiCode, "vsp_depth_disable_flag" ); 2430 rpcSlice->setVspDepthDisableFlag( uiCode ? true : false ); 2431 } 2432 } 2433 #endif 2360 2434 #endif 2361 2435 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r166 r193 351 351 #if FORCE_REF_VSP==1 352 352 if( pcCU->isSkipped(uiAbsPartIdx) && pcCU->getSlice()->getViewId() != 0 ) 353 #if VSP_TEXT_ONLY 354 if( !pcCU->getSlice()->getSPS()->isDepth() ) 353 #if VSP_CFG 354 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 355 #else 356 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 355 357 #endif 356 358 { … … 385 387 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 386 388 { 387 #if DEBUGLOGOUT388 PredMode eOrgPred = pcCU->getPredictionMode( uiAbsPartIdx );389 #endif390 389 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 391 390 pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx ); 392 #if DEBUGLOGOUT393 if( eOrgPred == MODE_SKIP )394 pcCU->setPredModeSubParts( MODE_SKIP, uiAbsPartIdx, uiDepth );395 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );396 #endif397 391 398 392 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1); … … 437 431 #endif 438 432 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 439 #if DEBUGLOGOUT440 #if HHI_MPI441 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )442 #endif443 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );444 #endif445 433 return; 446 434 } … … 472 460 473 461 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 474 #if DEBUGLOGOUT475 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );476 #endif477 462 return; 478 463 } … … 508 493 { 509 494 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 510 #if DEBUGLOGOUT511 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );512 #endif513 495 return; 514 496 } … … 610 592 setdQPFlag( bCodeDQP ); 611 593 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 612 #if DEBUGLOGOUT613 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );614 #endif615 594 } 616 595 … … 710 689 711 690 xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth ); 712 #if DEBUGIMGOUT713 xColsetToPicMerge( m_ppcCU[uiDepth], pcPic->getPicYuvRecDbg(), uiAbsPartIdx, uiDepth );714 #endif715 691 } 716 692 … … 724 700 // inter prediction 725 701 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 702 726 703 #if HHI_MPI 727 704 if( pcCU->getTextureModeDepth( 0 ) != -1 ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.h
r166 r193 46 46 #include "TLibCommon/TComPrediction.h" 47 47 #include "TDecEntropy.h" 48 #if DEBUGIMGOUT || DEBUGLOGOUT49 #include "TLibCommon/DebugLog.h"50 #endif51 48 52 49 //! \ingroup TLibDecoder … … 84 81 virtual ~TDecCu(); 85 82 86 #if DEBUGLOGOUT87 DebugLog m_cDebug;88 #endif89 90 83 /// initialize access channels 91 84 Void init ( TDecEntropy* pcEntropyDecoder, TComTrQuant* pcTrQuant, TComPrediction* pcPrediction ); … … 132 125 Void xFillPCMBuffer (TComDataCU* pCU, UInt absPartIdx, UInt depth); 133 126 #endif 134 #if DEBUGIMGOUT135 Void xColsetToPic ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );136 Void xColsetToPicMerge ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );137 #endif138 127 }; 139 128 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r166 r193 310 310 #if VSP_MV_ZERO 311 311 Int iRefIdx = pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx(uiSubPartIdx); 312 if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && (pcCU->getSlice()->getRefViewId( RefPicList( uiRefListIdx ), iRefIdx ) == NUM_VIEW_VSP) )312 if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU->isVspRef( RefPicList( uiRefListIdx ), iRefIdx ) ) 313 313 { 314 314 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( TComMv(0, 0), pcCU->getPartitionSize( uiSubPartIdx ), uiSubPartIdx, uiDepth, uiPartIdx ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r100 r193 463 463 printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) ); 464 464 } 465 #if VSP_CFG 466 else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) 467 && pcSlice->getPOC() == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) ) 468 { 469 printf( "VS " ); 470 } 471 #endif 465 472 else 466 473 { … … 479 486 printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ); 480 487 } 488 #if VSP_CFG 489 else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) 490 && pcSlice->getPOC() == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ) 491 { 492 printf( "VS " ); 493 } 494 #endif 481 495 else 482 496 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r166 r193 636 636 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 637 637 #if HHI_MPI 638 #if VSP_ TEXT_ONLY638 #if VSP_N 639 639 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 640 640 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, 641 641 pcTextCU ? pcTextCU->getCUMvField( RefPicList(1) )->getRefIdx( uiAbsPartIdx ) : -1 }; 642 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 643 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(0), aiRefIdxVsp[0] ) == NUM_VIEW_VSP ) 644 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(1), aiRefIdxVsp[1] ) == NUM_VIEW_VSP ); 645 #else 646 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 642 #if VSP_CFG 643 const Bool bMVIAvailable = (pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || pcCU->getSlice()->getViewId()==0) 644 ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 645 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 646 && !( aiRefIdxVsp[0] >= pcCU->getSlice()->getNumRefIdx( RefPicList(0) ) ) 647 && !( aiRefIdxVsp[1] >= pcCU->getSlice()->getNumRefIdx( RefPicList(1) ) ); 648 #else 649 const Bool bMVIAvailable = pcCU->getSlice()->getVspDepthDisableFlag() ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 650 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->isVspRef( RefPicList(0), aiRefIdxVsp[0] ) ) 651 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->isVspRef( RefPicList(1), aiRefIdxVsp[1] ) ) 652 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 653 #endif 647 654 #endif 648 655 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.cpp
r166 r193 102 102 rpcPic->setPicYuvResi( 0 ); 103 103 104 #if DEBUGLOGOUT105 char fname[128];106 sprintf(fname, "%sV%02d_%05d%s.csv", "DecLog", rpcPic->getSlice(0)->getViewId(), rpcPic->getPOC(), rpcPic->getSlice(0)->getIsDepth() ? "depth":"text");107 m_pcCuDecoder->m_cDebug.DebugLogFileOpen( fname );108 #endif109 104 #if ENC_DEC_TRACE 110 105 g_bJustDoIt = g_bEncDecTraceEnable; … … 444 439 #endif 445 440 } 446 #if DEBUGLOGOUT447 m_pcCuDecoder->m_cDebug.DebugLogFileClose();448 #endif449 441 450 442 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r166 r193 541 541 } 542 542 #endif 543 544 543 } 545 544 … … 986 985 m_pcPicVSP->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 987 986 m_pcPicVSP->setCurrSliceIdx(0); 988 m_pcPicVSP->getCurrSlice()->setViewId( NUM_VIEW_VSP );989 987 m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); 990 988 m_pcPicVSP->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() ); … … 1013 1011 m_pcPicAvail->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1014 1012 m_pcPicAvail->setCurrSliceIdx(0); 1015 m_pcPicAvail->getCurrSlice()->setViewId( 99 );1016 1013 m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); 1017 1014 m_pcPicAvail->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() ); … … 1302 1299 #if VSP_N 1303 1300 Bool bUseVsp = (m_viewId!=0); 1304 #if VSP_TEXT_ONLY 1305 if( m_isDepth ) bUseVsp = false; 1301 #if VSP_CFG 1302 if( !pcSlice->getSPS()->getVspDepthPresentFlag() && m_isDepth ) bUseVsp = false; 1303 #else 1304 if( pcSlice->getVspDepthDisableFlag() && m_isDepth ) bUseVsp = false; 1306 1305 #endif 1307 1306 #if VSP_SLICE_HEADER … … 1312 1311 if( bUseVsp ) 1313 1312 #endif 1313 { 1314 1314 m_pcPicVSP->getCurrSlice()->setPOC( pcPic->getPOC() ); 1315 m_pcPicVSP->getCurrSlice()->setViewId( pcPic->getViewId() ); 1316 } 1315 1317 1316 1318 pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics, bUseVsp ? m_pcPicVSP : NULL ); … … 1423 1425 if( getTAppDecTop()->getUseDepth() ) 1424 1426 { 1425 getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth ); 1427 #if VSP_CFG 1428 if( pcSlice->getSPS()->getVspDepthPresentFlag() || !m_isDepth ) 1429 #else 1430 if( !pcSlice->getVspDepthDisableFlag() || !m_isDepth ) 1431 #endif 1432 getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth ); 1433 #if VSP_N_DUMP 1434 if( m_pcPicVSP && pcSlice->getViewId() != 0 && pcSlice->getNumRefIdx(REF_PIC_LIST_0)!=0){ 1435 Char acFilenameBase[1024]; 1436 ::sprintf(acFilenameBase,"ref_dec_%sv%d_%04d.yuv",(m_isDepth?"D":"T"),pcSlice->getViewId(), pcSlice->getPOC()); 1437 pcSlice->getRefPic(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)-1)->getPicYuvRec()->dump(acFilenameBase,0); 1438 } 1439 #endif 1426 1440 } 1427 1441 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r166 r193 695 695 WRITE_FLAG( 1, "base_view_flag" ); 696 696 } 697 #if VSP_N 698 if( pcSPS->getViewId() ) 699 { 700 WRITE_FLAG( pcSPS->getVspPresentFlag(), "vsp_present_flag" ); 701 #if VSP_CFG 702 if( pcSPS->getVspPresentFlag() ) 703 { 704 WRITE_FLAG( pcSPS->getVspDepthPresentFlag(), "vsp_depth_present_flag" ); 705 } 706 #endif 707 } 708 #endif 697 709 WRITE_FLAG( 0, "sps_extension2_flag" ); 698 710 } … … 707 719 #if ENC_DEC_TRACE 708 720 xTraceSliceHeader (pcSlice); 721 #endif 722 723 #if VSP_CFG 724 Int iNumOfVspRefsL0 = 0; 725 Int iNumOfVspRefsL1 = 0; 709 726 #endif 710 727 … … 949 966 } 950 967 968 #if VSP_SLICE_HEADER && VSP_CFG 969 if( pcSlice->getSPS()->getViewId()!=0 970 && pcSlice->getSliceType() != I_SLICE 971 && pcSlice->getSPS()->getVspPresentFlag() 972 ) 973 { 974 if( !pcSlice->getSPS()->isDepth() || pcSlice->getSPS()->getVspDepthPresentFlag() ) 975 { 976 WRITE_UVLC( pcSlice->getNumVspRefPics(), "num_vsp_ref_pics"); 977 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 978 { 979 WRITE_UVLC( pcSlice->getVspRefPos( REF_PIC_LIST_0, i ), "vsp_ref_list0_pos"); 980 if( pcSlice->getSliceType() == B_SLICE ) 981 { 982 WRITE_UVLC( pcSlice->getVspRefPos( REF_PIC_LIST_1, i ), "vsp_ref_list1_pos"); 983 } 984 } 985 iNumOfVspRefsL0 = ( (pcSlice->getSPS()->getViewId()==0 986 || (!pcSlice->getSPS()->getVspDepthPresentFlag() && pcSlice->getSPS()->isDepth()) 987 || !pcSlice->getVspFlag() 988 || pcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 ); 989 iNumOfVspRefsL1 = ( (pcSlice->getSPS()->getViewId()==0 990 || (!pcSlice->getSPS()->getVspDepthPresentFlag() && pcSlice->getSPS()->isDepth()) 991 || !pcSlice->getVspFlag() 992 || pcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 ); 993 } 994 } 995 #endif 996 951 997 // we always set num_ref_idx_active_override_flag equal to one. this might be done in a more intelligent way 952 998 if (!pcSlice->isIntra()) 953 999 { 954 1000 WRITE_FLAG( 1 , "num_ref_idx_active_override_flag"); 1001 #if VSP_CFG 1002 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1 - iNumOfVspRefsL0, 3, "num_ref_idx_l0_active_minus1" ); 1003 #else 955 1004 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_0 ) - 1, 3, "num_ref_idx_l0_active_minus1" ); 1005 #endif 956 1006 } 957 1007 else … … 961 1011 if (pcSlice->isInterB()) 962 1012 { 1013 #if VSP_CFG 1014 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1 - iNumOfVspRefsL1, 3, "num_ref_idx_l1_active_minus1" ); 1015 #else 963 1016 WRITE_CODE( pcSlice->getNumRefIdx( REF_PIC_LIST_1 ) - 1, 3, "num_ref_idx_l1_active_minus1" ); 1017 #endif 964 1018 } 965 1019 else … … 1050 1104 if(pcSlice->getRefPicListCombinationFlag()) 1051 1105 { 1106 #if VSP_CFG 1107 WRITE_UVLC( pcSlice->getNumRefIdx(REF_PIC_LIST_C) - 1 - iNumOfVspRefsL0, "num_ref_idx lc_active_minus1"); 1108 #else 1052 1109 WRITE_UVLC( pcSlice->getNumRefIdx(REF_PIC_LIST_C) - 1, "num_ref_idx lc_active_minus1"); 1110 #endif 1053 1111 1054 1112 #if H0412_REF_PIC_LIST_RESTRICTION … … 1180 1238 #endif 1181 1239 1240 #if !VSP_CFG 1182 1241 #if VSP_SLICE_HEADER 1183 1242 if( pcSlice->getSPS()->getViewId()!=0 1184 #if VSP_TEXT_ONLY 1185 && !(pcSlice->getSPS()->isDepth()) 1186 #endif 1243 && pcSlice->getSPS()->getVspPresentFlag() 1187 1244 ) 1188 1245 { 1189 1246 WRITE_FLAG( pcSlice->getVspFlag()?1:0, "vsp_flag" ); 1190 1247 // printf("[VSP: %d] ", pcSlice->getVspFlag()?1:0); 1191 } 1192 #endif 1193 1248 if( pcSlice->getVspFlag() ) 1249 { 1250 WRITE_FLAG( pcSlice->getVspDepthDisableFlag()?1:0 , "vsp_depth_disable_flag" ); 1251 } 1252 } 1253 #endif 1254 #endif 1194 1255 } 1195 1256 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCfg.h
r100 r193 67 67 Int m_interViewRefPosL0[MAX_NUM_REF_PICS]; 68 68 Int m_interViewRefPosL1[MAX_NUM_REF_PICS]; 69 #if VSP_CFG 70 Int m_numVSPRefPics; 71 Int m_VSPRefPics[MAX_NUM_REF_PICS]; 72 Int m_VSPRefPosL0[MAX_NUM_REF_PICS]; 73 Int m_VSPRefPosL1[MAX_NUM_REF_PICS]; 74 #endif 69 75 GOPEntryMvc() 70 76 : m_POC(-1) … … 81 87 , m_numRefIdc() 82 88 , m_numInterViewRefPics() 89 #if VSP_CFG 90 , m_numVSPRefPics() 91 #endif 83 92 { 84 93 ::memset( m_referencePics, 0, sizeof(m_referencePics) ); … … 88 97 ::memset( m_interViewRefPosL0, 0, sizeof(m_interViewRefPosL0) ); 89 98 ::memset( m_interViewRefPosL1, 0, sizeof(m_interViewRefPosL1) ); 99 #if VSP_CFG 100 ::memset( m_VSPRefPics, 0, sizeof(m_VSPRefPics) ); 101 ::memset( m_VSPRefPosL0, 0, sizeof(m_VSPRefPosL0) ); 102 ::memset( m_VSPRefPosL1, 0, sizeof(m_VSPRefPosL1) ); 103 #endif 90 104 } 91 105 }; … … 204 218 Double m_dLambdaScaleVSO; 205 219 UInt m_uiVSOMode; 220 #if LGE_WVSO_A0119 221 Bool m_bUseWVSO; 222 Int m_iVSOWeight; 223 Int m_iVSDWeight; 224 Int m_iDWeight; 225 #endif 206 226 #endif 207 227 #if SAIT_VSO_EST_A0033 … … 210 230 #endif 211 231 232 #if VSP_SLICE_HEADER 233 Bool m_bUseVSP; 234 Bool m_bVSPDepthDisable; 235 #endif 212 236 213 237 //====== Tool list ======== … … 266 290 Int m_iColumnRowInfoPresent; 267 291 Int m_iUniformSpacingIdr; 292 #if FIX_REMOVE_TILE_DEPENDENCE 293 #else 268 294 Int m_iTileBoundaryIndependenceIdr; 295 #endif 269 296 Int m_iNumColumnsMinus1; 270 297 UInt* m_puiColumnWidth; … … 281 308 Int m_iWaveFrontSubstreams; 282 309 283 boolm_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling310 Bool m_pictureDigestEnabled; ///< enable(1)/disable(0) md5 computation and SEI signalling 284 311 285 312 //====== Weighted Prediction ======== … … 309 336 #endif 310 337 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 311 Bool m_bUseDMM; 338 Bool m_bUseDMM; 339 #endif 340 341 #if OL_DEPTHLIMIT_A0044 342 Bool m_bDepthPartitionLimiting; 312 343 #endif 313 344 … … 466 497 Void setAllowNegDist ( Bool b ) { m_bAllowNegDist = b; }; 467 498 #endif 499 #if LGE_WVSO_A0119 500 Void setUseWVSO ( Bool b ) { m_bUseWVSO = b; } 501 Void setVSOWeight ( Int i ) { m_iVSOWeight = i; } 502 Void setVSDWeight ( Int i ) { m_iVSDWeight = i; } 503 Void setDWeight ( Int i ) { m_iDWeight = i; } 504 #endif 468 505 #endif 469 506 … … 546 583 Bool getAllowNegDist () { return m_bAllowNegDist; } 547 584 #endif 585 #if LGE_WVSO_A0119 586 Bool getUseWVSO () { return m_bUseWVSO; } 587 Int getVSOWeight () { return m_iVSOWeight; } 588 Int getVSDWeight () { return m_iVSDWeight; } 589 Int getDWeight () { return m_iDWeight; } 590 #endif 548 591 #endif 549 592 … … 571 614 #if HHI_VSO 572 615 Void setUseVSO ( Bool b ) { m_bUseVSO = b; } 616 #endif 617 618 #if VSP_SLICE_HEADER 619 Void setUseVSP ( Bool b ) { m_bUseVSP = b; } 620 Void setVSPDepthDisable ( Bool b ) { m_bVSPDepthDisable = b; } 573 621 #endif 574 622 … … 623 671 #endif 624 672 673 #if VSP_SLICE_HEADER 674 Bool getUseVSP () { return m_bUseVSP; } 675 Bool getVSPDepthDisable () { return m_bVSPDepthDisable; } 676 #endif 677 625 678 Bool getUseFastEnc () { return m_bUseFastEnc; } 626 679 Bool getUseEarlyCU () { return m_bUseEarlyCU; } … … 657 710 Void setSliceGranularity ( Int i ) { m_iSliceGranularity = i; } 658 711 Int getSliceGranularity () { return m_iSliceGranularity; } 659 Void setLFCrossSliceBoundaryFlag( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; }660 Bool getLFCrossSliceBoundaryFlag() { return m_bLFCrossSliceBoundaryFlag; }712 Void setLFCrossSliceBoundaryFlag ( Bool bValue ) { m_bLFCrossSliceBoundaryFlag = bValue; } 713 Bool getLFCrossSliceBoundaryFlag () { return m_bLFCrossSliceBoundaryFlag; } 661 714 662 715 #if HHI_MPI 663 Void setUseMVI (Bool bVal){m_bUseMVI = bVal;}664 #endif 665 Void setUseSAO (Bool bVal){m_bUseSAO = bVal;}666 Bool getUseSAO() {return m_bUseSAO;}716 Void setUseMVI ( Bool bVal ) {m_bUseMVI = bVal;} 717 #endif 718 Void setUseSAO ( Bool bVal ) {m_bUseSAO = bVal;} 719 Bool getUseSAO () {return m_bUseSAO;} 667 720 #if SAO_UNIT_INTERLEAVING 668 721 Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } … … 795 848 796 849 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 797 Void setUseDMM( Bool b) { m_bUseDMM = b; } 798 Bool getUseDMM() { return m_bUseDMM; } 850 Void setUseDMM( Bool b) { m_bUseDMM = b; } 851 Bool getUseDMM() { return m_bUseDMM; } 852 #endif 853 854 #if OL_DEPTHLIMIT_A0044 855 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 856 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 799 857 #endif 800 858 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r166 r193 451 451 TComPic* pcPic = rpcBestCU->getPic(); 452 452 453 #if OL_DEPTHLIMIT_A0044 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 TComPic *pcTexture; 456 TComDataCU * pcTextureCU; 457 Bool depthMapDetect = false; 458 //UInt uiPrevTexPartIndex = 0; 459 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 460 Bool bIntraSliceDetect = false; 461 #endif 462 Bool bTry2NxN = false; 463 Bool bTryNx2N = false; 464 pcTexture = rpcBestCU->getSlice()->getTexturePic(); 465 if(pcTexture != NULL) //depth map being encoded 466 { 467 depthMapDetect = true; 468 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 469 bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType()==I_SLICE); 470 #endif 471 if(uiDepth == 0) 472 { 473 pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); 474 pcTexture->setPartInfo(pcTextureCU->readPartInfo()); 475 pcTexture->setTexPartIndex(0); 476 } 477 } 478 else 479 { 480 depthMapDetect = false; 481 } 482 #endif 453 483 // get Original YUV data from picture 454 484 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 455 485 #if FORCE_REF_VSP 456 //Bool bWholeCUCanBeSynthesized = false;486 Bool bWholeCUCanBeSynthesized = false; 457 487 //Bool bOneSubCUCanNotBeSynthesied = false; 458 488 Bool bSubCUCanBeSynthesized[4]; … … 476 506 if(iSubCUCanBeSynthesizedCnt == 4) 477 507 { 478 //bWholeCUCanBeSynthesized = true;508 bWholeCUCanBeSynthesized = true; 479 509 } 480 510 //else if(iSubCUCanBeSynthesizedCnt == 3) … … 488 518 // variables for fast encoder decision 489 519 Bool bEarlySkip = false; 490 Bool bTrySplit 520 Bool bTrySplit = true; 491 521 Double fRD_Skip = MAX_DOUBLE; 492 522 … … 499 529 Bool bTrySplitDQP = true; 500 530 501 static Double afCost [ MAX_CU_DEPTH ];531 static Double afCost [ MAX_CU_DEPTH ]; 502 532 static Int aiNum [ MAX_CU_DEPTH ]; 503 533 … … 581 611 isAddLowestQP = true; 582 612 iMinQP = iMinQP - 1; 583 613 584 614 } 585 615 #endif … … 624 654 625 655 rpcTempCU->initEstData( uiDepth, iQP ); 656 657 #if OL_DEPTHLIMIT_A0044 658 //logic for setting bTrySplit using the partition information that is stored of the texture colocated CU 659 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 660 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 661 #else 662 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 663 #endif 664 { 665 assert(uiDepth == pcTexture->accessPartInfo(1)); 666 if(pcTexture->accessPartInfo(0) == 1) //NxN modes 667 { 668 bTrySplit = true; 669 bTryNx2N = true; 670 bTry2NxN = true; 671 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 672 pcTexture->incrementTexPartIndex(); 673 } 674 else if(pcTexture->accessPartInfo(0) == 0) //2Nx2N modes 675 { 676 UInt uiTexdepth; 677 UInt temp_uiTexPartIndex; 678 bTrySplit = false; 679 680 //scan ahead till next depth 681 uiTexdepth = pcTexture->accessPartInfo(1); 682 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 683 pcTexture->incrementTexPartIndex(); 684 temp_uiTexPartIndex = pcTexture->getTexPartIndex(); //store in case to rewind 685 686 while(uiTexdepth != pcTexture->accessPartInfo(1) && uiTexdepth != 0) 687 { 688 if(pcTexture->accessPartInfo(1) < uiTexdepth) 689 { 690 break; 691 } 692 pcTexture->incrementTexPartIndex(); 693 694 if(pcTexture->accessPartInfo(1) == OL_END_CU) 695 { 696 pcTexture->setTexPartIndex(temp_uiTexPartIndex); 697 uiTexdepth++; 698 if(uiTexdepth >= g_uiMaxCUDepth) 699 { 700 break; 701 } 702 } 703 } 704 } 705 else if(pcTexture->accessPartInfo(0) == OL_END_CU) 706 { 707 bTrySplit = false; 708 bTryNx2N = false; 709 bTry2NxN = false; 710 } 711 else if(pcTexture->accessPartInfo(0) == 2) //2NxN case 712 { 713 bTrySplit = false; 714 bTryNx2N = false; 715 bTry2NxN = true; 716 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 717 pcTexture->incrementTexPartIndex(); ; 718 } 719 else if(pcTexture->accessPartInfo(0) == 3) //Nx2N case 720 { 721 bTrySplit = false; 722 bTryNx2N = true; 723 bTry2NxN = false; 724 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 725 pcTexture->incrementTexPartIndex(); ; 726 } 727 } 728 #endif 729 626 730 627 731 // do inter modes, SKIP and 2Nx2N … … 648 752 #endif 649 753 #if HHI_INTER_VIEW_RESIDUAL_PRED 650 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 651 #endif 652 // SKIP 653 #if HHI_INTERVIEW_SKIP 654 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 655 #else 656 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 657 #endif 658 rpcTempCU->initEstData( uiDepth, iQP ); 659 660 // fast encoder decision for early skip 661 if ( m_pcEncCfg->getUseFastEnc() ) 754 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 755 #endif 756 // SKIP 757 #if HHI_INTERVIEW_SKIP 758 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 759 #else 760 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 761 #endif 762 rpcTempCU->initEstData( uiDepth, iQP ); 763 764 // fast encoder decision for early skip 765 if ( m_pcEncCfg->getUseFastEnc() ) 766 { 767 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 768 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 769 { 770 bEarlySkip = true; 771 bTrySplit = false; 772 } 773 } 774 775 // 2Nx2N, NxN 776 if ( !bEarlySkip ) 777 { 778 #if HHI_INTER_VIEW_RESIDUAL_PRED 779 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 780 #endif 781 #if HHI_INTERVIEW_SKIP 782 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 783 784 #else 785 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 786 #endif 787 rpcTempCU->initEstData( uiDepth, iQP ); 788 if(m_pcEncCfg->getUseCbfFastMode()) 789 { 790 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 791 } 792 793 #if FORCE_REF_VSP==1 794 #if VSP_CFG 795 if( rpcBestCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 796 #else 797 if( !rpcBestCU->getSlice()->getVspDepthDisableFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 798 #endif 799 if( bWholeCUCanBeSynthesized ) 800 { 801 #if HHI_INTER_VIEW_RESIDUAL_PRED 802 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 803 #endif 804 #if HHI_INTERVIEW_SKIP 805 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 806 #else 807 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 808 #endif 809 rpcTempCU->initEstData( uiDepth, iQP ); 810 } 811 #else 812 if( bWholeCUCanBeSynthesized ) // To avoid compiling warning 813 { 814 } 815 #endif 816 } 817 #if HHI_INTER_VIEW_RESIDUAL_PRED 818 } // uiResPrdId 819 #endif 820 } // != I_SLICE 821 822 #if OL_DEPTHLIMIT_A0044 823 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 824 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 825 #else 826 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 827 #endif 828 { 829 bTrySplitDQP = bTrySplit; 830 } 831 else 832 { 833 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 662 834 { 663 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 664 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 835 if(iQP == iBaseQP) 665 836 { 666 bEarlySkip = true; 667 bTrySplit = false; 837 bTrySplitDQP = bTrySplit; 668 838 } 669 839 } 670 671 // 2Nx2N, NxN 672 if ( !bEarlySkip ) 840 else 673 841 { 674 #if HHI_INTER_VIEW_RESIDUAL_PRED 675 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 676 #endif 677 #if HHI_INTERVIEW_SKIP 678 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 679 680 #else 681 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 682 #endif 683 rpcTempCU->initEstData( uiDepth, iQP ); 684 if(m_pcEncCfg->getUseCbfFastMode()) 685 { 686 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 687 } 688 689 #if FORCE_REF_VSP==1 690 #if VSP_TEXT_ONLY 691 if( !rpcBestCU->getSlice()->getSPS()->isDepth() ) 692 #endif 693 #if HHI_INTER_VIEW_RESIDUAL_PRED 694 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 695 #endif 696 #if HHI_INTERVIEW_SKIP 697 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 698 #else 699 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 700 #endif 701 rpcTempCU->initEstData( uiDepth, iQP ); 702 #endif 842 bTrySplitDQP = bTrySplit; 703 843 } 704 #if HHI_INTER_VIEW_RESIDUAL_PRED 705 } // uiResPrdId 706 #endif 707 } // != I_SLICE 708 844 } 845 #else 709 846 710 847 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) … … 719 856 bTrySplitDQP = bTrySplit; 720 857 } 858 #endif 721 859 #if LOSSLESS_CODING 722 860 if (isAddLowestQP && (iQP == lowestQP)) … … 760 898 Bool bResPredFlag = ( uiResPrdId > 0 ); 761 899 #endif 762 // 2Nx2N, NxN 763 if ( !bEarlySkip ) 764 { 765 766 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 767 { 768 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 900 // 2Nx2N, NxN 901 if ( !bEarlySkip ) 769 902 { 770 #if HHI_INTER_VIEW_RESIDUAL_PRED 771 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 772 #endif 773 #if HHI_INTERVIEW_SKIP 774 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 775 #else 776 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 777 #endif 778 rpcTempCU->initEstData( uiDepth, iQP ); 779 } 780 } 781 } 782 783 { // 2NxN, Nx2N 784 if(doNotBlockPu) 785 { 786 #if HHI_INTER_VIEW_RESIDUAL_PRED 787 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 788 #endif 789 #if HHI_INTERVIEW_SKIP 790 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 791 #else 792 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 793 #endif 794 rpcTempCU->initEstData( uiDepth, iQP ); 795 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 903 904 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 796 905 { 797 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 798 } 799 } 800 if(doNotBlockPu) 801 { 802 #if HHI_INTER_VIEW_RESIDUAL_PRED 803 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 804 #endif 805 #if HHI_INTERVIEW_SKIP 806 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 807 #else 808 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 809 #endif 810 rpcTempCU->initEstData( uiDepth, iQP ); 811 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 812 { 813 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 814 } 815 } 816 } 817 818 #if 1 819 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 820 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 821 { 822 #if AMP_ENC_SPEEDUP 823 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 824 825 #if AMP_MRG 826 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 827 828 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 829 #else 830 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 831 #endif 832 833 //! Do horizontal AMP 834 if ( bTestAMP_Hor ) 835 { 836 if(doNotBlockPu) 837 { 838 #if HHI_INTER_VIEW_RESIDUAL_PRED 839 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 840 #endif 841 #if HHI_INTERVIEW_SKIP 842 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 843 #else 844 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 845 #endif 846 rpcTempCU->initEstData( uiDepth, iQP ); 847 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 906 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 848 907 { 849 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 850 } 851 } 852 if(doNotBlockPu) 853 { 854 #if HHI_INTER_VIEW_RESIDUAL_PRED 855 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 856 #endif 857 #if HHI_INTERVIEW_SKIP 858 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 859 #else 860 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 861 #endif 862 rpcTempCU->initEstData( uiDepth, iQP ); 863 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 864 { 865 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 908 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 909 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 910 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 911 #else 912 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 913 #endif 914 { 915 if (bTrySplit) 916 { 917 #endif 918 #if HHI_INTER_VIEW_RESIDUAL_PRED 919 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 920 #endif 921 #if HHI_INTERVIEW_SKIP 922 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 923 #else 924 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 925 #endif 926 rpcTempCU->initEstData( uiDepth, iQP ); 927 #if OL_DEPTHLIMIT_A0044 928 }//bTrySplit 929 }//depthMapDetect 930 else//do things normally 931 { 932 #if HHI_INTER_VIEW_RESIDUAL_PRED 933 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 934 #endif 935 #if HHI_INTERVIEW_SKIP 936 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN, bFullyRenderedSec ); 937 #else 938 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN ); 939 #endif 940 rpcTempCU->initEstData( uiDepth, iQP ); 941 } 942 #endif 866 943 } 867 944 } 868 945 } 869 #if AMP_MRG 870 else if ( bTestMergeAMP_Hor ) 871 { 872 if(doNotBlockPu) 946 947 { // 2NxN, Nx2N 948 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 949 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 950 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 951 #else 952 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 953 #endif 873 954 { 874 #if HHI_INTER_VIEW_RESIDUAL_PRED 875 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 876 #endif 877 #if HHI_INTERVIEW_SKIP 878 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 879 #else 880 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 881 #endif 882 rpcTempCU->initEstData( uiDepth, iQP ); 883 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 955 if (bTryNx2N) 884 956 { 885 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 957 #endif 958 if(doNotBlockPu) 959 { 960 #if HHI_INTER_VIEW_RESIDUAL_PRED 961 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 962 #endif 963 #if HHI_INTERVIEW_SKIP 964 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 965 #else 966 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 967 #endif 968 rpcTempCU->initEstData( uiDepth, iQP ); 969 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 970 { 971 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 972 } 973 } 974 #if OL_DEPTHLIMIT_A0044 975 }//bTryNx2N 976 }//depthMapDetect 977 else//do things normally 978 { 979 if(doNotBlockPu) 980 { 981 #if HHI_INTER_VIEW_RESIDUAL_PRED 982 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 983 #endif 984 #if HHI_INTERVIEW_SKIP 985 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N, bFullyRenderedSec ); 986 #else 987 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N ); 988 #endif 989 rpcTempCU->initEstData( uiDepth, iQP ); 990 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_Nx2N ) 991 { 992 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 993 } 886 994 } 887 995 } 888 if(doNotBlockPu) 996 #endif 997 998 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 999 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1000 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1001 #else 1002 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1003 #endif 889 1004 { 890 #if HHI_INTER_VIEW_RESIDUAL_PRED 891 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 892 #endif 893 #if HHI_INTERVIEW_SKIP 894 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 895 #else 896 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 897 #endif 898 rpcTempCU->initEstData( uiDepth, iQP ); 899 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1005 if (bTry2NxN) 900 1006 { 901 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1007 #endif 1008 if(doNotBlockPu) 1009 { 1010 #if HHI_INTER_VIEW_RESIDUAL_PRED 1011 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1012 #endif 1013 #if HHI_INTERVIEW_SKIP 1014 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 1015 #else 1016 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 1017 #endif 1018 rpcTempCU->initEstData( uiDepth, iQP ); 1019 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 1020 { 1021 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1022 } 1023 } 1024 #if OL_DEPTHLIMIT_A0044 1025 }//bTryNx2N 1026 }//depthMapDetect 1027 else//do things normally 1028 { 1029 if(doNotBlockPu) 1030 { 1031 #if HHI_INTER_VIEW_RESIDUAL_PRED 1032 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1033 #endif 1034 #if HHI_INTERVIEW_SKIP 1035 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxN, bFullyRenderedSec ); 1036 #else 1037 xCheckRDCostInter ( rpcBestCU, rpcTempCU, SIZE_2NxN ); 1038 #endif 1039 rpcTempCU->initEstData( uiDepth, iQP ); 1040 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxN) 1041 { 1042 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1043 } 902 1044 } 903 1045 } 1046 #endif 904 1047 } 905 #endif 906 907 //! Do horizontal AMP908 if ( bTestAMP_Ver)1048 1049 #if 1 1050 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1051 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 909 1052 { 910 if(doNotBlockPu) 1053 #if AMP_ENC_SPEEDUP 1054 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 1055 1056 #if AMP_MRG 1057 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 1058 1059 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 1060 #else 1061 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 1062 #endif 1063 1064 //! Do horizontal AMP 1065 if ( bTestAMP_Hor ) 911 1066 { 912 #if HHI_INTER_VIEW_RESIDUAL_PRED 913 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 914 #endif 915 #if HHI_INTERVIEW_SKIP 916 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 917 #else 918 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 919 #endif 920 rpcTempCU->initEstData( uiDepth, iQP ); 921 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1067 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1068 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1069 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1070 #else 1071 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1072 #endif 922 1073 { 923 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1074 if (bTry2NxN) 1075 { 1076 #endif 1077 if(doNotBlockPu) 1078 { 1079 #if HHI_INTER_VIEW_RESIDUAL_PRED 1080 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1081 #endif 1082 #if HHI_INTERVIEW_SKIP 1083 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1084 #else 1085 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1086 #endif 1087 rpcTempCU->initEstData( uiDepth, iQP ); 1088 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1089 { 1090 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1091 } 1092 } 1093 if(doNotBlockPu) 1094 { 1095 #if HHI_INTER_VIEW_RESIDUAL_PRED 1096 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1097 #endif 1098 #if HHI_INTERVIEW_SKIP 1099 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1100 #else 1101 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1102 #endif 1103 rpcTempCU->initEstData( uiDepth, iQP ); 1104 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1105 { 1106 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1107 } 1108 } 1109 #if OL_DEPTHLIMIT_A0044 1110 }//bTry2NxN 1111 }//depthMapDetect 1112 else//do things normally 1113 { 1114 if(doNotBlockPu) 1115 { 1116 #if HHI_INTER_VIEW_RESIDUAL_PRED 1117 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1118 #endif 1119 #if HHI_INTERVIEW_SKIP 1120 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1121 #else 1122 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1123 #endif 1124 rpcTempCU->initEstData( uiDepth, iQP ); 1125 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1126 { 1127 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1128 } 1129 } 1130 if(doNotBlockPu) 1131 { 1132 #if HHI_INTER_VIEW_RESIDUAL_PRED 1133 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1134 #endif 1135 #if HHI_INTERVIEW_SKIP 1136 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1137 #else 1138 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1139 #endif 1140 rpcTempCU->initEstData( uiDepth, iQP ); 1141 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1142 { 1143 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1144 } 1145 } 924 1146 } 1147 #endif 925 1148 } 926 if(doNotBlockPu) 1149 #if AMP_MRG 1150 else if ( bTestMergeAMP_Hor ) 927 1151 { 928 #if HHI_INTER_VIEW_RESIDUAL_PRED 929 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 930 #endif 931 #if HHI_INTERVIEW_SKIP 932 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 933 #else 934 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 935 #endif 936 rpcTempCU->initEstData( uiDepth, iQP ); 1152 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1153 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1154 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1155 #else 1156 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1157 #endif 1158 { 1159 if (bTry2NxN) 1160 { 1161 #endif 1162 if(doNotBlockPu) 1163 { 1164 #if HHI_INTER_VIEW_RESIDUAL_PRED 1165 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1166 #endif 1167 #if HHI_INTERVIEW_SKIP 1168 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1169 #else 1170 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1171 #endif 1172 rpcTempCU->initEstData( uiDepth, iQP ); 1173 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1174 { 1175 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1176 } 1177 } 1178 if(doNotBlockPu) 1179 { 1180 #if HHI_INTER_VIEW_RESIDUAL_PRED 1181 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1182 #endif 1183 #if HHI_INTERVIEW_SKIP 1184 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1185 #else 1186 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1187 #endif 1188 rpcTempCU->initEstData( uiDepth, iQP ); 1189 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1190 { 1191 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1192 } 1193 } 1194 #if OL_DEPTHLIMIT_A0044 1195 }//bTry2NxN 1196 }//depthMapDetect 1197 else//do things normally 1198 { 1199 if(doNotBlockPu) 1200 { 1201 #if HHI_INTER_VIEW_RESIDUAL_PRED 1202 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1203 #endif 1204 #if HHI_INTERVIEW_SKIP 1205 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec, true ); 1206 #else 1207 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, true ); 1208 #endif 1209 rpcTempCU->initEstData( uiDepth, iQP ); 1210 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnU ) 1211 { 1212 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1213 } 1214 } 1215 if(doNotBlockPu) 1216 { 1217 #if HHI_INTER_VIEW_RESIDUAL_PRED 1218 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1219 #endif 1220 #if HHI_INTERVIEW_SKIP 1221 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec, true ); 1222 #else 1223 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, true ); 1224 #endif 1225 rpcTempCU->initEstData( uiDepth, iQP ); 1226 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_2NxnD ) 1227 { 1228 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1229 } 1230 } 1231 1232 } 1233 #endif 937 1234 } 938 } 1235 #endif 1236 1237 //! Do horizontal AMP 1238 if ( bTestAMP_Ver ) 1239 { 1240 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1241 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1242 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1243 #else 1244 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1245 #endif 1246 { 1247 if (bTryNx2N) 1248 { 1249 #endif 1250 if(doNotBlockPu) 1251 { 1252 #if HHI_INTER_VIEW_RESIDUAL_PRED 1253 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1254 #endif 1255 #if HHI_INTERVIEW_SKIP 1256 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1257 #else 1258 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1259 #endif 1260 rpcTempCU->initEstData( uiDepth, iQP ); 1261 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1262 { 1263 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1264 } 1265 } 1266 if(doNotBlockPu) 1267 { 1268 #if HHI_INTER_VIEW_RESIDUAL_PRED 1269 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1270 #endif 1271 #if HHI_INTERVIEW_SKIP 1272 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1273 #else 1274 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1275 #endif 1276 rpcTempCU->initEstData( uiDepth, iQP ); 1277 } 1278 #if OL_DEPTHLIMIT_A0044 1279 }//bTryNx2N 1280 }//depthMapDetect 1281 else//do things normally 1282 { 1283 if(doNotBlockPu) 1284 { 1285 #if HHI_INTER_VIEW_RESIDUAL_PRED 1286 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1287 #endif 1288 #if HHI_INTERVIEW_SKIP 1289 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1290 #else 1291 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1292 #endif 1293 rpcTempCU->initEstData( uiDepth, iQP ); 1294 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1295 { 1296 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1297 } 1298 } 1299 if(doNotBlockPu) 1300 { 1301 #if HHI_INTER_VIEW_RESIDUAL_PRED 1302 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1303 #endif 1304 #if HHI_INTERVIEW_SKIP 1305 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1306 #else 1307 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1308 #endif 1309 rpcTempCU->initEstData( uiDepth, iQP ); 1310 } 1311 } 1312 #endif 1313 } 939 1314 #if AMP_MRG 940 else if ( bTestMergeAMP_Ver ) 941 { 942 if(doNotBlockPu) 1315 else if ( bTestMergeAMP_Ver ) 943 1316 { 944 #if HHI_INTER_VIEW_RESIDUAL_PRED 945 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 946 #endif 947 #if HHI_INTERVIEW_SKIP 948 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 949 #else 950 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 951 #endif 952 rpcTempCU->initEstData( uiDepth, iQP ); 953 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1317 #if OL_DEPTHLIMIT_A0044 //add code here to select 2NxN or Nx2N or none 1318 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1319 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1320 #else 1321 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1322 #endif 954 1323 { 955 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1324 if (bTryNx2N) 1325 { 1326 #endif 1327 if(doNotBlockPu) 1328 { 1329 #if HHI_INTER_VIEW_RESIDUAL_PRED 1330 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1331 #endif 1332 #if HHI_INTERVIEW_SKIP 1333 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1334 #else 1335 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1336 #endif 1337 rpcTempCU->initEstData( uiDepth, iQP ); 1338 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1339 { 1340 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1341 } 1342 } 1343 if(doNotBlockPu) 1344 { 1345 #if HHI_INTER_VIEW_RESIDUAL_PRED 1346 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1347 #endif 1348 #if HHI_INTERVIEW_SKIP 1349 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1350 #else 1351 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1352 #endif 1353 rpcTempCU->initEstData( uiDepth, iQP ); 1354 } 1355 #if OL_DEPTHLIMIT_A0044 1356 }//bTryNx2N 1357 }//depthMapDetect 1358 else//do things normally 1359 { 1360 if(doNotBlockPu) 1361 { 1362 #if HHI_INTER_VIEW_RESIDUAL_PRED 1363 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1364 #endif 1365 #if HHI_INTERVIEW_SKIP 1366 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec, true ); 1367 #else 1368 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, true ); 1369 #endif 1370 rpcTempCU->initEstData( uiDepth, iQP ); 1371 if(m_pcEncCfg->getUseCbfFastMode() && rpcBestCU->getPartitionSize(0) == SIZE_nLx2N ) 1372 { 1373 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 1374 } 1375 } 1376 if(doNotBlockPu) 1377 { 1378 #if HHI_INTER_VIEW_RESIDUAL_PRED 1379 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1380 #endif 1381 #if HHI_INTERVIEW_SKIP 1382 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 1383 #else 1384 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 1385 #endif 1386 rpcTempCU->initEstData( uiDepth, iQP ); 1387 } 956 1388 } 1389 #endif 957 1390 } 958 if(doNotBlockPu) 959 { 960 #if HHI_INTER_VIEW_RESIDUAL_PRED 961 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 962 #endif 963 #if HHI_INTERVIEW_SKIP 964 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec, true ); 965 #else 966 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, true ); 967 #endif 968 rpcTempCU->initEstData( uiDepth, iQP ); 969 } 970 } 971 #endif 972 973 #else 974 #if HHI_INTER_VIEW_RESIDUAL_PRED 975 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 976 #endif 977 #if HHI_INTERVIEW_SKIP 978 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 979 #else 980 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 981 #endif 982 rpcTempCU->initEstData( uiDepth, iQP ); 983 #if HHI_INTER_VIEW_RESIDUAL_PRED 984 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 985 #endif 986 #if HHI_INTERVIEW_SKIP 987 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 988 #else 989 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 990 #endif 991 rpcTempCU->initEstData( uiDepth, iQP ); 992 #if HHI_INTER_VIEW_RESIDUAL_PRED 993 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 994 #endif 995 #if HHI_INTERVIEW_SKIP 996 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 997 #else 998 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 999 #endif 1000 rpcTempCU->initEstData( uiDepth, iQP ); 1001 #if HHI_INTER_VIEW_RESIDUAL_PRED 1002 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1003 #endif 1004 #if HHI_INTERVIEW_SKIP 1005 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1006 #else 1007 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1008 #endif 1009 rpcTempCU->initEstData( uiDepth, iQP ); 1010 1011 #endif 1012 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1391 #endif 1392 1393 #else 1394 #if HHI_INTER_VIEW_RESIDUAL_PRED 1395 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1396 #endif 1397 #if HHI_INTERVIEW_SKIP 1398 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1399 #else 1400 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1401 #endif 1402 rpcTempCU->initEstData( uiDepth, iQP ); 1403 #if HHI_INTER_VIEW_RESIDUAL_PRED 1404 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1405 #endif 1406 #if HHI_INTERVIEW_SKIP 1407 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1408 #else 1409 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1410 #endif 1411 rpcTempCU->initEstData( uiDepth, iQP ); 1412 #if HHI_INTER_VIEW_RESIDUAL_PRED 1413 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1414 #endif 1415 #if HHI_INTERVIEW_SKIP 1416 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1417 #else 1418 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1419 #endif 1420 rpcTempCU->initEstData( uiDepth, iQP ); 1421 #if HHI_INTER_VIEW_RESIDUAL_PRED 1422 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1423 #endif 1424 #if HHI_INTERVIEW_SKIP 1425 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1426 #else 1427 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1428 #endif 1429 rpcTempCU->initEstData( uiDepth, iQP ); 1430 1431 #endif 1432 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1013 1433 #endif 1014 1434 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1026 1446 // speedup for inter frames 1027 1447 #if HHI_INTERVIEW_SKIP 1028 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||1029 1030 1031 1448 if( ( rpcBestCU->getSlice()->getSliceType() == I_SLICE || 1449 rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 || 1450 rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 || 1451 rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) && !bFullyRenderedSec ) // avoid very complex intra if it is unlikely 1032 1452 #else 1033 1453 if( rpcBestCU->getSlice()->getSliceType() == I_SLICE || … … 1041 1461 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1042 1462 { 1043 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1463 #if OL_DEPTHLIMIT_A0044 //add code here to select or deselect NxN mode for Intra 1464 #if OL_DO_NOT_LIMIT_INTRA_SLICES_PART 1465 if(depthMapDetect && !bIntraSliceDetect && sps->getUseDPL()) 1466 #else 1467 if(depthMapDetect && sps->getUseDPL()) //depth map being encoded 1468 #endif 1044 1469 { 1045 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1046 rpcTempCU->initEstData( uiDepth, iQP ); 1470 if (bTrySplit) 1471 { 1472 1473 #endif 1474 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1475 { 1476 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1477 rpcTempCU->initEstData( uiDepth, iQP ); 1478 } 1479 #if OL_DEPTHLIMIT_A0044 1480 }//bTrySplit 1481 }//depthMapDetect 1482 else 1483 { 1484 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1485 { 1486 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1487 rpcTempCU->initEstData( uiDepth, iQP ); 1488 } 1047 1489 } 1490 #endif 1048 1491 } 1049 1492 } … … 1101 1544 #endif 1102 1545 { 1103 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );1546 rpcBestCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() ); 1104 1547 } 1105 1548 … … 1125 1568 } 1126 1569 #if HHI_INTERVIEW_SKIP 1127 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ;1570 rpcBestCU->setRenderableSubParts(bFullyRenderedSec,0,rpcBestCU->getDepth( 0 )) ; 1128 1571 #endif 1129 1572 } … … 1189 1632 { 1190 1633 #if LOSSLESS_CODING 1191 1192 1193 1194 1634 if (isAddLowestQP && (iQP == iMinQP)) 1635 { 1636 iQP = lowestQP; 1637 } 1195 1638 #endif 1196 1639 rpcTempCU->initEstData( uiDepth, iQP ); … … 1301 1744 #endif 1302 1745 { 1303 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1746 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1304 1747 } 1305 1748 … … 1344 1787 #endif 1345 1788 { 1346 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1789 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1347 1790 } 1348 1791 #endif … … 1393 1836 } // with sub partitioned prediction. 1394 1837 #if LOSSLESS_CODING 1395 1396 1397 1398 1838 if (isAddLowestQP && (iQP == lowestQP)) 1839 { 1840 iQP = iMinQP; 1841 } 1399 1842 #endif 1400 1843 } // SPLIT- QP Loop … … 1403 1846 if( m_pcRdCost->getUseRenModel() ) 1404 1847 { 1405 1406 1407 1408 1409 1848 UInt uiWidth = m_ppcRecoYuvBest[uiDepth]->getWidth ( ); 1849 UInt uiHeight = m_ppcRecoYuvBest[uiDepth]->getHeight ( ); 1850 Pel* piSrc = m_ppcRecoYuvBest[uiDepth]->getLumaAddr( 0 ); 1851 UInt uiSrcStride = m_ppcRecoYuvBest[uiDepth]->getStride ( ); 1852 m_pcRdCost->setRenModelData( rpcBestCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight ); 1410 1853 } 1411 1854 #endif … … 1608 2051 #if HHI_MPI 1609 2052 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 1610 #endif 2053 { 2054 #endif 2055 1611 2056 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2057 2058 #if HHI_MPI 2059 } 2060 #endif 1612 2061 } 1613 2062 else … … 1624 2073 1625 2074 if( ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) 2075 { 1626 2076 m_pcEntropyCoder->encodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 2077 } 2078 1627 2079 if( !pcCU->getSlice()->isIntra() ) 1628 2080 { … … 1631 2083 #if FORCE_REF_VSP==1 1632 2084 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1633 #if VSP_TEXT_ONLY 1634 if( !pcCU->getSlice()->getSPS()->isDepth() ) 2085 #if VSP_CFG 2086 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2087 #else 2088 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 1635 2089 #endif 1636 2090 { … … 1647 2101 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1648 2102 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1649 #if DEBUGLOGOUT1650 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1651 #endif1652 2103 xRestoreDepthWidthHeight( pcCU ); 1653 2104 return; … … 1694 2145 #if HHI_MPI 1695 2146 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 2147 { 1696 2148 #endif 1697 2149 if( !pcCU->getSlice()->isIntra() ) … … 1700 2152 1701 2153 #if FORCE_REF_VSP==1 1702 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 ) 1703 #if VSP_TEXT_ONLY 1704 if( !pcCU->getSlice()->getSPS()->isDepth() ) 2154 if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 )] 2155 #if VSP_CFG 2156 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2157 #else 2158 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 1705 2159 #endif 1706 2160 { … … 1709 2163 #endif 1710 2164 } 2165 #if HHI_MPI 2166 } 2167 #endif 1711 2168 1712 2169 if( pcCU->isSkipped( uiAbsPartIdx ) ) … … 1715 2172 #endif 1716 2173 { 2174 #if OL_DEPTHLIMIT_A0044 2175 if(pcCU->getPartDumpFlag()) 2176 { 2177 pcCU->updatePartInfo(0,uiDepth); 2178 pcCU->incrementPartInfo(); 2179 } 2180 #endif 1717 2181 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1718 2182 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1720 2184 #endif 1721 2185 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1722 #if DEBUGLOGOUT1723 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1724 #endif1725 2186 return; 1726 2187 } … … 1730 2191 { 1731 2192 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1732 #if DEBUGLOGOUT1733 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1734 #endif1735 2193 return; 1736 2194 } … … 1753 2211 // Encode slice finish 1754 2212 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1755 #if DEBUGLOGOUT1756 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1757 #endif1758 2213 return; 1759 2214 } … … 1779 2234 // --- write terminating bit --- 1780 2235 finishCU(pcCU,uiAbsPartIdx,uiDepth); 1781 #if DEBUGLOGOUT1782 m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );1783 #endif1784 2236 } 1785 2237 … … 2613 3065 } 2614 3066 #if VSP_N 2615 #if !(!VSP_TEXT_ONLY && FORCE_REF_VSP==2) 2616 else // inter 3067 #if VSP_CFG 3068 else if( (!rpcTempCU->getSlice()->getSPS()->getVspDepthPresentFlag() && rpcTempCU->getSlice()->getViewId() ) || FORCE_REF_VSP!=2 ) // inter 3069 #else 3070 else if( rpcTempCU->getSlice()->getVspDepthDisableFlag() || FORCE_REF_VSP!=2 ) // inter 3071 #endif 2617 3072 { 2618 3073 Int aiRefIdx[2] = {NOT_VALID, NOT_VALID}; … … 2620 3075 { 2621 3076 aiRefIdx[iList] = pcTextureCU->getCUMvField( RefPicList(iList) )->getRefIdx( rpcTempCU->getZorderIdxInCU() + ui ); 2622 if( aiRefIdx[iList] >= 0 && pcTextureCU->getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP ) 3077 #if VSP_CFG 3078 if( aiRefIdx[iList] >= rpcTempCU->getSlice()->getNumRefIdx( RefPicList(iList) ) ) 3079 #else 3080 if( aiRefIdx[iList] >= 0 && pcTextureCU->isVspRef( RefPicList(iList), aiRefIdx[iList] ) ) 3081 #endif 2623 3082 { 2624 3083 return; … … 2630 3089 //} 2631 3090 } 2632 #endif2633 3091 #endif 2634 3092 } … … 2830 3288 #if FORCE_REF_VSP==1 2831 3289 if( (pcCU->isSkipped( 0 ) || pcCU->isVspMode( 0 )) && pcCU->getSlice()->getViewId() != 0 ) 2832 #if VSP_TEXT_ONLY 2833 if( !pcCU->getSlice()->getSPS()->isDepth() ) 3290 #if VSP_CFG 3291 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 3292 #else 3293 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 2834 3294 #endif 2835 3295 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.h
r166 r193 46 46 #include "TLibCommon/TComBitCounter.h" 47 47 #include "TLibCommon/TComDataCU.h" 48 #if DEBUGLOGOUT49 #include "TLibCommon/DebugLog.h"50 #endif51 48 52 49 #include "TEncEntropy.h" … … 116 113 117 114 public: 118 #if DEBUGLOGOUT119 DebugLog m_cDebug;120 #endif121 122 115 /// copy parameters from encoder class 123 116 Void init ( TEncTop* pcEncTop ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r166 r193 1370 1370 #if VSP_MV_ZERO 1371 1371 Int iRefIdx = pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx(uiSubPartIdx); 1372 if( !(pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU-> getSlice()->getRefViewId( RefPicList( uiRefListIdx ), iRefIdx ) == NUM_VIEW_VSP) )1372 if( !(pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU->isVspRef( RefPicList( uiRefListIdx ), iRefIdx )) ) 1373 1373 { 1374 1374 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r166 r193 332 332 #endif 333 333 334 #if VSP_SLICE_HEADER && VSP_CFG 335 pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numVSPRefPics ); 336 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() && pcSlice->getNumVspRefPics() > 0 ); 337 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 338 { 339 pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] ); 340 if( pcSlice->getSliceType() == B_SLICE ) 341 { 342 pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] ); 343 } 344 } 345 #endif 346 334 347 #if VSP_N 348 #if VSP_CFG 349 Int NumberOfVspRefsL0 = ( ( pcPic->getViewId()==0 350 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 351 #if VSP_SLICE_HEADER 352 || !pcSlice->getVspFlag() 353 #endif 354 || pcSlice->getVspRefPos( REF_PIC_LIST_0, 0 ) == 0 355 ) ? 0 : 1 ); 356 Int NumberOfVspRefsL1 = ( ( pcPic->getViewId()==0 357 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 358 #if VSP_SLICE_HEADER 359 || !pcSlice->getVspFlag() 360 #endif 361 || pcSlice->getVspRefPos( REF_PIC_LIST_1, 0 ) == 0 362 ) ? 0 : 1 ); 363 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) ); 364 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) ); 365 #else 335 366 Int NumberOfVspRefs = ( ( pcPic->getViewId()==0 336 #if VSP_TEXT_ONLY 337 || m_pcEncTop->getIsDepth() 338 #endif 367 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 339 368 #if VSP_SLICE_HEADER 340 || ! m_pcEncTop->getUseVSP()369 || !pcSlice->getVspFlag() 341 370 #endif 342 371 ) ? 0 : 1 ); 343 372 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 344 373 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) ); 374 #endif 345 375 #else 346 376 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); … … 373 403 #if VSP_N 374 404 Bool bUseVsp = (pcPic->getViewId()!=0); 375 #if VSP_TEXT_ONLY 376 if( m_pcEncTop->getIsDepth() ) bUseVsp = false; 377 #endif 405 if( m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth() ) bUseVsp = false; 378 406 #if VSP_SLICE_HEADER 407 #if VSP_CFG 408 if( !pcSlice->getVspFlag() ) bUseVsp = false; 409 #else 379 410 if( !m_pcEncTop->getUseVSP() ) bUseVsp = false; 380 411 #endif 412 #endif 413 414 #if VSP_SLICE_HEADER 415 if( bUseVsp ) 416 #endif 417 { 418 m_pcEncTop->getVSPBuf()->getCurrSlice()->setPOC( pcPic->getPOC() ); 419 m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewId( pcPic->getViewId() ); 420 } 421 381 422 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics, bUseVsp ? m_pcEncTop->getVSPBuf() : NULL ); 382 423 #else 383 424 pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics ); 384 425 #endif 426 427 #if !VSP_CFG 385 428 #if VSP_SLICE_HEADER 386 pcSlice->setVspFlag( bUseVsp ); 429 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() ); 430 pcSlice->setVspDepthDisableFlag( m_pcEncTop->getVSPDepthDisable() ); 431 #endif 387 432 #endif 388 433 … … 471 516 Int iVSOMode = m_pcEncTop->getVSOMode(); 472 517 m_pcRdCost->setVSOMode( iVSOMode ); 518 473 519 #if HHI_VSO_DIST_INT 474 520 m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() ); … … 491 537 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 492 538 #endif 493 539 #if LGE_WVSO_A0119 540 Bool bUseWVSO = m_pcEncTop->getUseWVSO(); 541 m_pcRdCost->setUseWVSO( bUseWVSO ); 542 #endif 494 543 495 544 } … … 1157 1206 m_pcSbacCoder->load( &pcSbacCoders[0] ); 1158 1207 1159 #if DEBUGLOGOUT1160 char fname[128];1161 sprintf(fname, "%sV%02d_%05d%s.csv", "Log", pcSlice->getViewId(), uiPOCCurr, pcSlice->getIsDepth() ? "depth":"text");1162 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileOpen( fname );1163 #endif1164 1165 1208 pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength ); 1166 1209 if (!bEntropySlice) 1167 1210 { 1211 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1212 m_pcSliceEncoder->setPartDumpFlag(1); 1213 #endif 1168 1214 pcSlice->setTileLocationCount ( 0 ); 1169 1215 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1216 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1217 m_pcSliceEncoder->setPartDumpFlag(0); 1218 #endif 1170 1219 } 1171 1220 else 1172 1221 { 1222 #if OL_DEPTHLIMIT_A0044 //start dumping partition information 1223 m_pcSliceEncoder->setPartDumpFlag(1); 1224 #endif 1173 1225 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1174 } 1175 1176 #if DEBUGLOGOUT 1177 getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileClose(); 1178 #endif 1226 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1227 m_pcSliceEncoder->setPartDumpFlag(0); 1228 #endif 1229 } 1179 1230 1180 1231 { … … 2187 2238 printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) ); 2188 2239 } 2240 #if VSP_CFG 2241 else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) 2242 && pcSlice->getPOC() == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) ) 2243 { 2244 printf( "VS " ); 2245 } 2246 #endif 2189 2247 else 2190 2248 { … … 2203 2261 printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ); 2204 2262 } 2263 #if VSP_CFG 2264 else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) 2265 && pcSlice->getPOC() == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) ) 2266 { 2267 printf( "VS " ); 2268 } 2269 #endif 2205 2270 else 2206 2271 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.h
r166 r193 146 146 Void freeAPS (TComAPS* pAPS, TComSPS* pSPS); 147 147 Void allocAPS (TComAPS* pAPS, TComSPS* pSPS); 148 149 148 protected: 150 149 Void encodeAPS (TComAPS* pcAPS, TComOutputBitstream& APSbs, TComSlice* pcSlice); //!< encode APS syntax elements -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r166 r193 580 580 { 581 581 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT_A0044 583 UInt uiSymbol; 584 #endif 582 585 if ( pcCU->isIntra( uiAbsPartIdx ) ) 583 586 { … … 585 588 { 586 589 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 587 } 590 #if OL_DEPTHLIMIT_A0044 591 if(pcCU->getPartDumpFlag()) 592 { 593 uiSymbol = (UInt)(eSize == SIZE_2Nx2N? 1 : 0); 594 pcCU->updatePartInfo(uiSymbol?0:1,uiDepth); //0 for 2Nx2N and 1 for NxN 595 pcCU->incrementPartInfo(); 596 } 597 #endif 598 } 599 #if OL_DEPTHLIMIT_A0044 600 if(pcCU->getPartDumpFlag() && uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth && !pcCU->getSlice()->isIntra()) 601 { 602 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N and 1 for NxN 603 pcCU->incrementPartInfo(); 604 } 605 #endif 588 606 return; 589 607 } … … 591 609 switch(eSize) 592 610 { 593 611 case SIZE_2Nx2N: 594 612 { 595 613 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 614 #if OL_DEPTHLIMIT_A0044 615 if(pcCU->getPartDumpFlag()) 616 { 617 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N 618 pcCU->incrementPartInfo(); 619 } 620 #endif 596 621 break; 597 622 } 598 599 600 623 case SIZE_2NxN: 624 case SIZE_2NxnU: 625 case SIZE_2NxnD: 601 626 { 602 627 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 623 648 } 624 649 } 650 #if OL_DEPTHLIMIT_A0044 651 if(pcCU->getPartDumpFlag()) 652 { 653 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN 654 pcCU->incrementPartInfo(); 655 } 656 #endif 625 657 break; 626 658 } 627 628 629 659 case SIZE_Nx2N: 660 case SIZE_nLx2N: 661 case SIZE_nRx2N: 630 662 { 631 663 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 0) ); … … 656 688 } 657 689 } 690 #if OL_DEPTHLIMIT_A0044 691 if(pcCU->getPartDumpFlag()) 692 { 693 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N 694 pcCU->incrementPartInfo(); 695 } 696 #endif 658 697 break; 659 698 } 660 699 case SIZE_NxN: 661 700 { 662 701 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && pcCU->getWidth(uiAbsPartIdx) == 8 && pcCU->getHeight(uiAbsPartIdx) == 8 ) ) … … 665 704 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 666 705 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 706 #if OL_DEPTHLIMIT_A0044 707 if(pcCU->getPartDumpFlag()) 708 { 709 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter 710 pcCU->incrementPartInfo(); 711 } 712 #endif 713 } 714 else 715 { 716 #if OL_DEPTHLIMIT_A0044 717 if(pcCU->getPartDumpFlag()) 718 { 719 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter 720 pcCU->incrementPartInfo(); 721 } 722 #endif 667 723 } 668 724 break; 669 725 } 670 726 default: 671 727 { 672 728 assert(0); … … 785 841 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 786 842 #if HHI_MPI 787 #if VSP_ TEXT_ONLY843 #if VSP_N 788 844 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 789 845 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, 790 846 pcTextCU ? pcTextCU->getCUMvField( RefPicList(1) )->getRefIdx( uiAbsPartIdx ) : -1 }; 791 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 792 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(0), aiRefIdxVsp[0] ) == NUM_VIEW_VSP ) 793 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(1), aiRefIdxVsp[1] ) == NUM_VIEW_VSP ); 794 #else 795 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 847 #if VSP_CFG 848 const Bool bMVIAvailable = (pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || pcCU->getSlice()->getViewId()==0) 849 ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 850 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 851 && !( aiRefIdxVsp[0] >= pcCU->getSlice()->getNumRefIdx( RefPicList(0) ) ) 852 && !( aiRefIdxVsp[1] >= pcCU->getSlice()->getNumRefIdx( RefPicList(1) ) ); 853 #else 854 const Bool bMVIAvailable = pcCU->getSlice()->getVspDepthDisableFlag() ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE 855 && !( aiRefIdxVsp[0] >= 0 && pcTextCU->isVspRef( RefPicList(0), aiRefIdxVsp[0] ) ) 856 && !( aiRefIdxVsp[1] >= 0 && pcTextCU->isVspRef( RefPicList(1), aiRefIdxVsp[1] ) ) 857 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 858 #endif 796 859 #endif 797 860 if( bMVIAvailable ) … … 858 921 assert( uiCtx < 3 ); 859 922 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 923 #if OL_DEPTHLIMIT_A0044 924 if(pcCU->getPartDumpFlag()) 925 { 926 if(pcCU->getSlice()->isIntra() || (!pcCU->getSlice()->isIntra() && uiCurrSplitFlag!=0)) 927 { 928 pcCU->updatePartInfo(uiCurrSplitFlag,uiDepth); 929 pcCU->incrementPartInfo(); 930 } 931 } 932 #endif 860 933 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 861 934 DTRACE_CABAC_T( "\tSplitFlag\n" ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r166 r193 882 882 #if FORCE_REF_VSP==1 883 883 if( pcCU->getSlice()->getViewId() != 0 ) 884 #if VSP_TEXT_ONLY 885 if( !pcCU->getSlice()->getSPS()->isDepth() ) 884 #if VSP_CFG 885 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 886 #else 887 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 886 888 #endif 887 889 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); … … 1145 1147 if ( m_pcRdCost->getUseVSO() ) 1146 1148 { 1147 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1149 #if LGE_WVSO_A0119 1150 if ( m_pcRdCost->getUseWVSO() ) 1151 { 1152 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 1153 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 1154 Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1155 Dist iVSO = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1156 ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight); 1157 } 1158 else 1159 #endif 1160 { 1161 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1162 } 1148 1163 } 1149 1164 else 1150 1165 #endif 1151 1166 { 1152 ruiDist += m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );1153 }1167 ruiDist += m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1168 } 1154 1169 } 1155 1170 … … 1918 1933 1919 1934 uiSad = (Dist) ( m_pcRdCost->getDistPart( piPred, uiStride, piOrg, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirRec->getStride(), uiWidth, uiHeight ) ); 1935 #if LGE_WVSO_A0119 1936 if ( m_pcRdCost->getUseWVSO() ) 1937 { 1938 Int iDWeight = m_pcRdCost->getDWeight(); 1939 Int iVSDWeight = m_pcRdCost->getVSDWeight(); 1940 Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1941 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); 1942 } 1943 #endif 1920 1944 } 1921 1945 else … … 1924 1948 Bool bSad = !m_pcRdCost->getUseRenModel(); 1925 1949 uiSad = m_pcRdCost->getDistVS(pcCU, uiPartOffset, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, bSad, 0 ); 1950 #if LGE_WVSO_A0119 1951 if ( m_pcRdCost->getUseWVSO() ) 1952 { 1953 Int iDWeight = m_pcRdCost->getDWeight()*m_pcRdCost->getDWeight(); 1954 Int iVSDWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight(); 1955 Dist iD = (Dist) m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1956 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); 1957 } 1958 #endif 1926 1959 } 1927 1960 … … 2960 2993 { 2961 2994 #if VSP_MV_ZERO 2962 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP);2995 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp)); 2963 2996 //if( bIsVsp && !bWholeCUCanBeSynthesized ) 2964 2997 //{ … … 2969 3002 if( pcCU->getResPredFlag( 0 )) 2970 3003 { 2971 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp)) 3004 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) 3005 #if VSP_N 3006 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdxTemp) 3007 #endif 3008 ) 2972 3009 { // subtract residual prediction from original in motion search 2973 3010 if(!bLastResiFlag) … … 3068 3105 { 3069 3106 #if VSP_MV_ZERO 3070 if( pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP)3107 if( pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp) ) 3071 3108 { 3072 3109 cMvTemp[1][iRefIdxTemp].setZero(); … … 3214 3251 { 3215 3252 #if VSP_MV_ZERO 3216 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, bestBiPRefIdxL1) == NUM_VIEW_VSP);3253 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, bestBiPRefIdxL1)); 3217 3254 3218 3255 if( bIsVsp ) … … 3314 3351 { 3315 3352 #if VSP_MV_ZERO 3316 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) == NUM_VIEW_VSP);3353 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(eRefPicList, iRefIdxTemp)); 3317 3354 //if( bIsVsp && !bWholeCUCanBeSynthesized ) 3318 3355 //{ … … 3343 3380 3344 3381 iPredFrom = iBestRefIdx >= 0 ? 3 : 1; 3345 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx)) 3382 if(iBestRefIdx >= 0 && pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx) 3383 #if VSP_N 3384 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList == REF_PIC_LIST_0 ? REF_PIC_LIST_1 : REF_PIC_LIST_0, iBestRefIdx) 3385 #endif 3386 ) 3346 3387 iAddResiShift++; 3347 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp)) 3388 if(pcCU->getSlice()->getViewId() == pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxTemp) 3389 #if VSP_N 3390 && pcCU->getSlice()->getPOC() != pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdxTemp) 3391 #endif 3392 ) 3348 3393 iAddResiShift++; 3349 3394 iAddResiShift = (pcCU->getSlice()->getPPS()->getUseWP() || iPredFrom != 3) ? (iAddResiShift >= 0 ? 0 : -1) : (iAddResiShift >= 0 ? 1-iAddResiShift : -1); … … 3420 3465 { 3421 3466 #if VSP_MV_ZERO 3422 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdxBi[0]) == NUM_VIEW_VSP);3467 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdxBi[0])); 3423 3468 3424 3469 if( !bIsVsp ) … … 3435 3480 #endif 3436 3481 #if VSP_MV_ZERO 3437 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdxBi[1]) == NUM_VIEW_VSP);3482 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdxBi[1])); 3438 3483 3439 3484 if( !bIsVsp ) … … 3606 3651 3607 3652 #if VSP_MV_ZERO 3608 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdxBi[0]) == NUM_VIEW_VSP);3653 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdxBi[0])); 3609 3654 if( !bIsVsp ) 3610 3655 { … … 3614 3659 #if VSP_MV_ZERO 3615 3660 } 3616 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdxBi[1]) == NUM_VIEW_VSP);3661 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdxBi[1])); 3617 3662 if( !bIsVsp ) 3618 3663 { … … 3638 3683 3639 3684 #if VSP_MV_ZERO 3640 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_0, iRefIdx[0]) == NUM_VIEW_VSP);3685 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_0, iRefIdx[0])); 3641 3686 if( !bIsVsp ) 3642 3687 { … … 3662 3707 3663 3708 #if VSP_MV_ZERO 3664 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU-> getSlice()->getRefViewId(REF_PIC_LIST_1, iRefIdx[1]) == NUM_VIEW_VSP);3709 bIsVsp = (pcCU->getSlice()->getViewId() && pcCU->isVspRef(REF_PIC_LIST_1, iRefIdx[1])); 3665 3710 if( !bIsVsp ) 3666 3711 { … … 4655 4700 { 4656 4701 uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight , false, 0 ); 4702 #if LGE_WVSO_A0119 4703 if ( m_pcRdCost->getUseWVSO() ) 4704 { 4705 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 4706 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 4707 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 4708 uiDistortion = (iDWeight * iD + iVSOWeight * (Dist)uiDistortion) / ( iDWeight + iVSOWeight); 4709 } 4710 #endif 4657 4711 } 4658 4712 else … … 5014 5068 { 5015 5069 uiDistortionBest = m_pcRdCost->getDistVS ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight, false, 0 ); 5070 #if LGE_WVSO_A0119 5071 if ( m_pcRdCost->getUseWVSO() ) 5072 { 5073 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5074 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5075 Dist iD = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(), pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(), uiWidth, uiHeight ); 5076 uiDistortionBest = (iDWeight * iD + iVSOWeight * (Dist) uiDistortionBest) / ( iDWeight + iVSOWeight); 5077 } 5078 #endif 5016 5079 } 5017 5080 else … … 5249 5312 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5250 5313 uiDistY = m_pcRdCost->getDistPart( m_pTempPel, 1<< uiLog2TrSize, pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirRec->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); 5314 #if LGE_WVSO_A0119 5315 if ( m_pcRdCost->getUseWVSO() ) 5316 { 5317 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5318 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5319 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight ); 5320 uiDistY = (iDWeight * iD + iVSDWeight * (Dist)uiDistY) / ( iDWeight + iVSDWeight); 5321 } 5322 #endif 5251 5323 } 5252 5324 else … … 5254 5326 { 5255 5327 uiDistY = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, pcPred->getLumaAddr( uiAbsPartIdx ), pcPred->getStride(), pcOrg->getLumaAddr( uiAbsPartIdx), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); // initialized with zero residual distortion 5328 #if LGE_WVSO_A0119 5329 if ( m_pcRdCost->getUseWVSO() ) 5330 { 5331 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5332 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5333 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight ); 5334 uiDistY = (iDWeight * iD + iVSOWeight * (Dist)uiDistY) / ( iDWeight + iVSOWeight); 5335 } 5336 #endif 5256 5337 } 5257 5338 } … … 5299 5380 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5300 5381 uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirOrg->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirRec->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize ); 5382 #if LGE_WVSO_A0119 5383 if ( m_pcRdCost->getUseWVSO() ) 5384 { 5385 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5386 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 5387 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); 5388 uiNonzeroDistY = (iDWeight * iD + iVSDWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSDWeight); 5389 } 5390 #endif 5301 5391 } 5302 5392 else … … 5306 5396 uiNonzeroDistY = m_pcRdCost->getDistVS( pcCU, uiAbsPartIdx, m_cYuvRecTemp.getLumaAddr(uiAbsPartIdx), m_cYuvRecTemp.getStride(), 5307 5397 pcOrg->getLumaAddr( uiAbsPartIdx ), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); 5398 #if LGE_WVSO_A0119 5399 if ( m_pcRdCost->getUseWVSO() ) 5400 { 5401 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 5402 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 5403 Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); 5404 uiNonzeroDistY = (iDWeight * iD + iVSOWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSOWeight); 5405 } 5406 #endif 5308 5407 } 5309 5408 } … … 6003 6102 #if FORCE_REF_VSP==1 6004 6103 if( pcCU->getSlice()->getViewId() != 0 ) 6005 #if VSP_TEXT_ONLY 6006 if( !pcCU->getSlice()->getSPS()->isDepth() ) 6104 #if VSP_CFG 6105 if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 6106 #else 6107 if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() ) 6007 6108 #endif 6008 6109 m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true ); … … 6400 6501 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6401 6502 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6503 #if LGE_WVSO_A0119 6504 if ( m_pcRdCost->getUseWVSO() ) 6505 { 6506 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6507 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6508 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6509 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6510 } 6511 #endif // LGE_WVSO_A0119 6402 6512 } 6403 6513 else … … 6405 6515 { 6406 6516 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6517 #if LGE_WVSO_A0119 6518 if ( m_pcRdCost->getUseWVSO() ) 6519 { 6520 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6521 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6522 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6523 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6524 } 6525 #endif // LGE_WVSO_A0119 6407 6526 } 6408 6527 #else // FIX_RDO_MACRO … … 6413 6532 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6414 6533 uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6534 #if LGE_WVSO_A0119 6535 if ( m_pcRdCost->getUseWVSO() ) 6536 { 6537 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6538 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6539 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6540 uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight); 6541 } 6542 #endif // LGE_WVSO_A0119 6415 6543 } 6416 6544 else … … 6418 6546 { 6419 6547 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 ); 6548 #if LGE_WVSO_A0119 6549 if ( m_pcRdCost->getUseWVSO() ) 6550 { 6551 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6552 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6553 Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD ); 6554 uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight); 6555 } 6556 #endif // LGE_WVSO_A0119 6420 6557 } 6421 6558 #endif // SAIT_VSO_EST_A0033 <-- wrong #endif should be removed … … 6527 6664 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6528 6665 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 6666 #if LGE_WVSO_A0119 6667 if ( m_pcRdCost->getUseWVSO() ) 6668 { 6669 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6670 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6671 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6672 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6673 } 6674 #endif 6529 6675 } 6530 6676 else … … 6532 6678 { 6533 6679 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 6680 #if LGE_WVSO_A0119 6681 if ( m_pcRdCost->getUseWVSO() ) 6682 { 6683 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6684 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6685 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6686 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 6687 } 6688 #endif 6534 6689 } 6535 6690 } … … 6593 6748 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6594 6749 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirRec->getStride(), uiWidth, uiHeight ); 6750 #if LGE_WVSO_A0119 6751 if ( m_pcRdCost->getUseWVSO() ) 6752 { 6753 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6754 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 6755 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6756 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 6757 } 6758 #endif 6595 6759 } 6596 6760 else … … 6598 6762 { 6599 6763 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 6764 #if LGE_WVSO_A0119 6765 if ( m_pcRdCost->getUseWVSO() ) 6766 { 6767 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 6768 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 6769 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 6770 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 6771 } 6772 #endif 6600 6773 } 6601 6774 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
r102 r193 376 376 m_pcRdCost->setDisparityCoeff( m_pcCfg->getDispCoeff() ); 377 377 #endif 378 378 #if LGE_WVSO_A0119 379 if( m_pcCfg->getUseWVSO() && m_pcCfg->isDepthCoder() ) 380 { 381 382 Int iDWeight, iVSOWeight, iVSDWeight; 383 iDWeight = m_pcCfg->getDWeight(); 384 iVSOWeight = m_pcCfg->getVSOWeight(); 385 iVSDWeight = m_pcCfg->getVSDWeight(); 386 387 m_pcRdCost->setDWeight( iDWeight ); 388 m_pcRdCost->setVSOWeight( iVSOWeight ); 389 m_pcRdCost->setVSDWeight( iVSDWeight ); 390 391 } 392 #endif 379 393 #if RDOQ_CHROMA_LAMBDA 380 394 // for RDOQ … … 831 845 #endif 832 846 847 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 848 m_bDumpPartInfo = 0; 849 pcCU->setPartDumpFlag(m_bDumpPartInfo); 850 #endif 833 851 834 852 // inherit from TR if necessary, select substream to use. … … 1290 1308 1291 1309 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1310 #if OL_DEPTHLIMIT_A0044 1311 pcCU->setPartDumpFlag(m_bDumpPartInfo); 1312 pcCU->resetPartInfo(); 1313 #endif 1292 1314 #if !REMOVE_TILE_DEPENDENCE 1293 1315 if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) ) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.h
r77 r193 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 104 Bool m_bDumpPartInfo; 105 #endif 103 106 public: 104 107 TEncSlice(); … … 128 131 UInt getSliceIdx() { return m_uiSliceIdx; } 129 132 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 133 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping 134 Void setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;}; 135 #endif 130 136 }; 131 137 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r166 r193 87 87 #if VSP_SLICE_HEADER 88 88 m_bUseVSP = false; 89 #endif 90 89 m_bVSPDepthDisable = false; 90 #endif 91 91 } 92 92 … … 198 198 m_pcPicVSP = new TComPic; 199 199 m_pcPicVSP->create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 200 //m_pcPicVSP->getCurrSlice()->setViewId( this->getViewId() );201 m_pcPicVSP->getCurrSlice()->setViewId( NUM_VIEW_VSP );202 200 m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_iViewOrderIdx ); 203 201 204 202 m_pcPicAvail = new TComPic; 205 203 m_pcPicAvail->create( getSourceWidth(), getSourceHeight(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 206 m_pcPicAvail->getCurrSlice()->setViewId( 99 );207 204 m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_iViewOrderIdx ); 208 205 #endif 209 210 206 } 211 207 … … 854 850 m_cSPS.setUseDMM( m_bUseDMM ); 855 851 #endif 852 #if OL_DEPTHLIMIT_A0044 853 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 854 #endif 856 855 #if HHI_MPI 857 856 m_cSPS.setUseMVI( m_bUseMVI ); … … 894 893 } 895 894 } 895 #if VSP_N 896 m_cSPS.setVspPresentFlag( m_bUseVSP ); 897 #if VSP_CFG 898 m_cSPS.setVspDepthPresentFlag( m_bVSPDepthDisable ? false : true ); 899 #endif 900 #endif 896 901 } 897 902 … … 1185 1190 1186 1191 // # substreams is "per tile" when tiles are independent. 1192 #if FIX_REMOVE_TILE_DEPENDENCE 1193 if ( m_iWaveFrontSynchro ) 1194 #else 1187 1195 if (m_iTileBoundaryIndependenceIdr && m_iWaveFrontSynchro) 1196 #endif 1188 1197 { 1189 1198 m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.h
r166 r193 150 150 #endif 151 151 152 #if VSP_SLICE_HEADER153 Bool m_bUseVSP;154 #endif155 156 152 protected: 157 153 Void xGetNewPicBuffer ( TComPic*& rpcPic ); ///< get picture buffer which will be processed … … 251 247 #endif 252 248 253 #if VSP_SLICE_HEADER254 Void setUseVSP ( Bool val ) { m_bUseVSP = val; }255 Bool getUseVSP () { return m_bUseVSP; }256 #endif257 258 249 // ------------------------------------------------------------------------------------------------------------------- 259 250 // encoder function -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
r166 r193 42 42 m_iWidth = -1; 43 43 m_iHeight = -1; 44 #if FIX_VSO_SETUP 45 m_iUsedHeight = -1; 46 #endif 44 47 m_iNumOfBaseViews = -1; 45 48 m_iSampledWidth = -1; … … 434 437 { 435 438 AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews ); 439 #if FIX_VSO_SETUP 440 AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth ); 441 AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth ); 442 #else 436 443 AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth ); 437 444 AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth ); 445 #endif 438 446 439 447 pcPicYuvVideoData->extendPicBorder(); 440 448 441 442 443 449 #if FIX_VSO_SETUP 450 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iUsedHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] ); 451 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] ); 452 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] ); 453 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 454 #else 444 455 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] ); 445 456 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] ); 446 457 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] ); 447 458 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 459 #endif 448 460 449 461 // Used for rendering reference pic from original video data … … 453 465 if ( m_abSetupVideoFromOrgForView[iViewNum] ) 454 466 { 467 #if FIX_VSO_SETUP 468 AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 469 pcPicYuvOrgVideoData->extendPicBorder(); 470 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iUsedHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] ); 471 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] ); 472 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] ); 473 #else 455 474 AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 456 475 pcPicYuvOrgVideoData->extendPicBorder(); … … 458 477 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] ); 459 478 TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr() + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] ); 479 #endif 460 480 } 461 481 462 482 if ( m_abSetupDepthFromOrgForView[iViewNum] ) 463 483 { 484 #if FIX_VSO_SETUP 485 AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 486 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 487 #else 464 488 AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 465 489 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 490 #endif 466 491 } 467 492 } … … 471 496 { 472 497 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 498 499 #if FIX_VSO_SETUP 500 m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight ); 501 #endif 473 502 474 503 // Switch model to original data for setup if given to render reference … … 476 505 for (Int iBaseViewIdx = 0; iBaseViewIdx < m_iNumOfBaseViews; iBaseViewIdx++ ) 477 506 { 478 479 507 Bool bSetupFromOrgVideo = m_abSetupVideoFromOrgForView[iBaseViewIdx]; 480 508 Bool bSetupFromOrgDepth = m_abSetupDepthFromOrgForView[iBaseViewIdx]; … … 492 520 } 493 521 522 #if FIX_VSO_SETUP 523 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false ); 524 #else 494 525 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff ); 526 #endif 495 527 496 528 // Setup to Org … … 513 545 514 546 // setup keeping reference rendered from original data 547 #if FIX_VSO_SETUP 548 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true ); 549 #else 515 550 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff); 551 #endif 516 552 } 517 553 } … … 543 579 544 580 545 Void 581 #if FIX_VSO_SETUP 582 Void 583 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight ) 584 { 585 AOT( iUsedHeight > m_iHeight ); 586 m_uiHorOff = uiHorOff; 587 m_iUsedHeight = iUsedHeight; 588 } 589 #else 590 Void 546 591 TRenModel::setHorOffset ( UInt uiHorOff ) 547 592 { 548 m_uiHorOff = uiHorOff; 549 } 593 m_uiHorOff = uiHorOff; 594 } 595 #endif 550 596 551 597 #if LGE_VSO_EARLY_SKIP_A0093 … … 560 606 561 607 AOT( iWidth + iStartPosX > m_iWidth ); 608 #if FIX_VSO_SETUP 609 AOT( iHeight + iStartPosY > m_iUsedHeight ); 610 #else 562 611 AOT( iHeight + iStartPosY > m_iHeight ); 612 #endif 613 563 614 AOT( iStartPosX < 0); 564 615 AOT( iStartPosY < 0); … … 593 644 594 645 iWidth = min(iWidth , m_iWidth - iStartPosX ); 646 #if FIX_VSO_SETUP 647 iHeight = min(iHeight, m_iUsedHeight - iStartPosY ); 648 #else 595 649 iHeight = min(iHeight, m_iHeight - iStartPosY ); 650 #endif 596 651 597 652 AOT( iStartPosX < 0); … … 629 684 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 630 685 { 686 #if FIX_VSO_SETUP 687 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv ); 688 #else 631 689 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff ); 690 #endif 632 691 } 633 692 … … 635 694 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 636 695 { 637 #if HHI_VSO_SPEEDUP_A0033 696 #if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP 638 697 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff ); 639 698 #else … … 646 705 { 647 706 TComPicYuv cPicYuvSynth; 707 #if FIX_VSO_SETUP 708 cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 709 #else 648 710 cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 711 #endif 649 712 650 713 TComPicYuv cPicYuvTempRef; 714 #if FIX_VSO_SETUP 715 cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 716 #else 651 717 cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 718 #endif 652 719 653 720 Int64 iSSEY = 0; … … 657 724 for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++) 658 725 { 726 #if FIX_VSO_SETUP 727 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth ); 728 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef ); 729 730 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iUsedHeight , cPicYuvTempRef.getLumaAddr(), cPicYuvTempRef.getStride() ); 731 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride()); 732 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride()); 733 #else 659 734 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 ); 660 735 TComPicYuv* pcPicYuvRef = &cPicYuvTempRef; … … 664 739 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr() , pcPicYuvRef->getCStride()); 665 740 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr() , pcPicYuvRef->getCStride()); 741 #endif 666 742 } 667 743 … … 700 776 } 701 777 } 702 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.h
r101 r193 62 62 63 63 // Set horizontal offset 64 #if FIX_VSO_SETUP 65 Void setupPart ( UInt uiHorOff, Int iUsedHeight ); 66 #else 64 67 Void setHorOffset ( UInt uiHorOff ); 68 #endif 65 69 66 70 // Set Mode 67 Void setErrorMode ( Int iView, Int iContent, int iPlane );71 Void setErrorMode ( Int iView, Int iContent, Int iPlane ); 68 72 69 73 // Get Distortion, set Data … … 100 104 Int m_iSampledWidth; 101 105 Int m_iPad; 106 #if FIX_VSO_SETUP 107 Int m_iUsedHeight; // height currently used in buffer, whereas m_iHeight is the total height of the buffer 108 #endif 109 102 110 103 111 Int m_iNumOfBaseViews; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenSingleModel.cpp
r166 r193 44 44 m_iHeight = -1; 45 45 m_iStride = -1; 46 #if FIX_VSO_SETUP 47 m_iUsedHeight = -1; 48 m_iHorOffset = -1; 49 #endif 46 50 m_iMode = -1; 47 51 m_iPad = PICYUV_PAD; … … 90 94 { 91 95 #ifdef LGE_VSO_EARLY_SKIP_A0093 92 if ( m_pbHorSkip)96 if ( m_pbHorSkip ) 93 97 { 94 98 delete[] m_pbHorSkip; … … 99 103 if ( m_pcInputSamples [0] ) delete[] m_pcInputSamples [0]; 100 104 if ( m_pcInputSamples [1] ) delete[] m_pcInputSamples [1]; 105 106 #if FIX_MEM_LEAKS 107 if ( m_pcOutputSamples ) delete[] m_pcOutputSamples ; 108 #else 101 109 if ( m_pcOutputSamples ) delete m_pcOutputSamples ; 110 #endif 111 112 #if FIX_MEM_LEAKS 113 if ( m_piInvZLUTLeft ) delete[] m_piInvZLUTLeft ; 114 if ( m_piInvZLUTRight ) delete[] m_piInvZLUTRight; 115 116 if ( m_aapiRefVideoPel[0] ) delete[] ( m_aapiRefVideoPel[0] - ( m_aiRefVideoStrides[0] * m_iPad + m_iPad ) ); 117 if ( m_aapiRefVideoPel[1] ) delete[] ( m_aapiRefVideoPel[1] - ( m_aiRefVideoStrides[1] * m_iPad + m_iPad ) ); 118 if ( m_aapiRefVideoPel[2] ) delete[] ( m_aapiRefVideoPel[2] - ( m_aiRefVideoStrides[2] * m_iPad + m_iPad ) ); 119 #endif 102 120 } 103 121 … … 179 197 Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0; 180 198 199 #if FIX_VSO_SETUP 200 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 201 #else 181 202 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 203 #endif 182 204 { 183 205 if ( iViewPos == VIEWPOS_RIGHT ) … … 223 245 224 246 } 225 226 template <BlenMod iBM, Bool bBitInc> Void 247 #if FIX_VSO_SETUP 248 template <BlenMod iBM, Bool bBitInc> Void 249 TRenSingleModelC<iBM,bBitInc>::setupPart ( UInt uiHorOffset, Int iUsedHeight ) 250 { 251 AOT( iUsedHeight > m_iHeight ); 252 253 m_iUsedHeight = iUsedHeight; 254 m_iHorOffset = (Int) uiHorOffset; 255 } 256 #endif 257 258 template <BlenMod iBM, Bool bBitInc> Void 259 #if FIX_VSO_SETUP 260 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) 261 #else 227 262 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOff ) 263 #endif 228 264 { 229 265 AOT( !m_bUseOrgRef && pcOrgVideo ); … … 239 275 if ( pcOrgVideo && !bKeepReference ) 240 276 { 277 #if FIX_VSO_SETUP 278 TRenFilter::copy( pcOrgVideo->getLumaAddr() + m_iHorOffset * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iUsedHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 279 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 280 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 281 #else 241 282 TRenFilter::copy( pcOrgVideo->getLumaAddr() + uiHorOff * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 242 283 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]); 243 284 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]); 285 #endif 244 286 xSetStructRefView(); 245 287 } … … 248 290 xResetStructError(); 249 291 xInitSampleStructs(); 250 292 #if FIX_VSO_SETUP 293 switch ( m_iMode ) 294 { 295 case 0: 296 #if LGE_VSO_EARLY_SKIP_A0093 297 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false ); 298 #else 299 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 300 #endif 301 break; 302 case 1: 303 #ifdef LGE_VSO_EARLY_SKIP_A0093 304 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 305 #else 306 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 307 #endif 308 break; 309 case 2: 310 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight ); 311 #ifdef LGE_VSO_EARLY_SKIP_A0093 312 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false); 313 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false); 314 #else 315 xRenderL<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] ); 316 xRenderR<true>( 0, 0, m_iWidth, m_iUsedHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] ); 317 #endif 318 break; 319 default: 320 AOT(true); 321 } 322 #else 251 323 switch ( m_iMode ) 252 324 { … … 278 350 AOT(true); 279 351 } 352 #endif 280 353 281 354 // Get Rendered View as Reference … … 340 413 #endif 341 414 415 #if FIX_VSO_SETUP 416 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 417 #else 342 418 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 419 #endif 343 420 { 344 421 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 393 470 #endif 394 471 472 #if FIX_VSO_SETUP 473 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 474 #else 395 475 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ ) 476 #endif 396 477 { 397 478 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 536 617 } 537 618 619 #if FIX_VSO_SETUP 620 template <BlenMod iBM, Bool bBitInc> Void 621 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv ) 622 { 623 AOT( pcPicYuv->getWidth() != m_iWidth ); 624 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset ); 625 626 #if HHI_VSO_COLOR_PLANES 627 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 628 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 629 630 // Temp image for chroma down sampling 631 PelImage cTempImage( m_iWidth, m_iUsedHeight, 3, 0); 632 633 Int aiStrides[3]; 634 Pel* apiData [3]; 635 636 cTempImage.getDataAndStrides( apiData, aiStrides ); 637 638 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 639 { 640 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iUsedHeight); 641 } 642 xCopy2PicYuv( apiData, aiStrides, pcPicYuv ); 643 #else 644 Pel RenModelOutPels::* piY; 645 xGetSampleStrTextPtrs(iViewPos, piY); 646 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + m_iHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 647 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 648 #endif 649 } 650 #else 538 651 template <BlenMod iBM, Bool bBitInc> Void 539 652 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) … … 548 661 // Temp image for chroma down sampling 549 662 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 663 550 664 Int aiStrides[3]; 551 665 Pel* apiData [3]; … … 557 671 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 558 672 } 559 560 673 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 561 674 #else … … 566 679 #endif 567 680 } 568 569 681 #endif 682 683 #if FIX_VSO_SETUP 684 template <BlenMod iBM, Bool bBitInc> Void 685 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv ) 686 { 687 AOT( iViewPos != 0 && iViewPos != 1); 688 AOT( pcPicYuv->getWidth() != m_iWidth ); 689 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset ); 690 691 Pel RenModelOutPels::* piD = 0; 692 xGetSampleStrDepthPtrs(iViewPos, piD); 693 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 694 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 695 } 696 697 #else 570 698 template <BlenMod iBM, Bool bBitInc> Void 571 699 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff ) 572 700 { 573 701 AOT( iViewPos != 0 && iViewPos != 1); 574 575 702 AOT( pcPicYuv->getWidth() != m_iWidth ); 576 703 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff ); … … 581 708 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 582 709 } 583 710 #endif 711 712 #if FIX_VSO_SETUP 713 template <BlenMod iBM, Bool bBitInc> Void 714 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) 715 { 716 AOT( pcPicYuv->getWidth() != m_iWidth ); 717 AOT( pcPicYuv->getHeight() < m_iUsedHeight + m_iHorOffset); 718 719 #if HHI_VSO_COLOR_PLANES 720 Pel RenModelOutPels::* piText[3]; 721 piText[0] = &RenModelOutPels::iYRef; 722 piText[1] = &RenModelOutPels::iURef; 723 piText[2] = &RenModelOutPels::iVRef; 724 725 // Temp image for chroma down sampling 726 727 PelImage cTempImage( m_iWidth, m_iUsedHeight, 3, 0); 728 Int aiStrides[3]; 729 Pel* apiData [3]; 730 731 cTempImage.getDataAndStrides( apiData, aiStrides ); 732 733 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 734 { 735 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iUsedHeight); 736 } 737 738 xCopy2PicYuv( apiData, aiStrides, pcPicYuv ); 739 #else 740 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + m_iHorOffset, pcPicYuv->getStride(), m_iWidth, m_iUsedHeight ); 741 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 742 #endif 743 } 744 #else 584 745 template <BlenMod iBM, Bool bBitInc> Void 585 746 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) … … 595 756 596 757 // Temp image for chroma down sampling 758 597 759 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 598 760 Int aiStrides[3]; … … 604 766 { 605 767 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 606 } 768 } 607 769 608 770 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); … … 612 774 #endif 613 775 } 614 776 #endif 615 777 616 778 template <BlenMod iBM, Bool bBitInc> RMDist … … 668 830 // Get Data 669 831 m_ppiCurLUT = m_appiShiftLut [iCurViewPos]; 670 671 832 xSetViewRow ( iStartPosY); 672 833 … … 756 917 { 757 918 break; 758 919 } 759 920 760 921 iCurPosX--; … … 802 963 iEndChangePos = m_iStartChangePosX + iWidth - 1; 803 964 804 805 965 for (Int iPosY = iStartPosY; iPosY < iStartPosY + iHeight; iPosY++ ) 806 966 { 807 808 967 #ifdef LGE_VSO_EARLY_SKIP_A0093 809 968 if( m_bEarlySkip && bFast ) … … 1859 2018 } 1860 2019 2020 #if FIX_VSO_SETUP 2021 template <BlenMod iBM, Bool bBitInc> Void 2022 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ) 2023 { 2024 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getLumaAddr() + m_iHorOffset * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () ); 2025 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCbAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2026 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCrAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2027 } 2028 #else 1861 2029 template <BlenMod iBM, Bool bBitInc> Void 1862 2030 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ) … … 1866 2034 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 1867 2035 } 2036 #endif 1868 2037 1869 2038 template class TRenSingleModelC<BLEND_NONE ,true>; … … 1943 2112 } 1944 2113 #endif 1945 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenSingleModel.h
r105 r193 80 80 // Set Frame dependent data 81 81 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 82 #if FIX_VSO_SETUP 83 virtual Void setupPart ( UInt uiHorOffset, Int iUsedHeight ) = 0; 84 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) = 0; 85 #else 82 86 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0; 87 #endif 83 88 84 89 // Set Data … … 98 103 virtual RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 99 104 105 #if FIX_VSO_SETUP 106 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 107 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 108 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 109 #else 100 110 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 101 111 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 102 112 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0; 113 #endif 103 114 }; 104 115 … … 170 181 // Set Frame dependent data 171 182 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 183 #if FIX_VSO_SETUP 184 Void setupPart ( UInt uiHorOffset, Int uiUsedHeight ); 185 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 186 #else 172 187 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ); 188 #endif 173 189 174 190 #if LGE_VSO_EARLY_SKIP_A0093 … … 187 203 RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 188 204 205 #if FIX_VSO_SETUP 206 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 207 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ); 208 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 209 #else 189 210 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 190 211 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 191 212 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ); 213 #endif 192 214 193 215 private: … … 198 220 ///// Rendering ///// 199 221 // Left to Right 200 #if defLGE_VSO_EARLY_SKIP_A0093222 #if LGE_VSO_EARLY_SKIP_A0093 201 223 __inline Bool xDetectEarlySkipL ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); 202 224 __inline Bool xDetectEarlySkipR ( Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData,Pel* piOrgData, Int iOrgStride ); … … 234 256 __inline Void xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iUL, Pel iUR, Pel iVL, Pel iVR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY, Pel& riU, Pel&riV ); 235 257 #else 236 __inline Void xGetBlendedValue ( Pel iYL, 258 __inline Void xGetBlendedValue ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); 237 259 __inline Void xGetBlendedValueBM1 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); 238 260 __inline Void xGetBlendedValueBM2 ( Pel iYL, Pel iYR, Pel iDepthL, Pel iDepthR, Int iFilledL, Int iFilledR, Pel& riY ); … … 241 263 242 264 // General 243 template<Bool bSet> __inline Void xSetShiftedPelL (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos,Pel iFilled, RMDist& riError );265 template<Bool bSet> __inline Void xSetShiftedPelL (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 244 266 template<Bool bSet> __inline Void xSetShiftedPelBlendL (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 245 267 template<Bool bSet> __inline Void xSetShiftedPelNoBlendL(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 246 268 247 template<Bool bSet> __inline Void xSetShiftedPelR (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos,Pel iFilled, RMDist& riError );269 template<Bool bSet> __inline Void xSetShiftedPelR (Int iSourcePos, Int iSubSourcePos, Int iTargetSPos, Pel iFilled, RMDist& riError ); 248 270 template<Bool bSet> __inline Void xSetShiftedPelBlendR (RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); 249 271 template<Bool bSet> __inline Void xSetShiftedPelNoBlendR(RenModelInPels* pcInSample, Int iSubSourcePos, RenModelOutPels* pcOutSample, Pel iFilled, RMDist& riError ); … … 271 293 Void xInitSampleStructs (); 272 294 Void xSetStructSynthViewAsRefView (); 295 #if FIX_VSO_SETUP 296 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ); 297 #else 273 298 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset ); 274 299 #endif 275 300 276 301 template< typename S, typename T> 277 302 Void xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight ) 278 303 { 304 #if FIX_VSO_SETUP 305 AOT( iWidth != m_iWidth ); 306 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 307 #else 279 308 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 309 #endif 280 310 { 281 311 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 291 321 Void xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight ) 292 322 { 323 #if FIX_VSO_SETUP 324 AOT( iWidth != m_iWidth ); 325 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 326 #else 293 327 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++) 328 #endif 294 329 { 295 330 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 309 344 Int m_iStride; 310 345 Int m_iPad; 346 #if FIX_VSO_SETUP 347 Int m_iUsedHeight; 348 Int m_iHorOffset; 349 #endif 311 350 312 351 Int m_iSampledWidth; 352 #if FIX_VSO_SETUP 353 #else 313 354 Int m_iSampledHeight; 355 #endif 314 356 Int m_iSampledStride; 315 357 316 358 RenModelInPels* m_pcInputSamples[2]; 317 Int 359 Int m_iInputSamplesStride; 318 360 319 361 // Base
Note: See TracChangeset for help on using the changeset viewer.