Changeset 213 in 3DVCSoftware
- Timestamp:
- 31 Dec 2012, 18:33:14 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0
- Files:
-
- 91 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg
r193 r213 157 157 SignHideFlag : 1 # sign hiding 158 158 SignHideThreshold : 4 # sign hiding threshold 159 159 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 160 160 161 161 #============ PCM ================ … … 195 195 InterViewSkip : 0 # interview SKIP mode 196 196 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 197 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 198 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 199 FCO : 0 # Flexible coding order flag in 3DV 200 FCOCodingOrder : T0D0D1T1 # Coding order for Flexible coding order in 3DV 197 201 198 202 … … 201 205 MVI : 1 # motion parameter inheritance 202 206 VSO : 1 # use of view synthesis optimization for depth coding 203 207 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 208 SDC : 1 # use simplified depth coding tree 209 DLT : 1 # use depth lookup table 204 210 205 211 #========== texture coding tools based on depth ========== … … 209 215 #========== view synthesis optimization (VSO) ========== 210 216 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 217 #VSOConfig : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)] # VSO configuration string 218 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 219 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 220 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 221 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 218 222 219 223 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_2view.cfg
r133 r213 151 151 SignHideFlag : 1 # sign hiding 152 152 SignHideThreshold : 4 # sign hiding threshold 153 153 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 154 154 155 155 #============ PCM ================ … … 189 189 InterViewSkip : 0 # interview SKIP mode 190 190 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 191 191 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 192 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 192 193 193 194 #========== depth coding tools ========== -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg
r193 r213 1 2 1 #========== file i/o ========== 3 2 InputFile_0 : org_0.yuv # video input file for view 0 … … 161 160 SignHideFlag : 1 # sign hiding 162 161 SignHideThreshold : 4 # sign hiding threshold 163 162 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 164 163 165 164 #============ PCM ================ … … 199 198 InterViewSkip : 0 # interview SKIP mode 200 199 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 200 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 201 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 202 FCO : 0 # Flexible coding order flag in 3DV 203 FCOCodingOrder : T0D0D1D2T1T2 # Coding order for Flexible coding order in 3DV 201 204 202 205 … … 205 208 MVI : 1 # motion parameter inheritance 206 209 VSO : 1 # use of view synthesis optimization for depth coding 210 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 211 SDC : 1 # use simplified depth coding tree 212 DLT : 1 # use depth lookup table 207 213 208 214 #========== texture coding tools based on depth ========== … … 212 218 #========== view synthesis optimization (VSO) ========== 213 219 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 220 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1 221 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 222 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 223 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 224 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 221 225 222 226 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs/baseCfg_3view.cfg
r133 r213 153 153 SignHideFlag : 1 # sign hiding 154 154 SignHideThreshold : 4 # sign hiding threshold 155 155 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 156 156 157 157 #============ PCM ================ … … 191 191 InterViewSkip : 0 # interview SKIP mode 192 192 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 193 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 194 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 193 195 194 196 -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs_CE_on_VSP/baseCfg_3view_a_texture+depth.All.cfg
r193 r213 161 161 SignHideFlag : 1 # sign hiding 162 162 SignHideThreshold : 4 # sign hiding threshold 163 163 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 164 164 165 165 #============ PCM ================ … … 199 199 InterViewSkip : 0 # interview SKIP mode 200 200 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 201 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 202 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 203 FCO : 0 # Flexible coding order flag in 3DV 204 FCOCodingOrder : T0D0D1D2T1T2 # Coding order for Flexible coding order in 3DV 201 205 202 206 … … 205 209 MVI : 1 # motion parameter inheritance 206 210 VSO : 1 # use of view synthesis optimization for depth coding 207 211 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 212 SDC : 1 # use simplified depth coding tree 213 DLT : 1 # use depth lookup table 208 214 209 215 #========== texture coding tools based on depth ========== … … 214 220 #========== view synthesis optimization (VSO) ========== 215 221 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 222 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1 223 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 224 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 225 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 226 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 216 227 217 228 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs_CE_on_VSP/baseCfg_3view_b_texture+depth.RefOnly.cfg
r193 r213 161 161 SignHideFlag : 1 # sign hiding 162 162 SignHideThreshold : 4 # sign hiding threshold 163 163 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 164 164 165 165 #============ PCM ================ … … 199 199 InterViewSkip : 0 # interview SKIP mode 200 200 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 201 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 202 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 203 FCO : 0 # Flexible coding order flag in 3DV 204 FCOCodingOrder : T0D0D1D2T1T2 # Coding order for Flexible coding order in 3DV 201 205 202 206 … … 205 209 MVI : 1 # motion parameter inheritance 206 210 VSO : 1 # use of view synthesis optimization for depth coding 207 211 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 212 SDC : 1 # use simplified depth coding tree 213 DLT : 1 # use depth lookup table 208 214 209 215 #========== texture coding tools based on depth ========== … … 214 220 #========== view synthesis optimization (VSO) ========== 215 221 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 222 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1 223 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 224 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 225 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 226 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 216 227 217 228 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs_CE_on_VSP/baseCfg_3view_c_textureOnly.All.cfg
r193 r213 161 161 SignHideFlag : 1 # sign hiding 162 162 SignHideThreshold : 4 # sign hiding threshold 163 163 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 164 164 165 165 #============ PCM ================ … … 199 199 InterViewSkip : 0 # interview SKIP mode 200 200 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 201 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 202 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 203 FCO : 0 # Flexible coding order flag in 3DV 204 FCOCodingOrder : T0D0D1D2T1T2 # Coding order for Flexible coding order in 3DV 201 205 202 206 … … 205 209 MVI : 1 # motion parameter inheritance 206 210 VSO : 1 # use of view synthesis optimization for depth coding 207 211 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 212 SDC : 1 # use simplified depth coding tree 213 DLT : 1 # use depth lookup table 208 214 209 215 #========== texture coding tools based on depth ========== 210 216 VSP : 1 211 VSPDepthDisable : 1 212 217 VSPDepthDisable : 0 213 218 214 219 #========== view synthesis optimization (VSO) ========== 215 220 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 221 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1 222 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 223 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 224 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 225 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 216 226 217 227 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/CommonTestConditionsCfgs_CE_on_VSP/baseCfg_3view_d_textureOnly.RefOnly.cfg
r193 r213 161 161 SignHideFlag : 1 # sign hiding 162 162 SignHideThreshold : 4 # sign hiding threshold 163 163 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 164 164 165 165 #============ PCM ================ … … 199 199 InterViewSkip : 0 # interview SKIP mode 200 200 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 201 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 202 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 203 FCO : 0 # Flexible coding order flag in 3DV 204 FCOCodingOrder : T0D0D1D2T1T2 # Coding order for Flexible coding order in 3DV 201 205 202 206 … … 205 209 MVI : 1 # motion parameter inheritance 206 210 VSO : 1 # use of view synthesis optimization for depth coding 207 211 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 212 SDC : 1 # use simplified depth coding tree 213 DLT : 1 # use depth lookup table 208 214 209 215 #========== texture coding tools based on depth ========== 210 216 VSP : 1 211 VSPDepthDisable : 1 212 217 VSPDepthDisable : 0 213 218 214 219 #========== view synthesis optimization (VSO) ========== 215 220 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 221 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string for FCO = 1 222 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 223 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 224 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 225 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 216 226 217 227 #============ Misc. ================ -
branches/HTM-4.0.1-VSP-dev0/cfg/encoder_mvd.cfg
r133 r213 138 138 DeblockingFilterControlPresent: 1 # Dbl control params present (0=not present, 1=present) 139 139 LoopFilterOffsetInAPS : 0 # Dbl params in APS or SliceHeader (0=SliceHeader, 1=APS) 140 LoopFilterDisable 140 LoopFilterDisable : 0 1 # disable deblocking filter 141 141 LoopFilterBetaOffset_div2 : 0 # Range: -13 ~ 13 142 142 LoopFilterTcOffset_div2 : 0 # Range: -13 ~ 13 … … 160 160 SignHideFlag : 1 # sign hiding 161 161 SignHideThreshold : 4 # sign hiding threshold 162 162 IlluCompEnable : 1 # illumination compensation (0: OFF, 1: ON) 163 163 164 164 #============ PCM ================ … … 198 198 InterViewSkip : 0 # interview SKIP mode 199 199 InterViewSkipLambdaScale : 8 # lambda scale for inter-view skip mode 200 DisparitySearchRangeRestriction : 0 # 0: No disparity restriction 1: Use disparity restriction 201 VerticalDisparitySearchRange : 56 # vertical disparity search range (in luma samples) 202 FCO : 0 # Flexible coding order flag in 3DV 203 FCOCodingOrder : T0D0D1T1D2T2 # Coding order for Flexible coding order in 3DV 200 204 201 205 … … 204 208 MVI : 1 # motion parameter inheritance 205 209 VSO : 1 # use of view synthesis optimization for depth coding 206 210 QTLPC : 1 # use of quadtree limitation + predictive coding of the quadtree for depth coding 211 SDC : 1 # use simplified depth coding tree 212 DLT : 1 # use depth lookup table 207 213 208 214 #========== view synthesis optimization (VSO) ========== 209 215 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 (3 view) 210 216 VSOConfig : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)] # VSO configuration string (2 view) 217 #VSOConfig : [ox0 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)][ox2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string 218 #VSOConfig : [ox0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)] # VSO configuration string 219 WVSO : 1 # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 220 VSOWeight : 10 # weight of VSO ( in SAD case, cf. squared in SSE case ) 221 VSDWeight : 1 # weight of VSD ( in SAD case, cf. squared in SSE case ) 222 DWeight : 1 # weight of depth distortion itself ( in SAD case, cf. squared in SSE case ) 223 211 224 212 225 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r193 r213 82 82 Void TAppDecTop::decode() 83 83 { 84 #if VIDYO_VPS_INTEGRATION 84 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 85 85 increaseNumberOfViews( 0, 0, 0 ); 86 86 #else … … 88 88 #endif 89 89 90 #if FLEX_CODING_ORDER_M23723 91 Int iDepthViewIdx = 0; 92 Int iTextureViewIdx=0; 93 Bool firstFrame=1; 94 Bool viewIdZero=true; 95 Int fcoIndex=0; //when the current frame is not first frame,use FCO_index stand for viewDepth. 96 #endif 97 90 98 #if SONY_COLPIC_AVAILABILITY 91 99 m_tDecTop[0]->setViewOrderIdx(0); … … 102 110 pcListPic[i] = NULL; 103 111 newPicture[i] = false; 112 #if FLEX_CODING_ORDER_M23723 113 #if FIX_FCO_COMP_WARNING 114 m_fcoOrder[i] = ' '; 115 #else 116 m_fcoOrder[i]=NULL; 117 #endif 118 #endif 119 104 120 } 105 121 … … 145 161 { 146 162 read(nalu, nalUnit); 163 #if QC_MVHEVC_B0046 164 viewDepthId = nalu.m_layerId; 165 Int depth = 0; 166 Int viewId = viewDepthId; 167 #else 147 168 #if VIDYO_VPS_INTEGRATION 148 169 Int viewId = 0; … … 156 177 depth = getVPSAccess()->getActiveVPS()->getDepthFlag(nalu.m_layerId); 157 178 } 179 #if FLEX_CODING_ORDER_M23723 180 if (viewId>0) 181 { 182 viewIdZero=false; 183 } 184 if (viewIdZero==false&&viewId==0) 185 { 186 firstFrame=0; //if viewId has been more than zero and now it set to zero again, we can see that it is not the first view 187 } 188 if (firstFrame) 189 { // if the current view is first frame, we set the viewDepthId as texture plus depth and get the FCO order 190 viewDepthId = iDepthViewIdx+iTextureViewIdx; 191 m_fcoViewDepthId=viewDepthId; 192 } 193 else 194 {//if current view is not first frame, we set the viewDepthId depended on the FCO order 195 viewDepthId=0; 196 if (depth) 197 { 198 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 199 { 200 if (m_fcoOrder[fcoIndex]=='D') 201 { 202 if (viewId==viewDepthId) 203 break; 204 else 205 viewDepthId++; 206 } 207 } 208 } 209 else 210 { 211 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 212 { 213 if (m_fcoOrder[fcoIndex]=='T') 214 { 215 if (viewId==viewDepthId) 216 break; 217 else 218 viewDepthId++; 219 } 220 } 221 } 222 223 viewDepthId=fcoIndex; 224 225 } 226 227 228 #else 158 229 viewDepthId = nalu.m_layerId; // coding order T0D0T1D1T2D2 230 #endif 231 159 232 #else 160 233 Int viewId = nalu.m_viewId; 161 234 Int depth = nalu.m_isDepth ? 1 : 0; 235 #if FLEX_CODING_ORDER_M23723 236 if (viewId>0) 237 { 238 viewIdZero=false; 239 } 240 if (viewIdZero==false&&viewId==0) 241 { 242 firstFrame=0; 243 } 244 if (firstFrame) 245 { 246 viewDepthId = iDepthViewIdx+iTextureViewIdx; 247 m_fcoViewDepthId=viewDepthId; 248 } 249 else 250 { 251 viewDepthId=0; 252 if (depth) 253 { 254 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 255 { 256 if (m_fcoOrder[fcoIndex]=='D') 257 { 258 if (viewId==viewDepthId) 259 break; 260 else 261 viewDepthId++; 262 } 263 } 264 } 265 else 266 { 267 for (fcoIndex=0;fcoIndex<2*MAX_VIEW_NUM;fcoIndex++ ) 268 { 269 if (m_fcoOrder[fcoIndex]=='T') 270 { 271 if (viewId==viewDepthId) 272 break; 273 else 274 viewDepthId++; 275 } 276 } 277 } 278 viewDepthId=fcoIndex; 279 } 280 #else 162 281 viewDepthId = viewId * 2 + depth; // coding order T0D0T1D1T2D2 163 282 #endif 164 283 #endif 284 #endif 165 285 newPicture[viewDepthId] = false; 166 286 if( viewDepthId >= m_tDecTop.size() ) 167 287 { 168 #if VIDYO_VPS_INTEGRATION 288 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 169 289 increaseNumberOfViews( viewDepthId, viewId, depth ); 170 290 #else … … 195 315 if( !(m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) ) 196 316 { 317 #if QC_MVHEVC_B0046 318 if(viewDepthId && m_tDecTop[viewDepthId]->m_bFirstNal== false) 319 { 320 m_tDecTop[viewDepthId]->m_bFirstNal = true; 321 ParameterSetManagerDecoder* pDecV0 = m_tDecTop[0]->xGetParaSetDec(); 322 m_tDecTop[viewDepthId]->xCopyVPS(pDecV0->getPrefetchedVPS(0)); 323 m_tDecTop[viewDepthId]->xCopySPS(pDecV0->getPrefetchedSPS(0)); 324 m_tDecTop[viewDepthId]->xCopyPPS(pDecV0->getPrefetchedPPS(0)); 325 } 326 #endif 197 327 newPicture[viewDepthId] = m_tDecTop[viewDepthId]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[viewDepthId]); 198 328 if (newPicture[viewDepthId]) … … 209 339 { 210 340 previousPictureDecoded = true; 341 #if FLEX_CODING_ORDER_M23723 342 if (firstFrame) 343 { 344 if (depth) 345 { 346 iDepthViewIdx++; 347 m_fcoOrder[viewDepthId]='D'; 348 } 349 else 350 { 351 iTextureViewIdx++; 352 m_fcoOrder[viewDepthId]='T'; 353 } 354 } 355 356 #endif 211 357 } 212 358 } … … 218 364 if( pcListPic[viewDepthId] ) 219 365 { 366 #if QC_REM_IDV_B0046 367 Int iviewId = m_tDecTop[viewDepthId]->getViewId(); 368 if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || ((nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR && iviewId) && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) ) 369 #else 220 370 if( newPicture[viewDepthId] && (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV && m_tDecTop[viewDepthId]->getNalUnitTypeBaseView() == NAL_UNIT_CODED_SLICE_IDR)) ) 371 #endif 221 372 { 222 373 xFlushOutput( pcListPic[viewDepthId], viewDepthId ); … … 275 426 m_tDecTop[viewDepthIdx]->destroy() ; 276 427 } 428 #if QC_MVHEVC_B0046 429 if(viewDepthIdx) 430 { 431 //Call clear function to remove the record, which has been freed during viewDepthIdx = 0 case. 432 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearSPS(); 433 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearVPS(); 434 m_tDecTop[viewDepthIdx]->xGetParaSetDec()->clearPPS(); 435 } 436 #endif 277 437 delete m_tDecTop[viewDepthIdx] ; 278 438 m_tDecTop[viewDepthIdx] = NULL ; … … 416 576 m_pocLastDisplay[viewDepthId] = -MAX_INT; 417 577 } 418 #if VIDYO_VPS_INTEGRATION 578 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 419 579 Void TAppDecTop::increaseNumberOfViews ( UInt layerId, UInt viewId, UInt isDepth ) 420 580 #else … … 422 582 #endif 423 583 { 424 #if VIDYO_VPS_INTEGRATION 584 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 425 585 Int newNumberOfViewDepth = layerId + 1; 426 586 #endif … … 429 589 m_outputBitDepth = g_uiBitDepth + g_uiBitIncrement; 430 590 } 431 #if !VIDYO_VPS_INTEGRATION 591 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 432 592 Int viewId = (newNumberOfViewDepth-1)>>1; // coding order T0D0T1D1T2D2 433 593 Bool isDepth = ((newNumberOfViewDepth % 2) == 0); // coding order T0D0T1D1T2D2 … … 436 596 m_useDepth = true; 437 597 438 #if FIX_DECODING_WO_WRITING439 598 if ( m_pchReconFile ) 440 599 { 441 #endif442 600 while( m_tVideoIOYuvReconFile.size() < newNumberOfViewDepth) 443 601 { 444 602 m_tVideoIOYuvReconFile.push_back(new TVideoIOYuv); 445 603 Char buffer[4]; 446 #if VIDYO_VPS_INTEGRATION 604 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 447 605 sprintf(buffer,"_%i", viewId ); 448 606 #else … … 450 608 #endif 451 609 Char* nextFilename = NULL; 452 #if VIDYO_VPS_INTEGRATION 610 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 453 611 if( isDepth) 454 612 #else … … 465 623 xAppendToFileNameEnd( m_pchReconFile, buffer, nextFilename); 466 624 } 467 #if !VIDYO_VPS_INTEGRATION 625 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 468 626 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 469 627 #endif … … 473 631 free ( nextFilename ); 474 632 } 475 #if FIX_DECODING_WO_WRITING 476 } 477 #endif 633 } 478 634 479 635 while( m_pocLastDisplay.size() < newNumberOfViewDepth ) … … 484 640 { 485 641 m_tDecTop.push_back(new TDecTop); 486 #if !VIDYO_VPS_INTEGRATION 642 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 487 643 if( isDepth || ( !isDepth && (m_tVideoIOYuvReconFile.size() % 2) == 1 ) ) 488 644 { … … 494 650 m_tDecTop.back()->setPictureDigestEnabled(m_pictureDigestEnabled); 495 651 m_tDecTop.back()->setCamParsCollector( &m_cCamParsCollector ); 496 #if !VIDYO_VPS_INTEGRATION 652 #if !VIDYO_VPS_INTEGRATION&!QC_MVHEVC_B0046 497 653 } 498 654 #endif … … 502 658 TDecTop* TAppDecTop::getTDecTop( Int viewId, Bool isDepth ) 503 659 { 660 #if FLEX_CODING_ORDER_M23723 661 Int viewnumber=0; 662 Int i=0; 663 Bool fcoFlag=0; 664 if (viewId>m_fcoViewDepthId) 665 { 666 return NULL; 667 } 668 else 669 { 670 if (isDepth) 671 { 672 for ( i=0; i<=m_fcoViewDepthId;i++) 673 { 674 if (m_fcoOrder[i]=='D') 675 { 676 if (viewnumber==viewId) 677 { 678 fcoFlag=1; 679 break; 680 } 681 else 682 viewnumber++; 683 } 684 } 685 } 686 else 687 { 688 for ( i=0; i<=m_fcoViewDepthId;i++) 689 { 690 if (m_fcoOrder[i]=='T') 691 { 692 if (viewnumber==viewId) 693 { 694 fcoFlag=1; 695 break; 696 } 697 else 698 viewnumber++; 699 } 700 } 701 } 702 if (fcoFlag) 703 { 704 return m_tDecTop[i]; 705 } 706 else 707 return NULL; 708 709 } 710 711 // coding order T0D0T1D1T2D2 712 #else 504 713 return m_tDecTop[(isDepth ? 1 : 0) + viewId * 2]; // coding order T0D0T1D1T2D2 714 #endif 715 505 716 } 506 717 … … 521 732 assert( ( viewId >= 0 ) ); 522 733 734 #if FLEX_CODING_ORDER_M23723 735 if (getTDecTop(viewId,isDepth)) 736 { 523 737 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 524 738 TComPic* pcPic = NULL; … … 532 746 } 533 747 return pcPic; 748 } 749 else 750 return NULL; 751 #else 752 753 TComList<TComPic*>* apcListPic = getTDecTop( viewId, isDepth )->getListPic(); 754 TComPic* pcPic = NULL; 755 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 756 { 757 if( (*it)->getPOC() == poc ) 758 { 759 pcPic = *it; 760 break; 761 } 762 } 763 return pcPic; 764 #endif 534 765 } 535 766 … … 557 788 AOF(pcPicYuvAvail); 558 789 559 TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth ); 790 //TComPic* pcPic = getPicFromView( iCodedViewIdx, iCurPoc, bDepth ); 791 TComPic* pcPic = NULL; 792 for( Int i=0; i<m_tDecTop.size() && pcPic==NULL; i++) 793 { 794 if( iCodedViewIdx == m_tDecTop[i]->getViewId() && bDepth == m_tDecTop[i]->getIsDepth() ) 795 { 796 797 TComList<TComPic*>* apcListPic = m_tDecTop[i]->getListPic(); 798 for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ ) 799 { 800 if( (*it)->getPOC() == iCurPoc ) 801 { 802 pcPic = *it; 803 break; 804 } 805 } 806 807 } 808 } 560 809 pcPic->setPicYuvSynth( pcPicYuvVSP ); 561 810 pcPic->setPicYuvAvail( pcPicYuvAvail ); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppDecoder/TAppDecTop.h
r193 r213 74 74 Bool m_useDepth; 75 75 76 #if FLEX_CODING_ORDER_M23723 77 Int m_fcoViewDepthId; 78 Char m_fcoOrder[MAX_VIEW_NUM*2]; 79 #endif 80 76 81 FILE* m_pScaleOffsetFile; 77 82 CamParsCollector m_cCamParsCollector; 78 83 #if DEPTH_MAP_GENERATION 79 #if VIDYO_VPS_INTEGRATION 84 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 80 85 TComVPSAccess m_cVPSAccess; 81 86 #endif … … 95 100 Void destroy (); ///< destroy internal members 96 101 Void decode (); ///< main decoding function 97 #if VIDYO_VPS_INTEGRATION 102 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 98 103 Void increaseNumberOfViews (UInt layerId, UInt viewId, UInt isDepth); 99 104 #else -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r193 r213 74 74 { 75 75 m_aidQP = NULL; 76 #if FIXES77 76 m_aidQPdepth = NULL; 78 #endif79 77 } 80 78 … … 86 84 } 87 85 88 #if FIXES89 86 if ( m_aidQPdepth ) 90 87 { 91 88 delete[] m_aidQPdepth; m_aidQPdepth = NULL; 92 89 } 93 #endif94 90 95 91 for(Int i = 0; i< m_pchInputFileList.size(); i++ ) … … 115 111 if (m_pchBitstreamFile != NULL) 116 112 free (m_pchBitstreamFile) ; 113 #if FLEX_CODING_ORDER_M23723 114 if (m_pchMVCJointCodingOrder != NULL) 115 { 116 free(m_pchMVCJointCodingOrder) ; 117 } 118 #endif 117 119 #if HHI_VSO 118 120 if ( m_pchVSOConfig != NULL) … … 120 122 #endif 121 123 122 #if FIX_MEM_LEAKS123 124 if ( m_pchCameraParameterFile != NULL ) 124 125 free ( m_pchCameraParameterFile ); … … 139 140 free ( m_scalingListFile ); 140 141 141 #endif142 142 143 143 } … … 225 225 string cfg_RowHeight; 226 226 string cfg_ScalingListFile; 227 228 #if FLEX_CODING_ORDER_M23723 229 string cfg_JointCodingOrdering; 230 #endif 231 227 232 po::Options opts; 228 233 opts.addOptions() … … 268 273 269 274 ("NumberOfViews", m_iNumberOfViews, 0, "Number of views") 275 #if FLEX_CODING_ORDER_M23723 276 ("FCO", m_b3DVFlexOrder, false, "flexible coding order flag" ) 277 ("FCOCodingOrder", cfg_JointCodingOrdering, string(""), "The coding order for joint texture-depth coding") 278 #endif 270 279 /* Unit definition parameters */ 271 280 ("MaxCUWidth", m_uiMaxCUWidth, 64u) … … 298 307 ("FastSearch", m_iFastSearch, 1, "0:Full search 1:Diamond 2:PMVFAST") 299 308 ("SearchRange,-sr",m_iSearchRange, 96, "motion search range") 309 #if DV_V_RESTRICTION_B0037 310 ("DisparitySearchRangeRestriction",m_bUseDisparitySearchRangeRestriction, false, "restrict disparity search range") 311 ("VerticalDisparitySearchRange",m_iVerticalDisparitySearchRange, 56, "vertical disparity search range") 312 #endif 300 313 ("BipredSearchRange", m_bipredSearchRange, 4, "motion search range for bipred refinement") 301 314 ("HadamardME", m_bUseHADME, true, "hadamard ME for fractional-pel") … … 342 355 ("LoopFilterBetaOffset_div2", m_loopFilterBetaOffsetDiv2, 0 ) 343 356 ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 ) 357 #if LGE_ILLUCOMP_B0045 358 ("IlluCompEnable", m_bUseIC , true , "Use illumination compensation for inter-view prediction" ) 359 #endif 344 360 #if DBL_CONTROL 345 #if FIX_DBL_CONTROL_DEFAULT346 361 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true) 347 #else348 ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false)349 #endif350 362 #endif 351 363 352 364 /* Camera Paremetes */ 353 365 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 366 #if QC_MVHEVC_B0046 367 ("BaseViewCameraNumbers" , m_aiVId, std::vector<Int>(1, MAX_VIEW_NUM), "Numbers of base views") 368 #endif 354 369 ("BaseViewCameraNumbers" , m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 355 370 … … 362 377 ("LambdaScaleVSO", m_dLambdaScaleVSO , (Double) 1 , "Lambda Scaling for VSO") 363 378 364 #if HHI_VSO_LS_TABLE 379 #if HHI_VSO_LS_TABLE_M23714 365 380 ("VSOLSTable", m_bVSOLSTable , true , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" ) 366 381 #endif … … 377 392 #endif 378 393 #if LGE_WVSO_A0119 379 ("WVSO", m_bUseWVSO , false, "Use depth fidelity term for VSO" )394 ("WVSO", m_bUseWVSO , true , "Use depth fidelity term for VSO" ) 380 395 ("VSOWeight", m_iVSOWeight , 10 , "Synthesized View Distortion Change weight" ) 381 396 ("VSDWeight", m_iVSDWeight , 1 , "View Synthesis Distortion estimate weight" ) … … 383 398 #endif 384 399 385 #if OL_DEPTHLIMIT_A0044 386 ("DPL", m_bDepthPartitionLimiting , false , "Use DepthPartitionLimiting" ) 387 #endif 400 #if OL_QTLIMIT_PREDCODING_B0068 401 ("QTLPC", m_bUseQTLPC , true , "Use depth Quadtree Limitation + Predictive Coding" ) 402 #endif 403 388 404 #endif 389 405 … … 474 490 "\t0: disable") 475 491 492 #if TMVP_DEPTH_SWITCH 493 ("TMVP", m_enableTMVP, std::vector<Bool>(1,true), "Enable TMVP" ) 494 #else 476 495 ("TMVP", m_enableTMVP, true, "Enable TMVP" ) 496 #endif 477 497 478 498 ("FEN", m_bUseFastEnc, false, "fast encoder setting") … … 493 513 #if HHI_MPI 494 514 ("MVI", m_bUseMVI, false, "use motion vector inheritance for depth map coding") 515 #endif 516 #if RWTH_SDC_DLT_B0036 517 ("DLT", m_bUseDLT, true, "use depth lookup table for depth map coding") 518 ("SDC", m_bUseSDC, true, "use simplified depth coding tree") 495 519 #endif 496 520 ; … … 545 569 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str()); 546 570 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 547 571 #if FLEX_CODING_ORDER_M23723 572 m_pchMVCJointCodingOrder= cfg_JointCodingOrdering.empty()?NULL:strdup(cfg_JointCodingOrdering.c_str()); 573 // If flexible order is enabled and if depth comes before the texture for a view, disable VSO 574 #if HHI_VSO && DISABLE_FCO_FOR_VSO 575 Bool depthComesFirst = false; 576 int iter = 0; 577 if ( m_b3DVFlexOrder ) 578 { 579 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 580 { 581 iter = 0; 582 for ( Int ii=1; ii<12; ii+=2 ) 583 { 584 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 585 if ( iViewIdxCfg == iViewIdx ) 586 { 587 iter ++; 588 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 589 { 590 if(iter == 1) 591 { 592 depthComesFirst = true; 593 break; 594 } 595 } 596 else 597 { 598 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 599 } 600 } 601 } 602 } 603 } 604 if (depthComesFirst) 605 { 606 m_bUseVSO = false; 607 } 608 #endif 609 #endif 548 610 m_pchColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); 549 611 m_pchRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); … … 704 766 xCleanUpVectors(); 705 767 768 769 #if TMVP_DEPTH_SWITCH 770 if ( m_enableTMVP.size() < 2) 771 { 772 m_enableTMVP.push_back( m_enableTMVP[0] ); 773 } 774 #endif 775 776 706 777 #if HHI_VSO 707 778 if ( m_abUseALF .size() < 2) … … 732 803 #if HHI_VSO 733 804 734 #if HHI_VSO_LS_TABLE 805 #if HHI_VSO_LS_TABLE_M23714 735 806 // Q&D 736 807 Double adLambdaScaleTable[] = … … 796 867 } 797 868 #else 869 #if !QC_MVHEVC_B0046 798 870 m_cCameraData .init ( (UInt)m_iNumberOfViews, 799 871 m_uiInputBitDepth, … … 807 879 LOG2_DISP_PREC_LUT ); 808 880 #endif 881 #endif 809 882 810 883 811 884 // check validity of input parameters 812 885 xCheckParameter(); 886 #if !QC_MVHEVC_B0046 813 887 m_cCameraData.check( false, true ); 814 888 #endif 815 889 // print-out parameters 816 890 xPrintParameter(); … … 860 934 xConfirmPara( m_iFastSearch < 0 || m_iFastSearch > 2, "Fast Search Mode is not supported value (0:Full search 1:Diamond 2:PMVFAST)" ); 861 935 xConfirmPara( m_iSearchRange < 0 , "Search Range must be more than 0" ); 936 #if DV_V_RESTRICTION_B0037 937 xConfirmPara( m_iVerticalDisparitySearchRange <= 0 , "Vertical Disparity Search Range must be more than 0" ); 938 #endif 862 939 xConfirmPara( m_bipredSearchRange < 0 , "Search Range must be more than 0" ); 863 940 xConfirmPara( m_iMaxDeltaQP > 7, "Absolute Delta QP exceeds supported range (0 to 7)" ); … … 1650 1727 printf("Min PCM size : %d\n", 1 << m_uiPCMLog2MinSize); 1651 1728 printf("Motion search range : %d\n", m_iSearchRange ); 1729 #if DV_V_RESTRICTION_B0037 1730 printf("Disp search range restriction: %d\n", m_bUseDisparitySearchRangeRestriction ); 1731 printf("Vertical disp search range : %d\n", m_iVerticalDisparitySearchRange ); 1732 #endif 1652 1733 printf("Intra period : %d\n", m_iIntraPeriod ); 1653 1734 printf("Decoding refresh type : %d\n", m_iDecodingRefreshType ); … … 1685 1766 printf("VSO Negative Distortion : %d\n", m_bAllowNegDist ? 1 : 0); 1686 1767 #endif 1687 #if HHI_VSO_LS_TABLE 1768 #if HHI_VSO_LS_TABLE_M23714 1688 1769 printf("VSO LS Table : %d\n", m_bVSOLSTable ? 1 : 0); 1689 1770 #endif … … 1769 1850 printf(" ScalingList:%d ", m_useScalingListId ); 1770 1851 1852 #if !TMVP_DEPTH_SWITCH 1771 1853 printf("TMVP:%d ", m_enableTMVP ); 1854 #endif 1772 1855 1773 1856 #if ADAPTIVE_QP_SELECTION … … 1783 1866 printf("SAO:%d ", (m_abUseSAO [0] ? 1 : 0)); 1784 1867 printf("RDQ:%d ", (m_abUseRDOQ[0] ? 1 : 0) ); 1868 #if TMVP_DEPTH_SWITCH 1869 printf("TMVP:%d ", (m_enableTMVP[0] ? 1 : 0) ); 1870 #endif 1871 #if LGE_ILLUCOMP_B0045 1872 printf("IlluCompEnable: %d ", m_bUseIC); 1873 #endif 1874 1785 1875 printf("\n"); 1786 1876 … … 1789 1879 printf("SAO:%d ", (m_abUseSAO [1] ? 1 : 0)); 1790 1880 printf("RDQ:%d ", (m_abUseRDOQ[1] ? 1 : 0)); 1881 #if TMVP_DEPTH_SWITCH 1882 printf("TMVP:%d ", (m_enableTMVP[1] ? 1 : 0) ); 1883 #endif 1884 #if FLEX_CODING_ORDER_M23723 1885 printf("FCO:%d ", (m_b3DVFlexOrder ? 1: 0)); 1886 1887 if(m_b3DVFlexOrder) 1888 { 1889 printf("CodingOrder: %s ", m_pchMVCJointCodingOrder); 1890 } 1891 #endif 1791 1892 #if HHI_VSO 1792 1893 printf("VSO:%d ", m_bUseVSO ); … … 1795 1896 printf("WVSO:%d ", m_bUseWVSO ); 1796 1897 #endif 1797 #if OL_ DEPTHLIMIT_A00441798 printf(" DPL:%d ", m_bDepthPartitionLimiting);1898 #if OL_QTLIMIT_PREDCODING_B0068 1899 printf("QTLPC:%d ", m_bUseQTLPC); 1799 1900 #endif 1800 1901 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX … … 1804 1905 printf("MVI:%d ", m_bUseMVI ? 1 : 0 ); 1805 1906 #endif 1907 #if RWTH_SDC_DLT_B0036 1908 printf("SDC:%d ", m_bUseSDC ? 1 : 0 ); 1909 printf("DLT:%d ", m_bUseDLT ? 1 : 0 ); 1910 #endif 1806 1911 #if LGE_WVSO_A0119 1807 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1912 if ( m_bUseWVSO ) 1913 printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight ); 1808 1914 #endif 1809 1915 printf("\n\n"); -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncCfg.h
r193 r213 88 88 Int m_iNumberOfViews; ///< number Views to Encode 89 89 Bool m_bUsingDepthMaps; 90 91 #if FLEX_CODING_ORDER_M23723 92 Char* m_pchMVCJointCodingOrder; ///< texture-depth coding order 93 Bool m_b3DVFlexOrder; ///< flexible coding order flag 94 #endif 95 90 96 // coding structure 91 97 Int m_iIntraPeriod; ///< period of I-slice (random access period) … … 109 115 std::vector<Double> m_adQP; ///< QP value of key-picture (floating point) [0] video, [1] depth 110 116 std::vector<Int> m_aiQP; ///< QP value of key-picture (integer) [0] video, [1] depth 117 #if QC_MVHEVC_B0046 118 std::vector<Int> m_aiVId; ///< view id 119 #endif 111 120 Int m_aiTLayerQPOffset[MAX_TLAYER]; ///< QP offset corresponding to temporal layer depth 112 121 char* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) … … 160 169 #endif 161 170 vector<Bool> m_abUseSAO; 171 #if LGE_ILLUCOMP_B0045 172 Bool m_bUseIC; ///< flag for using illumination compensation for inter-view prediction 173 #endif 162 174 #if SAO_UNIT_INTERLEAVING 163 175 Int m_maxNumOffsetsPerPic; ///< SAO maximun number of offset per picture … … 197 209 Int m_iFastSearch; ///< ME mode, 0 = full, 1 = diamond, 2 = PMVFAST 198 210 Int m_iSearchRange; ///< ME search range 211 #if DV_V_RESTRICTION_B0037 212 Bool m_bUseDisparitySearchRangeRestriction; ///< restrict vertical search range for inter-view prediction 213 Int m_iVerticalDisparitySearchRange; ///< ME vertical search range for inter-view prediction 214 #endif 199 215 Int m_bipredSearchRange; ///< ME search range for bipred refinement 200 216 Bool m_bUseFastEnc; ///< flag for using fast encoder setting … … 258 274 UInt m_uiBiPredIdc; ///< Use of Bi-Directional Weighting Prediction (B_SLICE): explicit(1) or implicit(2) 259 275 276 #if TMVP_DEPTH_SWITCH 277 vector<Bool> m_enableTMVP; ///< Enable TMVP [0] video, [1] depth 278 #else 260 279 Bool m_enableTMVP; 280 #endif 281 261 282 #if MULTIBITS_DATA_HIDING 262 283 Int m_signHideFlag; … … 266 287 Bool m_bUseMVI; ///< flag for using Motion Vector Inheritance for depth map coding 267 288 #endif 289 #if RWTH_SDC_DLT_B0036 290 Bool m_bUseDLT; 291 Bool m_bUseSDC; 292 #endif 268 293 269 294 Int m_useScalingListId; ///< using quantization matrix … … 273 298 Char* m_pchCameraParameterFile; ///< camera parameter file 274 299 Char* m_pchBaseViewCameraNumbers; 300 #if !QC_MVHEVC_B0046 275 301 TAppComCamPara m_cCameraData; 276 302 #endif 277 303 Int m_iCodedCamParPrecision; ///< precision for coding of camera parameters 278 304 … … 280 306 Char* m_pchVSOConfig; 281 307 Bool m_bUseVSO; ///< flag for using View Synthesis Optimization 282 #if HHI_VSO_LS_TABLE 308 #if HHI_VSO_LS_TABLE_M23714 283 309 Bool m_bVSOLSTable; ///< Depth QP dependent Lagrange parameter optimization (m23714) 284 310 #endif … … 313 339 #endif 314 340 315 #if OL_ DEPTHLIMIT_A0044316 Bool m_b DepthPartitionLimiting;341 #if OL_QTLIMIT_PREDCODING_B0068 342 Bool m_bUseQTLPC; ///< flag for using depth QuadTree Limitation + Predictive Coding 317 343 #endif 318 344 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r193 r213 67 67 Void TAppEncTop::xInitLibCfg() 68 68 { 69 #if VIDYO_VPS_INTEGRATION 69 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 70 #if !QC_MVHEVC_B0046 70 71 UInt layerId = 0; 72 #endif 71 73 // TODO: fix the assumption here that the temporal structures are all equal across all layers??? 72 74 m_cVPS.setMaxTLayers( m_maxTempLayer[0] ); 75 #if QC_MVHEVC_B0046 76 m_cVPS.setMaxLayers( m_iNumberOfViews ); 77 #else 73 78 m_cVPS.setMaxLayers( m_iNumberOfViews * (m_bUsingDepthMaps ? 2:1) ); 79 #endif 74 80 for(Int i = 0; i < MAX_TLAYER; i++) 75 81 { … … 81 87 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 82 88 { 89 #if VSP_N 90 #if FLEX_CODING_ORDER_M23723 91 Bool isTextureFirst = false; 92 if ( m_b3DVFlexOrder ) 93 { 94 for ( Int ii=1; ii<12; ii+=2 ) 95 { 96 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 97 if ( iViewIdxCfg == iViewIdx ) 98 { 99 if ( m_pchMVCJointCodingOrder[ii-1]=='T' ) 100 { 101 isTextureFirst = true; 102 } 103 else 104 { 105 assert(m_pchMVCJointCodingOrder[ii-1]=='D'); 106 } 107 break; 108 } 109 } 110 } 111 else 112 { 113 isTextureFirst = true; 114 } 115 #endif 116 #endif 83 117 m_frameRcvd.push_back(0); 84 118 m_acTEncTopList.push_back(new TEncTop); … … 101 135 m_acTEncTopList[iViewIdx]->setViewId ( iViewIdx ); 102 136 m_acTEncTopList[iViewIdx]->setIsDepth ( false ); 137 #if QC_MVHEVC_B0046 138 m_acTEncTopList[iViewIdx]->setLayerId ( iViewIdx ); 139 m_cVPS.setViewId ( m_aiVId[ iViewIdx ], iViewIdx ); 140 #else 103 141 m_acTEncTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 104 142 #if VIDYO_VPS_INTEGRATION … … 113 151 #endif 114 152 153 #if VSP_N 115 154 m_acTEncTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 116 155 m_acTEncTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 117 156 m_acTEncTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 118 157 m_acTEncTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 158 #else 159 m_acTEncTopList[iViewIdx]->setCamParPrecision ( 0 ); 160 m_acTEncTopList[iViewIdx]->setCamParInSliceHeader ( false ); 161 m_acTEncTopList[iViewIdx]->setCodedScale ( 0 ); 162 m_acTEncTopList[iViewIdx]->setCodedOffset ( 0 ); 163 #endif 164 #endif 119 165 120 166 //====== Coding Structure ======== … … 170 216 m_acTEncTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 171 217 m_acTEncTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 172 218 #if DV_V_RESTRICTION_B0037 219 m_acTEncTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 220 m_acTEncTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 221 #endif 173 222 //====== Quality control ======== 174 223 m_acTEncTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 300 349 m_acTEncTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 301 350 m_acTEncTopList[iViewIdx]->setUseSAO ( m_abUseSAO[0] ); 351 #if LGE_ILLUCOMP_B0045 352 m_acTEncTopList[iViewIdx]->setUseIC ( m_bUseIC ); 353 #endif 302 354 #if SAO_UNIT_INTERLEAVING 303 355 m_acTEncTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 342 394 m_acTEncTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 343 395 m_acTEncTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 396 #if TMVP_DEPTH_SWITCH 397 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[0] ); 398 #else 344 399 m_acTEncTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 400 #endif 345 401 m_acTEncTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 346 402 m_acTEncTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 364 420 m_acTEncTopList[iViewIdx]->setUseDMM ( false ); 365 421 #endif 366 #if OL_ DEPTHLIMIT_A0044367 m_acTEncTopList[iViewIdx]->setUse DPL( false );422 #if OL_QTLIMIT_PREDCODING_B0068 423 m_acTEncTopList[iViewIdx]->setUseQTLPC ( false ); 368 424 #endif 369 425 #if HHI_MPI 370 426 m_acTEncTopList[iViewIdx]->setUseMVI( false ); 427 #endif 428 #if RWTH_SDC_DLT_B0036 429 m_acTEncTopList[iViewIdx]->setUseDLT ( false ); 430 m_acTEncTopList[iViewIdx]->setUseSDC ( false ); 371 431 #endif 372 432 … … 374 434 m_acTEncTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 375 435 m_acTEncTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 436 #if FLEX_CODING_ORDER_M23723 437 m_acTEncTopList[iViewIdx]->setIsFirstInView( isTextureFirst ); 438 #else 439 m_acTEncTopList[iViewIdx]->setIsFirstInView( true ); 440 #endif 376 441 #endif 377 442 } … … 380 445 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) 381 446 { 447 448 #if FLEX_CODING_ORDER_M23723 449 // Detect whether depth comes before than texture for this view 450 Bool isDepthFirst = false; 451 if ( m_b3DVFlexOrder ) 452 { 453 for ( Int ii=1; ii<12; ii+=2 ) 454 { 455 Int iViewIdxCfg = (Int)(m_pchMVCJointCodingOrder[ii]-'0'); 456 if ( iViewIdxCfg == iViewIdx ) 457 { 458 if ( m_pchMVCJointCodingOrder[ii-1]=='D' ) // depth comes first for this view 459 { 460 isDepthFirst = true; 461 } 462 else 463 { 464 assert(m_pchMVCJointCodingOrder[ii-1]=='T'); 465 } 466 break; 467 } 468 } 469 } 470 #endif 471 382 472 m_depthFrameRcvd.push_back(0); 383 473 m_acTEncDepthTopList.push_back(new TEncTop); … … 400 490 m_acTEncDepthTopList[iViewIdx]->setViewId ( iViewIdx ); 401 491 m_acTEncDepthTopList[iViewIdx]->setIsDepth ( true ); 492 #if QC_MVHEVC_B0046 493 m_acTEncDepthTopList[iViewIdx]->setLayerId ( iViewIdx ); 494 #else 402 495 m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] ); 496 #endif 403 497 #if VIDYO_VPS_INTEGRATION 404 498 layerId = iViewIdx * 2 + 1; … … 410 504 m_cVPS.setDependentLayer ( layerId-1, layerId); 411 505 #endif 506 507 #if VSP_N 508 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( m_cCameraData.getCamParsCodedPrecision () ); 509 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( m_cCameraData.getVaryingCameraParameters() ); 510 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( m_cCameraData.getCodedScale () ); 511 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( m_cCameraData.getCodedOffset () ); 512 #else 412 513 m_acTEncDepthTopList[iViewIdx]->setCamParPrecision ( 0 ); 413 514 m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader ( false ); 414 515 m_acTEncDepthTopList[iViewIdx]->setCodedScale ( 0 ); 415 516 m_acTEncDepthTopList[iViewIdx]->setCodedOffset ( 0 ); 517 #endif 416 518 417 519 //====== Coding Structure ======== … … 467 569 m_acTEncDepthTopList[iViewIdx]->setSearchRange ( m_iSearchRange ); 468 570 m_acTEncDepthTopList[iViewIdx]->setBipredSearchRange ( m_bipredSearchRange ); 469 571 #if DV_V_RESTRICTION_B0037 572 m_acTEncDepthTopList[iViewIdx]->setUseDisparitySearchRangeRestriction ( m_bUseDisparitySearchRangeRestriction ); 573 m_acTEncDepthTopList[iViewIdx]->setVerticalDisparitySearchRange( m_iVerticalDisparitySearchRange ); 574 #endif 470 575 //====== Quality control ======== 471 576 m_acTEncDepthTopList[iViewIdx]->setMaxDeltaQP ( m_iMaxDeltaQP ); … … 584 689 m_acTEncDepthTopList[iViewIdx]->setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 585 690 m_acTEncDepthTopList[iViewIdx]->setUseSAO ( m_abUseSAO[1] ); 691 #if LGE_ILLUCOMP_B0045 692 m_acTEncDepthTopList[iViewIdx]->setUseIC ( false ); 693 #endif 586 694 #if SAO_UNIT_INTERLEAVING 587 695 m_acTEncDepthTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic); … … 626 734 m_acTEncDepthTopList[iViewIdx]->setWaveFrontFlush ( m_iWaveFrontFlush ); 627 735 m_acTEncDepthTopList[iViewIdx]->setWaveFrontSubstreams ( m_iWaveFrontSubstreams ); 736 #if TMVP_DEPTH_SWITCH 737 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP[1] ); 738 #else 628 739 m_acTEncDepthTopList[iViewIdx]->setEnableTMVP ( m_enableTMVP ); 740 #endif 629 741 m_acTEncDepthTopList[iViewIdx]->setUseScalingListId ( m_useScalingListId ); 630 742 m_acTEncDepthTopList[iViewIdx]->setScalingListFile ( m_scalingListFile ); … … 648 760 m_acTEncDepthTopList[iViewIdx]->setUseDMM ( m_bUseDMM ); 649 761 #endif 650 #if OL_DEPTHLIMIT_A0044 651 m_acTEncDepthTopList[iViewIdx]->setUseDPL (m_bDepthPartitionLimiting); 762 #if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX 763 m_acTEncDepthTopList[iViewIdx]->setUseDMM34( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseDMM ); 764 #endif 765 766 #if OL_QTLIMIT_PREDCODING_B0068 767 m_acTEncDepthTopList[iViewIdx]->setUseQTLPC (m_bUseQTLPC); 652 768 #endif 653 769 #if HHI_MPI 654 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 770 #if FLEX_CODING_ORDER_M23723 771 m_acTEncDepthTopList[iViewIdx]->setUseMVI( (m_b3DVFlexOrder && isDepthFirst) ? false : m_bUseMVI ); 772 #else 773 m_acTEncDepthTopList[iViewIdx]->setUseMVI( m_bUseMVI ); 774 #endif 775 #endif 776 #if RWTH_SDC_DLT_B0036 777 m_acTEncDepthTopList[iViewIdx]->setUseDLT ( m_bUseDLT ); 778 m_acTEncDepthTopList[iViewIdx]->setUseSDC ( m_bUseSDC ); 655 779 #endif 656 780 … … 658 782 m_acTEncDepthTopList[iViewIdx]->setUseVSP( m_bUseVSP ); 659 783 m_acTEncDepthTopList[iViewIdx]->setVSPDepthDisable( m_bVSPDepthDisable ); 784 #if FLEX_CODING_ORDER_M23723 785 m_acTEncDepthTopList[iViewIdx]->setIsFirstInView( isDepthFirst ); 786 #else 787 m_acTEncDepthTopList[iViewIdx]->setIsFirstInView( false ); 788 #endif 660 789 #endif 661 790 } … … 677 806 if ( m_uiVSOMode == 4 ) 678 807 { 679 #if HHI_VSO_SPEEDUP_A0033680 808 #if LGE_VSO_EARLY_SKIP_A0093 681 809 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip ); 682 810 #else 683 811 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 ); 684 #endif685 #else686 m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );687 812 #endif 688 813 … … 820 945 { 821 946 m_acTEncTopList[iViewIdx]->init( this ); 947 #if QC_MVHEVC_B0046 948 //set setNumDirectRefLayer 949 Int iNumDirectRef = m_acTEncTopList[iViewIdx]->getSPS()->getNumberOfUsableInterViewRefs(); 950 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setNumDirectRefLayer(iNumDirectRef, iViewIdx); 951 for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++) 952 { 953 Int iLayerId = m_acTEncTopList[iViewIdx]->getSPS()->getUsableInterViewRef(iNumIvRef); 954 m_acTEncTopList[iViewIdx]->getEncTop()->getVPS()->setDirectRefLayerId( iLayerId + iViewIdx, iViewIdx, iNumIvRef); 955 } 956 #endif 822 957 } 823 958 for(Int iViewIdx=0; iViewIdx<m_iNumberOfViews; iViewIdx++) … … 861 996 TComPicYuv* pcPicYuvOrg = new TComPicYuv; 862 997 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 998 #if !QC_MVHEVC_B0046 863 999 TComPicYuv* pcPdmDepthOrg = new TComPicYuv; 1000 #endif 864 1001 TComPicYuv* pcPicYuvRec = NULL; 865 1002 TComPicYuv* pcDepthPicYuvRec = NULL; 866 1003 867 1004 // initialize internal class & member variables 868 1005 xInitLibCfg(); … … 884 1021 eos.push_back( false ); 885 1022 depthEos.push_back( false ); 1023 1024 #if RWTH_SDC_DLT_B0036 1025 if( m_bUsingDepthMaps && m_bUseDLT ) 1026 xAnalyzeInputBaseDepth(iViewIdx, m_iIntraPeriod); 1027 #endif 886 1028 } 887 1029 … … 957 1099 { 958 1100 Int iNumEncoded = 0; 1101 #if !QC_MVHEVC_B0046 959 1102 UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId ); 960 1103 if ( iNextPoc < m_iFrameToBeEncoded ) … … 962 1105 m_cCameraData.update( iNextPoc ); 963 1106 } 1107 #endif 1108 1109 #if FLEX_CODING_ORDER_M23723 1110 if (m_b3DVFlexOrder) 1111 { 1112 Int iNumDepthEncoded = 0; 1113 iNumEncoded = 0; 1114 Int i=0; 1115 Int iViewIdx=0; 1116 Int iNumberofDepthViews = m_bUsingDepthMaps?m_iNumberOfViews:0; 1117 for (Int j=0; j < (m_iNumberOfViews+ iNumberofDepthViews); j++ ) 1118 { 1119 if (m_pchMVCJointCodingOrder[i]=='T') 1120 { 1121 1122 i++; 1123 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1124 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1125 1126 #if VSP_SLICE_HEADER && !VSP_CFG 1127 if( m_acTEncTopList[iViewIdx]->getUseVSP() ) m_acTEncTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 1128 #endif 1129 1130 #if VSP_N 1131 #if VSP_SLICE_HEADER 1132 if( m_acTEncTopList[iViewIdx]->getUseVSP() ) 1133 #endif 1134 if( m_bUsingDepthMaps ) 1135 { 1136 // Forward Warping 1137 xStoreVSPInBuffer( m_acTEncTopList[iViewIdx]->getVSPBuf(), m_acTEncTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, false, gopId ); 1138 } 1139 #endif 1140 1141 m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId ); 1142 xWriteOutput(bitstreamFile, iNumEncoded, outputAccessUnits, iViewIdx, false); 1143 outputAccessUnits.clear(); 1144 i++; 1145 } 1146 else if ( m_pchMVCJointCodingOrder[i] == 'D') 1147 { 1148 1149 i++; 1150 if( m_bUsingDepthMaps ) 1151 { 1152 assert(isdigit(m_pchMVCJointCodingOrder[i])); 1153 iViewIdx = (Int)(m_pchMVCJointCodingOrder[i]-'0'); 1154 #if SAIT_VSO_EST_A0033 1155 if( m_bUseVSO && iNextPoc < m_iFrameToBeEncoded ) 1156 { 1157 m_cCameraData.xSetDispCoeff( iNextPoc, iViewIdx ); 1158 m_acTEncDepthTopList[iViewIdx]->setDispCoeff( m_cCameraData.getDispCoeff() ); 1159 } 1160 #endif 1161 1162 #if VSP_SLICE_HEADER && !VSP_CFG 1163 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) m_acTEncDepthTopList[iViewIdx]->setUseVSP( (gopId%VSP_FRAME_INTERVAL==0) ); 1164 #endif 1165 1166 #if VSP_N 1167 #if VSP_SLICE_HEADER 1168 if( m_acTEncDepthTopList[iViewIdx]->getUseVSP() ) 1169 if( !m_acTEncDepthTopList[iViewIdx]->getVSPDepthDisable() ) 1170 #endif 1171 xStoreVSPInBuffer( m_acTEncDepthTopList[iViewIdx]->getVSPBuf(), m_acTEncDepthTopList[iViewIdx]->getVSPAvailBuf(), iViewIdx, true, gopId ); 1172 #endif 1173 1174 m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId ); 1175 xWriteOutput(bitstreamFile, iNumDepthEncoded, outputAccessUnits, iViewIdx, true); 1176 outputAccessUnits.clear(); 1177 i++; 1178 } 1179 } 1180 } 1181 } 1182 else 1183 { 1184 1185 #endif 964 1186 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) 965 1187 { … … 1008 1230 } 1009 1231 } 1232 1233 #if FLEX_CODING_ORDER_M23723 1234 } 1235 #endif 1236 1010 1237 #if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED 1011 1238 for( Int iViewIdx = 0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1040 1267 pcDepthPicYuvOrg = NULL; 1041 1268 1042 #if FIX_MEM_LEAKS 1269 #if !QC_MVHEVC_B0046 1270 #if FIX_DEL_NULLPTR 1271 if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode ) 1272 #else 1043 1273 if ( pcPdmDepthOrg != NULL ) 1274 #endif 1044 1275 { 1045 1276 pcPdmDepthOrg->destroy(); … … 1048 1279 }; 1049 1280 #endif 1050 1051 1281 1052 1282 for(Int iViewIdx=0; iViewIdx < m_iNumberOfViews; iViewIdx++ ) … … 1252 1482 case NAL_UNIT_CODED_SLICE: 1253 1483 #if H0566_TLA 1484 #if !QC_REM_IDV_B0046 1254 1485 case NAL_UNIT_CODED_SLICE_IDV: 1486 #endif 1255 1487 case NAL_UNIT_CODED_SLICE_TLA: 1256 1488 case NAL_UNIT_CODED_SLICE_CRA: … … 1306 1538 #endif 1307 1539 #if HHI_VSO 1308 #if HHI_VSO_SPEEDUP_A00331309 1540 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ) 1310 1541 { 1311 #if FIX_VSO_SETUP1312 1542 m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 1313 #else1314 m_cRendererModel.setHorOffset( iHorOffset );1315 #endif1316 #else1317 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )1318 {1319 #endif1320 1543 Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ]; 1321 1544 … … 1455 1678 return pcPic; 1456 1679 }; 1680 1681 #if RWTH_SDC_DLT_B0036 1682 Void TAppEncTop::xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames) 1683 { 1684 TComPicYuv* pcDepthPicYuvOrg = new TComPicYuv; 1685 // allocate original YUV buffer 1686 pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth ); 1687 1688 TVideoIOYuv* depthVideoFile = new TVideoIOYuv; 1689 1690 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1691 1692 Bool abValidDepths[256]; 1693 1694 depthVideoFile->open( m_pchDepthInputFileList[iViewIdx], false, m_uiInputBitDepth, m_uiInternalBitDepth ); // read mode 1695 1696 // initialize boolean array 1697 for(Int p=0; p<=uiMaxDepthValue; p++) 1698 abValidDepths[p] = false; 1699 1700 Int iHeight = pcDepthPicYuvOrg->getHeight(); 1701 Int iWidth = pcDepthPicYuvOrg->getWidth(); 1702 Int iStride = pcDepthPicYuvOrg->getStride(); 1703 1704 Pel* pInDM = pcDepthPicYuvOrg->getLumaAddr(); 1705 1706 for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ ) 1707 { 1708 depthVideoFile->read( pcDepthPicYuvOrg, m_aiPad, false ); 1709 1710 // check all pixel values 1711 for (Int i=0; i<iHeight; i++) 1712 { 1713 Int rowOffset = i*iStride; 1714 1715 for (Int j=0; j<iWidth; j++) 1716 { 1717 Pel depthValue = pInDM[rowOffset+j]; 1718 abValidDepths[depthValue] = true; 1719 } 1720 } 1721 } 1722 1723 depthVideoFile->close(); 1724 1725 pcDepthPicYuvOrg->destroy(); 1726 delete pcDepthPicYuvOrg; 1727 1728 // convert boolean array to idx2Depth LUT 1729 UInt* auiIdx2DepthValue = (UInt*) calloc(uiMaxDepthValue, sizeof(UInt)); 1730 UInt uiNumDepthValues = 0; 1731 for(UInt p=0; p<=uiMaxDepthValue; p++) 1732 { 1733 if( abValidDepths[p] == true) 1734 { 1735 auiIdx2DepthValue[uiNumDepthValues++] = p; 1736 } 1737 } 1738 1739 if( uiNumFrames == 0 || ceil(Log2(uiNumDepthValues)) == ceil(Log2(g_uiIBDI_MAX)) ) 1740 { 1741 // don't use DLT 1742 m_acTEncDepthTopList[iViewIdx]->setUseDLT(false); 1743 m_acTEncDepthTopList[iViewIdx]->getSPS()->setUseDLT(false); 1744 } 1745 1746 // assign LUT 1747 if( m_acTEncDepthTopList[iViewIdx]->getUseDLT() ) 1748 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1749 else 1750 m_acTEncDepthTopList[iViewIdx]->getSPS()->setDepthLUTs(); 1751 1752 // free temporary memory 1753 free(auiIdx2DepthValue); 1754 } 1755 #endif 1457 1756 1458 1757 #if VSP_N -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppEncoder/TAppEncTop.h
r166 r213 87 87 #endif 88 88 89 #if VIDYO_VPS_INTEGRATION 89 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 90 90 TComVPS m_cVPS; 91 91 #endif … … 141 141 #endif 142 142 #if HHI_VSO 143 #if HHI_VSO_SPEEDUP_A0033144 143 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset ); 145 #else146 Void setupRenModel ( Int iPoc, Int iEncViewIdx, Int iEncContent );147 #endif148 144 #endif 149 145 146 #if QC_MVHEVC_B0046 147 TComVPS* getVPS() { return &m_cVPS; } 148 #endif 150 149 #if VIDYO_VPS_INTEGRATION 151 150 TComVPS* getVPS() { return &m_cVPS; } … … 166 165 Void xStoreVSORefPicsInBuffer(); ///< read in External Ref pic from file and store in buffer 167 166 #endif 167 168 #if RWTH_SDC_DLT_B0036 169 Void xAnalyzeInputBaseDepth(Int iViewIdx, UInt uiNumFrames); 170 #endif 168 171 169 172 #if VSP_N -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/RendererMain.cpp
r100 r213 43 43 int main(int argc, char* argv[]) 44 44 { 45 #if !QC_MVHEVC_B0046 45 46 TAppRendererTop cTAppRendererTop; 46 47 … … 78 79 79 80 return 0; 81 #endif 80 82 } 81 83 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererCfg.cpp
r100 r213 59 59 // Constructor / destructor / initialization / destroy 60 60 // ==================================================================================================================== 61 61 #if !QC_MVHEVC_B0046 62 62 TAppRendererCfg::TAppRendererCfg() 63 63 { … … 120 120 121 121 /* File I/O */ 122 ("VideoInputFileBaseName ", m_pchVideoInputFileBaseName, (Char*) 0, "Basename to generate video input file names")123 ("DepthInputFileBaseName ", m_pchDepthInputFileBaseName, (Char*) 0, "Basename to generate depth input file names")124 ("SynthOutputFileBaseName ", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names")122 ("VideoInputFileBaseName,v", m_pchVideoInputFileBaseName, (Char*) 0, "Basename to generate video input file names") 123 ("DepthInputFileBaseName,d", m_pchDepthInputFileBaseName, (Char*) 0, "Basename to generate depth input file names") 124 ("SynthOutputFileBaseName,s", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names") 125 125 ("ContOutputFileNumbering", m_bContOutputFileNumbering , false , "Continuous Output File Numbering") 126 126 ("Sweep" , m_bSweep , false , "Store all views in first Output File") … … 137 137 138 138 /* Camera Specification */ 139 ("CameraParameterFile, cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name")139 ("CameraParameterFile,-cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") 140 140 ("BaseViewCameraNumbers" , m_pchBaseViewCameraNumbers, (Char *) 0, "Numbers of base views") 141 141 ("SynthViewCameraNumbers" , m_pchSynthViewCameraNumbers, (Char *) 0, "Numbers of views to synthesis") … … 516 516 g_uiIBDI_MAX = ((1<<(g_uiBitDepth+g_uiBitIncrement))-1); 517 517 } 518 #endif -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererCfg.h
r100 r213 50 50 #include <string> 51 51 #include <vector> 52 52 #if !QC_MVHEVC_B0046 53 53 // ==================================================================================================================== 54 54 // Class definition … … 134 134 135 135 136 136 #endif 137 137 #endif // __TAppRENDERERCFG__ 138 138 -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
r193 r213 45 45 // Constructor / destructor / initialization / destroy 46 46 // ==================================================================================================================== 47 47 #if !QC_MVHEVC_B0046 48 48 TAppRendererTop::TAppRendererTop() 49 49 { … … 532 532 #endif 533 533 534 #if HHI_VSO_SPEEDUP_A0033535 #if FIX_VSO_SETUP536 534 cCurModel.setupPart( 0, m_iSourceHeight ); 537 #else538 cCurModel.setHorOffset( 0 );539 #endif540 #endif541 535 542 536 for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ ) … … 713 707 714 708 AOT( m_iLog2SamplingFactor != 0 ); 715 #if HHI_VSO_SPEEDUP_A0033716 #if FIX_VSO_SETUP717 709 cCurModel.setupPart( 0, m_iSourceHeight ); 718 #else719 cCurModel.setHorOffset( 0 );720 #endif721 #endif722 710 #if LGE_VSO_EARLY_SKIP_A0093 723 711 cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false ); … … 1046 1034 1047 1035 } 1036 #endif -
branches/HTM-4.0.1-VSP-dev0/source/App/TAppRenderer/TAppRendererTop.h
r100 r213 50 50 #include "../../Lib/TLibRenderer/TRenModel.h" 51 51 52 52 #if !QC_MVHEVC_B0046 53 53 // ==================================================================================================================== 54 54 // Class definition … … 87 87 };// END CLASS DEFINITION TAppRendererTop 88 88 89 #endif // __TAppRendererTOP__89 #endif 90 90 91 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/CommonDef.h
r193 r213 58 58 59 59 #define HM_VERSION "6.1" 60 #define NV_VERSION " 4.1" ///< Current software version60 #define NV_VERSION "5.1" ///< Current software version 61 61 62 62 // ==================================================================================================================== … … 144 144 #define PDM_NO_INTER_UPDATE 1 // no update for inter (but not inter-view) predicted blocks 145 145 #define PDM_MERGE_POS 0 // position of pdm in merge list (0..4) 146 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN 146 147 #if QC_MRG_CANS_B0048 148 #if OL_DISMV_POS_B0069 149 #define DMV_MERGE_POS 4 150 #else 151 #define DMV_MERGE_POS 1 152 #endif 153 #endif 154 155 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN_A0097 147 156 #define PDM_AMVP_POS 0 // position of pdm in amvp list (0..3) 148 157 #else … … 181 190 // VPS constants 182 191 // ==================================================================================================================== 192 #if QC_MVHEVC_B0046 193 #define MAX_LAYER_NUM MAX_VIEW_NUM 194 #endif 183 195 #if VIDYO_VPS_INTEGRATION 184 196 #define MAX_LAYER_NUM MAX_VIEW_NUM … … 476 488 NAL_UNIT_CODED_SLICE, 477 489 #if H0566_TLA 490 #if QC_REM_IDV_B0046 491 NAL_UNIT_RESERVED, 492 #else 478 493 NAL_UNIT_CODED_SLICE_IDV, 494 #endif 479 495 NAL_UNIT_CODED_SLICE_TLA, 480 496 NAL_UNIT_CODED_SLICE_CRA, … … 504 520 NAL_UNIT_RESERVED_23, 505 521 NAL_UNIT_UNSPECIFIED_24, 506 #if VIDYO_VPS_INTEGRATION 522 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 507 523 NAL_UNIT_VPS, 508 524 #else -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/ContextTables.h
r100 r213 52 52 #define NUM_SKIP_FLAG_CTX 3 ///< number of context models for skip flag 53 53 54 #if LGE_ILLUCOMP_B0045 55 #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag 56 #endif 57 54 58 #define NUM_MERGE_FLAG_EXT_CTX 1 ///< number of context models for merge flag of merge extended 55 59 #if MRG_IDX_CTX_RED … … 152 156 #endif 153 157 154 #if LGE_EDGE_INTRA 158 #if LGE_EDGE_INTRA_A0070 155 159 #define NUM_EDGE_INTRA_CTX 1 156 160 #if LGE_EDGE_INTRA_DELTA_DC … … 159 163 #endif 160 164 165 #if RWTH_SDC_DLT_B0036 166 #define SDC_NUM_FLAG_CTX 3 167 #define SDC_NUM_RESIDUAL_FLAG_CTX 1 168 #define SDC_NUM_SIGN_FLAG_CTX 1 169 #define SDC_NUM_RESIDUAL_CTX 10 170 171 #define SDC_NUM_PRED_MODE_CTX 5 172 #endif 173 161 174 // ==================================================================================================================== 162 175 // Tables … … 180 193 { 197, 185, 201, }, 181 194 }; 195 196 #if LGE_ILLUCOMP_B0045 197 static const UChar 198 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 199 { 200 { CNU, CNU, CNU, }, 201 { 197, 185, 201, }, 202 { 197, 185, 201, }, 203 }; 204 #endif 182 205 183 206 static const UChar … … 1280 1303 }; 1281 1304 1282 #if LGE_EDGE_INTRA 1305 #if LGE_EDGE_INTRA_A0070 1283 1306 static const Short 1284 1307 INIT_EDGE_INTRA[3][NUM_EDGE_INTRA_CTX] = … … 1314 1337 #endif 1315 1338 1339 #if RWTH_SDC_DLT_B0036 1340 static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] = 1341 { 1342 { 1343 { 0, 64 }, { 0, 64 }, { 0, 64 } 1344 }, 1345 { 1346 { 0, 64 }, { 0, 64 }, { 0, 64 } 1347 }, 1348 { 1349 { 0, 64 }, { 0, 64 }, { 0, 64 } 1350 } 1351 }; 1352 1353 static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] = 1354 { 1355 { 1356 { -5, 35 }, 1357 { -0, 56 }, 1358 { -0, 56 } 1359 1360 }, 1361 { 1362 { -5, 35 }, 1363 { -0, 56 }, 1364 { -0, 56 } 1365 }, 1366 { 1367 { -5, 35 }, 1368 { -0, 56 }, 1369 { -0, 56 } 1370 } 1371 }; 1372 1373 static const Short INIT_SDC_SIGN_FLAG[3][3*SDC_NUM_SIGN_FLAG_CTX][2] = 1374 { 1375 { 1376 { -1, 56 }, 1377 { -4, 55 }, 1378 { -4, 55 } 1379 }, 1380 { 1381 { -1, 56 }, 1382 { -4, 55 }, 1383 { -4, 55 } 1384 }, 1385 { 1386 { -1, 56 }, 1387 { -4, 55 }, 1388 { -4, 55 } 1389 } 1390 }; 1391 1392 static const Short INIT_SDC_RESIDUAL[3][3*SDC_NUM_RESIDUAL_CTX][2] = 1393 { 1394 { 1395 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1396 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1397 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1398 }, 1399 { 1400 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1401 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1402 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1403 }, 1404 { 1405 { -1, 64 }, { 2, 64 }, { 6, 67 }, { 8, 61 }, { 7, 47 }, { 10, 33 }, { 12, 14 }, { 33, -13 }, { 12, 14 }, { 33, -13 }, 1406 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 }, 1407 { 2, 66 }, { -0, 63 }, { 1, 64 }, { 6, 65 }, { 7, 59 }, { 12, 50 }, { 14, 27 }, { -0, -17 }, { 14, 27 }, { -0, -17 } 1408 } 1409 }; 1410 1411 static const Short INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX][2] = 1412 { 1413 { 1414 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1415 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1416 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1417 }, 1418 { 1419 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1420 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1421 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1422 }, 1423 { 1424 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1425 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 }, 1426 { 9, 85 }, { -4, 60 }, { 4, 70 }, { 4, 70 }, { 4, 70 } 1427 } 1428 }; 1429 #endif 1430 1316 1431 //! \} 1317 1432 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/NAL.h
r165 r213 51 51 NalRefIdc m_nalRefIDC; ///< nal_ref_idc 52 52 #endif 53 #if VIDYO_VPS_INTEGRATION 53 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 54 54 unsigned m_layerId; 55 55 unsigned m_temporalId; ///< temporal_id … … 69 69 NalUnitType nalUnitType, 70 70 Bool nalRefFlag, 71 #if !VIDYO_VPS_INTEGRATION 71 #if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046 72 72 Int viewId, 73 73 Bool isDepth, … … 78 78 :m_nalUnitType (nalUnitType) 79 79 ,m_nalRefFlag (nalRefFlag) 80 #if !VIDYO_VPS_INTEGRATION 80 #if !VIDYO_VPS_INTEGRATION & !QC_MVHEVC_B0046 81 81 ,m_viewId (viewId) 82 82 ,m_isDepth (isDepth) … … 139 139 return m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 140 140 #if H0566_TLA 141 #if !QC_REM_IDV_B0046 141 142 || m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV 143 #endif 142 144 || m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA 143 145 || m_nalUnitType == NAL_UNIT_CODED_SLICE_TLA -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r193 r213 137 137 m_phQP = NULL; 138 138 m_pbMergeFlag = NULL; 139 #if LGE_ILLUCOMP_B0045 140 m_pbICFlag = NULL; 141 #endif 139 142 m_puhMergeIndex = NULL; 140 143 m_puhLumaIntraDir = NULL; … … 152 155 m_pcTrCoeffCr = NULL; 153 156 #if ADAPTIVE_QP_SELECTION 154 #if FIX_MEM_LEAKS155 157 m_ArlCoeffIsAliasedAllocation = false; 156 158 m_pcArlCoeffY = NULL; … … 158 160 m_pcArlCoeffCr = NULL; 159 161 #endif 160 #endif161 162 162 163 m_pbIPCMFlag = NULL; … … 206 207 m_pbResPredFlag = NULL; 207 208 #endif 208 #if LGE_EDGE_INTRA 209 #if LGE_EDGE_INTRA_A0070 209 210 m_pucEdgeCode = NULL; 210 211 m_pucEdgeNumber = NULL; … … 217 218 #endif 218 219 #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 } 220 #if RWTH_SDC_DLT_B0036 221 m_pbSDCFlag = NULL; 222 m_apSegmentDCOffset[0] = NULL; 223 m_apSegmentDCOffset[1] = NULL; 230 224 #endif 231 225 } … … 268 262 m_pePredMode = new Char[ uiNumPartition ]; 269 263 264 #if RWTH_SDC_DLT_B0036 265 m_pbSDCFlag = (Bool* )xMalloc(Bool, uiNumPartition); 266 m_apSegmentDCOffset[0] = (Pel*)xMalloc(Pel, uiNumPartition); 267 m_apSegmentDCOffset[1] = (Pel*)xMalloc(Pel, uiNumPartition); 268 #endif 269 270 270 m_puiAlfCtrlFlag = new Bool[ uiNumPartition ]; 271 271 272 272 m_pbMergeFlag = (Bool* )xMalloc(Bool, uiNumPartition); 273 #if LGE_ILLUCOMP_B0045 274 m_pbICFlag = (Bool* )xMalloc(Bool, uiNumPartition); 275 #endif 273 276 m_puhMergeIndex = (UChar* )xMalloc(UChar, uiNumPartition); 274 277 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 312 315 m_pcArlCoeffCb = m_pcGlbArlCoeffCb; 313 316 m_pcArlCoeffCr = m_pcGlbArlCoeffCr; 314 #if FIX_MEM_LEAKS315 317 m_ArlCoeffIsAliasedAllocation = true; 316 #endif317 318 } 318 319 else … … 350 351 m_piContourPredTexDeltaDC2 = (Int* )xMalloc(Int, uiNumPartition); 351 352 #endif 352 #if LGE_EDGE_INTRA 353 #if LGE_EDGE_INTRA_A0070 353 354 m_pucEdgeCode = (UChar*)xMalloc(UChar, uiNumPartition * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4); 354 355 m_pucEdgeNumber = (UChar*)xMalloc(UChar, uiNumPartition); … … 411 412 #endif 412 413 if ( m_pePredMode ) { delete[] m_pePredMode; m_pePredMode = NULL; } 414 #if RWTH_SDC_DLT_B0036 415 if ( m_pbSDCFlag ) { xFree(m_pbSDCFlag); m_pbSDCFlag = NULL; } 416 if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]); m_apSegmentDCOffset[0] = NULL; } 417 if ( m_apSegmentDCOffset[1] ) { xFree(m_apSegmentDCOffset[1]); m_apSegmentDCOffset[1] = NULL; } 418 #endif 413 419 if ( m_puhCbf[0] ) { xFree(m_puhCbf[0]); m_puhCbf[0] = NULL; } 414 420 if ( m_puhCbf[1] ) { xFree(m_puhCbf[1]); m_puhCbf[1] = NULL; } … … 417 423 if ( m_puhInterDir ) { xFree(m_puhInterDir); m_puhInterDir = NULL; } 418 424 if ( m_pbMergeFlag ) { xFree(m_pbMergeFlag); m_pbMergeFlag = NULL; } 425 #if LGE_ILLUCOMP_B0045 426 if ( m_pbICFlag ) { xFree(m_pbICFlag); m_pbICFlag = NULL; } 427 #endif 419 428 if ( m_puhMergeIndex ) { xFree(m_puhMergeIndex); m_puhMergeIndex = NULL; } 420 429 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 430 439 if ( m_pcTrCoeffCr ) { xFree(m_pcTrCoeffCr); m_pcTrCoeffCr = NULL; } 431 440 #if ADAPTIVE_QP_SELECTION 432 #if FIX_MEM_LEAKS433 441 if (!m_ArlCoeffIsAliasedAllocation) 434 442 { … … 437 445 xFree(m_pcArlCoeffCr); m_pcArlCoeffCr = 0; 438 446 } 439 #endif440 447 if ( m_pcGlbArlCoeffY ) { xFree(m_pcGlbArlCoeffY); m_pcGlbArlCoeffY = NULL; } 441 448 if ( m_pcGlbArlCoeffCb ) { xFree(m_pcGlbArlCoeffCb); m_pcGlbArlCoeffCb = NULL; } … … 469 476 if ( m_piContourPredTexDeltaDC2 ) { xFree(m_piContourPredTexDeltaDC2); m_piContourPredTexDeltaDC2 = NULL; } 470 477 #endif 471 #if LGE_EDGE_INTRA 478 #if LGE_EDGE_INTRA_A0070 472 479 if ( m_pbEdgeLeftFirst ) { xFree(m_pbEdgeLeftFirst); m_pbEdgeLeftFirst = NULL; } 473 480 if ( m_pucEdgeStartPos ) { xFree(m_pucEdgeStartPos); m_pucEdgeStartPos = NULL; } … … 544 551 Void TComDataCU::initCU( TComPic* pcPic, UInt iCUAddr ) 545 552 { 546 #if OL_DEPTHLIMIT_A0044547 TComDataCU* pcCU = pcPic->getCU(iCUAddr);548 #endif549 550 553 m_pcPic = pcPic; 551 554 m_pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx()); … … 599 602 m_piTextureModeDepth[ui] = pcFrom->getTextureModeDepth(ui); 600 603 #endif 604 #if RWTH_SDC_DLT_B0036 605 m_pbSDCFlag[ui] = pcFrom->getSDCFlag(ui); 606 #endif 601 607 m_puhWidth [ui] = pcFrom->getWidth(ui); 602 608 m_puhHeight [ui] = pcFrom->getHeight(ui); … … 610 616 m_puiAlfCtrlFlag[ui]=pcFrom->m_puiAlfCtrlFlag[ui]; 611 617 m_pbMergeFlag[ui]=pcFrom->m_pbMergeFlag[ui]; 618 #if LGE_ILLUCOMP_B0045 619 m_pbICFlag[ui]=pcFrom->m_pbICFlag[ui]; 620 #endif 612 621 m_puhMergeIndex[ui]=pcFrom->m_puhMergeIndex[ui]; 613 622 m_puhLumaIntraDir[ui]=pcFrom->m_puhLumaIntraDir[ui]; … … 630 639 #if HHI_MPI 631 640 memset( m_piTextureModeDepth+ firstElement,-1, numElements * sizeof( *m_piTextureModeDepth ) ); 641 #endif 642 #if RWTH_SDC_DLT_B0036 643 memset( m_pbSDCFlag + firstElement, 0, numElements * sizeof( *m_pbSDCFlag ) ); 644 memset( m_apSegmentDCOffset[0] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[0] ) ); 645 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 632 646 #endif 633 647 memset( m_puhTrIdx + firstElement, 0, numElements * sizeof( *m_puhTrIdx ) ); … … 642 656 memset( m_puiAlfCtrlFlag + firstElement, false, numElements * sizeof( *m_puiAlfCtrlFlag ) ); 643 657 memset( m_pbMergeFlag + firstElement, false, numElements * sizeof( *m_pbMergeFlag ) ); 658 #if LGE_ILLUCOMP_B0045 659 memset( m_pbICFlag + firstElement, false, numElements * sizeof( *m_pbICFlag ) ); 660 #endif 644 661 memset( m_puhMergeIndex + firstElement, 0, numElements * sizeof( *m_puhMergeIndex ) ); 645 662 memset( m_puhLumaIntraDir + firstElement, 2, numElements * sizeof( *m_puhLumaIntraDir ) ); … … 763 780 m_apcCUColocated[1] = getSlice()->getRefPic( REF_PIC_LIST_1, 0)->getCU( m_uiCUAddr ); 764 781 } 765 #if OL_DEPTHLIMIT_A0044766 setPartDumpFlag (pcCU->getPartDumpFlag());767 #endif768 782 } 769 783 … … 825 839 m_puiAlfCtrlFlag[ui]= false; 826 840 m_pbMergeFlag[ui] = 0; 841 #if LGE_ILLUCOMP_B0045 842 m_pbICFlag[ui] = false; 843 #endif 827 844 m_puhMergeIndex[ui] = 0; 828 845 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 854 871 m_piContourPredTexDeltaDC2[ui] = 0; 855 872 #endif 873 #if RWTH_SDC_DLT_B0036 874 m_pbSDCFlag[ui] = false; 875 m_apSegmentDCOffset[0][ui] = 0; 876 m_apSegmentDCOffset[1][ui] = 0; 877 #endif 856 878 } 857 879 } … … 926 948 memset( m_puiAlfCtrlFlag, 0, iSizeInBool ); 927 949 memset( m_pbMergeFlag, 0, iSizeInBool ); 950 #if LGE_ILLUCOMP_B0045 951 memset( m_pbICFlag, 0, iSizeInBool ); 952 #endif 928 953 #if HHI_INTERVIEW_SKIP 929 954 memset( m_pbRenderable, 0, iSizeInBool ); … … 963 988 memset( m_piContourPredTexDeltaDC1, 0, sizeof( Int ) * m_uiNumPartition ); 964 989 memset( m_piContourPredTexDeltaDC2, 0, sizeof( Int ) * m_uiNumPartition ); 965 #endif 990 #endif 991 #if RWTH_SDC_DLT_B0036 992 memset( m_pbSDCFlag, 0, sizeof(Bool) * m_uiNumPartition ); 993 memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition); 994 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition); 995 #endif 966 996 967 997 UChar uhWidth = g_uiMaxCUWidth >> uiDepth; … … 1001 1031 m_puiAlfCtrlFlag[ui]=pcCU->m_puiAlfCtrlFlag[uiPartOffset+ui]; 1002 1032 m_pbMergeFlag[ui]=pcCU->m_pbMergeFlag[uiPartOffset+ui]; 1033 #if LGE_ILLUCOMP_B0045 1034 m_pbICFlag[ui]=pcCU->m_pbICFlag[uiPartOffset+ui]; 1035 #endif 1003 1036 m_puhMergeIndex[ui]=pcCU->m_puhMergeIndex[uiPartOffset+ui]; 1004 1037 m_puhLumaIntraDir[ui]=pcCU->m_puhLumaIntraDir[uiPartOffset+ui]; … … 1030 1063 m_pbResPredAvailable[ui] = pcCU->m_pbResPredAvailable[ uiPartOffset + ui ]; 1031 1064 m_pbResPredFlag [ui] = pcCU->m_pbResPredFlag [ uiPartOffset + ui ]; 1065 #endif 1066 #if RWTH_SDC_DLT_B0036 1067 m_pbSDCFlag [ui] = pcCU->m_pbSDCFlag [ uiPartOffset + ui ]; 1068 m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0][ uiPartOffset + ui ]; 1069 m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1][ uiPartOffset + ui ]; 1032 1070 #endif 1033 1071 } … … 1095 1133 memcpy(m_uiSliceStartCU,pcCU->m_uiSliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1096 1134 memcpy(m_uiEntropySliceStartCU,pcCU->m_uiEntropySliceStartCU+uiPartOffset,sizeof(UInt)*m_uiNumPartition); 1097 #if OL_DEPTHLIMIT_A00441098 setPartDumpFlag (pcCU->getPartDumpFlag());1099 #endif1100 1135 } 1101 1136 … … 1140 1175 1141 1176 m_pbMergeFlag = pcCU->getMergeFlag() + uiPart; 1177 #if LGE_ILLUCOMP_B0045 1178 m_pbICFlag = pcCU->getICFlag() + uiPart; 1179 #endif 1142 1180 m_puhMergeIndex = pcCU->getMergeIndex() + uiPart; 1143 1181 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1223 1261 m_piContourPredTexDeltaDC2 = pcCU->getContourPredTexDeltaDC2() + uiPart; 1224 1262 #endif 1225 #if LGE_EDGE_INTRA 1263 #if LGE_EDGE_INTRA_A0070 1226 1264 if( pcCU->getSlice()->getSPS()->isDepth() ) 1227 1265 { … … 1237 1275 } 1238 1276 #endif 1277 #if RWTH_SDC_DLT_B0036 1278 m_pbSDCFlag = pcCU->getSDCFlag() + uiPart; 1279 m_apSegmentDCOffset[0] = pcCU->getSDCSegmentDCOffset(0) + uiPart; 1280 m_apSegmentDCOffset[1] = pcCU->getSDCSegmentDCOffset(1) + uiPart; 1281 #endif 1239 1282 } 1240 1283 … … 1272 1315 1273 1316 m_pbMergeFlag = pcCU->getMergeFlag() + uiAbsPartIdx; 1317 #if LGE_ILLUCOMP_B0045 1318 m_pbICFlag = pcCU->getICFlag() + uiAbsPartIdx; 1319 #endif 1274 1320 m_puhMergeIndex = pcCU->getMergeIndex() + uiAbsPartIdx; 1275 1321 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1318 1364 memcpy( m_puiAlfCtrlFlag + uiOffset, pcCU->getAlfCtrlFlag(), iSizeInBool ); 1319 1365 memcpy( m_pbMergeFlag + uiOffset, pcCU->getMergeFlag(), iSizeInBool ); 1366 #if LGE_ILLUCOMP_B0045 1367 memcpy( m_pbICFlag + uiOffset, pcCU->getICFlag(), iSizeInBool ); 1368 #endif 1320 1369 memcpy( m_puhMergeIndex + uiOffset, pcCU->getMergeIndex(), iSizeInUchar ); 1321 1370 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1395 1444 #endif 1396 1445 1397 #if LGE_EDGE_INTRA 1446 #if LGE_EDGE_INTRA_A0070 1398 1447 if( getSlice()->getSPS()->isDepth() ) 1399 1448 { … … 1413 1462 memcpy( m_piTextureModeDepth + uiOffset, pcCU->getTextureModeDepth(), sizeof( Int ) * uiNumPartition ); 1414 1463 #endif 1464 #if RWTH_SDC_DLT_B0036 1465 memcpy( m_pbSDCFlag + uiOffset, pcCU->getSDCFlag(), iSizeInBool ); 1466 memcpy( m_apSegmentDCOffset[0] + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition); 1467 memcpy( m_apSegmentDCOffset[1] + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition); 1468 #endif 1415 1469 } 1416 1470 … … 1444 1498 1445 1499 memcpy( rpcCU->getMergeFlag() + m_uiAbsIdxInLCU, m_pbMergeFlag, iSizeInBool ); 1500 #if LGE_ILLUCOMP_B0045 1501 memcpy( rpcCU->getICFlag() + m_uiAbsIdxInLCU, m_pbICFlag, iSizeInBool ); 1502 #endif 1446 1503 memcpy( rpcCU->getMergeIndex() + m_uiAbsIdxInLCU, m_puhMergeIndex, iSizeInUchar ); 1447 1504 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1513 1570 #endif 1514 1571 1515 #if LGE_EDGE_INTRA 1572 #if LGE_EDGE_INTRA_A0070 1516 1573 if( rpcCU->getSlice()->getSPS()->isDepth() ) 1517 1574 { … … 1531 1588 memcpy( rpcCU->getTextureModeDepth() + m_uiAbsIdxInLCU, m_piTextureModeDepth, sizeof( Int ) * m_uiNumPartition ); 1532 1589 #endif 1590 #if RWTH_SDC_DLT_B0036 1591 memcpy( rpcCU->getSDCFlag() + m_uiAbsIdxInLCU, m_pbSDCFlag, iSizeInBool ); 1592 memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition); 1593 memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition); 1594 #endif 1533 1595 } 1534 1596 … … 1562 1624 memcpy( rpcCU->getAlfCtrlFlag() + uiPartOffset, m_puiAlfCtrlFlag, iSizeInBool ); 1563 1625 memcpy( rpcCU->getMergeFlag() + uiPartOffset, m_pbMergeFlag, iSizeInBool ); 1626 #if LGE_ILLUCOMP_B0045 1627 memcpy( rpcCU->getICFlag() + uiPartOffset, m_pbICFlag, iSizeInBool ); 1628 #endif 1564 1629 memcpy( rpcCU->getMergeIndex() + uiPartOffset, m_puhMergeIndex, iSizeInUchar ); 1565 1630 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1632 1697 #endif 1633 1698 1634 #if LGE_EDGE_INTRA 1699 #if LGE_EDGE_INTRA_A0070 1635 1700 if( rpcCU->getSlice()->getSPS()->isDepth() ) 1636 1701 { … … 1649 1714 #if HHI_MPI 1650 1715 memcpy( rpcCU->getTextureModeDepth() + uiPartOffset, m_piTextureModeDepth, sizeof( Int ) * uiQNumPart ); 1716 #endif 1717 #if RWTH_SDC_DLT_B0036 1718 memcpy( rpcCU->getSDCFlag() + uiPartOffset, m_pbSDCFlag, iSizeInBool ); 1719 memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart); 1720 memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart); 1651 1721 #endif 1652 1722 } … … 2383 2453 #if H0204_QP_PREDICTION 2384 2454 UInt lPartIdx, aPartIdx; 2385 #if FIX_COMP_WARNING_INIT2386 2455 lPartIdx = 0; 2387 2456 aPartIdx = 0; 2388 #endif2389 2457 TComDataCU* cULeft = getQpMinCuLeft ( lPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); 2390 2458 TComDataCU* cUAbove = getQpMinCuAbove( aPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU ); … … 2528 2596 mapDMMtoIntraMode( iLeftIntraDir ); 2529 2597 #endif 2530 #if LGE_EDGE_INTRA 2598 #if LGE_EDGE_INTRA_A0070 2531 2599 mapEdgeIntratoDC( iLeftIntraDir ); 2532 2600 #endif … … 2543 2611 mapDMMtoIntraMode( iAboveIntraDir ); 2544 2612 #endif 2545 #if LGE_EDGE_INTRA 2613 #if LGE_EDGE_INTRA_A0070 2546 2614 mapEdgeIntratoDC( iAboveIntraDir ); 2547 2615 #endif … … 2629 2697 } 2630 2698 2631 #if LGE_EDGE_INTRA 2699 #if LGE_EDGE_INTRA_A0070 2632 2700 UInt TComDataCU::getCtxEdgeIntra( UInt uiAbsPartIdx ) 2633 2701 { … … 2740 2808 return uiCtx; 2741 2809 } 2810 2811 #if LGE_ILLUCOMP_B0045 2812 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) 2813 { 2814 UInt uiCtx = 0; 2815 2816 return uiCtx; 2817 } 2818 #endif 2742 2819 2743 2820 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) … … 2970 3047 } 2971 3048 3049 #if RWTH_SDC_DLT_B0036 3050 Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 3051 { 3052 setSubPart( bSDCFlag, m_pbSDCFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 3053 } 3054 3055 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx ) 3056 { 3057 TComDataCU* pcTempCU; 3058 UInt uiTempPartIdx; 3059 UInt uiCtx = 0; 3060 3061 // left PU 3062 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3063 uiCtx = ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3064 3065 // above PU 3066 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, false ); 3067 uiCtx += ( pcTempCU ) ? pcTempCU->getSDCFlag( uiTempPartIdx ) : 0; 3068 3069 return uiCtx; 3070 } 3071 3072 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx ) 3073 { 3074 if( !getSlice()->getSPS()->isDepth() || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) 3075 return false; 3076 3077 UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx ); 3078 3079 if(!isIntra(uiAbsPartIdx)) 3080 return false; 3081 3082 for(UInt ui=0; ui<RWTH_SDC_NUM_PRED_MODES; ui++) 3083 { 3084 if( g_auiSDCPredModes[ui] == uiLumaPredMode ) 3085 return true; 3086 } 3087 // else 3088 return false; 3089 } 3090 #endif 3091 2972 3092 Void TComDataCU::setMergeIndexSubParts ( UInt uiMergeIndex, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2973 3093 { … … 2998 3118 setSubPart<UChar>( uiDir, m_puhInterDir, uiAbsPartIdx, uiDepth, uiPartIdx ); 2999 3119 } 3120 3121 #if LGE_ILLUCOMP_B0045 3122 Void TComDataCU::setICFlagSubParts( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 3123 { 3124 memset( m_pbICFlag + uiAbsPartIdx, bICFlag, (m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ))*sizeof(Bool) ); 3125 } 3126 3127 Bool TComDataCU::isICFlagRequired(UInt uiAbsPartIdx) 3128 { 3129 UInt uiPartAddr; 3130 UInt iNumbPart; 3131 Int iWidth, iHeight; 3132 3133 UInt uiPartMode = getPartitionSize(uiAbsPartIdx); 3134 3135 iNumbPart = (uiPartMode == SIZE_2Nx2N ? 1 : (uiPartMode == SIZE_NxN ? 4 : 2) ); 3136 3137 for(UInt i = 0; i < iNumbPart; i++) 3138 { 3139 getPartIndexAndSize(i, uiPartAddr, iWidth, iHeight, uiAbsPartIdx, true); 3140 uiPartAddr += uiAbsPartIdx; 3141 3142 for(UInt uiRefIdx = 0; uiRefIdx < 2; uiRefIdx++) 3143 { 3144 RefPicList eRefList = uiRefIdx ? REF_PIC_LIST_1 : REF_PIC_LIST_0; 3145 Int iBestRefIdx = getCUMvField(eRefList)->getRefIdx(uiPartAddr); 3146 3147 #if VSP_AIC 3148 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getPOC() == getSlice()->getRefPOC(eRefList, iBestRefIdx)) 3149 #else 3150 if((getInterDir(uiPartAddr) & (uiRefIdx+1)) && iBestRefIdx >= 0 && getSlice()->getViewId() != getSlice()->getRefViewId(eRefList, iBestRefIdx)) 3151 #endif 3152 { 3153 return true; 3154 } 3155 } 3156 } 3157 return false; 3158 } 3159 #endif 3000 3160 3001 3161 Void TComDataCU::setMVPIdxSubParts( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) … … 3570 3730 3571 3731 //===== add merge with predicted depth maps ===== 3732 #if QC_MRG_CANS_B0048 3733 TComMv acPdmMv [4]; 3734 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 3735 Bool bLeftAvai = false; 3736 #if OL_DISMV_POS_B0069 3737 Int iPosLeftAbove[2] = {-1, -1}; 3738 #endif 3739 #else 3572 3740 TComMv acPdmMv [2]; 3573 3741 Int aiPdmRefIdx [2] = {-1, -1}; 3574 3575 #if LGE_DVMCP 3742 #endif 3743 3744 #if LGE_DVMCP_A0126 3745 #if QC_MRG_CANS_B0048 3746 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 3747 #else 3576 3748 acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false; 3577 3749 #endif 3578 3579 #if QC_MULTI_DIS_CAN 3750 #endif 3751 3752 #if QC_MULTI_DIS_CAN_A0097 3580 3753 DisInfo cDisInfo; 3581 3754 cDisInfo.iN = 0; 3582 3755 if(!bNoPdmMerge) 3583 3756 { 3584 #if LGE_DVMCP 3585 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true ); 3757 #if LGE_DVMCP_A0126 3758 #if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047 3759 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true ); 3760 #else 3761 getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo 3762 #if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047 3763 , 3764 true 3765 #endif 3766 ); 3767 #endif 3586 3768 #else 3587 3769 getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo ); … … 3595 3777 cDisInfo.m_aVIdxCan[0] = 0; 3596 3778 } 3597 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo ); 3779 #if QC_MRG_CANS_B0048 3780 Int iPdmDir[2] = {0, 0}; 3781 #endif 3782 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo 3783 #if QC_MRG_CANS_B0048 3784 , iPdmDir 3785 #endif 3786 ); 3598 3787 #else 3599 3788 Int iPdmInterDir = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv ); 3600 3789 #endif 3601 3790 #if QC_MRG_CANS_B0048 3791 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3792 #else 3602 3793 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 ) 3794 #endif 3603 3795 { 3604 3796 abCandIsInter [ iCount ] = true; 3797 #if QC_MRG_CANS_B0048 3798 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 3799 iPdmInterDir = iPdmDir[0]; 3800 #else 3605 3801 puhInterDirNeighbours[ iCount ] = iPdmInterDir; 3802 #endif 3606 3803 if( ( iPdmInterDir & 1 ) == 1 ) 3607 3804 { 3608 3805 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3609 3806 } 3807 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3808 else 3809 { 3810 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3811 } 3812 #endif 3610 3813 if( ( iPdmInterDir & 2 ) == 2 ) 3611 3814 { 3612 3815 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3613 3816 } 3817 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3818 else 3819 { 3820 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3821 } 3822 #endif 3614 3823 #if SIMP_MRG_PRUN 3615 3824 if ( mrgCandIdx == iCount ) … … 3619 3828 #endif 3620 3829 iCount ++; 3830 } 3831 #endif 3832 3833 #if QC_MRG_CANS_B0048 3834 if(extraMergeCand) 3835 { 3836 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 1) 3837 { 3838 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 3839 abCandIsInter [ iCount ] = true; 3840 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 3841 if( ( iPdmDir[1] & 1 ) == 1 ) 3842 { 3843 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 3844 } 3845 if( ( iPdmDir[1] & 2 ) == 2 ) 3846 { 3847 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 3848 } 3849 #if LGE_DVMCP_A0126 3850 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3851 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3852 #endif 3853 #if SIMP_MRG_PRUN 3854 if ( mrgCandIdx == iCount ) 3855 return; 3856 #endif 3857 iCount ++; 3858 } 3621 3859 } 3622 3860 #endif … … 3663 3901 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3664 3902 } 3665 #if LGE_DVMCP 3903 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3904 else 3905 { 3906 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3907 } 3908 #endif 3909 #if QC_MRG_CANS_B0048 3910 Bool bRemoveSpa = false; //prunign to inter-view candidates 3911 Int iCnloop = iCount - 1; 3912 for(; iCnloop >= 0; iCnloop --) 3913 { 3914 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3915 { 3916 bRemoveSpa = true; 3917 abCandIsInter [ iCount ] = false; 3918 #if FIX_MISUSE_REFINDEX 3919 //reset to the default value for IC, MC 3920 puhInterDirNeighbours[iCount] = 0; 3921 TComMv cZeroMv; 3922 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 3923 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 3924 break; 3925 #endif 3926 } 3927 } 3928 if(!bRemoveSpa) 3929 { 3930 bLeftAvai = true; 3931 #if OL_DISMV_POS_B0069 3932 iPosLeftAbove[0] = iCount; 3933 #endif 3934 #endif 3935 #if LGE_DVMCP_A0126 3666 3936 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3667 3937 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3677 3947 #endif 3678 3948 iCount ++; 3949 #if QC_MRG_CANS_B0048 3950 } 3951 #endif 3679 3952 } 3680 3953 } 3681 3954 3682 3955 #if HHI_INTER_VIEW_MOTION_PRED 3956 #if QC_MRG_CANS_B0048 3957 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3958 #else 3683 3959 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 1 ) 3960 #endif 3684 3961 { 3685 3962 abCandIsInter [ iCount ] = true; … … 3689 3966 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3690 3967 } 3968 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3969 else 3970 { 3971 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 3972 } 3973 #endif 3691 3974 if( ( iPdmInterDir & 2 ) == 2 ) 3692 3975 { 3693 3976 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3694 3977 } 3978 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 3979 else 3980 { 3981 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 3982 } 3983 #endif 3695 3984 #if SIMP_MRG_PRUN 3696 3985 if ( mrgCandIdx == iCount ) … … 3751 4040 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3752 4041 } 3753 #if LGE_DVMCP 4042 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4043 else 4044 { 4045 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4046 } 4047 #endif 4048 #if QC_MRG_CANS_B0048 4049 Bool bRemoveSpa = false; //prunign to inter-view candidates 4050 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4051 for(; iCnloop >= 0; iCnloop --) 4052 { 4053 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4054 { 4055 bRemoveSpa = true; 4056 abCandIsInter [ iCount ] = false; 4057 #if FIX_MISUSE_REFINDEX 4058 //reset to the default value for IC, MC 4059 puhInterDirNeighbours[iCount] = 0; 4060 TComMv cZeroMv; 4061 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4062 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4063 break; 4064 #endif 4065 } 4066 } 4067 if(!bRemoveSpa) 4068 { 4069 #if OL_DISMV_POS_B0069 4070 iPosLeftAbove[1] = iCount; 4071 #endif 4072 #endif 4073 #if LGE_DVMCP_A0126 3754 4074 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3755 4075 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3765 4085 #endif 3766 4086 iCount ++; 4087 #if QC_MRG_CANS_B0048 4088 } 4089 #endif 3767 4090 } 3768 4091 #if !SIMP_MRG_PRUN … … 3771 4094 3772 4095 #if HHI_INTER_VIEW_MOTION_PRED 4096 #if QC_MRG_CANS_B0048 4097 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 4098 #else 3773 4099 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 2 ) 4100 #endif 3774 4101 { 3775 4102 abCandIsInter [ iCount ] = true; … … 3779 4106 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3780 4107 } 4108 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4109 else 4110 { 4111 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4112 } 4113 #endif 3781 4114 if( ( iPdmInterDir & 2 ) == 2 ) 3782 4115 { 3783 4116 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3784 4117 } 4118 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4119 else 4120 { 4121 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4122 } 4123 #endif 3785 4124 #if SIMP_MRG_PRUN 3786 4125 if ( mrgCandIdx == iCount ) … … 3835 4174 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3836 4175 } 3837 #if LGE_DVMCP 4176 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4177 else 4178 { 4179 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4180 } 4181 #endif 4182 #if LGE_DVMCP_A0126 3838 4183 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3839 4184 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3852 4197 3853 4198 #if HHI_INTER_VIEW_MOTION_PRED 4199 #if QC_MRG_CANS_B0048 4200 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4201 #else 3854 4202 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 3 ) 4203 #endif 3855 4204 { 3856 4205 abCandIsInter [ iCount ] = true; … … 3860 4209 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3861 4210 } 4211 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4212 else 4213 { 4214 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4215 } 4216 #endif 3862 4217 if( ( iPdmInterDir & 2 ) == 2 ) 3863 4218 { 3864 4219 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3865 4220 } 4221 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4222 else 4223 { 4224 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4225 } 4226 #endif 3866 4227 #if SIMP_MRG_PRUN 3867 4228 if ( mrgCandIdx == iCount ) … … 3871 4232 #endif 3872 4233 iCount ++; 4234 } 4235 #endif 4236 4237 #if OL_DISMV_POS_B0069 4238 if(extraMergeCand) 4239 { 4240 if(!bNoPdmMerge && iPdmDir[1] && DMV_MERGE_POS == 4) 4241 { 4242 assert(iCount < MRG_MAX_NUM_CANDS_MEM); 4243 Bool bRemoveSpa = false; //prunign to A1, B1 4244 abCandIsInter [ iCount ] = true; 4245 puhInterDirNeighbours[ iCount ] = iPdmDir[1]; 4246 if( ( iPdmDir[1] & 1 ) == 1 ) 4247 { 4248 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] ); 4249 } 4250 if( ( iPdmDir[1] & 2 ) == 2 ) 4251 { 4252 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] ); 4253 } 4254 for(Int i = 0; i < 2; i ++) 4255 { 4256 Int iCnloop = iPosLeftAbove[i]; 4257 if(iCnloop == -1) 4258 continue; 4259 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4260 { 4261 bRemoveSpa = true; 4262 abCandIsInter [ iCount ] = false; 4263 #if FIX_MISUSE_REFINDEX 4264 //reset to the default value for IC, MC 4265 puhInterDirNeighbours[iCount] = 0; 4266 TComMv cZeroMv; 4267 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4268 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4269 break; 4270 #endif 4271 } 4272 } 4273 if(!bRemoveSpa) 4274 { 4275 #if LGE_DVMCP_A0126 4276 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 4277 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 4278 #endif 4279 #if SIMP_MRG_PRUN 4280 if ( mrgCandIdx == iCount ) 4281 return; 4282 #endif 4283 iCount ++; 4284 } 4285 } 3873 4286 } 3874 4287 #endif … … 3924 4337 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3925 4338 } 3926 #if LGE_DVMCP 4339 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4340 else 4341 { 4342 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4343 } 4344 #endif 4345 #if LGE_DVMCP_A0126 3927 4346 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 3928 4347 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 3944 4363 3945 4364 #if HHI_INTER_VIEW_MOTION_PRED 4365 #if QC_MRG_CANS_B0048 4366 if( iPdmDir[0] && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4367 #else 3946 4368 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 4 ) 4369 #endif 3947 4370 { 3948 4371 abCandIsInter [ iCount ] = true; … … 3952 4375 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3953 4376 } 4377 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4378 else 4379 { 4380 pcMvFieldNeighbours[ iCount<<1 ].setMvField( TComMv(0,0), NOT_VALID ); 4381 } 4382 #endif 3954 4383 if( ( iPdmInterDir & 2 ) == 2 ) 3955 4384 { 3956 4385 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3957 4386 } 4387 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4388 else 4389 { 4390 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4391 } 4392 #endif 3958 4393 #if SIMP_MRG_PRUN 3959 4394 if ( mrgCandIdx == iCount ) … … 4019 4454 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4020 4455 } 4021 #if LGE_DVMCP 4456 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4457 else 4458 { 4459 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( TComMv(0,0), NOT_VALID ); 4460 } 4461 #endif 4462 #if LGE_DVMCP_A0126 4022 4463 pcMvFieldNeighbours[iCount<<1 ].getMv().m_bDvMcp = false; 4023 4464 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; … … 4049 4490 #endif 4050 4491 4051 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 4492 if ( getSlice()->getPPS()->getEnableTMVPFlag() 4493 #if QC_MRG_CANS_B0048 4494 && iCount < (MRG_MAX_NUM_CANDS_SIGNALED + extraMergeCand) 4495 #endif 4496 ) 4052 4497 { 4053 4498 // col [2] 4499 #if !QC_TMVP_IDX_MOD_B0046 4054 4500 Int iRefIdxSkip[2] = {-1, -1}; 4055 4501 for (Int i=0; i<2; i++) … … 4071 4517 iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0; 4072 4518 } 4519 #endif 4073 4520 //>> MTK colocated-RightBottom 4074 4521 UInt uiPartIdxRB; … … 4082 4529 4083 4530 TComMv cColMv; 4531 #if QC_TMVP_IDX_MOD_B0046 4532 Int iRefIdx = 0; 4533 #else 4084 4534 Int iRefIdx; 4085 4535 #endif 4086 4536 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 4087 4537 { … … 4116 4566 } 4117 4567 } 4568 #if !QC_TMVP_IDX_MOD_B0046 4118 4569 iRefIdx = iRefIdxSkip[0]; 4119 4570 #else 4571 iRefIdx = 0; 4572 #endif 4120 4573 Bool bExistMV = false; 4121 4574 UInt uiPartIdxCenter; … … 4135 4588 if ( getSlice()->isInterB() ) 4136 4589 { 4590 #if !QC_TMVP_IDX_MOD_B0046 4137 4591 iRefIdx = iRefIdxSkip[1]; 4592 #else 4593 iRefIdx = 0; 4594 #endif 4138 4595 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 4139 4596 if( bExistMV == false ) … … 4149 4606 { 4150 4607 puhInterDirNeighbours[uiArrayAddr] = 1; 4608 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4609 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4610 #endif 4151 4611 } 4152 4612 } … … 4154 4614 { 4155 4615 puhInterDirNeighbours[uiArrayAddr] = 1; 4156 } 4157 #if LGE_DVMCP 4616 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4617 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4618 #endif 4619 } 4620 #if LGE_DVMCP_A0126 4158 4621 pcMvFieldNeighbours[uiArrayAddr<<1 ].getMv().m_bDvMcp = false; 4159 4622 pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv().m_bDvMcp = false; … … 4391 4854 pcMvFieldNeighbours[(uiArrayAddr << 1) + 1].setMvField(TComMv(0, 0), r); 4392 4855 } 4856 #if FIX_CU_BASED_MRG_CAND_LIST_B0136 4857 else 4858 { 4859 pcMvFieldNeighbours[ ( uiArrayAddr << 1 ) + 1 ].setMvField( TComMv(0,0), NOT_VALID ); 4860 } 4861 #endif 4393 4862 uiArrayAddr++; 4394 4863 } … … 4636 5105 return m_pcSlice->getSPS()->getAMVPMode(m_puhDepth[uiIdx]); 4637 5106 } 4638 #if QC_MULTI_DIS_CAN 5107 #if QC_MULTI_DIS_CAN_A0097 4639 5108 /** construct a list of disparity motion vectors from the neighbouring PUs **/ 4640 5109 Void TComDataCU::getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo ) … … 4667 5136 { 4668 5137 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4669 #if VSP_N & VSP_BUGFIX4670 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4671 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4672 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4673 #else4674 5138 if (refViewIdx!= m_pcSlice->getViewId()) 4675 #endif4676 5139 { 4677 5140 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4699 5162 { 4700 5163 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4701 #if VSP_N & VSP_BUGFIX4702 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4703 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4704 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4705 #else4706 5164 if (refViewIdx!= m_pcSlice->getViewId()) 4707 #endif4708 5165 { 4709 5166 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4731 5188 { 4732 5189 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4733 #if VSP_N & VSP_BUGFIX4734 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4735 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4736 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4737 #else4738 5190 if (refViewIdx!= m_pcSlice->getViewId()) 4739 #endif4740 5191 { 4741 5192 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4762 5213 { 4763 5214 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4764 #if VSP_N & VSP_BUGFIX4765 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4766 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4767 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4768 #else4769 5215 if (refViewIdx!= m_pcSlice->getViewId()) 4770 #endif4771 5216 { 4772 5217 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4796 5241 { 4797 5242 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4798 #if VSP_N & VSP_BUGFIX4799 Int refPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId);4800 //if( !pcTmpCU->isVspRef( eRefPicList, refId ) )4801 if ( refViewIdx!= m_pcSlice->getViewId() || refPOC != m_pcSlice->getPOC())4802 #else4803 5243 if (refViewIdx!= m_pcSlice->getViewId()) 4804 #endif4805 5244 { 4806 5245 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4992 5431 } 4993 5432 4994 #if LGE_DVMCP 4995 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 ) 5433 #if LGE_DVMCP_A0126 5434 #if QC_SIMPLE_NBDV_B0047 5435 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo 5436 #if LGE_IVMP_PARALLEL_MERGE_B0136 5437 , Bool bParMerge 5438 #endif 5439 #else 5440 Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0 5441 #if LGE_IVMP_PARALLEL_MERGE_B0136 5442 , Bool bParMerge 5443 #endif 5444 #endif 5445 ) 4996 5446 { 4997 5447 PartSize eCUMode = getPartitionSize( uiPartAddr ); 4998 5448 TComDataCU* pcTmpCU = NULL; 5449 #if !QC_SIMPLE_NBDV_B0047 4999 5450 TComDataCU* pcCULeft = NULL; 5451 #endif 5000 5452 pDInfo->iN = 0; 5001 5453 … … 5005 5457 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 5006 5458 5007 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼ »ç¿EÈ DV¸¦ ÀúÀE 5459 #if QC_SIMPLE_NBDV_B0047 5460 const Int iNumofDvMCP = 7; 5461 Int aiDvMcpDvCand[2][iNumofDvMCP] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5462 Bool abDvMcpFlag [2][iNumofDvMCP] = {{false,},{false,}}; 5463 #else 5464 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal 5008 5465 Bool abDvMcpFlag [2][7] = {{false,},{false,}}; 5009 5466 //Int aiRefPOC [2][7] = {{-1,},{-1}}; // debug 5467 #endif 5010 5468 TComMv cTmpMvPred, cMv; 5011 5469 Bool bTmpIsSkipped = false; 5012 5470 Bool bDvMcpIsFound = false; 5471 #if LGE_DVMCP_MEM_REDUCTION_B0135 5472 Int iLCUAddrDiff = 0; 5473 #endif 5474 5475 #if LGE_IVMP_PARALLEL_MERGE_B0136 5476 Int xP, yP, nPSW, nPSH; 5477 if( bParMerge) 5478 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH); 5479 #endif 5013 5480 5014 5481 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); … … 5021 5488 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB); 5022 5489 #endif 5023 5490 #if DV_DERIVATION_PARALLEL_B0096 5491 if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) ) 5492 { 5493 pcTmpCU = NULL; 5494 } 5495 #endif 5496 #if LGE_IVMP_PARALLEL_MERGE_B0136 5497 if (pcTmpCU && bParMerge) 5498 { 5499 if (!pcTmpCU->isDiffMER(xP -1, yP+nPSH-1, xP, yP)) 5500 { 5501 pcTmpCU = NULL; 5502 } 5503 } 5504 #endif 5505 5506 #if !QC_SIMPLE_NBDV_B0047 5024 5507 pcCULeft = pcTmpCU; 5025 5508 UInt uiLeftPartIdx = uiIdx; 5509 #endif 5510 5026 5511 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5027 5512 { … … 5042 5527 return; 5043 5528 } 5529 else // MCP 5530 { 5044 5531 #if VSP_N & VSP_BUGFIX 5045 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5046 #else 5047 else // MCP 5048 #endif 5049 { 5532 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5533 { 5534 #endif 5050 5535 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5051 5536 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5055 5540 bDvMcpIsFound = true; 5056 5541 } 5542 #if VSP_N & VSP_BUGFIX 5543 } 5544 #endif 5057 5545 } 5058 5546 } … … 5065 5553 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT); 5066 5554 #endif 5555 #if DV_DERIVATION_PARALLEL_B0096 5556 if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) ) 5557 { 5558 pcTmpCU = NULL; 5559 } 5560 #endif 5561 #if LGE_IVMP_PARALLEL_MERGE_B0136 5562 if (pcTmpCU && bParMerge) 5563 { 5564 if (!pcTmpCU->isDiffMER(xP+nPSW-1, yP-1, xP, yP)) 5565 { 5566 pcTmpCU = NULL; 5567 } 5568 } 5569 #endif 5067 5570 5068 5571 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5069 5572 { 5573 #if LGE_DVMCP_MEM_REDUCTION_B0135 5574 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5575 #endif 5070 5576 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5071 5577 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5084 5590 return; 5085 5591 } 5592 #if LGE_DVMCP_MEM_REDUCTION_B0135 5593 else if(iLCUAddrDiff == 0) //MCP, within same LCU 5594 #else 5595 else // MCP 5596 #endif 5597 { 5086 5598 #if VSP_N & VSP_BUGFIX 5087 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5088 #else 5089 else // MCP 5090 #endif 5091 { 5599 if(pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5600 { 5601 #endif 5092 5602 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5093 5603 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5097 5607 bDvMcpIsFound = true; 5098 5608 } 5609 #if VSP_N & VSP_BUGFIX 5610 } 5611 #endif 5099 5612 } 5100 5613 } … … 5107 5620 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true); 5108 5621 #endif 5622 #if LGE_IVMP_PARALLEL_MERGE_B0136 5623 if (pcTmpCU && bParMerge) 5624 { 5625 if (!pcTmpCU->isDiffMER(xP+nPSW, yP-1, xP, yP)) 5626 { 5627 pcTmpCU = NULL; 5628 } 5629 } 5630 #endif 5631 5109 5632 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5110 5633 { 5634 #if LGE_DVMCP_MEM_REDUCTION_B0135 5635 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5636 #endif 5111 5637 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5112 5638 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5125 5651 return; 5126 5652 } 5653 #if LGE_DVMCP_MEM_REDUCTION_B0135 5654 else if(iLCUAddrDiff == 0) 5655 #else 5656 else // MCP 5657 #endif 5658 { 5127 5659 #if VSP_N & VSP_BUGFIX 5128 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5129 #else 5130 else // MCP 5131 #endif 5132 { 5660 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5661 { 5662 #endif 5133 5663 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5134 5664 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5138 5668 bDvMcpIsFound = true; 5139 5669 } 5670 #if VSP_N & VSP_BUGFIX 5671 } 5672 #endif 5140 5673 } 5141 5674 } … … 5147 5680 #else 5148 5681 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB); 5682 #endif 5683 #if LGE_IVMP_PARALLEL_MERGE_B0136 5684 if (pcTmpCU && bParMerge) 5685 { 5686 if (!pcTmpCU->isDiffMER(xP-1, yP+nPSH, xP, yP)) 5687 { 5688 pcTmpCU = NULL; 5689 } 5690 } 5149 5691 #endif 5150 5692 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) … … 5166 5708 return; 5167 5709 } 5710 else // MCP 5711 { 5168 5712 #if VSP_N & VSP_BUGFIX 5169 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5170 #else 5171 else // MCP 5172 #endif 5173 { 5713 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5714 { 5715 #endif 5174 5716 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5175 5717 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5179 5721 bDvMcpIsFound = true; 5180 5722 } 5723 #if VSP_N & VSP_BUGFIX 5724 } 5725 #endif 5181 5726 } 5182 5727 } … … 5191 5736 pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true); 5192 5737 #endif 5738 #if LGE_IVMP_PARALLEL_MERGE_B0136 5739 if (pcTmpCU && bParMerge) 5740 { 5741 if (!pcTmpCU->isDiffMER(xP-1, yP-1, xP, yP)) 5742 { 5743 pcTmpCU = NULL; 5744 } 5745 } 5746 #endif 5747 5193 5748 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5194 5749 { 5750 #if LGE_DVMCP_MEM_REDUCTION_B0135 5751 iLCUAddrDiff = getAddr() - pcTmpCU->getAddr(); 5752 #endif 5195 5753 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); 5196 5754 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5209 5767 return; 5210 5768 } 5769 #if LGE_DVMCP_MEM_REDUCTION_B0135 5770 else if(iLCUAddrDiff <= 1) 5771 #else 5772 else // MCP 5773 #endif 5774 { 5211 5775 #if VSP_N & VSP_BUGFIX 5212 else if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) // MCP 5213 #else 5214 else // MCP 5215 #endif 5216 { 5776 if (pcTmpCU->getSlice()->getRefPOC( eRefPicList, refId) != m_pcSlice->getPOC()) 5777 { 5778 #endif 5217 5779 cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5218 5780 if( cTmpMvPred.m_bDvMcp && bTmpIsSkipped ) … … 5222 5784 bDvMcpIsFound = true; 5223 5785 } 5786 #if VSP_N & VSP_BUGFIX 5787 } 5788 #endif 5224 5789 } 5225 5790 } … … 5230 5795 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) 5231 5796 { 5797 #if !QC_SIMPLE_NBDV_B0047 5232 5798 UInt uiPUIdx = uiPartIdx; 5233 5799 UInt uiAbsPartAddr = uiPartAddr; … … 5387 5953 } 5388 5954 } 5955 #else 5956 TComMv cColMv; 5957 Int iTargetViewIdx = 0; 5958 Int iTStartViewIdx = 0; 5959 UInt uiPartIdxRB, uiBRIdx; 5960 Int uiViewIdxCurr= getSlice()->getViewId(); 5961 UInt uiPartIdxCenter; 5962 xDeriveCenterIdx( eCUMode, uiPartIdx, uiPartIdxCenter ); 5963 5964 Int uiLCUIdx = getAddr(); 5965 Int uiLCUnew = uiLCUIdx; 5966 eCUMode = getPartitionSize( 0 ); 5967 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 5968 uiBRIdx = uiPartIdxLT; 5969 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 5970 if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() )) // image boundary check 5971 { 5972 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 5973 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 5974 { 5975 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 5976 } 5977 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 5978 { 5979 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 5980 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 5981 } 5982 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 5983 { 5984 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 5985 uiLCUnew = uiLCUIdx + 1; 5986 } 5987 else //is the right bottom corner of LCU 5988 { 5989 uiBRIdx = 0; 5990 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 5991 } 5992 } 5993 const Int iNumofCandPic = 2; 5994 for(Int i =0; i < iNumofCandPic; i++) 5995 { 5996 Int lpRef=0; 5997 if(i == 0) 5998 { //check the col-located picture 5999 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 6000 #if COLLOCATED_REF_IDX 6001 lpRef = getSlice()->getColRefIdx(); 6002 #else 6003 Int lpRef = 0; 6004 #endif 6005 } 6006 else 6007 { 6008 if(!(getPic()->getRapbCheck())) 6009 break; 6010 eRefPicList=getPic()->getRapRefList(); 6011 lpRef=getPic()->getRapRefIdx(); 6012 } 6013 6014 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 6015 { 6016 if (uiViewIdxCurr > 1) 6017 { 6018 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 6019 { 6020 clipMv(cColMv); 6021 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6022 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6023 return ; 6024 } 6025 } 6026 6027 if(xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiPartIdxCenter, cColMv, iTargetViewIdx, iTStartViewIdx )) 6028 { 6029 clipMv(cColMv); 6030 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6031 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6032 return ; 6033 } 6034 if(uiViewIdxCurr == 1) 6035 { 6036 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 6037 { 6038 clipMv(cColMv); 6039 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 6040 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 6041 return ; 6042 } 6043 } 6044 } 6045 } 6046 #endif 5389 6047 } // if TMVP Flag 5390 6048 5391 6049 if( bDvMcpIsFound ) // skip dvmcp 5392 6050 { 6051 #if QC_SIMPLE_NBDV_B0047 6052 for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial 6053 #else 5393 6054 for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal 6055 #endif 5394 6056 { 5395 6057 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 5407 6069 } 5408 6070 } 5409 5410 6071 return; 5411 5412 } 5413 #endif 5414 6072 } 6073 #endif 5415 6074 #endif 5416 6075 … … 5422 6081 * \param pInfo 5423 6082 */ 6083 #if SHARP_INTERVIEW_DECOUPLE_B0111 6084 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo, Int iMVPIdx) 6085 { 6086 if (!m_pcSlice->getSPS()->getViewId() || !m_pcSlice->getSPS()->getMultiviewMvPredMode()) 6087 { 6088 // HEVC 6089 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 6090 } 6091 else 6092 { 6093 if (iMVPIdx!=0) 6094 { 6095 // HEVC part 6096 fillMvpCandBase(uiPartIdx, uiPartAddr, eRefPicList, iRefIdx, pInfo); 6097 if (iRefIdx < 0) 6098 { 6099 return; 6100 } 6101 for (Int j = AMVP_MAX_NUM_CANDS - 1; j >= 0; j--) 6102 { 6103 pInfo->m_acMvCand[j+1] = pInfo->m_acMvCand[j]; 6104 } 6105 pInfo->iN++; 6106 } 6107 if (iMVPIdx<=0) 6108 { 6109 // extention part 6110 DisInfo cDisInfo; 6111 cDisInfo.iN = 0; 6112 #if LGE_DVMCP_A0126 6113 #if QC_SIMPLE_NBDV_B0047 6114 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 6115 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 6116 #else 6117 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 6118 #endif 6119 #else 6120 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 6121 #endif 6122 #else 6123 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); 6124 #endif 6125 if(cDisInfo.iN==0) 6126 { 6127 cDisInfo.iN = 1; 6128 cDisInfo.m_acMvCand[0].setHor(0); 6129 cDisInfo.m_acMvCand[0].setVer(0); 6130 cDisInfo.m_aVIdxCan[0] = 0; 6131 } 6132 TComMv cPdmMvPred; 6133 #if QC_MULTI_DIS_CAN_A0097 6134 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 6135 #else 6136 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 6137 #endif 6138 { 6139 clipMv( cPdmMvPred ); 6140 pInfo->m_acMvCand[0] = cPdmMvPred; 6141 } 6142 else 6143 { 6144 pInfo->m_acMvCand[0].set(0,0); 6145 } 6146 } 6147 } 6148 } 6149 6150 6151 Void TComDataCU::fillMvpCandBase( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 6152 #else 5424 6153 Void TComDataCU::fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ) 6154 #endif 5425 6155 { 5426 6156 PartSize eCUMode = getPartitionSize( 0 ); … … 5435 6165 } 5436 6166 5437 #if QC_MULTI_DIS_CAN 6167 #if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111 5438 6168 DisInfo cDisInfo; 5439 6169 cDisInfo.iN = 0; 5440 6170 if(m_pcSlice->getSPS()->getViewId() && m_pcSlice->getSPS()->getMultiviewMvPredMode()) 5441 6171 { 5442 #if LGE_DVMCP 6172 #if LGE_DVMCP_A0126 6173 #if QC_SIMPLE_NBDV_B0047 6174 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 6175 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false); 6176 #else 6177 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 6178 #endif 6179 #else 5443 6180 getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx ); 6181 #endif 5444 6182 #else 5445 6183 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); … … 5454 6192 } 5455 6193 #endif 5456 #if HHI_INTER_VIEW_MOTION_PRED 6194 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5457 6195 #if ( PDM_AMVP_POS == 0 ) 5458 6196 // get inter-view mv predictor (at position 0) 5459 6197 TComMv cPdmMvPred; 5460 #if QC_MULTI_DIS_CAN 6198 #if QC_MULTI_DIS_CAN_A0097 5461 6199 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5462 6200 #else … … 5513 6251 } 5514 6252 5515 #if HHI_INTER_VIEW_MOTION_PRED 6253 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5516 6254 #if ( PDM_AMVP_POS == 1 ) 5517 6255 // get inter-view mv predictor (at position 1) 5518 6256 TComMv cPdmMvPred; 5519 #if QC_MULTI_DIS_CAN 6257 #if QC_MULTI_DIS_CAN_A0097 5520 6258 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5521 6259 #else … … 5565 6303 } 5566 6304 5567 #if HHI_INTER_VIEW_MOTION_PRED 6305 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5568 6306 #if ( PDM_AMVP_POS == 2 ) 5569 6307 // get inter-view mv predictor (at position 2) 5570 6308 TComMv cPdmMvPred; 5571 #if QC_MULTI_DIS_CAN 6309 #if QC_MULTI_DIS_CAN_A0097 5572 6310 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5573 6311 #else … … 5587 6325 { 5588 6326 pInfo->iN = 1; 5589 } 5590 } 5591 #if QC_MULTI_DIS_CAN 6327 #if FIX_MISUSE_REFINDEX 6328 pInfo->m_acMvCand[ 1 ].set(0, 0); 6329 #endif 6330 } 6331 } 6332 #if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111 5592 6333 if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 ) 5593 6334 { … … 5663 6404 if ( uiLCUIdx >= 0 && xGetColMVP( eRefPicList, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx_Col ) ) 5664 6405 { 6406 #if FIX_LGE_DVMCP_B0133 6407 cColMv.m_bDvMcp = false; 6408 #endif 5665 6409 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5666 6410 } … … 5672 6416 if (xGetColMVP( eRefPicList, uiCurLCUIdx, uiPartIdxCenter, cColMv, iRefIdx_Col )) 5673 6417 { 6418 #if FIX_LGE_DVMCP_B0133 6419 cColMv.m_bDvMcp = false; 6420 #endif 5674 6421 pInfo->m_acMvCand[pInfo->iN++] = cColMv; 5675 6422 } … … 5678 6425 } 5679 6426 5680 #if HHI_INTER_VIEW_MOTION_PRED 6427 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5681 6428 #if ( PDM_AMVP_POS == 3 ) 5682 6429 // get inter-view mv predictor (at position 3) 5683 6430 TComMv cPdmMvPred; 5684 #if QC_MULTI_DIS_CAN 6431 #if QC_MULTI_DIS_CAN_A0097 5685 6432 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 5686 6433 #else … … 5699 6446 #endif 5700 6447 5701 #if HHI_INTER_VIEW_MOTION_PRED 6448 #if HHI_INTER_VIEW_MOTION_PRED && !SHARP_INTERVIEW_DECOUPLE_B0111 5702 6449 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + ( getSlice()->getSPS()->getMultiviewMvPredMode() ? 1 : 0 ); 5703 6450 if (pInfo->iN > iNumAMVPCands) … … 5953 6700 { 5954 6701 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 5955 #if LGE_DVMCP 6702 #if LGE_DVMCP_A0126 5956 6703 cMvPred.m_bDvMcp = false; 5957 6704 #endif … … 5982 6729 if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 ) 5983 6730 { 5984 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )5985 {5986 return false;5987 }5988 6731 #if VSP_N /// 5989 6732 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 5990 6733 return false; 5991 6734 #endif 6735 #if QC_IV_AS_LT_B0046 6736 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm(); 6737 Bool bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); 6738 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 6739 if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) ) 6740 #else 6741 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6742 { 6743 return false; 6744 } 5992 6745 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 5993 6746 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// 6747 #endif 5994 6748 { 5995 6749 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 5996 #if LGE_DVMCP 6750 #if LGE_DVMCP_A0126 5997 6751 cMvPred.m_bDvMcp = false; 5998 6752 #endif … … 6138 6892 Int iNeibRefPOC; 6139 6893 6894 #if QC_IV_AS_LT_B0046 6895 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getIsLongTerm(); 6896 Bool bIsNeibRefLongTerm = false; 6897 #endif 6140 6898 if( pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) >= 0 ) 6141 6899 { 6142 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) );6143 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) )6144 return false;6145 6900 #if VSP_N /// 6146 6901 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) 6147 6902 return false; 6148 6903 #endif 6904 iNeibRefPOC = pcTmpCU->getSlice()->getRefPOC( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ); 6905 #if QC_IV_AS_LT_B0046 6906 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm() ; 6907 if ( (bIsCurrRefLongTerm == bIsNeibRefLongTerm) && (iNeibRefPOC == iCurrRefPOC) ) 6908 #else 6909 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6910 return false; 6149 6911 if( iNeibRefPOC == iCurrRefPOC ) // Same Reference Frame But Diff List// 6912 #endif 6150 6913 { 6151 6914 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 6152 #if LGE_DVMCP 6915 #if LGE_DVMCP_A0126 6153 6916 cMvPred.m_bDvMcp = false; 6154 6917 #endif … … 6165 6928 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 6166 6929 TComMv rcMv; 6167 6930 #if QC_IV_AS_LT_B0046 6931 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx))->getIsLongTerm(); 6932 if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm ) 6933 { 6934 #else 6168 6935 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6169 6936 { 6170 6937 return false; 6171 6938 } 6939 #endif 6172 6940 #if VSP_N /// 6173 6941 if( pcTmpCU->isVspRef( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) ) … … 6192 6960 rcMv = cMvPred.scaleMv( iScale ); 6193 6961 } 6194 #if LGE_DVMCP 6962 #if LGE_DVMCP_A0126 6195 6963 rcMv.m_bDvMcp = false; 6196 6964 #endif 6197 6965 pInfo->m_acMvCand[ pInfo->iN++] = rcMv; 6198 6966 return true; 6967 #if QC_IV_AS_LT_B0046 6968 } 6969 #endif 6199 6970 } 6200 6971 //---------------------- V2(END) --------------------// … … 6204 6975 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx); 6205 6976 TComMv rcMv; 6206 6977 #if QC_IV_AS_LT_B0046 6978 bIsNeibRefLongTerm = m_pcSlice->getRefPic( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx))->getIsLongTerm(); ; 6979 if ( bIsCurrRefLongTerm == bIsNeibRefLongTerm ) 6980 { 6981 #else 6207 6982 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) != m_pcSlice->getRefViewId( eRefPicList, iRefIdx ) ) 6208 6983 { 6209 6984 return false; 6210 6985 } 6986 #endif 6211 6987 #if VSP_N /// 6212 6988 if( pcTmpCU->isVspRef( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) ) … … 6231 7007 rcMv = cMvPred.scaleMv( iScale ); 6232 7008 } 6233 #if LGE_DVMCP 7009 #if LGE_DVMCP_A0126 6234 7010 rcMv.m_bDvMcp = false; 6235 7011 #endif 6236 7012 pInfo->m_acMvCand[ pInfo->iN++] = rcMv; 6237 7013 return true; 7014 #if QC_IV_AS_LT_B0046 7015 } 7016 #endif 6238 7017 } 6239 7018 //---------------------- V3(END) --------------------// … … 6241 7020 } 6242 7021 6243 #if QC_MULTI_DIS_CAN 7022 #if QC_MULTI_DIS_CAN_A0097 6244 7023 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 6245 7024 { 6246 #if LGE_DVMCP 7025 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6247 7026 Int iDvMcpDispX[2] = {-1,}; 6248 7027 Bool bDvMcpFlag [2] = { false, }; … … 6269 7048 return false; 6270 7049 } 6271 #if LGE_DVMCP 7050 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6272 7051 Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr ); 6273 7052 #endif … … 6299 7078 if ( iColViewIdx == iColRefViewIdx ) // temporal vector 6300 7079 { 6301 #if LGE_DVMCP 7080 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6302 7081 if( iColViewIdx >0 ) 6303 7082 { … … 6317 7096 { 6318 7097 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 6319 #if LGE_DVMCP 7098 #if LGE_DVMCP_A0126 6320 7099 rcMv.m_bDvMcp = false; 6321 7100 #endif … … 6326 7105 } 6327 7106 6328 #if LGE_DVMCP 7107 #if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047 6329 7108 for( Int ilist=0 ; ilist<2 ; ilist++ ) 6330 7109 { … … 6357 7136 RefPicList eColRefPicList; 6358 7137 Int iColPOC, iColRefPOC, iCurrPOC, iCurrRefPOC, iScale; 6359 #if SONY_COLPIC_AVAILABILITY 7138 #if SONY_COLPIC_AVAILABILITY || VSP_N 7139 #if QC_IV_AS_LT_B0046 7140 Int iColViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx; 7141 #else 6360 7142 Int iColViewOrderIdx, iColRefViewOrderIdx, iCurrViewOrderIdx, iCurrRefViewOrderIdx; 6361 7143 #endif 7144 #endif 6362 7145 TComMv cColMv; 6363 7146 6364 #if SONY_COLPIC_AVAILABILITY6365 iCurrViewOrderIdx = m_pcSlice->getViewOrderIdx();6366 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx();6367 #endif6368 7147 // use coldir. 6369 7148 #if COLLOCATED_REF_IDX … … 6379 7158 iCurrPOC = m_pcSlice->getPOC(); 6380 7159 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC(); 6381 iColPOC = pColCU->getSlice()->getPOC(); 6382 #if SONY_COLPIC_AVAILABILITY 7160 iColPOC = pColCU->getSlice()->getPOC(); 7161 7162 #if SONY_COLPIC_AVAILABILITY || VSP_N 7163 iCurrViewOrderIdx = m_pcSlice->getViewOrderIdx(); 7164 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6383 7165 iColViewOrderIdx = pColCU->getSlice()->getViewOrderIdx(); 6384 7166 #endif … … 6389 7171 } 6390 7172 6391 #if !SONY_COLPIC_AVAILABILITY 7173 #if !SONY_COLPIC_AVAILABILITY&!QC_IV_AS_LT_B0046 6392 7174 if( m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId() != m_pcSlice->getViewId() ) 6393 7175 return false; … … 6413 7195 } 6414 7196 } 7197 7198 7199 #if VSP_N 7200 Bool bIsCurrRefVsp = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsVsp(); 7201 Bool bIsColRefVsp = pColCU->getSlice()->getRefPic( eColRefPicList,pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getIsVsp(); 7202 7203 if(bIsCurrRefVsp) 7204 { 7205 #if (VSP_TMVP==0) 7206 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7207 #elif (VSP_TMVP==1 || VSP_TMVP==2) 7208 #if !VSP_TMVP_ENABLE 7209 if(!bIsColRefVsp) return false; 7210 #endif 7211 rcMv.setZero(); 7212 #if !VSP_MV_ZERO 7213 if( bIsColRefVsp ) rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7214 #endif 7215 #endif // (VSP_TMVP==1 || VSP_TMVP==2) 7216 return true; 7217 } 7218 if(bIsColRefVsp) 7219 #if (VSP_TMVP==0) 7220 { 7221 if(iCurrPOC != iCurrRefPOC) 7222 return false; 7223 else 7224 { 7225 Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); 7226 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 7227 cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7228 if ( iScale == 4096 ) 7229 rcMv = cColMv; 7230 else 7231 rcMv = cColMv.scaleMv( iScale ); 7232 return true; 7233 } 7234 } 7235 #elif (VSP_TMVP==1) 7236 return false; 7237 #elif (VSP_TMVP==2) 7238 { 7239 for(Int i=0; i < m_pcSlice->getNumRefIdx(eRefPicList); i++) 7240 { 7241 if( m_pcSlice->getRefPic(eRefPicList, i)->getIsVsp() ) 7242 { 7243 riRefIdx = i; 7244 #if VSP_MV_ZERO 7245 rcMv.setZero(); 7246 #else 7247 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 7248 #endif 7249 return true; 7250 } 7251 } 7252 return false; 7253 } 7254 #endif // VSP_TMVP 7255 #endif // VSP_N 7256 6415 7257 6416 7258 // Scale the vector. 6417 7259 iColRefPOC = pColCU->getSlice()->getRefPOC(eColRefPicList, iColRefIdx); 6418 7260 7261 #if !QC_IV_AS_LT_B0046 6419 7262 #if SONY_COLPIC_AVAILABILITY 6420 7263 iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); … … 6425 7268 } 6426 7269 #endif 7270 #else 7271 Bool bIsCurrRefLongTerm = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getIsLongTerm(); 7272 Bool bIsColRefLongTerm = pColCU->getSlice()->getWasLongTerm(eColRefPicList, iColRefIdx); 7273 if(bIsCurrRefLongTerm != bIsColRefLongTerm) 7274 { 7275 assert( ((iColPOC == iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC != iColRefPOC)&&(iCurrPOC == iCurrRefPOC))); 7276 return false; 7277 } 7278 #endif 6427 7279 6428 7280 cColMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 6429 7281 6430 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC(); 7282 #if QC_IV_AS_LT_B0046 7283 { 7284 assert( ((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC))||((iColPOC == iColRefPOC)&&(iCurrPOC == iCurrRefPOC))); 7285 if(!bIsCurrRefLongTerm) //short-term 7286 { 7287 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); 7288 if ( iScale == 4096 ) 7289 { 7290 rcMv = cColMv; 7291 } 7292 else 7293 { 7294 rcMv = cColMv.scaleMv( iScale ); 7295 } 7296 }else 7297 #if QC_MVHEVC_B0046 7298 rcMv = cColMv; //inter-view 7299 #else 7300 { 7301 #if SONY_COLPIC_AVAILABILITY 7302 Int iColRefViewOrderIdx = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewOrderIdx(); 7303 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 7304 if ( iScale == 4096 ) 7305 { 7306 rcMv = cColMv; 7307 } 7308 else 7309 { 7310 rcMv = cColMv.scaleMv( iScale ); 7311 } 7312 #else 7313 return false; 7314 #endif 7315 } 7316 #endif 7317 } 7318 #else 6431 7319 #if SONY_COLPIC_AVAILABILITY 6432 7320 iScale = 0; 6433 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6434 #if VSP_N 6435 // UInt uiColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 6436 UInt uiCurRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId(); 6437 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() ) 6438 iScale = 4096; 6439 else 6440 #endif 7321 // iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6441 7322 if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC)) 6442 7323 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 6444 7325 iScale = xGetDistScaleFactor(iCurrViewOrderIdx, iCurrRefViewOrderIdx, iColViewOrderIdx, iColRefViewOrderIdx); 6445 7326 else 6446 return false; 6447 7327 return false; 6448 7328 #else 6449 7329 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 6451 7331 if ( iScale == 4096 ) 6452 7332 { 6453 #if VSP_MV_ZERO6454 if( uiCurRefViewId == m_pcSlice->getViewId() && m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC() == m_pcSlice->getPOC() )6455 rcMv.setZero();6456 else6457 #endif6458 7333 rcMv = cColMv; 6459 7334 } … … 6462 7337 rcMv = cColMv.scaleMv( iScale ); 6463 7338 } 6464 7339 #endif 6465 7340 return true; 6466 7341 } … … 7391 8266 memcpy( m_puhInterDir + uiAbsPartIdxDst, pcCU->getInterDir() + uiAbsPartIdxSrc, sizeof( m_puhInterDir[0] ) * uiNumPartition ); 7392 8267 8268 #if !MTK_UNCONSTRAINED_MVI_B0083 7393 8269 memcpy( m_apiMVPIdx[0] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition ); 7394 8270 memcpy( m_apiMVPIdx[1] + uiAbsPartIdxDst, pcCU->getMVPIdx(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPIdx[0]) * uiNumPartition ); 7395 8271 memcpy( m_apiMVPNum[0] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_0) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition ); 7396 8272 memcpy( m_apiMVPNum[1] + uiAbsPartIdxDst, pcCU->getMVPNum(REF_PIC_LIST_1) + uiAbsPartIdxSrc, sizeof(*m_apiMVPNum[0]) * uiNumPartition ); 8273 #endif 7397 8274 7398 8275 pcCU->getCUMvField( REF_PIC_LIST_0 )->copyTo( &m_acCUMvField[0], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition ); 7399 8276 pcCU->getCUMvField( REF_PIC_LIST_1 )->copyTo( &m_acCUMvField[1], -Int(uiAbsPartIdxSrc) + uiAbsPartIdxDst, uiAbsPartIdxSrc, uiNumPartition ); 8277 8278 #if MTK_UNCONSTRAINED_MVI_B0083 8279 if( pcCU->getSlice()->getSliceType() == P_SLICE) 8280 { 8281 #if NTT_FIX_UNCONSTRAINED_MVI 8282 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 1, getSlice()->getNumRefIdx( RefPicList(0) ) ); 8283 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, -1, 1, getSlice()->getNumRefIdx( RefPicList(1) ) ); 8284 #else 8285 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 1); 8286 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, -1, 1); 8287 #endif 8288 } 8289 else 8290 { 8291 #if NTT_FIX_UNCONSTRAINED_MVI 8292 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3, getSlice()->getNumRefIdx( RefPicList(0) ) ); 8293 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3, getSlice()->getNumRefIdx( RefPicList(1) ) ); 8294 #else 8295 m_acCUMvField[0].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3); 8296 m_acCUMvField[1].setUndefinedMv( uiAbsPartIdxDst, uiNumPartition, m_pePredMode, m_puhInterDir, 0, 3); 8297 #endif 8298 } 8299 #endif 8300 7400 8301 7401 8302 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC … … 7410 8311 // ------------------------------------------------------------------------------------------------------------------- 7411 8312 #if HHI_INTER_VIEW_MOTION_PRED 7412 #if !QC_MULTI_DIS_CAN 8313 #if !QC_MULTI_DIS_CAN_A0097 7413 8314 Int 7414 8315 TComDataCU::getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ) … … 7429 8330 #else 7430 8331 Int 7431 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 8332 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 8333 #if QC_MRG_CANS_B0048 8334 , Int* iPdm 8335 #endif 8336 ) 7432 8337 { 7433 8338 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 7434 8339 ROFRS( pcDepthMapGenerator, 0 ); 7435 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo ); 8340 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo 8341 #if QC_MRG_CANS_B0048 8342 , iPdm 8343 #endif 8344 ); 7436 8345 } 7437 8346 Bool … … 7466 8375 TComResidualGenerator* pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator(); 7467 8376 ROFRS( pcResidualGenerator, false ); 7468 #if QC_MULTI_DIS_CAN 8377 #if QC_MULTI_DIS_CAN_A0097 7469 8378 DisInfo cDisInfo; 7470 8379 cDisInfo.iN = 0; 7471 8380 PartSize m_peSaved = getPartitionSize( 0 ); 7472 8381 m_pePartSize[0] = SIZE_2Nx2N; 7473 #if LGE_DVMCP 8382 #if LGE_DVMCP_A0126 8383 #if QC_SIMPLE_NBDV_B0047 8384 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136 8385 getDisMvpCand2( 0, 0, &cDisInfo, false); 8386 #else 8387 getDisMvpCand2( 0, 0, &cDisInfo); 8388 #endif 8389 #else 7474 8390 getDisMvpCand2( 0, 0, &cDisInfo, true ); 8391 #endif 7475 8392 #else 7476 8393 getDisMvpCand ( 0, 0, &cDisInfo ); … … 7501 8418 #endif 7502 8419 7503 #if LGE_EDGE_INTRA 8420 #if LGE_EDGE_INTRA_A0070 7504 8421 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion ) 7505 8422 { … … 8125 9042 8126 9043 //! \} 8127 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.h
r193 r213 159 159 Int* m_pcArlCoeffCb; ///< ARL coefficient buffer (Cb) 160 160 Int* m_pcArlCoeffCr; ///< ARL coefficient buffer (Cr) 161 #if FIX_MEM_LEAKS162 161 Bool m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d 163 #endif164 162 165 163 static Int* m_pcGlbArlCoeffY; ///< ARL coefficient buffer (Y) 166 164 static Int* m_pcGlbArlCoeffCb; ///< ARL coefficient buffer (Cb) 167 165 static Int* m_pcGlbArlCoeffCr; ///< ARL coefficient buffer (Cr) 166 168 167 #endif 169 168 … … 194 193 195 194 Bool* m_pbMergeFlag; ///< array of merge flags 195 #if LGE_ILLUCOMP_B0045 196 Bool* m_pbICFlag; ///< array of IC flags 197 #endif 196 198 UChar* m_puhMergeIndex; ///< array of merge candidate indices 197 199 #if AMP_MRG … … 217 219 #endif 218 220 219 #if LGE_EDGE_INTRA 221 #if LGE_EDGE_INTRA_A0070 220 222 UChar* m_pucEdgeCode; ///< array of edge code 221 223 UChar* m_pucEdgeNumber; ///< total number of edge … … 235 237 Bool m_bDecSubCu; ///< indicates decoder-mode 236 238 Double m_dTotalCost; ///< sum of partition RD costs 239 #if FIX_RDO_NEGDIST 240 Dist m_uiTotalDistortion; ///< sum of partition distortion 241 #else 237 242 UInt m_uiTotalDistortion; ///< sum of partition distortion 243 #endif 238 244 UInt m_uiTotalBits; ///< sum of partition bits 239 245 UInt m_uiTotalBins; ///< sum of partition bins 240 246 UInt* m_uiSliceStartCU; ///< Start CU address of current slice 241 247 UInt* m_uiEntropySliceStartCU; ///< Start CU address of current slice 242 243 #if OL_DEPTHLIMIT_A0044244 //add a variable to store the partition information245 //a 2D array in uidepth, part_symbol format246 UInt m_uiPartInfo[OL_PART_BUF_SIZE][2];247 UInt m_uiPartNum;248 Bool m_dumpPartInfo;249 #endif250 248 251 249 // ------------------------------------------------------------------------------------------------------------------- … … 269 267 Int* m_piContourPredTexDeltaDC1; 270 268 Int* m_piContourPredTexDeltaDC2; 269 #endif 270 271 #if RWTH_SDC_DLT_B0036 272 Bool* m_pbSDCFlag; 273 Pel* m_apSegmentDCOffset[2]; 271 274 #endif 272 275 … … 283 286 Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); 284 287 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx ); 285 #if QC_MULTI_DIS_CAN 288 #if QC_MULTI_DIS_CAN_A0097 286 289 Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 287 290 #endif … … 475 478 Void setSubPart ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); 476 479 480 #if LGE_ILLUCOMP_B0045 481 Bool* getICFlag () { return m_pbICFlag; } 482 Bool getICFlag ( UInt uiIdx ) { return m_pbICFlag[uiIdx]; } 483 Void setICFlag ( UInt uiIdx, Bool uh ) { m_pbICFlag[uiIdx] = uh; } 484 Void setICFlagSubParts ( Bool bICFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 485 Bool isICFlagRequired (UInt uiAbsPartIdx); 486 #endif 487 477 488 #if AMP_MRG 478 489 Void setMergeAMP( Bool b ) { m_bIsMergeAMP = b; } … … 533 544 534 545 #if HHI_INTER_VIEW_MOTION_PRED 535 #if !QC_MULTI_DIS_CAN 546 #if !QC_MULTI_DIS_CAN_A0097 536 547 Int getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 537 548 Bool getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 538 549 #else 539 550 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 540 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 551 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 552 #if QC_MRG_CANS_B0048 553 , Int* iPdm 554 #endif 555 ); 541 556 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 542 #if LGE_DVMCP 543 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 ); 557 #if LGE_DVMCP_A0126 558 #if QC_SIMPLE_NBDV_B0047 559 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo 560 #if LGE_IVMP_PARALLEL_MERGE_B0136 561 , Bool bParMerg = false 562 #endif 563 ); 564 #else 565 Void getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1 566 #if LGE_IVMP_PARALLEL_MERGE_B0136 567 , Bool bParMerg = false 568 #endif 569 ); 570 #endif 544 571 #endif 545 572 … … 589 616 590 617 AMVP_MODE getAMVPMode ( UInt uiIdx ); 618 #if SHARP_INTERVIEW_DECOUPLE_B0111 619 Void fillMvpCandBase ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 620 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo , Int iMVPIdx=-1); 621 #else 591 622 Void fillMvpCand ( UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, AMVPInfo* pInfo ); 623 #endif 592 624 #if PARALLEL_MERGE 593 625 Bool isDiffMER ( Int xN, Int yN, Int xP, Int yP); … … 611 643 612 644 Void compressMV (); 613 614 #if OL_DEPTHLIMIT_A0044615 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 #endif622 645 623 646 // ------------------------------------------------------------------------------------------------------------------- … … 706 729 707 730 UInt getCtxSkipFlag ( UInt uiAbsPartIdx ); 731 #if LGE_ILLUCOMP_B0045 732 UInt getCtxICFlag ( UInt uiAbsPartIdx ); 733 #endif 708 734 UInt getCtxInterDir ( UInt uiAbsPartIdx ); 709 735 … … 716 742 UInt& getTotalBins () { return m_uiTotalBins; } 717 743 718 #if LGE_EDGE_INTRA 744 #if LGE_EDGE_INTRA_A0070 719 745 UInt getCtxEdgeIntra ( UInt uiAbsPartIdx ); 720 746 #endif … … 725 751 726 752 Double& getTotalCost() { return m_dTotalCost; } 753 #if FIX_RDO_NEGDIST 754 Dist& getTotalDistortion() { return m_uiTotalDistortion; } 755 #else 727 756 UInt& getTotalDistortion() { return m_uiTotalDistortion; } 757 #endif 728 758 UInt& getTotalBits() { return m_uiTotalBits; } 729 759 UInt& getTotalNumPart() { return m_uiNumPartition; } … … 796 826 #endif 797 827 798 #if LGE_EDGE_INTRA 828 #if LGE_EDGE_INTRA_A0070 799 829 UChar* getEdgeCode( UInt uiIdx ) { return &m_pucEdgeCode[uiIdx * LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4]; } 800 830 UChar* getEdgeNumber( ) { return m_pucEdgeNumber; } … … 818 848 Void setEdgeDeltaDC1( UInt uiIdx, Int val ) { m_piEdgeDeltaDC1[uiIdx] = val; } 819 849 #endif 850 #endif 851 852 #if RWTH_SDC_DLT_B0036 853 Bool* getSDCFlag () { return m_pbSDCFlag; } 854 Bool getSDCFlag ( UInt uiIdx ) { return m_pbSDCFlag[uiIdx]; } 855 Void setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 856 857 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 858 859 Bool getSDCAvailable ( UInt uiAbsPartIdx ); 860 861 Pel* getSDCSegmentDCOffset( UInt uiSeg ) { return m_apSegmentDCOffset[uiSeg]; } 862 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 863 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 820 864 #endif 821 865 }; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r193 r213 78 78 m_uiSubSampExpX = uiSubSampExpX; 79 79 m_uiSubSampExpY = uiSubSampExpY; 80 #if !QC_MULTI_DIS_CAN 80 #if !QC_MULTI_DIS_CAN_A0097 81 81 m_ppcYuv = new TComYuv* [ m_uiMaxDepth ]; 82 82 m_ppcCU = new TComDataCU* [ m_uiMaxDepth ]; … … 102 102 { 103 103 m_bCreated = false; 104 #if !QC_MULTI_DIS_CAN 104 #if !QC_MULTI_DIS_CAN_A0097 105 105 for( UInt uiDepth = 0; uiDepth < m_uiMaxDepth; uiDepth++ ) 106 106 { … … 377 377 } 378 378 379 #if !QC_MULTI_DIS_CAN 379 #if !QC_MULTI_DIS_CAN_A0097 380 380 Bool 381 381 TComDepthMapGenerator::predictDepthMap( TComPic* pcPic ) … … 613 613 614 614 #if HHI_INTER_VIEW_MOTION_PRED 615 #if QC_MULTI_DIS_CAN 615 #if QC_MULTI_DIS_CAN_A0097 616 616 Int 617 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 617 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 618 #if QC_MRG_CANS_B0048 619 , Int* iPdm 620 #endif 621 ) 618 622 #else 619 623 Int … … 624 628 AOF ( m_bCreated && m_bInit ); 625 629 626 #if !QC_MULTI_DIS_CAN 630 #if !QC_MULTI_DIS_CAN_A0097 627 631 ROFRS( m_bPDMAvailable, 0 ); 628 632 #endif … … 634 638 ROTRS( !bPdmMerge, 0 ); 635 639 640 #if QC_MRG_CANS_B0048 641 Bool abPdmAvailable[4] = {false, false, false, false}; 642 #else 636 643 Bool abPdmAvailable[2] = {false,false}; 644 #endif 637 645 638 646 Int iValid = 0; … … 665 673 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 666 674 667 #if QC_MULTI_DIS_CAN 675 #if QC_MULTI_DIS_CAN_A0097 668 676 Int iCurrPosX, iCurrPosY; 669 677 UInt uiPartAddr; … … 719 727 paiPdmRefIdx [ uiBaseRefListId ] = iPdmRefIdx; 720 728 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 721 #if LGE_DVMCP 729 #if LGE_DVMCP_A0126 722 730 cMv.m_bDvMcp = true; 723 731 cMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor(); … … 733 741 } 734 742 Int iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ); 735 743 #if QC_MRG_CANS_B0048 744 iPdm[0] = iPdmInterDir; 745 #else 736 746 if (iPdmInterDir == 0) 737 747 { 748 #endif 738 749 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 739 750 { … … 747 758 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC()) 748 759 { 760 #if QC_MRG_CANS_B0048 761 abPdmAvailable[ iRefListId+2 ] = true; 762 paiPdmRefIdx [ iRefListId+2 ] = iPdmRefIdx; 763 #else 749 764 abPdmAvailable[ iRefListId ] = true; 750 765 paiPdmRefIdx [ iRefListId ] = iPdmRefIdx; 751 #if QC_MULTI_DIS_CAN 766 #endif 767 #if QC_MULTI_DIS_CAN_A0097 752 768 TComMv cMv = pDInfo->m_acMvCand[0]; 753 769 cMv.setVer(0); … … 756 772 #endif 757 773 pcCU->clipMv( cMv ); 774 #if QC_MRG_CANS_B0048 775 pacPdmMv [ iRefListId + 2] = cMv; 776 #else 758 777 pacPdmMv [ iRefListId ] = cMv; 778 #endif 759 779 break; 760 780 } 761 781 } 762 782 } 783 #if QC_MRG_CANS_B0048 784 iPdmInterDir = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 ) ; 785 iPdm[1] = iPdmInterDir; 786 #else 763 787 iPdmInterDir = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ) ; 764 788 } 789 #endif 765 790 766 791 return iPdmInterDir; … … 781 806 if( pcCU->getSlice()->getRefPOC( eRefPicList, iPdmRefIdx ) != pcCU->getSlice()->getPOC() ) 782 807 { 783 #if QC_MULTI_DIS_CAN 808 #if QC_MULTI_DIS_CAN_A0097 784 809 if( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 785 810 #else … … 807 832 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 808 833 { 809 #if QC_MULTI_DIS_CAN 834 #if QC_MULTI_DIS_CAN_A0097 810 835 if ( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 811 836 #else … … 827 852 } 828 853 829 #if QC_MULTI_DIS_CAN 854 #if QC_MULTI_DIS_CAN_A0097 830 855 Bool 831 856 TComDepthMapGenerator::getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ) 832 857 { 833 #if LGE_DVMCP 858 #if LGE_DVMCP_A0126 834 859 rcMv.m_bDvMcp = false; 835 860 #endif … … 910 935 { 911 936 rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() ); 912 #if LGE_DVMCP 937 #if LGE_DVMCP_A0126 913 938 // save disparity vector when a merge candidate for IVMP is set as DV-MCP 914 939 if( bMerge ) … … 1069 1094 1070 1095 1071 #if !QC_MULTI_DIS_CAN 1096 #if !QC_MULTI_DIS_CAN_A0097 1072 1097 /*=======================================================* 1073 1098 *===== =====* -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h
r166 r213 136 136 137 137 Void initViewComponent ( TComPic* pcPic ); 138 #if !QC_MULTI_DIS_CAN 138 #if !QC_MULTI_DIS_CAN_A0097 139 139 Bool predictDepthMap ( TComPic* pcPic ); 140 140 Void updateDepthMap ( TComPic* pcPic ); … … 154 154 Int getDisparity ( TComPic* pcPic, Int iPosX, Int iPosY, UInt uiRefViewId ); 155 155 #if HHI_INTER_VIEW_MOTION_PRED 156 #if QC_MULTI_DIS_CAN 157 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 156 #if QC_MULTI_DIS_CAN_A0097 157 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 158 #if QC_MRG_CANS_B0048 159 , Int* iPdm 160 #endif 161 ); 162 158 163 Bool getPdmMvPredDisCan ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); 159 164 Bool getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); … … 174 179 private: 175 180 // picture operations 176 #if !QC_MULTI_DIS_CAN 181 #if !QC_MULTI_DIS_CAN_A0097 177 182 Bool xConvertDepthMapCurr2Ref ( TComPic* pcRef, TComPic* pcCur ); 178 183 Bool xConvertDepthMapRef2Curr ( TComPic* pcCur, TComPic* pcRef ); … … 237 242 Bool m_bDecoder; 238 243 TComPrediction* m_pcPrediction; 239 #if VIDYO_VPS_INTEGRATION 244 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 240 245 TComVPSAccess* m_pcVPSAccess; 241 246 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMotionInfo.cpp
r56 r213 374 374 } 375 375 #endif 376 377 378 379 #if MTK_UNCONSTRAINED_MVI_B0083 380 Void TComCUMvField::setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir 381 #if NTT_FIX_UNCONSTRAINED_MVI 382 , Int iNumRefIdx 383 #endif 384 ) 385 { 386 PredMode predMode = MODE_INTRA; 387 TComMv cMv(0,0); 388 389 for ( Int i = 0; i < iNumPart; i++ ) 390 { 391 predMode = static_cast<PredMode>( pePredMode[ iPartAddr+i ] ); 392 #if NTT_FIX_UNCONSTRAINED_MVI 393 if( predMode==MODE_INTRA || m_piRefIdx[iPartAddr+i] >= iNumRefIdx ) 394 #else 395 if( predMode==MODE_INTRA ) 396 #endif 397 { 398 m_pcMv[iPartAddr+i] = cMv; 399 puhInterDir[iPartAddr+i] = InterDir; 400 m_piRefIdx[iPartAddr+i] = refIdx; 401 } 402 } 403 } 404 #endif 405 376 406 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMotionInfo.h
r100 r213 43 43 #include "CommonDef.h" 44 44 #include "TComMv.h" 45 #if VSP_N 46 #include "TComSlice.h" 47 #endif 45 48 46 49 //! \ingroup TLibCommon … … 59 62 60 63 // ==================================================================================================================== 61 #if QC_MULTI_DIS_CAN 64 #if QC_MULTI_DIS_CAN_A0097 62 65 typedef struct _DisCand 63 66 { … … 94 97 Int getHor () const { return m_acMv.getHor(); } 95 98 Int getVer () const { return m_acMv.getVer(); } 99 #if QC_MRG_CANS_B0048 100 Bool operator== ( const TComMvField& rcMv ) const 101 { 102 return (m_acMv.getHor()==rcMv.getHor() && m_acMv.getVer()==rcMv.getVer() && m_iRefIdx == rcMv.getRefIdx()); 103 } 104 #endif 96 105 }; 97 106 … … 169 178 Void decreaseMvAccuracy( Int iPartAddr, Int iNumPart, Int iShift ); 170 179 #endif 180 181 #if MTK_UNCONSTRAINED_MVI_B0083 182 Void setUndefinedMv( Int iPartAddr, Int iNumPart, Char* pePredMode, UChar* puhInterDir, Int refIdx, Int InterDir 183 #if NTT_FIX_UNCONSTRAINED_MVI 184 , Int iNumRefIdx 185 #endif 186 ); 187 #endif 171 188 }; 172 189 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComMv.h
r100 r213 57 57 public: 58 58 59 #if LGE_DVMCP 59 #if LGE_DVMCP_A0126 60 60 Bool m_bDvMcp; // is dv-mcp ? 61 61 Int m_iDvMcpDispX; // disparity for dv-mcp … … 69 69 m_iHor(0), 70 70 m_iVer(0) 71 #if LGE_DVMCP 71 #if LGE_DVMCP_A0126 72 72 , m_bDvMcp(false) 73 73 , m_iDvMcpDispX(0) … … 79 79 m_iHor(iHor), 80 80 m_iVer(iVer) 81 #if LGE_DVMCP 81 #if LGE_DVMCP_A0126 82 82 , m_bDvMcp(false) 83 83 , m_iDvMcpDispX(0) -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPattern.cpp
r100 r213 675 675 { 676 676 Int* piSrc; 677 #if LGE_EDGE_INTRA 677 #if LGE_EDGE_INTRA_A0070 678 678 mapEdgeIntratoDC( uiDirMode ); 679 679 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPattern.h
r56 r213 111 111 TComPatternParam m_cPatternCr; 112 112 113 #if LGE_ILLUCOMP_B0045 114 Bool m_bICFlag; 115 #endif 116 113 117 #if LOGI_INTRA_NAME_3MPM 114 118 static const UChar m_aucIntraFilter[5]; … … 124 128 Int getROIYHeight() { return m_cPatternY.m_iROIHeight; } 125 129 Int getPatternLStride() { return m_cPatternY.m_iPatternStride; } 130 131 #if LGE_ILLUCOMP_B0045 132 Bool getICFlag() { return m_bICFlag; } 133 Void setICFlag(Bool bICFlag) { m_bICFlag = bICFlag; } 134 #endif 126 135 127 136 // access functions of ADI buffers -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.cpp
r193 r213 56 56 m_apcPicYuvAvail = NULL; 57 57 m_apcPicYuvSynth = NULL; 58 m_bIsVsp = false; 58 59 #endif 59 60 #if DEPTH_MAP_GENERATION … … 85 86 m_aaiCodedScale = 0; 86 87 m_aaiCodedOffset = 0; 88 #if OL_QTLIMIT_PREDCODING_B0068 89 m_bReduceBitsQTL = 0; 90 #endif 91 #if QC_SIMPLE_NBDV_B0047 92 m_bRapCheck = false; 93 m_eRapRefList = REF_PIC_LIST_0; 94 m_uiRapRefIdx = 0; 95 #endif 96 87 97 } 88 98 … … 484 494 } 485 495 } 496 #if QC_SIMPLE_NBDV_B0047 497 Bool TComPic::getDisCandRefPictures(Int iColPOC) 498 { 499 UInt uiTempLayerCurr=7; 500 TComSlice* currSlice = getCurrSlice(); 501 UInt iPOCCurr=currSlice->getPOC(); 502 UInt iPOCDiff = 255; 503 Bool bRAP=false; 504 Bool bCheck = false; 505 Int MaxRef = currSlice->getNumRefIdx(RefPicList(0)); 506 RefPicList eRefPicList = REF_PIC_LIST_0 ; 507 if(currSlice->isInterB()) 508 { 509 if(currSlice->getNumRefIdx(RefPicList(0))< currSlice->getNumRefIdx(RefPicList(1))) 510 MaxRef = currSlice->getNumRefIdx(RefPicList(1)); 511 } 512 for(Int lpRef = 0; lpRef < MaxRef; lpRef++) 513 { 514 for(Int lpNr = 0; lpNr < (currSlice->isInterB() ? 2: 1); lpNr ++) 515 { 516 eRefPicList = RefPicList(0); 517 if(currSlice->isInterB()) 518 eRefPicList = RefPicList(lpNr==0 ? (currSlice->getColDir()): (1-currSlice->getColDir())); 519 if(iColPOC == currSlice->getRefPOC(eRefPicList, lpRef)) 520 continue; 521 if(lpRef >= currSlice->getNumRefIdx(eRefPicList)||(currSlice->getViewId() != currSlice->getRefPic( eRefPicList, lpRef)->getViewId())) 522 continue; 523 Int iTempPoc = currSlice->getRefPic(eRefPicList, lpRef)->getPOC(); 524 UInt uiTempLayer = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getTLayer(); 525 Int iTempDiff = (iTempPoc > iPOCCurr) ? (iTempPoc - iPOCCurr): (iPOCCurr - iTempPoc); 526 #if QC_REM_IDV_B0046 527 TComSlice* refSlice = currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice(); 528 bRAP = (refSlice->getSPS()->getViewId() && (refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || refSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))? 1: 0; 529 #else 530 bRAP = (currSlice->getRefPic(eRefPicList, lpRef)->getCurrSlice()->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV? 1:0); 531 #endif 532 if( bRAP) 533 { 534 bCheck = true; 535 this->setRapRefIdx(lpRef); 536 this->setRapRefList(eRefPicList); 537 return bCheck; 538 } 539 if(uiTempLayerCurr > uiTempLayer) 540 { 541 bCheck = true; 542 if(uiTempLayerCurr == uiTempLayer) 543 { 544 if(iPOCDiff > iTempDiff) 545 { 546 iPOCDiff=iTempDiff; 547 if(iPOCDiff < 255) 548 { 549 this->setRapRefIdx(lpRef); 550 this->setRapRefList(eRefPicList); 551 } 552 } 553 } 554 else 555 { 556 iPOCDiff=iTempDiff; 557 uiTempLayerCurr = uiTempLayer; 558 this->setRapRefIdx(lpRef); 559 this->setRapRefList(eRefPicList); 560 } 561 } 562 } 563 } 564 return bCheck; 565 } 566 #endif 486 567 487 568 #if HHI_INTERVIEW_SKIP -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.h
r193 r213 68 68 TComPicYuv* m_apcPicYuvAvail; // Availability Map - Does the given pixel can be synthesised in receiver 69 69 TComPicYuv* m_apcPicYuvSynth; // Sythesied image 70 Bool m_bIsVsp; 70 71 #endif 71 72 … … 78 79 #endif 79 80 80 #if LG_ZEROINTRADEPTHRESI_ M2603981 #if LG_ZEROINTRADEPTHRESI_A0087 81 82 Int m_uiIntraPeriod; 82 83 #endif … … 84 85 #if HHI_INTER_VIEW_MOTION_PRED 85 86 TComPicYuv* m_pcOrgDepthMap; // original depth map 86 #if QC_MULTI_DIS_CAN 87 #if QC_MULTI_DIS_CAN_A0097 87 88 Bool m_checked; 89 #endif 90 #if QC_SIMPLE_NBDV_B0047 91 UInt m_uiRapRefIdx; 92 RefPicList m_eRapRefList; 93 Bool m_bRapCheck; 88 94 #endif 89 95 #endif … … 112 118 TComPicYuv* m_pcUsedPelsMap; 113 119 #endif 114 #if SONY_COLPIC_AVAILABILITY 120 #if SONY_COLPIC_AVAILABILITY || VSP_N 115 121 Int m_iViewOrderIdx; 116 122 #endif … … 118 124 Int** m_aaiCodedOffset; 119 125 120 #if OL_DEPTHLIMIT_A0044 121 UInt* m_texPartInfo; 122 UInt m_uiTexPartIndex; 126 #if OL_QTLIMIT_PREDCODING_B0068 127 Bool m_bReduceBitsQTL; 123 128 #endif 124 129 … … 141 146 TComSlice* getSlice(Int i) { return m_apcPicSym->getSlice(i); } 142 147 TComSlice* getCurrSlice() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx); } 143 #if VIDYO_VPS_INTEGRATION 148 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 144 149 TComVPS* getVPS() { return m_apcPicSym->getSlice(m_uiCurrSliceIdx)->getVPS(); } 145 150 #endif 146 #if LG_ZEROINTRADEPTHRESI_ M26039151 #if LG_ZEROINTRADEPTHRESI_A0087 147 152 Int getIntraPeriod() { return m_uiIntraPeriod; } 148 153 Void setIntraPeriod(Int uiIntraPeriod) { m_uiIntraPeriod = uiIntraPeriod; } … … 161 166 TComPicYuv* getPicYuvSynth() { return m_apcPicYuvSynth; } 162 167 Void checkSynthesisAvailability( /*TComDataCU*& rpcBestCU, */UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied); 168 Void setIsVsp( Bool b ) { m_bIsVsp = b; } 169 Bool getIsVsp() { return m_bIsVsp; } 163 170 #endif 164 171 #if HHI_INTERVIEW_SKIP … … 177 184 #if HHI_INTER_VIEW_MOTION_PRED 178 185 TComPicYuv* getOrgDepthMap() { return m_pcOrgDepthMap; } 179 #if QC_MULTI_DIS_CAN 186 #if QC_MULTI_DIS_CAN_A0097 180 187 Void setCandPicCheckedFlag (Bool bchecked) { m_checked = bchecked; } 181 188 Bool getCandPicCheckedFlag () { return m_checked;} … … 186 193 TComPicYuv* getResidual() { return m_pcResidual; } 187 194 #endif 188 189 #if SONY_COLPIC_AVAILABILITY 195 #if QC_SIMPLE_NBDV_B0047 196 UInt getRapRefIdx() {return m_uiRapRefIdx;} 197 RefPicList getRapRefList() {return m_eRapRefList;} 198 Void setRapRefIdx(UInt uiRapRefIdx) {m_uiRapRefIdx = uiRapRefIdx;} 199 Void setRapRefList(RefPicList eRefPicList) {m_eRapRefList = eRefPicList;} 200 Bool getRapbCheck() {return m_bRapCheck;} 201 Void setRapbCheck(Bool bCheck) {m_bRapCheck = bCheck;} 202 Bool getDisCandRefPictures(Int iColPOC); 203 #endif 204 205 #if SONY_COLPIC_AVAILABILITY || VSP_N 190 206 Void setViewOrderIdx(Int i) { m_iViewOrderIdx = i; } 191 207 Int getViewOrderIdx() { return m_iViewOrderIdx; } 192 208 #endif 209 210 #if OL_QTLIMIT_PREDCODING_B0068 211 Bool getReduceBitsFlag () { return m_bReduceBitsQTL; } 212 Void setReduceBitsFlag ( Bool bFlag ) { m_bReduceBitsQTL = bFlag; } 213 #endif 214 193 215 Void setScaleOffset( Int** pS, Int** pO ) { m_aaiCodedScale = pS; m_aaiCodedOffset = pO; } 194 216 Int** getCodedScale () { return m_aaiCodedScale; } … … 261 283 #endif 262 284 263 #if OL_DEPTHLIMIT_A0044264 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 #endif270 271 285 Bool getValidSlice (Int sliceID) {return m_pbValidSlice[sliceID];} 272 286 Int getSliceGranularityForNDBFilter () {return m_sliceGranularityForNDBFilter;} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicSym.cpp
r193 r213 127 127 128 128 129 #if FIX_MEM_LEAKS130 129 if( m_apcTComTile ) 131 130 { … … 135 134 } 136 135 } 137 #endif138 136 139 137 delete [] m_apcTComTile; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r100 r213 46 46 // ==================================================================================================================== 47 47 48 #if LGE_EDGE_INTRA 48 #if LGE_EDGE_INTRA_A0070 49 49 #define MAX_DISTANCE_EDGEINTRA 255 50 50 #endif … … 423 423 } 424 424 425 #if LGE_EDGE_INTRA 425 #if LGE_EDGE_INTRA_A0070 426 426 Void TComPrediction::predIntraLumaEdge ( TComDataCU* pcCU, TComPattern* pcTComPattern, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Pel* piPred, UInt uiStride, Bool bDelta ) 427 427 { … … 628 628 if ( eRefPicList != REF_PIC_LIST_X ) 629 629 { 630 #if LGE_ILLUCOMP_B0045 631 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 632 #else 630 633 if( pcCU->getSlice()->getPPS()->getUseWP()) 634 #endif 631 635 { 632 636 #if DEPTH_MAP_GENERATION … … 644 648 #endif 645 649 } 650 #if LGE_ILLUCOMP_B0045 651 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr) ) 652 #else 646 653 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 654 #endif 647 655 { 648 656 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx ); … … 689 697 if ( eRefPicList != REF_PIC_LIST_X ) 690 698 { 699 #if LGE_ILLUCOMP_B0045 700 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 701 #else 691 702 if( pcCU->getSlice()->getPPS()->getUseWP()) 703 #endif 692 704 { 693 705 #if DEPTH_MAP_GENERATION … … 710 722 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx, false ); 711 723 #endif 724 #if LGE_ILLUCOMP_B0045 725 if( pcCU->getSlice()->getPPS()->getUseWP() && !pcCU->getICFlag(uiPartAddr)) 726 #else 712 727 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 728 #endif 713 729 { 714 730 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, iPartIdx ); … … 779 795 { 780 796 #endif 797 #if LGE_ILLUCOMP_B0045 798 #if VSP_AIC 799 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ) == pcCU->getSlice()->getPOC()); 800 #else 801 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId()); 802 #endif 803 804 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, bICFlag); 805 #else 781 806 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 807 #endif 782 808 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC 783 809 } 784 810 #endif 811 #if LGE_ILLUCOMP_B0045 812 #if VSP_AIC 813 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefPOC( eRefPicList, iRefIdx ) == pcCU->getSlice()->getPOC()); 814 #else 815 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getRefViewId( eRefPicList, iRefIdx ) != pcCU->getSlice()->getViewId()); 816 #endif 817 818 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi, bICFlag ); 819 #else 785 820 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 821 #endif 786 822 } 787 823 … … 896 932 } 897 933 #endif 934 #if !QC_MVHEVC_B0046 898 935 Int ixFrac = iHor & 0x3; 899 936 Int iyFrac = iVer & 0x3; 937 #endif 900 938 Int iRefOffset = ( iHor >> 2 ) + ( iVer >> 2 ) * iRefStride; 901 939 #endif … … 926 964 * \param bi Flag indicating whether bipred is used 927 965 */ 966 #if LGE_ILLUCOMP_B0045 967 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag) 968 #else 928 969 Void TComPrediction::xPredInterLumaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 970 #endif 929 971 { 930 972 Int refStride = refPic->getStride(); … … 961 1003 m_if.filterVerLuma(tmp + (halfFilterSize-1)*tmpStride, tmpStride, dst, dstStride, width, height, yFrac, false, !bi); 962 1004 } 1005 1006 #if LGE_ILLUCOMP_B0045 1007 if(bICFlag) 1008 { 1009 Int a, b, iShift, i, j; 1010 1011 xGetLLSICPrediction(cu, mv, refPic, a, b, iShift); 1012 1013 for (i = 0; i < height; i++) 1014 { 1015 for (j = 0; j < width; j++) 1016 { 1017 if(bi) 1018 { 1019 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1020 dst[j] = ( (a*dst[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1021 } 1022 else 1023 dst[j] = Clip( ( (a*dst[j]) >> iShift ) + b ); 1024 } 1025 dst += dstStride; 1026 } 1027 } 1028 #endif 963 1029 } 964 1030 … … 975 1041 * \param bi Flag indicating whether bipred is used 976 1042 */ 1043 #if LGE_ILLUCOMP_B0045 1044 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag ) 1045 #else 977 1046 Void TComPrediction::xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ) 1047 #endif 978 1048 { 979 1049 Int refStride = refPic->getCStride(); … … 1018 1088 m_if.filterVerChroma(extY + (halfFilterSize-1)*extStride, extStride, dstCr, dstStride, cxWidth, cxHeight , yFrac, false, !bi); 1019 1089 } 1090 #if LGE_ILLUCOMP_B0045 1091 if(bICFlag) 1092 { 1093 Int a, b, iShift, i, j; 1094 xGetLLSICPredictionChroma(cu, mv, refPic, a, b, iShift, 0); // Cb 1095 for (i = 0; i < cxHeight; i++) 1096 { 1097 for (j = 0; j < cxWidth; j++) 1098 { 1099 if(bi) 1100 { 1101 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1102 dstCb[j] = ( (a*dstCb[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1103 } 1104 else 1105 dstCb[j] = Clip3(0, 255, ((a*dstCb[j])>>iShift)+b); 1106 } 1107 dstCb += dstStride; 1108 } 1109 1110 xGetLLSICPredictionChroma(cu, mv, refPic, a, b, iShift, 1); // Cr 1111 for (i = 0; i < cxHeight; i++) 1112 { 1113 for (j = 0; j < cxWidth; j++) 1114 { 1115 if(bi) 1116 { 1117 Int iIFshift = IF_INTERNAL_PREC - ( g_uiBitDepth + g_uiBitIncrement ); 1118 dstCr[j] = ( (a*dstCr[j]+a*IF_INTERNAL_OFFS) >> iShift ) + b*(1<<iIFshift) - IF_INTERNAL_OFFS; 1119 } 1120 else 1121 dstCr[j] = Clip3(0, 255, ((a*dstCr[j])>>iShift)+b); 1122 } 1123 dstCr += dstStride; 1124 } 1125 } 1126 #endif 1020 1127 } 1021 1128 … … 1443 1550 } 1444 1551 1552 1553 #if LGE_ILLUCOMP_B0045 1554 /** Function for deriving LM illumination compensation. 1555 */ 1556 Void TComPrediction::xGetLLSICPrediction(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift) 1557 { 1558 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); 1559 Pel *pRec, *pRef; 1560 UInt uiWidth, uiHeight, uiTmpPartIdx; 1561 Int iRecStride = pRecPic->getStride(), iRefStride = pRefPic->getStride(); 1562 Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset; 1563 1564 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1565 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1566 iRefX = iCUPelX + (pMv->getHor() >> 2); 1567 iRefY = iCUPelY + (pMv->getVer() >> 2); 1568 uiWidth = pcCU->getWidth(0); 1569 uiHeight = pcCU->getHeight(0); 1570 1571 Int i, j, iCountShift = 0; 1572 1573 // LLS parameters estimation --> 1574 1575 Int x = 0, y = 0, xx = 0, xy = 0; 1576 1577 if(pcCU->getPUAbove(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelY > 0 && iRefY > 0) 1578 { 1579 iRefOffset = ( pMv->getHor() >> 2 ) + ( pMv->getVer() >> 2 ) * iRefStride - iRefStride; 1580 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1581 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1582 1583 for( j = 0; j < uiWidth; j++ ) 1584 { 1585 x += pRef[j]; 1586 y += pRec[j]; 1587 xx += pRef[j] * pRef[j]; 1588 xy += pRef[j] * pRec[j]; 1589 } 1590 iCountShift += g_aucConvertToBit[ uiWidth ] + 2; 1591 } 1592 1593 1594 if(pcCU->getPULeft(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelX > 0 && iRefX > 0) 1595 { 1596 iRefOffset = ( pMv->getHor() >> 2 ) + ( pMv->getVer() >> 2 ) * iRefStride - 1; 1597 pRef = pRefPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1598 pRec = pRecPic->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1599 1600 for( i = 0; i < uiHeight; i++ ) 1601 { 1602 x += pRef[0]; 1603 y += pRec[0]; 1604 xx += pRef[0] * pRef[0]; 1605 xy += pRef[0] * pRec[0]; 1606 1607 pRef += iRefStride; 1608 pRec += iRecStride; 1609 } 1610 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 ); 1611 } 1612 1613 Int iTempShift = ( g_uiBitDepth + g_uiBitIncrement ) + g_aucConvertToBit[ uiWidth ] + 3 - 15; 1614 1615 if(iTempShift > 0) 1616 { 1617 x = ( x + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1618 y = ( y + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1619 xx = ( xx + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1620 xy = ( xy + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1621 iCountShift -= iTempShift; 1622 } 1623 1624 iShift = 13; 1625 1626 if( iCountShift == 0 ) 1627 { 1628 a = 1; 1629 b = 0; 1630 iShift = 0; 1631 } 1632 else 1633 { 1634 Int a1 = ( xy << iCountShift ) - y * x; 1635 Int a2 = ( xx << iCountShift ) - x * x; 1636 1637 { 1638 const Int iShiftA2 = 6; 1639 const Int iShiftA1 = 15; 1640 const Int iAccuracyShift = 15; 1641 1642 Int iScaleShiftA2 = 0; 1643 Int iScaleShiftA1 = 0; 1644 Int a1s = a1; 1645 Int a2s = a2; 1646 1647 iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1; 1648 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1649 1650 if( iScaleShiftA1 < 0 ) 1651 { 1652 iScaleShiftA1 = 0; 1653 } 1654 1655 if( iScaleShiftA2 < 0 ) 1656 { 1657 iScaleShiftA2 = 0; 1658 } 1659 1660 Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1; 1661 1662 a2s = a2 >> iScaleShiftA2; 1663 1664 a1s = a1 >> iScaleShiftA1; 1665 1666 if (a2s >= 1) 1667 { 1668 a = a1s * m_uiaShift[ a2s - 1]; 1669 } 1670 else 1671 { 1672 a = 0; 1673 } 1674 1675 if( iScaleShiftA < 0 ) 1676 { 1677 a = a << -iScaleShiftA; 1678 } 1679 else 1680 { 1681 a = a >> iScaleShiftA; 1682 } 1683 1684 a = Clip3(-( 1 << 15 ), ( 1 << 15 ) - 1, a); 1685 1686 Int minA = -(1 << (6)); 1687 Int maxA = (1 << 6) - 1; 1688 if( a <= maxA && a >= minA ) 1689 { 1690 // do nothing 1691 } 1692 else 1693 { 1694 Short n = CountLeadingZerosOnes(a); 1695 a = a >> (9-n); 1696 iShift -= (9-n); 1697 } 1698 1699 b = ( y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 1700 } 1701 } 1702 } 1703 1704 Void TComPrediction::xGetLLSICPredictionChroma(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, Int iChromaId) 1705 { 1706 TComPicYuv *pRecPic = pcCU->getPic()->getPicYuvRec(); 1707 Pel *pRec = NULL, *pRef = NULL; 1708 UInt uiWidth, uiHeight, uiTmpPartIdx; 1709 Int iRecStride = pRecPic->getCStride(), iRefStride = pRefPic->getCStride(); 1710 Int iCUPelX, iCUPelY, iRefX, iRefY, iRefOffset; 1711 1712 iCUPelX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1713 iCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[g_auiZscanToRaster[pcCU->getZorderIdxInCU()]]; 1714 iRefX = iCUPelX + (pMv->getHor() >> 3); 1715 iRefY = iCUPelY + (pMv->getVer() >> 3); 1716 uiWidth = pcCU->getWidth(0) >> 1; 1717 uiHeight = pcCU->getHeight(0) >> 1; 1718 1719 Int i, j, iCountShift = 0; 1720 1721 // LLS parameters estimation --> 1722 1723 Int x = 0, y = 0, xx = 0, xy = 0; 1724 1725 if(pcCU->getPUAbove(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelY > 0 && iRefY > 0) 1726 { 1727 iRefOffset = ( pMv->getHor() >> 3 ) + ( pMv->getVer() >> 3 ) * iRefStride - iRefStride; 1728 if (iChromaId == 0) // Cb 1729 { 1730 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1731 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1732 } 1733 else if (iChromaId == 1) // Cr 1734 { 1735 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1736 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - iRecStride; 1737 } 1738 1739 for( j = 0; j < uiWidth; j++ ) 1740 { 1741 x += pRef[j]; 1742 y += pRec[j]; 1743 xx += pRef[j] * pRef[j]; 1744 xy += pRef[j] * pRec[j]; 1745 } 1746 iCountShift += g_aucConvertToBit[ uiWidth ] + 2; 1747 } 1748 1749 1750 if(pcCU->getPULeft(uiTmpPartIdx, pcCU->getZorderIdxInCU()) && iCUPelX > 0 && iRefX > 0) 1751 { 1752 iRefOffset = ( pMv->getHor() >> 3 ) + ( pMv->getVer() >> 3 ) * iRefStride - 1; 1753 if (iChromaId == 0) // Cb 1754 { 1755 pRef = pRefPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1756 pRec = pRecPic->getCbAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1757 } 1758 else if (iChromaId == 1) // Cr 1759 { 1760 pRef = pRefPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) + iRefOffset; 1761 pRec = pRecPic->getCrAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU() ) - 1; 1762 } 1763 1764 for( i = 0; i < uiHeight; i++ ) 1765 { 1766 x += pRef[0]; 1767 y += pRec[0]; 1768 xx += pRef[0] * pRef[0]; 1769 xy += pRef[0] * pRec[0]; 1770 1771 pRef += iRefStride; 1772 pRec += iRecStride; 1773 } 1774 iCountShift += iCountShift > 0 ? 1 : ( g_aucConvertToBit[ uiWidth ] + 2 ); 1775 } 1776 1777 Int iTempShift = ( g_uiBitDepth + g_uiBitIncrement ) + g_aucConvertToBit[ uiWidth ] + 3 - 15; 1778 1779 if(iTempShift > 0) 1780 { 1781 x = ( x + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1782 y = ( y + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1783 xx = ( xx + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1784 xy = ( xy + ( 1 << ( iTempShift - 1 ) ) ) >> iTempShift; 1785 iCountShift -= iTempShift; 1786 } 1787 1788 iShift = 13; 1789 1790 if( iCountShift == 0 ) 1791 { 1792 a = 1; 1793 b = 0; 1794 iShift = 0; 1795 } 1796 else 1797 { 1798 Int a1 = ( xy << iCountShift ) - y * x; 1799 Int a2 = ( xx << iCountShift ) - x * x; 1800 1801 { 1802 const Int iShiftA2 = 6; 1803 const Int iShiftA1 = 15; 1804 const Int iAccuracyShift = 15; 1805 1806 Int iScaleShiftA2 = 0; 1807 Int iScaleShiftA1 = 0; 1808 Int a1s = a1; 1809 Int a2s = a2; 1810 1811 iScaleShiftA1 = GetMSB( abs( a1 ) ) - iShiftA1; 1812 iScaleShiftA2 = GetMSB( abs( a2 ) ) - iShiftA2; 1813 1814 if( iScaleShiftA1 < 0 ) 1815 { 1816 iScaleShiftA1 = 0; 1817 } 1818 1819 if( iScaleShiftA2 < 0 ) 1820 { 1821 iScaleShiftA2 = 0; 1822 } 1823 1824 Int iScaleShiftA = iScaleShiftA2 + iAccuracyShift - iShift - iScaleShiftA1; 1825 1826 a2s = a2 >> iScaleShiftA2; 1827 1828 a1s = a1 >> iScaleShiftA1; 1829 1830 if (a2s >= 1) 1831 { 1832 a = a1s * m_uiaShift[ a2s - 1]; 1833 } 1834 else 1835 { 1836 a = 0; 1837 } 1838 1839 if( iScaleShiftA < 0 ) 1840 { 1841 a = a << -iScaleShiftA; 1842 } 1843 else 1844 { 1845 a = a >> iScaleShiftA; 1846 } 1847 1848 a = Clip3(-( 1 << 15 ), ( 1 << 15 ) - 1, a); 1849 1850 Int minA = -(1 << (6)); 1851 Int maxA = (1 << 6) - 1; 1852 if( a <= maxA && a >= minA ) 1853 { 1854 // do nothing 1855 } 1856 else 1857 { 1858 Short n = CountLeadingZerosOnes(a); 1859 a = a >> (9-n); 1860 iShift -= (9-n); 1861 } 1862 1863 b = ( y - ( ( a * x ) >> iShift ) + ( 1 << ( iCountShift - 1 ) ) ) >> iCountShift; 1864 } 1865 } 1866 } 1867 #endif 1445 1868 /** Function for filtering intra DC predictor. 1446 1869 * \param pSrc pointer to reconstructed sample array … … 1704 2127 { 1705 2128 assert( uiWidth >= DMM_WEDGEMODEL_MIN_SIZE && uiWidth <= DMM_WEDGEMODEL_MAX_SIZE ); 1706 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])];1707 2129 1708 2130 // get copy of co-located texture luma block … … 1723 2145 UInt uiPredStride = cPredYuv.getStride(); 1724 2146 1725 // regularwedge search2147 // wedge search 1726 2148 TComWedgeDist cWedgeDist; 1727 2149 UInt uiBestDist = MAX_UINT; … … 1729 2151 Int iDC1 = 0; 1730 2152 Int iDC2 = 0; 1731 2153 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 2154 2155 #if HHIQC_DMMFASTSEARCH_B0039 2156 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 2157 TComDataCU* pcColTexCU = pcPicTex->getCU(pcCU->getAddr()); 2158 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 2159 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255; 2160 2161 std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]]; 2162 if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ) 2163 { 2164 std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[uiColTexIntraDir-2]; 2165 for( UInt uiIdxW = 0; uiIdxW < pauiWdgLst->size(); uiIdxW++ ) 2166 { 2167 UInt uiIdx = pauiWdgLst->at(uiIdxW); 2168 calcWedgeDCs ( &(pacWedgeList->at(uiIdx)), piRefBlkY, uiWidth, iDC1, iDC2 ); 2169 assignWedgeDCs2Pred( &(pacWedgeList->at(uiIdx)), piPred, uiPredStride, iDC1, iDC2 ); 2170 2171 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2172 2173 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) 2174 { 2175 uiBestDist = uiActDist; 2176 uiBestTabIdx = uiIdx; 2177 } 2178 } 2179 } 2180 else 2181 { 2182 WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 2183 UInt uiBestNodeDist = MAX_UINT; 2184 UInt uiBestNodeId = 0; 2185 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) 2186 { 2187 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRefBlkY, uiWidth, iDC1, iDC2 ); 2188 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred, uiPredStride, iDC1, iDC2 ); 2189 2190 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2191 2192 if( uiActDist < uiBestNodeDist || uiBestNodeDist == MAX_UINT ) 2193 { 2194 uiBestNodeDist = uiActDist; 2195 uiBestNodeId = uiNodeId; 2196 } 2197 } 2198 2199 // refinement 2200 uiBestDist = uiBestNodeDist; 2201 uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 2202 for( UInt uiRefId = 0; uiRefId < NUM_WEDGE_REFINES; uiRefId++ ) 2203 { 2204 if( pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ) != NO_IDX ) 2205 { 2206 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piRefBlkY, uiWidth, iDC1, iDC2 ); 2207 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piPred, uiPredStride, iDC1, iDC2 ); 2208 2209 UInt uiActDist = cWedgeDist.getDistPart( piPred, uiPredStride, piRefBlkY, uiWidth, uiWidth, uiHeight, WedgeDist_SAD ); 2210 2211 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) 2212 { 2213 uiBestDist = uiActDist; 2214 uiBestTabIdx = pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ); 2215 } 2216 } 2217 } 2218 } 2219 #else 1732 2220 for( UInt uiIdx = 0; uiIdx < pacWedgeList->size(); uiIdx++ ) 1733 2221 { … … 1743 2231 } 1744 2232 } 2233 #endif 1745 2234 1746 2235 cPredYuv.destroy(); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.h
r193 r213 100 100 #endif 101 101 102 #if LGE_ILLUCOMP_B0045 103 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 104 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi, Bool bICFlag = false ); 105 #else 102 106 Void xPredInterLumaBlk ( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 103 107 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 108 #endif 104 109 Void xWeightedAverage ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 105 110 106 111 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 107 112 #if LGE_ILLUCOMP_B0045 113 Void xGetLLSICPrediction(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift); 114 Void xGetLLSICPredictionChroma(TComDataCU* pcCU, TComMv *pMv, TComPicYuv *pRefPic, Int &a, Int &b, Int &iShift, Int iChromaId); 115 #endif 108 116 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); 109 117 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); … … 125 133 #endif 126 134 127 #if LGE_EDGE_INTRA 135 #if LGE_EDGE_INTRA_A0070 128 136 Pel xGetNearestNeighbor ( Int x, Int y, Int* pSrc, Int srcStride, Int iWidth, Int iHeight, Bool* bpRegion ); 129 137 Void xPredIntraEdge ( TComDataCU* pcCU, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Int* pSrc, Int srcStride, Pel*& rpDst, Int dstStride, Bool bDelta = false ); … … 142 150 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 143 151 #endif 144 152 145 153 // motion vector prediction 146 154 Void getMvPredAMVP ( TComDataCU* pcCU, UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMvPred ); … … 175 183 Bool getWedgePatternIdx ( WedgeRefList* pcWedgeRefList, UInt& ruiTabIdx, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe ); 176 184 #endif 177 #if LGE_EDGE_INTRA 185 #if LGE_EDGE_INTRA_A0070 178 186 Void predIntraLumaEdge ( TComDataCU* pcCU, TComPattern* pcTComPattern, UInt uiAbsPartIdx, Int iWidth, Int iHeight, Pel* piPred, UInt uiStride, Bool bDelta = false ); 179 187 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r100 r213 543 543 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 544 544 #endif 545 #if LGE_ILLUCOMP_B0045 546 cDtParam.bUseIC = false; 547 #endif 545 548 return cDtParam.DistFunc( &cDtParam ); 546 549 } … … 565 568 566 569 #if WEIGHTED_CHROMA_DISTORTION 570 #if LGE_ILLUCOMP_B0045 571 cDtParam.bUseIC = false; 572 #endif 567 573 if (bWeighted) 568 574 { … … 598 604 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 599 605 606 #if LGE_ILLUCOMP_B0045 607 cDtParam.bUseIC = false; 608 #endif 600 609 return cDtParam.DistFunc( &cDtParam ); 601 610 } 602 611 #endif 603 612 604 605 // ====================================================================================================================606 // Distortion functions607 // ====================================================================================================================608 609 // --------------------------------------------------------------------------------------------------------------------610 // SAD611 // --------------------------------------------------------------------------------------------------------------------612 613 613 UInt TComRdCost::xGetSAD( DistParam* pcDtParam ) 614 614 { … … 617 617 return xGetSADw( pcDtParam ); 618 618 } 619 #if LGE_ILLUCOMP_B0045 620 if(pcDtParam->bUseIC) 621 { 622 return xGetSADic( pcDtParam ); 623 } 624 #endif 619 625 Pel* piOrg = pcDtParam->pOrg; 620 626 Pel* piCur = pcDtParam->pCur; … … 623 629 Int iStrideCur = pcDtParam->iStrideCur; 624 630 Int iStrideOrg = pcDtParam->iStrideOrg; 625 626 UInt uiSum = 0; 627 631 632 UInt uiSum = 0; 633 628 634 for( ; iRows != 0; iRows-- ) 629 635 { … … 635 641 piCur += iStrideCur; 636 642 } 637 643 638 644 return ( uiSum >> g_uiBitIncrement ); 639 645 } … … 645 651 return xGetSADw( pcDtParam ); 646 652 } 653 #if LGE_ILLUCOMP_B0045 654 if(pcDtParam->bUseIC) 655 { 656 return xGetSAD4ic( pcDtParam ); 657 } 658 #endif 647 659 Pel* piOrg = pcDtParam->pOrg; 648 660 Pel* piCur = pcDtParam->pCur; … … 652 664 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 653 665 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 654 655 UInt uiSum = 0; 656 666 667 UInt uiSum = 0; 668 657 669 for( ; iRows != 0; iRows-=iSubStep ) 658 670 { … … 661 673 uiSum += abs( piOrg[2] - piCur[2] ); 662 674 uiSum += abs( piOrg[3] - piCur[3] ); 663 664 piOrg += iStrideOrg; 665 piCur += iStrideCur; 666 } 667 675 676 piOrg += iStrideOrg; 677 piCur += iStrideCur; 678 } 679 668 680 uiSum <<= iSubShift; 669 681 return ( uiSum >> g_uiBitIncrement ); … … 676 688 return xGetSADw( pcDtParam ); 677 689 } 690 #if LGE_ILLUCOMP_B0045 691 if(pcDtParam->bUseIC) 692 { 693 return xGetSAD8ic( pcDtParam ); 694 } 695 #endif 678 696 Pel* piOrg = pcDtParam->pOrg; 679 697 Pel* piCur = pcDtParam->pCur; … … 683 701 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 684 702 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 685 686 UInt uiSum = 0; 687 703 704 UInt uiSum = 0; 705 688 706 for( ; iRows != 0; iRows-=iSubStep ) 689 707 { … … 696 714 uiSum += abs( piOrg[6] - piCur[6] ); 697 715 uiSum += abs( piOrg[7] - piCur[7] ); 698 699 piOrg += iStrideOrg; 700 piCur += iStrideCur; 701 } 702 716 717 piOrg += iStrideOrg; 718 piCur += iStrideCur; 719 } 720 703 721 uiSum <<= iSubShift; 704 722 return ( uiSum >> g_uiBitIncrement ); … … 711 729 return xGetSADw( pcDtParam ); 712 730 } 731 #if LGE_ILLUCOMP_B0045 732 if(pcDtParam->bUseIC) 733 { 734 return xGetSAD16ic( pcDtParam ); 735 } 736 #endif 713 737 Pel* piOrg = pcDtParam->pOrg; 714 738 Pel* piCur = pcDtParam->pCur; … … 718 742 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 719 743 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 720 721 UInt uiSum = 0; 722 744 745 UInt uiSum = 0; 746 723 747 for( ; iRows != 0; iRows-=iSubStep ) 724 748 { … … 739 763 uiSum += abs( piOrg[14] - piCur[14] ); 740 764 uiSum += abs( piOrg[15] - piCur[15] ); 741 742 piOrg += iStrideOrg; 743 piCur += iStrideCur; 744 } 745 765 766 piOrg += iStrideOrg; 767 piCur += iStrideCur; 768 } 769 746 770 uiSum <<= iSubShift; 747 771 return ( uiSum >> g_uiBitIncrement ); … … 755 779 return xGetSADw( pcDtParam ); 756 780 } 781 #if LGE_ILLUCOMP_B0045 782 if(pcDtParam->bUseIC) 783 { 784 return xGetSAD12ic( pcDtParam ); 785 } 786 #endif 757 787 Pel* piOrg = pcDtParam->pOrg; 758 788 Pel* piCur = pcDtParam->pCur; … … 762 792 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 763 793 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 764 765 UInt uiSum = 0; 766 794 795 UInt uiSum = 0; 796 767 797 for( ; iRows != 0; iRows-=iSubStep ) 768 798 { … … 779 809 uiSum += abs( piOrg[10] - piCur[10] ); 780 810 uiSum += abs( piOrg[11] - piCur[11] ); 781 782 piOrg += iStrideOrg; 783 piCur += iStrideCur; 784 } 785 811 812 piOrg += iStrideOrg; 813 piCur += iStrideCur; 814 } 815 786 816 uiSum <<= iSubShift; 787 817 return ( uiSum >> g_uiBitIncrement ); … … 791 821 UInt TComRdCost::xGetSAD16N( DistParam* pcDtParam ) 792 822 { 823 #if LGE_ILLUCOMP_B0045 824 if(pcDtParam->bUseIC) 825 { 826 return xGetSAD16Nic( pcDtParam ); 827 } 828 #endif 793 829 Pel* piOrg = pcDtParam->pOrg; 794 830 Pel* piCur = pcDtParam->pCur; … … 799 835 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 800 836 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 801 802 UInt uiSum = 0; 803 837 838 UInt uiSum = 0; 839 804 840 for( ; iRows != 0; iRows-=iSubStep ) 805 841 { … … 826 862 piCur += iStrideCur; 827 863 } 828 864 829 865 uiSum <<= iSubShift; 830 866 return ( uiSum >> g_uiBitIncrement ); … … 837 873 return xGetSADw( pcDtParam ); 838 874 } 875 #if LGE_ILLUCOMP_B0045 876 if(pcDtParam->bUseIC) 877 { 878 return xGetSAD32ic( pcDtParam ); 879 } 880 #endif 839 881 Pel* piOrg = pcDtParam->pOrg; 840 882 Pel* piCur = pcDtParam->pCur; … … 844 886 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 845 887 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 846 847 UInt uiSum = 0; 848 888 889 UInt uiSum = 0; 890 849 891 for( ; iRows != 0; iRows-=iSubStep ) 850 892 { … … 881 923 uiSum += abs( piOrg[30] - piCur[30] ); 882 924 uiSum += abs( piOrg[31] - piCur[31] ); 883 884 piOrg += iStrideOrg; 885 piCur += iStrideCur; 886 } 887 925 926 piOrg += iStrideOrg; 927 piCur += iStrideCur; 928 } 929 888 930 uiSum <<= iSubShift; 889 931 return ( uiSum >> g_uiBitIncrement ); … … 897 939 return xGetSADw( pcDtParam ); 898 940 } 941 #if LGE_ILLUCOMP_B0045 942 if(pcDtParam->bUseIC) 943 { 944 return xGetSAD24ic( pcDtParam ); 945 } 946 #endif 899 947 Pel* piOrg = pcDtParam->pOrg; 900 948 Pel* piCur = pcDtParam->pCur; … … 904 952 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 905 953 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 906 907 UInt uiSum = 0; 908 954 955 UInt uiSum = 0; 956 909 957 for( ; iRows != 0; iRows-=iSubStep ) 910 958 { … … 933 981 uiSum += abs( piOrg[22] - piCur[22] ); 934 982 uiSum += abs( piOrg[23] - piCur[23] ); 935 936 piOrg += iStrideOrg; 937 piCur += iStrideCur; 938 } 939 983 984 piOrg += iStrideOrg; 985 piCur += iStrideCur; 986 } 987 940 988 uiSum <<= iSubShift; 941 989 return ( uiSum >> g_uiBitIncrement ); … … 950 998 return xGetSADw( pcDtParam ); 951 999 } 1000 #if LGE_ILLUCOMP_B0045 1001 if(pcDtParam->bUseIC) 1002 { 1003 return xGetSAD64ic( pcDtParam ); 1004 } 1005 #endif 952 1006 Pel* piOrg = pcDtParam->pOrg; 953 1007 Pel* piCur = pcDtParam->pCur; … … 957 1011 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 958 1012 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 959 960 UInt uiSum = 0; 961 1013 1014 UInt uiSum = 0; 1015 962 1016 for( ; iRows != 0; iRows-=iSubStep ) 963 1017 { … … 1026 1080 uiSum += abs( piOrg[62] - piCur[62] ); 1027 1081 uiSum += abs( piOrg[63] - piCur[63] ); 1028 1029 piOrg += iStrideOrg; 1030 piCur += iStrideCur; 1031 } 1032 1082 1083 piOrg += iStrideOrg; 1084 piCur += iStrideCur; 1085 } 1086 1033 1087 uiSum <<= iSubShift; 1034 1088 return ( uiSum >> g_uiBitIncrement ); … … 1042 1096 return xGetSADw( pcDtParam ); 1043 1097 } 1098 #if LGE_ILLUCOMP_B0045 1099 if(pcDtParam->bUseIC) 1100 { 1101 return xGetSAD48ic( pcDtParam ); 1102 } 1103 #endif 1044 1104 Pel* piOrg = pcDtParam->pOrg; 1045 1105 Pel* piCur = pcDtParam->pCur; … … 1049 1109 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1050 1110 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1051 1052 UInt uiSum = 0; 1053 1111 1112 UInt uiSum = 0; 1113 1054 1114 for( ; iRows != 0; iRows-=iSubStep ) 1055 1115 { … … 1102 1162 uiSum += abs( piOrg[46] - piCur[46] ); 1103 1163 uiSum += abs( piOrg[47] - piCur[47] ); 1104 1105 piOrg += iStrideOrg; 1106 piCur += iStrideCur; 1107 } 1108 1164 1165 piOrg += iStrideOrg; 1166 piCur += iStrideCur; 1167 } 1168 1109 1169 uiSum <<= iSubShift; 1110 1170 return ( uiSum >> g_uiBitIncrement ); 1111 1171 } 1172 #endif 1173 1174 // ==================================================================================================================== 1175 // Distortion functions 1176 // ==================================================================================================================== 1177 1178 // -------------------------------------------------------------------------------------------------------------------- 1179 // SAD 1180 // -------------------------------------------------------------------------------------------------------------------- 1181 #if LGE_ILLUCOMP_B0045 1182 UInt TComRdCost::xGetSADic( DistParam* pcDtParam ) 1183 { 1184 if ( pcDtParam->bApplyWeight ) 1185 { 1186 return xGetSADw( pcDtParam ); 1187 } 1188 Pel* piOrg = pcDtParam->pOrg; 1189 Pel* piCur = pcDtParam->pCur; 1190 Int iRows = pcDtParam->iRows; 1191 Int iCols = pcDtParam->iCols; 1192 Int iStrideCur = pcDtParam->iStrideCur; 1193 Int iStrideOrg = pcDtParam->iStrideOrg; 1194 1195 UInt uiSum = 0; 1196 1197 Int iOrigAvg = 0, iCurAvg = 0; 1198 Int iDeltaC; 1199 1200 for( ; iRows != 0; iRows-- ) 1201 { 1202 for (Int n = 0; n < iCols; n++ ) 1203 { 1204 iOrigAvg += piOrg[n]; 1205 iCurAvg += piCur[n]; 1206 } 1207 piOrg += iStrideOrg; 1208 piCur += iStrideCur; 1209 } 1210 1211 piOrg = pcDtParam->pOrg; 1212 piCur = pcDtParam->pCur; 1213 iRows = pcDtParam->iRows; 1214 1215 iDeltaC = (iOrigAvg - iCurAvg)/iCols/iRows; 1216 1217 for( ; iRows != 0; iRows-- ) 1218 { 1219 for (Int n = 0; n < iCols; n++ ) 1220 { 1221 uiSum += abs( piOrg[n] - piCur[n] - iDeltaC ); 1222 } 1223 piOrg += iStrideOrg; 1224 piCur += iStrideCur; 1225 } 1226 1227 return ( uiSum >> g_uiBitIncrement ); 1228 } 1229 1230 UInt TComRdCost::xGetSAD4ic( DistParam* pcDtParam ) 1231 { 1232 if ( pcDtParam->bApplyWeight ) 1233 { 1234 return xGetSADw( pcDtParam ); 1235 } 1236 Pel* piOrg = pcDtParam->pOrg; 1237 Pel* piCur = pcDtParam->pCur; 1238 Int iRows = pcDtParam->iRows; 1239 Int iSubShift = pcDtParam->iSubShift; 1240 Int iSubStep = ( 1 << iSubShift ); 1241 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1242 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1243 1244 UInt uiSum = 0; 1245 1246 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1247 Int iDeltaC; 1248 1249 for( ; iRows != 0; iRows-=iSubStep ) 1250 { 1251 iOrigAvg += piOrg[0]; 1252 iOrigAvg += piOrg[1]; 1253 iOrigAvg += piOrg[2]; 1254 iOrigAvg += piOrg[3]; 1255 1256 iCurAvg += piCur[0]; 1257 iCurAvg += piCur[1]; 1258 iCurAvg += piCur[2]; 1259 iCurAvg += piCur[3]; 1260 1261 piOrg += iStrideOrg; 1262 piCur += iStrideCur; 1263 uiRowCnt++; 1264 } 1265 1266 piOrg = pcDtParam->pOrg; 1267 piCur = pcDtParam->pCur; 1268 iRows = pcDtParam->iRows; 1269 1270 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/4) : 0; 1271 1272 for( ; iRows != 0; iRows-=iSubStep ) 1273 { 1274 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1275 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1276 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1277 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1278 1279 piOrg += iStrideOrg; 1280 piCur += iStrideCur; 1281 } 1282 1283 uiSum <<= iSubShift; 1284 return ( uiSum >> g_uiBitIncrement ); 1285 } 1286 1287 UInt TComRdCost::xGetSAD8ic( DistParam* pcDtParam ) 1288 { 1289 if ( pcDtParam->bApplyWeight ) 1290 { 1291 return xGetSADw( pcDtParam ); 1292 } 1293 Pel* piOrg = pcDtParam->pOrg; 1294 Pel* piCur = pcDtParam->pCur; 1295 Int iRows = pcDtParam->iRows; 1296 Int iSubShift = pcDtParam->iSubShift; 1297 Int iSubStep = ( 1 << iSubShift ); 1298 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1299 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1300 1301 UInt uiSum = 0; 1302 1303 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1304 Int iDeltaC; 1305 1306 for( ; iRows != 0; iRows-=iSubStep ) 1307 { 1308 iOrigAvg += piOrg[0]; 1309 iOrigAvg += piOrg[1]; 1310 iOrigAvg += piOrg[2]; 1311 iOrigAvg += piOrg[3]; 1312 iOrigAvg += piOrg[4]; 1313 iOrigAvg += piOrg[5]; 1314 iOrigAvg += piOrg[6]; 1315 iOrigAvg += piOrg[7]; 1316 1317 iCurAvg += piCur[0]; 1318 iCurAvg += piCur[1]; 1319 iCurAvg += piCur[2]; 1320 iCurAvg += piCur[3]; 1321 iCurAvg += piCur[4]; 1322 iCurAvg += piCur[5]; 1323 iCurAvg += piCur[6]; 1324 iCurAvg += piCur[7]; 1325 1326 piOrg += iStrideOrg; 1327 piCur += iStrideCur; 1328 uiRowCnt++; 1329 } 1330 1331 piOrg = pcDtParam->pOrg; 1332 piCur = pcDtParam->pCur; 1333 iRows = pcDtParam->iRows; 1334 1335 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/8) : 0; 1336 1337 for( ; iRows != 0; iRows-=iSubStep ) 1338 { 1339 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1340 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1341 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1342 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1343 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1344 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1345 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1346 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1347 1348 piOrg += iStrideOrg; 1349 piCur += iStrideCur; 1350 } 1351 1352 uiSum <<= iSubShift; 1353 return ( uiSum >> g_uiBitIncrement ); 1354 } 1355 1356 UInt TComRdCost::xGetSAD16ic( DistParam* pcDtParam ) 1357 { 1358 if ( pcDtParam->bApplyWeight ) 1359 { 1360 return xGetSADw( pcDtParam ); 1361 } 1362 Pel* piOrg = pcDtParam->pOrg; 1363 Pel* piCur = pcDtParam->pCur; 1364 Int iRows = pcDtParam->iRows; 1365 Int iSubShift = pcDtParam->iSubShift; 1366 Int iSubStep = ( 1 << iSubShift ); 1367 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1368 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1369 1370 UInt uiSum = 0; 1371 1372 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1373 Int iDeltaC; 1374 1375 for( ; iRows != 0; iRows-=iSubStep ) 1376 { 1377 iOrigAvg += piOrg[0]; 1378 iOrigAvg += piOrg[1]; 1379 iOrigAvg += piOrg[2]; 1380 iOrigAvg += piOrg[3]; 1381 iOrigAvg += piOrg[4]; 1382 iOrigAvg += piOrg[5]; 1383 iOrigAvg += piOrg[6]; 1384 iOrigAvg += piOrg[7]; 1385 iOrigAvg += piOrg[8]; 1386 iOrigAvg += piOrg[9]; 1387 iOrigAvg += piOrg[10]; 1388 iOrigAvg += piOrg[11]; 1389 iOrigAvg += piOrg[12]; 1390 iOrigAvg += piOrg[13]; 1391 iOrigAvg += piOrg[14]; 1392 iOrigAvg += piOrg[15]; 1393 1394 iCurAvg += piCur[0]; 1395 iCurAvg += piCur[1]; 1396 iCurAvg += piCur[2]; 1397 iCurAvg += piCur[3]; 1398 iCurAvg += piCur[4]; 1399 iCurAvg += piCur[5]; 1400 iCurAvg += piCur[6]; 1401 iCurAvg += piCur[7]; 1402 iCurAvg += piCur[8]; 1403 iCurAvg += piCur[9]; 1404 iCurAvg += piCur[10]; 1405 iCurAvg += piCur[11]; 1406 iCurAvg += piCur[12]; 1407 iCurAvg += piCur[13]; 1408 iCurAvg += piCur[14]; 1409 iCurAvg += piCur[15]; 1410 1411 piOrg += iStrideOrg; 1412 piCur += iStrideCur; 1413 uiRowCnt++; 1414 } 1415 1416 piOrg = pcDtParam->pOrg; 1417 piCur = pcDtParam->pCur; 1418 iRows = pcDtParam->iRows; 1419 1420 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/16) : 0; 1421 1422 for( ; iRows != 0; iRows-=iSubStep ) 1423 { 1424 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1425 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1426 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1427 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1428 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1429 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1430 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1431 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1432 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1433 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1434 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1435 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1436 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1437 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1438 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1439 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1440 1441 piOrg += iStrideOrg; 1442 piCur += iStrideCur; 1443 } 1444 1445 uiSum <<= iSubShift; 1446 return ( uiSum >> g_uiBitIncrement ); 1447 } 1448 1449 #if AMP_SAD 1450 UInt TComRdCost::xGetSAD12ic( DistParam* pcDtParam ) 1451 { 1452 if ( pcDtParam->bApplyWeight ) 1453 { 1454 return xGetSADw( pcDtParam ); 1455 } 1456 Pel* piOrg = pcDtParam->pOrg; 1457 Pel* piCur = pcDtParam->pCur; 1458 Int iRows = pcDtParam->iRows; 1459 Int iSubShift = pcDtParam->iSubShift; 1460 Int iSubStep = ( 1 << iSubShift ); 1461 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1462 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1463 1464 UInt uiSum = 0; 1465 1466 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1467 Int iDeltaC; 1468 1469 for( ; iRows != 0; iRows-=iSubStep ) 1470 { 1471 iOrigAvg += piOrg[0]; 1472 iOrigAvg += piOrg[1]; 1473 iOrigAvg += piOrg[2]; 1474 iOrigAvg += piOrg[3]; 1475 iOrigAvg += piOrg[4]; 1476 iOrigAvg += piOrg[5]; 1477 iOrigAvg += piOrg[6]; 1478 iOrigAvg += piOrg[7]; 1479 iOrigAvg += piOrg[8]; 1480 iOrigAvg += piOrg[9]; 1481 iOrigAvg += piOrg[10]; 1482 iOrigAvg += piOrg[11]; 1483 1484 iCurAvg += piCur[0]; 1485 iCurAvg += piCur[1]; 1486 iCurAvg += piCur[2]; 1487 iCurAvg += piCur[3]; 1488 iCurAvg += piCur[4]; 1489 iCurAvg += piCur[5]; 1490 iCurAvg += piCur[6]; 1491 iCurAvg += piCur[7]; 1492 iCurAvg += piCur[8]; 1493 iCurAvg += piCur[9]; 1494 iCurAvg += piCur[10]; 1495 iCurAvg += piCur[11]; 1496 1497 piOrg += iStrideOrg; 1498 piCur += iStrideCur; 1499 uiRowCnt++; 1500 } 1501 1502 piOrg = pcDtParam->pOrg; 1503 piCur = pcDtParam->pCur; 1504 iRows = pcDtParam->iRows; 1505 1506 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/12) : 0; 1507 1508 for( ; iRows != 0; iRows-=iSubStep ) 1509 { 1510 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1511 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1512 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1513 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1514 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1515 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1516 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1517 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1518 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1519 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1520 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1521 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1522 1523 piOrg += iStrideOrg; 1524 piCur += iStrideCur; 1525 } 1526 1527 uiSum <<= iSubShift; 1528 return ( uiSum >> g_uiBitIncrement ); 1529 } 1530 #endif 1531 1532 UInt TComRdCost::xGetSAD16Nic( DistParam* pcDtParam ) 1533 { 1534 Pel* piOrg = pcDtParam->pOrg; 1535 Pel* piCur = pcDtParam->pCur; 1536 Int iRows = pcDtParam->iRows; 1537 Int iCols = pcDtParam->iCols; 1538 Int iSubShift = pcDtParam->iSubShift; 1539 Int iSubStep = ( 1 << iSubShift ); 1540 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1541 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1542 1543 UInt uiSum = 0; 1544 1545 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0, uiColCnt = (iCols-1)/16 + 1; 1546 Int iDeltaC; 1547 1548 for( ; iRows != 0; iRows-=iSubStep ) 1549 { 1550 for (Int n = 0; n < iCols; n+=16 ) 1551 { 1552 iOrigAvg += piOrg[n + 0]; 1553 iOrigAvg += piOrg[n + 1]; 1554 iOrigAvg += piOrg[n + 2]; 1555 iOrigAvg += piOrg[n + 3]; 1556 iOrigAvg += piOrg[n + 4]; 1557 iOrigAvg += piOrg[n + 5]; 1558 iOrigAvg += piOrg[n + 6]; 1559 iOrigAvg += piOrg[n + 7]; 1560 iOrigAvg += piOrg[n + 8]; 1561 iOrigAvg += piOrg[n + 9]; 1562 iOrigAvg += piOrg[n + 10]; 1563 iOrigAvg += piOrg[n + 11]; 1564 iOrigAvg += piOrg[n + 12]; 1565 iOrigAvg += piOrg[n + 13]; 1566 iOrigAvg += piOrg[n + 14]; 1567 iOrigAvg += piOrg[n + 15]; 1568 1569 iCurAvg += piCur[n + 0]; 1570 iCurAvg += piCur[n + 1]; 1571 iCurAvg += piCur[n + 2]; 1572 iCurAvg += piCur[n + 3]; 1573 iCurAvg += piCur[n + 4]; 1574 iCurAvg += piCur[n + 5]; 1575 iCurAvg += piCur[n + 6]; 1576 iCurAvg += piCur[n + 7]; 1577 iCurAvg += piCur[n + 8]; 1578 iCurAvg += piCur[n + 9]; 1579 iCurAvg += piCur[n + 10]; 1580 iCurAvg += piCur[n + 11]; 1581 iCurAvg += piCur[n + 12]; 1582 iCurAvg += piCur[n + 13]; 1583 iCurAvg += piCur[n + 14]; 1584 iCurAvg += piCur[n + 15]; 1585 } 1586 piOrg += iStrideOrg; 1587 piCur += iStrideCur; 1588 uiRowCnt++; 1589 } 1590 piOrg = pcDtParam->pOrg; 1591 piCur = pcDtParam->pCur; 1592 iRows = pcDtParam->iRows; 1593 1594 iDeltaC = (uiRowCnt && uiColCnt) ? ((iOrigAvg - iCurAvg)/uiRowCnt/uiColCnt/16) : 0; 1595 1596 for( ; iRows != 0; iRows-=iSubStep ) 1597 { 1598 for (Int n = 0; n < iCols; n+=16 ) 1599 { 1600 uiSum += abs( piOrg[n+ 0] - piCur[n+ 0] - iDeltaC ); 1601 uiSum += abs( piOrg[n+ 1] - piCur[n+ 1] - iDeltaC ); 1602 uiSum += abs( piOrg[n+ 2] - piCur[n+ 2] - iDeltaC ); 1603 uiSum += abs( piOrg[n+ 3] - piCur[n+ 3] - iDeltaC ); 1604 uiSum += abs( piOrg[n+ 4] - piCur[n+ 4] - iDeltaC ); 1605 uiSum += abs( piOrg[n+ 5] - piCur[n+ 5] - iDeltaC ); 1606 uiSum += abs( piOrg[n+ 6] - piCur[n+ 6] - iDeltaC ); 1607 uiSum += abs( piOrg[n+ 7] - piCur[n+ 7] - iDeltaC ); 1608 uiSum += abs( piOrg[n+ 8] - piCur[n+ 8] - iDeltaC ); 1609 uiSum += abs( piOrg[n+ 9] - piCur[n+ 9] - iDeltaC ); 1610 uiSum += abs( piOrg[n+10] - piCur[n+10] - iDeltaC ); 1611 uiSum += abs( piOrg[n+11] - piCur[n+11] - iDeltaC ); 1612 uiSum += abs( piOrg[n+12] - piCur[n+12] - iDeltaC ); 1613 uiSum += abs( piOrg[n+13] - piCur[n+13] - iDeltaC ); 1614 uiSum += abs( piOrg[n+14] - piCur[n+14] - iDeltaC ); 1615 uiSum += abs( piOrg[n+15] - piCur[n+15] - iDeltaC ); 1616 } 1617 piOrg += iStrideOrg; 1618 piCur += iStrideCur; 1619 } 1620 1621 uiSum <<= iSubShift; 1622 return ( uiSum >> g_uiBitIncrement ); 1623 } 1624 1625 UInt TComRdCost::xGetSAD32ic( DistParam* pcDtParam ) 1626 { 1627 if ( pcDtParam->bApplyWeight ) 1628 { 1629 return xGetSADw( pcDtParam ); 1630 } 1631 Pel* piOrg = pcDtParam->pOrg; 1632 Pel* piCur = pcDtParam->pCur; 1633 Int iRows = pcDtParam->iRows; 1634 Int iSubShift = pcDtParam->iSubShift; 1635 Int iSubStep = ( 1 << iSubShift ); 1636 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1637 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1638 1639 UInt uiSum = 0; 1640 1641 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1642 Int iDeltaC; 1643 1644 for( ; iRows != 0; iRows-=iSubStep ) 1645 { 1646 iOrigAvg += piOrg[0]; 1647 iOrigAvg += piOrg[1]; 1648 iOrigAvg += piOrg[2]; 1649 iOrigAvg += piOrg[3]; 1650 iOrigAvg += piOrg[4]; 1651 iOrigAvg += piOrg[5]; 1652 iOrigAvg += piOrg[6]; 1653 iOrigAvg += piOrg[7]; 1654 iOrigAvg += piOrg[8]; 1655 iOrigAvg += piOrg[9]; 1656 iOrigAvg += piOrg[10]; 1657 iOrigAvg += piOrg[11]; 1658 iOrigAvg += piOrg[12]; 1659 iOrigAvg += piOrg[13]; 1660 iOrigAvg += piOrg[14]; 1661 iOrigAvg += piOrg[15]; 1662 iOrigAvg += piOrg[16]; 1663 iOrigAvg += piOrg[17]; 1664 iOrigAvg += piOrg[18]; 1665 iOrigAvg += piOrg[19]; 1666 iOrigAvg += piOrg[20]; 1667 iOrigAvg += piOrg[21]; 1668 iOrigAvg += piOrg[22]; 1669 iOrigAvg += piOrg[23]; 1670 iOrigAvg += piOrg[24]; 1671 iOrigAvg += piOrg[25]; 1672 iOrigAvg += piOrg[26]; 1673 iOrigAvg += piOrg[27]; 1674 iOrigAvg += piOrg[28]; 1675 iOrigAvg += piOrg[29]; 1676 iOrigAvg += piOrg[30]; 1677 iOrigAvg += piOrg[31]; 1678 1679 iCurAvg += piCur[0]; 1680 iCurAvg += piCur[1]; 1681 iCurAvg += piCur[2]; 1682 iCurAvg += piCur[3]; 1683 iCurAvg += piCur[4]; 1684 iCurAvg += piCur[5]; 1685 iCurAvg += piCur[6]; 1686 iCurAvg += piCur[7]; 1687 iCurAvg += piCur[8]; 1688 iCurAvg += piCur[9]; 1689 iCurAvg += piCur[10]; 1690 iCurAvg += piCur[11]; 1691 iCurAvg += piCur[12]; 1692 iCurAvg += piCur[13]; 1693 iCurAvg += piCur[14]; 1694 iCurAvg += piCur[15]; 1695 iCurAvg += piCur[16]; 1696 iCurAvg += piCur[17]; 1697 iCurAvg += piCur[18]; 1698 iCurAvg += piCur[19]; 1699 iCurAvg += piCur[20]; 1700 iCurAvg += piCur[21]; 1701 iCurAvg += piCur[22]; 1702 iCurAvg += piCur[23]; 1703 iCurAvg += piCur[24]; 1704 iCurAvg += piCur[25]; 1705 iCurAvg += piCur[26]; 1706 iCurAvg += piCur[27]; 1707 iCurAvg += piCur[28]; 1708 iCurAvg += piCur[29]; 1709 iCurAvg += piCur[30]; 1710 iCurAvg += piCur[31]; 1711 1712 piOrg += iStrideOrg; 1713 piCur += iStrideCur; 1714 uiRowCnt++; 1715 } 1716 1717 piOrg = pcDtParam->pOrg; 1718 piCur = pcDtParam->pCur; 1719 iRows = pcDtParam->iRows; 1720 1721 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/32) : 0; 1722 1723 for( ; iRows != 0; iRows-=iSubStep ) 1724 { 1725 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1726 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1727 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1728 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1729 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1730 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1731 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1732 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1733 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1734 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1735 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1736 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1737 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1738 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1739 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1740 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1741 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 1742 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 1743 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 1744 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 1745 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 1746 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 1747 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 1748 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 1749 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 1750 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 1751 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 1752 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 1753 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 1754 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 1755 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 1756 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 1757 1758 piOrg += iStrideOrg; 1759 piCur += iStrideCur; 1760 } 1761 1762 uiSum <<= iSubShift; 1763 return ( uiSum >> g_uiBitIncrement ); 1764 } 1765 1766 #if AMP_SAD 1767 UInt TComRdCost::xGetSAD24ic( DistParam* pcDtParam ) 1768 { 1769 if ( pcDtParam->bApplyWeight ) 1770 { 1771 return xGetSADw( pcDtParam ); 1772 } 1773 Pel* piOrg = pcDtParam->pOrg; 1774 Pel* piCur = pcDtParam->pCur; 1775 Int iRows = pcDtParam->iRows; 1776 Int iSubShift = pcDtParam->iSubShift; 1777 Int iSubStep = ( 1 << iSubShift ); 1778 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1779 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1780 1781 UInt uiSum = 0; 1782 1783 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1784 Int iDeltaC; 1785 1786 for( ; iRows != 0; iRows-=iSubStep ) 1787 { 1788 iOrigAvg += piOrg[0]; 1789 iOrigAvg += piOrg[1]; 1790 iOrigAvg += piOrg[2]; 1791 iOrigAvg += piOrg[3]; 1792 iOrigAvg += piOrg[4]; 1793 iOrigAvg += piOrg[5]; 1794 iOrigAvg += piOrg[6]; 1795 iOrigAvg += piOrg[7]; 1796 iOrigAvg += piOrg[8]; 1797 iOrigAvg += piOrg[9]; 1798 iOrigAvg += piOrg[10]; 1799 iOrigAvg += piOrg[11]; 1800 iOrigAvg += piOrg[12]; 1801 iOrigAvg += piOrg[13]; 1802 iOrigAvg += piOrg[14]; 1803 iOrigAvg += piOrg[15]; 1804 iOrigAvg += piOrg[16]; 1805 iOrigAvg += piOrg[17]; 1806 iOrigAvg += piOrg[18]; 1807 iOrigAvg += piOrg[19]; 1808 iOrigAvg += piOrg[20]; 1809 iOrigAvg += piOrg[21]; 1810 iOrigAvg += piOrg[22]; 1811 iOrigAvg += piOrg[23]; 1812 1813 iCurAvg += piCur[0]; 1814 iCurAvg += piCur[1]; 1815 iCurAvg += piCur[2]; 1816 iCurAvg += piCur[3]; 1817 iCurAvg += piCur[4]; 1818 iCurAvg += piCur[5]; 1819 iCurAvg += piCur[6]; 1820 iCurAvg += piCur[7]; 1821 iCurAvg += piCur[8]; 1822 iCurAvg += piCur[9]; 1823 iCurAvg += piCur[10]; 1824 iCurAvg += piCur[11]; 1825 iCurAvg += piCur[12]; 1826 iCurAvg += piCur[13]; 1827 iCurAvg += piCur[14]; 1828 iCurAvg += piCur[15]; 1829 iCurAvg += piCur[16]; 1830 iCurAvg += piCur[17]; 1831 iCurAvg += piCur[18]; 1832 iCurAvg += piCur[19]; 1833 iCurAvg += piCur[20]; 1834 iCurAvg += piCur[21]; 1835 iCurAvg += piCur[22]; 1836 iCurAvg += piCur[23]; 1837 1838 piOrg += iStrideOrg; 1839 piCur += iStrideCur; 1840 uiRowCnt++; 1841 } 1842 1843 piOrg = pcDtParam->pOrg; 1844 piCur = pcDtParam->pCur; 1845 iRows = pcDtParam->iRows; 1846 1847 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/24) : 0; 1848 1849 for( ; iRows != 0; iRows-=iSubStep ) 1850 { 1851 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 1852 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 1853 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 1854 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 1855 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 1856 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 1857 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 1858 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 1859 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 1860 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 1861 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 1862 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 1863 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 1864 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 1865 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 1866 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 1867 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 1868 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 1869 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 1870 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 1871 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 1872 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 1873 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 1874 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 1875 1876 piOrg += iStrideOrg; 1877 piCur += iStrideCur; 1878 } 1879 1880 uiSum <<= iSubShift; 1881 return ( uiSum >> g_uiBitIncrement ); 1882 } 1883 #endif 1884 1885 UInt TComRdCost::xGetSAD64ic( DistParam* pcDtParam ) 1886 { 1887 if ( pcDtParam->bApplyWeight ) 1888 { 1889 return xGetSADw( pcDtParam ); 1890 } 1891 Pel* piOrg = pcDtParam->pOrg; 1892 Pel* piCur = pcDtParam->pCur; 1893 Int iRows = pcDtParam->iRows; 1894 Int iSubShift = pcDtParam->iSubShift; 1895 Int iSubStep = ( 1 << iSubShift ); 1896 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 1897 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 1898 1899 UInt uiSum = 0; 1900 1901 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 1902 Int iDeltaC; 1903 1904 for( ; iRows != 0; iRows-=iSubStep ) 1905 { 1906 iOrigAvg += piOrg[0] ; 1907 iOrigAvg += piOrg[1] ; 1908 iOrigAvg += piOrg[2] ; 1909 iOrigAvg += piOrg[3] ; 1910 iOrigAvg += piOrg[4] ; 1911 iOrigAvg += piOrg[5] ; 1912 iOrigAvg += piOrg[6] ; 1913 iOrigAvg += piOrg[7] ; 1914 iOrigAvg += piOrg[8] ; 1915 iOrigAvg += piOrg[9] ; 1916 iOrigAvg += piOrg[10] ; 1917 iOrigAvg += piOrg[11] ; 1918 iOrigAvg += piOrg[12] ; 1919 iOrigAvg += piOrg[13] ; 1920 iOrigAvg += piOrg[14] ; 1921 iOrigAvg += piOrg[15] ; 1922 iOrigAvg += piOrg[16] ; 1923 iOrigAvg += piOrg[17] ; 1924 iOrigAvg += piOrg[18] ; 1925 iOrigAvg += piOrg[19] ; 1926 iOrigAvg += piOrg[20] ; 1927 iOrigAvg += piOrg[21] ; 1928 iOrigAvg += piOrg[22] ; 1929 iOrigAvg += piOrg[23] ; 1930 iOrigAvg += piOrg[24] ; 1931 iOrigAvg += piOrg[25] ; 1932 iOrigAvg += piOrg[26] ; 1933 iOrigAvg += piOrg[27] ; 1934 iOrigAvg += piOrg[28] ; 1935 iOrigAvg += piOrg[29] ; 1936 iOrigAvg += piOrg[30] ; 1937 iOrigAvg += piOrg[31] ; 1938 iOrigAvg += piOrg[32] ; 1939 iOrigAvg += piOrg[33] ; 1940 iOrigAvg += piOrg[34] ; 1941 iOrigAvg += piOrg[35] ; 1942 iOrigAvg += piOrg[36] ; 1943 iOrigAvg += piOrg[37] ; 1944 iOrigAvg += piOrg[38] ; 1945 iOrigAvg += piOrg[39] ; 1946 iOrigAvg += piOrg[40] ; 1947 iOrigAvg += piOrg[41] ; 1948 iOrigAvg += piOrg[42] ; 1949 iOrigAvg += piOrg[43] ; 1950 iOrigAvg += piOrg[44] ; 1951 iOrigAvg += piOrg[45] ; 1952 iOrigAvg += piOrg[46] ; 1953 iOrigAvg += piOrg[47] ; 1954 iOrigAvg += piOrg[48] ; 1955 iOrigAvg += piOrg[49] ; 1956 iOrigAvg += piOrg[50] ; 1957 iOrigAvg += piOrg[51] ; 1958 iOrigAvg += piOrg[52] ; 1959 iOrigAvg += piOrg[53] ; 1960 iOrigAvg += piOrg[54] ; 1961 iOrigAvg += piOrg[55] ; 1962 iOrigAvg += piOrg[56] ; 1963 iOrigAvg += piOrg[57] ; 1964 iOrigAvg += piOrg[58] ; 1965 iOrigAvg += piOrg[59] ; 1966 iOrigAvg += piOrg[60] ; 1967 iOrigAvg += piOrg[61] ; 1968 iOrigAvg += piOrg[62] ; 1969 iOrigAvg += piOrg[63] ; 1970 1971 iCurAvg += piCur[0] ; 1972 iCurAvg += piCur[1] ; 1973 iCurAvg += piCur[2] ; 1974 iCurAvg += piCur[3] ; 1975 iCurAvg += piCur[4] ; 1976 iCurAvg += piCur[5] ; 1977 iCurAvg += piCur[6] ; 1978 iCurAvg += piCur[7] ; 1979 iCurAvg += piCur[8] ; 1980 iCurAvg += piCur[9] ; 1981 iCurAvg += piCur[10] ; 1982 iCurAvg += piCur[11] ; 1983 iCurAvg += piCur[12] ; 1984 iCurAvg += piCur[13] ; 1985 iCurAvg += piCur[14] ; 1986 iCurAvg += piCur[15] ; 1987 iCurAvg += piCur[16] ; 1988 iCurAvg += piCur[17] ; 1989 iCurAvg += piCur[18] ; 1990 iCurAvg += piCur[19] ; 1991 iCurAvg += piCur[20] ; 1992 iCurAvg += piCur[21] ; 1993 iCurAvg += piCur[22] ; 1994 iCurAvg += piCur[23] ; 1995 iCurAvg += piCur[24] ; 1996 iCurAvg += piCur[25] ; 1997 iCurAvg += piCur[26] ; 1998 iCurAvg += piCur[27] ; 1999 iCurAvg += piCur[28] ; 2000 iCurAvg += piCur[29] ; 2001 iCurAvg += piCur[30] ; 2002 iCurAvg += piCur[31] ; 2003 iCurAvg += piCur[32] ; 2004 iCurAvg += piCur[33] ; 2005 iCurAvg += piCur[34] ; 2006 iCurAvg += piCur[35] ; 2007 iCurAvg += piCur[36] ; 2008 iCurAvg += piCur[37] ; 2009 iCurAvg += piCur[38] ; 2010 iCurAvg += piCur[39] ; 2011 iCurAvg += piCur[40] ; 2012 iCurAvg += piCur[41] ; 2013 iCurAvg += piCur[42] ; 2014 iCurAvg += piCur[43] ; 2015 iCurAvg += piCur[44] ; 2016 iCurAvg += piCur[45] ; 2017 iCurAvg += piCur[46] ; 2018 iCurAvg += piCur[47] ; 2019 iCurAvg += piCur[48] ; 2020 iCurAvg += piCur[49] ; 2021 iCurAvg += piCur[50] ; 2022 iCurAvg += piCur[51] ; 2023 iCurAvg += piCur[52] ; 2024 iCurAvg += piCur[53] ; 2025 iCurAvg += piCur[54] ; 2026 iCurAvg += piCur[55] ; 2027 iCurAvg += piCur[56] ; 2028 iCurAvg += piCur[57] ; 2029 iCurAvg += piCur[58] ; 2030 iCurAvg += piCur[59] ; 2031 iCurAvg += piCur[60] ; 2032 iCurAvg += piCur[61] ; 2033 iCurAvg += piCur[62] ; 2034 iCurAvg += piCur[63] ; 2035 2036 piOrg += iStrideOrg; 2037 piCur += iStrideCur; 2038 uiRowCnt++; 2039 } 2040 2041 piOrg = pcDtParam->pOrg; 2042 piCur = pcDtParam->pCur; 2043 iRows = pcDtParam->iRows; 2044 2045 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/64) : 0; 2046 2047 for( ; iRows != 0; iRows-=iSubStep ) 2048 { 2049 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 2050 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 2051 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 2052 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 2053 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 2054 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 2055 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 2056 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 2057 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 2058 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 2059 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 2060 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 2061 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 2062 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 2063 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 2064 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 2065 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 2066 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 2067 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 2068 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 2069 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 2070 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 2071 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 2072 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 2073 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 2074 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 2075 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 2076 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 2077 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 2078 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 2079 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 2080 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 2081 uiSum += abs( piOrg[32] - piCur[32] - iDeltaC ); 2082 uiSum += abs( piOrg[33] - piCur[33] - iDeltaC ); 2083 uiSum += abs( piOrg[34] - piCur[34] - iDeltaC ); 2084 uiSum += abs( piOrg[35] - piCur[35] - iDeltaC ); 2085 uiSum += abs( piOrg[36] - piCur[36] - iDeltaC ); 2086 uiSum += abs( piOrg[37] - piCur[37] - iDeltaC ); 2087 uiSum += abs( piOrg[38] - piCur[38] - iDeltaC ); 2088 uiSum += abs( piOrg[39] - piCur[39] - iDeltaC ); 2089 uiSum += abs( piOrg[40] - piCur[40] - iDeltaC ); 2090 uiSum += abs( piOrg[41] - piCur[41] - iDeltaC ); 2091 uiSum += abs( piOrg[42] - piCur[42] - iDeltaC ); 2092 uiSum += abs( piOrg[43] - piCur[43] - iDeltaC ); 2093 uiSum += abs( piOrg[44] - piCur[44] - iDeltaC ); 2094 uiSum += abs( piOrg[45] - piCur[45] - iDeltaC ); 2095 uiSum += abs( piOrg[46] - piCur[46] - iDeltaC ); 2096 uiSum += abs( piOrg[47] - piCur[47] - iDeltaC ); 2097 uiSum += abs( piOrg[48] - piCur[48] - iDeltaC ); 2098 uiSum += abs( piOrg[49] - piCur[49] - iDeltaC ); 2099 uiSum += abs( piOrg[50] - piCur[50] - iDeltaC ); 2100 uiSum += abs( piOrg[51] - piCur[51] - iDeltaC ); 2101 uiSum += abs( piOrg[52] - piCur[52] - iDeltaC ); 2102 uiSum += abs( piOrg[53] - piCur[53] - iDeltaC ); 2103 uiSum += abs( piOrg[54] - piCur[54] - iDeltaC ); 2104 uiSum += abs( piOrg[55] - piCur[55] - iDeltaC ); 2105 uiSum += abs( piOrg[56] - piCur[56] - iDeltaC ); 2106 uiSum += abs( piOrg[57] - piCur[57] - iDeltaC ); 2107 uiSum += abs( piOrg[58] - piCur[58] - iDeltaC ); 2108 uiSum += abs( piOrg[59] - piCur[59] - iDeltaC ); 2109 uiSum += abs( piOrg[60] - piCur[60] - iDeltaC ); 2110 uiSum += abs( piOrg[61] - piCur[61] - iDeltaC ); 2111 uiSum += abs( piOrg[62] - piCur[62] - iDeltaC ); 2112 uiSum += abs( piOrg[63] - piCur[63] - iDeltaC ); 2113 2114 piOrg += iStrideOrg; 2115 piCur += iStrideCur; 2116 } 2117 2118 uiSum <<= iSubShift; 2119 return ( uiSum >> g_uiBitIncrement ); 2120 } 2121 2122 #if AMP_SAD 2123 UInt TComRdCost::xGetSAD48ic( DistParam* pcDtParam ) 2124 { 2125 if ( pcDtParam->bApplyWeight ) 2126 { 2127 return xGetSADw( pcDtParam ); 2128 } 2129 Pel* piOrg = pcDtParam->pOrg; 2130 Pel* piCur = pcDtParam->pCur; 2131 Int iRows = pcDtParam->iRows; 2132 Int iSubShift = pcDtParam->iSubShift; 2133 Int iSubStep = ( 1 << iSubShift ); 2134 Int iStrideCur = pcDtParam->iStrideCur*iSubStep; 2135 Int iStrideOrg = pcDtParam->iStrideOrg*iSubStep; 2136 2137 UInt uiSum = 0; 2138 2139 Int iOrigAvg = 0, iCurAvg = 0, uiRowCnt = 0; 2140 Int iDeltaC; 2141 2142 for( ; iRows != 0; iRows-=iSubStep ) 2143 { 2144 iOrigAvg += piOrg[0] ; 2145 iOrigAvg += piOrg[1] ; 2146 iOrigAvg += piOrg[2] ; 2147 iOrigAvg += piOrg[3] ; 2148 iOrigAvg += piOrg[4] ; 2149 iOrigAvg += piOrg[5] ; 2150 iOrigAvg += piOrg[6] ; 2151 iOrigAvg += piOrg[7] ; 2152 iOrigAvg += piOrg[8] ; 2153 iOrigAvg += piOrg[9] ; 2154 iOrigAvg += piOrg[10] ; 2155 iOrigAvg += piOrg[11] ; 2156 iOrigAvg += piOrg[12] ; 2157 iOrigAvg += piOrg[13] ; 2158 iOrigAvg += piOrg[14] ; 2159 iOrigAvg += piOrg[15] ; 2160 iOrigAvg += piOrg[16] ; 2161 iOrigAvg += piOrg[17] ; 2162 iOrigAvg += piOrg[18] ; 2163 iOrigAvg += piOrg[19] ; 2164 iOrigAvg += piOrg[20] ; 2165 iOrigAvg += piOrg[21] ; 2166 iOrigAvg += piOrg[22] ; 2167 iOrigAvg += piOrg[23] ; 2168 iOrigAvg += piOrg[24] ; 2169 iOrigAvg += piOrg[25] ; 2170 iOrigAvg += piOrg[26] ; 2171 iOrigAvg += piOrg[27] ; 2172 iOrigAvg += piOrg[28] ; 2173 iOrigAvg += piOrg[29] ; 2174 iOrigAvg += piOrg[30] ; 2175 iOrigAvg += piOrg[31] ; 2176 iOrigAvg += piOrg[32] ; 2177 iOrigAvg += piOrg[33] ; 2178 iOrigAvg += piOrg[34] ; 2179 iOrigAvg += piOrg[35] ; 2180 iOrigAvg += piOrg[36] ; 2181 iOrigAvg += piOrg[37] ; 2182 iOrigAvg += piOrg[38] ; 2183 iOrigAvg += piOrg[39] ; 2184 iOrigAvg += piOrg[40] ; 2185 iOrigAvg += piOrg[41] ; 2186 iOrigAvg += piOrg[42] ; 2187 iOrigAvg += piOrg[43] ; 2188 iOrigAvg += piOrg[44] ; 2189 iOrigAvg += piOrg[45] ; 2190 iOrigAvg += piOrg[46] ; 2191 iOrigAvg += piOrg[47] ; 2192 2193 iCurAvg += piCur[0] ; 2194 iCurAvg += piCur[1] ; 2195 iCurAvg += piCur[2] ; 2196 iCurAvg += piCur[3] ; 2197 iCurAvg += piCur[4] ; 2198 iCurAvg += piCur[5] ; 2199 iCurAvg += piCur[6] ; 2200 iCurAvg += piCur[7] ; 2201 iCurAvg += piCur[8] ; 2202 iCurAvg += piCur[9] ; 2203 iCurAvg += piCur[10] ; 2204 iCurAvg += piCur[11] ; 2205 iCurAvg += piCur[12] ; 2206 iCurAvg += piCur[13] ; 2207 iCurAvg += piCur[14] ; 2208 iCurAvg += piCur[15] ; 2209 iCurAvg += piCur[16] ; 2210 iCurAvg += piCur[17] ; 2211 iCurAvg += piCur[18] ; 2212 iCurAvg += piCur[19] ; 2213 iCurAvg += piCur[20] ; 2214 iCurAvg += piCur[21] ; 2215 iCurAvg += piCur[22] ; 2216 iCurAvg += piCur[23] ; 2217 iCurAvg += piCur[24] ; 2218 iCurAvg += piCur[25] ; 2219 iCurAvg += piCur[26] ; 2220 iCurAvg += piCur[27] ; 2221 iCurAvg += piCur[28] ; 2222 iCurAvg += piCur[29] ; 2223 iCurAvg += piCur[30] ; 2224 iCurAvg += piCur[31] ; 2225 iCurAvg += piCur[32] ; 2226 iCurAvg += piCur[33] ; 2227 iCurAvg += piCur[34] ; 2228 iCurAvg += piCur[35] ; 2229 iCurAvg += piCur[36] ; 2230 iCurAvg += piCur[37] ; 2231 iCurAvg += piCur[38] ; 2232 iCurAvg += piCur[39] ; 2233 iCurAvg += piCur[40] ; 2234 iCurAvg += piCur[41] ; 2235 iCurAvg += piCur[42] ; 2236 iCurAvg += piCur[43] ; 2237 iCurAvg += piCur[44] ; 2238 iCurAvg += piCur[45] ; 2239 iCurAvg += piCur[46] ; 2240 iCurAvg += piCur[47] ; 2241 2242 piOrg += iStrideOrg; 2243 piCur += iStrideCur; 2244 uiRowCnt++; 2245 } 2246 2247 piOrg = pcDtParam->pOrg; 2248 piCur = pcDtParam->pCur; 2249 iRows = pcDtParam->iRows; 2250 2251 iDeltaC = uiRowCnt ? ((iOrigAvg - iCurAvg)/uiRowCnt/48) : 0; 2252 2253 for( ; iRows != 0; iRows-=iSubStep ) 2254 { 2255 uiSum += abs( piOrg[0] - piCur[0] - iDeltaC ); 2256 uiSum += abs( piOrg[1] - piCur[1] - iDeltaC ); 2257 uiSum += abs( piOrg[2] - piCur[2] - iDeltaC ); 2258 uiSum += abs( piOrg[3] - piCur[3] - iDeltaC ); 2259 uiSum += abs( piOrg[4] - piCur[4] - iDeltaC ); 2260 uiSum += abs( piOrg[5] - piCur[5] - iDeltaC ); 2261 uiSum += abs( piOrg[6] - piCur[6] - iDeltaC ); 2262 uiSum += abs( piOrg[7] - piCur[7] - iDeltaC ); 2263 uiSum += abs( piOrg[8] - piCur[8] - iDeltaC ); 2264 uiSum += abs( piOrg[9] - piCur[9] - iDeltaC ); 2265 uiSum += abs( piOrg[10] - piCur[10] - iDeltaC ); 2266 uiSum += abs( piOrg[11] - piCur[11] - iDeltaC ); 2267 uiSum += abs( piOrg[12] - piCur[12] - iDeltaC ); 2268 uiSum += abs( piOrg[13] - piCur[13] - iDeltaC ); 2269 uiSum += abs( piOrg[14] - piCur[14] - iDeltaC ); 2270 uiSum += abs( piOrg[15] - piCur[15] - iDeltaC ); 2271 uiSum += abs( piOrg[16] - piCur[16] - iDeltaC ); 2272 uiSum += abs( piOrg[17] - piCur[17] - iDeltaC ); 2273 uiSum += abs( piOrg[18] - piCur[18] - iDeltaC ); 2274 uiSum += abs( piOrg[19] - piCur[19] - iDeltaC ); 2275 uiSum += abs( piOrg[20] - piCur[20] - iDeltaC ); 2276 uiSum += abs( piOrg[21] - piCur[21] - iDeltaC ); 2277 uiSum += abs( piOrg[22] - piCur[22] - iDeltaC ); 2278 uiSum += abs( piOrg[23] - piCur[23] - iDeltaC ); 2279 uiSum += abs( piOrg[24] - piCur[24] - iDeltaC ); 2280 uiSum += abs( piOrg[25] - piCur[25] - iDeltaC ); 2281 uiSum += abs( piOrg[26] - piCur[26] - iDeltaC ); 2282 uiSum += abs( piOrg[27] - piCur[27] - iDeltaC ); 2283 uiSum += abs( piOrg[28] - piCur[28] - iDeltaC ); 2284 uiSum += abs( piOrg[29] - piCur[29] - iDeltaC ); 2285 uiSum += abs( piOrg[30] - piCur[30] - iDeltaC ); 2286 uiSum += abs( piOrg[31] - piCur[31] - iDeltaC ); 2287 uiSum += abs( piOrg[32] - piCur[32] - iDeltaC ); 2288 uiSum += abs( piOrg[33] - piCur[33] - iDeltaC ); 2289 uiSum += abs( piOrg[34] - piCur[34] - iDeltaC ); 2290 uiSum += abs( piOrg[35] - piCur[35] - iDeltaC ); 2291 uiSum += abs( piOrg[36] - piCur[36] - iDeltaC ); 2292 uiSum += abs( piOrg[37] - piCur[37] - iDeltaC ); 2293 uiSum += abs( piOrg[38] - piCur[38] - iDeltaC ); 2294 uiSum += abs( piOrg[39] - piCur[39] - iDeltaC ); 2295 uiSum += abs( piOrg[40] - piCur[40] - iDeltaC ); 2296 uiSum += abs( piOrg[41] - piCur[41] - iDeltaC ); 2297 uiSum += abs( piOrg[42] - piCur[42] - iDeltaC ); 2298 uiSum += abs( piOrg[43] - piCur[43] - iDeltaC ); 2299 uiSum += abs( piOrg[44] - piCur[44] - iDeltaC ); 2300 uiSum += abs( piOrg[45] - piCur[45] - iDeltaC ); 2301 uiSum += abs( piOrg[46] - piCur[46] - iDeltaC ); 2302 uiSum += abs( piOrg[47] - piCur[47] - iDeltaC ); 2303 2304 piOrg += iStrideOrg; 2305 piCur += iStrideCur; 2306 } 2307 2308 uiSum <<= iSubShift; 2309 return ( uiSum >> g_uiBitIncrement ); 2310 } 2311 #endif 1112 2312 #endif 1113 2313 … … 2826 4026 return xGetHADsw( pcDtParam ); 2827 4027 } 4028 #if LGE_ILLUCOMP_B0045 4029 if(pcDtParam->bUseIC) 4030 { 4031 return xGetHADsic( pcDtParam ); 4032 } 4033 #endif 2828 4034 Pel* piOrg = pcDtParam->pOrg; 2829 4035 Pel* piCur = pcDtParam->pCur; … … 2833 4039 Int iStrideOrg = pcDtParam->iStrideOrg; 2834 4040 Int iStep = pcDtParam->iStep; 2835 4041 2836 4042 Int x, y; 2837 2838 UInt uiSum = 0; 2839 4043 4044 UInt uiSum = 0; 4045 2840 4046 #if NS_HAD 2841 4047 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) ) … … 2890 4096 Int iOffsetOrg = iStrideOrg<<2; 2891 4097 Int iOffsetCur = iStrideCur<<2; 2892 4098 2893 4099 for ( y=0; y<iRows; y+= 4 ) 2894 4100 { … … 2919 4125 assert(false); 2920 4126 } 2921 4127 2922 4128 return ( uiSum >> g_uiBitIncrement ); 2923 4129 } 4130 4131 #if LGE_ILLUCOMP_B0045 4132 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam ) 4133 { 4134 if ( pcDtParam->bApplyWeight ) 4135 { 4136 return xGetHADsw( pcDtParam ); 4137 } 4138 Pel* piOrg = pcDtParam->pOrg; 4139 Pel* piCur = pcDtParam->pCur; 4140 Int iRows = pcDtParam->iRows; 4141 Int iCols = pcDtParam->iCols; 4142 Int iStrideCur = pcDtParam->iStrideCur; 4143 Int iStrideOrg = pcDtParam->iStrideOrg; 4144 Int iStep = pcDtParam->iStep; 4145 4146 Int x, y; 4147 4148 UInt uiSum = 0; 4149 4150 Int iOrigAvg = 0, iCurAvg = 0; 4151 Int iDeltaC; 4152 4153 for ( y=0; y<iRows; y++ ) 4154 { 4155 for ( x=0; x<iCols; x++ ) 4156 { 4157 iOrigAvg += piOrg[x]; 4158 iCurAvg += piCur[x]; 4159 } 4160 piOrg += iStrideOrg; 4161 piCur += iStrideCur; 4162 } 4163 4164 piOrg = pcDtParam->pOrg; 4165 piCur = pcDtParam->pCur; 4166 4167 iDeltaC = (iOrigAvg - iCurAvg)/iRows/iCols; 4168 4169 for ( y=0; y<iRows; y++ ) 4170 { 4171 for ( x=0; x<iCols; x++ ) 4172 { 4173 piOrg[x] -= iDeltaC; 4174 } 4175 piOrg += iStrideOrg; 4176 } 4177 4178 piOrg = pcDtParam->pOrg; 4179 4180 #if NS_HAD 4181 if( ( ( iRows % 8 == 0) && (iCols % 8 == 0) && ( iRows == iCols ) ) || ( ( iRows % 8 == 0 ) && (iCols % 8 == 0) && !pcDtParam->bUseNSHAD ) ) 4182 #else 4183 if( ( iRows % 8 == 0) && (iCols % 8 == 0) ) 4184 #endif 4185 { 4186 Int iOffsetOrg = iStrideOrg<<3; 4187 Int iOffsetCur = iStrideCur<<3; 4188 for ( y=0; y<iRows; y+= 8 ) 4189 { 4190 for ( x=0; x<iCols; x+= 8 ) 4191 { 4192 uiSum += xCalcHADs8x8( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4193 } 4194 piOrg += iOffsetOrg; 4195 piCur += iOffsetCur; 4196 } 4197 } 4198 #if NS_HAD 4199 else if ( ( iCols > 8 ) && ( iCols > iRows ) && pcDtParam->bUseNSHAD ) 4200 { 4201 Int iOffsetOrg = iStrideOrg<<2; 4202 Int iOffsetCur = iStrideCur<<2; 4203 for ( y=0; y<iRows; y+= 4 ) 4204 { 4205 for ( x=0; x<iCols; x+= 16 ) 4206 { 4207 uiSum += xCalcHADs16x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4208 } 4209 piOrg += iOffsetOrg; 4210 piCur += iOffsetCur; 4211 } 4212 } 4213 else if ( ( iRows > 8 ) && ( iCols < iRows ) && pcDtParam->bUseNSHAD ) 4214 { 4215 Int iOffsetOrg = iStrideOrg<<4; 4216 Int iOffsetCur = iStrideCur<<4; 4217 for ( y=0; y<iRows; y+= 16 ) 4218 { 4219 for ( x=0; x<iCols; x+= 4 ) 4220 { 4221 uiSum += xCalcHADs4x16( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4222 } 4223 piOrg += iOffsetOrg; 4224 piCur += iOffsetCur; 4225 } 4226 } 4227 #endif 4228 else if( ( iRows % 4 == 0) && (iCols % 4 == 0) ) 4229 { 4230 Int iOffsetOrg = iStrideOrg<<2; 4231 Int iOffsetCur = iStrideCur<<2; 4232 4233 for ( y=0; y<iRows; y+= 4 ) 4234 { 4235 for ( x=0; x<iCols; x+= 4 ) 4236 { 4237 uiSum += xCalcHADs4x4( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4238 } 4239 piOrg += iOffsetOrg; 4240 piCur += iOffsetCur; 4241 } 4242 } 4243 else if( ( iRows % 2 == 0) && (iCols % 2 == 0) ) 4244 { 4245 Int iOffsetOrg = iStrideOrg<<1; 4246 Int iOffsetCur = iStrideCur<<1; 4247 for ( y=0; y<iRows; y+=2 ) 4248 { 4249 for ( x=0; x<iCols; x+=2 ) 4250 { 4251 uiSum += xCalcHADs2x2( &piOrg[x], &piCur[x*iStep], iStrideOrg, iStrideCur, iStep ); 4252 } 4253 piOrg += iOffsetOrg; 4254 piCur += iOffsetCur; 4255 } 4256 } 4257 else 4258 { 4259 assert(false); 4260 } 4261 4262 piOrg = pcDtParam->pOrg; 4263 4264 for ( y=0; y<iRows; y++ ) 4265 { 4266 for ( x=0; x<iCols; x++ ) 4267 { 4268 piOrg[x] += iDeltaC; 4269 } 4270 piOrg += iStrideOrg; 4271 } 4272 4273 return ( uiSum >> g_uiBitIncrement ); 4274 } 4275 #endif 2924 4276 2925 4277 #if HHI_VSO -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRdCost.h
r193 r213 88 88 Int iCols; 89 89 Int iStep; 90 #if LGE_ILLUCOMP_B0045 91 Bool bUseIC; 92 #endif 90 93 FpDistFunc DistFunc; 91 94 … … 302 305 private: 303 306 307 #if LGE_ILLUCOMP_B0045 308 static UInt xGetSADic ( DistParam* pcDtParam ); 309 static UInt xGetSAD4ic ( DistParam* pcDtParam ); 310 static UInt xGetSAD8ic ( DistParam* pcDtParam ); 311 static UInt xGetSAD16ic ( DistParam* pcDtParam ); 312 static UInt xGetSAD32ic ( DistParam* pcDtParam ); 313 static UInt xGetSAD64ic ( DistParam* pcDtParam ); 314 static UInt xGetSAD16Nic ( DistParam* pcDtParam ); 315 #endif 304 316 static UInt xGetSSE ( DistParam* pcDtParam ); 305 317 static UInt xGetSSE4 ( DistParam* pcDtParam ); … … 329 341 330 342 #if AMP_SAD 343 #if LGE_ILLUCOMP_B0045 344 static UInt xGetSAD12ic ( DistParam* pcDtParam ); 345 static UInt xGetSAD24ic ( DistParam* pcDtParam ); 346 static UInt xGetSAD48ic ( DistParam* pcDtParam ); 347 #endif 331 348 static UInt xGetSAD12 ( DistParam* pcDtParam ); 332 349 static UInt xGetSAD24 ( DistParam* pcDtParam ); 333 350 static UInt xGetSAD48 ( DistParam* pcDtParam ); 334 335 #endif 336 351 #endif 352 353 #if LGE_ILLUCOMP_B0045 354 static UInt xGetHADsic ( DistParam* pcDtParam ); 355 #endif 337 356 static UInt xGetHADs4 ( DistParam* pcDtParam ); 338 357 static UInt xGetHADs8 ( DistParam* pcDtParam ); 339 358 static UInt xGetHADs ( DistParam* pcDtParam ); 359 340 360 static UInt xCalcHADs2x2 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); 341 361 static UInt xCalcHADs4x4 ( Pel *piOrg, Pel *piCurr, Int iStrideOrg, Int iStrideCur, Int iStep ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp
r166 r213 219 219 } 220 220 221 #if QC_MULTI_DIS_CAN 221 #if QC_MULTI_DIS_CAN_A0097 222 222 Bool 223 223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp … … 243 243 iBlkHeight = pcCU->getHeight ( 0 ); 244 244 pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos ); 245 #if QC_MULTI_DIS_CAN 245 #if QC_MULTI_DIS_CAN_A0097 246 246 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp 247 247 #if QC_SIMPLIFIEDIVRP_M24938 … … 258 258 } 259 259 260 #if QC_MULTI_DIS_CAN 260 #if QC_MULTI_DIS_CAN_A0097 261 261 Bool 262 262 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp … … 283 283 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 284 284 #endif 285 #if QC_MULTI_DIS_CAN 285 #if QC_MULTI_DIS_CAN_A0097 286 286 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp 287 287 #if QC_SIMPLIFIEDIVRP_M24938 … … 522 522 523 523 524 #if QC_MULTI_DIS_CAN 524 #if QC_MULTI_DIS_CAN_A0097 525 525 Void 526 526 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp … … 553 553 554 554 //===== get disparity ===== 555 #if QC_MULTI_DIS_CAN 555 #if QC_MULTI_DIS_CAN_A0097 556 556 Int iDisparity = iDisp; 557 557 #else -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComResidualGenerator.h
r100 r213 69 69 Void setRecResidualPic ( TComPic* pcPic ); 70 70 71 #if QC_MULTI_DIS_CAN 71 #if QC_MULTI_DIS_CAN_A0097 72 72 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp 73 73 #if QC_SIMPLIFIEDIVRP_M24938 … … 100 100 Void xClearIntViewResidual ( TComDataCU* pcCU, TComYuv* pcCUResidual, UInt uiPartIdx ); 101 101 Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); 102 #if QC_MULTI_DIS_CAN 102 #if QC_MULTI_DIS_CAN_A0097 103 103 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 104 104 #if QC_SIMPLIFIEDIVRP_M24938 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.cpp
r77 r213 174 174 g_aacWedgeRefLists.clear(); 175 175 } 176 #if HHIQC_DMMFASTSEARCH_B0039 177 if ( !g_aacWedgeNodeLists.empty() ) 178 { 179 for ( UInt ui = 0; ui < g_aacWedgeNodeLists.size(); ui++ ) 180 { 181 g_aacWedgeNodeLists[ui].clear(); 182 } 183 g_aacWedgeNodeLists.clear(); 184 } 185 #endif 176 186 #endif 177 187 } … … 295 305 }; 296 306 307 #if RWTH_SDC_DLT_B0036 308 UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES] = { DC_IDX, DMM_WEDGE_FULL_IDX, DMM_WEDGE_PREDDIR_IDX, PLANAR_IDX }; 309 #endif 297 310 298 311 Int g_quantScales[6] = … … 1170 1183 std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 1171 1184 1185 #if HHIQC_DMMFASTSEARCH_B0039 1186 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 1187 std::vector< std::vector< TComWedgeNode> > g_aacWedgeNodeLists; 1188 #endif 1189 1172 1190 Void initWedgeLists() 1173 1191 { … … 1180 1198 g_aacWedgeLists.push_back( acWedgeList ); 1181 1199 g_aacWedgeRefLists.push_back( acWedgeRefList ); 1200 1201 #if HHIQC_DMMFASTSEARCH_B0039 1202 // create WedgeNodeList 1203 std::vector<TComWedgeNode> acWedgeNodeList; 1204 for( UInt uiPos = 0; uiPos < acWedgeList.size(); uiPos++ ) 1205 { 1206 if( acWedgeList[uiPos].getIsCoarse() ) 1207 { 1208 TComWedgeNode cWedgeNode; 1209 cWedgeNode.setPatternIdx( uiPos ); 1210 1211 // set refinement idxs 1212 UInt uiRefPos = 0; 1213 for( Int iOffS = -1; iOffS <= 1; iOffS++ ) 1214 { 1215 for( Int iOffE = -1; iOffE <= 1; iOffE++ ) 1216 { 1217 if( iOffS == 0 && iOffE == 0 ) { continue; } 1218 1219 Int iSx = (Int)acWedgeList[uiPos].getStartX(); 1220 Int iSy = (Int)acWedgeList[uiPos].getStartY(); 1221 Int iEx = (Int)acWedgeList[uiPos].getEndX(); 1222 Int iEy = (Int)acWedgeList[uiPos].getEndY(); 1223 1224 switch( acWedgeList[uiPos].getOri() ) 1225 { 1226 case( 0 ): { iSx += iOffS; iEy += iOffE; } break; 1227 case( 1 ): { iSy += iOffS; iEx -= iOffE; } break; 1228 case( 2 ): { iSx -= iOffS; iEy -= iOffE; } break; 1229 case( 3 ): { iSy -= iOffS; iEx += iOffE; } break; 1230 case( 4 ): { iSx += iOffS; iEx += iOffE; } break; 1231 case( 5 ): { iSy += iOffS; iEy += iOffE; } break; 1232 default: assert( 0 ); 1233 } 1234 1235 for( UInt k = 0; k < acWedgeRefList.size(); k++ ) 1236 { 1237 if( iSx == (Int)acWedgeRefList[k].getStartX() && 1238 iSy == (Int)acWedgeRefList[k].getStartY() && 1239 iEx == (Int)acWedgeRefList[k].getEndX() && 1240 iEy == (Int)acWedgeRefList[k].getEndY() ) 1241 { 1242 if( acWedgeRefList[k].getRefIdx() != cWedgeNode.getPatternIdx() ) 1243 { 1244 Bool bNew = true; 1245 for( UInt m = 0; m < uiRefPos; m++ ) { if( acWedgeRefList[k].getRefIdx() == cWedgeNode.getRefineIdx( m ) ) { bNew = false; break; } } 1246 1247 if( bNew ) 1248 { 1249 cWedgeNode.setRefineIdx( acWedgeRefList[k].getRefIdx(), uiRefPos ); 1250 uiRefPos++; 1251 break; 1252 } 1253 } 1254 } 1255 } 1256 } 1257 } 1258 acWedgeNodeList.push_back( cWedgeNode ); 1259 } 1260 } 1261 g_aacWedgeNodeLists.push_back( acWedgeNodeList ); 1262 #endif 1182 1263 } 1183 1264 return; … … 1217 1298 for( Int iL = 0; iL < uiBlockSize; iL++ ) 1218 1299 { 1300 #if HHIQC_DMMFASTSEARCH_B0039 1301 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes, ((iL%2)==0 && (iK%2)==0) ); 1302 #else 1219 1303 cTempWedgelet.setWedgelet( uhStartX + (iK*iStepStartX) , uhStartY + (iK*iStepStartY), uhEndX + (iL*iStepEndX), uhEndY + (iL*iStepEndY), (UChar)uiOri, eWedgeRes ); 1304 #endif 1220 1305 addWedgeletToList( cTempWedgelet, racWedgeList, racWedgeRefList ); 1221 1306 } 1222 1307 } 1223 1308 } 1309 #if HHIQC_DMMFASTSEARCH_B0039 1310 UInt uiThrSz = DMM3_SIMPLIFY_TR; 1311 1312 std::vector< std::vector<UInt> > auiWdgListSz; 1313 for( Int idxM=2; idxM<=34 ; idxM++) 1314 { 1315 std::vector<UInt> auiWdgList; 1316 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 1317 { 1318 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 1319 if( uiAbsDiff <= uiThrSz ) 1320 { 1321 auiWdgList.push_back(idxW); 1322 } 1323 } 1324 auiWdgListSz.push_back(auiWdgList); 1325 } 1326 g_aauiWdgLstM3.push_back(auiWdgListSz); 1327 #endif 1224 1328 } 1225 1329 … … 1257 1361 if( bValid ) 1258 1362 { 1363 #if HHIQC_DMMFASTSEARCH_B0039 1364 cWedgelet.findClosetAngle(); 1365 #endif 1259 1366 racWedgeList.push_back( cWedgelet ); 1260 1367 TComWedgeRef cWedgeRef; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComRom.h
r100 r213 193 193 extern std::vector< std::vector<TComWedgeRef> > g_aacWedgeRefLists; 194 194 195 #if HHIQC_DMMFASTSEARCH_B0039 196 extern std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 197 extern std::vector< std::vector<TComWedgeNode> > g_aacWedgeNodeLists; 198 #endif 199 200 #if RWTH_SDC_DLT_B0036 201 #define RWTH_SDC_NUM_PRED_MODES 4 202 extern UInt g_auiSDCPredModes[RWTH_SDC_NUM_PRED_MODES]; 203 #endif 204 195 205 Void initWedgeLists(); 196 206 Void createWedgeList( UInt uiWidth, UInt uiHeight, std::vector<TComWedgelet> &racWedgeList, std::vector<TComWedgeRef> &racWedgeRefList, WedgeResolution eWedgeRes ); … … 206 216 #endif 207 217 208 #if LGE_EDGE_INTRA 218 #if LGE_EDGE_INTRA_A0070 209 219 __inline Void mapEdgeIntratoDC( UChar& curDir ) { curDir = (curDir >= EDGE_INTRA_IDX) ? DC_IDX : curDir; } 210 220 __inline Void mapEdgeIntratoDC( UInt& curDir ) { curDir = (curDir >= EDGE_INTRA_IDX) ? DC_IDX : curDir; } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.cpp
r193 r213 44 44 45 45 TComSlice::TComSlice() 46 #if QC_MVHEVC_B0046 47 : m_iPPSId ( 0 ) 48 #else 46 49 : m_iPPSId ( -1 ) 50 #endif 47 51 , m_iPOC ( 0 ) 48 52 , m_iLastIDR ( 0 ) … … 112 116 , m_iViewOrderIdx ( 0 ) 113 117 #endif 118 #if LGE_ILLUCOMP_B0045 119 , m_bApplyIC ( false ) 120 #endif 114 121 #if VSP_CFG 115 122 , m_uiNumVspRefPics ( 0 ) … … 146 153 resetWpScalingLC(m_weightPredTableLC); 147 154 initWpAcDcParam(); 155 #if QC_IV_AS_LT_B0046 156 for(Int iNumCount = 0; iNumCount < MAX_NUM_REF+1; iNumCount++) 157 { 158 m_bWasLongTerm[0][iNumCount] = false; 159 m_bWasLongTerm[1][iNumCount] = false; 160 } 161 #endif 148 162 149 163 #if VSP_SLICE_HEADER … … 507 521 { 508 522 pcRefPic = xGetInterViewRefPic( rapcInterViewRefPics, getViewId() + m_pcSPS->getUsableInterViewRef(i) ); 523 #if QC_IV_AS_LT_B0046 524 pcRefPic->setIsLongTerm( 1 ); 525 #else 509 526 pcRefPic->setIsLongTerm( 0 ); 527 #endif 510 528 pcRefPic->getPicYuvRec()->extendPicBorder(); 511 529 RefPicSetIvCurr[NumPocIvCurr] = pcRefPic; … … 590 608 #endif 591 609 } 610 #if QC_IV_AS_LT_B0046 611 setWasLongTerm(m_apcRefPicList[0][cIdx]->getIsLongTerm(), REF_PIC_LIST_0, cIdx); 612 #endif 592 613 #else 593 614 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; 615 #if QC_IV_AS_LT_B0046 616 setWasLongTerm(m_apcRefPicList[0][cIdx]->getIsLongTerm(), REF_PIC_LIST_0, cIdx); 617 #endif 594 618 #endif 595 619 } … … 630 654 #endif 631 655 } 656 #if QC_IV_AS_LT_B0046 657 setWasLongTerm(m_apcRefPicList[1][cIdx]->getIsLongTerm(), REF_PIC_LIST_1, cIdx); 658 #endif 632 659 #else 633 660 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; 661 #if QC_IV_AS_LT_B0046 662 setWasLongTerm(m_apcRefPicList[1][cIdx]->getIsLongTerm(), REF_PIC_LIST_1, cIdx); 663 #endif 634 664 #endif 635 665 } … … 985 1015 for(i=0;i<pReferencePictureSet->getNumberOfPositivePictures()+pReferencePictureSet->getNumberOfNegativePictures();i++) 986 1016 { 1017 #if QC_IV_AS_LT_B0046 1018 if( rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i)) 1019 #else 987 1020 if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i)) 1021 #endif 988 1022 { 989 1023 isReference = 1; … … 995 1029 for(;i<pReferencePictureSet->getNumberOfPictures();i++) 996 1030 { 1031 #if QC_IV_AS_LT_B0046 1032 if( (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) 1033 #else 997 1034 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) == pReferencePictureSet->getPOC(i)%(1<<rpcPic->getPicSym()->getSlice(0)->getSPS()->getBitsForPOC())) 1035 #endif 998 1036 { 999 1037 isReference = 1; … … 1417 1455 } 1418 1456 1457 #if LGE_ILLUCOMP_B0045 1458 Void TComSlice::xSetApplyIC() // comment (S.Shimizu): better to support multiple inter-view reference frames (= write one flag for each inter-view reference frame including VSP ref)? 1459 { 1460 Int iMaxPelValue = (1<<g_uiBitDepth); 1461 Int *aiRefOrgHist; 1462 Int *aiCurrHist; 1463 aiRefOrgHist = new Int; 1464 aiCurrHist = new Int; 1465 aiRefOrgHist = (Int *)xMalloc(Int,iMaxPelValue); 1466 aiCurrHist = (Int *)xMalloc(Int,iMaxPelValue); 1467 memset(aiRefOrgHist, 0, iMaxPelValue*sizeof(Int) ); 1468 memset(aiCurrHist, 0, iMaxPelValue*sizeof(Int) ); 1469 // Reference Idx Number 1470 Int iNumRefIdx = getNumRefIdx( REF_PIC_LIST_0 ); 1471 TComPic* pcCurrPic = NULL; 1472 TComPic* pcRefPic = NULL; 1473 TComPicYuv* pcCurrPicYuv = NULL; 1474 TComPicYuv* pcRefPicYuvOrg = NULL; 1475 pcCurrPic = getPic(); 1476 pcCurrPicYuv = pcCurrPic->getPicYuvOrg(); 1477 Int iWidth = pcCurrPicYuv->getWidth(); 1478 Int iHeight = pcCurrPicYuv->getHeight(); 1479 1480 1481 // Get InterView Reference picture 1482 // !!!!! Assume only one Interview Reference Picture in L0 1483 for (Int i = 0; i < iNumRefIdx; i++) 1484 { 1485 pcRefPic = getRefPic( REF_PIC_LIST_0, i); 1486 if (pcRefPic != NULL) 1487 { 1488 // Current Picture 1489 if (pcCurrPic->getViewId() != pcRefPic->getViewId()) 1490 { 1491 pcRefPicYuvOrg = pcRefPic->getPicYuvOrg(); 1492 } 1493 } 1494 } 1495 if (pcRefPicYuvOrg != NULL) 1496 { 1497 Pel* pCurrY = pcCurrPicYuv ->getLumaAddr(); 1498 Pel* pRefOrgY = pcRefPicYuvOrg ->getLumaAddr(); 1499 Int iCurrStride = pcCurrPicYuv->getStride(); 1500 Int iRefStride = pcRefPicYuvOrg->getStride(); 1501 Int iSumOrgSAD = 0; 1502 double dThresholdOrgSAD = 0.05; 1503 // Histogram building - luminance 1504 for ( Int y = 0; y < iHeight; y++) 1505 { 1506 for ( Int x = 0; x < iWidth; x++) 1507 { 1508 aiCurrHist[pCurrY[x]]++; 1509 aiRefOrgHist[pRefOrgY[x]]++; 1510 } 1511 pCurrY += iCurrStride; 1512 pRefOrgY += iRefStride; 1513 } 1514 // Calc SAD 1515 for (Int i = 0; i < iMaxPelValue; i++) 1516 { 1517 iSumOrgSAD += abs(aiCurrHist[i] - aiRefOrgHist[i]); 1518 } 1519 // Setting 1520 if ( iSumOrgSAD > Int(dThresholdOrgSAD * iWidth * iHeight) ) 1521 { 1522 m_bApplyIC = true; 1523 } 1524 else 1525 { 1526 m_bApplyIC = false; 1527 } 1528 } 1529 xFree(aiCurrHist); 1530 xFree(aiRefOrgHist); 1531 aiCurrHist = NULL; 1532 aiRefOrgHist = NULL; 1533 } 1534 #endif 1535 1419 1536 // ------------------------------------------------------------------------------------------------ 1420 1537 // Video parameter set (VPS) 1421 1538 // ------------------------------------------------------------------------------------------------ 1539 #if QC_MVHEVC_B0046 1540 TComVPS::TComVPS() 1541 : m_VPSId ( 0) 1542 , m_uiMaxTLayers ( 1) 1543 , m_uiMaxLayers ( 1) 1544 , m_bTemporalIdNestingFlag (false) 1545 , m_uiNumHRDParameter ( 0) 1546 , m_numAddiLayerOperationPoints (2) 1547 , m_numAddiProLevelSets ( 1) 1548 { 1549 for( Int i = 0; i < MAX_LAYER_NUM; i++) 1550 { 1551 m_numOpLayerIdMinus1[i] = 0; 1552 if(i) 1553 m_numDirectRefLayer[i] = 1; 1554 else 1555 m_numDirectRefLayer[i] = 0; 1556 for( Int j = 0; j < MAX_LAYER_NUM; j++) 1557 { 1558 m_numDirectRefID[i][j] = 0; 1559 m_numOpLayerId[i][j] = 0; 1560 } 1561 m_uiViewId[i] = 0; 1562 m_iViewOrderIdx[i] = 0; 1563 } 1564 1565 for( Int i = 0; i < MAX_TLAYER; i++) 1566 { 1567 m_numReorderPics[i] = 0; 1568 m_uiMaxDecPicBuffering[i] = 0; 1569 m_uiMaxLatencyIncrease[i] = 0; 1570 } 1571 } 1572 1573 TComVPS::~TComVPS() 1574 { 1575 } 1576 #else 1422 1577 #if VIDYO_VPS_INTEGRATION 1423 1578 TComVPS::TComVPS() … … 1452 1607 1453 1608 #endif 1454 1609 #endif 1455 1610 1456 1611 // ------------------------------------------------------------------------------------------------ … … 1459 1614 1460 1615 TComSPS::TComSPS() 1461 #if VIDYO_VPS_INTEGRATION 1616 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1462 1617 : m_VPSId ( 0) 1463 1618 , m_SPSId ( 0) … … 1511 1666 , m_bLCMod (false) 1512 1667 #if H0412_REF_PIC_LIST_RESTRICTION 1668 #if QC_MVHEVC_B0046 1669 , m_restrictedRefPicListsFlag ( 0) 1670 #else 1513 1671 , m_restrictedRefPicListsFlag ( 1) 1672 #endif 1514 1673 , m_listsModificationPresentFlag( 0) 1515 1674 #endif … … 1553 1712 , m_bUseDMM (false) 1554 1713 #endif 1555 #if OL_DEPTHLIMIT_A0044 1556 , m_bDepthPartitionLimiting (false) 1714 #if FLEX_CODING_ORDER_M23723 && HHI_DMM_PRED_TEX 1715 , m_bUseDMM34 (false) 1716 #endif 1717 #if OL_QTLIMIT_PREDCODING_B0068 1718 , m_bUseQTLPC (false) 1557 1719 #endif 1558 1720 #if VSP_N … … 1561 1723 , m_bVspDepthPresentFlag (false) 1562 1724 #endif 1725 , m_bIsFirstInView (false) 1563 1726 #endif 1564 1727 { … … 1593 1756 1594 1757 ::memset( m_aiUsableInterViewRefs, 0, sizeof( m_aiUsableInterViewRefs ) ); 1758 1759 #if RWTH_SDC_DLT_B0036 1760 m_bUseDLT = false; 1761 1762 m_uiBitsPerDepthValue = g_uiBitDepth; 1763 m_uiNumDepthmapValues = 0; 1764 m_uiDepthValue2Idx = NULL; 1765 m_uiIdx2DepthValue = NULL; 1766 #endif 1595 1767 } 1596 1768 … … 1608 1780 } 1609 1781 } 1782 1783 #if RWTH_SDC_DLT_B0036 1784 Void TComSPS::setDepthLUTs(UInt* uidx2DepthValue, UInt uiNumDepthValues) 1785 { 1786 UInt uiMaxDepthValue = g_uiIBDI_MAX; 1787 1788 // allocate some memory 1789 if( m_uiNumDepthmapValues == 0 ) 1790 { 1791 m_uiNumDepthmapValues = uiMaxDepthValue+1; 1792 m_uiBitsPerDepthValue = (UInt)ceil(Log2(m_uiNumDepthmapValues)); 1793 1794 m_uiDepthValue2Idx = (UInt*) xMalloc(UInt, m_uiNumDepthmapValues); 1795 m_uiIdx2DepthValue = (UInt*) xMalloc(UInt, m_uiNumDepthmapValues); 1796 1797 //default mapping 1798 for (Int i=0; i<m_uiNumDepthmapValues; i++) 1799 { 1800 m_uiDepthValue2Idx[i] = i; 1801 m_uiIdx2DepthValue[i] = i; 1802 } 1803 } 1804 1805 if( uidx2DepthValue == NULL || uiNumDepthValues == 0 ) // default mapping only 1806 return; 1807 1808 // copy idx2DepthValue to internal array 1809 memcpy(m_uiIdx2DepthValue, uidx2DepthValue, uiNumDepthValues*sizeof(UInt)); 1810 1811 for(Int p=0; p<=uiMaxDepthValue; p++) 1812 { 1813 Int iIdxDown = 0; 1814 Int iIdxUp = uiNumDepthValues-1; 1815 Bool bFound = false; 1816 1817 // iterate over indices to find lower closest depth 1818 Int i = 1; 1819 while(!bFound && i<uiNumDepthValues) 1820 { 1821 if( m_uiIdx2DepthValue[i] > p ) 1822 { 1823 iIdxDown = i-1; 1824 bFound = true; 1825 } 1826 1827 i++; 1828 } 1829 // iterate over indices to find upper closest depth 1830 i = uiNumDepthValues-2; 1831 bFound = false; 1832 while(!bFound && i>=0) 1833 { 1834 if( m_uiIdx2DepthValue[i] < p ) 1835 { 1836 iIdxUp = i+1; 1837 bFound = true; 1838 } 1839 1840 i--; 1841 } 1842 1843 // assert monotony 1844 assert(iIdxDown<=iIdxUp); 1845 1846 // assign closer depth value/idx 1847 if( abs(p-(Int)m_uiIdx2DepthValue[iIdxDown]) < abs(p-(Int)m_uiIdx2DepthValue[iIdxUp]) ) 1848 { 1849 m_uiDepthValue2Idx[p] = iIdxDown; 1850 } 1851 else 1852 { 1853 m_uiDepthValue2Idx[p] = iIdxUp; 1854 } 1855 1856 } 1857 1858 // update globals 1859 m_uiNumDepthmapValues = uiNumDepthValues; 1860 m_uiBitsPerDepthValue = (UInt)ceil(Log2(m_uiNumDepthmapValues)); 1861 } 1862 #endif 1610 1863 1611 1864 TComPPS::TComPPS() … … 1650 1903 , m_cabacInitPresentFlag (false) 1651 1904 , m_encCABACTableIdx (0) 1652 #if POZNAN_CABAC_INIT_FLAG_FIX1905 #if FIX_POZNAN_CABAC_INIT_FLAG 1653 1906 , m_encPrevPOC (0) 1654 1907 #endif … … 1680 1933 TComSPS::initMultiviewSPS( UInt uiViewId, Int iViewOrderIdx, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 1681 1934 { 1935 #if !QC_MVHEVC_B0046 1682 1936 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); 1683 1937 AOT( uiViewId != 0 && iViewOrderIdx == 0 ); 1684 1938 AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 1685 1939 #endif 1686 1940 m_uiViewId = uiViewId; 1687 1941 m_iViewOrderIdx = iViewOrderIdx; … … 1691 1945 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 1692 1946 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1947 #if !QC_MVHEVC_B0046 1693 1948 if( !m_bCamParInSliceHeader ) 1694 1949 { … … 1701 1956 } 1702 1957 } 1958 #endif 1703 1959 } 1704 1960 … … 1717 1973 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 1718 1974 } 1975 1976 #if VSP_N 1977 Void 1978 TComSPS::initMultiviewSPSFlex( UInt uiViewId, Int iViewOrderIdx, Bool bDepth, Bool bPresent, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 1979 { 1980 AOT( uiViewId == 0 && iViewOrderIdx != 0 ); 1981 AOT( uiViewId != 0 && iViewOrderIdx == 0 ); 1982 //AOT( uiViewId != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 1983 1984 m_uiViewId = uiViewId; 1985 m_iViewOrderIdx = iViewOrderIdx; 1986 m_bDepth = bDepth; 1987 m_uiCamParPrecision = ( m_uiViewId && bPresent ? uiCamParPrecision : 0 ); 1988 m_bCamParInSliceHeader = ( m_uiViewId && bPresent ? bCamParSlice : false ); 1989 if( bPresent && !m_bCamParInSliceHeader ) 1990 { 1991 for( UInt uiBaseViewId = 0; uiBaseViewId < m_uiViewId; uiBaseViewId++ ) 1992 { 1993 m_aaiCodedScale [ 0 ][ uiBaseViewId ] = aaiScale [ uiBaseViewId ][ m_uiViewId ]; 1994 m_aaiCodedScale [ 1 ][ uiBaseViewId ] = aaiScale [ m_uiViewId ][ uiBaseViewId ]; 1995 m_aaiCodedOffset[ 0 ][ uiBaseViewId ] = aaiOffset[ uiBaseViewId ][ m_uiViewId ]; 1996 m_aaiCodedOffset[ 1 ][ uiBaseViewId ] = aaiOffset[ m_uiViewId ][ uiBaseViewId ]; 1997 } 1998 } 1999 } 2000 2001 Void 2002 TComSPS::copyCameraParameterPre( UInt uiCamParPrecision, Bool bCamParSlice ) 2003 { 2004 m_uiCamParPrecision = uiCamParPrecision; 2005 m_bCamParInSliceHeader = bCamParSlice; 2006 } 2007 Void 2008 TComSPS::copyCameraParameterPost( Int* aiScale0, Int* aiScale1, Int* aiOffset0, Int* aiOffset1 ) 2009 { 2010 if( !m_bCamParInSliceHeader ) 2011 { 2012 for( UInt uiBaseViewId = 0; uiBaseViewId < m_uiViewId; uiBaseViewId++ ) 2013 { 2014 m_aaiCodedScale [ 0 ][ uiBaseViewId ] = aiScale0 [ uiBaseViewId ]; 2015 m_aaiCodedScale [ 1 ][ uiBaseViewId ] = aiScale1 [ uiBaseViewId ]; 2016 m_aaiCodedOffset[ 0 ][ uiBaseViewId ] = aiOffset0[ uiBaseViewId ]; 2017 m_aaiCodedOffset[ 1 ][ uiBaseViewId ] = aiOffset1[ uiBaseViewId ]; 2018 } 2019 } 2020 } 2021 #endif 1719 2022 1720 2023 #if DEPTH_MAP_GENERATION … … 2320 2623 , m_ppsMap(MAX_NUM_PPS) 2321 2624 , m_apsMap(MAX_NUM_APS) 2322 #if VIDYO_VPS_INTEGRATION 2625 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 2323 2626 , m_vpsMap(MAX_NUM_VPS) 2324 2627 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.h
r193 r213 144 144 #endif 145 145 146 #if VIDYO_VPS_INTEGRATION 146 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 147 147 /// VPS class 148 148 … … 156 156 157 157 UInt m_uiExtensionType; 158 158 #if !QC_MVHEVC_B0046 159 159 Bool m_bDependentFlag[MAX_LAYER_NUM]; 160 #else 161 UInt m_uiNumHRDParameter; 162 UInt m_numAddiLayerOperationPoints; 163 UInt m_numAddiProLevelSets; 164 UInt m_numDirectRefLayer[MAX_LAYER_NUM]; 165 UInt m_numDirectRefID[MAX_LAYER_NUM][MAX_LAYER_NUM]; 166 UInt m_numOpLayerIdMinus1[MAX_LAYER_NUM]; 167 UInt m_numOpLayerId[MAX_LAYER_NUM][MAX_LAYER_NUM]; 168 #endif 160 169 UInt m_uiViewId[MAX_LAYER_NUM]; 170 #if !QC_MVHEVC_B0046 161 171 Bool m_bDepthFlag[MAX_LAYER_NUM]; 172 #endif 162 173 Int m_iViewOrderIdx[MAX_LAYER_NUM]; 174 #if !QC_MVHEVC_B0046 163 175 UInt m_uiDependentLayer[MAX_LAYER_NUM]; 176 #endif 164 177 165 178 UInt m_numReorderPics[MAX_TLAYER]; … … 182 195 Bool getTemporalNestingFlag () { return m_uiMaxLayers; } 183 196 Void setTemporalNestingFlag (UInt t) { m_bTemporalIdNestingFlag = t; } 184 197 #if !QC_MVHEVC_B0046 185 198 Void setExtensionType(UInt v) { m_uiExtensionType = v; } 186 199 UInt getExtensionType() { return m_uiExtensionType; } … … 188 201 Void setDependentFlag(Bool d, UInt layer) { m_bDependentFlag[layer] = d; } 189 202 Bool getDependentFlag(UInt layer) { return m_bDependentFlag[layer]; } 190 203 #endif 191 204 Void setViewId(UInt v, UInt layer) { m_uiViewId[layer] = v; } 192 205 UInt getViewId(UInt layer) { return m_uiViewId[layer]; } 193 206 #if !QC_MVHEVC_B0046 194 207 Void setDepthFlag(Bool d, UInt layer) { m_bDepthFlag[layer] = d; } 195 208 Bool getDepthFlag(UInt layer) { return m_bDepthFlag[layer]; } 196 209 #endif 197 210 Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx[layer] = v; } 198 211 Int getViewOrderIdx(UInt layer) { return m_iViewOrderIdx[layer]; } 199 212 #if !QC_MVHEVC_B0046 200 213 Void setDependentLayer(UInt v, UInt layer) { m_uiDependentLayer[layer] = v; } 201 214 UInt getDependentLayer(UInt layer) { return m_uiDependentLayer[layer]; } 202 215 #endif 203 216 Void setNumReorderPics(UInt v, UInt tLayer) { m_numReorderPics[tLayer] = v; } 204 217 UInt getNumReorderPics(UInt tLayer) { return m_numReorderPics[tLayer]; } … … 209 222 Void setMaxLatencyIncrease(UInt v, UInt tLayer) { m_uiMaxLatencyIncrease[tLayer] = v; } 210 223 UInt getMaxLatencyIncrease(UInt tLayer) { return m_uiMaxLatencyIncrease[tLayer]; } 211 224 #if QC_MVHEVC_B0046 225 Void setNumHRDParameters(UInt n) { m_uiNumHRDParameter = n; } 226 UInt getNumHRDParameters() { return m_uiNumHRDParameter; } 227 Void setNumDirectRefLayer(UInt n, UInt layer) { m_numDirectRefLayer[layer] = n; }; 228 UInt getNumDirectRefLayer(UInt layer) { return m_numDirectRefLayer[layer]; }; 229 Void setDirectRefLayerId (UInt n, UInt layer, UInt refId) { m_numDirectRefID[layer][refId] = n; assert(refId < MAX_NUM_REF ); }; 230 UInt getDirectRefLayerId ( UInt layer, UInt refId) { return m_numDirectRefID[layer][refId]; }; 231 UInt getNumAddiLayerOperationPoints( ) { return m_numAddiLayerOperationPoints; }; 232 Void setNumAddiLayerOperationPoints(UInt n) { m_numAddiLayerOperationPoints = n; }; 233 Void setNumAddiProLevelSets (UInt n) { m_numAddiProLevelSets = n;} 234 UInt getNumAddiProLevelSets ( ) { return m_numAddiProLevelSets;} 235 236 Void setNumOpLayerIdMinus1 (UInt n, UInt layer) { m_numOpLayerIdMinus1[layer] = n;} 237 UInt getNumOpLayerIdMinus1 (UInt layer ) { return m_numOpLayerIdMinus1[layer];} 238 239 Void setNumOpLayerId (UInt n, UInt layer, UInt OpId) { m_numOpLayerId[layer][OpId] = n;} 240 UInt getNumOpLayerId (UInt layer, UInt OpId ) { return m_numOpLayerId[layer][OpId];} 241 242 #endif 212 243 }; 213 244 … … 218 249 { 219 250 private: 220 #if VIDYO_VPS_INTEGRATION 251 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 221 252 Int m_VPSId; 222 253 #endif … … 323 354 Bool m_bUseMVI; 324 355 #endif 356 357 #if RWTH_SDC_DLT_B0036 358 Bool m_bUseDLT; 359 360 UInt m_uiBitsPerDepthValue; 361 UInt m_uiNumDepthmapValues; 362 UInt* m_uiDepthValue2Idx; 363 UInt* m_uiIdx2DepthValue; 364 #endif 325 365 326 366 Bool m_bLFCrossTileBoundaryFlag; … … 354 394 #endif 355 395 356 #if OL_DEPTHLIMIT_A0044 357 Bool m_bDepthPartitionLimiting; 396 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 397 Bool m_bUseDMM34; 398 #endif 399 400 #if OL_QTLIMIT_PREDCODING_B0068 401 Bool m_bUseQTLPC; 358 402 #endif 359 403 … … 384 428 Bool m_bVspDepthPresentFlag; 385 429 #endif 430 Bool m_bIsFirstInView; 386 431 #endif 387 432 … … 389 434 TComSPS(); 390 435 virtual ~TComSPS(); 391 #if VIDYO_VPS_INTEGRATION 436 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 392 437 Int getVPSId () { return m_VPSId; } 393 438 Void setVPSId (Int i) { m_VPSId = i; } … … 554 599 Bool getUseMVI () {return m_bUseMVI;} 555 600 #endif 601 602 #if RWTH_SDC_DLT_B0036 603 Bool getUseDLT () { return m_bUseDLT; } 604 Void setUseDLT ( Bool b ) { m_bUseDLT = b; } 605 606 UInt getBitsPerDepthValue() { return m_bUseDLT?m_uiBitsPerDepthValue:g_uiBitDepth; } 607 UInt getNumDepthValues() { return m_bUseDLT?m_uiNumDepthmapValues:g_uiIBDI_MAX; } 608 UInt depthValue2idx(Pel uiValue) { return m_bUseDLT?m_uiDepthValue2Idx[uiValue]:uiValue; } 609 Pel idx2DepthValue(UInt uiIdx) { return m_bUseDLT?m_uiIdx2DepthValue[uiIdx]:uiIdx; } 610 Void setDepthLUTs (UInt* uidx2DepthValue = NULL, UInt uiNumDepthValues = 0); 611 #endif 556 612 557 613 UInt getMaxTLayers() { return m_uiMaxTLayers; } … … 630 686 #endif 631 687 632 #if OL_DEPTHLIMIT_A0044 633 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 634 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 688 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 689 Bool getUseDMM34() { return m_bUseDMM34; } 690 Void setUseDMM34( Bool b ) { m_bUseDMM34 = b; } 691 #endif 692 693 #if OL_QTLIMIT_PREDCODING_B0068 694 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 695 Bool getUseQTLPC() { return m_bUseQTLPC; } 635 696 #endif 636 697 637 698 Void initMultiviewSPS ( UInt uiViewId, Int iViewOrderIdx = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 638 699 Void initMultiviewSPSDepth ( UInt uiViewId, Int iViewOrderIdx ); 700 #if VSP_N 701 Void initMultiviewSPSFlex ( UInt uiViewId, Int iViewOrderIdx, Bool bDepth, Bool bPresent = 0, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 ); 702 #endif 639 703 640 704 UInt getViewId () { return m_uiViewId; } … … 686 750 Bool getVspDepthPresentFlag() { return m_bVspDepthPresentFlag; } 687 751 #endif 752 Void setIsFirstInView( Bool b ) { m_bIsFirstInView = b; } 753 Bool getIsFirstInView() { return m_bIsFirstInView; } 754 Void copyCameraParameterPre( UInt uiCamParPrecision, Bool bCamParSlice ); 755 Void copyCameraParameterPost( Int* aiScale0, Int* aiScale1, Int* aiOffset0, Int* aiOffset1 ); 688 756 #endif 689 757 }; … … 879 947 Bool m_cabacInitPresentFlag; 880 948 UInt m_encCABACTableIdx; // Used to transmit table selection across slices 881 #if POZNAN_CABAC_INIT_FLAG_FIX949 #if FIX_POZNAN_CABAC_INIT_FLAG 882 950 UInt m_encPrevPOC; 883 951 #endif … … 1014 1082 Bool getCabacInitPresentFlag() { return m_cabacInitPresentFlag; } 1015 1083 UInt getEncCABACTableIdx() { return m_encCABACTableIdx; } 1016 #if POZNAN_CABAC_INIT_FLAG_FIX1084 #if FIX_POZNAN_CABAC_INIT_FLAG 1017 1085 Void setEncPrevPOC(UInt uiPOC) { m_encPrevPOC = uiPOC; } 1018 1086 UInt getEncPrevPOC() { return m_encPrevPOC; } … … 1217 1285 1218 1286 // access channel 1219 #if VIDYO_VPS_INTEGRATION 1287 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1220 1288 TComVPS* m_pcVPS; 1289 #endif 1290 #if QC_IV_AS_LT_B0046 1291 Bool m_bWasLongTerm[2][MAX_NUM_REF+1]; //was long-term picture 1221 1292 #endif 1222 1293 TComSPS* m_pcSPS; … … 1293 1364 Int m_aaiCodedOffset[2][MAX_VIEW_NUM]; 1294 1365 1295 #if SONY_COLPIC_AVAILABILITY 1366 #if SONY_COLPIC_AVAILABILITY|QC_MVHEVC_B0046|VSP_N 1296 1367 Int m_iViewOrderIdx; 1368 #endif 1369 #if LGE_ILLUCOMP_B0045 1370 Bool m_bApplyIC; 1297 1371 #endif 1298 1372 … … 1318 1392 Void initTiles(); 1319 1393 1320 #if VIDYO_VPS_INTEGRATION 1394 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1321 1395 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1322 1396 TComVPS* getVPS () { return m_pcVPS; } 1323 1397 #endif 1398 #if QC_IV_AS_LT_B0046 1399 Void setWasLongTerm( Bool lt, RefPicList e, Int iRefIdx ) { m_bWasLongTerm[e][iRefIdx] = lt; } 1400 Bool getWasLongTerm( RefPicList e, Int iRefIdx ) { return m_bWasLongTerm[e][iRefIdx] ; } 1401 #endif 1402 1324 1403 Void setSPS ( TComSPS* pcSPS ) { m_pcSPS = pcSPS; } 1325 1404 TComSPS* getSPS () { return m_pcSPS; } … … 1389 1468 Int getRefViewId ( RefPicList e, Int iRefIdx) { return m_aiRefViewIdList[e][iRefIdx]; } 1390 1469 TComPic* getTexturePic () const { return m_pcTexturePic; } 1391 #if SONY_COLPIC_AVAILABILITY 1470 #if SONY_COLPIC_AVAILABILITY || VSP_N 1392 1471 Int getViewOrderIdx () { return m_iViewOrderIdx; } 1393 1472 #endif … … 1441 1520 Void setRefViewId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefViewIdList[e][iRefIdx] = i; } 1442 1521 Void setTexturePic ( TComPic *pcTexturePic ) { m_pcTexturePic = pcTexturePic; } 1443 #if SONY_COLPIC_AVAILABILITY 1522 #if SONY_COLPIC_AVAILABILITY || VSP_N 1444 1523 Void setViewOrderIdx ( Int i ) { m_iViewOrderIdx = i; } 1445 1524 #endif … … 1598 1677 Void setViewId( Int viewId ) { m_viewId = viewId; } 1599 1678 Int getViewId() { return m_viewId; } 1679 #if QC_MVHEVC_B0046 1680 Void setViewOrderIdx(Int v, UInt layer) { m_iViewOrderIdx = v; } 1681 Int getViewOrderIdx() { return m_iViewOrderIdx; } 1682 #endif 1600 1683 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 1601 1684 Bool getIsDepth() { return m_isDepth; } … … 1607 1690 Int* getInvCodedScale () { return m_aaiCodedScale [1]; } 1608 1691 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1692 1693 #if LGE_ILLUCOMP_B0045 1694 Void setApplyIC ( Bool b ) { m_bApplyIC = b; } 1695 Bool getApplyIC () { return m_bApplyIC; } 1696 Void xSetApplyIC (); 1697 #endif 1609 1698 1610 1699 #if FORCE_REF_VSP … … 1679 1768 } 1680 1769 1770 #if QC_MVHEVC_B0046 1771 Void clearPSList() 1772 { 1773 m_paramsetMap.clear(); 1774 } 1775 #endif 1681 1776 private: 1682 1777 std::map<Int,T *> m_paramsetMap; … … 1689 1784 ParameterSetManager(); 1690 1785 virtual ~ParameterSetManager(); 1691 #if VIDYO_VPS_INTEGRATION 1786 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1692 1787 //! store video parameter set and take ownership of it 1693 1788 Void storeVPS(TComVPS *vps) { m_vpsMap.storePS( vps->getVPSId(), vps); }; … … 1695 1790 TComVPS* getVPS(Int vpsId) { return m_vpsMap.getPS(vpsId); }; 1696 1791 TComVPS* getFirstVPS() { return m_vpsMap.getFirstPS(); }; 1792 #if QC_MVHEVC_B0046 1793 Void clearVPS() { m_vpsMap.clearPSList(); }; 1794 Void clearSPS() { m_spsMap.clearPSList(); }; 1795 Void clearPPS() { m_ppsMap.clearPSList(); }; 1796 #endif 1697 1797 #endif 1698 1798 //! store sequence parameter set and take ownership of it … … 1717 1817 ParameterSetMap<TComPPS> m_ppsMap; 1718 1818 ParameterSetMap<TComAPS> m_apsMap; 1719 #if VIDYO_VPS_INTEGRATION 1819 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1720 1820 ParameterSetMap<TComVPS> m_vpsMap; 1721 1821 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
r56 r213 52 52 m_uhOri ( 0 ), 53 53 m_eWedgeRes( FULL_PEL ) 54 #if HHIQC_DMMFASTSEARCH_B0039 55 , m_bIsCoarse( false ) 56 #endif 54 57 { 55 58 create( uiWidth, uiHeight ); … … 62 65 m_uhOri ( rcWedge.m_uhOri ), 63 66 m_eWedgeRes( rcWedge.m_eWedgeRes ), 67 #if HHIQC_DMMFASTSEARCH_B0039 68 m_bIsCoarse( rcWedge.m_bIsCoarse ), 69 m_uiAng ( rcWedge.m_uiAng ), 70 #endif 64 71 m_uiWidth ( rcWedge.m_uiWidth ), 65 72 m_uiHeight ( rcWedge.m_uiHeight ), … … 94 101 } 95 102 103 #if HHIQC_DMMFASTSEARCH_B0039 104 Void TComWedgelet::findClosetAngle() 105 { 106 UInt uiAng=0,uiOptAng=0; 107 UInt uiMinD=MAX_UINT; 108 UInt uiTmpD=0; 109 Int angTable[9] = {0, 2, 5, 9, 13, 17, 21, 26, 32}; 110 111 UChar uhXs = m_uhXs; 112 UChar uhYs = m_uhYs; 113 UChar uhXe = m_uhXe; 114 UChar uhYe = m_uhYe; 115 116 for(uiAng=2; uiAng<=34; uiAng++) 117 { 118 Int iSign = (uiAng<VER_IDX && uiAng>HOR_IDX ) ? -1 : 1; 119 Int iVer = uiAng>17 ? 32 : angTable[(uiAng>10) ? (uiAng-10) : (10-uiAng)]; 120 Int iHor = uiAng<19 ? 32 : angTable[(uiAng>26) ? (uiAng-26) : (26-uiAng)]; 121 122 uiTmpD = abs(iVer*iSign*(uhXs-uhXe) - iHor*(uhYe-uhYs)); 123 124 if( uiTmpD < uiMinD ) 125 { 126 uiMinD = uiTmpD; 127 uiOptAng = uiAng; 128 } 129 } 130 m_uiAng = uiOptAng; 131 } 132 133 Void TComWedgelet::setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse ) 134 #else 96 135 Void TComWedgelet::setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes ) 136 #endif 97 137 { 98 138 m_uhXs = uhXs; … … 102 142 m_uhOri = uhOri; 103 143 m_eWedgeRes = eWedgeRes; 144 #if HHIQC_DMMFASTSEARCH_B0039 145 m_bIsCoarse = bIsCoarse; 146 #endif 104 147 105 148 xGenerateWedgePattern(); … … 644 687 case( 2 ): { for( UInt iX = uiTempBlockSize-1; iX > uhXs; iX-- ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } break; 645 688 case( 3 ): { for( UInt iY = uiTempBlockSize-1; iY > uhYs; iY-- ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break; 689 #if HHIQC_DMMFASTSEARCH_B0039 690 case( 4 ): 691 { 692 if( (uhXs+uhXe) < uiTempBlockSize ) { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } 693 else { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX--; } } } 694 } 695 break; 696 case( 5 ): 697 { 698 if( (uhYs+uhYe) < uiTempBlockSize ) { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } 699 else { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = uiTempBlockSize-1; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY--; } } } 700 } 701 #else 646 702 case( 4 ): { for( UInt iY = 0; iY < uiTempBlockSize; iY++ ) { UInt iX = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iX++; } } } break; 647 703 case( 5 ): { for( UInt iX = 0; iX < uiTempBlockSize; iX++ ) { UInt iY = 0; while( pbTempPattern[(iY * iTempStride) + iX] == false ) { pbTempPattern[(iY * iTempStride) + iX] = true; iY++; } } } break; 704 #endif 648 705 } 649 706 … … 664 721 case( 2 ): { uiOffX = 1; uiOffY = 1; } break; 665 722 case( 3 ): { uiOffX = 0; uiOffY = 1; } break; 723 #if HHIQC_DMMFASTSEARCH_B0039 724 case( 4 ): 725 { 726 if( (uhXs+uhXe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; } 727 else { uiOffX = 1; uiOffY = 0; } 728 } 729 break; 730 case( 5 ): 731 { 732 if( (uhYs+uhYe) < uiTempBlockSize ) { uiOffX = 0; uiOffY = 0; } 733 else { uiOffX = 0; uiOffY = 1; } 734 } 735 break; 736 #else 666 737 case( 4 ): { uiOffX = 0; uiOffY = 0; } break; 667 738 case( 5 ): { uiOffX = 0; uiOffY = 0; } break; 739 #endif 668 740 default: { uiOffX = 0; uiOffY = 0; } break; 669 741 } … … 732 804 } 733 805 } 806 807 #if HHIQC_DMMFASTSEARCH_B0039 808 TComWedgeNode::TComWedgeNode() 809 { 810 m_uiPatternIdx = NO_IDX; 811 for( UInt uiPos = 0; uiPos < NUM_WEDGE_REFINES; uiPos++ ) 812 { 813 m_uiRefineIdx[uiPos] = NO_IDX; 814 } 815 } 816 817 UInt TComWedgeNode::getPatternIdx() 818 { 819 return m_uiPatternIdx; 820 } 821 UInt TComWedgeNode::getRefineIdx( UInt uiPos ) 822 { 823 assert( uiPos < NUM_WEDGE_REFINES ); 824 return m_uiRefineIdx[uiPos]; 825 } 826 Void TComWedgeNode::setPatternIdx( UInt uiIdx ) 827 { 828 m_uiPatternIdx = uiIdx; 829 } 830 Void TComWedgeNode::setRefineIdx( UInt uiIdx, UInt uiPos ) 831 { 832 assert( uiPos < NUM_WEDGE_REFINES ); 833 m_uiRefineIdx[uiPos] = uiIdx; 834 } 835 #endif 734 836 735 837 #if HHI_DMM_PRED_TEX -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComWedgelet.h
r193 r213 50 50 }; 51 51 52 #if HHIQC_DMMFASTSEARCH_B0039 53 #define NUM_WEDGE_REFINES 8 54 #define NO_IDX MAX_UINT 55 #endif 56 52 57 // ==================================================================================================================== 53 58 // Class definition TComWedgelet … … 62 67 UChar m_uhOri; // orientation index 63 68 WedgeResolution m_eWedgeRes; // start/end pos resolution 69 #if HHIQC_DMMFASTSEARCH_B0039 70 Bool m_bIsCoarse; 71 UInt m_uiAng; 72 #endif 64 73 65 74 UInt m_uiWidth; … … 90 99 UChar getEndY () { return m_uhYe; } 91 100 UChar getOri () { return m_uhOri; } 92 101 #if HHIQC_DMMFASTSEARCH_B0039 102 Bool getIsCoarse() { return m_bIsCoarse; } 103 UInt getAng () { return m_uiAng; } 104 Void findClosetAngle(); 105 106 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes, Bool bIsCoarse = false ); 107 #else 93 108 Void setWedgelet( UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe, UChar uhOri, WedgeResolution eWedgeRes ); 109 #endif 94 110 95 111 Bool checkNotPlain(); … … 136 152 // type definition wedgelet reference list 137 153 typedef std::vector<TComWedgeRef> WedgeRefList; 154 155 #if HHIQC_DMMFASTSEARCH_B0039 156 // ==================================================================================================================== 157 // Class definition TComWedgeNode 158 // ==================================================================================================================== 159 class TComWedgeNode 160 { 161 private: 162 UInt m_uiPatternIdx; 163 UInt m_uiRefineIdx[NUM_WEDGE_REFINES]; 164 165 public: 166 TComWedgeNode(); 167 virtual ~TComWedgeNode() {} 168 169 UInt getPatternIdx(); 170 UInt getRefineIdx ( UInt uiPos ); 171 172 Void setPatternIdx( UInt uiIdx ); 173 Void setRefineIdx ( UInt uiIdx, UInt uiPos ); 174 }; // END CLASS DEFINITION TComWedgeNode 175 176 // type definition wedgelet node list 177 typedef std::vector<TComWedgeNode> WedgeNodeList; 178 #endif 138 179 139 180 #if HHI_DMM_PRED_TEX -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComYuv.cpp
r133 r213 409 409 410 410 #if LG_RESTRICTEDRESPRED_M24766 411 void411 Void 412 412 TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset) 413 413 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TypeDef.h
r193 r213 43 43 44 44 #define VSP_N 1 45 45 46 #if VSP_N 46 47 #define VSP_BUGFIX 1 … … 51 52 #define AMVP_VSP_UNAVAILABLE 1 52 53 #endif 54 53 55 #define VSP_MERGE_POS 5 // position of vsp in merge list (0..5) 54 56 #define NTT_SUBPEL 1 57 58 #define VSP_SLICE_HEADER 1 55 59 #define VSP_CFG 1 56 #endif57 58 #define VSP_SLICE_HEADER 159 60 #if !VSP_CFG 60 61 #define VSP_FRAME_INTERVAL 2 61 62 #endif 62 63 63 #define FIXES 1 64 #define POZNAN_CABAC_INIT_FLAG_FIX 1 65 #define FIX_DECODING_WO_WRITING 1 66 #define FIX_INIT_ROM 1 67 #define FIX_VIRT_DESTRUCTOR 1 68 #define FIX_MEM_LEAKS 1 69 #define FIX_VSO_SETUP 1 70 #define FIX_COMP_WARNING_INIT 1 71 #define FIX_RDO_MACRO 1 64 #define VSP_AIC 0 65 #define VSP_TMVP 0 66 #define VSP_TMVP_ENABLE 0 67 #endif // VSP_N 68 69 70 #define NTT_FIX_UNCONSTRAINED_MVI 1 71 72 #define QC_MVHEVC_B0046 0 //JCT3V-B0046: disable 3DHEVC tools 73 #define QC_IV_AS_LT_B0046 1 //JCT3V-B0046: inter-view reference pictures are treated as long-term pictures 74 #define QC_TMVP_IDX_MOD_B0046 1 //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC 75 #define QC_REM_IDV_B0046 1 //JCT3V-B0046: removal of IDV NAL unit type 76 #define FIX_DEL_NULLPTR 1 77 #define FIX_MISUSE_REFINDEX 1 78 #define FIX_FCO_COMP_WARNING 1 79 #define DV_V_RESTRICTION_B0037 1 // JCT3V-B0037 disparity vector vertical range restriction 80 81 #if !QC_MVHEVC_B0046 82 ///// ***** FIXES ********* 83 // A 84 #define FIX_POZNAN_CABAC_INIT_FLAG 1 72 85 #define FIX_LG_RESTRICTEDRESPRED_M24766 1 73 #define FIX_REMOVE_TILE_DEPENDENCE 1 74 #define FIX_DBL_CONTROL_DEFAULT 1 75 76 77 #define LGE_EDGE_INTRA 1 // JCT2-A0070 78 #if LGE_EDGE_INTRA 86 87 // B 88 #define FIX_LGE_IVMP_PARALLEL_MERGE_B0136 1 89 #define FIX_RDO_NEGDIST 1 90 #define FIX_DMM_NEG_DIST 1 91 #define FIX_LGE_DVMCP_B0133 1 92 93 94 // FCO 95 #define FLEX_CODING_ORDER_M23723 1 96 #if FLEX_CODING_ORDER_M23723 97 #define DISABLE_FCO_FOR_VSO 0 // Optional compile settings to disable VSO with FCO. 98 #endif 99 100 ///// ***** PATCHES ********* 101 #define TMVP_DEPTH_SWITCH 1 // JCT3V-B0092 additional encoder option only 102 103 ///// ***** DEPTH MODELING MODES ********* 104 #define HHI_DMM_WEDGE_INTRA 1 // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction) 105 #define HHI_DMM_PRED_TEX 1 // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction ) 106 #define LGE_EDGE_INTRA_A0070 1 // JCT3V-A0070 107 #define RWTH_SDC_DLT_B0036 1 // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table 108 #define HHIQC_DMMFASTSEARCH_B0039 1 // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3 109 110 ///// ***** INTERVIEW MOTION VECTOR PREDICTION ********* 111 #define HHI_INTER_VIEW_MOTION_PRED 1 // inter-view motion parameter prediction 112 #define SHARP_INTERVIEW_DECOUPLE_B0111 1 // JCT3V-B0111 decoupling inter-view candidate 113 #define QC_MRG_CANS_B0048 1 // JCT3V-B0048, B0086, B0069 114 #if QC_MRG_CANS_B0048 115 #define OL_DISMV_POS_B0069 1 // different pos for disparity MV candidate, B0069 116 #endif 117 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT3V-A0049 second part 118 #if HHI_INTER_VIEW_MOTION_PRED 119 #define SAIT_IMPROV_MOTION_PRED_M24829 1 // improved inter-view motion vector prediction 120 #else 121 #define SAIT_IMPROV_MOTION_PRED_M24829 0 122 #endif 123 124 ///// ***** INTERVIEW RESIDUAL PREDICTION ********* 125 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 126 #if HHI_INTER_VIEW_RESIDUAL_PRED 127 #define LG_RESTRICTEDRESPRED_M24766 1 // restricted inter-view residual prediction 128 #define QC_SIMPLIFIEDIVRP_M24938 1 129 #else 130 #define LG_RESTRICTEDRESPRED_M24766 0 131 #define QC_SIMPLIFIEDIVRP_M24938 0 132 #endif 133 134 ///// ***** DISPARITY VECTOR DERIVATION ********* 135 #define QC_MULTI_DIS_CAN_A0097 1 // JCT3V-A0097 136 #define LGE_DVMCP_A0126 1 // JCT3V-A0126 137 #define LGE_DVMCP_MEM_REDUCTION_B0135 1 // JCT3V-B0135 138 #define DV_DERIVATION_PARALLEL_B0096 1 // JCT3V-B0096, enable parallel derivation of disparity vector 139 #define QC_SIMPLE_NBDV_B0047 1 // JCT3V-B0047 140 141 ///// ***** MOTION PARAMETER INHERITANCE ********* 142 #define HHI_MPI 1 // motion parameter inheritance from texture picture for depth map coding 143 #if HHI_MPI 144 #define FIX_MPI_B0065 1 // JCT3V-B0065, fix the MPI bug when RQT is off 145 #endif 146 #define MTK_UNCONSTRAINED_MVI_B0083 1 //JCT3V-B0083 147 148 ///// ***** VIEW SYNTHESIS OPTIMIZAION ********* 149 #define HHI_VSO 1 150 #define HHI_VSO_LS_TABLE_M23714 1 // m23714, enable table base Lagrange multiplier optimization 151 #define HHI_VSO_DIST_INT 1 // Allow negative synthesized view distortion change 152 #define HHI_VSO_COLOR_PLANES 1 // Compute VSO distortion on color planes 153 #define HHI_VSO_RM_ASSERTIONS 0 // Output VSO assertions 154 #define HHI_VSO_SYNTH_DIST_OUT 0 // Output of synthesized view distortion instead of depth distortion in encoder output 155 #define SAIT_VSO_EST_A0033 1 // JCT3V-A0033 modification 3 156 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT3V-A0093 modification 4 157 #define LGE_WVSO_A0119 1 // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term 158 159 160 ///// ***** ILLUMINATION COMPENSATON ********* 161 #define LGE_ILLUCOMP_B0045 1 // JCT2-B0045 Illumination compensation for Luma and Chroma 162 #if LGE_ILLUCOMP_B0045 163 #define LGE_ILLUCOMP_B0045_ENCSIMP 1 164 #endif 165 166 ///// ***** INTERVIEW SKIP ********* 167 #define HHI_INTERVIEW_SKIP 1 168 169 ///// ***** QUADTREE LIMITATION ********* 170 #define OL_QTLIMIT_PREDCODING_B0068 1 //JCT3V-B0068 171 172 ///// ***** OTHERS ********* 173 #define LG_ZEROINTRADEPTHRESI_A0087 1 // JCT2-A0087 174 #define SONY_COLPIC_AVAILABILITY 1 175 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps 176 #define VIDYO_VPS_INTEGRATION 1 177 178 179 180 ///// ***** DEFINED PARAMETERS ********* 181 #if QC_MULTI_DIS_CAN_A0097 182 #define DIS_CANS 1 183 #endif 184 185 #define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1 186 187 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 188 #define DMM_WEDGEMODEL_MIN_SIZE 4 189 #define DMM_WEDGEMODEL_MAX_SIZE 32 190 #define DMM_WEDGE_PREDDIR_DELTAEND_MAX 4 191 #endif 192 193 #if LGE_EDGE_INTRA_A0070 79 194 #define LGE_EDGE_INTRA_MIN_SIZE 4 80 195 #define LGE_EDGE_INTRA_MAX_SIZE 32 … … 85 200 #endif 86 201 87 #define LG_ZEROINTRADEPTHRESI_M26039 1 // JCT2-A0087 88 89 #define SONY_COLPIC_AVAILABILITY 1 90 91 #define HHI_INTER_VIEW_MOTION_PRED 1 // inter-view motion parameter prediction 92 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 93 #define QC_MULTI_DIS_CAN 1 // JCT2-A0097 94 #if QC_MULTI_DIS_CAN 95 #define DIS_CANS 1 96 #endif 97 98 #define MTK_INTERVIEW_MERGE_A0049 1 // JCT2-A0049 second part 99 100 #define LGE_DVMCP 1 // JCT2-A0126 101 #if LGE_DVMCP 202 203 #if LGE_DVMCP_A0126 102 204 #define DVFROM_LEFTBELOW 1 103 205 #define DVFROM_LEFT 2 … … 109 211 110 212 111 #define HHI_VSO 1 112 #define HHI_VSO_LS_TABLE 1 // m23714 113 #define HHI_VSO_DIST_INT 1 114 #define HHI_VSO_SYNTH_DIST_OUT 0 115 #define HHI_VSO_COLOR_PLANES 1 116 #define HHI_VSO_SPEEDUP_A0033 1 // JCT2-A0033 modification 1 (changes in classes directly related the renderer model 117 // to are not covered by this define, since nearly the entire class has been changed) 118 #define HHI_VSO_RM_ASSERTIONS 0 // output VSO assertions 119 #define HHI_VSO_SET_OPTIM 1 // remove unnecessary updates (works only with HHI_VSO_FIX 1 properly) 120 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 121 #define LGE_VSO_EARLY_SKIP_A0093 1 // JCT2-A0093 modification 4 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 130 131 #define HHI_INTERVIEW_SKIP 1 132 #define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1 133 134 #define HHI_DMM_WEDGE_INTRA 1 // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction) 135 #define HHI_DMM_PRED_TEX 1 // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction ) 136 137 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 138 #define DMM_WEDGEMODEL_MIN_SIZE 4 139 #define DMM_WEDGEMODEL_MAX_SIZE 32 140 #define DMM_WEDGE_PREDDIR_DELTAEND_MAX 4 141 #endif 142 143 #define HHI_MPI 1 // motion parameter inheritance from texture picture for depth map coding 213 #if HHIQC_DMMFASTSEARCH_B0039 214 #define DMM3_SIMPLIFY_TR 1 215 #endif 216 217 218 #if RWTH_SDC_DLT_B0036 219 #define Log2( n ) ( log((double)n) / log(2.0) ) 220 #endif 221 144 222 #define HHI_MPI_MERGE_POS 0 145 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps 146 147 #if HHI_INTER_VIEW_MOTION_PRED 148 #define SAIT_IMPROV_MOTION_PRED_M24829 1 // improved inter-view motion vector prediction 149 #else 150 #define SAIT_IMPROV_MOTION_PRED_M24829 0 151 #endif 152 153 #if HHI_INTER_VIEW_RESIDUAL_PRED 154 #define LG_RESTRICTEDRESPRED_M24766 1 // restricted inter-view residual prediction 155 #define QC_SIMPLIFIEDIVRP_M24938 1 156 #else 157 #define LG_RESTRICTEDRESPRED_M24766 0 158 #define QC_SIMPLIFIEDIVRP_M24938 0 159 #endif 160 161 223 #endif 224 ///// ***** HM 6.1 ********* 162 225 #define SKIPFRAME_BUGFIX 1 ///< bug fix to enable skipFrame at decoder 163 226 #define START_DECODING_AT_CRA 1 ///< H0496, start decoding at clear random access point … … 170 233 171 234 #define PARALLEL_MERGE 1 //< H0082 parallel merge/skip 235 #define LGE_IVMP_PARALLEL_MERGE_B0136 1 //< B0136 support of parallel merge/skip in disparity vector derivation 172 236 #define LOG2_PARALLEL_MERGE_LEVEL_MINUS2 0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64 237 173 238 #if PARALLEL_MERGE && LOG2_PARALLEL_MERGE_LEVEL_MINUS2 174 239 #define CU_BASED_MRG_CAND_LIST 1 //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0 175 #endif 240 #define FIX_CU_BASED_MRG_CAND_LIST_B0136 1 //< B0136 bug fix for CU_BASED_MRG_CAND_LIST 241 #endif 242 176 243 #define MVP_AT_ENTROPYSLICE_BOUNDARY 1 //< H0362 enable motion prediction accross entropy slice boundary 177 244 178 245 #define FAST_DECISION_FOR_MRG_RD_COST 1 ////< H0178: Fast Decision for Merge 2Nx2N RDCost 179 246 180 #define PIC_CROPPING 1 ///< Picture cropping and size constraints181 #define NAL_REF_FLAG 1 ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463)182 #define REMOVE_DIV_OPERATION 1 ///< H0238: Simplified intra horizontal and vertical filtering247 #define PIC_CROPPING 1 ///< Picture cropping and size constraints 248 #define NAL_REF_FLAG 1 ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463) 249 #define REMOVE_DIV_OPERATION 1 ///< H0238: Simplified intra horizontal and vertical filtering 183 250 #define LOGI_INTRA_NAME_3MPM 1 ///< H0407: logical Intra mode naming (sequential angular mode numbering) and 3 MPM mode coding 184 251 … … 191 258 #define MULTIBITS_DATA_HIDING 1 ///< H0481: multiple sign bit hiding 192 259 193 #define DEQUANT_CLIPPING 260 #define DEQUANT_CLIPPING 1 ///< H0312/H0541: transformed coefficients clipping before de-quantization 194 261 195 262 #define REMOVE_NON_SCALED 1 ///< H0164/H0250: Removal of non-scaled merge candidate … … 299 366 #define LOG2_SCAN_SET_SIZE 4 300 367 301 #if LGE_EDGE_INTRA 368 #if LGE_EDGE_INTRA_A0070 302 369 #if LGE_EDGE_INTRA_DELTA_DC 303 370 #define FAST_UDI_MAX_RDMODE_NUM 37 ///< maximum number of RD comparison in fast-UDI estimation loop … … 347 414 #endif 348 415 349 #if LGE_EDGE_INTRA 416 #if LGE_EDGE_INTRA_A0070 350 417 #if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX 351 418 #define EDGE_INTRA_IDX (NUM_INTRA_MODE+NUM_DMM_MODE) … … 372 439 // This is here just to perform timing tests -- OL_FLUSH_ALIGN should be 0 for WPP. 373 440 374 #define RVM_VCEGAM10_M 4441 #define RVM_VCEGAM10_M 4 375 442 376 443 #define PLANAR_IDX 0 … … 454 521 // VPS INTEGRATION 455 522 // ==================================================================================================================== 456 # define VIDYO_VPS_INTEGRATION 1523 #if !QC_MVHEVC_B0046 457 524 #if VIDYO_VPS_INTEGRATION 458 525 #define MAX_NUM_VPS 10 459 526 #endif 527 #else 528 #define MAX_NUM_VPS 1 529 #endif 530 460 531 461 532 // ==================================================================================================================== … … 739 810 }; 740 811 741 #if HHI_VSO_SPEEDUP_A0033742 812 743 813 enum BlenMod … … 749 819 BLEND_GEN = 3 750 820 }; 751 #endif752 821 753 822 /// supported prediction type -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/NALread.cpp
r165 r213 132 132 #endif 133 133 134 #if QC_MVHEVC_B0046 135 //nalu.m_layerId = bs.read(6); 136 nalu.m_layerId = bs.read(5); 137 nalu.m_temporalId = bs.read(3) - 1; 138 #else 134 139 #if H0388 135 140 nalu.m_temporalId = bs.read(3); … … 145 150 if ( nalu.m_temporalId ) 146 151 { 152 #if QC_REM_IDV_B0046 153 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR); 154 #else 147 155 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDV ); 156 #endif 148 157 } 149 158 #endif … … 154 163 case NAL_UNIT_CODED_SLICE_IDR: 155 164 #if H0566_TLA 165 #if !QC_REM_IDV_B0046 156 166 case NAL_UNIT_CODED_SLICE_IDV: 167 #endif 157 168 case NAL_UNIT_CODED_SLICE_CRA: 158 169 case NAL_UNIT_CODED_SLICE_TLA: … … 175 186 if (nalu.m_temporalId == 0) 176 187 { 188 #if QC_REM_IDV_B0046 189 assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR); 190 #else 177 191 assert(nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDV ); 192 #endif 178 193 } 179 194 else … … 190 205 } 191 206 #endif 207 #endif 192 208 } 193 209 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r193 r213 1338 1338 } 1339 1339 } 1340 1340 #if QC_MVHEVC_B0046 1341 Void TDecCavlc::parseVPS(TComVPS* pcVPS) 1342 { 1343 UInt uiCode; 1344 READ_CODE( 4, uiCode, "video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1345 READ_FLAG( uiCode, "temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1346 READ_CODE( 2, uiCode, "vps_reserved_zero_2bits" ); assert( !uiCode ); 1347 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 ); 1348 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 1349 READ_CODE( 12, uiCode, "vps_extension_offset" ); assert( !uiCode ); 1350 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 1351 { 1352 READ_UVLC( uiCode, "max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 1353 READ_UVLC( uiCode, "num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 1354 READ_UVLC( uiCode, "max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); 1355 } 1356 READ_UVLC( uiCode, "vps_num_hrd_parameters" ); pcVPS->setNumHRDParameters(uiCode); 1357 assert(pcVPS->getNumHRDParameters()==0); 1358 for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++) 1359 { 1360 // if( i > 0 ) 1361 //{ 1362 // READ_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]"); 1363 // for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 1364 // READ_UVLC(0, 6, "op_layer_id[ opIdx ][ i ]"); 1365 //} 1366 //hrd_parameters( i = = 0, vps_max_sub_layers_minus1 ); 1367 } 1368 1369 READ_CODE( 1, uiCode, "bit_equal_to_one" ); assert( uiCode ); 1370 //vps_extension_byte_alignment_reserved_one_bit 1371 xReadVPSAlignOne(); 1372 READ_CODE( 8, uiCode, "num_additional_layer_operation_points" ); pcVPS->setNumAddiLayerOperationPoints( uiCode ); 1373 READ_CODE( 8, uiCode, "num_additional_profile_level_sets" ); pcVPS->setNumAddiProLevelSets( uiCode); 1374 1375 1376 for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++) 1377 { 1378 READ_CODE( 4, uiCode, "num_types_zero_4bits[i]" ); assert( !uiCode ); 1379 READ_CODE( 4, uiCode, "type_zero_4bits[i]" ); assert( !uiCode ); 1380 READ_CODE( 8, uiCode, "view_id[i]" ); pcVPS->setViewId(uiCode, i); 1381 // WRITE_SVLC( pcVPS->getViewOrderIdx(i), "view_order_idx[i]" ); 1382 if(i) 1383 { 1384 READ_CODE( 6, uiCode, "num_direct_ref_layers[ i ]" ); pcVPS->setNumDirectRefLayer(uiCode, i); 1385 for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++) 1386 { 1387 READ_CODE( 6, uiCode, "ref_layer_id[i][j]" ); pcVPS->setDirectRefLayerId (uiCode, i, j); 1388 } 1389 } 1390 } 1391 for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++) 1392 { 1393 //profile_tier_level 1394 } 1395 for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++) 1396 { 1397 if(pcVPS->getMaxLayers() == 3) 1398 { 1399 pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1)); 1400 } 1401 else if( i==1 ) 1402 { 1403 assert(pcVPS->getNumAddiLayerOperationPoints()==1); 1404 pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1)); 1405 } 1406 READ_UVLC( uiCode, "op_num_layer_id_values_minus1[ opIdx ]" ); pcVPS->setNumOpLayerIdMinus1(uiCode, i-1); 1407 for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ ) 1408 { 1409 READ_UVLC( uiCode, "op_layer_id[ opIdx ][ i ]" ); pcVPS->setNumOpLayerId(uiCode, i-1, j); 1410 } 1411 if (pcVPS->getNumAddiProLevelSets()) 1412 { 1413 //profile_level_idx[ i ] 1414 } 1415 } 1416 return; 1417 } 1418 #else 1341 1419 #if VIDYO_VPS_INTEGRATION 1342 1420 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 1389 1467 1390 1468 #endif 1391 1469 #endif 1392 1470 #if HHI_MPI 1393 1471 Void TDecCavlc::parseSPS(TComSPS* pcSPS, Bool bIsDepth) … … 1401 1479 1402 1480 UInt uiCode; 1481 #if !QC_MVHEVC_B0046 1403 1482 Int iCode; 1404 1483 #endif 1405 1484 READ_CODE( 8, uiCode, "profile_idc" ); pcSPS->setProfileIdc( uiCode ); 1406 1485 READ_CODE( 8, uiCode, "reserved_zero_8bits" ); … … 1645 1724 #endif 1646 1725 READ_FLAG( uiCode, "sps_extension_flag"); 1726 #if !QC_MVHEVC_B0046 1647 1727 if(uiCode) 1648 1728 { … … 1674 1754 } 1675 1755 #endif 1676 1677 READ_FLAG( uiCode, "base_view_flag" ); 1756 #if OL_QTLIMIT_PREDCODING_B0068 1757 if( bIsDepth ) 1758 { 1759 READ_FLAG( uiCode, "use_qtlpc_flag" ); 1760 pcSPS->setUseQTLPC( uiCode ); 1761 } 1762 #endif 1763 1764 #if RWTH_SDC_DLT_B0036 1765 if( bIsDepth ) 1766 { 1767 READ_FLAG( uiCode, "use_dlt_flag" ); 1768 pcSPS->setUseDLT( uiCode ); 1769 if( pcSPS->getUseDLT() ) 1770 { 1771 // decode mapping 1772 UInt uiNumDepthValues; 1773 // parse number of values in DLT 1774 xReadUvlc( uiNumDepthValues ); 1775 1776 // parse actual DLT values 1777 UInt* auiIdx2DepthValue = (UInt*) calloc(uiNumDepthValues, sizeof(UInt)); 1778 for(UInt d=0; d<uiNumDepthValues; d++) 1779 { 1780 xReadUvlc( uiCode ); 1781 auiIdx2DepthValue[d] = uiCode; 1782 } 1783 1784 pcSPS->setDepthLUTs(auiIdx2DepthValue, uiNumDepthValues); 1785 1786 // clean memory 1787 free(auiIdx2DepthValue); 1788 } 1789 else 1790 pcSPS->setDepthLUTs(); 1791 } 1792 #endif 1793 1794 READ_FLAG( uiCode, "base_view_flag" ); 1678 1795 if( uiCode ) 1679 1796 { // baseview SPS -> set standard values … … 1685 1802 pcSPS->setMultiviewResPredMode ( 0 ); 1686 1803 #endif 1804 #if VSP_N 1805 pcSPS->setIsFirstInView( true ); 1806 #endif 1687 1807 } 1688 1808 else … … 1691 1811 if( uiCode ) 1692 1812 { 1813 #if VSP_N 1814 UInt uiViewId, uiCamParPrecision = 0, uiCamParPresent = 0; 1815 Int iVOI; 1816 Bool bCamParSlice = false; 1817 READ_UVLC( uiViewId, "view_id" ); 1818 READ_SVLC( iVOI, "view_order_idx" ); 1819 if( uiViewId ) 1820 { 1821 READ_FLAG( uiCamParPresent, "camera_parameter_present_flag" ); 1822 pcSPS->setIsFirstInView( (Bool)uiCamParPresent ); 1823 if( uiCamParPresent ) 1824 { 1825 READ_UVLC( uiCamParPrecision, "camera_parameter_precision" ); 1826 READ_FLAG( uiCode, "camera_parameter_in_slice_header" ); bCamParSlice = ( uiCode == 1 ); 1827 if( !bCamParSlice ) 1828 { 1829 for( UInt uiBaseId = 0; uiBaseId < uiViewId; uiBaseId++ ) 1830 { 1831 READ_SVLC( iCode, "coded_scale" ); m_aaiTempScale [ uiBaseId ][ uiViewId ] = iCode; 1832 READ_SVLC( iCode, "coded_offset" ); m_aaiTempOffset[ uiBaseId ][ uiViewId ] = iCode; 1833 READ_SVLC( iCode, "inverse_coded_scale_plus_coded_scale" ); m_aaiTempScale [ uiViewId ][ uiBaseId ] = iCode - m_aaiTempScale [ uiBaseId ][ uiViewId ]; 1834 READ_SVLC( iCode, "inverse_coded_offset_plus_coded_offset" ); m_aaiTempOffset[ uiViewId ][ uiBaseId ] = iCode - m_aaiTempOffset[ uiBaseId ][ uiViewId ]; 1835 } 1836 } 1837 pcSPS->initMultiviewSPSFlex( uiViewId, iVOI, true, (Bool)uiCamParPresent, uiCamParPrecision, bCamParSlice, (uiCamParPresent && !bCamParSlice ? m_aaiTempScale : NULL ), (uiCamParPresent && !bCamParSlice ? m_aaiTempOffset : NULL ) ); 1838 } 1839 else 1840 { 1841 pcSPS->initMultiviewSPSDepth( uiViewId, iVOI ); 1842 } 1843 } 1844 else 1845 { 1846 pcSPS->initMultiviewSPSDepth( uiViewId, iVOI ); 1847 } 1848 #if DEPTH_MAP_GENERATION 1849 pcSPS->setPredDepthMapGeneration( uiViewId, true ); 1850 #endif 1851 #else 1693 1852 READ_UVLC( uiCode, "view_id" ); 1694 1853 READ_SVLC( iCode, "view_order_idx" ); … … 1697 1856 pcSPS->setPredDepthMapGeneration( uiCode, true ); 1698 1857 #endif 1858 #endif 1699 1859 #if HHI_INTER_VIEW_RESIDUAL_PRED 1700 1860 pcSPS->setMultiviewResPredMode ( 0 ); … … 1703 1863 else 1704 1864 { 1705 UInt uiViewId, uiCamParPrecision ;1865 UInt uiViewId, uiCamParPrecision = 0, uiCamParPresent = 0; 1706 1866 Int iVOI; 1707 Bool bCamParSlice ;1867 Bool bCamParSlice = false; 1708 1868 READ_UVLC( uiViewId, "view_id" ); uiViewId++; 1709 1869 READ_SVLC( iVOI, "view_order_idx" ); 1870 #if VSP_N 1871 READ_FLAG( uiCamParPresent, "camera_parameter_present_flag" ); 1872 pcSPS->setIsFirstInView( (Bool)uiCamParPresent ); 1873 if( uiCamParPresent ) 1874 { 1875 #endif 1710 1876 READ_UVLC( uiCamParPrecision, "camera_parameter_precision" ); 1711 1877 READ_FLAG( uiCode, "camera_parameter_in_slice_header" ); bCamParSlice = ( uiCode == 1 ); … … 1720 1886 } 1721 1887 } 1888 #if VSP_N 1889 pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 1890 } 1891 else 1892 { 1893 pcSPS->initMultiviewSPSFlex( uiViewId, iVOI, false ); 1894 } 1895 #else 1722 1896 pcSPS->initMultiviewSPS( uiViewId, iVOI, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 1897 #endif 1723 1898 1724 1899 #if DEPTH_MAP_GENERATION … … 1753 1928 #endif 1754 1929 #if HHI_INTER_VIEW_RESIDUAL_PRED 1755 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode );1930 pcSPS->setMultiviewResPredMode ( uiMultiviewResPredMode ); 1756 1931 #endif 1757 1932 } … … 1780 1955 } 1781 1956 } 1957 #endif 1782 1958 } 1783 1959 … … 1820 1996 UInt address; 1821 1997 UInt innerAddress = 0; 1998 1999 #if LGE_ILLUCOMP_B0045 2000 // IC flag is on only first_slice_in_pic 2001 if (uiCode) 2002 { 2003 UInt uiCodeTmp = 0; 2004 if ( rpcSlice->getSPS()->getViewId() && !rpcSlice->getSPS()->isDepth() ) 2005 { 2006 READ_FLAG (uiCodeTmp, "applying IC flag"); 2007 } 2008 rpcSlice->setApplyIC(uiCodeTmp); 2009 } 2010 #endif 2011 1822 2012 if(!uiCode) 1823 2013 { … … 1873 2063 } 1874 2064 #endif 2065 #if QC_REM_IDV_B0046 2066 #if !QC_MVHEVC_B0046 2067 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() == 0) 2068 #else 2069 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() == 0) 2070 #endif 2071 #else 1875 2072 if(rpcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR) 2073 #endif 1876 2074 { 1877 2075 READ_UVLC( uiCode, "idr_pic_id" ); //ignored … … 1907 2105 } 1908 2106 rpcSlice->setPOC( iPOCmsb+iPOClsb ); 1909 2107 #if QC_REM_IDV_B0046 2108 #if !QC_MVHEVC_B0046 2109 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getSPS()->getViewId() && rpcSlice->getPOC() == 0 ) 2110 #else 2111 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR && rpcSlice->getViewId() && rpcSlice->getPOC() == 0 ) 2112 #endif 2113 #else 1910 2114 if( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && rpcSlice->getPOC() == 0 ) 2115 #endif 1911 2116 { 1912 2117 TComReferencePictureSet* rps = rpcSlice->getLocalRPS(); … … 2095 2300 { 2096 2301 #if H0412_REF_PIC_LIST_RESTRICTION 2302 #if QC_MVHEVC_B0046 2303 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2304 #else 2097 2305 if( !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2306 #endif 2098 2307 { 2099 2308 refPicListModification->setRefPicListModificationFlagL0( 0 ); … … 2166 2375 { 2167 2376 #if H0412_REF_PIC_LIST_RESTRICTION 2377 #if QC_MVHEVC_B0046 2378 if( !rpcSlice->getViewId() || !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2379 #else 2168 2380 if( !rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2381 #endif 2169 2382 { 2170 2383 refPicListModification->setRefPicListModificationFlagL1( 0 ); … … 2255 2468 2256 2469 #if H0412_REF_PIC_LIST_RESTRICTION 2257 if(rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2470 #if QC_MVHEVC_B0046 2471 if( rpcSlice->getViewId() && rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2472 #else 2473 if(rpcSlice->getSPS()->getListsModificationPresentFlag() ) 2474 #endif 2258 2475 { 2259 2476 #endif … … 2687 2904 } 2688 2905 2906 #if LGE_ILLUCOMP_B0045 2907 Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2908 { 2909 assert(0); 2910 } 2911 #endif 2912 2689 2913 #if FORCE_REF_VSP==1 2690 2914 Void TDecCavlc::parseVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 2899 3123 #endif 2900 3124 3125 #if RWTH_SDC_DLT_B0036 3126 Void TDecCavlc::parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3127 { 3128 assert(0); 3129 } 3130 Void TDecCavlc::parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 3131 { 3132 assert(0); 3133 } 3134 Void TDecCavlc::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) 3135 { 3136 assert(0); 3137 } 3138 #endif 3139 2901 3140 // ==================================================================================================================== 2902 3141 // Protected member functions … … 2964 3203 } 2965 3204 3205 #if QC_MVHEVC_B0046 3206 /** Parse VPS alignment one bits. 3207 * \returns Void 3208 */ 3209 Void TDecCavlc::xReadVPSAlignOne( ) 3210 { 3211 UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned(); 3212 3213 if(uiNumberOfBits) 3214 { 3215 UInt uiBits; 3216 UInt uiSymbol; 3217 3218 for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++) 3219 { 3220 xReadFlag( uiSymbol ); 3221 3222 if(!uiSymbol) 3223 { 3224 printf("\nWarning! vps_extension_byte_alignment_reserved_one_bit include a non-zero value.\n"); 3225 } 3226 } 3227 } 3228 } 3229 #endif 2966 3230 /** Parse PCM alignment zero bits. 2967 3231 * \returns Void -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r166 r213 75 75 Void xReadFlagTr ( UInt& rValue, const Char *pSymbolName); 76 76 #endif 77 77 #if QC_MVHEVC_B0046 78 Void xReadVPSAlignOne (); 79 #endif 78 80 Void xReadPCMAlignZero (); 79 81 … … 113 115 Void parseQtRootCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf ); 114 116 115 #if VIDYO_VPS_INTEGRATION 117 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 116 118 Void parseVPS ( TComVPS* pcVPS ); 117 119 #endif … … 142 144 143 145 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 146 #if LGE_ILLUCOMP_B0045 147 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 148 #endif 144 149 #if FORCE_REF_VSP==1 145 150 Void parseVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 178 183 Void parseDFFlag ( UInt& ruiVal, const Char *pSymbolName ); 179 184 Void parseDFSvlc ( Int& riVal, const Char *pSymbolName ); 185 #if RWTH_SDC_DLT_B0036 186 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 187 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 188 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 189 #endif 180 190 protected: 181 191 #if DBL_CONTROL -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r193 r213 38 38 #include "TDecCu.h" 39 39 40 #if RWTH_SDC_DLT_B0036 41 #define GetDepthValue2Idx(val) (pcCU->getSlice()->getSPS()->depthValue2idx(val)) 42 #define GetIdx2DepthValue(val) (pcCU->getSlice()->getSPS()->idx2DepthValue(val)) 43 #endif 44 40 45 //! \ingroup TLibDecoder 41 46 //! \{ … … 424 429 } 425 430 } 431 #if LGE_ILLUCOMP_B0045 432 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 433 #endif 426 434 #if HHI_MPI 427 435 } … … 505 513 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 506 514 515 #if LGE_ILLUCOMP_B0045 516 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 517 #endif 518 507 519 #if HHI_INTER_VIEW_RESIDUAL_PRED 508 520 if( !pcCU->isIntra( uiAbsPartIdx ) ) … … 670 682 break; 671 683 case MODE_INTRA: 684 #if RWTH_SDC_DLT_B0036 685 if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 686 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 687 else 688 #endif 672 689 xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 673 690 break; … … 694 711 { 695 712 #if HHI_MPI 713 #if FIX_MPI_B0065 714 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 715 { 716 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 717 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 718 { 719 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 720 pcCU->setPartSizeSubParts( partSize, 0, uiDepth ); 721 } 722 else 723 { 724 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); 725 } 726 } 727 #else 696 728 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 697 729 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); 698 730 #endif 731 #endif 699 732 700 733 // inter prediction 701 734 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 702 735 703 736 #if HHI_MPI 704 737 if( pcCU->getTextureModeDepth( 0 ) != -1 ) … … 779 812 m_pcPrediction->getPredicBufHeight (), 780 813 bAboveAvail, bLeftAvail ); 781 #if LGE_EDGE_INTRA 814 #if LGE_EDGE_INTRA_A0070 782 815 if( uiLumaPredMode >= EDGE_INTRA_IDX ) 783 816 { … … 1018 1051 1019 1052 } 1053 1054 #if RWTH_SDC_DLT_B0036 1055 Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1056 { 1057 UInt uiWidth = pcCU->getWidth ( 0 ); 1058 UInt uiHeight = pcCU->getHeight ( 0 ); 1059 1060 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 1061 TComYuv* pcPredYuv = m_ppcYuvReco[uiDepth]; 1062 TComYuv* pcResiYuv = m_ppcYuvResi[uiDepth]; 1063 1064 UInt uiStride = pcRecoYuv->getStride (); 1065 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 1066 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1067 Pel* piResi = pcResiYuv->getLumaAddr( uiAbsPartIdx ); 1068 1069 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1070 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1071 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1072 1073 UInt uiLumaPredMode = pcCU->getLumaIntraDir ( uiAbsPartIdx ); 1074 1075 AOF( uiWidth == uiHeight ); 1076 AOF( uiAbsPartIdx == 0 ); 1077 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1078 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1079 1080 //===== init availability pattern ===== 1081 Bool bAboveAvail = false; 1082 Bool bLeftAvail = false; 1083 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1084 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail ); 1085 1086 //===== get prediction signal ===== 1087 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1088 if( uiLumaPredMode >= NUM_INTRA_MODE ) 1089 { 1090 m_pcPrediction->predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, false ); 1091 } 1092 else 1093 { 1094 #endif 1095 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); 1096 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1097 } 1098 #endif 1099 1100 // number of segments depends on prediction mode 1101 UInt uiNumSegments = 1; 1102 Bool* pbMask = NULL; 1103 UInt uiMaskStride = 0; 1104 1105 if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX ) 1106 { 1107 Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx); 1108 1109 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 1110 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 1111 1112 uiNumSegments = 2; 1113 pbMask = pcWedgelet->getPattern(); 1114 uiMaskStride = pcWedgelet->getStride(); 1115 } 1116 1117 // get DC prediction for each segment 1118 Pel apDCPredValues[2]; 1119 xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride); 1120 1121 // reconstruct residual based on mask + DC residuals 1122 Pel apDCResiValues[2]; 1123 //Pel apDCRecoValues[2]; 1124 for( UInt ui = 0; ui < uiNumSegments; ui++ ) 1125 { 1126 Pel pPredIdx = GetDepthValue2Idx( apDCPredValues[ui] ); 1127 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(ui, uiAbsPartIdx); 1128 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1129 1130 //apDCRecoValues[ui] = pRecoValue; 1131 apDCResiValues[ui] = pRecoValue - apDCPredValues[ui]; 1132 } 1133 1134 //===== reconstruction ===== 1135 Bool*pMask = pbMask; 1136 Pel* pPred = piPred; 1137 Pel* pResi = piResi; 1138 Pel* pReco = piReco; 1139 Pel* pRecIPred = piRecIPred; 1140 1141 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1142 { 1143 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1144 { 1145 UChar ucSegment = pMask?(UChar)pMask[uiX]:0; 1146 assert( ucSegment < uiNumSegments ); 1147 1148 Pel pPredVal= apDCPredValues[ucSegment]; 1149 Pel pResiDC = apDCResiValues[ucSegment]; 1150 1151 pReco [ uiX ] = Clip( pPredVal + pResiDC ); 1152 pRecIPred[ uiX ] = pReco[ uiX ]; 1153 } 1154 pPred += uiStride; 1155 pResi += uiStride; 1156 pReco += uiStride; 1157 pRecIPred += uiRecIPredStride; 1158 pMask += uiMaskStride; 1159 } 1160 1161 // clear UV 1162 UInt uiStrideC = pcPredYuv->getCStride(); 1163 Pel *pRecCb = pcPredYuv->getCbAddr(); 1164 Pel *pRecCr = pcPredYuv->getCrAddr(); 1165 1166 for (Int y=0; y<uiHeight/2; y++) 1167 { 1168 for (Int x=0; x<uiWidth/2; x++) 1169 { 1170 pRecCb[x] = (Pel)(128<<g_uiBitIncrement); 1171 pRecCr[x] = (Pel)(128<<g_uiBitIncrement); 1172 } 1173 1174 pRecCb += uiStrideC; 1175 pRecCr += uiStrideC; 1176 } 1177 } 1178 #endif 1020 1179 1021 1180 /** Function for deriving recontructed PU/CU Luma sample with QTree structure … … 1283 1442 #endif 1284 1443 1444 #if RWTH_SDC_DLT_B0036 1445 Void TDecCu::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride ) 1446 { 1447 Int iSumDepth[2]; 1448 memset(iSumDepth, 0, sizeof(Int)*2); 1449 Int iSumPix[2]; 1450 memset(iSumPix, 0, sizeof(Int)*2); 1451 1452 for (Int y=0; y<uiSize; y++) 1453 { 1454 for (Int x=0; x<uiSize; x++) 1455 { 1456 UChar ucSegment = pMask?(UChar)pMask[x]:0; 1457 assert( ucSegment < uiNumSegments ); 1458 1459 iSumDepth[ucSegment] += pOrig[x]; 1460 iSumPix[ucSegment] += 1; 1461 } 1462 1463 pOrig += uiStride; 1464 pMask += uiMaskStride; 1465 } 1466 1467 // compute mean for each segment 1468 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ ) 1469 { 1470 if( iSumPix[ucSeg] > 0 ) 1471 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg]; 1472 else 1473 rpSegMeans[ucSeg] = 0; // this happens for zero-segments 1474 } 1475 } 1476 #endif 1477 1285 1478 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.h
r193 r213 125 125 Void xFillPCMBuffer (TComDataCU* pCU, UInt absPartIdx, UInt depth); 126 126 #endif 127 #if RWTH_SDC_DLT_B0036 128 Void xAnalyzeSegmentsSDC ( Pel* pOrig, 129 UInt uiStride, 130 UInt uiSize, 131 Pel* rpSegMeans, 132 UInt uiNumSegments, 133 Bool* pMask, 134 UInt uiMaskStride ); 135 136 Void xReconIntraSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 137 #endif 127 138 }; 128 139 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r193 r213 74 74 } 75 75 76 #if LGE_ILLUCOMP_B0045 77 Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 78 { 79 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 80 81 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 82 { 83 return; 84 } 85 86 if(!pcCU->getSlice()->getApplyIC()) 87 return; 88 89 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 90 m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth ); 91 } 92 #endif 76 93 /** decode merge index 77 94 * \param pcCU … … 137 154 { 138 155 m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth ); 156 157 #if RWTH_SDC_DLT_B0036 158 // if B-Slice, code SDC flag later 159 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() ) 160 { 161 // decode SDC flag 162 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 163 } 164 #endif 139 165 } 140 166 141 167 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 142 168 { 169 #if RWTH_SDC_DLT_B0036 170 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) 171 { 172 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 173 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 174 return; 175 } 176 #endif 177 143 178 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 179 180 #if RWTH_SDC_DLT_B0036 181 if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) 182 { 183 // decode SDC flag 184 decodeSDCFlag(pcCU, uiAbsPartIdx, uiDepth); 185 186 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 187 { 188 // part size is also known for SDC intra 189 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 190 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 191 } 192 } 193 #endif 144 194 } 145 195 146 196 Void TDecEntropy::decodePredInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU ) 147 197 { 198 #if RWTH_SDC_DLT_B0036 199 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 200 { 201 decodeSDCPredMode(pcCU, uiAbsPartIdx, uiDepth); 202 return; 203 } 204 #endif 205 148 206 PartSize eMode = pcCU->getPartitionSize( uiAbsPartIdx ); 149 207 … … 186 244 return; 187 245 } 246 247 #if RWTH_SDC_DLT_B0036 248 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 249 { 250 return; 251 } 252 #endif 188 253 189 254 m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth ); … … 449 514 #endif 450 515 } 516 #if SHARP_INTERVIEW_DECOUPLE_B0111 517 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo, iMVPIdx); 518 #else 451 519 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 520 #endif 452 521 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); 453 522 pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth ); … … 917 986 #endif 918 987 988 #if RWTH_SDC_DLT_B0036 989 if( pcCU->getSDCAvailable(uiAbsPartIdx) && pcCU->getSDCFlag( uiAbsPartIdx ) ) 990 { 991 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 992 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 993 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 994 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 995 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 996 997 decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth); 998 return; 999 } 1000 #endif 1001 919 1002 if( pcCU->isIntra(uiAbsPartIdx) ) 920 1003 { … … 952 1035 #endif // !UNIFIED_TRANSFORM_TREE 953 1036 } 1037 1038 #if FIX_MPI_B0065 1039 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1040 { 1041 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 1042 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 1043 { 1044 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 1045 pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth ); 1046 } 1047 else 1048 { 1049 pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth ); 1050 } 1051 } 1052 #endif 1053 954 1054 #if UNIFIED_TRANSFORM_TREE 955 1055 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, 0, temp, temp1, temp2, bCodeDQP ); … … 957 1057 xDecodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP ); 958 1058 #endif // UNIFIED_TRANSFORM_TREE 959 } 1059 1060 #if FIX_MPI_B0065 1061 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1062 { 1063 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 1064 } 1065 #endif 1066 } 1067 1068 #if RWTH_SDC_DLT_B0036 1069 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1070 { 1071 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1072 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 1073 1074 m_pcEntropyDecoderIf->parseSDCPredMode(pcCU, uiAbsPartIdx, uiDepth ); 1075 } 1076 1077 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1078 { 1079 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1080 1081 m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth ); 1082 } 1083 1084 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1085 { 1086 assert( pcCU->getSlice()->getSPS()->isDepth() ); 1087 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 1088 1089 // number of segments depends on prediction mode for INTRA 1090 UInt uiNumSegments = 2; 1091 UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx ); 1092 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && (uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX) ) 1093 uiNumSegments = 1; 1094 1095 // decode residual data for each segment 1096 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 1097 m_pcEntropyDecoderIf->parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg); 1098 } 1099 #endif 960 1100 961 1101 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.h
r166 r213 71 71 #endif 72 72 73 #if VIDYO_VPS_INTEGRATION 73 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 74 74 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 75 75 #endif … … 103 103 public: 104 104 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 105 #if LGE_ILLUCOMP_B0045 106 virtual Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 107 #endif 105 108 #if FORCE_REF_VSP==1 106 109 virtual Void parseVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 141 144 virtual Void readTileMarker ( UInt& uiTileIdx, UInt uiBitsUsed ) = 0; 142 145 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 146 147 #if RWTH_SDC_DLT_B0036 148 virtual Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 149 virtual Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 150 virtual Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0; 151 #endif 143 152 144 153 virtual ~TDecEntropyIf() {} … … 169 178 Void resetEntropy ( TComSlice* p) { m_pcEntropyDecoderIf->resetEntropy(p); } 170 179 171 #if VIDYO_VPS_INTEGRATION 180 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 172 181 Void decodeVPS ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); } 173 182 #endif … … 199 208 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 200 209 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 210 #if LGE_ILLUCOMP_B0045 211 Void decodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 212 #endif 201 213 #if FORCE_REF_VSP==1 202 214 Void decodeVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 256 268 Void decodeFlush() { m_pcEntropyDecoderIf->decodeFlush(); } 257 269 #endif 270 271 #if RWTH_SDC_DLT_B0036 272 Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 273 Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 274 Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 275 #endif 258 276 259 277 };// END CLASS DEFINITION TDecEntropy -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecGop.cpp
r193 r213 303 303 { 304 304 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 305 #if !QC_MULTI_DIS_CAN 305 #if !QC_MULTI_DIS_CAN_A0097 306 306 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 307 307 #endif … … 312 312 #endif 313 313 314 #if QC_SIMPLE_NBDV_B0047 315 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 316 { 317 Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx()); 318 rpcPic->setRapbCheck(rpcPic->getDisCandRefPictures(iColPoc)); 319 } 320 #endif 314 321 315 322 m_pcSbacDecoders[0].load(m_pcSbacDecoder); … … 341 348 #endif 342 349 #if DEPTH_MAP_GENERATION 343 #if !QC_MULTI_DIS_CAN 350 #if !QC_MULTI_DIS_CAN_A0097 344 351 // update virtual depth map 345 352 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r193 r213 38 38 #include "TDecSbac.h" 39 39 40 #if RWTH_SDC_DLT_B0036 41 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 42 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue()) 43 #endif 44 40 45 //! \ingroup TLibDecoder 41 46 //! \{ … … 52 57 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 58 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 59 #if LGE_ILLUCOMP_B0045 60 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 61 #endif 54 62 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 55 63 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 98 106 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 107 #endif 100 #if LGE_EDGE_INTRA 108 #if LGE_EDGE_INTRA_A0070 101 109 , m_cEdgeIntraSCModel ( 1, 1, NUM_EDGE_INTRA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 102 110 #if LGE_EDGE_INTRA_DELTA_DC 103 111 , m_cEdgeIntraDeltaDCSCModel ( 1, 1, NUM_EDGE_INTRA_DELTA_DC_CTX , m_contextModels + m_numContextModels, m_numContextModels) 104 112 #endif 113 #endif 114 #if RWTH_SDC_DLT_B0036 115 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 116 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 117 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 118 , m_cSDCResidualSCModel ( 1, 2, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 119 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 105 120 #endif 106 121 { … … 146 161 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 147 162 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 163 #if LGE_ILLUCOMP_B0045 164 m_cCUICFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_IC_FLAG ); 165 #endif 148 166 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); 149 167 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); … … 188 206 189 207 m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG ); 190 #if LGE_EDGE_INTRA 208 #if LGE_EDGE_INTRA_A0070 191 209 m_cEdgeIntraSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_EDGE_INTRA ); 192 210 #if LGE_EDGE_INTRA_DELTA_DC … … 199 217 m_cDmmModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_MODE ); 200 218 m_cDmmDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM_DATA ); 219 #endif 220 #if RWTH_SDC_DLT_B0036 221 m_cSDCFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_FLAG ); 222 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 223 m_cSDCResidualSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL ); 224 m_cSDCResidualSignFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG ); 225 m_cSDCPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE ); 201 226 #endif 202 227 … … 230 255 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 231 256 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 257 #if LGE_ILLUCOMP_B0045 258 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 259 #endif 232 260 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); 233 261 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); … … 276 304 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 277 305 #endif 306 #if RWTH_SDC_DLT_B0036 307 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 308 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 309 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 310 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 311 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 312 #endif 278 313 279 314 m_pcTDecBinIf->start(); … … 578 613 } 579 614 615 #if LGE_ILLUCOMP_B0045 616 /** parse illumination compensation flag 617 * \param pcCU 618 * \param uiAbsPartIdx 619 * \param uiDepth 620 * \returns Void 621 */ 622 Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 623 { 624 UInt uiSymbol = 0; 625 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ); 626 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 627 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 628 DTRACE_CABAC_T( "\tICFlag" ); 629 DTRACE_CABAC_T( "\tuiCtxIC: "); 630 DTRACE_CABAC_V( uiCtxIC ); 631 DTRACE_CABAC_T( "\tuiSymbol: "); 632 DTRACE_CABAC_V( uiSymbol ); 633 DTRACE_CABAC_T( "\n"); 634 635 pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth ); 636 } 637 #endif 638 580 639 #if FORCE_REF_VSP==1 581 640 Void TDecSbac::parseVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 636 695 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 637 696 #if HHI_MPI 638 #if VSP_N 697 #if VSP_N & !MTK_UNCONSTRAINED_MVI_B0083 639 698 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 640 699 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, … … 652 711 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 653 712 #endif 713 #else 714 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 654 715 #endif 655 716 const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand; … … 735 796 736 797 UInt uiSymbol; 737 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 738 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 739 DTRACE_CABAC_T( "\tSplitFlag\n" ) 798 799 #if OL_QTLIMIT_PREDCODING_B0068 800 Bool bParseSplitFlag = true; 801 802 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 803 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 804 Bool bDepthMapDetect = (pcTexture != NULL); 805 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 806 807 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 808 { 809 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 810 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 811 bParseSplitFlag = (pcTextureCU->getDepth(uiAbsPartIdx) > uiDepth); 812 } 813 814 if(bParseSplitFlag) 815 { 816 #endif 817 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSplitFlagSCModel.get( 0, 0, pcCU->getCtxSplitFlag( uiAbsPartIdx, uiDepth ) ) ); 818 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 819 DTRACE_CABAC_T( "\tSplitFlag\n" ) 820 #if OL_QTLIMIT_PREDCODING_B0068 821 } 822 else 823 uiSymbol = 0; 824 #endif 825 740 826 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 741 827 … … 753 839 UInt uiSymbol, uiMode = 0; 754 840 PartSize eMode; 841 842 #if OL_QTLIMIT_PREDCODING_B0068 843 Bool bParsePartSize = true; 844 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 845 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 846 Bool bDepthMapDetect = (pcTexture != NULL); 847 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 848 849 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 850 { 851 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 852 assert(pcTextureCU->getDepth(uiAbsPartIdx) >= uiDepth); 853 if (pcTextureCU->getDepth(uiAbsPartIdx) == uiDepth && pcTextureCU->getPartitionSize( uiAbsPartIdx ) != SIZE_NxN) 854 { 855 bParsePartSize = false; 856 eMode = SIZE_2Nx2N; 857 } 858 } 859 #endif 755 860 756 861 if ( pcCU->isIntra( uiAbsPartIdx ) ) 757 862 { 758 uiSymbol = 1; 759 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 760 { 761 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 762 } 763 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 863 #if OL_QTLIMIT_PREDCODING_B0068 864 if(bParsePartSize) 865 { 866 #endif 867 uiSymbol = 1; 868 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 869 { 870 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 871 } 872 eMode = uiSymbol ? SIZE_2Nx2N : SIZE_NxN; 873 #if OL_QTLIMIT_PREDCODING_B0068 874 } 875 #endif 764 876 UInt uiTrLevel = 0; 765 877 UInt uiWidthInBit = g_aucConvertToBit[pcCU->getWidth(uiAbsPartIdx)]+2; … … 777 889 else 778 890 { 779 UInt uiMaxNumBits = 2; 780 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 781 { 782 uiMaxNumBits ++; 783 } 784 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 785 { 786 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 787 if ( uiSymbol ) 788 { 789 break; 790 } 791 uiMode++; 792 } 793 eMode = (PartSize) uiMode; 794 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 795 { 796 if (eMode == SIZE_2NxN) 797 { 891 #if OL_QTLIMIT_PREDCODING_B0068 892 if(bParsePartSize) 893 { 894 #endif 895 UInt uiMaxNumBits = 2; 896 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( pcCU->getSlice()->getSPS()->getDisInter4x4() && (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 897 { 898 uiMaxNumBits ++; 899 } 900 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 901 { 902 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 903 if ( uiSymbol ) 904 { 905 break; 906 } 907 uiMode++; 908 } 909 eMode = (PartSize) uiMode; 910 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 911 { 912 if (eMode == SIZE_2NxN) 913 { 914 #if AMP_CTX 915 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 916 #else 917 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 )); 918 #endif 919 if (uiSymbol == 0) 920 { 921 #if AMP_CTX 922 m_pcTDecBinIf->decodeBinEP(uiSymbol); 923 #else 924 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 925 #endif 926 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 927 } 928 } 929 else if (eMode == SIZE_Nx2N) 930 { 798 931 #if AMP_CTX 799 932 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 800 933 #else 801 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 0 ));802 #endif 803 if (uiSymbol == 0)804 {934 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 935 #endif 936 if (uiSymbol == 0) 937 { 805 938 #if AMP_CTX 806 m_pcTDecBinIf->decodeBinEP(uiSymbol); 807 #else 808 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUYPosiSCModel.get( 0, 0, 1 )); 809 #endif 810 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 939 m_pcTDecBinIf->decodeBinEP(uiSymbol); 940 #else 941 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 942 #endif 943 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 944 } 811 945 } 812 946 } 813 else if (eMode == SIZE_Nx2N) 814 { 815 #if AMP_CTX 816 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUAMPSCModel.get( 0, 0, 0 )); 817 #else 818 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 0 )); 819 #endif 820 if (uiSymbol == 0) 821 { 822 #if AMP_CTX 823 m_pcTDecBinIf->decodeBinEP(uiSymbol); 824 #else 825 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUXPosiSCModel.get( 0, 0, 1 )); 826 #endif 827 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 828 } 829 } 830 } 947 #if OL_QTLIMIT_PREDCODING_B0068 948 } 949 #endif 831 950 } 832 951 pcCU->setPartSizeSubParts( eMode, uiAbsPartIdx, uiDepth ); … … 904 1023 #endif 905 1024 906 #if LGE_EDGE_INTRA 1025 #if LGE_EDGE_INTRA_A0070 907 1026 Bool bCodeEdgeIntra = false; 908 1027 if( pcCU->getSlice()->getSPS()->isDepth() ) … … 920 1039 #endif 921 1040 Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds); 922 #if LGE_EDGE_INTRA 1041 #if LGE_EDGE_INTRA_A0070 923 1042 UInt uiCheckBit = 0; 924 1043 #endif … … 945 1064 946 1065 m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 ); 947 #if LGE_EDGE_INTRA 1066 #if LGE_EDGE_INTRA_A0070 948 1067 if (bCodeEdgeIntra) 949 1068 { … … 981 1100 } 982 1101 #endif 983 #if LGE_EDGE_INTRA 1102 #if LGE_EDGE_INTRA_A0070 984 1103 if ( intraPredMode != EDGE_INTRA_IDX) 985 1104 { … … 989 1108 intraPredMode += ( intraPredMode >= uiPreds[i] ); 990 1109 } 991 #if LGE_EDGE_INTRA 992 } 993 #endif 994 } 995 996 #if LGE_EDGE_INTRA 1110 #if LGE_EDGE_INTRA_A0070 1111 } 1112 #endif 1113 } 1114 1115 #if LGE_EDGE_INTRA_A0070 997 1116 if( intraPredMode == EDGE_INTRA_IDX ) 998 1117 { … … 2138 2257 #endif 2139 2258 2140 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)2259 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC) 2141 2260 Void TDecSbac::xReadExGolombLevel( UInt& ruiSymbol, ContextModel& rcSCModel ) 2142 2261 { … … 2397 2516 #endif 2398 2517 2399 #if LGE_EDGE_INTRA 2518 #if LGE_EDGE_INTRA_A0070 2400 2519 Void TDecSbac::xParseEdgeIntraInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2401 2520 { … … 2494 2613 } 2495 2614 #endif 2615 2616 #if RWTH_SDC_DLT_B0036 2617 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2618 { 2619 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2620 2621 UInt uiSymbol = 0; 2622 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2623 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2624 2625 if( uiSymbol == 1 ) 2626 { 2627 pcCU->setPartSizeSubParts(SIZE_2Nx2N, uiAbsPartIdx, uiDepth); 2628 2629 pcCU->setSDCFlagSubParts( true, uiAbsPartIdx, 0, uiDepth); 2630 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 2631 pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth); 2632 } 2633 } 2634 2635 Void TDecSbac::parseSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2636 { 2637 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2638 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 2639 2640 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2641 2642 UInt uiCtx = 0; 2643 2644 UInt uiMPModeIdx = 0; 2645 2646 for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++) 2647 { 2648 UInt uiIsMostProb = 0; 2649 m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) ); 2650 2651 if ( uiIsMostProb == 1 ) 2652 break; 2653 2654 // else: get next most probable pred mode 2655 uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES; 2656 } 2657 2658 Int intraPredMode = g_auiSDCPredModes[uiMPModeIdx]; 2659 2660 #if HHI_DMM_WEDGE_INTRA 2661 if( intraPredMode == DMM_WEDGE_FULL_IDX ) { xParseWedgeFullInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2662 if( intraPredMode == DMM_WEDGE_PREDDIR_IDX ) { xParseWedgePredDirInfo ( pcCU, uiAbsPartIdx, uiDepth ); } 2663 #endif 2664 2665 pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth); 2666 } 2667 2668 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment ) 2669 { 2670 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2671 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2672 assert( uiSegment < 2 ); 2673 2674 UInt uiResidual = 0; 2675 UInt uiBit = 0; 2676 UInt uiAbsIdx = 0; 2677 UInt uiSign = 0; 2678 Int iIdx = 0; 2679 2680 UInt uiMaxResidualBits = GetBitsPerDepthValue(); 2681 assert( uiMaxResidualBits <= g_uiBitDepth ); 2682 2683 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); 2684 2685 if (uiResidual) 2686 { 2687 // decode residual sign bit 2688 m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); 2689 2690 // decode residual magnitude 2691 for (Int i=0; i<uiMaxResidualBits; i++) 2692 { 2693 m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); 2694 uiAbsIdx |= uiBit << i; 2695 } 2696 2697 uiAbsIdx += 1; 2698 iIdx =(Int)(uiSign ? -1 : 1)*uiAbsIdx; 2699 } 2700 2701 pcCU->setSDCSegmentDCOffset(iIdx, uiSegment, uiAbsPartIdx); 2702 } 2703 #endif 2496 2704 2497 2705 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.h
r166 r213 87 87 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); } 88 88 89 #if VIDYO_VPS_INTEGRATION 89 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 90 90 Void parseVPS ( TComVPS* pcVPS ) {} 91 91 #endif … … 126 126 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam); 127 127 #endif 128 129 #if RWTH_SDC_DLT_B0036 130 Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 131 Void parseSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 132 Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ); 133 #endif 128 134 private: 129 135 Void xReadUnarySymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset ); … … 146 152 #endif 147 153 148 #if LGE_EDGE_INTRA 154 #if LGE_EDGE_INTRA_A0070 149 155 Void xParseEdgeIntraInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 150 156 #endif … … 166 172 167 173 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 174 #if LGE_ILLUCOMP_B0045 175 Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 176 #endif 168 177 #if FORCE_REF_VSP==1 169 178 Void parseVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 210 219 ContextModel3DBuffer m_cCUSplitFlagSCModel; 211 220 ContextModel3DBuffer m_cCUSkipFlagSCModel; 221 #if LGE_ILLUCOMP_B0045 222 ContextModel3DBuffer m_cCUICFlagSCModel; 223 #endif 212 224 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 213 225 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; … … 260 272 ContextModel3DBuffer m_cDmmDataSCModel; 261 273 #endif 262 #if LGE_EDGE_INTRA 274 #if LGE_EDGE_INTRA_A0070 263 275 ContextModel3DBuffer m_cEdgeIntraSCModel; 264 276 #if LGE_EDGE_INTRA_DELTA_DC … … 266 278 #endif 267 279 #endif 280 281 #if RWTH_SDC_DLT_B0036 282 ContextModel3DBuffer m_cSDCFlagSCModel; 283 284 ContextModel3DBuffer m_cSDCResidualFlagSCModel; 285 ContextModel3DBuffer m_cSDCResidualSignFlagSCModel; 286 ContextModel3DBuffer m_cSDCResidualSCModel; 287 288 ContextModel3DBuffer m_cSDCPredModeSCModel; 289 #endif 268 290 }; 269 291 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.cpp
r193 r213 446 446 , m_ppsBuffer(16) 447 447 , m_apsBuffer(64) 448 #if VIDYO_VPS_INTEGRATION 448 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 449 449 , m_vpsBuffer(16) 450 450 #endif … … 458 458 } 459 459 460 #if VIDYO_VPS_INTEGRATION 460 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 461 461 TComVPS* ParameterSetManagerDecoder::getPrefetchedVPS (Int vpsId) 462 462 { … … 513 513 m_ppsMap.mergePSList(m_ppsBuffer); 514 514 m_spsMap.mergePSList(m_spsBuffer); 515 #if VIDYO_VPS_INTEGRATION 515 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 516 516 m_vpsMap.mergePSList(m_vpsBuffer); 517 517 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.h
r100 r213 96 96 Void storePrefetchedAPS(TComAPS *aps) { m_apsBuffer.storePS( aps->getAPSID(), aps); }; 97 97 TComAPS* getPrefetchedAPS (Int apsId); 98 #if VIDYO_VPS_INTEGRATION 98 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 99 99 Void storePrefetchedVPS(TComVPS *vps) { m_vpsBuffer.storePS( vps->getVPSId(), vps); }; 100 100 TComVPS* getPrefetchedVPS (Int vpsId); … … 106 106 ParameterSetMap<TComPPS> m_ppsBuffer; 107 107 ParameterSetMap<TComAPS> m_apsBuffer; 108 #if VIDYO_VPS_INTEGRATION 108 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 109 109 ParameterSetMap<TComVPS> m_vpsBuffer; 110 110 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r193 r213 50 50 m_aaiCodedScale = new Int* [ MAX_VIEW_NUM ]; 51 51 m_aiViewOrderIndex = new Int [ MAX_VIEW_NUM ]; 52 #if QC_MVHEVC_B0046 53 m_aiViewId = new Int [ MAX_VIEW_NUM ]; 54 #endif 52 55 m_aiViewReceived = new Int [ MAX_VIEW_NUM ]; 53 56 for( UInt uiId = 0; uiId < MAX_VIEW_NUM; uiId++ ) … … 301 304 302 305 AOF( pcSlice->getSPS()->getViewId() < MAX_VIEW_NUM ); 306 #if VSP_N 307 if ( !pcSlice->getSPS()->getIsFirstInView() ) 308 { 309 return; 310 } 311 #else 303 312 if ( pcSlice->getSPS()->isDepth () ) 304 313 { 305 314 return; 306 315 } 316 #endif 307 317 Bool bFirstAU = ( pcSlice->getPOC() == 0 ); 308 318 Bool bFirstSliceInAU = ( pcSlice->getPOC() != Int ( m_iLastPOC ) ); 309 319 Bool bFirstSliceInView = ( pcSlice->getSPS()->getViewId() != UInt( m_iLastViewId ) || bFirstSliceInAU ); 310 320 AOT( bFirstSliceInAU && pcSlice->getSPS()->getViewId() != 0 ); 321 #if !VSP_N 311 322 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() < UInt( m_iLastViewId ) ); 323 #endif 312 324 AOT( !bFirstSliceInAU && pcSlice->getSPS()->getViewId() > UInt( m_iLastViewId + 1 ) ); 313 325 AOT( !bFirstAU && pcSlice->getSPS()->getViewId() > m_uiMaxViewId ); … … 488 500 m_bFirstSliceInSequence = true; 489 501 m_pcCamParsCollector = 0; 502 #if QC_MVHEVC_B0046 503 m_bFirstNal = false; 504 #endif 490 505 491 506 #if VSP_N … … 821 836 TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 822 837 assert (vps != 0); 838 #if !QC_REM_IDV_B0046 823 839 if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) 840 #else 841 if( (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && !sps->getViewId() ) 842 #endif 824 843 // VPS can only be activated on IDR or CRA... 825 844 getTAppDecTop()->getVPSAccess()->setActiveVPSId( sps->getVPSId() ); … … 827 846 m_apcSlicePilot->setPPS(pps); 828 847 m_apcSlicePilot->setSPS(sps); 829 #if VIDYO_VPS_INTEGRATION 848 #if QC_MVHEVC_B0046 849 TComVPS *vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 850 #endif 851 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 830 852 m_apcSlicePilot->setVPS(vps); 831 853 #endif … … 869 891 m_apcSlicePilot->setPPS(m_parameterSetManagerDecoder.getPrefetchedPPS(0)); 870 892 m_apcSlicePilot->setSPS(m_parameterSetManagerDecoder.getPrefetchedSPS(0)); 871 #if VIDYO_VPS_INTEGRATION 893 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 894 #if QC_MVHEVC_B0046 895 m_apcSlicePilot->setIsDepth(false); 896 #endif 872 897 m_apcSlicePilot->setVPS(m_parameterSetManagerDecoder.getPrefetchedVPS(0)); 873 898 #endif 874 899 m_apcSlicePilot->initTiles(); 875 900 #if QC_MVHEVC_B0046 901 m_apcSlicePilot->setViewId( nalu.m_layerId ); 902 m_apcSlicePilot->setViewId( nalu.m_layerId ); 903 m_apcSlicePilot->setViewOrderIdx(m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId), nalu.m_layerId); 904 Int iNumDirectRef = m_apcSlicePilot->getVPS()->getNumDirectRefLayer(nalu.m_layerId); 905 m_apcSlicePilot->getSPS()->setNumberOfUsableInterViewRefs(iNumDirectRef); 906 for(Int iNumIvRef = 0; iNumIvRef < iNumDirectRef; iNumIvRef ++) 907 { 908 Int iDeltaLayerId = m_apcSlicePilot->getVPS()->getDirectRefLayerId( nalu.m_layerId, iNumIvRef); 909 m_apcSlicePilot->getSPS()->setUsableInterViewRef(iNumIvRef, (iDeltaLayerId-nalu.m_layerId)); 910 } 911 #endif 876 912 if (m_bFirstSliceInPicture) 877 913 { … … 888 924 if( m_bFirstSliceInPicture ) 889 925 { 926 #if QC_MVHEVC_B0046 927 if( nalu.m_layerId == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } 928 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, 0 )->getNalUnitTypeBaseView(); } 929 #else 890 930 #if VIDYO_VPS_INTEGRATION 891 931 if( m_apcSlicePilot->getVPS()->getViewId(nalu.m_layerId) == 0 ) { m_nalUnitTypeBaseView = nalu.m_nalUnitType; } … … 895 935 else { m_nalUnitTypeBaseView = m_tAppDecTop->getTDecTop( 0, nalu.m_isDepth )->getNalUnitTypeBaseView(); } 896 936 #endif 897 937 #endif 898 938 m_apcSlicePilot->setNalUnitTypeBaseViewMvc( m_nalUnitTypeBaseView ); 899 939 } … … 909 949 #endif 910 950 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); 951 952 #if VSP_N 953 if( m_apcSlicePilot->getSPS()->getViewId() ) 954 if( !m_apcSlicePilot->getSPS()->getIsFirstInView() && !m_isDepth ) 955 { 956 TComSPS* pcSPSDepth = NULL; 957 TComPic* pcPicDepth = getTAppDecTop()->getPicFromView( m_apcSlicePilot->getSPS()->getViewId(), 0, true ); 958 if( pcPicDepth ) 959 { 960 pcSPSDepth = getTAppDecTop()->getPicFromView( m_apcSlicePilot->getSPS()->getViewId(), 0, !m_isDepth )->getSPS(); 961 m_apcSlicePilot->getSPS()->copyCameraParameterPre( pcSPSDepth->getCamParPrecision(), pcSPSDepth->hasCamParInSliceHeader() ); 962 } 963 } 964 #endif 911 965 912 966 // ALF CU parameters should be part of the slice header -> needs to be fixed … … 984 1038 m_pcPicVSP = new TComPic; 985 1039 m_pcPicVSP->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1040 m_pcPicVSP->setIsVsp( true ); 986 1041 m_pcPicVSP->setCurrSliceIdx(0); 987 1042 m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); … … 1010 1065 m_pcPicAvail = new TComPic; 1011 1066 m_pcPicAvail->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1067 m_pcPicAvail->setIsVsp( true ); 1012 1068 m_pcPicAvail->setCurrSliceIdx(0); 1013 1069 m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() ); … … 1061 1117 m_cResidualGenerator.create( true, m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiBitDepth + g_uiBitIncrement ); 1062 1118 #endif 1063 #if !QC_MULTI_DIS_CAN 1119 #if !QC_MULTI_DIS_CAN_A0097 1064 1120 #if VSP_N 1065 1121 #if VSP_SLICE_HEADER … … 1275 1331 1276 1332 // Set reference list 1333 #if !QC_MVHEVC_B0046 1277 1334 #if VIDYO_VPS_INTEGRATION 1278 1335 pcSlice->setViewId( pcSlice->getVPS()->getViewId(nalu.m_layerId) ); … … 1282 1339 pcSlice->setIsDepth(m_isDepth); 1283 1340 #endif 1341 #endif 1284 1342 1285 1343 #if SONY_COLPIC_AVAILABILITY … … 1293 1351 assert( m_tAppDecTop != NULL ); 1294 1352 TComPic * const pcTexturePic = m_isDepth ? m_tAppDecTop->getPicFromView( m_viewId, pcSlice->getPOC(), false ) : NULL; 1353 1354 #if FLEX_CODING_ORDER_M23723 1355 if (pcTexturePic != NULL) 1356 { 1357 assert( !m_isDepth || pcTexturePic != NULL ); 1358 pcSlice->setTexturePic( pcTexturePic ); 1359 } 1360 #else 1295 1361 assert( !m_isDepth || pcTexturePic != NULL ); 1296 1362 pcSlice->setTexturePic( pcTexturePic ); 1363 #endif 1297 1364 1298 1365 std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() ); … … 1317 1384 1318 1385 pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics, bUseVsp ? m_pcPicVSP : NULL ); 1319 1320 1386 #else 1321 1387 pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics ); … … 1416 1482 1417 1483 #if VSP_N 1484 #if VSP_SLICE_HEADER 1485 if( pcSlice->getVspFlag() ) 1486 #endif 1487 if( !pcSlice->getSPS()->getIsFirstInView() && !m_isDepth && !pcSlice->getSPS()->hasCamParInSliceHeader() ) 1488 { 1489 TComSPS* pcSPSDepth = NULL; 1490 TComPic* pcPicDepth = getTAppDecTop()->getPicFromView( pcSlice->getViewId(), pcSlice->getPOC(), true ); 1491 if( pcPicDepth ) 1492 { 1493 pcSPSDepth = getTAppDecTop()->getPicFromView( pcSlice->getViewId(), pcSlice->getPOC(), !m_isDepth )->getSPS(); 1494 pcSlice->getSPS()->copyCameraParameterPost( pcSPSDepth->getCodedScale(), pcSPSDepth->getInvCodedScale(), pcSPSDepth->getCodedOffset(), pcSPSDepth->getInvCodedOffset() ); 1495 } 1496 } 1497 1418 1498 if( m_pcCamParsCollector ) 1419 1499 { … … 1444 1524 m_cGopDecoder.decompressGop(nalu.m_Bitstream, pcPic, false); 1445 1525 1526 #if QC_IV_AS_LT_B0046 1527 std::vector<TComPic*> apcInterViewRefPics = m_tAppDecTop->getInterViewRefPics( m_viewId, pcSlice->getPOC(), m_isDepth, pcSlice->getSPS() ); 1528 for( Int k = 0; k < apcInterViewRefPics.size(); k++ ) 1529 { 1530 TComPic* pcPicIv = apcInterViewRefPics[k]; 1531 pcPicIv->setIsLongTerm( 0 ); 1532 } 1533 #endif 1446 1534 if( m_pcCamParsCollector ) 1447 1535 { … … 1455 1543 } 1456 1544 1457 #if VIDYO_VPS_INTEGRATION 1545 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1458 1546 Void TDecTop::xDecodeVPS() 1459 1547 { … … 1462 1550 m_cEntropyDecoder.decodeVPS( vps ); 1463 1551 m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 1552 #if !QC_MVHEVC_B0046 1464 1553 getTAppDecTop()->getVPSAccess()->addVPS( vps ); 1554 #endif 1465 1555 } 1466 1556 #endif … … 1539 1629 switch (nalu.m_nalUnitType) 1540 1630 { 1541 #if VIDYO_VPS_INTEGRATION 1631 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1542 1632 case NAL_UNIT_VPS: 1543 1633 xDecodeVPS(); … … 1562 1652 case NAL_UNIT_CODED_SLICE_IDR: 1563 1653 #if H0566_TLA 1654 #if !QC_REM_IDV_B0046 1564 1655 case NAL_UNIT_CODED_SLICE_IDV: 1656 #endif 1565 1657 case NAL_UNIT_CODED_SLICE_CRA: 1566 1658 case NAL_UNIT_CODED_SLICE_TLA: … … 1577 1669 } 1578 1670 1671 #if QC_MVHEVC_B0046 1672 Void TDecTop::xCopyVPS( TComVPS* pVPSV0 ) 1673 { 1674 m_parameterSetManagerDecoder.storePrefetchedVPS(pVPSV0); 1675 } 1676 1677 Void TDecTop::xCopySPS( TComSPS* pSPSV0 ) 1678 { 1679 TComSPS* sps = new TComSPS(); 1680 sps = pSPSV0; 1681 m_parameterSetManagerDecoder.storePrefetchedSPS(sps); 1682 #if LCU_SYNTAX_ALF 1683 m_cAdaptiveLoopFilter.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 1684 #endif 1685 } 1686 1687 Void TDecTop::xCopyPPS(TComPPS* pPPSV0 ) 1688 { 1689 m_parameterSetManagerDecoder.storePrefetchedPPS( pPPSV0 ); 1690 1691 //!!!KS: Activate parameter sets for parsing APS (unless dependency is resolved) 1692 m_apcSlicePilot->setPPSId(pPPSV0->getPPSId()); 1693 xActivateParameterSets(); 1694 m_apcSlicePilot->initTiles(); 1695 } 1696 #endif 1579 1697 /** Function for checking if picture should be skipped because of random access 1580 1698 * \param iSkipFrame skip frame counter -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.h
r166 r213 100 100 Int** m_aaiCodedScale; 101 101 Int* m_aiViewOrderIndex; 102 #if QC_MVHEVC_B0046 103 Int* m_aiViewId; 104 #endif 102 105 Int* m_aiViewReceived; 103 106 UInt m_uiCamParsCodedPrecision; … … 264 267 265 268 Void deletePicBuffer(); 266 269 #if QC_MVHEVC_B0046 270 Void xCopySPS( TComSPS* pSPSV0); 271 Void xCopyPPS( TComPPS* pPPSV0); 272 Void xCopyVPS( TComVPS* pVPSV0); 273 #endif 267 274 #if HHI_INTER_VIEW_RESIDUAL_PRED 268 275 Void deleteExtraPicBuffers ( Int iPoc ); … … 275 282 Int getViewId() { return m_viewId ;} 276 283 Void setIsDepth( Bool isDepth ) { m_isDepth = isDepth; } 284 Bool getIsDepth() { return m_isDepth; } 277 285 278 286 #if SONY_COLPIC_AVAILABILITY … … 291 299 TAppDecTop* getTAppDecTop() { return m_tAppDecTop; } 292 300 NalUnitType getNalUnitTypeBaseView() { return m_nalUnitTypeBaseView; } 301 #if QC_MVHEVC_B0046 302 bool m_bFirstNal; //used to copy SPS, PPS, VPS 303 ParameterSetManagerDecoder* xGetParaSetDec () {return &m_parameterSetManagerDecoder;} 304 #endif 293 305 294 306 #if VSP_N … … 308 320 Bool xDecodeSlice(InputNALUnit &nalu, Int iSkipFrame, Int iPOCLastDisplay); 309 321 #endif 310 #if VIDYO_VPS_INTEGRATION 322 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 311 323 Void xDecodeVPS(); 312 324 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/NALwrite.cpp
r165 r213 64 64 #endif 65 65 66 #if QC_MVHEVC_B0046 67 bsNALUHeader.write(nalu.m_layerId, 5); // when nal_ref_flag is signalled, 5 bits here. otherwise, 6 bits 68 bsNALUHeader.write(nalu.m_temporalId + 1, 3); // temporal_id 69 #else 66 70 #if VIDYO_VPS_INTEGRATION 67 71 bsNALUHeader.write(nalu.m_temporalId, 3); // temporal_id … … 79 83 case NAL_UNIT_CODED_SLICE_IDR: 80 84 #if H0566_TLA 85 #if !QC_REM_IDV_B0046 81 86 case NAL_UNIT_CODED_SLICE_IDV: 87 #endif 82 88 case NAL_UNIT_CODED_SLICE_CRA: 83 89 case NAL_UNIT_CODED_SLICE_TLA: … … 95 101 #endif 96 102 #endif 97 103 #endif 98 104 out.write(bsNALUHeader.getByteStream(), bsNALUHeader.getByteStreamLength()); 99 105 … … 196 202 } 197 203 204 #if !QC_MVHEVC_B0046 198 205 /** 199 206 * Copy NALU from naluSrc to naluDest … … 222 229 naluDest.m_Bitstream = naluSrc.m_Bitstream; 223 230 } 231 #endif 224 232 225 233 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/NALwrite.h
r165 r213 62 62 NalRefIdc nalRefIDC, 63 63 #endif 64 #if VIDYO_VPS_INTEGRATION 64 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 65 65 unsigned layerId, 66 66 #else … … 70 70 unsigned temporalID = 0) 71 71 #if NAL_REF_FLAG 72 #if VIDYO_VPS_INTEGRATION 72 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 73 73 : NALUnit(nalUnitType, nalRefFlag, layerId, temporalID) 74 74 #else -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r193 r213 375 375 } 376 376 377 #if QC_MVHEVC_B0046 378 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) 379 { 380 WRITE_CODE( pcVPS->getVPSId(), 4, "video_parameter_set_id" ); 381 WRITE_FLAG( pcVPS->getTemporalNestingFlag() -1, "temporal_id_nesting_flag" ); 382 WRITE_CODE( 0, 2, "vps_reserved_zero_2bits" ); 383 WRITE_CODE( pcVPS->getMaxLayers() - 1, 6, "vps_max_layers_minus1" ); 384 WRITE_CODE( pcVPS->getMaxTLayers() - 1, 3, "vps_max_sub_layers_minus1" ); 385 //to be determined 386 //profile_tier_level( 1, vps_max_sub_layers_minus1 ); 387 //to be modified 388 WRITE_CODE( 0, 12, "vps_extension_offset" ); 389 for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++) 390 { 391 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i), "max_dec_pic_buffering[i]" ); 392 WRITE_UVLC( pcVPS->getNumReorderPics(i), "num_reorder_pics[i]" ); 393 WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i), "max_latency_increase[i]" ); 394 } 395 //!!!waste one bit: 3-view, 3; 2-view or more views: 1 396 WRITE_UVLC(pcVPS->getNumHRDParameters(), "vps_num_hrd_parameters" ); 397 assert(pcVPS->getNumHRDParameters()==0); 398 for ( UInt i = 0; i < pcVPS->getNumHRDParameters(); i ++) 399 { 400 // if( i > 0 ) 401 //{ 402 // WRITE_UVLC (0, "op_num_layer_id_values_minus1[ opIdx ]"); 403 // for( i = 0; i <= op_num_layer_id_values_minus1[ opIdx ]; i++ ) 404 // WRITE_CODE(0, 6, "op_layer_id[ opIdx ][ i ]"); 405 //} 406 //hrd_parameters( i = = 0, vps_max_sub_layers_minus1 ); 407 } 408 WRITE_CODE( 1, 1, "bit_equal_to_one" ); 409 //btye aligned 410 m_pcBitIf->writeAlignOne(); 411 412 if(pcVPS->getMaxLayers() == 3) 413 pcVPS->setNumAddiLayerOperationPoints (pcVPS->getMaxLayers()); //may be configured 414 else 415 pcVPS->setNumAddiLayerOperationPoints (1); 416 pcVPS->setNumAddiProLevelSets (1); 417 WRITE_CODE( pcVPS->getNumAddiLayerOperationPoints(), 8, "num_additional_layer_operation_points" ); 418 WRITE_CODE( pcVPS->getNumAddiProLevelSets(), 8, "num_additional_profile_level_sets" ); 419 for(UInt i=0; i <= pcVPS->getMaxLayers()-1; i++) 420 { 421 WRITE_CODE( 0, 4, "num_types_zero_4bits[i]" ); 422 WRITE_CODE( 0, 4, "type_zero_4bits[i]" ); 423 WRITE_CODE( pcVPS->getViewId(i), 8, "view_id[i]" ); 424 if(i) 425 { 426 WRITE_CODE( pcVPS->getNumDirectRefLayer(i), 6, "num_direct_ref_layers[ i ]" ); 427 for (UInt j = 0; j< pcVPS->getNumDirectRefLayer(i); j++) 428 { 429 WRITE_CODE( pcVPS->getDirectRefLayerId (i, j), 6, "ref_layer_id[i][j]" ); 430 } 431 } 432 } 433 for( UInt i=1; i<=pcVPS->getNumAddiProLevelSets(); i++) 434 { 435 //profile_tier_level 436 } 437 for( UInt i=1; i<= pcVPS->getNumAddiLayerOperationPoints(); i++) 438 { 439 if(pcVPS->getMaxLayers() == 3) 440 { 441 pcVPS->setNumOpLayerIdMinus1((i < pcVPS->getNumAddiLayerOperationPoints() ? 1: 2), (i-1)); 442 } 443 else if( i==1 ) 444 { 445 assert(pcVPS->getNumAddiLayerOperationPoints()==1); 446 pcVPS->setNumOpLayerIdMinus1(pcVPS->getMaxLayers()-1, (i-1)); 447 } 448 WRITE_UVLC( pcVPS->getNumOpLayerIdMinus1(i-1), "op_num_layer_id_values_minus1[ opIdx ]" ); 449 for(UInt j = 0; j <= pcVPS->getNumOpLayerIdMinus1(i-1); j++ ) 450 { 451 if(pcVPS->getMaxLayers() == 3 && i== 2 && j==1) 452 pcVPS->setNumOpLayerId (2, i-1, j); 453 else 454 pcVPS->setNumOpLayerId (j, i-1, j); 455 WRITE_UVLC( pcVPS->getNumOpLayerId(i-1, j), "op_layer_id[ opIdx ][ i ]" ); 456 } 457 if (pcVPS->getNumAddiProLevelSets()) 458 { 459 //profile_level_idx[ i ] 460 } 461 } 462 return; 463 } 464 #else 377 465 #if VIDYO_VPS_INTEGRATION 378 466 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) … … 419 507 } 420 508 #endif 421 509 #endif 422 510 #if HHI_MPI 423 511 Void TEncCavlc::codeSPS( TComSPS* pcSPS, Bool bIsDepth ) … … 620 708 #endif 621 709 WRITE_FLAG( 1, "sps_extension_flag" ); 622 710 #if !QC_MVHEVC_B0046 623 711 WRITE_FLAG( (pcSPS->getNumberOfUsableInterViewRefs() > 0) ? 1 : 0, "interview_refs_present_flag" ); 624 712 if( pcSPS->getNumberOfUsableInterViewRefs() > 0 ) … … 642 730 { 643 731 WRITE_FLAG( pcSPS->getUseMVI() ? 1 : 0, "use_mvi_flag" ); 732 } 733 #endif 734 735 #if OL_QTLIMIT_PREDCODING_B0068 736 if( bIsDepth ) 737 { 738 WRITE_FLAG( pcSPS->getUseQTLPC() ? 1 : 0, "use_qtlpc_flag"); 739 } 740 #endif 741 742 #if RWTH_SDC_DLT_B0036 743 if( bIsDepth ) 744 { 745 WRITE_FLAG( pcSPS->getUseDLT() ? 1 : 0, "use_dlt_flag" ); 746 if( pcSPS->getUseDLT() ) 747 { 748 // code mapping 749 xWriteUvlc ( pcSPS->getNumDepthValues() ); 750 for(UInt i=0; i<pcSPS->getNumDepthValues(); i++) 751 { 752 xWriteUvlc( pcSPS->idx2DepthValue(i) ); 753 } 754 } 644 755 } 645 756 #endif … … 653 764 WRITE_UVLC( pcSPS->getViewId(), "view_id" ); 654 765 WRITE_SVLC( pcSPS->getViewOrderIdx(), "view_order_idx" ); 766 #if VSP_N 767 if( pcSPS->getViewId() ) 768 { 769 WRITE_FLAG( pcSPS->getIsFirstInView() ? 1 : 0, "camera_parameter_present_flag" ); 770 if( pcSPS->getIsFirstInView() ) 771 { 772 WRITE_UVLC( pcSPS->getCamParPrecision(), "camera_parameter_precision" ); 773 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "camera_parameter_in_slice_header" ); 774 if( !pcSPS->hasCamParInSliceHeader() ) 775 { 776 for( UInt uiId = 0; uiId < pcSPS->getViewId(); uiId++ ) 777 { 778 WRITE_SVLC( pcSPS->getCodedScale ()[ uiId ], "coded_scale" ); 779 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiId ], "coded_offset" ); 780 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiId ] + pcSPS->getCodedScale ()[ uiId ], "inverse_coded_scale_plus_coded_scale" ); 781 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiId ] + pcSPS->getCodedOffset()[ uiId ], "inverse_coded_offset_plus_coded_offset" ); 782 } 783 } 784 } 785 } 786 #endif 655 787 } 656 788 else … … 659 791 WRITE_UVLC( pcSPS->getViewId() - 1, "view_id_minus1" ); 660 792 WRITE_SVLC( pcSPS->getViewOrderIdx(), "view_order_idx" ); 793 #if VSP_N 794 WRITE_FLAG( pcSPS->getIsFirstInView() ? 1 : 0, "camera_parameter_present_flag" ); 795 if( pcSPS->getIsFirstInView() ) 796 { 797 #endif 661 798 WRITE_UVLC( pcSPS->getCamParPrecision(), "camera_parameter_precision" ); 662 799 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "camera_parameter_in_slice_header" ); … … 671 808 } 672 809 } 810 #if VSP_N 811 } 812 #endif 673 813 #if DEPTH_MAP_GENERATION 674 814 WRITE_UVLC( pcSPS->getPredDepthMapGeneration(), "Pdm_generation" ); … … 708 848 #endif 709 849 WRITE_FLAG( 0, "sps_extension2_flag" ); 850 #endif 710 851 } 711 852 … … 766 907 Int address = (pcSlice->getPic()->getPicSym()->getCUOrderMap(lCUAddress) << reqBitsInner) + innerAddress; 767 908 WRITE_FLAG( address==0, "first_slice_in_pic_flag" ); 909 910 #if LGE_ILLUCOMP_B0045 911 // IC flag is on only first_slice_in_pic 912 if (address==0) 913 { 914 if( pcSlice->getSPS()->getViewId() && !pcSlice->getIsDepth() ) 915 { 916 WRITE_FLAG( pcSlice->getApplyIC() ? 1 : 0, "applying IC flag" ); 917 } 918 } 919 #endif 920 768 921 if(address>0) 769 922 { … … 777 930 if (!bEntropySlice) 778 931 { 932 #if QC_MVHEVC_B0046 933 WRITE_UVLC( 0, "pic_parameter_set_id" ); 934 #else 779 935 WRITE_UVLC( pcSlice->getPPS()->getPPSId(), "pic_parameter_set_id" ); 936 #endif 780 937 #if H0388 781 938 if( pcSlice->getPPS()->getOutputFlagPresentFlag() ) … … 784 941 } 785 942 #endif 943 #if QC_REM_IDV_B0046 944 if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR && pcSlice->getViewId() == 0) 945 #else 786 946 if(pcSlice->getNalUnitType()==NAL_UNIT_CODED_SLICE_IDR) 947 #endif 787 948 { 788 949 WRITE_UVLC( 0, "idr_pic_id" ); … … 792 953 { 793 954 WRITE_CODE( (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC()))%(1<<pcSlice->getSPS()->getBitsForPOC()), pcSlice->getSPS()->getBitsForPOC(), "pic_order_cnt_lsb"); 955 #if QC_REM_IDV_B0046 956 if( pcSlice->getPOC() == 0 && !(pcSlice->getSPS()->getViewId() && (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA))) 957 #else 794 958 if( pcSlice->getPOC() == 0 && pcSlice->getNalUnitType() != NAL_UNIT_CODED_SLICE_IDV ) 959 #endif 795 960 { 796 961 TComReferencePictureSet* rps = pcSlice->getRPS(); … … 1501 1666 } 1502 1667 1668 #if LGE_ILLUCOMP_B0045 1669 Void TEncCavlc::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 1670 { 1671 assert(0); 1672 } 1673 #endif 1674 1503 1675 #if FORCE_REF_VSP==1 1504 1676 Void TEncCavlc::codeVspFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) … … 2128 2300 return true; 2129 2301 } 2302 2303 #if RWTH_SDC_DLT_B0036 2304 Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2305 { 2306 assert(0); 2307 } 2308 2309 Void TEncCavlc::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 2310 { 2311 assert(0); 2312 } 2313 2314 Void TEncCavlc::codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2315 { 2316 assert(0); 2317 } 2318 #endif 2130 2319 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCavlc.h
r166 r213 114 114 UInt getCoeffCost () { return m_uiCoeffCost; } 115 115 116 #if VIDYO_VPS_INTEGRATION 116 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 117 117 Void codeVPS ( TComVPS* pcVPS ); 118 118 #endif … … 164 164 165 165 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 166 #if LGE_ILLUCOMP_B0045 167 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 168 #endif 166 169 #if FORCE_REF_VSP==1 167 170 Void codeVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 223 226 Void codeDFFlag ( UInt uiCode, const Char *pSymbolName ); 224 227 Void codeDFSvlc ( Int iCode, const Char *pSymbolName ); 228 229 #if RWTH_SDC_DLT_B0036 230 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 231 Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 232 Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 233 #endif 225 234 226 235 }; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCfg.h
r193 r213 181 181 #endif 182 182 Bool m_bUseSAO; 183 #if LGE_ILLUCOMP_B0045 184 Bool m_bUseIC; 185 #endif 183 186 #if SAO_UNIT_INTERLEAVING 184 187 Int m_maxNumOffsetsPerPic; … … 194 197 Int m_iSearchRange; // 0:Full frame 195 198 Int m_bipredSearchRange; 196 199 #if DV_V_RESTRICTION_B0037 200 Bool m_bUseDisparitySearchRangeRestriction; 201 Int m_iVerticalDisparitySearchRange; 202 #endif 197 203 //====== Quality control ======== 198 204 Int m_iMaxDeltaQP; // Max. absolute delta QP (1:default) … … 264 270 #if HHI_MPI 265 271 Bool m_bUseMVI; 272 #endif 273 #if RWTH_SDC_DLT_B0036 274 Bool m_bUseDLT; 275 Bool m_bUseSDC; 266 276 #endif 267 277 … … 290 300 Int m_iColumnRowInfoPresent; 291 301 Int m_iUniformSpacingIdr; 292 #if FIX_REMOVE_TILE_DEPENDENCE293 #else294 Int m_iTileBoundaryIndependenceIdr;295 #endif296 302 Int m_iNumColumnsMinus1; 297 303 UInt* m_puiColumnWidth; … … 322 328 #endif 323 329 324 #if VIDYO_VPS_INTEGRATION 330 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 325 331 UInt m_layerId; 326 332 #endif … … 339 345 #endif 340 346 341 #if OL_DEPTHLIMIT_A0044 342 Bool m_bDepthPartitionLimiting; 347 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 348 Bool m_bUseDMM34; 349 #endif 350 351 #if OL_QTLIMIT_PREDCODING_B0068 352 Bool m_bUseQTLPC; 343 353 #endif 344 354 … … 483 493 Void setSearchRange ( Int i ) { m_iSearchRange = i; } 484 494 Void setBipredSearchRange ( Int i ) { m_bipredSearchRange = i; } 485 495 #if DV_V_RESTRICTION_B0037 496 Void setUseDisparitySearchRangeRestriction ( Bool b ) { m_bUseDisparitySearchRangeRestriction = b; } 497 Void setVerticalDisparitySearchRange ( Int i ) { m_iVerticalDisparitySearchRange = i; } 498 #endif 486 499 #if HHI_INTER_VIEW_MOTION_PRED 487 500 UInt getMultiviewMvRegMode () { return m_uiMultiviewMvRegMode; } … … 574 587 Int getFastSearch () { return m_iFastSearch; } 575 588 Int getSearchRange () { return m_iSearchRange; } 576 589 #if DV_V_RESTRICTION_B0037 590 Bool getUseDisparitySearchRangeRestriction () { return m_bUseDisparitySearchRangeRestriction; } 591 Int getVerticalDisparitySearchRange () { return m_iVerticalDisparitySearchRange; } 592 #endif 577 593 #if HHI_VSO 578 594 //==== VSO ========== … … 716 732 Void setUseMVI ( Bool bVal ) {m_bUseMVI = bVal;} 717 733 #endif 734 #if RWTH_SDC_DLT_B0036 735 Void setUseDLT ( Bool b ) { m_bUseDLT = b; } 736 Void setUseSDC ( Bool b ) { m_bUseSDC = b; } 737 #endif 718 738 Void setUseSAO ( Bool bVal ) {m_bUseSAO = bVal;} 719 739 Bool getUseSAO () {return m_bUseSAO;} 740 #if LGE_ILLUCOMP_B0045 741 Void setUseIC ( Bool bVal ) {m_bUseIC = bVal;} 742 Bool getUseIC () {return m_bUseIC;} 743 #endif 720 744 #if SAO_UNIT_INTERLEAVING 721 745 Void setMaxNumOffsetsPerPic (Int iVal) { m_maxNumOffsetsPerPic = iVal; } … … 837 861 Int getTSIG() { return m_signHidingThreshold; } 838 862 #endif 839 #if VIDYO_VPS_INTEGRATION 863 #if VIDYO_VPS_INTEGRATION |QC_MVHEVC_B0046 840 864 Void setLayerId ( UInt layerId ) { m_layerId = layerId; } 841 865 UInt getLayerId () { return m_layerId; } … … 852 876 #endif 853 877 854 #if OL_DEPTHLIMIT_A0044 855 Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; } 856 Bool getUseDPL() {return m_bDepthPartitionLimiting;} 878 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 879 Void setUseDMM34( Bool b) { m_bUseDMM34 = b; } 880 Bool getUseDMM34() { return m_bUseDMM34; } 881 #endif 882 883 #if OL_QTLIMIT_PREDCODING_B0068 884 Void setUseQTLPC( Bool b ) { m_bUseQTLPC = b; } 885 Bool getUseQTLPC() { return m_bUseQTLPC; } 886 #endif 887 888 #if RWTH_SDC_DLT_B0036 889 Bool getUseDLT() { return m_bUseDLT; } 890 Bool getUseSDC() { return m_bUseSDC; } 857 891 #endif 858 892 … … 863 897 Void setCodedOffset ( Int** p ) { m_aaiCodedOffset = p; } 864 898 865 #if SONY_COLPIC_AVAILABILITY 899 #if SONY_COLPIC_AVAILABILITY || VSP_N 866 900 Int getViewOrderIdx () { return m_iViewOrderIdx; } 867 901 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r193 r213 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 #if OL_QTLIMIT_PREDCODING_B0068 454 TComSPS *sps = pcPic->getSlice(0)->getSPS(); 455 TComPic *pcTexture = rpcBestCU->getSlice()->getTexturePic(); 456 457 Bool depthMapDetect = (pcTexture != NULL); 458 Bool bIntraSliceDetect = (rpcBestCU->getSlice()->getSliceType() == I_SLICE); 459 460 Bool bTry2NxN = true; 461 Bool bTryNx2N = true; 462 #endif 463 483 464 // get Original YUV data from picture 484 465 m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() ); 485 466 #if FORCE_REF_VSP 486 Bool bWholeCUCanBeSynthesized = false;467 //Bool bWholeCUCanBeSynthesized = false; 487 468 //Bool bOneSubCUCanNotBeSynthesied = false; 488 469 Bool bSubCUCanBeSynthesized[4]; … … 506 487 if(iSubCUCanBeSynthesizedCnt == 4) 507 488 { 508 bWholeCUCanBeSynthesized = true;489 //bWholeCUCanBeSynthesized = true; 509 490 } 510 491 //else if(iSubCUCanBeSynthesizedCnt == 3) … … 543 524 UInt uiTPelY = rpcBestCU->getCUPelY(); 544 525 UInt uiBPelY = uiTPelY + rpcBestCU->getHeight(0) - 1; 526 527 #if LGE_ILLUCOMP_B0045 528 Bool bICEnabled = (!rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewId()); 529 530 bICEnabled = bICEnabled && rpcTempCU->getSlice()->getApplyIC(); 531 #endif 545 532 546 533 #if HHI_INTERVIEW_SKIP … … 650 637 // variables for fast encoder decision 651 638 bEarlySkip = false; 652 bTrySplit 639 bTrySplit = true; 653 640 fRD_Skip = MAX_DOUBLE; 654 641 655 642 rpcTempCU->initEstData( uiDepth, iQP ); 656 643 657 #if OL_ DEPTHLIMIT_A0044644 #if OL_QTLIMIT_PREDCODING_B0068 658 645 //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 646 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 647 { 648 TComDataCU* pcTextureCU = pcTexture->getCU( rpcBestCU->getAddr() ); //Corresponding texture LCU 649 UInt uiCUIdx = rpcBestCU->getZorderIdxInCU(); 650 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); //Depth cannot be more partitionned than the texture. 651 if (pcTextureCU->getDepth(uiCUIdx) > uiDepth || pcTextureCU->getPartitionSize(uiCUIdx) == SIZE_NxN) //Texture was split. 667 652 { 668 653 bTrySplit = true; 669 bTryNx2N = true; 670 bTry2NxN = true; 671 //uiPrevTexPartIndex = pcTexture->getTexPartIndex(); 672 pcTexture->incrementTexPartIndex(); 654 bTryNx2N = true; 655 bTry2NxN = true; 673 656 } 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) 657 else 706 658 { 707 659 bTrySplit = false; 708 bTryNx2N = false;709 bTry2NxN = false;660 bTryNx2N = false; 661 bTry2NxN = false; 710 662 } 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 663 } 664 #endif 730 665 731 666 // do inter modes, SKIP and 2Nx2N … … 750 685 { 751 686 Bool bResPredFlag = ( uiResPrdId > 0 ); 752 #endif 753 #if HHI_INTER_VIEW_RESIDUAL_PRED 754 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 755 #endif 756 // SKIP 687 #if LGE_ILLUCOMP_B0045 688 for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++) 689 { 690 Bool bICFlag = (uiICId ? true : false); 691 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 692 #endif 693 #endif 694 #if HHI_INTER_VIEW_RESIDUAL_PRED 695 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 696 #endif 697 // SKIP 757 698 #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 ] ) 699 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, bFullyRenderedSec ); 700 #else 701 xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU ); 702 #endif 703 rpcTempCU->initEstData( uiDepth, iQP ); 704 705 // fast encoder decision for early skip 706 if ( m_pcEncCfg->getUseFastEnc() ) 769 707 { 770 bEarlySkip = true; 771 bTrySplit = false; 708 Int iIdx = g_aucConvertToBit[ rpcBestCU->getWidth(0) ]; 709 if ( aiNum [ iIdx ] > 5 && fRD_Skip < EARLY_SKIP_THRES*afCost[ iIdx ]/aiNum[ iIdx ] ) 710 { 711 bEarlySkip = true; 712 bTrySplit = false; 713 } 772 714 } 773 } 774 775 // 2Nx2N, NxN 776 if ( !bEarlySkip ) 777 { 778 #if HHI_INTER_VIEW_RESIDUAL_PRED 779 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 715 #if LGE_ILLUCOMP_B0045_ENCSIMP 716 if(bICFlag && rpcBestCU->getMergeFlag(0) && !rpcBestCU->getICFlag(0)) 717 { 718 bICEnabled = false; 719 break; 720 } 721 #endif 722 723 // 2Nx2N, NxN 724 if ( !bEarlySkip ) 725 { 726 #if HHI_INTER_VIEW_RESIDUAL_PRED 727 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 780 728 #endif 781 729 #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 }730 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec ); 731 732 #else 733 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 734 #endif 735 rpcTempCU->initEstData( uiDepth, iQP ); 736 if(m_pcEncCfg->getUseCbfFastMode()) 737 { 738 doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0; 739 } 792 740 793 741 #if FORCE_REF_VSP==1 794 742 #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 );743 if( rpcBestCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 744 #else 745 if( !rpcBestCU->getSlice()->getVspDepthDisableFlag() || !rpcBestCU->getSlice()->getSPS()->isDepth() ) 746 #endif 747 if( bWholeCUCanBeSynthesized ) 748 { 749 #if HHI_INTER_VIEW_RESIDUAL_PRED 750 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 803 751 #endif 804 752 #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 ); 753 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP 754 #else 755 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 756 #endif 757 rpcTempCU->initEstData( uiDepth, iQP ); 758 } 759 //#else 760 // if( bWholeCUCanBeSynthesized ) // To avoid compiling warning 761 // { 762 // } 763 #endif 810 764 } 811 #else 812 if( bWholeCUCanBeSynthesized ) // To avoid compiling warning 813 { 814 } 815 #endif 765 #if LGE_ILLUCOMP_B0045 816 766 } 767 #endif 817 768 #if HHI_INTER_VIEW_RESIDUAL_PRED 818 769 } // uiResPrdId … … 820 771 } // != I_SLICE 821 772 822 #if OL_DEPTHLIMIT_A0044823 #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 773 #if LGE_ILLUCOMP_B0045_ENCSIMP 774 bICEnabled = rpcBestCU->getICFlag(0); 775 #endif 776 777 #if OL_QTLIMIT_PREDCODING_B0068 778 if(depthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC()) 828 779 { 829 780 bTrySplitDQP = bTrySplit; … … 831 782 else 832 783 { 784 #endif 833 785 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 834 786 { … … 842 794 bTrySplitDQP = bTrySplit; 843 795 } 844 } 845 #else 846 847 if( (g_uiMaxCUWidth>>uiDepth) >= rpcTempCU->getSlice()->getPPS()->getMinCuDQPSize() ) 848 { 849 if(iQP == iBaseQP) 850 { 851 bTrySplitDQP = bTrySplit; 852 } 853 } 854 else 855 { 856 bTrySplitDQP = bTrySplit; 857 } 858 #endif 796 #if OL_QTLIMIT_PREDCODING_B0068 797 } 798 #endif 799 859 800 #if LOSSLESS_CODING 860 801 if (isAddLowestQP && (iQP == lowestQP)) … … 897 838 { 898 839 Bool bResPredFlag = ( uiResPrdId > 0 ); 899 #endif 900 // 2Nx2N, NxN 901 if ( !bEarlySkip ) 840 #if LGE_ILLUCOMP_B0045 841 for(UInt uiICId = 0; uiICId < (bICEnabled ? 2 : 1); uiICId++) 902 842 { 903 904 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 843 Bool bICFlag = (uiICId ? true : false); 844 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uiDepth); 845 #endif 846 #endif 847 // 2Nx2N, NxN 848 if ( !bEarlySkip ) 905 849 { 906 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 850 851 if(!( rpcBestCU->getSlice()->getSPS()->getDisInter4x4() && (rpcBestCU->getWidth(0)==8) && (rpcBestCU->getHeight(0)==8) )) 907 852 { 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 853 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && doNotBlockPu) 914 854 { 915 if (bTrySplit) 855 #if OL_QTLIMIT_PREDCODING_B0068 //try InterNxN 856 if(bTrySplit) 916 857 { 917 858 #endif … … 925 866 #endif 926 867 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 868 #if OL_QTLIMIT_PREDCODING_B0068 869 } 870 #endif 871 } 943 872 } 944 873 } 945 } 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 954 { 955 if (bTryNx2N) 874 875 { // 2NxN, Nx2N 876 #if OL_QTLIMIT_PREDCODING_B0068 //try Nx2N 877 if(bTryNx2N) 956 878 { 957 879 #endif … … 972 894 } 973 895 } 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 } 896 #if OL_QTLIMIT_PREDCODING_B0068 994 897 } 995 } 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 1004 { 1005 if (bTry2NxN) 898 #endif 899 900 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxN 901 if(bTry2NxN) 1006 902 { 1007 903 #endif … … 1022 918 } 1023 919 } 1024 #if OL_DEPTHLIMIT_A0044 1025 }//bTryNx2N 1026 }//depthMapDetect 1027 else//do things normally 920 #if OL_QTLIMIT_PREDCODING_B0068 921 } 922 #endif 923 } 924 925 #if 1 926 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 927 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 1028 928 { 1029 if(doNotBlockPu) 929 #if AMP_ENC_SPEEDUP 930 Bool bTestAMP_Hor = false, bTestAMP_Ver = false; 931 932 #if AMP_MRG 933 Bool bTestMergeAMP_Hor = false, bTestMergeAMP_Ver = false; 934 935 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver, bTestMergeAMP_Hor, bTestMergeAMP_Ver); 936 #else 937 deriveTestModeAMP (rpcBestCU, eParentPartSize, bTestAMP_Hor, bTestAMP_Ver); 938 #endif 939 940 //! Do horizontal AMP 941 if ( bTestAMP_Hor ) 1030 942 { 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 } 1044 } 1045 } 1046 #endif 1047 } 1048 1049 #if 1 1050 //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1051 if( pcPic->getSlice(0)->getSPS()->getAMPAcc(uiDepth) ) 1052 { 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 ) 1066 { 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 1073 { 1074 if (bTry2NxN) 943 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD 944 if(bTry2NxN) 1075 945 { 1076 946 #endif … … 1107 977 } 1108 978 } 1109 #if OL_DEPTHLIMIT_A0044 1110 }//bTry2NxN 1111 }//depthMapDetect 1112 else//do things normally 979 #if OL_QTLIMIT_PREDCODING_B0068 980 } 981 #endif 982 } 983 #if AMP_MRG 984 else if ( bTestMergeAMP_Hor ) 1113 985 { 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 } 1146 } 1147 #endif 1148 } 1149 #if AMP_MRG 1150 else if ( bTestMergeAMP_Hor ) 1151 { 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) 986 #if OL_QTLIMIT_PREDCODING_B0068 //try 2NxnU & 2NxnD Merge 987 if(bTry2NxN) 1160 988 { 1161 989 #endif … … 1192 1020 } 1193 1021 } 1194 #if OL_DEPTHLIMIT_A0044 1195 }//bTry2NxN 1196 }//depthMapDetect 1197 else//do things normally 1022 #if OL_QTLIMIT_PREDCODING_B0068 1023 } 1024 #endif 1025 } 1026 #endif 1027 1028 //! Do horizontal AMP 1029 if ( bTestAMP_Ver ) 1198 1030 { 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 1234 } 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) 1031 #if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N 1032 if(bTryNx2N) 1248 1033 { 1249 1034 #endif … … 1276 1061 rpcTempCU->initEstData( uiDepth, iQP ); 1277 1062 } 1278 #if OL_DEPTHLIMIT_A0044 1279 }//bTryNx2N 1280 }//depthMapDetect 1281 else//do things normally 1063 #if OL_QTLIMIT_PREDCODING_B0068 1064 } 1065 #endif 1066 } 1067 #if AMP_MRG 1068 else if ( bTestMergeAMP_Ver ) 1282 1069 { 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 } 1314 #if AMP_MRG 1315 else if ( bTestMergeAMP_Ver ) 1316 { 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 1323 { 1324 if (bTryNx2N) 1070 #if OL_QTLIMIT_PREDCODING_B0068 //try nLx2N & nRx2N (Merge) 1071 if(bTryNx2N) 1325 1072 { 1326 1073 #endif … … 1353 1100 rpcTempCU->initEstData( uiDepth, iQP ); 1354 1101 } 1355 #if OL_ DEPTHLIMIT_A00441356 } //bTryNx2N1357 }//depthMapDetect 1358 else//do things normally1359 { 1360 if(doNotBlockPu) 1361 { 1362 #if HHI_INTER_VIEW_RESIDUAL_PRED 1363 1102 #if OL_QTLIMIT_PREDCODING_B0068 1103 } 1104 #endif 1105 } 1106 #endif 1107 1108 #else 1109 #if HHI_INTER_VIEW_RESIDUAL_PRED 1110 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1364 1111 #endif 1365 1112 #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 ); 1113 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU, bFullyRenderedSec ); 1114 #else 1115 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 1116 #endif 1117 rpcTempCU->initEstData( uiDepth, iQP ); 1118 #if HHI_INTER_VIEW_RESIDUAL_PRED 1119 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1380 1120 #endif 1381 1121 #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 } 1388 } 1389 #endif 1390 } 1391 #endif 1392 1393 #else 1394 #if HHI_INTER_VIEW_RESIDUAL_PRED 1395 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1122 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD, bFullyRenderedSec ); 1123 #else 1124 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 1125 #endif 1126 rpcTempCU->initEstData( uiDepth, iQP ); 1127 #if HHI_INTER_VIEW_RESIDUAL_PRED 1128 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1396 1129 #endif 1397 1130 #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 );1131 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N, bFullyRenderedSec ); 1132 #else 1133 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 1134 #endif 1135 rpcTempCU->initEstData( uiDepth, iQP ); 1136 #if HHI_INTER_VIEW_RESIDUAL_PRED 1137 rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag ); 1405 1138 #endif 1406 1139 #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) 1140 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N, bFullyRenderedSec ); 1141 #else 1142 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 1143 #endif 1144 rpcTempCU->initEstData( uiDepth, iQP ); 1145 1146 #endif 1147 } //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N) 1148 #endif 1149 #if LGE_ILLUCOMP_B0045 1150 } 1433 1151 #endif 1434 1152 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 1457 1175 #endif 1458 1176 { 1177 #if LGE_ILLUCOMP_B0045 1178 rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth); 1179 #endif 1459 1180 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); 1460 1181 rpcTempCU->initEstData( uiDepth, iQP ); 1461 1182 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 1462 1183 { 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 1184 #if OL_QTLIMIT_PREDCODING_B0068 //Try IntraNxN 1185 if(bTrySplit) 1469 1186 { 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 { 1187 #endif 1484 1188 if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) ) 1485 1189 { 1190 #if LGE_ILLUCOMP_B0045 1191 rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth); 1192 #endif 1486 1193 xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN ); 1487 1194 rpcTempCU->initEstData( uiDepth, iQP ); 1488 1195 } 1196 #if OL_QTLIMIT_PREDCODING_B0068 1489 1197 } 1490 1198 #endif … … 1507 1215 #endif 1508 1216 { 1217 #if LGE_ILLUCOMP_B0045 1218 rpcTempCU->setICFlagSubParts(false, 0, 0, uiDepth); 1219 #endif 1509 1220 xCheckIntraPCM (rpcBestCU, rpcTempCU); 1510 1221 rpcTempCU->initEstData( uiDepth, iQP ); … … 1694 1405 1695 1406 #if HHI_VSO 1696 #if HHI_VSO_SET_OPTIM1697 #else1698 if( m_pcRdCost->getUseRenModel() ) // necessary ??1699 {1700 UInt uiWidth = m_ppcRecoYuvBest[uhNextDepth]->getWidth ( );1701 UInt uiHeight = m_ppcRecoYuvBest[uhNextDepth]->getHeight ( );1702 Pel* piSrc = m_ppcRecoYuvBest[uhNextDepth]->getLumaAddr( 0 );1703 UInt uiSrcStride = m_ppcRecoYuvBest[uhNextDepth]->getStride ( );1704 m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );1705 }1706 #endif1707 1407 #endif 1708 1408 } … … 2145 1845 #if HHI_MPI 2146 1846 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 2147 {1847 { 2148 1848 #endif 2149 1849 if( !pcCU->getSlice()->isIntra() ) … … 2164 1864 } 2165 1865 #if HHI_MPI 2166 }1866 } 2167 1867 #endif 2168 1868 … … 2172 1872 #endif 2173 1873 { 2174 #if OL_DEPTHLIMIT_A00442175 if(pcCU->getPartDumpFlag())2176 {2177 pcCU->updatePartInfo(0,uiDepth);2178 pcCU->incrementPartInfo();2179 }2180 #endif2181 1874 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 ); 1875 #if LGE_ILLUCOMP_B0045 1876 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1877 #endif 2182 1878 #if HHI_INTER_VIEW_RESIDUAL_PRED 2183 1879 m_pcEntropyCoder->encodeResPredFlag( pcCU, uiAbsPartIdx, 0 ); … … 2217 1913 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 2218 1914 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1915 #if LGE_ILLUCOMP_B0045 1916 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1917 #endif 2219 1918 #if HHI_INTER_VIEW_RESIDUAL_PRED 2220 1919 if( !pcCU->isIntra( uiAbsPartIdx ) ) … … 2260 1959 Bool bResPrdAvail = rpcTempCU->getResPredAvail( 0 ); 2261 1960 Bool bResPrdFlag = rpcTempCU->getResPredFlag ( 0 ); 1961 #endif 1962 #if LGE_ILLUCOMP_B0045 1963 Bool bICFlag = rpcTempCU->getICFlag(0); 2262 1964 #endif 2263 1965 … … 2335 2037 rpcTempCU->setResPredFlagSubParts ( bResPrdFlag, 0, 0, uhDepth ); 2336 2038 #endif 2039 #if LGE_ILLUCOMP_B0045 2040 rpcTempCU->setICFlagSubParts(bICFlag, 0, 0, uhDepth); 2041 #endif 2337 2042 2338 2043 // do MC 2339 2044 #if HHI_INTERVIEW_SKIP 2340 if ( (uiNoResidual == 0) || bSkipRes ){ 2341 #else 2342 if ( uiNoResidual == 0 ){ 2343 #endif 2045 if ( (uiNoResidual == 0) || bSkipRes ) 2046 #else 2047 if ( uiNoResidual == 0 ) 2048 #endif 2049 { 2344 2050 m_pcPredSearch->motionCompensation ( rpcTempCU, m_ppcPredYuvTemp[uhDepth] ); 2345 2051 // save pred adress … … 2584 2290 m_ppcRecoYuvTemp[uiDepth]->copyToPicLuma(rpcTempCU->getPic()->getPicYuvRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU() ); 2585 2291 2292 #if RWTH_SDC_DLT_B0036 2293 if( !rpcTempCU->getSDCFlag( 0 ) ) 2294 #endif 2586 2295 m_pcPredSearch ->estIntraPredChromaQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth], uiPreCalcDistC ); 2587 2296 … … 3052 2761 assert( bRecursiveCall == ( uhDepth != uhTextureModeDepth ) ); 3053 2762 2763 #if !MTK_UNCONSTRAINED_MVI_B0083 3054 2764 if( uhDepth == uhTextureModeDepth ) 3055 2765 { … … 3092 2802 } 3093 2803 } 2804 #endif 3094 2805 3095 2806 #if HHI_VSO … … 3197 2908 rpcTempCU->setTextureModeDepthSubParts( uhTextureModeDepth, 0, uhDepth ); 3198 2909 rpcTempCU->copyTextureMotionDataFrom( pcTextureCU, uhDepth, rpcTempCU->getZorderIdxInCU() ); 2910 #if FIX_MPI_B0065 2911 UInt uiAbsPartIdx = rpcTempCU->getZorderIdxInCU(); 2912 if( rpcTempCU->getDepth(0) > pcTextureCU->getDepth(uiAbsPartIdx)) 2913 { 2914 rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth ); 2915 } 2916 else 2917 { 2918 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 2919 rpcTempCU->setPartSizeSubParts( partSize, 0, uhDepth ); 2920 } 2921 #else 3199 2922 rpcTempCU->setPartSizeSubParts( SIZE_NxN, 0, uhDepth ); 2923 #endif 3200 2924 for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ ) 3201 2925 { … … 3302 3026 { 3303 3027 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 3028 #if LGE_ILLUCOMP_B0045 3029 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 3030 #endif 3304 3031 } 3305 3032 else … … 3309 3036 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 3310 3037 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 3038 #if LGE_ILLUCOMP_B0045 3039 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 3040 #endif 3311 3041 } 3312 3042 xRestoreDepthWidthHeight( pcCU ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r193 r213 121 121 } 122 122 123 #if VIDYO_VPS_INTEGRATION 123 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 124 124 Void TEncEntropy::encodeVPS( TComVPS* pcVPS ) 125 125 { … … 129 129 #endif 130 130 131 #if VIDYO_VPS_INTEGRATION 131 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 132 132 Void codeVPS ( TComVPS* pcVPS ); 133 133 #endif … … 169 169 } 170 170 171 #if LGE_ILLUCOMP_B0045 172 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 173 { 174 if (pcCU->isIntra(uiAbsPartIdx) || (pcCU->getSlice()->getViewId() == 0) || pcCU->getSlice()->getSPS()->isDepth()) 175 { 176 return; 177 } 178 179 if(!pcCU->getSlice()->getApplyIC()) 180 return; 181 182 if( bRD ) 183 { 184 uiAbsPartIdx = 0; 185 } 186 187 if(pcCU->isICFlagRequired(uiAbsPartIdx)) 188 m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx ); 189 } 190 #endif 171 191 172 192 #if FORCE_REF_VSP==1 … … 900 920 #endif 901 921 922 #if !RWTH_SDC_DLT_B0036 902 923 if ( pcCU->getSlice()->isIntra() ) 903 924 { 904 925 return; 905 926 } 927 #endif 906 928 907 929 m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx ); 930 931 #if RWTH_SDC_DLT_B0036 932 // if B-Slice, code SDC flag later 933 if( !pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) ) 934 { 935 // encode SDC flag 936 encodeSDCFlag(pcCU, uiAbsPartIdx, bRD); 937 } 938 #endif 908 939 } 909 940 … … 950 981 } 951 982 #endif 983 #if RWTH_SDC_DLT_B0036 984 if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx) ) 985 { 986 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 987 return; 988 } 989 #endif 990 952 991 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth ); 992 993 #if RWTH_SDC_DLT_B0036 994 // code SDC flag now! 995 if( pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->isDepth() ) 996 { 997 // encode SDC flag 998 encodeSDCFlag(pcCU, uiAbsPartIdx, bRD); 999 1000 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 1001 { 1002 // part size is also known for SDC intra 1003 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 1004 } 1005 } 1006 #endif 953 1007 } 954 1008 … … 967 1021 return; 968 1022 } 1023 1024 #if RWTH_SDC_DLT_B0036 1025 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 1026 { 1027 return; 1028 } 1029 #endif 969 1030 970 1031 if( bRD ) … … 1301 1362 uiAbsPartIdx = 0; 1302 1363 } 1364 1365 #if RWTH_SDC_DLT_B0036 1366 if( pcCU->getSDCFlag(uiAbsPartIdx) ) 1367 { 1368 encodeSDCPredMode(pcCU, uiAbsPartIdx, bRD); 1369 return; 1370 } 1371 #endif 1303 1372 1304 1373 #if FORCE_REF_VSP==1 … … 1647 1716 pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode ); 1648 1717 1718 #if RWTH_SDC_DLT_B0036 1719 if( pcCU->getSDCFlag( uiAbsPartIdx ) ) 1720 { 1721 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 1722 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 1723 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 1724 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 1725 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 1726 1727 encodeSDCResidualData(pcCU, uiAbsPartIdx); 1728 return; 1729 } 1730 #endif 1731 1649 1732 if( pcCU->isIntra(uiAbsPartIdx) ) 1650 1733 { … … 1690 1773 } 1691 1774 1775 #if FIX_MPI_B0065 1776 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1777 { 1778 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ); 1779 if( uiDepth == pcTextureCU->getDepth(uiAbsPartIdx)) 1780 { 1781 PartSize partSize = pcTextureCU->getPartitionSize(uiAbsPartIdx); 1782 pcCU->setPartSizeSubParts( partSize, uiAbsPartIdx, uiDepth ); 1783 } 1784 else 1785 { 1786 pcCU->setPartSizeSubParts( SIZE_NxN, uiAbsPartIdx, uiDepth ); 1787 } 1788 } 1789 #endif 1790 1692 1791 #if UNIFIED_TRANSFORM_TREE 1693 1792 UInt temp = 0; … … 1698 1797 xEncodeCoeff( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, uiLumaTrMode, bCodeDQP ); 1699 1798 #endif // UNIFIED_TRANSFORM_TREE 1799 1800 #if FIX_MPI_B0065 1801 if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER && pcCU->getMergeFlag( uiAbsPartIdx ) && pcCU->getMergeIndex( uiAbsPartIdx ) == 0 && pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N && pcCU->getTextureModeDepth( uiAbsPartIdx ) != -1 ) 1802 { 1803 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 1804 } 1805 #endif 1700 1806 } 1701 1807 … … 2022 2128 } 2023 2129 2130 #if RWTH_SDC_DLT_B0036 2131 Void TEncEntropy::encodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 2132 { 2133 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2134 2135 if( bRD ) 2136 uiAbsPartIdx = 0; 2137 2138 m_pcEntropyCoderIf->codeSDCPredMode(pcCU, uiAbsPartIdx); 2139 } 2140 2141 Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 2142 { 2143 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2144 2145 if( bRD ) 2146 uiAbsPartIdx = 0; 2147 2148 m_pcEntropyCoderIf->codeSDCFlag(pcCU, uiAbsPartIdx); 2149 } 2150 2151 Void TEncEntropy::encodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 2152 { 2153 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2154 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 ); 2155 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 ); 2156 assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 ); 2157 assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 ); 2158 2159 if( bRD ) 2160 uiAbsPartIdx = 0; 2161 2162 // number of segments depends on prediction mode for INTRA 2163 UInt uiNumSegments = 2; 2164 UInt uiLumaPredMode = pcCU->getLumaIntraDir( uiAbsPartIdx ); 2165 if( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX ) 2166 uiNumSegments = 1; 2167 2168 // encode residual data for each segment 2169 for( UInt uiSeg = 0; uiSeg < uiNumSegments; uiSeg++ ) 2170 m_pcEntropyCoderIf->codeSDCResidualData(pcCU, uiAbsPartIdx, uiSeg); 2171 } 2172 #endif 2173 2024 2174 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncEntropy.h
r166 r213 76 76 virtual UInt getCoeffCost () = 0; 77 77 78 #if VIDYO_VPS_INTEGRATION 78 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 79 79 virtual Void codeVPS ( TComVPS* pcVPS ) = 0; 80 80 #endif … … 115 115 116 116 virtual Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 117 #if LGE_ILLUCOMP_B0045 118 virtual Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 119 #endif 117 120 #if FORCE_REF_VSP==1 118 121 virtual Void codeVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; … … 127 130 virtual Void codePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 128 131 virtual Void codePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 132 133 #if RWTH_SDC_DLT_B0036 134 virtual Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 135 virtual Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0; 136 virtual Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0; 137 #endif 129 138 130 139 #if BURST_IPCM … … 236 245 237 246 public: 238 #if VIDYO_VPS_INTEGRATION 247 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 239 248 Void encodeVPS ( TComVPS* pcVPS); 240 249 #endif … … 253 262 254 263 Void encodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false ); 264 #if LGE_ILLUCOMP_B0045 265 Void encodeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 266 #endif 255 267 Void encodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 256 268 #if FORCE_REF_VSP==1 … … 302 314 Void encodeScalingList ( TComScalingList* scalingList ); 303 315 Void encodeDFParams (TComAPS* pcAPS); 316 317 #if RWTH_SDC_DLT_B0036 318 Void encodeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 319 Void encodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 320 Void encodeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false ); 321 #endif 304 322 305 323 private: -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
r193 r213 246 246 247 247 std::vector<TComAPS>& vAPS = m_pcEncTop->getAPS(); 248 #if VIDYO_VPS_INTEGRATION 248 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 249 249 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, uiPOCCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getEncTop()->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 250 250 #else … … 298 298 if( pcSlice->getSliceType() == B_SLICE ) 299 299 { 300 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 301 } 300 #if QC_REM_IDV_B0046 301 if( m_pcCfg->getGOPEntry(pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 302 #else 303 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 304 #endif 305 } 302 306 303 307 // Set the nal unit type … … 333 337 334 338 #if VSP_SLICE_HEADER && VSP_CFG 339 #if QC_REM_IDV_B0046 340 pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_numVSPRefPics ); 341 #else 335 342 pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numVSPRefPics ); 343 #endif 336 344 pcSlice->setVspFlag( m_pcEncTop->getUseVSP() && pcSlice->getNumVspRefPics() > 0 ); 337 345 for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ ) 338 346 { 347 #if QC_REM_IDV_B0046 348 pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] ); 349 #else 339 350 pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] ); 351 #endif 340 352 if( pcSlice->getSliceType() == B_SLICE ) 341 353 { 354 #if QC_REM_IDV_B0046 355 pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( pcSlice->getSPS()->getViewId() && ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA))? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] ); 356 #else 342 357 pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] ); 358 #endif 343 359 } 344 360 } … … 361 377 || pcSlice->getVspRefPos( REF_PIC_LIST_1, 0 ) == 0 362 378 ) ? 0 : 1 ); 379 #if !QC_REM_IDV_B0046 363 380 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 381 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) ) ); 382 #else 383 Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 384 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) ); 385 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) ); 386 #endif 365 387 #else 366 388 Int NumberOfVspRefs = ( ( pcPic->getViewId()==0 367 389 || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth()) 368 390 #if VSP_SLICE_HEADER 369 || ! pcSlice->getVspFlag()391 || !m_pcEncTop->getUseVSP() 370 392 #endif 371 393 ) ? 0 : 1 ); 394 #if !QC_REM_IDV_B0046 372 395 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) ) ); 373 396 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 375 #else 397 #else 398 Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 399 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) ); 400 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) ); 401 #endif 402 #endif 403 #else 404 #if !QC_REM_IDV_B0046 376 405 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()) ) ); 377 406 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 378 #endif 379 407 #else 408 409 Bool bNalRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 410 pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 411 pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( bNalRAP ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) ); 412 #endif 413 #endif 380 414 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 381 415 refPicListModification->setRefPicListModificationFlagL0( false ); … … 396 430 assert( tAppEncTop != NULL ); 397 431 432 433 #if FLEX_CODING_ORDER_M23723 434 TComPic * pcTexturePic; 435 if(m_pcEncTop->getIsDepth() == 1) 436 { 437 TComPicYuv * recText; 438 recText = tAppEncTop->getPicYuvFromView(m_pcEncTop->getViewId(), pcSlice->getPOC(), false ,true); 439 if(recText == NULL) 440 { 441 pcSlice->setTexturePic(NULL); 442 } 443 else 444 { 445 pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL; 446 pcSlice->setTexturePic( pcTexturePic ); 447 } 448 } 449 else 450 { 451 pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL; 452 assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL ); 453 pcSlice->setTexturePic( pcTexturePic ); 454 } 455 456 #else 398 457 TComPic * const pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( m_pcEncTop->getViewId(), pcSlice->getPOC(), false ) : NULL; 399 458 assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL ); 400 459 pcSlice->setTexturePic( pcTexturePic ); 401 460 461 #endif 402 462 std::vector<TComPic*> apcInterViewRefPics = tAppEncTop->getInterViewRefPics( m_pcEncTop->getViewId(), pcSlice->getPOC(), m_pcEncTop->getIsDepth(), pcSlice->getSPS() ); 403 463 #if VSP_N … … 418 478 m_pcEncTop->getVSPBuf()->getCurrSlice()->setPOC( pcPic->getPOC() ); 419 479 m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewId( pcPic->getViewId() ); 480 m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewOrderIdx( m_pcEncTop->getViewOrderIdx() ); 420 481 } 421 482 … … 435 496 if( pcSlice->getSliceType() == B_SLICE ) 436 497 { 498 #if !QC_REM_IDV_B0046 437 499 if( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 500 #else 501 Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR)) && (pcSlice->getSPS()->getViewId()) ? 1: 0; 502 if( m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ).m_sliceType == 'P' ) { pcSlice->setSliceType( P_SLICE ); } 503 #endif 438 504 } 439 505 … … 521 587 #endif 522 588 523 #if HHI_VSO_SPEEDUP_A0033524 #else525 if ( iVSOMode == 4 )526 {527 m_pcEncTop->getEncTop()->setupRenModel( pcSlice->getPOC(), pcSlice->getViewId(), m_pcEncTop->isDepthCoder() ? 1 : 0 );528 }529 else530 {531 AOT(true);532 }533 #endif534 589 535 590 #if SAIT_VSO_EST_A0033 536 m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true ) ); 537 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 591 #ifdef FLEX_CODING_ORDER_M23723 592 { 593 Bool flagRec; 594 flagRec = ((m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true) == NULL) ? false: true); 595 m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, flagRec ) ); 596 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 597 } 598 #else 599 m_pcRdCost->setVideoRecPicYuv( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), false, true ) ); 600 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 601 #endif 538 602 #endif 539 603 #if LGE_WVSO_A0119 … … 780 844 // init view component and predict virtual depth map 781 845 m_pcDepthMapGenerator->initViewComponent( pcPic ); 782 #if !QC_MULTI_DIS_CAN 846 #if !QC_MULTI_DIS_CAN_A0097 783 847 m_pcDepthMapGenerator->predictDepthMap ( pcPic ); 784 848 #endif … … 791 855 #endif 792 856 857 #if QC_SIMPLE_NBDV_B0047 858 if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode()) 859 { 860 Int iColPoc = pcSlice->getRefPOC(RefPicList(pcSlice->getColDir()), pcSlice->getColRefIdx()); 861 pcPic->setRapbCheck(pcPic->getDisCandRefPictures(iColPoc)); 862 } 863 #endif 793 864 while(uiNextCUAddr<uiRealEndAddress) // determine slice boundaries 794 865 { … … 849 920 #endif 850 921 #if DEPTH_MAP_GENERATION 851 #if !QC_MULTI_DIS_CAN 922 #if !QC_MULTI_DIS_CAN_A0097 852 923 // update virtual depth map 853 924 m_pcDepthMapGenerator->updateDepthMap( pcPic ); … … 906 977 if ( m_bSeqFirst ) 907 978 { 908 #if VIDYO_VPS_INTEGRATION 979 #if QC_MVHEVC_B0046 980 if(!m_pcEncTop->getLayerId()) 981 { 982 #endif 983 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 909 984 { 910 985 OutputNALUnit nalu(NAL_UNIT_VPS, true, m_pcEncTop->getLayerId()); … … 916 991 #endif 917 992 #if NAL_REF_FLAG 918 #if VIDYO_VPS_INTEGRATION 993 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 919 994 OutputNALUnit nalu(NAL_UNIT_SPS, true, m_pcEncTop->getLayerId()); 920 995 #else … … 937 1012 938 1013 #if NAL_REF_FLAG 939 #if VIDYO_VPS_INTEGRATION 1014 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 1015 #if QC_MVHEVC_B0046 940 1016 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId()); 1017 #else 1018 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getLayerId()); 1019 #endif 941 1020 #else 942 1021 nalu = NALUnit(NAL_UNIT_PPS, true, m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth()); … … 949 1028 writeRBSPTrailingBits(nalu.m_Bitstream); 950 1029 accessUnit.push_back(new NALUnitEBSP(nalu)); 951 952 m_bSeqFirst = false; 953 } 1030 #if QC_MVHEVC_B0046 1031 } 1032 #endif 1033 m_bSeqFirst = false; 1034 } 954 1035 955 1036 /* use the main bitstream buffer for storing the marshalled picture */ … … 1069 1150 #if NAL_REF_FLAG 1070 1151 OutputNALUnit nalu( pcSlice->getNalUnitType(), pcSlice->isReferenced(), 1071 #if !VIDYO_VPS_INTEGRATION 1152 #if !VIDYO_VPS_INTEGRATION &!QC_MVHEVC_B0046 1072 1153 m_pcEncTop->getViewId(), m_pcEncTop->getIsDepth(), pcSlice->getTLayer() ); 1073 1154 #else … … 1206 1287 m_pcSbacCoder->load( &pcSbacCoders[0] ); 1207 1288 1289 1208 1290 pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength ); 1209 1291 if (!bEntropySlice) 1210 1292 { 1211 #if OL_DEPTHLIMIT_A0044 //start dumping partition information1212 m_pcSliceEncoder->setPartDumpFlag(1);1213 #endif1214 1293 pcSlice->setTileLocationCount ( 0 ); 1215 1294 m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info. 1216 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information1217 m_pcSliceEncoder->setPartDumpFlag(0);1218 #endif1219 1295 } 1220 1296 else 1221 1297 { 1222 #if OL_DEPTHLIMIT_A0044 //start dumping partition information1223 m_pcSliceEncoder->setPartDumpFlag(1);1224 #endif1225 1298 m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info. 1226 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information 1227 m_pcSliceEncoder->setPartDumpFlag(0); 1228 #endif 1229 } 1299 } 1300 1230 1301 1231 1302 { … … 1557 1628 { 1558 1629 #if NAL_REF_FLAG 1559 #if VIDYO_VPS_INTEGRATION 1630 #if VIDYO_VPS_INTEGRATION | QC_MVHEVC_B0046 1560 1631 OutputNALUnit nalu(NAL_UNIT_APS, true, m_pcEncTop->getLayerId()); 1561 1632 #else … … 1623 1694 1624 1695 #if NAL_REF_FLAG 1625 #if VIDYO_VPS_INTEGRATION 1696 #if VIDYO_VPS_INTEGRATION | QC_MVHEVC_B0046 1626 1697 OutputNALUnit nalu(NAL_UNIT_SEI, false, m_pcEncTop->getLayerId()); 1627 1698 #else … … 2061 2132 case NAL_UNIT_CODED_SLICE: return "SLICE"; 2062 2133 #if H0566_TLA 2134 #if !QC_REM_IDV_B0046 2063 2135 case NAL_UNIT_CODED_SLICE_IDV: return "IDV"; 2136 #endif 2064 2137 case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; 2065 2138 case NAL_UNIT_CODED_SLICE_TLA: return "TLA"; … … 2290 2363 if( bInterViewOnlySlice ) 2291 2364 { 2365 #if !QC_REM_IDV_B0046 2292 2366 return NAL_UNIT_CODED_SLICE_IDV; 2367 #else 2368 return NAL_UNIT_CODED_SLICE_IDR; 2369 #endif 2293 2370 } 2294 2371 else … … 2303 2380 if( bInterViewOnlySlice ) 2304 2381 { 2382 #if !QC_REM_IDV_B0046 2305 2383 return NAL_UNIT_CODED_SLICE_IDV; 2384 #else 2385 return NAL_UNIT_CODED_SLICE_CRA; 2386 #endif 2306 2387 } 2307 2388 else … … 2318 2399 if( bInterViewOnlySlice ) 2319 2400 { 2401 #if !QC_REM_IDV_B0046 2320 2402 return NAL_UNIT_CODED_SLICE_IDV; 2403 #else 2404 return NAL_UNIT_CODED_SLICE_IDR; 2405 #endif 2321 2406 } 2322 2407 else … … 2556 2641 2557 2642 // analyze inter-view modifications 2643 #if !QC_REM_IDV_B0046 2558 2644 GOPEntryMvc gem = m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ); 2645 #else 2646 Bool bRAP = ((getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDR) || (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_CRA)) && (pcSlice->getSPS()->getViewId()) ? 1:0; 2647 GOPEntryMvc gem = m_pcCfg->getGOPEntry( bRAP ? MAX_GOP : iGOPid ); 2648 #endif 2559 2649 Int numL0Modifications = 0; 2560 2650 Int numL1Modifications = 0; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.h
r193 r213 137 137 138 138 Void preLoopFilterPicAll ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits ); 139 #if HHI_VSO_SPEEDUP_A0033140 139 TEncTop* getEncTop() { return m_pcEncTop; } 141 #endif142 140 143 141 TEncSlice* getSliceEncoder() { return m_pcSliceEncoder; } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r193 r213 42 42 #include <algorithm> 43 43 44 #if RWTH_SDC_DLT_B0036 45 #define GetNumDepthValues() (pcCU->getSlice()->getSPS()->getNumDepthValues()) 46 #define GetBitsPerDepthValue() (pcCU->getSlice()->getSPS()->getBitsPerDepthValue()) 47 #endif 48 44 49 //! \ingroup TLibEncoder 45 50 //! \{ … … 60 65 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 61 66 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 67 #if LGE_ILLUCOMP_B0045 68 , m_cCUICFlagSCModel ( 1, 1, NUM_IC_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 69 #endif 62 70 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) 63 71 , m_cCUMergeIdxExtSCModel ( 1, 1, NUM_MERGE_IDX_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 106 114 , m_cDmmDataSCModel ( 1, 1, NUM_DMM_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 107 115 #endif 108 #if LGE_EDGE_INTRA 116 #if LGE_EDGE_INTRA_A0070 109 117 , m_cEdgeIntraSCModel ( 1, 1, NUM_EDGE_INTRA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 110 118 #if LGE_EDGE_INTRA_DELTA_DC … … 112 120 #endif 113 121 #endif 122 #if RWTH_SDC_DLT_B0036 123 , m_cSDCFlagSCModel ( 1, 1, SDC_NUM_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 124 , m_cSDCResidualFlagSCModel ( 1, 2, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 125 , m_cSDCResidualSignFlagSCModel ( 1, 2, SDC_NUM_SIGN_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 126 , m_cSDCResidualSCModel ( 1, 2, SDC_NUM_RESIDUAL_CTX , m_contextModels + m_numContextModels, m_numContextModels) 127 , m_cSDCPredModeSCModel ( 1, 3, SDC_NUM_PRED_MODE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 128 #endif 114 129 { 115 130 assert( m_numContextModels <= MAX_NUM_CTX_MOD ); … … 141 156 142 157 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 158 #if LGE_ILLUCOMP_B0045 159 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 160 #endif 143 161 m_cCUAlfCtrlFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG ); 144 162 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); … … 187 205 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 188 206 #endif 189 #if LGE_EDGE_INTRA 207 #if LGE_EDGE_INTRA_A0070 190 208 m_cEdgeIntraSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_EDGE_INTRA ); 191 209 #if LGE_EDGE_INTRA_DELTA_DC 192 210 m_cEdgeIntraDeltaDCSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_EDGE_INTRA_DELTA_DC ); 193 211 #endif 212 #endif 213 #if RWTH_SDC_DLT_B0036 214 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 215 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 216 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 217 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 218 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 194 219 #endif 195 220 … … 224 249 curCost = m_cCUSplitFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 225 250 curCost += m_cCUSkipFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG ); 251 #if LGE_ILLUCOMP_B0045 252 curCost += m_cCUICFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_IC_FLAG ); 253 #endif 226 254 curCost += m_cCUAlfCtrlFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ALF_CTRL_FLAG ); 227 255 curCost += m_cCUMergeFlagExtSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT); … … 279 307 } 280 308 281 #if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX309 #if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG 282 310 m_pcSlice->getPPS()->setEncPrevPOC( m_pcSlice->getPOC() ); 283 311 #endif … … 295 323 296 324 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 325 #if LGE_ILLUCOMP_B0045 326 m_cCUICFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_IC_FLAG ); 327 #endif 297 328 m_cCUAlfCtrlFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ALF_CTRL_FLAG ); 298 329 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT); … … 341 372 m_cDmmDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM_DATA ); 342 373 #endif 374 #if RWTH_SDC_DLT_B0036 375 m_cSDCFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG ); 376 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); 377 m_cSDCResidualSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL ); 378 m_cSDCResidualSignFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG ); 379 m_cSDCPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE ); 380 #endif 343 381 344 382 m_pcBinIf->start(); … … 358 396 } 359 397 360 #if VIDYO_VPS_INTEGRATION 398 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 361 399 Void TEncSbac::codeVPS( TComVPS* pcVPS ) 362 400 { … … 580 618 { 581 619 PartSize eSize = pcCU->getPartitionSize( uiAbsPartIdx ); 582 #if OL_DEPTHLIMIT_A0044 583 UInt uiSymbol; 584 #endif 620 621 #if OL_QTLIMIT_PREDCODING_B0068 622 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 623 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 624 Bool bDepthMapDetect = (pcTexture != NULL); 625 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 626 627 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 628 { 629 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 630 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 631 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 632 if (pcTextureCU->getDepth(uiCUIdx) == uiDepth && pcTextureCU->getPartitionSize( uiCUIdx ) != SIZE_NxN) 633 { 634 assert( eSize == SIZE_2Nx2N ); 635 return; 636 } 637 } 638 #endif 639 585 640 if ( pcCU->isIntra( uiAbsPartIdx ) ) 586 641 { … … 588 643 { 589 644 m_pcBinIf->encodeBin( eSize == SIZE_2Nx2N? 1 : 0, m_cCUPartSizeSCModel.get( 0, 0, 0 ) ); 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 645 } 606 646 return; 607 647 } … … 612 652 { 613 653 m_pcBinIf->encodeBin( 1, m_cCUPartSizeSCModel.get( 0, 0, 0) ); 614 #if OL_DEPTHLIMIT_A0044615 if(pcCU->getPartDumpFlag())616 {617 pcCU->updatePartInfo(0,uiDepth); //0 for 2Nx2N618 pcCU->incrementPartInfo();619 }620 #endif621 654 break; 622 655 } … … 648 681 } 649 682 } 650 #if OL_DEPTHLIMIT_A0044651 if(pcCU->getPartDumpFlag())652 {653 pcCU->updatePartInfo(2,uiDepth); //2 for 2NxN654 pcCU->incrementPartInfo();655 }656 #endif657 683 break; 658 684 } … … 688 714 } 689 715 } 690 #if OL_DEPTHLIMIT_A0044691 if(pcCU->getPartDumpFlag())692 {693 pcCU->updatePartInfo(3,uiDepth); //3 for Nx2N694 pcCU->incrementPartInfo();695 }696 #endif697 716 break; 698 717 } … … 704 723 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 1) ); 705 724 m_pcBinIf->encodeBin( 0, m_cCUPartSizeSCModel.get( 0, 0, 2) ); 706 #if OL_DEPTHLIMIT_A0044707 if(pcCU->getPartDumpFlag())708 {709 pcCU->updatePartInfo(1,uiDepth); //2Nx2N here since we disable NxN in Inter710 pcCU->incrementPartInfo();711 }712 #endif713 }714 else715 {716 #if OL_DEPTHLIMIT_A0044717 if(pcCU->getPartDumpFlag())718 {719 pcCU->updatePartInfo(0,uiDepth); //2Nx2N here since we disable NxN in Inter720 pcCU->incrementPartInfo();721 }722 #endif723 725 } 724 726 break; … … 738 740 Void TEncSbac::codePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 739 741 { 742 #if RWTH_SDC_DLT_B0036 743 if ( pcCU->getSlice()->isIntra() ) 744 { 745 assert( pcCU->isIntra(uiAbsPartIdx) ); 746 return; 747 } 748 #endif 749 740 750 // get context function is here 741 751 Int iPredMode = pcCU->getPredictionMode( uiAbsPartIdx ); … … 789 799 DTRACE_CABAC_T( "\n"); 790 800 } 801 802 #if LGE_ILLUCOMP_B0045 803 /** code Illumination Compensation flag 804 * \param pcCU 805 * \param uiAbsPartIdx 806 * \returns Void 807 */ 808 Void TEncSbac::codeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 809 { 810 // get context function is here 811 UInt uiSymbol = pcCU->getICFlag( uiAbsPartIdx ) ? 1 : 0; 812 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ) ; 813 m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) ); 814 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 815 DTRACE_CABAC_T( "\tICFlag" ); 816 DTRACE_CABAC_T( "\tuiCtxIC: "); 817 DTRACE_CABAC_V( uiCtxIC ); 818 DTRACE_CABAC_T( "\tuiSymbol: "); 819 DTRACE_CABAC_V( uiSymbol ); 820 DTRACE_CABAC_T( "\n"); 821 } 822 #endif 791 823 792 824 #if FORCE_REF_VSP==1 … … 841 873 uiNumCand = pcCU->getSlice()->getMaxNumMergeCand(); 842 874 #if HHI_MPI 843 #if VSP_N 875 #if VSP_N & !MTK_UNCONSTRAINED_MVI_B0083 844 876 TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL; 845 877 Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1, … … 857 889 : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 858 890 #endif 891 #else 892 const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE; 859 893 #endif 860 894 if( bMVIAvailable ) … … 920 954 921 955 assert( uiCtx < 3 ); 956 957 #if OL_QTLIMIT_PREDCODING_B0068 958 Bool bCodeSplitFlag = true; 959 960 TComSPS *sps = pcCU->getPic()->getSlice(0)->getSPS(); 961 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); 962 Bool bDepthMapDetect = (pcTexture != NULL); 963 Bool bIntraSliceDetect = (pcCU->getSlice()->getSliceType() == I_SLICE); 964 965 if(bDepthMapDetect && !bIntraSliceDetect && sps->getUseQTLPC() && pcCU->getPic()->getReduceBitsFlag()) 966 { 967 TComDataCU *pcTextureCU = pcTexture->getCU(pcCU->getAddr()); 968 UInt uiCUIdx = (pcCU->getZorderIdxInCU() == 0) ? uiAbsPartIdx : pcCU->getZorderIdxInCU(); 969 assert(pcTextureCU->getDepth(uiCUIdx) >= uiDepth); 970 bCodeSplitFlag = (pcTextureCU->getDepth(uiCUIdx) > uiDepth); 971 } 972 973 if(!bCodeSplitFlag) 974 { 975 assert(uiCurrSplitFlag == 0); 976 return; 977 } 978 #endif 979 922 980 m_pcBinIf->encodeBin( uiCurrSplitFlag, m_cCUSplitFlagSCModel.get( 0, 0, uiCtx ) ); 923 #if OL_DEPTHLIMIT_A0044924 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 #endif933 981 DTRACE_CABAC_VL( g_nSymbolCounter++ ) 934 982 DTRACE_CABAC_T( "\tSplitFlag\n" ) … … 948 996 } 949 997 950 #if LGE_EDGE_INTRA 998 #if LGE_EDGE_INTRA_A0070 951 999 Void TEncSbac::xCodeEdgeIntraInfo( TComDataCU* pcCU, UInt uiPartIdx ) 952 1000 { … … 1029 1077 if( pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) <= DMM_WEDGEMODEL_MAX_SIZE ) 1030 1078 { 1031 #if LGE_EDGE_INTRA 1079 #if LGE_EDGE_INTRA_A0070 1032 1080 m_pcBinIf->encodeBin( uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX, m_cDmmFlagSCModel.get(0, 0, 0) ); 1033 1081 #else … … 1035 1083 #endif 1036 1084 } 1037 #if LGE_EDGE_INTRA 1085 #if LGE_EDGE_INTRA_A0070 1038 1086 if( uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX ) 1039 1087 #else … … 1067 1115 #endif 1068 1116 #if HHI_DMM_PRED_TEX 1117 1118 #if FLEX_CODING_ORDER_M23723 1119 if ( !pcCU->getSlice()->getSPS()->getUseDMM34() ) 1120 { 1121 assert( uiDir != DMM_WEDGE_PREDTEX_D_IDX ); 1122 assert( uiDir != DMM_CONTOUR_PREDTEX_D_IDX ); 1123 } 1124 #endif 1125 1069 1126 if( uiDir == DMM_WEDGE_PREDTEX_D_IDX ) { xCodeWedgePredTexDeltaInfo ( pcCU, uiAbsPartIdx ); } 1070 1127 if( uiDir == DMM_CONTOUR_PREDTEX_D_IDX ) { xCodeContourPredTexDeltaInfo( pcCU, uiAbsPartIdx ); } … … 1072 1129 } 1073 1130 else 1074 #if LGE_EDGE_INTRA 1131 #if LGE_EDGE_INTRA_A0070 1075 1132 if ( uiDir >= EDGE_INTRA_IDX) 1076 1133 { … … 1107 1164 Int iIntraIdx = pcCU->getIntraSizeIdx(uiAbsPartIdx); 1108 1165 #endif 1109 #if LGE_EDGE_INTRA 1166 #if LGE_EDGE_INTRA_A0070 1110 1167 Bool bCodeEdgeIntra = false; 1111 1168 if( pcCU->getSlice()->getSPS()->isDepth() ) … … 1173 1230 #if LOGI_INTRA_NAME_3MPM 1174 1231 m_pcBinIf->encodeBinsEP( uiDir, 5 ); 1175 #if LGE_EDGE_INTRA 1232 #if LGE_EDGE_INTRA_A0070 1176 1233 if (bCodeEdgeIntra) 1177 1234 if (uiDir == 31) m_pcBinIf->encodeBinsEP(0,1); … … 2515 2572 } 2516 2573 2517 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA && LGE_EDGE_INTRA_DELTA_DC)2574 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX || (LGE_EDGE_INTRA_A0070 && LGE_EDGE_INTRA_DELTA_DC) 2518 2575 Void TEncSbac::xWriteExGolombLevel( UInt uiSymbol, ContextModel& rcSCModel ) 2519 2576 { … … 2681 2738 } 2682 2739 #endif 2740 2741 #if RWTH_SDC_DLT_B0036 2742 Void TEncSbac::codeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2743 { 2744 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2745 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 2746 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2747 2748 UInt uiPredMode = pcCU->getLumaIntraDir(uiAbsPartIdx); 2749 UInt uiCtx = 0; 2750 2751 UInt uiMPModeIdx = 0; 2752 2753 for(Int i=0; i<RWTH_SDC_NUM_PRED_MODES-1; i++) 2754 { 2755 UInt uiBit = (uiPredMode == g_auiSDCPredModes[uiMPModeIdx]) ? 1 : 0; 2756 m_pcBinIf->encodeBin( uiBit, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) ); 2757 2758 // if mode is most probable mode, we are done here 2759 if ( uiBit == 1 ) 2760 break; 2761 2762 // else: get next most probable pred mode 2763 uiMPModeIdx = (uiMPModeIdx+1)%RWTH_SDC_NUM_PRED_MODES; 2764 } 2765 2766 #if HHI_DMM_WEDGE_INTRA 2767 if( uiPredMode == DMM_WEDGE_FULL_IDX ) { xCodeWedgeFullInfo ( pcCU, uiAbsPartIdx ); } 2768 if( uiPredMode == DMM_WEDGE_PREDDIR_IDX ) { xCodeWedgePredDirInfo ( pcCU, uiAbsPartIdx ); } 2769 #endif 2770 2771 AOF(uiPredMode == g_auiSDCPredModes[uiMPModeIdx]); 2772 } 2773 2774 Void TEncSbac::codeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2775 { 2776 // get context function is here 2777 UInt uiSymbol = pcCU->getSDCFlag( uiAbsPartIdx ) ? 1 : 0; 2778 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2779 m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2780 2781 } 2782 2783 Void TEncSbac::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) 2784 { 2785 assert( pcCU->getSlice()->getSPS()->isDepth() ); 2786 assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N ); 2787 assert( pcCU->getSDCFlag(uiAbsPartIdx) ); 2788 assert( uiSegment < 2 ); 2789 2790 Pel segmentDCOffset = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 2791 2792 UInt uiResidual = segmentDCOffset == 0 ? 0 : 1; 2793 UInt uiSign = segmentDCOffset < 0 ? 1 : 0; 2794 UInt uiAbsIdx = abs(segmentDCOffset); 2795 UInt uiBit = 0; 2796 2797 UInt uiMaxResidualBits = GetBitsPerDepthValue(); 2798 assert( uiMaxResidualBits <= g_uiBitDepth ); 2799 2800 // residual flag 2801 m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection 2802 2803 if (uiResidual) 2804 { 2805 // encode sign bit of residual 2806 m_pcBinIf->encodeBin( uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection 2807 2808 assert(uiAbsIdx < GetNumDepthValues()); 2809 2810 // encode residual magnitude 2811 uiAbsIdx -= 1; 2812 for (Int i=0; i<uiMaxResidualBits; i++) 2813 { 2814 uiBit = (uiAbsIdx & (1<<i))>>i; 2815 2816 m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); //TODO depthmap: more sophisticated context selection 2817 } 2818 2819 } 2820 } 2821 #endif 2683 2822 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSbac.h
r166 r213 98 98 //--SBAC RD 99 99 100 #if VIDYO_VPS_INTEGRATION 100 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 101 101 Void codeVPS ( TComVPS* pcVPS ); 102 102 #endif … … 145 145 #endif 146 146 Void codeScalingList ( TComScalingList* scalingList ){ assert (0); return;}; 147 148 #if RWTH_SDC_DLT_B0036 149 Void codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 150 Void codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ); 151 Void codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 152 #endif 147 153 148 154 private: … … 175 181 Void xCodeContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx ); 176 182 #endif 177 #if LGE_EDGE_INTRA 183 #if LGE_EDGE_INTRA_A0070 178 184 Void xCodeEdgeIntraInfo( TComDataCU* pcCU, UInt uiPartIdx ); 179 185 #endif … … 202 208 Void codeAlfCtrlFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 203 209 Void codeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 210 #if LGE_ILLUCOMP_B0045 211 Void codeICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); 212 #endif 204 213 #if FORCE_REF_VSP==1 205 214 Void codeVspFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx ); … … 263 272 ContextModel3DBuffer m_cCUSplitFlagSCModel; 264 273 ContextModel3DBuffer m_cCUSkipFlagSCModel; 274 #if LGE_ILLUCOMP_B0045 275 ContextModel3DBuffer m_cCUICFlagSCModel; 276 #endif 265 277 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; 266 278 ContextModel3DBuffer m_cCUMergeIdxExtSCModel; … … 313 325 ContextModel3DBuffer m_cDmmDataSCModel; 314 326 #endif 315 #if LGE_EDGE_INTRA 327 #if LGE_EDGE_INTRA_A0070 316 328 ContextModel3DBuffer m_cEdgeIntraSCModel; 317 329 #if LGE_EDGE_INTRA_DELTA_DC … … 319 331 #endif 320 332 #endif 333 334 #if RWTH_SDC_DLT_B0036 335 ContextModel3DBuffer m_cSDCFlagSCModel; 336 337 ContextModel3DBuffer m_cSDCResidualFlagSCModel; 338 ContextModel3DBuffer m_cSDCResidualSignFlagSCModel; 339 ContextModel3DBuffer m_cSDCResidualSCModel; 340 341 ContextModel3DBuffer m_cSDCPredModeSCModel; 342 #endif 321 343 }; 322 344 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r193 r213 42 42 #include <math.h> 43 43 44 #if RWTH_SDC_DLT_B0036 45 #define GetDepthValue2Idx(val) (pcCU->getSlice()->getSPS()->depthValue2idx(val)) 46 #define GetIdx2DepthValue(val) (pcCU->getSlice()->getSPS()->idx2DepthValue(val)) 47 #endif 48 44 49 //! \ingroup TLibEncoder 45 50 //! \{ … … 155 160 Int iSearchRange, 156 161 Int bipredSearchRange, 162 #if DV_V_RESTRICTION_B0037 163 Bool bUseDisparitySearchRangeRestriction, 164 Int iVerticalDisparitySearchRange, 165 #endif 157 166 Int iFastSearch, 158 167 Int iMaxDeltaQP, … … 167 176 m_iSearchRange = iSearchRange; 168 177 m_bipredSearchRange = bipredSearchRange; 178 #if DV_V_RESTRICTION_B0037 179 m_bUseDisparitySearchRangeRestriction = bUseDisparitySearchRangeRestriction; 180 m_iVerticalDisparitySearchRange = iVerticalDisparitySearchRange; 181 #endif 169 182 m_iFastSearch = iFastSearch; 170 183 m_iMaxDeltaQP = iMaxDeltaQP; … … 195 208 const Int iNumAMVPCands = AMVP_MAX_NUM_CANDS + 1; 196 209 for( Int iNum = 0; iNum < iNumAMVPCands+1; iNum++) 197 {198 210 for( Int iIdx = 0; iIdx < iNumAMVPCands; iIdx++) 199 211 #else 200 212 for( Int iNum = 0; iNum < AMVP_MAX_NUM_CANDS+1; iNum++) 201 {202 213 for( Int iIdx = 0; iIdx < AMVP_MAX_NUM_CANDS; iIdx++) 203 214 #endif … … 208 219 m_auiMVPIdxCost[iIdx][iNum] = MAX_INT; 209 220 } 210 }211 221 212 222 initTempBuff(); … … 300 310 301 311 // distortion 312 #if LGE_ILLUCOMP_B0045 313 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 314 #endif 302 315 uiSad = m_cDistParam.DistFunc( &m_cDistParam ); 303 316 … … 726 739 727 740 m_cDistParam.pCur = piRefPos; 741 #if LGE_ILLUCOMP_B0045 742 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 743 #endif 728 744 uiDist = m_cDistParam.DistFunc( &m_cDistParam ); 729 745 uiDist += m_pcRdCost->getCost( cMvTest.getHor(), cMvTest.getVer() ); … … 975 991 TComYuv* pcResiYuv, 976 992 Dist& ruiDist 977 #if LG_ZEROINTRADEPTHRESI_ M26039993 #if LG_ZEROINTRADEPTHRESI_A0087 978 994 ,Bool bZeroResi 979 995 #endif … … 1010 1026 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1011 1027 1012 #if LGE_EDGE_INTRA 1028 #if LGE_EDGE_INTRA_A0070 1013 1029 if( uiLumaPredMode >= EDGE_INTRA_IDX ) 1014 1030 { … … 1058 1074 } 1059 1075 } 1060 #if LG_ZEROINTRADEPTHRESI_ M260391076 #if LG_ZEROINTRADEPTHRESI_A0087 1061 1077 if(bZeroResi) 1062 1078 { … … 1375 1391 #endif 1376 1392 Double& dRDCost 1377 #if LG_ZEROINTRADEPTHRESI_ M260391393 #if LG_ZEROINTRADEPTHRESI_A0087 1378 1394 ,Bool bZeroResi 1379 1395 #endif … … 1397 1413 } 1398 1414 #endif 1399 #if LGE_EDGE_INTRA 1415 #if LGE_EDGE_INTRA_A0070 1400 1416 if( pcCU->getLumaIntraDir( uiAbsPartIdx ) >= EDGE_INTRA_IDX ) 1401 1417 { … … 1419 1435 //----- code luma block with given intra prediction mode and store Cbf----- 1420 1436 dSingleCost = 0.0; 1421 #if LG_ZEROINTRADEPTHRESI_ M260391437 #if LG_ZEROINTRADEPTHRESI_A0087 1422 1438 xIntraCodingLumaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcOrgYuv, pcPredYuv, pcResiYuv, uiSingleDistY, bZeroResi ); 1423 1439 #else … … 1611 1627 } 1612 1628 1629 #if RWTH_SDC_DLT_B0036 1630 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bResidual ) 1631 { 1632 UInt uiLumaPredMode = pcCU ->getLumaIntraDir( uiAbsPartIdx ); 1633 UInt uiWidth = pcCU ->getWidth ( 0 ); 1634 UInt uiHeight = pcCU ->getHeight ( 0 ); 1635 UInt uiStride = pcOrgYuv ->getStride (); 1636 Pel* piOrg = pcOrgYuv ->getLumaAddr( uiAbsPartIdx ); 1637 Pel* piPred = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1638 Pel* piReco = pcPredYuv->getLumaAddr( uiAbsPartIdx ); 1639 1640 UInt uiZOrder = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1641 Pel* piRecIPred = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder ); 1642 UInt uiRecIPredStride = pcCU->getPic()->getPicYuvRec()->getStride (); 1643 1644 AOF( uiWidth == uiHeight ); 1645 AOF( uiAbsPartIdx == 0 ); 1646 AOF( pcCU->getSDCAvailable(uiAbsPartIdx) ); 1647 AOF( pcCU->getSDCFlag(uiAbsPartIdx) ); 1648 1649 //===== init availability pattern ===== 1650 Bool bAboveAvail = false; 1651 Bool bLeftAvail = false; 1652 pcCU->getPattern()->initPattern ( pcCU, 0, uiAbsPartIdx ); 1653 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1654 1655 //===== get prediction signal ===== 1656 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1657 if( uiLumaPredMode >= NUM_INTRA_MODE ) 1658 { 1659 predIntraLumaDMM( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail, true ); 1660 } 1661 else 1662 { 1663 #endif 1664 predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, pcCU, bAboveAvail, bLeftAvail ); 1665 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1666 } 1667 #endif 1668 1669 // number of segments depends on prediction mode 1670 UInt uiNumSegments = 1; 1671 Bool* pbMask = NULL; 1672 UInt uiMaskStride = 0; 1673 1674 if( uiLumaPredMode == DMM_WEDGE_FULL_IDX || uiLumaPredMode == DMM_WEDGE_PREDDIR_IDX ) 1675 { 1676 Int uiTabIdx = (uiLumaPredMode == DMM_WEDGE_FULL_IDX)?pcCU->getWedgeFullTabIdx(uiAbsPartIdx):pcCU->getWedgePredDirTabIdx(uiAbsPartIdx); 1677 1678 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 1679 TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx )); 1680 1681 uiNumSegments = 2; 1682 pbMask = pcWedgelet->getPattern(); 1683 uiMaskStride = pcWedgelet->getStride(); 1684 } 1685 1686 // get DC prediction for each segment 1687 Pel apDCPredValues[2]; 1688 xAnalyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride ); 1689 1690 // get original DC for each segment 1691 Pel apDCOrigValues[2]; 1692 xAnalyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride ); 1693 1694 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) 1695 { 1696 // remap reconstructed value to valid depth values 1697 Pel pDCRec = bResidual?apDCOrigValues[uiSegment]:apDCPredValues[uiSegment]; 1698 1699 // get residual (idx) 1700 Pel pResidualIdx = GetDepthValue2Idx( pDCRec ) - GetDepthValue2Idx( apDCPredValues[uiSegment] ); 1701 1702 // save SDC DC offset 1703 pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx); 1704 } 1705 1706 // reconstruct residual based on mask + DC residuals 1707 Pel apDCResiValues[2]; 1708 //Pel apDCRecoValues[2]; 1709 for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ ) 1710 { 1711 Pel pPredIdx = GetDepthValue2Idx( apDCPredValues[uiSegment] ); 1712 Pel pResiIdx = pcCU->getSDCSegmentDCOffset(uiSegment, uiAbsPartIdx); 1713 Pel pRecoValue = GetIdx2DepthValue( pPredIdx + pResiIdx ); 1714 1715 //apDCRecoValues[uiSegment] = pRecoValue; 1716 apDCResiValues[uiSegment] = pRecoValue - apDCPredValues[uiSegment]; 1717 } 1718 1719 //===== reconstruction ===== 1720 Bool* pMask = pbMask; 1721 Pel* pPred = piPred; 1722 Pel* pReco = piReco; 1723 Pel* pRecIPred = piRecIPred; 1724 1725 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 1726 { 1727 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1728 { 1729 UChar ucSegment = pMask?(UChar)pMask[uiX]:0; 1730 assert( ucSegment < uiNumSegments ); 1731 1732 Pel pPredVal= apDCPredValues[ucSegment]; 1733 Pel pResiDC = apDCResiValues[ucSegment]; 1734 1735 pReco [ uiX ] = Clip( pPredVal + pResiDC ); 1736 pRecIPred[ uiX ] = pReco[ uiX ]; 1737 } 1738 pPred += uiStride; 1739 pReco += uiStride; 1740 pRecIPred += uiRecIPredStride; 1741 pMask += uiMaskStride; 1742 } 1743 1744 // clear UV 1745 UInt uiStrideC = pcPredYuv->getCStride(); 1746 Pel *pRecCb = pcPredYuv->getCbAddr(); 1747 Pel *pRecCr = pcPredYuv->getCrAddr(); 1748 1749 for (Int y=0; y<uiHeight/2; y++) 1750 { 1751 for (Int x=0; x<uiWidth/2; x++) 1752 { 1753 pRecCb[x] = (Pel)(128<<g_uiBitIncrement); 1754 pRecCr[x] = (Pel)(128<<g_uiBitIncrement); 1755 } 1756 1757 pRecCb += uiStrideC; 1758 pRecCr += uiStrideC; 1759 } 1760 1761 //===== determine distortion ===== 1762 #if HHI_VSO 1763 if ( m_pcRdCost->getUseVSO() ) 1764 { 1765 ruiDist = m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1766 } 1767 else 1768 #endif 1769 { 1770 ruiDist = m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight ); 1771 } 1772 1773 //----- determine rate and r-d cost ----- 1774 m_pcEntropyCoder->resetBits(); 1775 1776 // encode reduced intra header 1777 m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true ); 1778 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 1779 1780 // encode pred direction + residual data 1781 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 1782 1783 UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); 1784 1785 #if HHI_VSO 1786 if ( m_pcRdCost->getUseLambdaScaleVSO()) 1787 { 1788 dRDCost = m_pcRdCost->calcRdCostVSO( uiBits, ruiDist ); 1789 } 1790 else 1791 #endif 1792 { 1793 dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist ); 1794 } 1795 } 1796 #endif 1613 1797 1614 1798 Void … … 1848 2032 UInt uiQNumParts = pcCU->getTotalNumPart() >> 2; 1849 2033 UInt uiWidthBit = pcCU->getIntraSizeIdx(0); 2034 #if FIX_RDO_NEGDIST 2035 Dist uiOverallDistY = 0; 2036 Dist uiOverallDistC = 0; 2037 #else 1850 2038 UInt uiOverallDistY = 0; 1851 2039 UInt uiOverallDistC = 0; 2040 #endif 1852 2041 UInt CandNum; 1853 2042 Double CandCostList[ FAST_UDI_MAX_RDMODE_NUM ]; … … 1885 2074 Int numModesForFullRD = g_aucIntraModeNumFast[ uiWidthBit ]; 1886 2075 1887 #if LGE_EDGE_INTRA 2076 #if LGE_EDGE_INTRA_A0070 1888 2077 Bool bTestEdgeIntra = false; 1889 2078 if ( m_pcEncCfg->isDepthCoder() && uiWidth >= LGE_EDGE_INTRA_MIN_SIZE && uiWidth <= LGE_EDGE_INTRA_MAX_SIZE && uiWidth == uiHeight ) … … 1936 2125 if ( m_pcRdCost->getUseWVSO() ) 1937 2126 { 1938 Int iDWeight = m_pcRdCost->getDWeight() ;1939 Int iVSDWeight = m_pcRdCost->getVSDWeight() ;2127 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 2128 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 1940 2129 Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 1941 2130 uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight); … … 1951 2140 if ( m_pcRdCost->getUseWVSO() ) 1952 2141 { 1953 Int iDWeight = m_pcRdCost->getDWeight() *m_pcRdCost->getDWeight();1954 Int iVS DWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight();1955 Dist iD = (Dist) m_pcRdCost-> getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );1956 uiSad = (Dist) (iDWeight * iD + iVS DWeight * uiSad) / (iDWeight + iVSDWeight);2142 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 2143 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getDWeight(); 2144 Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight ); 2145 uiSad = (Dist) (iDWeight * iD + iVSOWeight * uiSad) / (iDWeight + iVSOWeight); 1957 2146 } 1958 2147 #endif 1959 2148 } 1960 1961 2149 } 1962 2150 else … … 1987 2175 CandNum += xUpdateCandList( uiMode, cost, numModesForFullRD, uiRdModeList, CandCostList ); 1988 2176 1989 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX2177 #if (HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX) && !FIX_DMM_NEG_DIST 1990 2178 if( bTestDmm ) bTestDmm = uiSad ? true : false; 1991 2179 #endif 1992 #if LGE_EDGE_INTRA 2180 #if LGE_EDGE_INTRA_A0070 1993 2181 if ( bTestEdgeIntra ) bTestEdgeIntra = uiSad ? true : false; 1994 2182 #endif … … 2074 2262 #endif 2075 2263 #if HHI_DMM_PRED_TEX 2264 2265 #if FLEX_CODING_ORDER_M23723 2266 if ( pcCU->getSlice()->getSPS()->getUseDMM34() ) 2267 { 2268 #endif 2076 2269 UInt uiTexTabIdx = 0; 2077 2270 Int iTexDeltaDC1 = 0; … … 2097 2290 uiRdModeList[ numModesForFullRD++ ] = DMM_CONTOUR_PREDTEX_D_IDX; 2098 2291 } 2099 #endif 2100 } 2101 #endif 2102 #if LGE_EDGE_INTRA 2292 #if FLEX_CODING_ORDER_M23723 2293 } 2294 #endif 2295 #endif 2296 } 2297 #endif 2298 #if LGE_EDGE_INTRA_A0070 2103 2299 if( bTestEdgeIntra ) 2104 2300 { … … 2117 2313 2118 2314 UInt uiBestPUMode = 0; 2315 #if FIX_RDO_NEGDIST 2316 Dist uiBestPUDistY = 0; 2317 Dist uiBestPUDistC = 0; 2318 #else 2119 2319 UInt uiBestPUDistY = 0; 2120 2320 UInt uiBestPUDistC = 0; 2321 #endif 2121 2322 Double dBestPUCost = MAX_DOUBLE; 2323 #if RWTH_SDC_DLT_B0036 2324 Bool bBestUseSDC = false; 2325 Pel apBestDCOffsets[2] = {0,0}; 2326 #endif 2122 2327 for( UInt uiMode = 0; uiMode < numModesForFullRD; uiMode++ ) 2123 2328 { 2124 #if LG_ZEROINTRADEPTHRESI_ M260392329 #if LG_ZEROINTRADEPTHRESI_A0087 2125 2330 Bool bAllowZeroResi = pcCU->getSlice()->getIsDepth() && (pcCU->getSlice()->getPOC()%pcCU->getPic()->getIntraPeriod());// && (uiMode < NUM_INTRA_MODE); 2126 2331 for(UInt uiCnt = 0; uiCnt < (bAllowZeroResi ? 2 : 1); uiCnt++) … … 2132 2337 2133 2338 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 2339 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 2340 if( m_pcEncCfg->getIsDepth() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getUseDMM34() ) 2341 #if LGE_EDGE_INTRA_A0070 2342 && uiOrgMode < EDGE_INTRA_IDX 2343 #endif 2344 ) 2345 2346 #else 2347 2134 2348 if( m_pcEncCfg->getIsDepth() && !predIntraLumaDMMAvailable( uiOrgMode, uiWidth, uiHeight ) 2135 #if LGE_EDGE_INTRA 2349 #if LGE_EDGE_INTRA_A0070 2136 2350 && uiOrgMode < EDGE_INTRA_IDX 2137 2351 #endif 2138 2352 ) 2353 #endif 2139 2354 { 2140 2355 continue; 2141 2356 } 2357 #endif 2358 2359 #if RWTH_SDC_DLT_B0036 2360 UInt uiUseSDC = ( m_pcEncCfg->getUseSDC() && pcCU->getPartitionSize(uiPartOffset) == SIZE_2Nx2N )?1:0; 2361 2362 for( UInt uiSDC=0; uiSDC<=uiUseSDC; uiSDC++ ) 2363 { 2364 for( UInt uiRes = 0; uiRes<=uiUseSDC; uiRes++ ) 2365 { 2142 2366 #endif 2143 2367 … … 2163 2387 } 2164 2388 #endif 2165 2389 #if RWTH_SDC_DLT_B0036 2390 // last check: if not available for current intra prediction mode, don't try 2391 if( uiSDC == 1 && !pcCU->getSDCAvailable(uiPartOffset) ) 2392 continue; 2393 2394 pcCU->setSDCFlagSubParts( uiSDC == 1, uiPartOffset, 0, uiDepth + uiInitTrDepth ); 2395 2396 if(uiSDC == 1) 2397 { 2398 pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth); 2399 pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth); 2400 2401 // start encoding with SDC 2402 xIntraCodingSDC(pcCU, uiPartOffset, pcOrgYuv, pcPredYuv, uiPUDistY, dPUCost, (uiRes==1)); 2403 } 2404 else 2405 { 2406 #endif 2166 2407 #if HHI_RQT_INTRA_SPEEDUP 2167 #if LG_ZEROINTRADEPTHRESI_ M260392408 #if LG_ZEROINTRADEPTHRESI_A0087 2168 2409 xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, true, dPUCost, bZeroResi ); 2169 2410 #else … … 2172 2413 #else 2173 2414 xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, dPUCost ); 2415 #endif 2416 #if RWTH_SDC_DLT_B0036 2417 } 2174 2418 #endif 2175 2419 … … 2185 2429 uiBestPUDistC = uiPUDistC; 2186 2430 dBestPUCost = dPUCost; 2431 2432 #if RWTH_SDC_DLT_B0036 2433 if( uiSDC == 1 ) 2434 { 2435 bBestUseSDC = true; 2436 2437 // copy reconstruction 2438 pcPredYuv->copyPartToPartYuv(pcRecoYuv, uiPartOffset, uiWidth, uiHeight); 2439 2440 // copy DC values 2441 apBestDCOffsets[0] = pcCU->getSDCSegmentDCOffset(0, uiPartOffset); 2442 apBestDCOffsets[1] = pcCU->getSDCSegmentDCOffset(1, uiPartOffset); 2443 } 2444 else 2445 { 2446 bBestUseSDC = false; 2447 #endif 2448 2449 xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv ); 2450 2451 UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 ); 2452 ::memcpy( m_puhQTTempTrIdx, pcCU->getTransformIdx() + uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2453 ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA ) + uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2454 ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2455 ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2456 #if RWTH_SDC_DLT_B0036 2457 } 2458 #endif 2459 } 2460 #if HHI_RQT_INTRA_SPEEDUP_MOD 2461 else if( dPUCost < dSecondBestPUCost ) 2462 { 2463 uiSecondBestMode = uiOrgMode; 2464 dSecondBestPUCost = dPUCost; 2465 } 2466 #endif 2467 #if LG_ZEROINTRADEPTHRESI_A0087 2468 } 2469 #endif 2470 #if RWTH_SDC_DLT_B0036 2471 } // SDC residual loop 2472 } // SDC loop 2473 #endif 2474 } // Mode loop 2475 2476 #if HHI_RQT_INTRA_SPEEDUP 2477 #if HHI_RQT_INTRA_SPEEDUP_MOD 2478 for( UInt ui =0; ui < 2; ++ui ) 2479 #endif 2480 { 2481 #if HHI_RQT_INTRA_SPEEDUP_MOD 2482 UInt uiOrgMode = ui ? uiSecondBestMode : uiBestPUMode; 2483 if( uiOrgMode == MAX_UINT ) 2484 { 2485 break; 2486 } 2487 #else 2488 UInt uiOrgMode = uiBestPUMode; 2489 #endif 2490 2491 pcCU->setLumaIntraDirSubParts ( uiOrgMode, uiPartOffset, uiDepth + uiInitTrDepth ); 2492 2493 // set context models 2494 if( m_bUseSBACRD ) 2495 { 2496 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] ); 2497 } 2498 2499 // determine residual for partition 2500 Dist uiPUDistY = 0; 2501 Dist uiPUDistC = 0; 2502 Double dPUCost = 0.0; 2503 2504 #if HHI_VSO 2505 // reset Model 2506 if( m_pcRdCost->getUseRenModel() ) 2507 { 2508 m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight ); 2509 } 2510 #endif 2511 2512 xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, false, dPUCost ); 2513 2514 // check r-d cost 2515 if( dPUCost < dBestPUCost ) 2516 { 2517 uiBestPUMode = uiOrgMode; 2518 uiBestPUDistY = uiPUDistY; 2519 uiBestPUDistC = uiPUDistC; 2520 dBestPUCost = dPUCost; 2521 #if RWTH_SDC_DLT_B0036 2522 bBestUseSDC = false; 2523 #endif 2187 2524 2188 2525 xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv ); … … 2195 2532 2196 2533 } 2197 #if HHI_RQT_INTRA_SPEEDUP_MOD2198 else if( dPUCost < dSecondBestPUCost )2199 {2200 uiSecondBestMode = uiOrgMode;2201 dSecondBestPUCost = dPUCost;2202 }2203 #endif2204 #if LG_ZEROINTRADEPTHRESI_M260392205 }2206 #endif2207 } // Mode loop2208 2209 #if HHI_RQT_INTRA_SPEEDUP2210 #if HHI_RQT_INTRA_SPEEDUP_MOD2211 for( UInt ui =0; ui < 2; ++ui )2212 #endif2213 {2214 #if HHI_RQT_INTRA_SPEEDUP_MOD2215 UInt uiOrgMode = ui ? uiSecondBestMode : uiBestPUMode;2216 if( uiOrgMode == MAX_UINT )2217 {2218 break;2219 }2220 #else2221 UInt uiOrgMode = uiBestPUMode;2222 #endif2223 2224 pcCU->setLumaIntraDirSubParts ( uiOrgMode, uiPartOffset, uiDepth + uiInitTrDepth );2225 2226 // set context models2227 if( m_bUseSBACRD )2228 {2229 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );2230 }2231 2232 // determine residual for partition2233 Dist uiPUDistY = 0;2234 Dist uiPUDistC = 0;2235 Double dPUCost = 0.0;2236 2237 #if HHI_VSO2238 // reset Model2239 if( m_pcRdCost->getUseRenModel() )2240 {2241 m_pcRdCost->setRenModelData( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight );2242 }2243 #endif2244 2245 xRecurIntraCodingQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcOrgYuv, pcPredYuv, pcResiYuv, uiPUDistY, uiPUDistC, false, dPUCost );2246 2247 // check r-d cost2248 if( dPUCost < dBestPUCost )2249 {2250 uiBestPUMode = uiOrgMode;2251 uiBestPUDistY = uiPUDistY;2252 uiBestPUDistC = uiPUDistC;2253 dBestPUCost = dPUCost;2254 2255 xSetIntraResultQT( pcCU, uiInitTrDepth, uiPartOffset, bLumaOnly, pcRecoYuv );2256 2257 UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth(0) + uiInitTrDepth ) << 1 );2258 ::memcpy( m_puhQTTempTrIdx, pcCU->getTransformIdx() + uiPartOffset, uiQPartNum * sizeof( UChar ) );2259 ::memcpy( m_puhQTTempCbf[0], pcCU->getCbf( TEXT_LUMA ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );2260 ::memcpy( m_puhQTTempCbf[1], pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );2261 ::memcpy( m_puhQTTempCbf[2], pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, uiQPartNum * sizeof( UChar ) );2262 2263 }2264 2534 } // Mode loop 2265 2535 #endif … … 2268 2538 uiOverallDistY += uiBestPUDistY; 2269 2539 uiOverallDistC += uiBestPUDistC; 2540 2541 #if RWTH_SDC_DLT_B0036 2542 if( bBestUseSDC ) 2543 { 2544 pcCU->setTrIdxSubParts(0, uiPartOffset, uiDepth + uiInitTrDepth); 2545 pcCU->setCbfSubParts(1, 1, 1, uiPartOffset, uiDepth + uiInitTrDepth); 2546 2547 //=== copy best DC segment values back to CU ==== 2548 pcCU->setSDCSegmentDCOffset(apBestDCOffsets[0], 0, uiPartOffset); 2549 pcCU->setSDCSegmentDCOffset(apBestDCOffsets[1], 1, uiPartOffset); 2550 } 2551 else 2552 { 2553 #endif 2270 2554 2271 2555 //--- update transform index and cbf --- … … 2275 2559 ::memcpy( pcCU->getCbf( TEXT_CHROMA_U ) + uiPartOffset, m_puhQTTempCbf[1], uiQPartNum * sizeof( UChar ) ); 2276 2560 ::memcpy( pcCU->getCbf( TEXT_CHROMA_V ) + uiPartOffset, m_puhQTTempCbf[2], uiQPartNum * sizeof( UChar ) ); 2561 #if RWTH_SDC_DLT_B0036 2562 } 2563 #endif 2277 2564 2278 2565 //--- set reconstruction for next intra prediction blocks --- … … 2345 2632 //=== update PU data ==== 2346 2633 pcCU->setLumaIntraDirSubParts ( uiBestPUMode, uiPartOffset, uiDepth + uiInitTrDepth ); 2634 #if RWTH_SDC_DLT_B0036 2635 pcCU->setSDCFlagSubParts ( bBestUseSDC, uiPartOffset, 0, uiDepth + uiInitTrDepth ); 2636 #endif 2347 2637 pcCU->copyToPic ( uiDepth, uiPU, uiInitTrDepth ); 2348 2638 } // PU loop … … 2644 2934 iWidth, iHeight, m_pcEncCfg->getUseHADME() ); 2645 2935 #endif 2936 #if LGE_ILLUCOMP_B0045 2937 cDistParam.bUseIC = false; 2938 #endif 2646 2939 ruiErr = cDistParam.DistFunc( &cDistParam ); 2647 2940 } … … 2661 2954 */ 2662 2955 #if CU_BASED_MRG_CAND_LIST 2956 #if LG_RESTRICTEDRESPRED_M24766 2957 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* rpcResiPredYuv, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2958 #else 2663 2959 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand ) 2960 #endif 2664 2961 #else 2665 2962 #if LG_RESTRICTEDRESPRED_M24766 … … 2963 3260 for (Int iNumRef=0; iNumRef < MAX_NUM_REF; iNumRef++) uiCostTempL0[iNumRef] = MAX_UINT; 2964 3261 UInt uiBitsTempL0[MAX_NUM_REF]; 2965 2966 3262 #if LG_RESTRICTEDRESPRED_M24766 2967 3263 Int iPUResiPredShift[4] = {0, 0, 0, 0}; … … 3772 4068 UInt uiMRGCost = MAX_UINT; 3773 4069 #if CU_BASED_MRG_CAND_LIST 4070 #if LG_RESTRICTEDRESPRED_M24766 4071 xMergeEstimation( pcCU, pcOrgYuv, rpcResiPredYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 4072 #else 3774 4073 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 4074 #endif 3775 4075 #else 3776 4076 #if LG_RESTRICTEDRESPRED_M24766 … … 4110 4410 cMvCand <<= 2; 4111 4411 #endif 4412 4413 #if LGE_ILLUCOMP_B0045 4414 #if VSP_AIC 4415 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getPOC() == pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdx)); 4416 #else 4417 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getViewId() != pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdx)); 4418 #endif 4419 #endif 4112 4420 // prediction pattern 4113 4421 if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE ) … … 4117 4425 else 4118 4426 { 4427 #if LGE_ILLUCOMP_B0045 4428 xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false, bICFlag ); 4429 #else 4119 4430 xPredInterLumaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMvCand, iSizeX, iSizeY, pcTemplateCand, false ); 4431 #endif 4120 4432 } 4121 4433 … … 4173 4485 Int iSrchRng = ( bBi ? m_bipredSearchRange : m_iSearchRange ); 4174 4486 #endif 4487 #if DV_V_RESTRICTION_B0037 4488 Int iVerDispSrchRng = m_iVerticalDisparitySearchRange; 4489 #endif 4175 4490 TComPattern* pcPatternKey = pcCU->getPattern (); 4176 4491 … … 4179 4494 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight ); 4180 4495 4496 #if LGE_ILLUCOMP_B0045 4497 #if VSP_AIC 4498 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getPOC() == pcCU->getSlice()->getRefPOC(eRefPicList, iRefIdxPred)); 4499 #else 4500 Bool bICFlag = pcCU->getICFlag(uiPartAddr) && (pcCU->getSlice()->getViewId() != pcCU->getSlice()->getRefViewId(eRefPicList, iRefIdxPred)); 4501 #endif 4502 pcPatternKey->setICFlag(bICFlag); 4503 #endif 4504 4181 4505 if ( bBi ) 4182 4506 { … … 4204 4528 4205 4529 TComMv cMvPred = *pcMvPred; 4206 4530 4531 #if DV_V_RESTRICTION_B0037 4532 Bool bMv_VRng_Restricted = false; 4533 if( pcCU->getSlice()->getViewId() > 0 4534 && 4535 pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getPOC() == pcCU->getSlice()->getPOC() 4536 && 4537 m_bUseDisparitySearchRangeRestriction 4538 ) 4539 { 4540 bMv_VRng_Restricted = true; 4541 } 4542 #endif 4543 4544 #if DV_V_RESTRICTION_B0037 4545 if ( bBi ) xSetSearchRange ( pcCU, rcMv , iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng ); 4546 else xSetSearchRange ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng ); 4547 #else 4207 4548 if ( bBi ) xSetSearchRange ( pcCU, rcMv , iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4208 4549 else xSetSearchRange ( pcCU, cMvPred, iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4209 4550 #endif 4551 4210 4552 m_pcRdCost->getMotionCost ( 1, 0 ); 4211 4553 … … 4235 4577 if( bMultiviewReg && !bBi ) 4236 4578 { 4579 #if DV_V_RESTRICTION_B0037 4580 xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB, bMv_VRng_Restricted, iVerDispSrchRng ); 4581 #else 4237 4582 xSetSearchRange( pcCU, cOrgDepthMapMv, iSrchRng, cMvSrchRngLT, cMvSrchRngRB ); 4583 #endif 4238 4584 } 4239 4585 } … … 4244 4590 } 4245 4591 #endif 4246 4592 #if QC_MVHEVC_B0046 4593 m_pcRdCost->setMultiviewReg( 0 ); 4594 #endif 4247 4595 setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList ); 4248 4596 // Do integer search … … 4262 4610 4263 4611 m_pcRdCost->getMotionCost( 1, 0 ); 4264 4265 4612 #if HHI_FULL_PEL_DEPTH_MAP_MV_ACC 4266 4613 if( ! pcCU->getSlice()->getIsDepth() ) … … 4305 4652 } 4306 4653 4307 4654 #if DV_V_RESTRICTION_B0037 4655 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB, Bool bMv_VRng_Restricted, Int iVerDispSrchRng ) 4656 #else 4308 4657 Void TEncSearch::xSetSearchRange ( TComDataCU* pcCU, TComMv& cMvPred, Int iSrchRng, TComMv& rcMvSrchRngLT, TComMv& rcMvSrchRngRB ) 4658 #endif 4309 4659 { 4310 4660 Int iMvShift = 2; … … 4321 4671 rcMvSrchRngRB.setHor( cTmpMvPred.getHor() + (iSrchRng << iMvShift) ); 4322 4672 rcMvSrchRngRB.setVer( cTmpMvPred.getVer() + (iSrchRng << iMvShift) ); 4673 4674 #if DV_V_RESTRICTION_B0037 4675 if ( bMv_VRng_Restricted ) { 4676 Int iRestrictMvVrange = ( iVerDispSrchRng ) << iMvShift; 4677 if ( rcMvSrchRngRB.getVer() >= iRestrictMvVrange ){ 4678 rcMvSrchRngRB.setVer( iRestrictMvVrange ); 4679 } 4680 //restrict minus vector too 4681 if ( rcMvSrchRngLT.getVer() <= -iRestrictMvVrange ){ 4682 rcMvSrchRngLT.setVer( -iRestrictMvVrange ); 4683 } 4684 } 4685 #endif 4323 4686 pcCU->clipMv ( rcMvSrchRngLT ); 4324 4687 pcCU->clipMv ( rcMvSrchRngRB ); … … 4365 4728 setDistParamComp(0); 4366 4729 4730 #if LGE_ILLUCOMP_B0045 4731 m_cDistParam.bUseIC = pcPatternKey->getICFlag(); 4732 #endif 4367 4733 uiSad = m_cDistParam.DistFunc( &m_cDistParam ); 4368 4734 … … 4736 5102 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 4737 5103 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true ); 5104 #if LGE_ILLUCOMP_B0045 5105 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 5106 #endif 4738 5107 #if HHI_INTER_VIEW_RESIDUAL_PRED 4739 5108 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); … … 5486 5855 } 5487 5856 5857 #if FIX_RDO_NEGDIST 5858 Dist uiDistU = 0; 5859 Dist uiDistV = 0; 5860 #else 5488 5861 UInt uiDistU = 0; 5489 5862 UInt uiDistV = 0; 5863 #endif 5490 5864 if( bCodeChroma ) 5491 5865 { … … 5525 5899 #endif 5526 5900 5901 #if FIX_RDO_NEGDIST 5902 const Dist uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), 5903 pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC 5904 5905 #else 5527 5906 const UInt uiNonzeroDistU = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCbAddr( absTUPartIdxC), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), 5528 5907 pcResi->getCbAddr( absTUPartIdxC), pcResi->getCStride(), trWidthC, trHeightC 5908 #endif 5529 5909 #if WEIGHTED_CHROMA_DISTORTION 5530 5910 , true … … 5611 5991 m_pcTrQuant->invtransformNxN( TEXT_CHROMA,REG_DCT, pcResiCurrV, m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), pcCoeffCurrV, trWidthC, trHeightC, scalingListType ); 5612 5992 #endif 5613 5993 #if FIX_RDO_NEGDIST 5994 const Dist uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), 5995 pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC 5996 #else 5614 5997 const UInt uiNonzeroDistV = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getCrAddr( absTUPartIdxC ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getCStride(), 5615 5998 pcResi->getCrAddr( absTUPartIdxC ), pcResi->getCStride(), trWidthC, trHeightC 5999 #endif 5616 6000 #if WEIGHTED_CHROMA_DISTORTION 5617 6001 , true … … 6110 6494 #endif 6111 6495 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, 0, true); 6496 #if LGE_ILLUCOMP_B0045 6497 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6498 #endif 6112 6499 #if HHI_INTER_VIEW_RESIDUAL_PRED 6113 6500 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); … … 6139 6526 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 6140 6527 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 6528 #if LGE_ILLUCOMP_B0045 6529 m_pcEntropyCoder->encodeICFlag(pcCU, 0, true); 6530 #endif 6141 6531 #if HHI_INTER_VIEW_RESIDUAL_PRED 6142 6532 m_pcEntropyCoder->encodeResPredFlag( pcCU, 0, 0, true ); … … 6396 6786 6397 6787 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 6788 #if ((HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX)&&FLEX_CODING_ORDER_M23723) 6789 Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight, Bool bDMMAvailable34 ) 6790 #else 6398 6791 Bool TEncSearch::predIntraLumaDMMAvailable( UInt uiMode, UInt uiWidth, UInt uiHeight ) 6792 #endif 6399 6793 { 6400 6794 if( uiMode < NUM_INTRA_MODE ) return true; … … 6424 6818 bDMMAvailable = false; 6425 6819 } 6820 6821 #if FLEX_CODING_ORDER_M23723 6822 if ( !bDMMAvailable34 ) 6823 { 6824 bDMMAvailable = false; 6825 } 6826 #endif 6827 6426 6828 } 6427 6829 #endif … … 6494 6896 6495 6897 Dist uiActDist = RDO_DIST_MAX; 6496 #if FIX_RDO_MACRO6497 6898 #if SAIT_VSO_EST_A0033 6498 6899 if ( m_pcRdCost->getUseEstimatedVSD() ) … … 6525 6926 #endif // LGE_WVSO_A0119 6526 6927 } 6527 #else // FIX_RDO_MACRO6528 #if SAIT_VSO_EST_A00336529 if ( m_pcRdCost->getUseEstimatedVSD() )6530 {6531 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();6532 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();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_A01196535 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_A01196543 }6544 else6545 #else // SAIT_VSO_EST_A0033 <-- wrong #else statement should be #endif6546 {6547 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, 0 );6548 #if LGE_WVSO_A01196549 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_A01196557 }6558 #endif // SAIT_VSO_EST_A0033 <-- wrong #endif should be removed6559 #endif // FIX_RDO_MACRO6560 6928 6561 6929 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) … … 6599 6967 WedgeList* pacWedgeList = &g_aacWedgeLists[(g_aucConvertToBit[uiWidth])]; 6600 6968 Dist iDist = RDO_DIST_MAX; 6969 #if HHIQC_DMMFASTSEARCH_B0039 6970 WedgeNodeList* pacWedgeNodeList = &g_aacWedgeNodeLists[(g_aucConvertToBit[uiWidth])]; 6971 xSearchWedgeFullMinDistFast( pcCU, uiAbsPtIdx, pacWedgeNodeList, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, iDist ); 6972 #else 6601 6973 xSearchWedgeFullMinDist( pcCU, uiAbsPtIdx, pacWedgeList, piOrig, uiStride, uiWidth, uiHeight, ruiTabIdx, iDist ); 6974 #endif 6602 6975 6603 6976 TComWedgelet* pcBestWedgelet = &(pacWedgeList->at(ruiTabIdx)); … … 6710 7083 } 6711 7084 7085 #if HHIQC_DMMFASTSEARCH_B0039 7086 Void TEncSearch::xSearchWedgeFullMinDistFast( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeNodeList* pacWedgeNodeList, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Dist& riDist ) 7087 { 7088 ruiTabIdx = 0; 7089 7090 // local pred buffer 7091 TComYuv cPredYuv; 7092 cPredYuv.create( uiWidth, uiHeight ); 7093 cPredYuv.clear(); 7094 7095 UInt uiPredStride = cPredYuv.getStride(); 7096 Pel* piPred = cPredYuv.getLumaAddr(); 7097 7098 Int iDC1 = 0; 7099 Int iDC2 = 0; 7100 7101 // coarse wedge search 7102 Dist uiBestDist = RDO_DIST_MAX; 7103 UInt uiBestNodeId = 0; 7104 for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ ) 7105 { 7106 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piRef, uiRefStride, iDC1, iDC2 ); 7107 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiNodeId).getPatternIdx())), piPred, uiPredStride, iDC1, iDC2 ); 7108 7109 Dist uiActDist = RDO_DIST_MAX; 7110 #if HHI_VSO 7111 if( m_pcRdCost->getUseVSO() ) 7112 { 7113 #if SAIT_VSO_EST_A0033 7114 if ( m_pcRdCost->getUseEstimatedVSD() ) 7115 { 7116 TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv(); 7117 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 7118 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight ); 7119 #if LGE_WVSO_A0119 7120 if ( m_pcRdCost->getUseWVSO() ) 7121 { 7122 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 7123 Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight(); 7124 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7125 uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight); 7126 } 7127 #endif 7128 } 7129 else 7130 #endif 7131 { 7132 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 7133 #if LGE_WVSO_A0119 7134 if ( m_pcRdCost->getUseWVSO() ) 7135 { 7136 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 7137 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 7138 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7139 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 7140 } 7141 #endif 7142 } 7143 } 7144 else 7145 { 7146 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7147 } 7148 #else 7149 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7150 #endif 7151 if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX ) 7152 { 7153 uiBestDist = uiActDist; 7154 uiBestNodeId = uiNodeId; 7155 } 7156 } 7157 7158 // refinement 7159 Dist uiBestDistRef = uiBestDist; 7160 UInt uiBestTabIdxRef = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx(); 7161 for( UInt uiRefId = 0; uiRefId < NUM_WEDGE_REFINES; uiRefId++ ) 7162 { 7163 if( pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ) != NO_IDX ) 7164 { 7165 calcWedgeDCs ( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piRef, uiRefStride, iDC1, iDC2 ); 7166 assignWedgeDCs2Pred( &(pacWedgeList->at(pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ))), piPred, uiPredStride, iDC1, iDC2 ); 7167 7168 Dist uiActDist = RDO_DIST_MAX; 7169 #if HHI_VSO 7170 if( m_pcRdCost->getUseVSO() ) 7171 { 7172 uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 ); 7173 #if LGE_WVSO_A0119 7174 if ( m_pcRdCost->getUseWVSO() ) 7175 { 7176 Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight(); 7177 Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight(); 7178 Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7179 uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight); 7180 } 7181 #endif 7182 } 7183 else 7184 { 7185 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7186 } 7187 #else 7188 uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD ); 7189 #endif 7190 if( uiActDist < uiBestDistRef || uiBestDistRef == RDO_DIST_MAX ) 7191 { 7192 uiBestDistRef = uiActDist; 7193 uiBestTabIdxRef = pacWedgeNodeList->at(uiBestNodeId).getRefineIdx( uiRefId ); 7194 } 7195 } 7196 } 7197 7198 riDist = uiBestDistRef; 7199 ruiTabIdx = uiBestTabIdxRef; 7200 7201 cPredYuv.destroy(); 7202 return; 7203 } 7204 #endif 7205 6712 7206 Void TEncSearch::xSearchWedgePredDirMinDist( TComDataCU* pcCU, UInt uiAbsPtIdx, WedgeList* pacWedgeList, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ) 6713 7207 { … … 6846 7340 #endif 6847 7341 6848 #if LGE_EDGE_INTRA 7342 #if LGE_EDGE_INTRA_A0070 6849 7343 Bool TEncSearch::xCheckTerminatedEdge( Bool* pbEdge, Int iX, Int iY, Int iWidth, Int iHeight ) 6850 7344 { … … 7954 8448 #endif 7955 8449 #endif 8450 8451 #if RWTH_SDC_DLT_B0036 8452 Void TEncSearch::xAnalyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride ) 8453 { 8454 Int iSumDepth[2]; 8455 memset(iSumDepth, 0, sizeof(Int)*2); 8456 Int iSumPix[2]; 8457 memset(iSumPix, 0, sizeof(Int)*2); 8458 8459 for (Int y=0; y<uiSize; y++) 8460 { 8461 for (Int x=0; x<uiSize; x++) 8462 { 8463 UChar ucSegment = pMask?(UChar)pMask[x]:0; 8464 assert( ucSegment < uiNumSegments ); 8465 8466 iSumDepth[ucSegment] += pOrig[x]; 8467 iSumPix[ucSegment] += 1; 8468 } 8469 8470 pOrig += uiStride; 8471 pMask += uiMaskStride; 8472 } 8473 8474 // compute mean for each segment 8475 for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ ) 8476 { 8477 if( iSumPix[ucSeg] > 0 ) 8478 rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg]; 8479 else 8480 rpSegMeans[ucSeg] = 0; // this happens for zero-segments 8481 } 8482 } 8483 #endif 7956 8484 7957 8485 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSearch.h
r166 r213 94 94 Int m_iSearchRange; 95 95 Int m_bipredSearchRange; // Search range for bi-prediction 96 #if DV_V_RESTRICTION_B0037 97 Bool m_bUseDisparitySearchRangeRestriction; 98 Int m_iVerticalDisparitySearchRange; 99 #endif 96 100 Int m_iFastSearch; 97 101 Int m_aaiAdaptSR[2][33]; … … 132 136 Int iSearchRange, 133 137 Int bipredSearchRange, 138 #if DV_V_RESTRICTION_B0037 139 Bool bUseDisparitySearchRangeRestriction, 140 Int iVerticalDisparitySearchRange, 141 #endif 134 142 Int iFastSearch, 135 143 Int iMaxDeltaQP, … … 267 275 TComYuv* pcResiYuv, 268 276 Dist& ruiDist 269 #if LG_ZEROINTRADEPTHRESI_ M26039277 #if LG_ZEROINTRADEPTHRESI_A0087 270 278 ,Bool bZeroResi = false 271 279 #endif … … 292 300 #endif 293 301 Double& dRDCost 294 #if LG_ZEROINTRADEPTHRESI_ M26039302 #if LG_ZEROINTRADEPTHRESI_A0087 295 303 ,Bool bZeroResi = false 296 304 #endif … … 315 323 TComYuv* pcRecoYuv ); 316 324 325 #if RWTH_SDC_DLT_B0036 326 Void xAnalyzeSegmentsSDC ( Pel* pOrig, 327 UInt uiStride, 328 UInt uiSize, 329 Pel* rpSegMeans, 330 UInt uiNumSegments, 331 Bool* pMask, 332 UInt uiMaskStride ); 333 334 Void xIntraCodingSDC ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bResidual ); 335 #endif 336 317 337 // ------------------------------------------------------------------------------------------------------------------- 318 338 // DMM intra search … … 322 342 Bool predIntraLumaDMMAvailable ( UInt uiMode, 323 343 UInt uiWidth, 324 UInt uiHeight ); 344 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 345 UInt uiHeight, 346 Bool bDMMAvailable34 ); 347 #else 348 UInt uiHeight ); 349 #endif 350 325 351 Void xGetWedgeDeltaDCsMinDist ( TComWedgelet* pcWedgelet, 326 352 TComDataCU* pcCU, … … 337 363 #endif 338 364 339 #if LGE_EDGE_INTRA 365 #if LGE_EDGE_INTRA_A0070 340 366 Bool xEdgePartition ( TComDataCU* pcCU, UInt uiPartIdx, Bool bPU4x4 ); 341 367 Bool xCheckTerminatedEdge ( Bool* pbEdge, Int iX, Int iY, Int iWidth, Int iHeight ); … … 381 407 UInt& ruiTabIdx, 382 408 Dist& riDist ); 409 #if HHIQC_DMMFASTSEARCH_B0039 410 Void xSearchWedgeFullMinDistFast( TComDataCU* pcCU, 411 UInt uiAbsPtIdx, 412 WedgeNodeList* pacWedgeNodeList, 413 WedgeList* pacWedgeList, 414 Pel* piRef, 415 UInt uiRefStride, 416 UInt uiWidth, 417 UInt uiHeight, 418 UInt& ruiTabIdx, 419 Dist& riDist ); 420 #endif 383 421 Void xSearchWedgePredDirMinDist ( TComDataCU* pcCU, 384 422 UInt uiAbsPtIdx, … … 509 547 UInt& ruiSAD ); 510 548 549 #if DV_V_RESTRICTION_B0037 550 Void xSetSearchRange ( TComDataCU* pcCU, 551 TComMv& cMvPred, 552 Int iSrchRng, 553 TComMv& rcMvSrchRngLT, 554 TComMv& rcMvSrchRngRB, 555 Bool bDispSrchRngRst, 556 Int iDispVerSrchRng ); 557 #else 511 558 Void xSetSearchRange ( TComDataCU* pcCU, 512 559 TComMv& cMvPred, … … 514 561 TComMv& rcMvSrchRngLT, 515 562 TComMv& rcMvSrchRngRB ); 563 #endif 516 564 517 565 Void xPatternSearchFast ( TComDataCU* pcCU, -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
r193 r213 38 38 #include "TEncTop.h" 39 39 #include "TEncSlice.h" 40 #if HHI_VSO_SPEEDUP_A003341 40 #include "../../App/TAppEncoder/TAppEncTop.h" 42 #endif43 41 #include <math.h> 44 42 … … 164 162 \param pPPS PPS associated with the slice 165 163 */ 166 #if VIDYO_VPS_INTEGRATION 164 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 167 165 Void TEncSlice::initEncSlice( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS * pVPS, TComSPS* pSPS, TComPPS *pPPS ) 168 166 #else … … 174 172 175 173 rpcSlice = pcPic->getSlice(0); 176 #if VIDYO_VPS_INTEGRATION 174 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 177 175 rpcSlice->setVPS( pVPS ); 178 176 #endif … … 191 189 rpcSlice->setViewOrderIdx(m_pcCfg->getViewOrderIdx()); 192 190 #endif 193 191 #if LGE_ILLUCOMP_B0045 192 rpcSlice->setApplyIC(false); 193 #endif 194 194 // set mutliview parameters 195 195 rpcSlice->initMultiviewSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() ); … … 648 648 TComSlice* pcSlice = rpcPic->getSlice(getSliceIdx()); 649 649 xDetermineStartAndBoundingCUAddr ( uiStartCUAddr, uiBoundingCUAddr, rpcPic, false ); 650 #if LG_ZEROINTRADEPTHRESI_ M26039650 #if LG_ZEROINTRADEPTHRESI_A0087 651 651 rpcPic->setIntraPeriod(this->m_pcCfg->getIntraPeriod()); 652 652 #endif … … 657 657 m_uiPicDist = 0; 658 658 659 #if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX659 #if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG 660 660 Bool bReset =(pcSlice->getPOC() == 0) || 661 661 (pcSlice->getPOC() % m_pcCfg->getIntraPeriod() == 0) || … … 769 769 UInt uiTilesAcross = 0; 770 770 771 #if LGE_ILLUCOMP_B0045 772 if (pcEncTop->getViewId() != 0 && !pcEncTop->isDepthCoder() && pcEncTop->getUseIC()) // DCP of ViewID 0 is not available 773 { 774 pcSlice ->xSetApplyIC(); 775 } 776 #endif 777 771 778 if( m_pcCfg->getUseSBACRD() ) 772 779 { … … 813 820 UInt uiTileStartLCU = 0; 814 821 UInt uiTileLCUX = 0; 815 816 #if HHI_VSO_SPEEDUP_A0033 822 #if !QC_MVHEVC_B0046 817 823 Int iLastPosY = -1; 818 824 #endif 819 820 825 // for every CU in slice 821 826 UInt uiEncCUOrder; … … 828 833 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 829 834 pcCU->initCU( rpcPic, uiCUAddr ); 830 831 #if HHI_VSO_SPEEDUP_A0033 835 #if !QC_MVHEVC_B0046 832 836 if ( m_pcRdCost->getUseRenModel() ) 833 837 { … … 844 848 } 845 849 #endif 846 847 #if OL_DEPTHLIMIT_A0044 //stop dumping partition information848 m_bDumpPartInfo = 0;849 pcCU->setPartDumpFlag(m_bDumpPartInfo);850 #endif851 852 850 // inherit from TR if necessary, select substream to use. 853 851 if( m_pcCfg->getUseSBACRD() ) … … 1307 1305 } 1308 1306 1307 #if OL_QTLIMIT_PREDCODING_B0068 1308 rpcPic->setReduceBitsFlag(true); 1309 #endif 1310 1309 1311 TComDataCU*& pcCU = rpcPic->getCU( uiCUAddr ); 1310 #if OL_DEPTHLIMIT_A00441311 pcCU->setPartDumpFlag(m_bDumpPartInfo);1312 pcCU->resetPartInfo();1313 #endif1314 1312 #if !REMOVE_TILE_DEPENDENCE 1315 1313 if( (rpcPic->getPicSym()->getTileBoundaryIndependenceIdr()==0) && (rpcPic->getPicSym()->getNumColumnsMinus1()!=0) ) … … 1399 1397 } 1400 1398 #endif 1399 1400 #if OL_QTLIMIT_PREDCODING_B0068 1401 rpcPic->setReduceBitsFlag(false); 1402 #endif 1403 1401 1404 } 1402 1405 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncSlice.h
r193 r213 101 101 102 102 UInt m_uiSliceIdx; 103 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping104 Bool m_bDumpPartInfo;105 #endif106 103 public: 107 104 TEncSlice(); … … 113 110 114 111 /// preparation of slice encoding (reference marking, QP and lambda) 115 #if VIDYO_VPS_INTEGRATION 112 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 116 113 Void initEncSlice ( TComPic* pcPic, Int iPOCLast, UInt uiPOCCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS ); 117 114 #else … … 131 128 UInt getSliceIdx() { return m_uiSliceIdx; } 132 129 Void setSliceIdx(UInt i) { m_uiSliceIdx = i; } 133 #if OL_DEPTHLIMIT_A0044 //flag to signal to start dumping134 Void setPartDumpFlag(Bool flag) { m_bDumpPartInfo = flag;};135 #endif136 130 }; 137 131 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r193 r213 88 88 m_bUseVSP = false; 89 89 m_bVSPDepthDisable = false; 90 m_bIsFirstInView = false; 90 91 #endif 91 92 } … … 101 102 { 102 103 // initialize global variables 103 #if FIX_INIT_ROM104 104 if( m_viewId == 0 && m_isDepth == false ) 105 105 { 106 #endif107 106 initROM(); 108 #if FIX_INIT_ROM 109 } 110 #endif 107 } 111 108 112 109 … … 414 411 415 412 // initialize encoder search class 413 #if DV_V_RESTRICTION_B0037 414 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_bUseDisparitySearchRangeRestriction, m_iVerticalDisparitySearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() ); 415 #else 416 416 m_cSearch.init( this, &m_cTrQuant, m_iSearchRange, m_bipredSearchRange, m_iFastSearch, 0, &m_cEntropyCoder, &m_cRdCost, getRDSbacCoder(), getRDGoOnSbacCoder() ); 417 417 #endif 418 418 if(m_bUseALF) 419 419 { … … 428 428 429 429 #if VSP_N 430 m_pcPicVSP->setIsVsp( true ); 430 431 m_pcPicVSP->setCurrSliceIdx( 0 ); 431 432 m_pcPicVSP->getCurrSlice()->setSPS( this->getSPS() ); … … 440 441 } 441 442 #if DEPTH_MAP_GENERATION 442 #if !QC_MULTI_DIS_CAN 443 #if !QC_MULTI_DIS_CAN_A0097 443 444 // add extra pic buffers 444 445 Bool bNeedPrdDepthMapBuf = ( m_uiPredDepthMapGeneration > 0 ); … … 450 451 #endif 451 452 #endif 453 m_pcPicAvail->setIsVsp( true ); 452 454 m_pcPicAvail->setCurrSliceIdx( 0 ); 453 455 m_pcPicAvail->getCurrSlice()->setSPS( this->getSPS() ); … … 462 464 } 463 465 #if DEPTH_MAP_GENERATION 464 #if !QC_MULTI_DIS_CAN 466 #if !QC_MULTI_DIS_CAN_A0097 465 467 // add extra pic buffers 466 468 bNeedPrdDepthMapBuf = ( m_uiPredDepthMapGeneration > 0 ); … … 687 689 // mark it should be extended 688 690 rpcPic->getPicYuvRec()->setBorderExtension(false); 689 #if FIXES690 691 rpcPic->getPicYuvOrg()->setBorderExtension(false); 691 #endif692 692 } 693 693 … … 730 730 #endif 731 731 732 #if RWTH_SDC_DLT_B0036 733 m_cSPS.setUseDLT ( m_bUseDLT ); 734 #endif 735 732 736 m_cSPS.setQuadtreeTULog2MaxSize( m_uiQuadtreeTULog2MaxSize ); 733 737 m_cSPS.setQuadtreeTULog2MinSize( m_uiQuadtreeTULog2MinSize ); … … 850 854 m_cSPS.setUseDMM( m_bUseDMM ); 851 855 #endif 852 #if OL_DEPTHLIMIT_A0044 853 m_cSPS.setUseDPL( m_bDepthPartitionLimiting ); 856 857 #if HHI_DMM_PRED_TEX && FLEX_CODING_ORDER_M23723 858 m_cSPS.setUseDMM34( m_bUseDMM34 ); 859 #endif 860 861 #if OL_QTLIMIT_PREDCODING_B0068 862 m_cSPS.setUseQTLPC( m_bUseQTLPC ); 854 863 #endif 855 864 #if HHI_MPI … … 857 866 #endif 858 867 868 #if VSP_N 869 m_cSPS.setIsFirstInView( m_bIsFirstInView ); 870 #endif 871 859 872 if( m_isDepth ) 860 873 { 874 #if VSP_N 875 if( m_cSPS.getIsFirstInView() ) 876 m_cSPS.initMultiviewSPSFlex ( m_viewId, m_iViewOrderIdx, true, m_cSPS.getIsFirstInView(), m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset ); 877 else 878 m_cSPS.initMultiviewSPSDepth ( m_viewId, m_iViewOrderIdx ); 879 #else 861 880 m_cSPS.initMultiviewSPSDepth ( m_viewId, m_iViewOrderIdx ); 881 #endif 862 882 #if DEPTH_MAP_GENERATION 863 883 m_cSPS.setPredDepthMapGeneration( m_viewId, true ); … … 869 889 else 870 890 { 891 #if QC_MVHEVC_B0046 892 m_cSPS.initMultiviewSPS ( m_viewId); 893 #else 871 894 m_cSPS.initMultiviewSPS ( m_viewId, m_iViewOrderIdx, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset ); 895 #endif 872 896 if( m_viewId ) 873 897 { … … 1083 1107 Void TEncTop::selectReferencePictureSet(TComSlice* slice, Int POCCurr, Int GOPid,TComList<TComPic*>& listPic ) 1084 1108 { 1109 #if QC_REM_IDV_B0046 1110 if( (slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR ||slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) && slice->getSPS()->getViewId() && POCCurr == 0 ) 1111 #else 1085 1112 if( slice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDV && POCCurr == 0 ) 1113 #endif 1086 1114 { 1087 1115 TComReferencePictureSet* rps = slice->getLocalRPS(); … … 1190 1218 1191 1219 // # substreams is "per tile" when tiles are independent. 1192 #if FIX_REMOVE_TILE_DEPENDENCE1193 1220 if ( m_iWaveFrontSynchro ) 1194 #else1195 if (m_iTileBoundaryIndependenceIdr && m_iWaveFrontSynchro)1196 #endif1197 1221 { 1198 1222 m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1)); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncTop.h
r193 r213 148 148 TComPic* m_pcPicVSP; ///< view synthesis prediction buffer for current POC to be coded 149 149 TComPic* m_pcPicAvail; 150 Bool m_bIsFirstInView; 150 151 #endif 151 152 … … 245 246 TComPic* getVSPBuf () { return m_pcPicVSP; } 246 247 TComPic* getVSPAvailBuf () { return m_pcPicAvail; } 248 Void setIsFirstInView ( Bool b ) { m_bIsFirstInView = b; } 249 Bool getIsFirstInView () { return m_bIsFirstInView; } 247 250 #endif 248 251 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibExtractor/TExtrTop.cpp
r100 r213 55 55 Bool TExtrTop::extract( InputNALUnit& nalu, std::set<UInt>& rsuiExtractLayerIds ) 56 56 { 57 #if VIDYO_VPS_INTEGRATION 57 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 58 58 //extraction now has to be done using layer_id 59 59 UInt uiLayerId = nalu.m_layerId; … … 65 65 m_cEntropyDecoder.setBitstream ( nalu.m_Bitstream ); 66 66 67 #if VIDYO_VPS_INTEGRATION 67 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 68 68 if ( nalu.m_nalUnitType == NAL_UNIT_VPS ) 69 69 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibExtractor/TExtrTop.h
r77 r213 54 54 { 55 55 private: 56 #if VIDYO_VPS_INTEGRATION 56 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046 57 57 TComVPS m_cVPS; 58 58 #endif -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenImage.cpp
r101 r213 106 106 } 107 107 108 #if HHI_VSO_SPEEDUP_A0033109 108 template<typename T> 110 109 Void TRenImage<T>::getDataAndStrides( T** pptData, Int* piStrides ) … … 127 126 } 128 127 } 129 #endif130 128 131 129 template<typename T> -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenImage.h
r101 r213 69 69 TRenImagePlane<T>** getPlanes() const; 70 70 71 #if HHI_VSO_SPEEDUP_A003372 71 Void getDataAndStrides( T** pptData, Int* piStrides ); 73 72 Void getWidthAndHeight( Int* piWidths, Int* piHeights ); 74 #endif75 73 76 74 UInt getNumberOfPlanes() const; -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModSetupStrParser.cpp
r100 r213 36 36 #include "TRenFilter.h" 37 37 #include "TRenModSetupStrParser.h" 38 38 #if !QC_MVHEVC_B0046 39 39 Int 40 40 TRenModSetupStrParser::getNumOfModels() … … 450 450 rcNextChar = m_pchSetStr[iPos]; 451 451 } 452 #endif 453 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModSetupStrParser.h
r56 r213 31 31 * THE POSSIBILITY OF SUCH DAMAGE. 32 32 */ 33 33 #if !QC_MVHEVC_B0046 34 34 #ifndef __TRENMODSETUPSTRPARSER__ 35 35 #define __TRENMODSETUPSTRPARSER__ … … 127 127 128 128 #endif //__TRENMODEL__ 129 #endif 130 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.cpp
r193 r213 35 35 #include "TRenFilter.h" 36 36 #include "TRenModel.h" 37 37 #if !QC_MVHEVC_B0046 38 38 /////////// TRENMODEL ////////////////////// 39 39 TRenModel::TRenModel() … … 42 42 m_iWidth = -1; 43 43 m_iHeight = -1; 44 #if FIX_VSO_SETUP45 44 m_iUsedHeight = -1; 46 #endif47 45 m_iNumOfBaseViews = -1; 48 46 m_iSampledWidth = -1; … … 437 435 { 438 436 AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews ); 439 #if FIX_VSO_SETUP440 437 AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth ); 441 438 AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth ); 442 #else443 AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth );444 AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth );445 #endif446 439 447 440 pcPicYuvVideoData->extendPicBorder(); 448 441 449 #if FIX_VSO_SETUP450 442 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 443 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 444 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 445 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] ); 454 #else455 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth, m_iHeight, m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );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] );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] );458 TRenFilter::copy ( pcPicYuvDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(), m_iWidth, m_iHeight, m_apiCurDepthPel [ iViewNum], m_aiCurDepthStrides [iViewNum] );459 #endif460 446 461 447 // Used for rendering reference pic from original video data … … 465 451 if ( m_abSetupVideoFromOrgForView[iViewNum] ) 466 452 { 467 #if FIX_VSO_SETUP468 453 AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth ); 469 454 pcPicYuvOrgVideoData->extendPicBorder(); … … 471 456 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 457 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 #else474 AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth );475 pcPicYuvOrgVideoData->extendPicBorder();476 TRenFilter::sampleHorUp ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth, m_iHeight, m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] );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] );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 #endif480 458 } 481 459 482 460 if ( m_abSetupDepthFromOrgForView[iViewNum] ) 483 461 { 484 #if FIX_VSO_SETUP485 462 AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth ); 486 463 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iUsedHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] ); 487 #else488 AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth );489 TRenFilter::copy ( pcPicYuvOrgDepthData->getLumaAddr() + m_uiHorOff * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(), m_iWidth, m_iHeight, m_apiOrgDepthPel [ iViewNum], m_aiOrgDepthStrides [iViewNum] );490 #endif491 464 } 492 465 } … … 497 470 AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels ); 498 471 499 #if FIX_VSO_SETUP500 472 m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight ); 501 #endif502 473 503 474 // Switch model to original data for setup if given to render reference … … 520 491 } 521 492 522 #if FIX_VSO_SETUP523 493 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false ); 524 #else525 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff );526 #endif527 494 528 495 // Setup to Org … … 545 512 546 513 // setup keeping reference rendered from original data 547 #if FIX_VSO_SETUP548 514 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true ); 549 #else550 m_apcRenModels[iModelNum]->setup ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff);551 #endif552 515 } 553 516 } … … 579 542 580 543 581 #if FIX_VSO_SETUP582 544 Void 583 545 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight ) … … 587 549 m_iUsedHeight = iUsedHeight; 588 550 } 589 #else590 Void591 TRenModel::setHorOffset ( UInt uiHorOff )592 {593 m_uiHorOff = uiHorOff;594 }595 #endif596 551 597 552 #if LGE_VSO_EARLY_SKIP_A0093 … … 606 561 607 562 AOT( iWidth + iStartPosX > m_iWidth ); 608 #if FIX_VSO_SETUP609 563 AOT( iHeight + iStartPosY > m_iUsedHeight ); 610 #else611 AOT( iHeight + iStartPosY > m_iHeight );612 #endif613 564 614 565 AOT( iStartPosX < 0); … … 644 595 645 596 iWidth = min(iWidth , m_iWidth - iStartPosX ); 646 #if FIX_VSO_SETUP647 597 iHeight = min(iHeight, m_iUsedHeight - iStartPosY ); 648 #else649 iHeight = min(iHeight, m_iHeight - iStartPosY );650 #endif651 598 652 599 AOT( iStartPosX < 0); … … 684 631 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 685 632 { 686 #if FIX_VSO_SETUP687 633 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv ); 688 #else689 m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff );690 #endif691 634 } 692 635 … … 694 637 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv ) 695 638 { 696 #if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP697 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff );698 #else699 639 m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv ); 700 #endif701 640 } 702 641 … … 705 644 { 706 645 TComPicYuv cPicYuvSynth; 707 #if FIX_VSO_SETUP708 646 cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth ); 709 #else710 cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );711 #endif712 647 713 648 TComPicYuv cPicYuvTempRef; 714 #if FIX_VSO_SETUP715 649 cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth); 716 #else717 cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);718 #endif719 650 720 651 Int64 iSSEY = 0; … … 724 655 for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++) 725 656 { 726 #if FIX_VSO_SETUP727 657 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth ); 728 658 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef ); … … 731 661 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr() , cPicYuvTempRef.getCStride()); 732 662 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr() , cPicYuvTempRef.getCStride()); 733 #else734 m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 );735 TComPicYuv* pcPicYuvRef = &cPicYuvTempRef;736 m_apcCurRenModels[iCurModel]->getRefVideo ( m_aiCurPosInModels[iCurModel], pcPicYuvRef , 0 );737 738 iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(), m_iWidth, m_iHeight , pcPicYuvRef->getLumaAddr(), pcPicYuvRef->getStride() );739 iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr() , pcPicYuvRef->getCStride());740 iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr() , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr() , pcPicYuvRef->getCStride());741 #endif742 663 } 743 664 … … 776 697 } 777 698 } 699 #endif 700 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenModel.h
r193 r213 32 32 */ 33 33 34 34 #if !QC_MVHEVC_B0046 35 35 #ifndef __TRENMODEL__ 36 36 #define __TRENMODEL__ … … 62 62 63 63 // Set horizontal offset 64 #if FIX_VSO_SETUP65 64 Void setupPart ( UInt uiHorOff, Int iUsedHeight ); 66 #else67 Void setHorOffset ( UInt uiHorOff );68 #endif69 65 70 66 // Set Mode … … 104 100 Int m_iSampledWidth; 105 101 Int m_iPad; 106 #if FIX_VSO_SETUP107 102 Int m_iUsedHeight; // height currently used in buffer, whereas m_iHeight is the total height of the buffer 108 #endif109 103 110 104 111 105 Int m_iNumOfBaseViews; 112 106 113 #if HHI_VSO_SPEEDUP_A0033114 107 // Horizontal Offset in input data 115 108 UInt m_uiHorOff; 116 #endif117 109 118 110 /// Current Error Type /// … … 164 156 165 157 #endif //__TRENMODEL__ 158 #endif 159 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenSingleModel.cpp
r193 r213 36 36 #include "TRenSingleModel.h" 37 37 38 #if !QC_MVHEVC_B0046 38 39 ////////////// TRENSINGLE MODEL /////////////// 39 40 template <BlenMod iBM, Bool bBitInc> … … 44 45 m_iHeight = -1; 45 46 m_iStride = -1; 46 #if FIX_VSO_SETUP47 47 m_iUsedHeight = -1; 48 48 m_iHorOffset = -1; 49 #endif50 49 m_iMode = -1; 51 50 m_iPad = PICYUV_PAD; … … 104 103 if ( m_pcInputSamples [1] ) delete[] m_pcInputSamples [1]; 105 104 106 #if FIX_MEM_LEAKS107 105 if ( m_pcOutputSamples ) delete[] m_pcOutputSamples ; 108 #else 109 if ( m_pcOutputSamples ) delete m_pcOutputSamples ; 110 #endif 111 112 #if FIX_MEM_LEAKS 106 113 107 if ( m_piInvZLUTLeft ) delete[] m_piInvZLUTLeft ; 114 108 if ( m_piInvZLUTRight ) delete[] m_piInvZLUTRight; … … 117 111 if ( m_aapiRefVideoPel[1] ) delete[] ( m_aapiRefVideoPel[1] - ( m_aiRefVideoStrides[1] * m_iPad + m_iPad ) ); 118 112 if ( m_aapiRefVideoPel[2] ) delete[] ( m_aapiRefVideoPel[2] - ( m_aiRefVideoStrides[2] * m_iPad + m_iPad ) ); 119 #endif120 113 } 121 114 … … 197 190 Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0; 198 191 199 #if FIX_VSO_SETUP200 192 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 201 #else202 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )203 #endif204 193 { 205 194 if ( iViewPos == VIEWPOS_RIGHT ) … … 245 234 246 235 } 247 #if FIX_VSO_SETUP248 236 template <BlenMod iBM, Bool bBitInc> Void 249 237 TRenSingleModelC<iBM,bBitInc>::setupPart ( UInt uiHorOffset, Int iUsedHeight ) … … 254 242 m_iHorOffset = (Int) uiHorOffset; 255 243 } 256 #endif257 244 258 245 template <BlenMod iBM, Bool bBitInc> Void 259 #if FIX_VSO_SETUP260 246 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) 261 #else262 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOff )263 #endif264 247 { 265 248 AOT( !m_bUseOrgRef && pcOrgVideo ); … … 275 258 if ( pcOrgVideo && !bKeepReference ) 276 259 { 277 #if FIX_VSO_SETUP278 260 TRenFilter::copy( pcOrgVideo->getLumaAddr() + m_iHorOffset * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iUsedHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]); 279 261 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 262 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 #else282 TRenFilter::copy( pcOrgVideo->getLumaAddr() + uiHorOff * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth, m_iHeight, m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]);283 TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr() + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]);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 #endif286 263 xSetStructRefView(); 287 264 } … … 290 267 xResetStructError(); 291 268 xInitSampleStructs(); 292 #if FIX_VSO_SETUP293 269 switch ( m_iMode ) 294 270 { … … 320 296 AOT(true); 321 297 } 322 #else323 switch ( m_iMode )324 {325 case 0:326 #if LGE_VSO_EARLY_SKIP_A0093327 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false );328 #else329 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );330 #endif331 break;332 case 1:333 #ifdef LGE_VSO_EARLY_SKIP_A0093334 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);335 #else336 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );337 #endif338 break;339 case 2:340 TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight );341 #ifdef LGE_VSO_EARLY_SKIP_A0093342 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false);343 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);344 #else345 xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );346 xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );347 #endif348 break;349 default:350 AOT(true);351 }352 #endif353 298 354 299 // Get Rendered View as Reference … … 413 358 #endif 414 359 415 #if FIX_VSO_SETUP416 360 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 417 #else418 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )419 #endif420 361 { 421 362 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 470 411 #endif 471 412 472 #if FIX_VSO_SETUP473 413 for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ ) 474 #else475 for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )476 #endif477 414 { 478 415 for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ ) … … 617 554 } 618 555 619 #if FIX_VSO_SETUP620 556 template <BlenMod iBM, Bool bBitInc> Void 621 557 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv ) … … 648 584 #endif 649 585 } 650 #else 651 template <BlenMod iBM, Bool bBitInc> Void 652 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) 653 { 654 AOT( pcPicYuv->getWidth() != m_iWidth ); 655 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset ); 656 657 #if HHI_VSO_COLOR_PLANES 658 Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL }; 659 xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 660 661 // Temp image for chroma down sampling 662 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0); 663 664 Int aiStrides[3]; 665 Pel* apiData [3]; 666 667 cTempImage.getDataAndStrides( apiData, aiStrides ); 668 669 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ ) 670 { 671 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight); 672 } 673 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset ); 674 #else 675 Pel RenModelOutPels::* piY; 676 xGetSampleStrTextPtrs(iViewPos, piY); 677 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + uiHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iHeight ); 678 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 679 #endif 680 } 681 #endif 682 683 #if FIX_VSO_SETUP 586 684 587 template <BlenMod iBM, Bool bBitInc> Void 685 588 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv ) … … 695 598 } 696 599 697 #else 698 template <BlenMod iBM, Bool bBitInc> Void 699 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff ) 700 { 701 AOT( iViewPos != 0 && iViewPos != 1); 702 AOT( pcPicYuv->getWidth() != m_iWidth ); 703 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff ); 704 705 Pel RenModelOutPels::* piD = 0; 706 xGetSampleStrDepthPtrs(iViewPos, piD); 707 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * uiHorOff, pcPicYuv->getStride(), m_iWidth, m_iHeight ); 708 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement ); 709 } 710 #endif 711 712 #if FIX_VSO_SETUP 600 713 601 template <BlenMod iBM, Bool bBitInc> Void 714 602 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) … … 742 630 #endif 743 631 } 744 #else745 template <BlenMod iBM, Bool bBitInc> Void746 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset )747 {748 AOT( pcPicYuv->getWidth() != m_iWidth );749 AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset);750 751 #if HHI_VSO_COLOR_PLANES752 Pel RenModelOutPels::* piText[3];753 piText[0] = &RenModelOutPels::iYRef;754 piText[1] = &RenModelOutPels::iURef;755 piText[2] = &RenModelOutPels::iVRef;756 757 // Temp image for chroma down sampling758 759 PelImage cTempImage( m_iWidth, m_iHeight, 3, 0);760 Int aiStrides[3];761 Pel* apiData [3];762 763 cTempImage.getDataAndStrides( apiData, aiStrides );764 765 for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ )766 {767 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight);768 }769 770 xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset );771 #else772 xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() * pcPicYuv->getStride() + uiHorOffset, pcPicYuv->getStride(), m_iWidth, m_iHeight );773 pcPicYuv->setChromaTo( 128 << g_uiBitIncrement );774 #endif775 }776 #endif777 632 778 633 template <BlenMod iBM, Bool bBitInc> RMDist … … 2018 1873 } 2019 1874 2020 #if FIX_VSO_SETUP2021 1875 template <BlenMod iBM, Bool bBitInc> Void 2022 1876 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ) … … 2026 1880 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCrAddr () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() ); 2027 1881 } 2028 #else2029 template <BlenMod iBM, Bool bBitInc> Void2030 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset )2031 {2032 TRenFilter::copy ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iHeight, rpcPicYuvTarget->getLumaAddr() + uiHorOffset * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () );2033 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iHeight, rpcPicYuvTarget->getCbAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );2034 TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );2035 }2036 #endif2037 1882 2038 1883 template class TRenSingleModelC<BLEND_NONE ,true>; … … 2112 1957 } 2113 1958 #endif 1959 #endif 1960 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibRenderer/TRenSingleModel.h
r193 r213 32 32 */ 33 33 34 35 #ifndef __TRENSINGLEMODEL__ 34 #if !QC_MVHEVC_B0046 35 #ifndef __TRENSINGLEMODEL__ 36 36 #define __TRENSINGLEMODEL__ 37 37 … … 69 69 public: 70 70 71 #if FIX_VIRT_DESTRUCTOR72 71 virtual ~TRenSingleModel() { } 73 #endif74 72 #if LGE_VSO_EARLY_SKIP_A0093 75 73 virtual Void create ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) = 0; … … 80 78 // Set Frame dependent data 81 79 virtual Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0; 82 #if FIX_VSO_SETUP83 80 virtual Void setupPart ( UInt uiHorOffset, Int iUsedHeight ) = 0; 84 81 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ) = 0; 85 #else86 virtual Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0;87 #endif88 82 89 83 // Set Data … … 103 97 virtual RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0; 104 98 105 #if FIX_VSO_SETUP106 99 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 107 100 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 108 101 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0; 109 #else110 virtual Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;111 virtual Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;112 virtual Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset ) = 0;113 #endif114 102 }; 115 103 … … 181 169 // Set Frame dependent data 182 170 Void setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ); 183 #if FIX_VSO_SETUP184 171 Void setupPart ( UInt uiHorOffset, Int uiUsedHeight ); 185 172 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference ); 186 #else187 Void setup ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight, Int** ppiBaseShiftLutRight, Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset );188 #endif189 173 190 174 #if LGE_VSO_EARLY_SKIP_A0093 … … 203 187 RMDist getDistVideo ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ); 204 188 205 #if FIX_VSO_SETUP206 189 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 207 190 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv ); 208 191 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv ); 209 #else210 Void getSynthVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );211 Void getSynthDepth ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );212 Void getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );213 #endif214 192 215 193 private: … … 293 271 Void xInitSampleStructs (); 294 272 Void xSetStructSynthViewAsRefView (); 295 #if FIX_VSO_SETUP296 273 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget ); 297 #else298 Void xCopy2PicYuv ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset );299 #endif300 274 301 275 template< typename S, typename T> 302 276 Void xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight ) 303 277 { 304 #if FIX_VSO_SETUP305 278 AOT( iWidth != m_iWidth ); 306 279 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 307 #else308 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)309 #endif310 280 { 311 281 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 321 291 Void xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight ) 322 292 { 323 #if FIX_VSO_SETUP324 293 AOT( iWidth != m_iWidth ); 325 294 for (Int iPosY = 0; iPosY < iHeight; iPosY++) 326 #else327 for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)328 #endif329 295 { 330 296 for (Int iPosX = 0; iPosX < m_iWidth; iPosX++) … … 344 310 Int m_iStride; 345 311 Int m_iPad; 346 #if FIX_VSO_SETUP347 312 Int m_iUsedHeight; 348 313 Int m_iHorOffset; 349 #endif350 314 351 315 Int m_iSampledWidth; 352 #if FIX_VSO_SETUP353 #else354 Int m_iSampledHeight;355 #endif356 316 Int m_iSampledStride; 357 317 … … 431 391 432 392 #endif //__TRENSINGLEMODEL__ 393 #endif 394
Note: See TracChangeset for help on using the changeset viewer.