- Timestamp:
- 11 Sep 2013, 14:40:25 (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cfg/3D-HEVC/NonCTC/gopCfg_IBP_3view+depth.cfg
r608 r622 38 38 39 39 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 40 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx40 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 41 41 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 42 42 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 58 58 Frame8_l1: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 59 59 60 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -161 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -162 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -163 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -164 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -165 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -166 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -167 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -168 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -160 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 61 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 62 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 63 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 64 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 65 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 66 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 67 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 68 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 69 69 70 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -171 Frame1_l3: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -172 Frame2_l3: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -173 Frame3_l3: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -174 Frame4_l3: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -175 Frame5_l3: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -176 Frame6_l3: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -177 Frame7_l3: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -178 Frame8_l3: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -170 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 71 Frame1_l3: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 72 Frame2_l3: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 73 Frame3_l3: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 74 Frame4_l3: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 75 Frame5_l3: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 76 Frame6_l3: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 77 Frame7_l3: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 78 Frame8_l3: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 79 79 80 FrameI_l4: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 -181 Frame1_l4: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 -182 Frame2_l4: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 -183 Frame3_l4: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 -184 Frame4_l4: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 -185 Frame5_l4: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -186 Frame6_l4: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -187 Frame7_l4: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 -188 Frame8_l4: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -180 FrameI_l4: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 81 Frame1_l4: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 82 Frame2_l4: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 83 Frame3_l4: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 84 Frame4_l4: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 85 Frame5_l4: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 86 Frame6_l4: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 87 Frame7_l4: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 88 Frame8_l4: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 89 89 90 FrameI_l5: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 -191 Frame1_l5: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 -192 Frame2_l5: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 -193 Frame3_l5: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 -194 Frame4_l5: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 -195 Frame5_l5: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -196 Frame6_l5: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -197 Frame7_l5: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 -198 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -190 FrameI_l5: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 91 Frame1_l5: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 92 Frame2_l5: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 93 Frame3_l5: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 94 Frame4_l5: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 95 Frame5_l5: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 96 Frame6_l5: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 97 Frame7_l5: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 98 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 99 99 100 100 ### DO NOT ADD ANYTHING BELOW THIS LINE ### -
trunk/cfg/3D-HEVC/NonCTC/gopCfg_IBP_3view.cfg
r608 r622 1 1 # Following parameters must be set in the correct order 2 InputFile_0 : leftView.yuv 3 InputFile_1 : rightView.yuv 4 InputFile_2 : middleView.yuv 5 ViewId : 0 2 1 6 BaseViewCameraNumbers: 1 5 3 # (when left view is 1, right view is 5 and middle view is 3 2 #InputFile_0 : leftView.yuv # For layer with LayerIdx in vps equal to 0. 3 #InputFile_1 : rightView.yuv # For layer with LayerIdx in vps equal to 1. 4 #InputFile_2 : middleView.yuv # For layer with LayerIdx in vps equal to 2. 5 #ViewOrderIndex : 0 1 2 # Per layer, corresponds to coding order, needs to be increasing 6 #ViewId : 0 2 1 # Per view, arbitary identifier, might correspond to spatial position of cameras 7 #BaseViewCameraNumbers: 1 5 3 # Per view, numbers in camera parameter file ( e.g. leftView is 1, rightView is 5 and middleView is 3) 7 8 8 9 #======== VPS / Layer sets ================ 9 10 VpsNumLayerSets : 3 # Number of layer sets 10 LayerIdsInSet_0 : 0 # LayerId s in vps of layer set11 LayerIdsInSet_1 : 0 1 # LayerId s in vps of layer set12 LayerIdsInSet_ 3 : 0 1 2 # LayerIds in vps of layer set11 LayerIdsInSet_0 : 0 # LayerIdcs in vps of layer set 12 LayerIdsInSet_1 : 0 1 # LayerIdcs in vps of layer set 13 LayerIdsInSet_2 : 0 1 2 # LayerIdcs in vps of layer set 13 14 14 15 DefaultOneTargetOutputLayerFlag: 0 # Output highest layer of layer sets by default … … 25 26 26 27 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 27 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx28 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 28 29 29 30 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 … … 36 37 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 37 38 38 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -139 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -140 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -141 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -142 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -143 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -144 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -145 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -146 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -139 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 40 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 41 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 42 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 43 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 44 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 45 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 46 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 47 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 47 48 48 FrameI_l2: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 -149 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 -150 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 -151 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 -152 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 -153 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -154 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -155 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 -156 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 -149 FrameI_l2: B 0 3 0.442 0 0 0 1 0 0 2 0 1 0 -1 -1 0 50 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 2 0 1 1 -1 -1 1 51 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 2 0 1 1 -1 -1 1 52 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 2 0 1 1 -1 -1 1 53 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 2 0 1 1 -1 -1 1 54 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 55 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 2 0 1 2 -1 -1 2 56 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 2 0 1 2 -1 -1 2 57 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 2 0 1 2 -1 -1 2 57 58 58 59 ### DO NOT ADD ANYTHING BELOW THIS LINE ### -
trunk/cfg/3D-HEVC/NonCTC/gopCfg_ILP_on_IRAP_3view+depth.cfg
r608 r622 29 29 30 30 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 31 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx31 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 32 32 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 33 33 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 49 49 Frame8_l1: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 50 50 51 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -151 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 52 52 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 53 53 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 59 59 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 60 60 61 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -161 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 62 62 Frame1_l3: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 63 63 Frame2_l3: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 69 69 Frame8_l3: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 70 70 71 FrameI_l4: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -171 FrameI_l4: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 72 72 Frame1_l4: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 73 73 Frame2_l4: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 79 79 Frame8_l4: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 80 80 81 FrameI_l5: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -181 FrameI_l5: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 82 82 Frame1_l5: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 83 83 Frame2_l5: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 0 -
trunk/cfg/3D-HEVC/NonCTC/gopCfg_NoIv_2view.cfg
r608 r622 16 16 17 17 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 18 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx18 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 19 19 20 20 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 -
trunk/cfg/3D-HEVC/NonCTC/gopCfg_NoIv_3view+depth.cfg
r608 r622 27 27 28 28 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 29 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx29 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 30 30 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 31 31 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 -
trunk/cfg/3D-HEVC/NonCTC/gopCfg_NoIv_3view.cfg
r608 r622 19 19 20 20 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 21 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx21 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 22 22 23 23 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 -
trunk/cfg/3D-HEVC/baseCfg_2view+depth.cfg
r608 r622 20 20 21 21 #======== VPS ============================ 22 ScalabilityMask : 3 # Scalability Mask ( 1: View Scalability, 3: View + Depth Scalability )23 DimensionIdLen : 2 1# Number of bits to store Ids, per scalability dimension, (m)24 View Id : 1 1 0 0 # ViewId (m)22 ScalabilityMask : 3 # Scalability Mask ( 2: View Scalability, 3: View + Depth Scalability ) 23 DimensionIdLen : 1 2 # Number of bits to store Ids, per scalability dimension, (m) 24 ViewOrderIndex : 0 0 1 1 # ViewOrderIndex (m) 25 25 DepthFlag : 0 1 0 1 # DepthFlag (m) 26 26 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 27 27 SplittingFlag : 0 # Splitting Flag 28 ViewId : 1 0 # ViewId per ViewOrderIndex (m) 28 29 29 30 #======== VPS/ Layer sets ================ … … 68 69 69 70 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 70 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx71 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 71 72 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 72 73 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 -
trunk/cfg/3D-HEVC/baseCfg_2view.cfg
r608 r622 17 17 18 18 #======== VPS ============================ 19 ScalabilityMask : 1 # Scalability Mask ( 1: View Scalability, shall be 1 for MV-HEVC)19 ScalabilityMask : 2 # Scalability Mask ( 2: View Scalability, 3: View + Depth Scalability ) 20 20 DimensionIdLen : 3 # Number of bits to store Ids, per scalability dimension, (m) 21 View Id : 0 1 # ViewId (m)21 ViewOrderIndex : 0 1 # ViewOrderIndex (m) 22 22 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 23 23 SplittingFlag : 0 # Splitting Flag 24 ViewId : 1 0 # ViewId per ViewOrderIndex (m) 24 25 25 26 #======== VPS/ Layer sets ================ … … 59 60 60 61 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 61 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx62 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 62 63 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 63 64 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 69 70 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 70 71 71 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1-172 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1-173 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1-174 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1-175 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1-176 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1-177 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1-178 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1-179 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1-172 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 73 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 74 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 75 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 76 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 77 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 78 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 79 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 80 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 80 81 81 82 #=========== Motion Search ============= -
trunk/cfg/3D-HEVC/baseCfg_3view+depth.cfg
r608 r622 24 24 25 25 #======== VPS ============================ 26 ScalabilityMask : 3 # Scalability Mask ( 1: View Scalability, 3: View + Depth Scalability )27 DimensionIdLen : 2 1# Number of bits to store Ids, per scalability dimension, (m)28 View Id : 1 1 0 0 2 2 # ViewId (m)26 ScalabilityMask : 3 # Scalability Mask ( 2: View Scalability, 3: View + Depth Scalability ) 27 DimensionIdLen : 1 2 # Number of bits to store Ids, per scalability dimension, (m) 28 ViewOrderIndex : 0 0 1 1 2 2 # ViewOrderIndex (m) 29 29 DepthFlag : 0 1 0 1 0 1 # DepthFlag (m) 30 30 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 31 31 SplittingFlag : 0 # Splitting Flag 32 ViewId : 1 0 2 # ViewId per ViewOrderIndex (m) 32 33 33 34 #======== VPS/ Layer sets ================ … … 79 80 80 81 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 81 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx82 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 82 83 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 83 84 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 99 100 Frame8_l1: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 100 101 101 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -1102 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -1103 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -1104 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -1105 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -1106 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -1107 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -1108 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -1109 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -1110 111 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -1112 Frame1_l3: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -1113 Frame2_l3: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -1114 Frame3_l3: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -1115 Frame4_l3: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -1116 Frame5_l3: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -1117 Frame6_l3: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -1118 Frame7_l3: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -1119 Frame8_l3: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -1120 121 FrameI_l4: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -1122 Frame1_l4: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -1123 Frame2_l4: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -1124 Frame3_l4: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -1125 Frame4_l4: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -1126 Frame5_l4: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -1127 Frame6_l4: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -1128 Frame7_l4: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -1129 Frame8_l4: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -1130 131 FrameI_l5: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -1132 Frame1_l5: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -1133 Frame2_l5: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -1134 Frame3_l5: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -1135 Frame4_l5: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -1136 Frame5_l5: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -1137 Frame6_l5: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -1138 Frame7_l5: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -1139 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -1102 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 103 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 104 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 105 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 106 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 107 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 108 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 109 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 110 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 111 112 FrameI_l3: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 113 Frame1_l3: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 114 Frame2_l3: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 115 Frame3_l3: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 116 Frame4_l3: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 117 Frame5_l3: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 118 Frame6_l3: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 119 Frame7_l3: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 120 Frame8_l3: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 121 122 FrameI_l4: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 123 Frame1_l4: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 124 Frame2_l4: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 125 Frame3_l4: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 126 Frame4_l4: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 127 Frame5_l4: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 128 Frame6_l4: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 129 Frame7_l4: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 130 Frame8_l4: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 131 132 FrameI_l5: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 133 Frame1_l5: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 134 Frame2_l5: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 135 Frame3_l5: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 136 Frame4_l5: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 137 Frame5_l5: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 138 Frame6_l5: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 139 Frame7_l5: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 140 Frame8_l5: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 140 141 141 142 #=========== Motion Search ============= -
trunk/cfg/3D-HEVC/baseCfg_3view.cfg
r608 r622 18 18 19 19 #======== VPS ============================ 20 ScalabilityMask : 1 # Scalability Mask ( 1: View Scalability, shall be 1 for MV-HEVC)20 ScalabilityMask : 2 # Scalability Mask ( 2: View Scalability, 3: View + Depth Scalability ) 21 21 DimensionIdLen : 3 # Number of bits to store Ids, per scalability dimension, (m) 22 View Id : 0 1 2 # ViewId (m)22 ViewOrderIndex : 0 1 2 # ViewOrderIndex (m) 23 23 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 24 24 SplittingFlag : 0 # Splitting Flag 25 ViewId : 1 0 2 # ViewId per ViewOrderIndex (m) 25 26 26 27 #======== VPS / Layer sets ================ … … 64 65 65 66 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 66 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx67 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 67 68 68 69 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 … … 75 76 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 76 77 77 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1-178 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1-179 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1-180 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1-181 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1-182 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1-183 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1-184 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1-185 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1-178 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 79 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 80 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 81 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 82 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 83 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 84 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 85 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 86 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 86 87 87 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1-188 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1-189 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1-190 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1-191 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1-192 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1-193 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1-194 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1-195 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1-188 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 89 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 90 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 91 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 92 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 93 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 94 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 95 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 96 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 96 97 97 98 #=========== Motion Search ============= -
trunk/cfg/3D-HEVC/fullCfg.cfg
r608 r622 28 28 29 29 #======== VPS ============================ 30 ScalabilityMask : 3 # Scalability Mask ( 1: View Scalability, 3: View + Depth Scalability )31 DimensionIdLen : 2 1# Number of bits to store Ids, per scalability dimension, (m)32 View Id : 1 1 0 0 2 2 # ViewId (m)30 ScalabilityMask : 3 # Scalability Mask ( 2: View Scalability, 3: View + Depth Scalability ) 31 DimensionIdLen : 1 2 # Number of bits to store Ids, per scalability dimension, (m) 32 ViewOrderIndex : 0 0 1 1 2 2 # ViewOrderIndex (m) 33 33 DepthFlag : 0 1 0 1 0 1 # DepthFlag (m) 34 34 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 35 35 SplittingFlag : 0 # Splitting Flag 36 ViewId : 1 0 2 # ViewId per ViewOrderIndex (m) 36 37 37 38 #======== VPS/ Layer sets ================ -
trunk/cfg/MV-HEVC/baseCfg_2view.cfg
r608 r622 16 16 17 17 #======== VPS ============================ 18 ScalabilityMask : 1 # Scalability Mask ( 1: View Scalability, shall be 1for MV-HEVC )18 ScalabilityMask : 2 # Scalability Mask ( 2: View Scalability, shall be 2 for MV-HEVC ) 19 19 DimensionIdLen : 3 # Number of bits to store Ids, per scalability dimension, (m) 20 View Id : 0 1 # ViewId (m)20 ViewOrderIndex : 0 1 # ViewOrderIndex (m) 21 21 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 22 22 SplittingFlag : 0 # Splitting Flag 23 ViewId : 1 0 # ViewId per ViewOrderIndex (m) 23 24 24 25 #======== VPS/ Layer sets ================ … … 53 54 54 55 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 55 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx56 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 56 57 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 57 58 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 … … 63 64 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 64 65 65 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -166 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -167 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -168 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -169 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -170 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -171 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -172 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -173 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -166 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 67 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 68 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 69 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 70 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 71 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 72 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 73 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 74 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 74 75 75 76 #=========== Motion Search ============= -
trunk/cfg/MV-HEVC/baseCfg_3view.cfg
r608 r622 18 18 19 19 #======== VPS ============================ 20 ScalabilityMask : 1 # Scalability Mask ( 1: View Scalability, shall be 1for MV-HEVC )20 ScalabilityMask : 2 # Scalability Mask ( 2: View Scalability, shall be 2 for MV-HEVC ) 21 21 DimensionIdLen : 3 # Number of bits to store Ids, per scalability dimension, (m) 22 View Id : 0 1 2 # ViewId (m)23 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m)22 ViewOrderIndex : 0 1 2 # ViewOrderIndex, per layer (m) 23 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling, otherwise per layer ) (m) 24 24 SplittingFlag : 0 # Splitting Flag 25 ViewId : 1 0 2 # ViewId, per ViewOrderIndex (m) 25 26 26 27 #======== VPS / Layer sets ================ … … 60 61 61 62 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 62 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 collocatedRefLayerIdx63 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 63 64 64 65 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 … … 71 72 Frame8: B 7 4 0.68 0 0 0 2 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 0 72 73 73 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -174 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -175 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -176 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -177 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -178 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -179 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -180 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -181 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -174 FrameI_l1: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 75 Frame1_l1: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 76 Frame2_l1: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 77 Frame3_l1: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 78 Frame4_l1: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 79 Frame5_l1: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 80 Frame6_l1: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 81 Frame7_l1: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 82 Frame8_l1: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 82 83 83 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 -184 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 -185 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 -186 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 -187 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 -188 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 -189 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 -190 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 -191 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 -184 FrameI_l2: P 0 3 0.442 0 0 0 1 0 0 1 0 0 -1 85 Frame1_l2: B 8 4 0.442 0 0 0 4 4 -8 -10 -12 -16 0 1 0 1 -1 86 Frame2_l2: B 4 5 0.3536 0 0 0 3 3 -4 -6 4 1 4 5 1 1 0 0 1 1 0 1 -1 87 Frame3_l2: B 2 6 0.3536 0 0 0 3 4 -2 -4 2 6 1 2 4 1 1 1 1 1 0 1 -1 88 Frame4_l2: B 1 7 0.68 0 0 0 3 4 -1 1 3 7 1 1 5 1 0 1 1 1 1 0 1 -1 89 Frame5_l2: B 3 7 0.68 0 0 0 3 4 -1 -3 1 5 1 -2 5 1 1 1 1 0 1 0 2 -1 90 Frame6_l2: B 6 6 0.3536 0 0 0 3 4 -2 -4 -6 2 1 -3 5 1 1 1 1 0 1 0 2 -1 91 Frame7_l2: B 5 7 0.68 0 0 0 3 4 -1 -5 1 3 1 1 5 1 0 1 1 1 1 0 2 -1 92 Frame8_l2: B 7 7 0.68 0 0 0 3 4 -1 -3 -7 1 1 -2 5 1 1 1 1 0 1 0 2 -1 92 93 93 94 #=========== Motion Search ============= -
trunk/cfg/MV-HEVC/fullCfg.cfg
r608 r622 22 22 23 23 #======== VPS ============================ 24 ScalabilityMask : 1 # Scalability Mask ( 1: View Scalability, shall be 1for MV-HEVC )24 ScalabilityMask : 2 # Scalability Mask ( 2: View Scalability, shall be 2 for MV-HEVC ) 25 25 DimensionIdLen : 3 # Number of bits to store Ids, per scalability dimension, (m) 26 View Id : 0 1 2 # ViewId (m)26 ViewOrderIndex : 0 1 2 # View Order Index (m) 27 27 LayerIdInNuh : 0 # Layer Id in NAL unit header, (0: no explicit signalling ) (m) 28 28 SplittingFlag : 0 # Splitting Flag 29 ViewId : 1 0 2 # ViewId per ViewOrderIndex (m) 29 30 30 31 #======== VPS/ Layer sets ================ … … 56 57 DecodingRefreshType : 1 # Random Accesss 0:none, 1:CDR, 2:IDR 57 58 GOPSize : 8 # GOP Size (number of B slice = GOPSize-1) 58 # Type POC QPoffset QPfactor tcOffsetDiv2 betaOffsetDiv2 temporal_id #ref_pics_active #ref_pics reference pictures predict deltaRPS #ref_idcs reference idcs #IL_ref_pics IL reference pics IL ref list pos L0 L1 59 60 # QPfactor betaOffsetDiv2 #ref_pics_active reference pictures deltaRPS reference idcs ilPredLayerIdc refLayerPicPosIl_L1 61 # Type POC QPoffset tcOffsetDiv2 temporal_id #ref_pics predict #ref_idcs #ActiveRefLayerPics refLayerPicPosIl_L0 59 62 Frame1: B 8 1 0.442 0 0 0 4 4 -8 -10 -12 -16 0 0 60 63 Frame2: B 4 2 0.3536 0 0 0 2 3 -4 -6 4 1 4 5 1 1 0 0 1 0 -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r608 r622 504 504 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 505 505 #if H_MV 506 #if H_MV5 507 assert( conf .getScaledFlag() ); 508 assert( defDisp.getScaledFlag() ); 509 #endif 506 510 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 507 511 #else … … 577 581 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 578 582 #if H_MV 583 #if H_MV5 584 assert( conf .getScaledFlag() ); 585 assert( defDisp.getScaledFlag() ); 586 #endif 579 587 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 580 588 #else -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r608 r622 224 224 in>>entry.m_interViewRefPosL[1][i]; 225 225 } 226 #if !H_MV5 226 227 if (entry.m_numActiveRefLayerPics > 0 ) 227 228 { 228 229 in>>entry.m_collocatedRefLayerIdx; 229 230 } 231 #endif 230 232 #endif 231 233 return in; … … 367 369 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 368 370 #if !H_3D 371 #if H_MV5 372 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask") 373 #else 369 374 ("ScalabilityMask", m_scalabilityMask , 1 , "Scalability Mask") 375 #endif 370 376 #else 371 377 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") 372 378 #endif 373 379 ("DimensionIdLen", m_dimensionIdLen , cfg_dimensionLength , "Number of bits used to store dimensions Id") 380 #if H_MV5 381 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 382 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 383 #else 374 384 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id") 385 #endif 375 386 #if H_3D 376 387 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") … … 587 598 ("TargetBitrate,-tbr", m_targetBitrate, 0, "Input target bitrate") 588 599 ("NumLCUInUnit,-nu", m_numLCUInUnit, 0, "Number of LCUs in an Unit") 600 #endif 601 602 #if H_MV5 603 #if H_MV 604 // VPS VUI 605 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") 606 ("BitRatePresentVpsFlag" , m_bitRatePresentVpsFlag , false , "BitRatePresentVpsFlag ") 607 ("PicRatePresentVpsFlag" , m_picRatePresentVpsFlag , false , "PicRatePresentVpsFlag ") 608 ("BitRatePresentFlag" , m_bitRatePresentFlag , std::vector< Bool >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set") 609 ("PicRatePresentFlag" , m_picRatePresentFlag , std::vector< Bool >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set") 610 ("AvgBitRate" , m_avgBitRate , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "AvgBitRate per sub layer for the N-th layer set") 611 ("MaxBitRate" , m_maxBitRate , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "MaxBitRate per sub layer for the N-th layer set") 612 ("ConstantPicRateIdc" , m_constantPicRateIdc , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set") 613 ("AvgPicRate" , m_avgPicRate , std::vector< Int >(1,0) ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate per sub layer for the N-th layer set") 614 ("TileBoundariesAlignedFlag" , m_tileBoundariesAlignedFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "TileBoundariesAlignedFlag per direct reference for the N-th layer") 615 ("IlpRestrictedRefLayersFlag" , m_ilpRestrictedRefLayersFlag , false , "IlpRestrictedRefLayersFlag") 616 ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1, std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer") 617 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 618 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 619 #endif 589 620 #endif 590 621 … … 719 750 ("ViewSynthesisPred", m_viewSynthesisPredFlag, true , "view synthesis prediction " ) 720 751 #endif 721 #if H_3D _TMVP752 #if H_3D 722 753 ("IvMvScaling", m_ivMvScalingFlag , true , "inter view motion vector scaling" ) 723 754 #endif … … 731 762 if( k == 0 ) 732 763 { 764 #if H_MV5 765 m_GOPListMvc[0][0].m_sliceType = 'I'; 766 #endif 733 767 for( Int i = 1; i < MAX_GOP + 1; i++ ) 734 768 { … … 934 968 // allocate slice-based dQP values 935 969 #if H_MV 970 #if H_MV5 971 xResizeVector( m_viewOrderIndex ); 972 973 std::vector<Int> uniqueViewOrderIndices; 974 for( Int layer = 0; layer < m_numberOfLayers; layer++ ) 975 { 976 Bool isIn = false; 977 for ( Int i = 0 ; i < uniqueViewOrderIndices.size(); i++ ) 978 { 979 isIn = isIn || ( m_viewOrderIndex[ layer ] == uniqueViewOrderIndices[ i ] ); 980 } 981 if ( !isIn ) 982 { 983 uniqueViewOrderIndices.push_back( m_viewOrderIndex[ layer ] ); 984 } 985 } 986 m_iNumberOfViews = (Int) uniqueViewOrderIndices.size(); 987 988 #if H_3D 989 xResizeVector( m_depthFlag ); 990 #endif 991 #else 936 992 xResizeVector( m_viewId ); 937 993 #if H_3D … … 954 1010 #endif 955 1011 1012 #endif 956 1013 xResizeVector( m_fQP ); 957 1014 … … 1226 1283 xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. "); 1227 1284 1285 #if H_MV5 1286 #if H_3D 1287 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); 1288 #else 1289 xConfirmPara( m_scalabilityMask != 2 , "Scalability Mask must be equal to 2. "); 1290 #endif 1291 1292 #if H_3D 1293 if ( m_scalabilityMask & ( 1 << DEPTH_ID ) ) 1294 { 1295 m_dimIds.push_back( m_depthFlag ); 1296 } 1297 #endif 1298 1299 m_dimIds.push_back( m_viewOrderIndex ); 1300 #else 1228 1301 #if H_3D 1229 1302 xConfirmPara( m_scalabilityMask != 1 && m_scalabilityMask != 3, "Scalability Mask must be equal to 1 or 3. "); … … 1239 1312 #endif 1240 1313 1314 #endif 1241 1315 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1242 1316 … … 1255 1329 { 1256 1330 xConfirmPara( m_dimIds[j].size() < m_numberOfLayers, "DimensionId must be given for all layers and all dimensions. "); 1331 #if H_MV5 1332 xConfirmPara( (m_dimIds[j][0] != 0) , "DimensionId of layer 0 must be 0. " ); 1333 #else 1257 1334 xConfirmPara( ( j != viewDimPosition ) && (m_dimIds[j][0] != 0), "DimensionId of layer 0 must be 0. " ); 1335 #endif 1258 1336 xConfirmPara( m_dimensionIdLen[j] < 1 || m_dimensionIdLen[j] > 8, "DimensionIdLen must be greater than 0 and less than 9 in all dimensions. " ); 1259 1337 … … 1297 1375 { 1298 1376 Bool inc = m_dimIds[ lastDiff ][ i ] > m_dimIds[ lastDiff ][ j ]; 1377 #if H_MV5 1378 Bool shallBeButIsNotIncreasing = ( !inc ) ; 1379 #else 1299 1380 Bool shallBeButIsNotIncreasing = ( !inc && ( lastDiff != viewDimPosition ) ) ; 1381 #endif 1300 1382 if ( shallBeButIsNotIncreasing ) 1301 1383 { 1302 1384 printf( "\nError: Positions of Layers %d and %d is not increasing in dimension %d \n", i, j, lastDiff); 1303 1385 } 1386 #if H_MV5 1387 xConfirmPara( shallBeButIsNotIncreasing, "DimensionIds shall be increasing within one dimension. " ); 1388 #else 1304 1389 xConfirmPara( shallBeButIsNotIncreasing && ( lastDiff != viewDimPosition ), "DimensionIds shall be increasing within one dimension. " ); 1390 #endif 1305 1391 } 1306 1392 } 1307 1393 } 1308 1394 1395 #if H_MV5 1396 /// ViewId 1397 xConfirmPara( m_viewId.size() != m_iNumberOfViews, "The number of ViewIds must be equal to the number of views." ); 1398 1309 1399 /// Layer sets 1400 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025. ") ; 1401 #else 1310 1402 xConfirmPara( m_vpsNumLayerSets < 0 || m_vpsNumLayerSets > 1024, "VpsNumLayerSets must be greater than 0 and less than 1025") ; 1403 #endif 1311 1404 for( Int lsIdx = 0; lsIdx < m_vpsNumLayerSets; lsIdx++ ) 1312 1405 { … … 2068 2161 } 2069 2162 #endif 2163 #if H_MV5 2164 #if H_MV 2165 // VPS VUI 2166 for(Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++ ) 2167 { 2168 for (Int j = 0; j < MAX_TLAYER; j++) 2169 { 2170 if ( j < m_avgBitRate [i].size() ) xConfirmPara( m_avgBitRate[i][j] < 0 || m_avgBitRate[i][j] > 65535, "avg_bit_rate must be more than or equal to 0 and less than 65536" ); 2171 if ( j < m_maxBitRate [i].size() ) xConfirmPara( m_maxBitRate[i][j] < 0 || m_maxBitRate[i][j] > 65535, "max_bit_rate must be more than or equal to 0 and less than 65536" ); 2172 if ( j < m_constantPicRateIdc[i].size() ) xConfirmPara( m_constantPicRateIdc[i][j] < 0 || m_constantPicRateIdc[i][j] > 3, "constant_pic_rate_idc must be more than or equal to 0 and less than 4" ); 2173 if ( j < m_avgPicRate [i].size() ) xConfirmPara( m_avgPicRate[i][j] < 0 || m_avgPicRate[i][j] > 65535, "avg_pic_rate must be more than or equal to 0 and less than 65536" ); 2174 } 2175 } 2176 // todo: replace value of 100 with requirement in spec 2177 for(Int i = 0; i < MAX_NUM_LAYERS; i++ ) 2178 { 2179 for (Int j = 0; j < MAX_NUM_LAYERS; j++) 2180 { 2181 if ( j < m_minSpatialSegmentOffsetPlus1[i].size() ) xConfirmPara( m_minSpatialSegmentOffsetPlus1[i][j] < 0 || m_minSpatialSegmentOffsetPlus1[i][j] > 100, "min_spatial_segment_offset_plus1 must be more than or equal to 0 and less than 101" ); 2182 if ( j < m_minHorizontalCtuOffsetPlus1[i] .size() ) xConfirmPara( m_minHorizontalCtuOffsetPlus1[i][j] < 0 || m_minHorizontalCtuOffsetPlus1[i][j] > 100, "min_horizontal_ctu_offset_plus1 must be more than or equal to 0 and less than 101" ); 2183 } 2184 } 2185 #endif 2186 #endif 2070 2187 2071 2188 xConfirmPara(!m_TransquantBypassEnableFlag && m_CUTransquantBypassFlagValue, "CUTransquantBypassFlagValue cannot be 1 when TransquantBypassEnableFlag is 0"); … … 2133 2250 #endif 2134 2251 #if H_MV 2252 #if H_MV5 2253 xPrintParaVector( "ViewIdVal" , m_viewId ); 2254 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2255 #else 2135 2256 xPrintParaVector( "ViewId", m_viewId ); 2257 #endif 2136 2258 #endif 2137 2259 #if H_3D … … 2283 2405 printf("ViewSynthesisPred:%d ", m_viewSynthesisPredFlag ); 2284 2406 #endif 2285 #if H_3D _TMVP2407 #if H_3D 2286 2408 printf("IvMvScaling:%d ", m_ivMvScalingFlag ? 1 : 0 ); 2287 2409 #endif -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r608 r622 69 69 std::vector<char*> m_pchReconFileList; ///< output reconstruction file names 70 70 Int m_numberOfLayers; ///< number of Layers to Encode 71 #if H_MV5 72 Int m_iNumberOfViews; ///< number of Layers that are views 73 #else 71 74 #if H_3D 72 75 Int m_iNumberOfViews; ///< number of Layers that are views 76 #endif 73 77 #endif 74 78 #else … … 79 83 std::vector< std::vector<Int> > m_dimIds; ///< dimension ids ( pointers to m_viewId and m_depthFlag 80 84 std::vector<Int> m_viewId; ///< view id 85 #if H_MV5 86 std::vector<Int> m_viewOrderIndex; ///< view order index 87 #endif 81 88 #if H_3D 82 89 std::vector<Int> m_depthFlag; ///< depth flag … … 99 106 std::vector< std::vector<Int> > m_dependencyTypes; ///< Dependency types of direct reference layers 100 107 108 #if H_MV5 109 // VPS VUI 110 Bool m_vpsVuiPresentFlag; 111 Bool m_bitRatePresentVpsFlag; 112 Bool m_picRatePresentVpsFlag; 113 std::vector< std::vector<Bool > > m_bitRatePresentFlag; 114 std::vector< std::vector<Bool > > m_picRatePresentFlag; 115 std::vector< std::vector<Int > > m_avgBitRate; 116 std::vector< std::vector<Int > > m_maxBitRate; 117 std::vector< std::vector<Int > > m_constantPicRateIdc; 118 std::vector< std::vector<Int > > m_avgPicRate; 119 std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag; 120 Bool m_ilpRestrictedRefLayersFlag; 121 std::vector< std::vector<Int > > m_minSpatialSegmentOffsetPlus1; 122 std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag; 123 std::vector< std::vector<Int > > m_minHorizontalCtuOffsetPlus1; 124 #endif 125 101 126 #if H_3D_IV_MERGE 102 127 Bool m_ivMvPredFlag; ///< Interview motion vector prediction … … 115 140 Bool m_viewSynthesisPredFlag; 116 141 #endif 117 #if H_3D _TMVP142 #if H_3D 118 143 Bool m_ivMvScalingFlag; 119 144 #endif -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r608 r622 88 88 vps.setTemporalNestingFlag(true); 89 89 } 90 #if H_MV5 91 vps.setMaxLayersMinus1( m_numberOfLayers - 1); 92 #else 90 93 vps.setMaxLayers( m_numberOfLayers ); 94 #endif 91 95 for(Int i = 0; i < MAX_TLAYER; i++) 92 96 { … … 120 124 xSetDependencies( vps ); 121 125 xSetProfileTierLevel ( vps ); 126 #if H_MV5 127 xSetRepFormat ( vps ); 128 #endif 122 129 xSetLayerSets ( vps ); 130 #if H_MV5 131 xSetVPSVUI ( vps ); 132 #endif 123 133 #if H_3D 134 #if !H_MV5 124 135 vps.initViewIndex(); 136 #endif 125 137 xSetVPSExtension2 ( vps ); 126 138 m_ivPicLists.setVPS ( &vps ); 127 139 #endif 128 140 141 142 #if H_MV5 143 for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++) 144 #else 129 145 for(Int layer = 0; layer < m_numberOfLayers; layer++) 146 #endif 130 147 { 131 148 m_frameRcvd .push_back(0); … … 134 151 m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv); 135 152 m_picYuvRec .push_back(new TComList<TComPicYuv*>) ; 136 153 #if H_MV5 154 m_ivPicLists.push_back( m_acTEncTopList[ layerIdInVps ]->getListPic() ); 155 TEncTop& m_cTEncTop = *m_acTEncTopList[ layerIdInVps ]; // It is not a member, but this name helps avoiding code duplication !!! 156 157 Int layerId = vps.getLayerIdInNuh( layerIdInVps ); 158 m_cTEncTop.setLayerIdInVps ( layerIdInVps ); 159 m_cTEncTop.setLayerId ( layerId ); 160 m_cTEncTop.setViewId ( vps.getViewId ( layerId ) ); 161 m_cTEncTop.setViewIndex ( vps.getViewIndex ( layerId ) ); 162 #else 137 163 m_ivPicLists.push_back( m_acTEncTopList[ layer ]->getListPic() ); 138 164 TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ]; // It is not a member, but this name helps avoiding code duplication !!! … … 141 167 m_cTEncTop.setLayerId ( vps.getLayerIdInNuh( layer ) ); 142 168 m_cTEncTop.setViewId ( vps.getViewId ( layer ) ); 169 170 #endif 143 171 #if H_3D 172 #if H_MV5 173 Bool isDepth = ( vps.getDepthId ( layerId ) != 0 ) ; 174 #else 144 175 Bool isDepth = ( vps.getDepthId ( layer ) != 0 ) ; 145 176 m_cTEncTop.setViewIndex ( vps.getViewIndex ( layer ) ); 177 #endif 146 178 m_cTEncTop.setIsDepth ( isDepth ); 147 179 //====== Camera Parameters ========= … … 169 201 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 170 202 #endif // H_3D_VSO 203 #if H_MV5 204 #if H_3D_ARP 205 //====== Advanced Inter-view Residual Prediction ========= 206 m_cTEncTop.setUseAdvRP ( ( isDepth || 0==layerIdInVps ) ? 0 : m_uiUseAdvResPred ); 207 m_cTEncTop.setARPStepNum ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR ); 208 #endif 209 #if H_3D_IC 210 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] ); 211 #endif 212 #else 171 213 #if H_3D_ARP 172 214 //====== Advanced Inter-view Residual Prediction ========= … … 176 218 #if H_3D_IC 177 219 m_cTEncTop.setUseIC ( vps.getViewIndex( layer ) == 0 ? false : m_abUseIC[isDepth ? 1 : 0] ); 220 #endif 178 221 #endif 179 222 //========== Depth intra modes ========== … … 217 260 m_cTEncTop.setGOPSize ( m_iGOPSize ); 218 261 #if H_MV 262 #if H_MV5 263 m_cTEncTop.setGopList ( m_GOPListMvc[layerIdInVps] ); 264 m_cTEncTop.setExtraRPSs ( m_extraRPSsMvc[layerIdInVps] ); 265 for(Int i = 0; i < MAX_TLAYER; i++) 266 { 267 m_cTEncTop.setNumReorderPics ( m_numReorderPicsMvc[layerIdInVps][i], i ); 268 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBufferingMvc[layerIdInVps][i], i ); 269 } 270 #else 219 271 m_cTEncTop.setGopList ( m_GOPListMvc[layer] ); 220 272 m_cTEncTop.setExtraRPSs ( m_extraRPSsMvc[layer] ); … … 224 276 m_cTEncTop.setMaxDecPicBuffering ( m_maxDecPicBufferingMvc[layer][i], i ); 225 277 } 278 #endif 226 279 #else 227 280 m_cTEncTop.setGopList ( m_GOPList ); … … 238 291 } 239 292 #if H_MV 293 #if H_MV5 294 m_cTEncTop.setQP ( m_iQP[layerIdInVps] ); 295 #else 240 296 m_cTEncTop.setQP ( m_iQP[layer] ); 297 #endif 241 298 #else 242 299 m_cTEncTop.setQP ( m_iQP ); … … 246 303 247 304 #if H_MV 305 #if H_MV5 306 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layerIdInVps] ); 307 #else 248 308 m_cTEncTop.setMaxTempLayer ( m_maxTempLayerMvc[layer] ); 309 #endif 249 310 #else 250 311 m_cTEncTop.setMaxTempLayer ( m_maxTempLayer ); … … 256 317 //====== Loop/Deblock Filter ======== 257 318 #if H_MV 319 #if H_MV5 320 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable[layerIdInVps]); 321 #else 258 322 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable[layer]); 323 #endif 259 324 #else 260 325 m_cTEncTop.setLoopFilterDisable ( m_bLoopFilterDisable ); … … 286 351 287 352 #if H_MV 353 #if H_MV5 354 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layerIdInVps] == lowestQP) && (m_useLossless == true)) 355 #else 288 356 if ((m_iMaxDeltaQP == 0 ) && (m_iQP[layer] == lowestQP) && (m_useLossless == true)) 357 #endif 289 358 #else 290 359 if ((m_iMaxDeltaQP == 0 ) && (m_iQP == lowestQP) && (m_useLossless == true)) … … 303 372 m_cTEncTop.setUseLossless ( m_useLossless ); 304 373 #if H_MV 374 #if H_MV5 375 m_cTEncTop.setdQPs ( m_aidQP[layerIdInVps] ); 376 #else 305 377 m_cTEncTop.setdQPs ( m_aidQP[layer] ); 378 #endif 306 379 #else 307 380 m_cTEncTop.setdQPs ( m_aidQP ); … … 362 435 m_cTEncTop.setLFCrossSliceBoundaryFlag( m_bLFCrossSliceBoundaryFlag ); 363 436 #if H_MV 437 #if H_MV5 438 m_cTEncTop.setUseSAO ( m_bUseSAO[layerIdInVps] ); 439 #else 364 440 m_cTEncTop.setUseSAO ( m_bUseSAO[layer] ); 441 #endif 365 442 #else 366 443 m_cTEncTop.setUseSAO ( m_bUseSAO ); … … 1044 1121 Void TAppEncTop::xSetDimensionIdAndLength( TComVPS& vps ) 1045 1122 { 1123 #if H_MV5 1124 vps.setScalabilityMaskFlag( m_scalabilityMask ); 1125 #else 1046 1126 vps.setScalabilityMask( m_scalabilityMask ); 1127 #endif 1047 1128 for( Int dim = 0; dim < m_dimIds.size(); dim++ ) 1048 1129 { 1049 1130 vps.setDimensionIdLen( dim, m_dimensionIdLen[ dim ] ); 1131 #if H_MV5 1132 for( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 1133 #else 1050 1134 for( Int layer = 0; layer < vps.getMaxLayers(); layer++ ) 1135 #endif 1136 1051 1137 { 1052 1138 vps.setDimensionId( layer, dim, m_dimIds[ dim ][ layer ] ); 1053 1139 } 1054 1140 } 1141 1142 #if H_MV5 1143 Int maxViewId = xGetMax( m_viewId ); 1144 1145 Int viewIdLenMinus1 = std::max( gCeilLog2( maxViewId + 1 ) - 1, 0 ) ; 1146 const Int maxViewIdLenMinus1 = ( 1 << 4 ) - 1; 1147 assert( viewIdLenMinus1 <= maxViewIdLenMinus1 ); 1148 vps.setViewIdLenMinus1( viewIdLenMinus1 ); 1149 for (Int i = 0; i < m_iNumberOfViews; i++) 1150 { 1151 vps.setViewIdVal( i, m_viewId[ i] ); 1152 } 1153 1154 assert( m_iNumberOfViews == vps.getNumViews() ); 1155 #endif 1055 1156 } 1056 1157 … … 1078 1179 } 1079 1180 1080 // Max temporal id for inter layer reference pictures 1181 // Max temporal id for inter layer reference pictures + presence flag 1182 #if H_MV5 1183 Bool maxTidRefPresentFlag = false; 1184 #endif 1081 1185 for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++) 1082 1186 { … … 1099 1203 } 1100 1204 vps.setMaxTidIlRefPicPlus1( refLayerIdInVps, maxTid + 1 ); 1101 } 1102 1205 #if H_MV5 1206 maxTidRefPresentFlag = maxTidRefPresentFlag || ( maxTid != 6 ); 1207 #endif 1208 } 1209 1210 #if H_MV5 1211 vps.setMaxTidRefPresentFlag( maxTidRefPresentFlag ); 1212 #endif 1103 1213 // Max one active ref layer flag 1104 1214 Bool maxOneActiveRefLayerFlag = true; 1215 #if H_MV5 1216 for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers && maxOneActiveRefLayerFlag; layerIdInVps++) 1217 #else 1105 1218 for ( Int currLayerIdInVps = 1; currLayerIdInVps < m_numberOfLayers && maxOneActiveRefLayerFlag; currLayerIdInVps++) 1219 #endif 1106 1220 { 1107 1221 for( Int i = 0; i < ( getGOPSize() + 1) && maxOneActiveRefLayerFlag; i++ ) 1108 1222 { 1223 #if H_MV5 1224 GOPEntry ge = m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1225 #else 1109 1226 GOPEntry ge = m_GOPListMvc[currLayerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1227 #endif 1110 1228 maxOneActiveRefLayerFlag = maxOneActiveRefLayerFlag && (ge.m_numActiveRefLayerPics <= 1); 1111 1229 } … … 1113 1231 1114 1232 vps.setMaxOneActiveRefLayerFlag( maxOneActiveRefLayerFlag ); 1233 1234 1235 #if H_MV5 1236 // All Ref layers active flag 1237 Bool allRefLayersActiveFlag = true; 1238 for ( Int layerIdInVps = 1; layerIdInVps < m_numberOfLayers && allRefLayersActiveFlag; layerIdInVps++) 1239 { 1240 for( Int i = 0; i < ( getGOPSize() + 1) && allRefLayersActiveFlag; i++ ) 1241 { 1242 GOPEntry ge = m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]; 1243 allRefLayersActiveFlag = allRefLayersActiveFlag && (ge.m_numActiveRefLayerPics == m_directRefLayers[ layerIdInVps ].size() ); 1244 } 1245 } 1246 1247 vps.setAllRefLayersActiveFlag( allRefLayersActiveFlag ); 1248 1249 // Currently cross layer irap aligned is always true. 1250 vps.setCrossLayerIrapAlignedFlag( true ); 1251 #endif 1115 1252 vps.setRefLayers(); 1116 1253 }; 1117 1254 1255 #if H_MV5 1256 GOPEntry* TAppEncTop::xGetGopEntry( Int layerIdInVps, Int poc ) 1257 { 1258 GOPEntry* geFound = NULL; 1259 for( Int i = 0; i < ( getGOPSize() + 1) && geFound == NULL ; i++ ) 1260 { 1261 GOPEntry* ge = &(m_GOPListMvc[layerIdInVps][ ( i < getGOPSize() ? i : MAX_GOP ) ]); 1262 if ( ge->m_POC == poc ) 1263 { 1264 geFound = ge; 1265 } 1266 } 1267 assert( geFound != NULL ); 1268 return geFound; 1269 } 1270 #endif 1271 1118 1272 Void TAppEncTop::xSetLayerIds( TComVPS& vps ) 1119 1273 { … … 1137 1291 Int maxVec = 0; 1138 1292 for ( Int i = 0; i < vec.size(); i++) 1293 { 1139 1294 maxVec = max( vec[i], maxVec ); 1295 } 1140 1296 return maxVec; 1141 1297 } … … 1152 1308 } 1153 1309 1310 #if H_MV5 1311 1312 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) 1313 { 1314 vps.setRepFormatIdxPresentFlag( true ); 1315 vps.setVpsNumRepFormatsMinus1 ( 0 ); 1316 1317 TComRepFormat* repFormat = new TComRepFormat; 1318 1319 repFormat->setBitDepthVpsChromaMinus8 ( g_bitDepthC - 8 ); 1320 repFormat->setBitDepthVpsLumaMinus8 ( g_bitDepthY - 8 ); 1321 repFormat->setChromaFormatVpsIdc ( CHROMA_420 ); 1322 repFormat->setPicHeightVpsInLumaSamples ( m_iSourceHeight ); 1323 repFormat->setPicWidthVpsInLumaSamples ( m_iSourceWidth ); 1324 // ToDo not supported yet. 1325 //repFormat->setSeparateColourPlaneVpsFlag( ); 1326 1327 assert( vps.getRepFormat( 0 ) == NULL ); 1328 vps.setRepFormat( 0 , repFormat ); 1329 1330 for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ ) 1331 { 1332 vps.setVpsRepFormatIdx( i , 0 ); 1333 } 1334 } 1335 #endif 1154 1336 1155 1337 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) … … 1204 1386 } 1205 1387 } 1388 #if H_MV5 1389 1390 Void TAppEncTop::xSetVPSVUI( TComVPS& vps ) 1391 { 1392 vps.setVpsVuiPresentFlag( m_vpsVuiPresentFlag ); 1393 1394 if ( m_vpsVuiPresentFlag ) 1395 { 1396 TComVPSVUI* pcVPSVUI = vps.getVPSVUI( ); 1397 1398 assert( pcVPSVUI ); 1399 1400 pcVPSVUI->setBitRatePresentVpsFlag( m_bitRatePresentVpsFlag ); 1401 pcVPSVUI->setPicRatePresentVpsFlag( m_picRatePresentVpsFlag ); 1402 1403 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1404 { 1405 for( Int i = 0; i <= vps.getVpsNumberLayerSetsMinus1(); i++ ) 1406 { 1407 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) 1408 { 1409 if( pcVPSVUI->getBitRatePresentVpsFlag( ) && m_bitRatePresentFlag[i].size() > j ) 1410 { 1411 pcVPSVUI->setBitRatePresentFlag( i, j, m_bitRatePresentFlag[i][j] ); 1412 } 1413 if( pcVPSVUI->getPicRatePresentVpsFlag( ) && m_picRatePresentFlag[i].size() > j ) 1414 { 1415 pcVPSVUI->setPicRatePresentFlag( i, j, m_picRatePresentFlag[i][j] ); 1416 } 1417 if( pcVPSVUI->getBitRatePresentFlag( i, j ) && m_avgBitRate[i].size() > j ) 1418 { 1419 pcVPSVUI->setAvgBitRate( i, j, m_avgBitRate[i][j] ); 1420 } 1421 if( pcVPSVUI->getBitRatePresentFlag( i, j ) && m_maxBitRate[i].size() > j ) 1422 { 1423 pcVPSVUI->setMaxBitRate( i, j, m_maxBitRate[i][j] ); 1424 } 1425 if( pcVPSVUI->getPicRatePresentFlag( i, j ) && m_constantPicRateIdc[i].size() > j ) 1426 { 1427 pcVPSVUI->setConstantPicRateIdc( i, j, m_constantPicRateIdc[i][j] ); 1428 } 1429 if( pcVPSVUI->getPicRatePresentFlag( i, j ) && m_avgPicRate[i].size() > j ) 1430 { 1431 pcVPSVUI->setAvgPicRate( i, j, m_avgPicRate[i][j] ); 1432 } 1433 } 1434 } 1435 } 1436 1437 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ ) 1438 { 1439 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ); j++ ) 1440 { 1441 if ( m_tileBoundariesAlignedFlag[i].size() > j ) 1442 { 1443 pcVPSVUI->setTileBoundariesAlignedFlag( i, j, m_tileBoundariesAlignedFlag[i][j]); 1444 } 1445 } 1446 } 1447 1448 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); 1449 1450 if( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ) 1451 { 1452 for( Int i = 1; i <= vps.getMaxLayersMinus1(); i++ ) 1453 { 1454 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ); j++ ) 1455 { 1456 if ( m_minSpatialSegmentOffsetPlus1[i].size() > j ) 1457 { 1458 pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, m_minSpatialSegmentOffsetPlus1[i][j] ); 1459 } 1460 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1461 { 1462 if ( m_ctuBasedOffsetEnabledFlag[i].size() > j ) 1463 { 1464 pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, m_ctuBasedOffsetEnabledFlag[i][j] ); 1465 } 1466 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1467 { 1468 if ( m_minHorizontalCtuOffsetPlus1[i].size() > j ) 1469 { 1470 pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, m_minHorizontalCtuOffsetPlus1[i][j] ); 1471 } 1472 } 1473 } 1474 } 1475 } 1476 } 1477 } 1478 } 1479 #endif 1206 1480 #endif 1207 1481 #if H_3D 1208 1482 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps ) 1209 1483 { 1484 #if H_MV5 1485 1486 for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ ) 1487 #else 1210 1488 for ( Int layer = 0; layer < vps.getMaxLayers(); layer++ ) 1489 #endif 1211 1490 { 1212 1491 Bool isDepth = ( vps.getDepthId( layer ) == 1 ) ; … … 1242 1521 #endif 1243 1522 } 1244 #if H_3D _TMVP1523 #if H_3D 1245 1524 vps.setIvMvScalingFlag( m_ivMvScalingFlag ); 1246 1525 #endif -
trunk/source/App/TAppEncoder/TAppEncTop.h
r608 r622 121 121 Void xSetLayerSets ( TComVPS& vps ); 122 122 Void xSetProfileTierLevel ( TComVPS& vps ); 123 #if H_MV5 124 Void xSetRepFormat ( TComVPS& vps ); 125 Void xSetVPSVUI ( TComVPS& vps ); 126 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 127 #endif 123 128 Int xGetMax( std::vector<Int>& vec); 124 129 #endif -
trunk/source/Lib/TLibCommon/CommonDef.h
r609 r622 48 48 #endif // _MSC_VER > 1000 49 49 #include "TypeDef.h" 50 #if H_MV 51 #include <assert.h> 52 #endif 50 53 51 54 //! \ingroup TLibCommon … … 183 186 return (t < 0) ? T(-1) : T(1); 184 187 } 188 189 #if H_MV5 190 template <typename T> 191 __inline T gCeilLog2( T val ) 192 { 193 assert( val > 0 ); 194 Int ceilLog2 = 0; 195 while( val > ( 1 << ceilLog2 ) ) ceilLog2++; 196 return ceilLog2; 197 } 198 #endif 185 199 186 200 #define RemoveBitIncrement( exp ) ( exp >> ( g_bitDepthY - 8 ) ) -
trunk/source/Lib/TLibCommon/ContextTables.h
r608 r622 112 112 #if H_3D_DIM_DMM 113 113 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 114 #if !SEC_DMM2_E0146 114 #if !SEC_DMM2_E0146_HHIFIX 115 115 #define NUM_DMM2_DATA_CTX 1 ///< number of context models for DMM2 data 116 116 #endif … … 429 429 { CNU }, 430 430 }; 431 #if !SEC_DMM2_E0146 431 #if !SEC_DMM2_E0146_HHIFIX 432 432 static const UChar 433 433 INIT_DMM2_DATA[3][NUM_DMM2_DATA_CTX] = -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r608 r622 120 120 m_dmmWedgeTabIdx[i] = NULL; 121 121 } 122 #if !SEC_DMM2_E0146 122 #if !SEC_DMM2_E0146_HHIFIX 123 123 m_dmm2DeltaEnd = NULL; 124 124 #endif … … 146 146 #if H_3D_VSP 147 147 m_piVSPFlag = NULL; 148 #if MTK_VSP_FIX_E0172149 m_piVSPDir = NULL;150 #endif151 148 #endif 152 149 #if H_3D_ARP … … 200 197 #if H_3D_VSP 201 198 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 202 #if MTK_VSP_FIX_E0172203 m_piVSPDir = (Char* )xMalloc(Char, uiNumPartition);204 #endif205 199 #endif 206 200 m_puhLumaIntraDir = (UChar* )xMalloc(UChar, uiNumPartition); … … 280 274 m_dmmWedgeTabIdx[i] = (UInt*)xMalloc(UInt, uiNumPartition); 281 275 } 282 #if !SEC_DMM2_E0146 276 #if !SEC_DMM2_E0146_HHIFIX 283 277 m_dmm2DeltaEnd = (Int* )xMalloc(Int, uiNumPartition); 284 278 #endif … … 363 357 #if H_3D_VSP 364 358 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 365 #if MTK_VSP_FIX_E0172366 if ( m_piVSPDir ) { xFree(m_piVSPDir ); m_piVSPDir = NULL; }367 #endif368 359 #endif 369 360 if ( m_puhLumaIntraDir ) { xFree(m_puhLumaIntraDir); m_puhLumaIntraDir = NULL; } … … 419 410 if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; } 420 411 } 421 #if !SEC_DMM2_E0146 412 #if !SEC_DMM2_E0146_HHIFIX 422 413 if ( m_dmm2DeltaEnd ) { xFree( m_dmm2DeltaEnd ); m_dmm2DeltaEnd = NULL; } 423 414 #endif … … 573 564 #if H_3D_VSP 574 565 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui]; 575 #if MTK_VSP_FIX_E0172576 m_piVSPDir [ui] = pcFrom->m_piVSPDir[ui];577 #endif578 566 #endif 579 567 m_puhLumaIntraDir[ui]=pcFrom->m_puhLumaIntraDir[ui]; … … 618 606 #if H_3D_VSP 619 607 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) ); 620 #if MTK_VSP_FIX_E0172621 memset( m_piVSPDir + firstElement, 0, numElements * sizeof( *m_piVSPDir ) );622 #endif623 608 #endif 624 609 memset( m_puhLumaIntraDir + firstElement, DC_IDX, numElements * sizeof( *m_puhLumaIntraDir ) ); … … 646 631 memset( m_dmmWedgeTabIdx[i] + firstElement, 0, numElements * sizeof( *m_dmmWedgeTabIdx[i] ) ); 647 632 } 648 #if !SEC_DMM2_E0146 633 #if !SEC_DMM2_E0146_HHIFIX 649 634 memset( m_dmm2DeltaEnd + firstElement, 0, numElements * sizeof( *m_dmm2DeltaEnd ) ); 650 635 #endif … … 802 787 #if H_3D_VSP 803 788 m_piVSPFlag[ui] = 0; 804 #if MTK_VSP_FIX_E0172805 m_piVSPDir [ui] = 0;806 #endif807 789 #endif 808 790 m_puhLumaIntraDir[ui] = DC_IDX; … … 829 811 m_dmmWedgeTabIdx[i] [ui] = 0; 830 812 } 831 #if !SEC_DMM2_E0146 813 #if !SEC_DMM2_E0146_HHIFIX 832 814 m_dmm2DeltaEnd [ui] = 0; 833 815 #endif … … 906 888 #if H_3D_VSP 907 889 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 908 #if MTK_VSP_FIX_E0172909 memset( m_piVSPDir , 0, sizeInChar );910 #endif911 890 #endif 912 891 memset( m_puhLumaIntraDir, DC_IDX, iSizeInUchar ); … … 946 925 memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition ); 947 926 } 948 #if !SEC_DMM2_E0146 927 #if !SEC_DMM2_E0146_HHIFIX 949 928 memset( m_dmm2DeltaEnd , 0, sizeof(Int ) * m_uiNumPartition ); 950 929 #endif … … 1005 984 #if H_3D_VSP 1006 985 m_piVSPFlag[ui]=pcCU->m_piVSPFlag[uiPartOffset+ui]; 1007 #if MTK_VSP_FIX_ALIGN_WD_E01721008 986 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 1009 #endif1010 #if MTK_VSP_FIX_E01721011 m_piVSPDir[ui]=pcCU->m_piVSPDir[uiPartOffset+ui];1012 #endif1013 987 #endif 1014 988 m_puhLumaIntraDir[ui]=pcCU->m_puhLumaIntraDir[uiPartOffset+ui]; … … 1036 1010 m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui]; 1037 1011 } 1038 #if !SEC_DMM2_E0146 1012 #if !SEC_DMM2_E0146_HHIFIX 1039 1013 m_dmm2DeltaEnd [ui] = pcCU->m_dmm2DeltaEnd [uiPartOffset+ui]; 1040 1014 #endif … … 1162 1136 #if H_3D_VSP 1163 1137 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1164 #if MTK_VSP_FIX_E01721165 m_piVSPDir = pcCU->getVSPDir () + uiPart;1166 #endif1167 1138 #endif 1168 1139 … … 1196 1167 m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart; 1197 1168 } 1198 #if !SEC_DMM2_E0146 1169 #if !SEC_DMM2_E0146_HHIFIX 1199 1170 m_dmm2DeltaEnd = pcCU->getDmm2DeltaEnd() + uiPart; 1200 1171 #endif … … 1321 1292 #if H_3D_VSP 1322 1293 m_piVSPFlag = pcCU->getVSPFlag() + uiAbsPartIdx; 1323 #if MTK_VSP_FIX_ALIGN_WD_E01721324 1294 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; 1325 #endif1326 #if MTK_VSP_FIX_E01721327 m_piVSPDir = pcCU->getVSPDir () + uiAbsPartIdx;1328 #endif1329 1295 #endif 1330 1296 … … 1374 1340 #if H_3D_VSP 1375 1341 memcpy( m_piVSPFlag + uiOffset, pcCU->getVSPFlag(), sizeof( Char ) * uiNumPartition ); 1376 #if MTK_VSP_FIX_ALIGN_WD_E01721377 1342 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1378 #endif 1379 #if MTK_VSP_FIX_E0172 1380 memcpy( m_piVSPDir + uiOffset, pcCU->getVSPDir (), sizeInChar ); 1381 #endif 1343 1382 1344 #endif 1383 1345 memcpy( m_puhLumaIntraDir + uiOffset, pcCU->getLumaIntraDir(), iSizeInUchar ); … … 1404 1366 memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition ); 1405 1367 } 1406 #if !SEC_DMM2_E0146 1368 #if !SEC_DMM2_E0146_HHIFIX 1407 1369 memcpy( m_dmm2DeltaEnd + uiOffset, pcCU->getDmm2DeltaEnd() , sizeof(Int ) * uiNumPartition ); 1408 1370 #endif … … 1509 1471 #if H_3D_VSP 1510 1472 memcpy( rpcCU->getVSPFlag() + m_uiAbsIdxInLCU, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1511 #if MTK_VSP_FIX_ALIGN_WD_E01721512 1473 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1513 #endif1514 #if MTK_VSP_FIX_E01721515 memcpy( rpcCU->getVSPDir () + m_uiAbsIdxInLCU, m_piVSPDir , sizeInChar );1516 #endif1517 1474 #endif 1518 1475 memcpy( rpcCU->getLumaIntraDir() + m_uiAbsIdxInLCU, m_puhLumaIntraDir, iSizeInUchar ); … … 1539 1496 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition ); 1540 1497 } 1541 #if !SEC_DMM2_E0146 1498 #if !SEC_DMM2_E0146_HHIFIX 1542 1499 memcpy( rpcCU->getDmm2DeltaEnd() + m_uiAbsIdxInLCU, m_dmm2DeltaEnd , sizeof(Int ) * m_uiNumPartition ); 1543 1500 #endif … … 1632 1589 #if H_3D_VSP 1633 1590 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); 1634 #if MTK_VSP_FIX_E01721635 memcpy( rpcCU->getVSPDir () + uiPartOffset, m_piVSPDir , sizeInChar );1636 #endif1637 1591 #endif 1638 1592 memcpy( rpcCU->getLumaIntraDir() + uiPartOffset, m_puhLumaIntraDir, iSizeInUchar ); … … 1658 1612 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart ); 1659 1613 } 1660 #if !SEC_DMM2_E0146 1614 #if !SEC_DMM2_E0146_HHIFIX 1661 1615 memcpy( rpcCU->getDmm2DeltaEnd() + uiPartOffset, m_dmm2DeltaEnd , sizeof(Int ) * uiQNumPart ); 1662 1616 #endif … … 2761 2715 setSubPart<Char>( iVSPFlag, m_piVSPFlag, uiAbsPartIdx, uiDepth, uiPartIdx ); 2762 2716 } 2763 #if MTK_VSP_FIX_ALIGN_WD_E01722717 #if H_3D_VSP 2764 2718 template<typename T> 2765 2719 Void TComDataCU::setSubPartT( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ) … … 2895 2849 } 2896 2850 2897 }2898 #endif2899 #if MTK_VSP_FIX_E01722900 Void TComDataCU::setVSPDirSubParts ( Char iVSPDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )2901 {2902 setSubPart<Char>( iVSPDir, m_piVSPDir, uiAbsPartIdx, uiDepth, uiPartIdx );2903 2851 } 2904 2852 #endif … … 3355 3303 * false: otherwise 3356 3304 */ 3357 #if MTK_VSP_FIX_E0172 3358 inline Bool TComDataCU::xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3359 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int* vspDir ) 3360 #else 3361 inline Bool TComDataCU::xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3305 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3362 3306 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ) 3363 #endif 3364 { 3365 if ( ucVspMergePos != H_3D_VSP_POSITION || 0 == m_pcSlice->getViewIndex() || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() )3307 { 3308 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) 3309 { 3366 3310 return false; 3311 } 3367 3312 3368 3313 Int refViewIdx = pDInfo->m_aVIdxCan; 3369 3314 TComPic* picDepth = getSlice()->getIvPic( true, refViewIdx ); 3315 3370 3316 if( picDepth == NULL ) // No depth reference avail 3317 { 3318 // Is this allowed to happen? When not an assertion should be added here! 3371 3319 return false; 3372 3373 Bool refViewAvailFlag = false; 3374 UChar predFlag[2] = {0, 0}; 3375 Int iRefListIdX = 0; 3376 Int iRefListIdY = 0; 3377 Int i; 3378 #if MTK_VSP_FIX_ALIGN_WD_E0172 3379 Int currViewId = m_pcSlice->getViewId(); 3380 Int derivedViewId = -1; 3381 Int otherViewId = -1; 3382 #endif 3383 #if MTK_VSP_FIX_E0172 3384 Int currViewId = m_pcSlice->getViewId(); 3385 Int derivedViewId = -1; 3386 Int otherViewId = -1; 3387 #endif 3388 for( iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) 3389 { 3390 RefPicList eRefPicList = RefPicList( iRefListIdX ); 3391 for ( i = 0; i < m_pcSlice->getNumRefIdx(eRefPicList) && !refViewAvailFlag; i++ ) 3392 { 3393 Int viewIdxRefInList = m_pcSlice->getRefPic(eRefPicList, i)->getViewIndex(); 3394 if ( viewIdxRefInList == refViewIdx ) 3395 { 3396 refViewAvailFlag = true; 3320 } 3321 3322 Bool refViewAvailFlag = false; 3323 UChar predFlag[2] = {0, 0}; 3324 Int refListIdY = 0; 3325 Int viewIdInRefListX = -1; 3326 3327 for( Int iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) 3328 { 3329 RefPicList eRefPicListX = RefPicList( iRefListIdX ); 3330 for ( Int i = 0; i < m_pcSlice->getNumRefIdx(eRefPicListX) && !refViewAvailFlag; i++ ) 3331 { 3332 Int viewIdxRefInListX = m_pcSlice->getRefPic(eRefPicListX, i)->getViewIndex(); 3333 if ( viewIdxRefInListX == refViewIdx ) 3334 { 3335 refViewAvailFlag = true; 3397 3336 predFlag[iRefListIdX] = 1; 3398 #if MTK_VSP_FIX_ALIGN_WD_E0172 3399 derivedViewId = m_pcSlice->getRefPic(eRefPicList, i)->getViewId(); 3400 #endif 3401 #if MTK_VSP_FIX_E0172 3402 vspDir[iCount] = iRefListIdX; 3403 derivedViewId = m_pcSlice->getRefPic(eRefPicList, i)->getViewId(); 3404 #endif 3405 iRefListIdY = 1 - iRefListIdX; 3406 #if H_3D_FIX_BVSP 3337 viewIdInRefListX = m_pcSlice->getRefPic(eRefPicListX, i)->getViewId(); 3338 refListIdY = 1 - iRefListIdX; 3407 3339 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3408 #else3409 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acDoNBDV, i );3410 #endif3411 3340 #if H_3D_NBDV 3412 3341 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false); … … 3418 3347 if (m_pcSlice->isInterB() && refViewAvailFlag) 3419 3348 { 3420 RefPicList eRefPicList = RefPicList( iRefListIdY );3349 RefPicList eRefPicListY = RefPicList( refListIdY ); 3421 3350 refViewAvailFlag = false; 3422 for ( i = 0; i < m_pcSlice->getNumRefIdx(eRefPicList) && !refViewAvailFlag; i++ )3423 { 3424 Int viewIdxRefInList = m_pcSlice->getRefPic(eRefPicList, i)->getViewIndex();3425 if ( viewIdxRefInList != refViewIdx && viewIdxRefInList!= m_pcSlice->getViewIndex() )3351 for ( Int i = 0; i < m_pcSlice->getNumRefIdx(eRefPicListY) && !refViewAvailFlag; i++ ) 3352 { 3353 Int viewIdxRefInListY = m_pcSlice->getRefPic(eRefPicListY, i)->getViewIndex(); 3354 if ( viewIdxRefInListY != refViewIdx && viewIdxRefInListY != m_pcSlice->getViewIndex() ) 3426 3355 { 3427 3356 refViewAvailFlag = true; 3428 predFlag[iRefListIdY] = 1; 3429 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 3430 #if H_3D_FIX_BVSP 3357 predFlag[refListIdY] = 1; 3431 3358 TComMv cMv = pDInfo->m_acNBDV; 3432 #else 3433 TComMv cMv = pDInfo->m_acDoNBDV; 3434 #endif 3435 otherViewId = m_pcSlice->getRefPic( eRefPicList, i)->getViewId(); 3436 Int iScale = xGetDistScaleFactor( currViewId, otherViewId, currViewId, derivedViewId ); 3359 3360 Int viewIdInRefListY = m_pcSlice->getRefPic( eRefPicListY, i)->getViewId(); 3361 Int currViewId = m_pcSlice->getViewId(); 3362 3363 //// Following might be added here when MV-HEVC 5 HLS is included (and derivations above removed): 3364 // Int viewIdInRefListX = m_pcSlice->getVPS()->getViewIdVal( refViewIdx ); 3365 3366 Int iScale = xGetDistScaleFactor( currViewId, viewIdInRefListY, currViewId, viewIdInRefListX ); 3367 3368 // Can iScale == 4096 happen?, I guess not since viewIdInRefListY is always unequal to viewIdInRefListX. 3437 3369 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() ) 3438 3370 { … … 3445 3377 } 3446 3378 clipMv( cMv ); 3447 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( cMv, i ); 3448 #else 3449 #if H_3D_FIX_BVSP 3450 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acNBDV, i ); 3451 #else 3452 pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acDoNBDV, i ); 3453 #endif 3454 #endif 3379 pcMvFieldNeighbours[(iCount<<1)+refListIdY].setMvField( cMv, i ); 3455 3380 #if H_3D_NBDV 3456 pcMvFieldNeighbours[(iCount<<1)+ iRefListIdY].getMv().setIDVFlag (false);3381 pcMvFieldNeighbours[(iCount<<1)+refListIdY].getMv().setIDVFlag (false); 3457 3382 #endif 3458 3383 } … … 3461 3386 3462 3387 // Set values to be returned 3463 abCandIsInter [iCount] = true;3388 abCandIsInter [iCount] = true; 3464 3389 puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1)); 3465 vspFlag [iCount] = 1;3390 vspFlag [iCount] = 1; 3466 3391 3467 3392 if ( mrgCandIdx == iCount ) 3393 { 3468 3394 return true; 3395 } 3469 3396 3470 3397 iCount++; … … 3475 3402 #endif 3476 3403 3477 #if QC_INRIA_MTK_MRG_E0126 3478 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iPdmDir, TComMv* acPdmMv, 3479 Int* aiPdmRefIdx, Int iPosDmv, Int* vspFlag ) 3480 { 3481 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) 3482 { 3404 #if H_3D_IV_MERGE 3405 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 3406 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag ) 3407 { 3408 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) 3409 { 3410 // IvDcShift (Derived from spatial Iv neighboring blocks) 3483 3411 if( iLoop == 1 ) 3484 3412 { 3485 3413 Int iFirDispCand = -1; 3486 if (x FirstDmvAvai(iCount, pcMvFieldNeighbours, iPdmDir, iPosDmv, vspFlag, iFirDispCand))3414 if (xGetPosFirstAvailDmvCand(iCount, pcMvFieldNeighbours, ivCandDir, iPosIvDC, vspFlag, iFirDispCand)) 3487 3415 { 3488 3416 TComMv cMv; … … 3494 3422 } 3495 3423 clipMv( cMv ); 3496 abCandIsInter [ iCount ] = true;3424 abCandIsInter [ iCount ] = true; 3497 3425 puhInterDirNeighbours[ iCount ] = puhInterDirNeighbours[iFirDispCand]; 3498 pcMvFieldNeighbours[ iCount<<1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() ); 3499 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() ); 3426 pcMvFieldNeighbours [ iCount << 1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() ); 3427 pcMvFieldNeighbours [(iCount << 1) + 1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() ); 3428 3500 3429 if( mrgCandIdx == iCount ) 3501 3430 { 3502 3431 return true; 3503 3432 } 3433 3504 3434 iCount++; 3505 3435 break; 3506 3436 } 3507 3437 } 3508 if(iPdmDir[iLoop + 2]) 3509 { 3510 abCandIsInter[ iCount ] = true; 3511 puhInterDirNeighbours[ iCount ] = iPdmDir[iLoop + 2]; 3512 if( ( iPdmDir[iLoop + 2] & 1 ) == 1 ) 3513 { 3514 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ (iLoop<<1) + 4 ], aiPdmRefIdx[ (iLoop<<1) + 4 ] ); 3515 } 3516 if( ( iPdmDir[iLoop + 2] & 2 ) == 2 ) 3517 { 3518 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( acPdmMv[ (iLoop<<1) + 5 ], aiPdmRefIdx[ (iLoop<<1) + 5 ] ); 3438 3439 /// iLoop = 0 --> IvMCShift 3440 /// iLoop = 1 --> IvDCShift (Derived from IvDC) 3441 if(ivCandDir[iLoop + 2]) 3442 { 3443 abCandIsInter [ iCount ] = true; 3444 puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2]; 3445 if( ( ivCandDir[iLoop + 2] & 1 ) == 1 ) 3446 { 3447 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] ); 3448 } 3449 if( ( ivCandDir[iLoop + 2] & 2 ) == 2 ) 3450 { 3451 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] ); 3519 3452 } 3520 3453 3521 bool bRemove = false; 3522 if(!iLoop && iPdmDir[0] > 0) 3523 { 3524 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3454 // Prune IvMC vs. IvMcShift 3455 Bool bRemove = false; 3456 if( !iLoop && ivCandDir[0] > 0) 3457 { 3458 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0 ]== pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[1]==pcMvFieldNeighbours[(iCount<<1)+1]) 3525 3459 { 3526 bRemove = true;3460 bRemove = true; 3527 3461 abCandIsInter [ iCount ] = false; 3528 puhInterDirNeighbours[ iCount]= 0;3462 puhInterDirNeighbours[ iCount ] = 0; 3529 3463 TComMv cZeroMv; 3530 pcMvFieldNeighbours [iCount<<1].setMvField( cZeroMv, NOT_VALID );3531 pcMvFieldNeighbours [(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );3464 pcMvFieldNeighbours [ iCount<<1 ].setMvField( cZeroMv, NOT_VALID ); 3465 pcMvFieldNeighbours [(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 3532 3466 } 3533 3467 } … … 3535 3469 { 3536 3470 #if H_3D_NBDV 3537 if(iLoop) 3471 if(iLoop) // For IvMcShift candidate 3538 3472 { 3539 3473 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); … … 3553 3487 } 3554 3488 3555 inline Bool TComDataCU::xFirstDmvAvai( Int& iCount, TComMvField* pcMvFieldNeighbours, Int* iPdmDir, Int iPosDmv, Int* vspFlag, Int& iFirDispCand ) 3556 { 3557 for ( Int i = (iPdmDir[0] ? 1: 0); i < iCount; i++ ) 3558 { 3559 if ( ( i == iPosDmv ) || ( vspFlag[ i ] == 1 ) ) 3489 inline Bool TComDataCU::xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& posFirstAvailDmvCand ) 3490 { 3491 // ivCandDir[0] == true --> IvMC is available and excluded in loop over merge list. 3492 for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ ) 3493 { 3494 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] == 1 ) ) 3560 3495 { 3561 3496 continue; 3562 3497 } 3563 else if((pcMvFieldNeighbours[ i<<1].getRefIdx()!=-1) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), pcMvFieldNeighbours[i<<1].getRefIdx())->getViewIndex()))3564 { 3565 iFirDispCand = i;3498 else if((pcMvFieldNeighbours[currListPos<<1].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), pcMvFieldNeighbours[currListPos<<1].getRefIdx())->getViewIndex())) 3499 { 3500 posFirstAvailDmvCand = currListPos; 3566 3501 return true; 3567 3502 } … … 3582 3517 #if H_3D_VSP 3583 3518 , Int* vspFlag 3584 #if MTK_VSP_FIX_ALIGN_WD_E01723585 3519 , InheritedVSPDisInfo* inheritedVSPDisInfo 3586 #endif3587 #if MTK_VSP_FIX_E01723588 , Int* vspDir3589 #endif3590 3520 #endif 3591 3521 , Int& numValidMergeCand, Int mrgCandIdx … … 3594 3524 UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx; 3595 3525 #if H_3D_IV_MERGE 3526 //////////////////////////// 3527 //////// INIT LISTS //////// 3528 //////////////////////////// 3596 3529 TComMv cZeroMv; 3597 3530 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ]; … … 3611 3544 } 3612 3545 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 3546 #if H_3D 3547 ////////////////////////////////// 3548 //////// DERIVE LOCATIONS //////// 3549 ////////////////////////////////// 3550 #endif 3613 3551 // compute the location of the current PU 3614 3552 Int xP, yP, nPSW, nPSH; … … 3622 3560 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 3623 3561 #if H_3D_IV_MERGE 3624 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 3625 3626 //===== add merge with predicted depth maps ===== 3627 #if QC_INRIA_MTK_MRG_E0126 3628 TComMv acPdmMv [8]; 3629 Int aiPdmRefIdx [8] = {-1, -1, -1, -1, -1, -1, -1, -1}; 3630 Int iPosDmv = -1; 3631 #else 3632 TComMv acPdmMv [4]; 3633 Int aiPdmRefIdx [4] = {-1, -1, -1, -1}; 3634 #endif 3635 Bool bLeftAvai = false; 3636 Int iPosLeftAbove[2] = {-1, -1}; 3637 3638 3639 DisInfo cDisInfo; 3640 3641 cDisInfo.bDV = getDvInfo(uiAbsPartIdx).bDV; 3642 #if H_3D_NBDV_REF 3643 cDisInfo.m_acDoNBDV = getDvInfo(uiAbsPartIdx).m_acDoNBDV; 3644 #endif //H_3D_NBDV_REF 3645 cDisInfo.m_acNBDV = getDvInfo(uiAbsPartIdx).m_acNBDV; 3646 cDisInfo.m_aVIdxCan = getDvInfo(uiAbsPartIdx).m_aVIdxCan; 3647 #if MTK_VSP_FIX_ALIGN_WD_E0172 3648 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 3649 { 3650 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 3651 } 3652 #endif 3562 3563 ///////////////////////////////////////////// 3564 //////// TEXTURE MERGE CANDIDATE (T) //////// 3565 ///////////////////////////////////////////// 3566 3653 3567 if( m_pcSlice->getIsDepth()) 3654 3568 { … … 3659 3573 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 3660 3574 { 3661 #if MTK_TEXTURE_MRGCAND_BUGFIX_E01823662 3575 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3663 3576 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() ); … … 3699 3612 iCount ++; 3700 3613 } 3701 #else 3702 abCandIsInter[iCount] = true; 3703 puhInterDirNeighbours[iCount] = pcTextureCU->getInterDir( uiPartIdxCenter ); 3704 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3705 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3706 if (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) 3707 #else 3708 if( ( puhInterDirNeighbours[iCount] & 1 ) == 1 ) 3709 #endif 3710 { 3711 #if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3712 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 3713 #endif 3714 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 3715 3716 #if H_3D_IC 3717 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 3718 cMvPred+=cAdd; 3719 cMvPred>>=2; 3720 clipMv(cMvPred); 3721 #endif 3722 //pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx()); 3723 #if H_3D //Notes from QC: for BVSP coded blocks, the reference index shall not be equal to -1 due to the adoption of JCT3V-D0191 3724 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx()); 3725 #endif 3726 } 3727 3728 if ( getSlice()->isInterB() ) 3729 { 3730 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3731 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3732 if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) 3733 #else 3734 if( ( puhInterDirNeighbours[iCount] & 2 ) == 2 ) 3735 #endif 3736 { 3737 #if !MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3738 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3739 #endif 3740 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 3741 #if H_3D_IC 3742 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 3743 cMvPred+=cAdd; 3744 cMvPred>>=2; 3745 clipMv(cMvPred); 3746 #endif 3747 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()); 3748 } 3749 } 3750 #if MTK_SONY_PROGRESSIVE_MV_COMPRESSION_E0170 3751 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 3752 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 3753 #endif 3754 #if H_3D_NBDV 3755 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 3756 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 3757 #endif 3758 if ( mrgCandIdx == iCount ) 3759 { 3760 return; 3761 } 3762 iCount ++; 3763 #endif//Bug fix 3764 } 3765 } 3766 3767 #if QC_INRIA_MTK_MRG_E0126 3768 Int iPdmDir[4] = {0, 0, 0, 0}; 3769 #else 3770 Int iPdmDir[2] = {0, 0}; 3771 #endif 3614 } 3615 } 3616 3617 ////////////////////////////////// 3618 //////// GET DISPARITIES //////// 3619 ////////////////////////////////// 3620 3621 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3622 3623 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 3624 { 3625 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 3626 } 3627 3628 ///////////////////////////////////////////////////////////////// 3629 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// 3630 ///////////////////////////////////////////////////////////////// 3631 3632 Int posIvDC = -1; 3633 Bool bLeftAvai = false; 3634 Int iPosLeftAbove[2] = {-1, -1}; 3635 3636 3637 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; 3638 // An enumerator would be appropriate here! 3639 TComMv ivCandMv [8]; 3640 Int ivCandRefIdx[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; 3641 3642 // { IvMC, IvDC, IvMCShift, IvDCShift }; 3643 Int ivCandDir [4] = {0, 0, 0, 0}; 3644 3645 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 3772 3646 3773 3647 if ( ivMvPredFlag ) 3774 3648 { 3775 getInterViewMergeCands(uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo, iPdmDir );3649 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir ); 3776 3650 } 3777 3778 Int iPdmInterDir; 3779 3780 if( iPdmDir[0] ) 3651 3652 /////////////////////////////////////////////// 3653 //////// INTER VIEW MOTION COMP(IvMC) ///////// 3654 /////////////////////////////////////////////// 3655 3656 if( ivCandDir[0] ) 3781 3657 { 3782 3658 abCandIsInter [ iCount ] = true; 3783 puhInterDirNeighbours[ iCount ] = iPdmDir[0]; 3784 iPdmInterDir = iPdmDir[0]; 3785 3786 if( ( iPdmInterDir & 1 ) == 1 ) 3787 { 3788 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 0 ], aiPdmRefIdx[ 0 ] ); 3789 } 3790 if( ( iPdmInterDir & 2 ) == 2 ) 3791 { 3792 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 1 ], aiPdmRefIdx[ 1 ] ); 3659 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 3660 3661 if( ( ivCandDir[0] & 1 ) == 1 ) 3662 { 3663 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] ); 3664 } 3665 if( ( ivCandDir[0] & 2 ) == 2 ) 3666 { 3667 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] ); 3793 3668 } 3794 3669 … … 3799 3674 iCount ++; 3800 3675 } 3676 3801 3677 // early termination 3802 3678 if (iCount == getSlice()->getMaxNumMergeCand()) … … 3806 3682 #endif 3807 3683 3684 #if H_3D 3685 //////////////////////////// 3686 //////// LEFT (A1) ///////// 3687 //////////////////////////// 3688 #endif 3808 3689 //left 3809 3690 UInt uiLeftPartIdx = 0; … … 3852 3733 #if H_3D_VSP 3853 3734 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1) 3854 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 3855 { 3856 #endif 3735 { 3857 3736 vspFlag[iCount] = 1; 3858 #if MTK_VSP_FIX_ALIGN_WD_E01723859 3737 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo); 3860 3738 } 3861 3739 #endif 3862 #if MTK_VSP_FIX_E01723863 vspDir[iCount] = pcCULeft->getVSPDir( uiLeftPartIdx );3864 }3865 #endif3866 #endif3867 3740 if ( mrgCandIdx == iCount ) 3868 3741 { … … 3871 3744 iCount ++; 3872 3745 } 3873 #else 3746 #else // H_3D_IV_MERGE 3874 3747 if ( mrgCandIdx == iCount ) 3875 3748 { … … 3877 3750 } 3878 3751 iCount ++; 3879 #endif 3752 #endif // H_3D_IV_MERGE 3880 3753 } 3881 3754 … … 3885 3758 return; 3886 3759 } 3760 #if H_3D 3761 //////////////////////////// 3762 //////// ABOVE (B1) //////// 3763 //////////////////////////// 3764 #endif 3887 3765 // above 3888 3766 UInt uiAbovePartIdx = 0; … … 3917 3795 puhInterDirNeighbours[iCount] = 0; 3918 3796 3919 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID );3797 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID ); 3920 3798 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 3921 3799 break; 3922 3800 } 3923 3801 } 3802 3924 3803 if(!bRemoveSpa) 3925 3804 { … … 3931 3810 #if H_3D_VSP 3932 3811 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 3933 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 3934 { 3935 #endif 3812 { 3813 3936 3814 vspFlag[iCount] = 1; 3937 #if MTK_VSP_FIX_ALIGN_WD_E01723938 3815 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo); 3939 3816 } 3940 3817 #endif 3941 #if MTK_VSP_FIX_E01723942 vspDir[iCount] = pcCUAbove->getVSPDir( uiAbovePartIdx );3943 }3944 #endif3945 #endif3946 3818 if ( mrgCandIdx == iCount ) 3947 3819 { … … 3950 3822 iCount ++; 3951 3823 } 3952 #else 3824 #else // H_3D_IV_MERGE 3953 3825 if ( mrgCandIdx == iCount ) 3954 3826 { … … 3956 3828 } 3957 3829 iCount ++; 3958 #endif 3830 #endif // H_3D_IV_MERGE 3959 3831 } 3960 3832 // early termination … … 3963 3835 return; 3964 3836 } 3837 3838 #if H_3D 3839 ////////////////////////////////// 3840 //////// ABOVE RIGHT (B0) //////// 3841 ////////////////////////////////// 3842 #endif 3965 3843 3966 3844 // above right … … 3988 3866 #if H_3D_VSP 3989 3867 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 3990 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 3991 { 3992 #endif 3868 { 3993 3869 vspFlag[iCount] = 1; 3994 #if MTK_VSP_FIX_ALIGN_WD_E01723995 3870 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo); 3996 3871 } 3997 #endif3998 #if MTK_VSP_FIX_E01723999 vspDir[iCount] = pcCUAboveRight->getVSPDir( uiAboveRightPartIdx);4000 }4001 #endif4002 3872 #endif 4003 3873 if ( mrgCandIdx == iCount ) … … 4014 3884 4015 3885 #if H_3D_IV_MERGE 4016 if( iPdmDir[1] ) 3886 ///////////////////////////////////////////// 3887 //////// INTER VIEW DISP COMP (IvDC) //////// 3888 ///////////////////////////////////////////// 3889 3890 if( ivCandDir[1] ) 4017 3891 { 4018 3892 assert(iCount < getSlice()->getMaxNumMergeCand()); 4019 3893 abCandIsInter [ iCount ] = true; 4020 puhInterDirNeighbours[ iCount ] = i PdmDir[1];4021 if( ( i PdmDir[1] & 1 ) == 1 )4022 { 4023 pcMvFieldNeighbours[ iCount<<1 ].setMvField( acPdmMv[ 2 ], aiPdmRefIdx[ 2 ] );4024 } 4025 if( ( i PdmDir[1] & 2 ) == 2 )4026 { 4027 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );3894 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; 3895 if( ( ivCandDir[1] & 1 ) == 1 ) 3896 { 3897 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] ); 3898 } 3899 if( ( ivCandDir[1] & 2 ) == 2 ) 3900 { 3901 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 4028 3902 } 4029 3903 … … 4032 3906 { 4033 3907 Int iCnloop = iPosLeftAbove[i]; 4034 if(iCnloop == -1) 3908 if ( iCnloop == -1 ) 3909 { 4035 3910 continue; 3911 } 4036 3912 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4037 3913 { … … 4051 3927 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4052 3928 #endif 4053 #if QC_INRIA_MTK_MRG_E0126 4054 iPosDmv = iCount; 4055 #endif 3929 posIvDC = iCount; 4056 3930 if ( mrgCandIdx == iCount ) 4057 3931 return; … … 4065 3939 } 4066 3940 } 4067 #endif 3941 #endif // H_3D_IV_MERGE 4068 3942 4069 3943 #if H_3D_VSP 4070 #if MTK_VSP_FIX_E0172 4071 if ( xAddVspCand( H_3D_VSP_POSITION, mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, vspDir ) ) 4072 #else 4073 if ( xAddVspCand( H_3D_VSP_POSITION, mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) ) 4074 #endif 3944 ///////////////////////////////////////////////// 3945 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// 3946 ///////////////////////////////////////////////// 3947 3948 if ( xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) ) 3949 { 4075 3950 return; 3951 } 3952 4076 3953 // early termination 4077 3954 if (iCount == getSlice()->getMaxNumMergeCand()) 3955 { 4078 3956 return; 3957 } 3958 #endif 3959 #if H_3D 3960 /////////////////////////////////// 3961 //////// LEFT BOTTOM (A0) //////// 3962 /////////////////////////////////// 4079 3963 #endif 4080 3964 … … 4103 3987 #if H_3D_VSP 4104 3988 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1) 4105 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 4106 { 4107 #endif 3989 { 4108 3990 vspFlag[iCount] = 1; 4109 #if MTK_VSP_FIX_ALIGN_WD_E01724110 3991 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo); 4111 3992 } 4112 #endif4113 #if MTK_VSP_FIX_E01724114 vspDir[iCount] = pcCULeftBottom->getVSPDir( uiLeftBottomPartIdx);4115 }4116 #endif4117 3993 #endif 4118 3994 if ( mrgCandIdx == iCount ) … … 4127 4003 return; 4128 4004 } 4005 #if H_3D 4006 /////////////////////////////////// 4007 //////// LEFT ABOVE (B2) //////// 4008 /////////////////////////////////// 4009 #endif 4010 4129 4011 // above left 4130 4012 if( iCount < 4 ) … … 4154 4036 #if H_3D_VSP 4155 4037 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1) 4156 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172 4157 { 4158 #endif 4038 { 4159 4039 vspFlag[iCount] = 1; 4160 #if MTK_VSP_FIX_ALIGN_WD_E01724161 4040 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo); 4162 4041 } 4163 #endif4164 #if MTK_VSP_FIX_E01724165 vspDir[iCount] = pcCUAboveLeft->getVSPDir( uiAboveLeftPartIdx);4166 }4167 #endif4168 4042 #endif 4169 4043 if ( mrgCandIdx == iCount ) … … 4179 4053 return; 4180 4054 } 4181 #if QC_INRIA_MTK_MRG_E0126 4055 #if H_3D_IV_MERGE 4056 //////////////////////////////////////////////////// 4057 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 4058 //////////////////////////////////////////////////// 4059 4182 4060 if( ivMvPredFlag ) 4183 4061 { 4184 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, i PdmDir, acPdmMv, aiPdmRefIdx, iPosDmv, vspFlag))4062 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag)) 4185 4063 { 4186 4064 return; … … 4192 4070 } 4193 4071 } 4072 #endif 4073 #if H_3D 4074 ///////////////////////////////// 4075 //////// Collocate (COL) //////// 4076 ///////////////////////////////// 4194 4077 #endif 4195 4078 if ( getSlice()->getEnableTMVPFlag()) … … 4311 4194 Bool bValid = true; 4312 4195 if ( vspFlag[i] == 1 || vspFlag[j] == 1 ) 4196 { 4313 4197 bValid = false; 4198 } 4314 4199 if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) ) 4200 { 4315 4201 assert(bValid == true); 4202 } 4316 4203 #endif 4317 4204 #if H_3D_VSP … … 4374 4261 numValidMergeCand = uiArrayAddr; 4375 4262 } 4376 #if MTK_VSP_FIX_ALIGN_WD_E01724263 #if H_3D_VSP 4377 4264 inline Void TComDataCU::xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo) 4378 4265 { … … 4943 4830 4944 4831 // use coldir. 4832 #if H_MV5 4833 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 4834 #else 4945 4835 #if H_MV 4946 4836 TComPic *pColPic; … … 4955 4845 #else 4956 4846 TComPic *pColPic = getSlice()->getRefPic( RefPicList(getSlice()->isInterB() ? 1-getSlice()->getColFromL0Flag() : 0), getSlice()->getColRefIdx()); 4847 #endif 4957 4848 #endif 4958 4849 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); … … 5770 5661 pDInfo->m_acNBDV = cDispVec; 5771 5662 pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; 5772 #if !MTK_DVMCP_FIX_E01725773 assert(pDInfo->m_aVIdxCan == 0); //Notes from QC: only works for CTC5774 #endif5775 5663 #if H_3D_NBDV_REF 5776 5664 TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan ); … … 5942 5830 paIDVInfo->m_acMvCand[iList][ uiMvpDvPos ] = TComMv( cMvPred.getIDVHor(), cMvPred.getIDVVer() ); 5943 5831 //Notes from QC: DvMCP is implemented in a way that doesnE½t carry the reference view identifier as NBDV. It only works for CTC and needs to be fixed to be aligned with other part of the NBDV design. 5944 #if MTK_DVMCP_FIX_E01725945 5832 paIDVInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = cMvPred.getIDVVId(); 5946 #else5947 paIDVInfo->m_aVIdxCan[iList][ uiMvpDvPos ] = 0;5948 #endif5949 5833 paIDVInfo->m_bAvailab[iList][ uiMvpDvPos ] = true; 5950 5834 paIDVInfo->m_bFound = true; … … 6011 5895 } 6012 5896 } 6013 #if MTK_VSP_FIX_ALIGN_WD_E01725897 #if H_3D_VSP 6014 5898 Void TComDataCU::setDvInfoSubParts( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPUIdx, UInt uiDepth ) 6015 5899 { … … 6150 6034 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc ) 6151 6035 { 6152 TComSlice* pcSlice = getSlice (); 6153 Int iViewIndex = pDInfo->m_aVIdxCan; 6036 TComSlice* pcSlice = getSlice (); 6037 Int iViewIndex = pDInfo->m_aVIdxCan; 6038 6154 6039 //--- get base CU/PU and check prediction mode --- 6155 6040 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex ); … … 6174 6059 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 6175 6060 6176 #if !QC_INRIA_MTK_MRG_E01266177 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) );6178 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + 2 ) >> 2 ));6179 6180 Int iBaseCUAddr;6181 Int iBaseAbsPartIdx;6182 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );6183 6184 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr );6185 #endif6186 #if QC_INRIA_MTK_MRG_E01266187 6061 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; 6188 #else6189 Bool abPdmAvailable[4] = {false, false, false, false};6190 #endif6191 6062 #if H_3D_NBDV 6192 #if QC_INRIA_MTK_MRG_E01266193 6063 for( Int i = 0; i < 8; i++) 6194 #else6195 for( Int i = 0; i < 4; i++)6196 #endif6197 6064 { 6198 6065 pacPdmMv[i].setIDVFlag (false); 6199 6066 } 6200 6067 #endif 6201 #if QC_INRIA_MTK_MRG_E0126 6202 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6203 { 6068 6069 //////////////////////////////// 6070 /////// IvMC + IvMCShift /////// 6071 //////////////////////////////// 6072 6073 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6074 { 6075 // iLoopCan == 0 --> IvMC 6076 // iLoopCan == 1 --> IvMCShift 6077 6204 6078 Int iBaseCUAddr; 6205 6079 Int iBaseAbsPartIdx; 6206 6080 6207 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4)+ 4 );6081 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 6208 6082 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 6209 6083 6210 6084 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 6211 6085 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); … … 6213 6087 6214 6088 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 6215 #endif 6216 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6217 { 6218 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6219 { 6220 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6221 6222 Bool stopLoop = false; 6223 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 6224 { 6225 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6226 TComMvField cBaseMvField; 6227 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 6228 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 6229 if (iBaseRefIdx >= 0) 6089 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6090 { 6091 // Loop reference picture list of current slice (X in spec). 6092 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6093 { 6094 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6095 6096 Bool stopLoop = false; 6097 // Loop reference picture list of candidate slice (Y in spec) 6098 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 6230 6099 { 6231 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 6232 if (iBaseRefPOC != pcSlice->getPOC()) 6100 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6101 TComMvField cBaseMvField; 6102 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 6103 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 6104 if (iBaseRefIdx >= 0) 6233 6105 { 6234 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 6106 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 6107 if (iBaseRefPOC != pcSlice->getPOC()) 6235 6108 { 6236 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))6109 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 6237 6110 { 6238 #if QC_INRIA_MTK_MRG_E0126 6111 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 6112 { 6239 6113 abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true; 6240 6114 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); … … 6243 6117 cMv.setIDVHor (cDv.getHor()); 6244 6118 cMv.setIDVVer (cDv.getVer()); 6245 #if MTK_DVMCP_FIX_E01726246 6119 cMv.setIDVVId (iViewIndex); 6247 #endif6248 6120 #endif 6249 6121 clipMv( cMv ); 6250 6122 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 6251 6123 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; 6252 #else 6253 abPdmAvailable[ uiCurrRefListId ] = true; 6254 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6255 #if H_3D_NBDV 6256 cMv.setIDVFlag (true); 6257 cMv.setIDVHor (cDv.getHor()); 6258 cMv.setIDVVer (cDv.getVer()); 6259 #if MTK_DVMCP_FIX_E0172 6260 cMv.setIDVVId (iViewIndex); 6261 #endif 6262 #endif 6263 clipMv( cMv ); 6264 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6265 pacPdmMv [ uiCurrRefListId ] = cMv; 6266 #endif 6267 stopLoop = true; 6268 break; 6124 stopLoop = true; 6125 break; 6126 } 6269 6127 } 6270 6128 } … … 6274 6132 } 6275 6133 } 6276 #if QC_INRIA_MTK_MRG_E01266277 }6278 #endif6279 #if QC_INRIA_MTK_MRG_E01266280 6134 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6281 6135 { 6282 6136 availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0); 6283 6137 } 6284 #else 6285 availableMcDc[0] = ( abPdmAvailable[0] ? 1 : 0 ) + ( abPdmAvailable[1] ? 2 : 0 ); 6286 #endif 6138 6139 6140 //////////////////////////////// 6141 /////// IvDC + IvDCShift /////// 6142 //////////////////////////////// 6143 6287 6144 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 6288 6145 { … … 6291 6148 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 6292 6149 { 6293 #if MTK_DIVMC_FIX_E01726294 6150 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 6295 #else 6296 if( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) 6297 #endif 6298 { 6299 #if QC_INRIA_MTK_MRG_E0126 6151 { 6300 6152 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6301 6153 { … … 6312 6164 } 6313 6165 break; 6314 #else 6315 abPdmAvailable[ iRefListId+2 ] = true; 6316 paiPdmRefIdx [ iRefListId+2 ] = iPdmRefIdx; 6317 6318 #if H_3D_NBDV_REF 6319 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 6320 #endif // H_3D_NBDV_REF 6321 cMv.setVer(0); 6322 clipMv( cMv ); 6323 pacPdmMv [ iRefListId + 2] = cMv; 6324 break; 6325 #endif 6326 } 6327 } 6328 } 6329 #if QC_INRIA_MTK_MRG_E0126 6166 } 6167 } 6168 } 6330 6169 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6331 6170 { 6332 6171 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 6333 6172 } 6334 #else6335 availableMcDc[1] = ( abPdmAvailable[2] ? 1 : 0 ) + ( abPdmAvailable[3] ? 2 : 0 );6336 #endif6337 6173 return false; 6338 6174 } … … 6406 6242 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 6407 6243 } 6408 #if !SEC_DMM2_E0146 6244 #if !SEC_DMM2_E0146_HHIFIX 6409 6245 Void TComDataCU::setDmm2DeltaEndSubParts( Int iDelta, UInt uiAbsPartIdx, UInt uiDepth ) 6410 6246 { -
trunk/source/Lib/TLibCommon/TComDataCU.h
r608 r622 197 197 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not 198 198 ///< 0: non-VSP; 1: VSP 199 #if MTK_VSP_FIX_E0172200 Char* m_piVSPDir; ///< 0: LIST0; 1: LIST1201 #endif202 199 #endif 203 200 #if H_3D_ARP … … 211 208 #if H_3D_DIM_DMM 212 209 UInt* m_dmmWedgeTabIdx[DMM_NUM_TYPE]; 213 #if !SEC_DMM2_E0146 210 #if !SEC_DMM2_E0146_HHIFIX 214 211 Int* m_dmm2DeltaEnd; 215 212 #endif … … 256 253 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 257 254 #if H_3D_VSP 258 #if MTK_VSP_FIX_E0172 259 Bool xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 260 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int* vspDir ); 261 #else 262 Bool xAddVspCand( UChar ucVspMergePos, Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 255 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 263 256 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ); 264 257 #endif 265 #endif 266 #if QC_INRIA_MTK_MRG_E0126 267 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iPdmDir, TComMv* acPdmMv, 268 Int* aiPdmRefIdx, Int iPosDmv, Int* vspFlag ); 269 Bool xFirstDmvAvai( Int& iCount, TComMvField* pcMvFieldNeighbours, Int* iPdmDir, Int iPosDmv, Int* vspFlag, Int& iFirDispCand ); 258 #if H_3D_IV_MERGE 259 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 260 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag ); 261 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand ); 270 262 #endif 271 263 … … 442 434 template <typename T> 443 435 Void setSubPart ( T bParameter, T* pbBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); 444 #if MTK_VSP_FIX_ALIGN_WD_E0172436 #if H_3D_VSP 445 437 template<typename T> 446 438 Void setSubPartT ( T uiParameter, T* puhBaseLCU, UInt uiCUAddr, UInt uiCUDepth, UInt uiPUIdx ); … … 471 463 #if H_3D_NBDV 472 464 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiDepth ); 473 #if MTK_VSP_FIX_ALIGN_WD_E0172474 465 Void setDvInfoSubParts ( DisInfo cDvInfo, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth); 475 #endif476 466 DisInfo* getDvInfo () { return m_pDvInfo; } 477 467 DisInfo getDvInfo (UInt uiIdx) { return m_pDvInfo[uiIdx]; } … … 555 545 Void setDmmWedgeTabIdxSubParts ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ); 556 546 557 #if !SEC_DMM2_E0146 547 #if !SEC_DMM2_E0146_HHIFIX 558 548 Int* getDmm2DeltaEnd () { return m_dmm2DeltaEnd; } 559 549 Int getDmm2DeltaEnd ( UInt uiIdx ) { return m_dmm2DeltaEnd[uiIdx]; } … … 682 672 #if H_3D_VSP 683 673 , Int* vspFlag 684 #if MTK_VSP_FIX_ALIGN_WD_E0172685 674 , InheritedVSPDisInfo* inheritedVSPDisInfo 686 675 #endif 687 #if MTK_VSP_FIX_E0172688 , Int* vspDir689 #endif690 #endif691 676 , Int& numValidMergeCand, Int mrgCandIdx = -1 ); 692 #if MTK_VSP_FIX_ALIGN_WD_E0172 693 inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo); 694 #endif 677 695 678 #if H_3D_VSP 679 inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo); 680 696 681 Char* getVSPFlag () { return m_piVSPFlag; } 697 682 Char getVSPFlag ( UInt uiIdx ) { return m_piVSPFlag[uiIdx]; } 698 683 Void setVSPFlag ( UInt uiIdx, Int n ) { m_piVSPFlag[uiIdx] = n; } 699 684 Void setVSPFlagSubParts( Char iVSPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 700 #if MTK_VSP_FIX_E0172701 Char* getVSPDir () { return m_piVSPDir; }702 Char getVSPDir ( UInt uiIdx ) { return m_piVSPDir[uiIdx]; }703 Void setVSPDir ( UInt uiIdx, Int n ) { m_piVSPDir[uiIdx] = n; }704 Void setVSPDirSubParts ( Char iVSPDir, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );705 #endif706 685 #endif 707 686 Void deriveLeftRightTopIdxGeneral ( UInt uiAbsPartIdx, UInt uiPartIdx, UInt& ruiPartIdxLT, UInt& ruiPartIdxRT ); -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r608 r622 77 77 } IDVInfo; 78 78 #endif 79 #if MTK_VSP_FIX_ALIGN_WD_E017279 #if H_3D_VSP 80 80 typedef struct _InheritedVSPDisCand 81 81 { -
trunk/source/Lib/TLibCommon/TComMv.h
r608 r622 58 58 Short m_iIDVHor; 59 59 Short m_iIDVVer; 60 #if MTK_DVMCP_FIX_E017261 60 Short m_iIDVVId; //view index of the IDV 62 #endif63 61 #endif 64 62 public: … … 75 73 , m_iIDVHor(0) 76 74 , m_iIDVVer(0) 77 #if MTK_DVMCP_FIX_E017278 75 , m_iIDVVId(0) 79 #endif80 76 #endif 81 77 { … … 89 85 , m_iIDVHor(0) 90 86 , m_iIDVVer(0) 91 #if MTK_DVMCP_FIX_E0172 92 , m_iIDVVId(0) 93 #endif 87 , m_iIDVVId(0) 94 88 #endif 95 89 { … … 106 100 #if H_3D_NBDV 107 101 m_bIDV = false; m_iIDVHor = m_iIDVVer = 0; 108 #if MTK_DVMCP_FIX_E0172109 102 m_iIDVVId = 0; 110 #endif111 103 #endif 112 104 } … … 115 107 Void setIDVVer (Short i) {m_iIDVVer = i;} 116 108 Void setIDVFlag (Bool b ) {m_bIDV = b;} 117 #if MTK_DVMCP_FIX_E0172118 109 Void setIDVVId (Short i) {m_iIDVVId = i;} 119 #endif120 110 #endif 121 111 // ------------------------------------------------------------------------------------------------------------------ … … 131 121 Short getIDVVer () const { return m_iIDVVer; } 132 122 Bool getIDVFlag() const { return m_bIDV; } 133 #if MTK_DVMCP_FIX_E0172134 123 Short getIDVVId () const { return m_iIDVVId; } 135 #endif 124 136 125 #endif 137 126 // ------------------------------------------------------------------------------------------------------------------ -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r608 r622 456 456 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 457 457 } break; 458 #if !SEC_DMM2_E0146 458 #if !SEC_DMM2_E0146_HHIFIX 459 459 case( DMM2_IDX ): 460 460 { … … 588 588 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); 589 589 #if H_3D_VSP 590 if ( 0 == pcCU->getVSPFlag(uiPartAddr))590 if ( pcCU->getVSPFlag(uiPartAddr) == 0) 591 591 { 592 592 #endif … … 622 622 { 623 623 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 624 { 624 625 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 626 } 625 627 else 628 { 626 629 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 630 } 627 631 } 628 632 #endif … … 635 639 636 640 #if H_3D_VSP 637 if ( 0 == pcCU->getVSPFlag(uiPartAddr))641 if ( pcCU->getVSPFlag(uiPartAddr) == 0 ) 638 642 { 639 643 #endif … … 669 673 { 670 674 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 675 { 671 676 xPredInterUniVSP( pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 677 } 672 678 else 679 { 673 680 xPredInterBiVSP ( pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 681 } 674 682 } 675 683 #endif … … 722 730 { 723 731 // Get depth reference 724 #if MTK_VSP_FIX_E0172 725 Int vspDir = pcCU->getVSPDir( uiPartAddr ); 726 RefPicList privateRefPicList = (vspDir == 0) ? REF_PIC_LIST_0 : REF_PIC_LIST_1; 727 Int privateRefIdx = pcCU->getCUMvField( privateRefPicList )->getRefIdx( uiPartAddr ); 728 Int depthRefViewIdx = pcCU->getSlice()->getRefPic(privateRefPicList, privateRefIdx)->getViewIndex(); 729 #else 730 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 731 #endif 732 Int depthRefViewIdx = pcCU->getDvInfo(uiPartAddr).m_aVIdxCan; 732 733 TComPic* pRefPicBaseDepth = pcCU->getSlice()->getIvPic (true, depthRefViewIdx ); 733 734 assert(pRefPicBaseDepth != NULL); … … 748 749 749 750 // Do compensation 750 #if MTK_VSP_FIX_ALIGN_WD_E0172751 751 TComMv cDv = pcCU->getDvInfo(uiPartAddr).m_acNBDV; 752 #else753 #if MTK_VSP_FIX_E0172754 TComMv cDv = pcCU->getCUMvField( privateRefPicList )->getMv( uiPartAddr );755 #else756 TComMv cDv = pcCU->getCUMvField( eRefPicList )->getMv( uiPartAddr ); // cDv is the disparity vector derived from the neighbors757 #endif758 #endif // end of MTK_VSP_FIX_ALIGN_WD_E0172759 752 pcCU->clipMv(cDv); 760 753 … … 935 928 936 929 if ( iRefIdx[iRefList] < 0 ) 930 { 937 931 continue; 932 } 938 933 assert( iRefIdx[iRefList] < pcCU->getSlice()->getNumRefIdx(eRefPicList) ); 939 934 … … 2773 2768 2774 2769 #if H_3D_DIM_DMM 2770 #if !SEC_DMM2_E0146_HHIFIX 2775 2771 UInt TComPrediction::xPredWedgeFromIntra( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd ) 2776 2772 { … … 2784 2780 { 2785 2781 UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ); 2786 #if SEC_DMM2_E01462787 if( DMM1_IDX == dimType || DMM3_IDX == dimType )2788 #else2789 2782 if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType ) 2790 #endif2791 2783 { 2792 2784 // get offset between current and reference block … … 2813 2805 { 2814 2806 UInt dimType = getDimType( pcTempCU->getLumaIntraDir( uiTempPartIdx ) ); 2815 #if SEC_DMM2_E01462816 if( DMM1_IDX == dimType || DMM3_IDX == dimType )2817 #else2818 2807 if( DMM1_IDX == dimType || DMM2_IDX == dimType || DMM3_IDX == dimType ) 2819 #endif2820 2808 { 2821 2809 // get offset between current and reference block … … 2849 2837 return 0; 2850 2838 } 2839 #endif 2851 2840 2852 2841 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx ) … … 2858 2847 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255; 2859 2848 2849 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 2850 assert( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ); 2851 return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx); 2852 #else 2860 2853 if( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 ) { return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx); } 2861 2854 else { return g_dmmWedgeNodeLists[(g_aucConvertToBit[uiWidth])].at(intraTabIdx).getPatternIdx(); } 2855 #endif 2862 2856 } 2863 2857 … … 2914 2908 } 2915 2909 2910 #if !SEC_DMM2_E0146_HHIFIX 2916 2911 Void TComPrediction::xGetBlockOffset( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY ) 2917 2912 { … … 3302 3297 } 3303 3298 #endif 3299 #endif 3304 3300 #if H_3D_DIM_RBC 3305 3301 Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Pel& rDeltaDC ) -
trunk/source/Lib/TLibCommon/TComPrediction.h
r608 r622 154 154 Void xAssignBiSegDCs ( Pel* ptrDst, UInt dstStride, Bool* biSegPattern, Int patternStride, Pel valDC1, Pel valDC2 ); 155 155 #if H_3D_DIM_DMM 156 #if !SEC_DMM2_E0146_HHIFIX 156 157 UInt xPredWedgeFromIntra ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, Int iDeltaEnd = 0 ); 158 #endif 157 159 UInt xPredWedgeFromTex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx ); 158 160 Void xPredContourFromTex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge ); … … 160 162 Void xCopyTextureLumaBlock ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight ); 161 163 164 #if !SEC_DMM2_E0146_HHIFIX 162 165 Void xGetBlockOffset ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComDataCU* pcRefCU, UInt uiRefAbsPartIdx, UInt& ruiOffsetX, UInt& ruiOffsetY ); 163 166 Bool xGetWedgeIntraDirPredData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int& riSlopeX, Int& riSlopeY, UInt& ruiStartPosX, UInt& ruiStartPosY ); 164 167 Void xGetWedgeIntraDirStartEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiBlockSize, Int iDeltaX, Int iDeltaY, UInt uiPMSPosX, UInt uiPMSPosY, UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, Int iDeltaEnd = 0 ); 165 168 UInt xGetWedgePatternIdx ( UInt uiBlockSize, UChar uhXs, UChar uhYs, UChar uhXe, UChar uhYe ); 169 #endif 166 170 #endif 167 171 #if H_3D_DIM_RBC -
trunk/source/Lib/TLibCommon/TComRdCost.cpp
r608 r622 484 484 } 485 485 486 #if SCU_HS_FAST_DEPTH_INTRA_E0238 486 #if SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 487 487 488 488 UInt TComRdCost::calcVAR (Pel* pi0, Int stride, Int width, Int height, Int cuDepth) -
trunk/source/Lib/TLibCommon/TComRdCost.h
r608 r622 235 235 UInt calcHAD(Int bitDepth, Pel* pi0, Int iStride0, Pel* pi1, Int iStride1, Int iWidth, Int iHeight ); 236 236 237 #if SCU_HS_FAST_DEPTH_INTRA_E0238 237 #if SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 238 238 UInt calcVAR(Pel* pi0, Int stride, Int width, Int height, Int cuDepth); 239 239 #endif -
trunk/source/Lib/TLibCommon/TComRom.cpp
r608 r622 347 347 { //2x2 4x4 8x8 16x16 32x32 64x64 348 348 0, 7, 10, 11, 11, 13 }; 349 #if LGE_PKU_DMM3_OVERLAP_E0159 349 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 350 350 const UChar g_dmm3IntraTabIdxBits[6] = 351 351 { //2x2 4x4 8x8 16x16 32x32 64x64 … … 380 380 Bool g_traceTU = true; 381 381 Bool g_disableHLSTrace = false; 382 UInt64 g_stopAtCounter = 10803; 382 UInt64 g_stopAtCounter = 48; 383 Bool g_traceCopyBack = false; 384 Bool g_decTraceDispDer = false; 385 Bool g_decTraceMvFromMerge = false; 383 386 #endif 384 387 #endif … … 611 614 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 612 615 616 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 617 Void initWedgeLists( Bool initNodeList ) 618 #else 613 619 Void initWedgeLists( Bool initRefinements ) 620 #endif 614 621 { 615 622 if( !g_dmmWedgeLists.empty() ) return; … … 624 631 g_dmmWedgeRefLists.push_back( acWedgeRefList ); 625 632 633 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 634 if( initNodeList ) 635 { 636 #endif 626 637 // create WedgeNodeList 627 638 std::vector<TComWedgeNode> acWedgeNodeList; … … 633 644 cWedgeNode.setPatternIdx( uiPos ); 634 645 646 #if !LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 635 647 if( initRefinements ) 636 648 { 649 #endif 637 650 UInt uiRefPos = 0; 638 651 for( Int iOffS = -1; iOffS <= 1; iOffS++ ) … … 681 694 } 682 695 } 696 #if !LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 683 697 } 698 #endif 684 699 acWedgeNodeList.push_back( cWedgeNode ); 685 700 } 686 701 } 687 702 g_dmmWedgeNodeLists.push_back( acWedgeNodeList ); 703 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 704 } 705 #endif 688 706 } 689 707 return; -
trunk/source/Lib/TLibCommon/TComRom.h
r608 r622 174 174 extern std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3; 175 175 176 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 177 Void initWedgeLists( Bool initNodeList = false ); 178 #else 176 179 Void initWedgeLists( Bool initRefinements = false ); 180 #endif 177 181 Void createWedgeList( UInt uiWidth, UInt uiHeight, std::vector<TComWedgelet> &racWedgeList, std::vector<TComWedgeRef> &racWedgeRefList, WedgeResolution eWedgeRes ); 178 182 Void addWedgeletToList( TComWedgelet cWedgelet, std::vector<TComWedgelet> &racWedgeList, std::vector<TComWedgeRef> &racWedgeRefList ); … … 194 198 195 199 #ifndef ENC_DEC_TRACE 196 # define ENC_DEC_TRACE0200 #define ENC_DEC_TRACE 0 197 201 #endif 198 202 … … 220 224 extern Bool g_tracePU; 221 225 extern Bool g_traceTU; 222 extern Bool g_disableHLSTrace; 223 extern UInt64 g_stopAtCounter; 226 extern Bool g_disableHLSTrace; // USE g_HLSTraceEnable to toggle HLS trace. Not this one! 227 extern UInt64 g_stopAtCounter; // Counter to set breakpoint. 228 extern Bool g_traceCopyBack; // Output samples on copy back 229 extern Bool g_decTraceDispDer; // Trace derived disparity vectors (decoder only) 230 extern Bool g_decTraceMvFromMerge; // Trace motion vectors obtained from merge (decoder only) 224 231 225 232 #define DTRACE_CU(x,y) writeToTraceFile( x,y, g_traceCU ); -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r608 r622 101 101 , m_enableTMVPFlag ( true ) 102 102 #if H_MV 103 #if H_MV5 104 , m_refPicSetInterLayer0 ( NULL ) 105 , m_refPicSetInterLayer1 ( NULL ) 106 #else 103 107 , m_refPicSetInterLayer ( NULL ) 108 #endif 104 109 , m_layerId (0) 105 110 , m_viewId (0) 111 #if H_MV5 112 , m_viewIndex (0) 113 #endif 106 114 #if H_3D 115 #if !H_MV5 107 116 , m_viewIndex (0) 117 #endif 108 118 , m_isDepth (false) 119 #endif 120 #if H_MV5 121 , m_pocResetFlag (false) 109 122 #endif 110 123 , m_discardableFlag (false) 111 124 , m_interLayerPredEnabledFlag (false) 112 125 , m_numInterLayerRefPicsMinus1 (0) 126 #if !H_MV5 113 127 , m_interLayerSamplePredOnlyFlag (false) 114 128 , m_altCollocatedIndicationFlag (0) 115 129 , m_collocatedRefLayerIdx (0) 130 #endif 116 131 #if H_3D_IC 117 132 , m_bApplyIC ( false ) … … 149 164 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 150 165 { 166 #if H_MV5 167 m_interLayerPredLayerIdc[ i ] = i; 168 #else 151 169 m_interLayerPredLayerIdc[ i ] = 0; 170 #endif 152 171 } 153 172 #endif … … 162 181 { 163 182 if ( m_depthToDisparityB && m_depthToDisparityB[ i ] ) 183 { 164 184 delete[] m_depthToDisparityB [ i ]; 185 } 165 186 166 187 if ( m_depthToDisparityF && m_depthToDisparityF[ i ] ) 188 { 167 189 delete[] m_depthToDisparityF [ i ]; 168 190 } 191 } 169 192 170 193 if ( m_depthToDisparityF ) 194 { 171 195 delete[] m_depthToDisparityF; 196 } 172 197 173 198 m_depthToDisparityF = NULL; … … 362 387 } 363 388 } 364 #if H_MV 365 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr) 366 #else 389 #if H_MV5 390 #if !H_MV 367 391 #if FIX1071 368 392 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) … … 370 394 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) 371 395 #endif 372 #endif373 396 { 374 397 #if FIX1071 … … 380 403 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 381 404 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 382 405 383 406 return; 384 407 } 385 386 #if !H_MV 408 387 409 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 388 410 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 389 #endif390 411 } 391 412 … … 411 432 } 412 433 } 434 435 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++) 436 { 437 if(m_pcRPS->getUsed(i)) 438 { 439 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 440 pcRefPic->setIsLongTerm(0); 441 pcRefPic->getPicYuvRec()->extendPicBorder(); 442 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic; 443 NumPocStCurr1++; 444 pcRefPic->setCheckLTMSBPresent(false); 445 } 446 } 447 448 for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--) 449 { 450 if(m_pcRPS->getUsed(i)) 451 { 452 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 453 pcRefPic->setIsLongTerm(1); 454 pcRefPic->getPicYuvRec()->extendPicBorder(); 455 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 456 NumPocLtCurr++; 457 } 458 if(pcRefPic==NULL) 459 { 460 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 461 } 462 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 463 } 464 465 // ref_pic_list_init 466 TComPic* rpsCurrList0[MAX_NUM_REF+1]; 467 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 468 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 469 470 #if FIX1071 471 if (checkNumPocTotalCurr) 472 { 473 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 474 // If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0. 475 // Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 476 if (getRapPicFlag()) 477 { 478 assert(numPocTotalCurr == 0); 479 } 480 481 if (m_eSliceType == I_SLICE) 482 { 483 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 484 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 485 486 return; 487 } 488 489 assert(numPocTotalCurr > 0); 490 491 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 492 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 493 } 494 #endif 495 496 Int cIdx = 0; 497 for ( i=0; i<NumPocStCurr0; i++, cIdx++) 498 { 499 rpsCurrList0[cIdx] = RefPicSetStCurr0[i]; 500 } 501 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 502 { 503 rpsCurrList0[cIdx] = RefPicSetStCurr1[i]; 504 } 505 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 506 { 507 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 508 } 509 assert(cIdx == numPocTotalCurr); 510 511 if (m_eSliceType==B_SLICE) 512 { 513 cIdx = 0; 514 for ( i=0; i<NumPocStCurr1; i++, cIdx++) 515 { 516 rpsCurrList1[cIdx] = RefPicSetStCurr1[i]; 517 } 518 for ( i=0; i<NumPocStCurr0; i++, cIdx++) 519 { 520 rpsCurrList1[cIdx] = RefPicSetStCurr0[i]; 521 } 522 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 523 { 524 rpsCurrList1[cIdx] = RefPicSetLtCurr[i]; 525 } 526 assert(cIdx == numPocTotalCurr); 527 } 528 529 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm)); 530 531 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[0]; rIdx ++) 532 { 533 cIdx = m_RefPicListModification.getRefPicListModificationFlagL0() ? m_RefPicListModification.getRefPicSetIdxL0(rIdx) : rIdx % numPocTotalCurr; 534 assert(cIdx >= 0 && cIdx < numPocTotalCurr); 535 m_apcRefPicList[0][rIdx] = rpsCurrList0[ cIdx ]; 536 m_bIsUsedAsLongTerm[0][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 ); 537 } 538 if ( m_eSliceType != B_SLICE ) 539 { 540 m_aiNumRefIdx[1] = 0; 541 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1])); 542 } 543 else 544 { 545 for (Int rIdx = 0; rIdx < m_aiNumRefIdx[1]; rIdx ++) 546 { 547 cIdx = m_RefPicListModification.getRefPicListModificationFlagL1() ? m_RefPicListModification.getRefPicSetIdxL1(rIdx) : rIdx % numPocTotalCurr; 548 assert(cIdx >= 0 && cIdx < numPocTotalCurr); 549 m_apcRefPicList[1][rIdx] = rpsCurrList1[ cIdx ]; 550 m_bIsUsedAsLongTerm[1][rIdx] = ( cIdx >= NumPocStCurr0 + NumPocStCurr1 ); 551 } 552 } 553 } 554 555 #else 556 Void TComSlice::getTempRefPicLists( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, 557 std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr ) 558 { 559 if (!checkNumPocTotalCurr) 560 { 561 if (m_eSliceType == I_SLICE) 562 { 563 return; 564 } 565 } 566 567 TComPic* pcRefPic= NULL; 568 TComPic* RefPicSetStCurr0[16]; 569 TComPic* RefPicSetStCurr1[16]; 570 TComPic* RefPicSetLtCurr[16]; 571 UInt NumPocStCurr0 = 0; 572 UInt NumPocStCurr1 = 0; 573 UInt NumPocLtCurr = 0; 574 Int i; 575 576 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) 577 { 578 if(m_pcRPS->getUsed(i)) 579 { 580 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 581 pcRefPic->setIsLongTerm(0); 582 pcRefPic->getPicYuvRec()->extendPicBorder(); 583 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic; 584 NumPocStCurr0++; 585 pcRefPic->setCheckLTMSBPresent(false); 586 } 587 } 588 589 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++) 590 { 591 if(m_pcRPS->getUsed(i)) 592 { 593 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 594 pcRefPic->setIsLongTerm(0); 595 pcRefPic->getPicYuvRec()->extendPicBorder(); 596 RefPicSetStCurr1[NumPocStCurr1] = pcRefPic; 597 NumPocStCurr1++; 598 pcRefPic->setCheckLTMSBPresent(false); 599 } 600 } 601 602 for(i = m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()+m_pcRPS->getNumberOfLongtermPictures()-1; i > m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures()-1 ; i--) 603 { 604 if(m_pcRPS->getUsed(i)) 605 { 606 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 607 pcRefPic->setIsLongTerm(1); 608 pcRefPic->getPicYuvRec()->extendPicBorder(); 609 RefPicSetLtCurr[NumPocLtCurr] = pcRefPic; 610 NumPocLtCurr++; 611 } 612 if(pcRefPic==NULL) 613 { 614 pcRefPic = xGetLongTermRefPic(rcListPic, m_pcRPS->getPOC(i), m_pcRPS->getCheckLTMSBPresent(i)); 615 } 616 pcRefPic->setCheckLTMSBPresent(m_pcRPS->getCheckLTMSBPresent(i)); 617 } 618 619 Int numPocInterCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 620 numPocTotalCurr = numPocInterCurr + getNumActiveRefLayerPics( ); 621 assert( numPocTotalCurr == getNumRpsCurrTempList() ); 622 623 if (checkNumPocTotalCurr) 624 { 625 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 626 // - If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0. 627 // - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 628 if ( getRapPicFlag() && m_layerId == 0 ) 629 { 630 assert(numPocTotalCurr == 0); 631 } 632 633 if (m_eSliceType == I_SLICE) 634 { 635 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 636 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 637 638 return; 639 } 640 641 assert(numPocTotalCurr > 0); 642 643 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 644 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 645 } 646 647 std::vector<TComPic*>* refPicSetInterLayer[2] = { &refPicSetInterLayer0, &refPicSetInterLayer1}; 648 Int numPocInterLayer[2] = { getNumActiveRefLayerPics0( ), getNumActiveRefLayerPics1( ) }; 649 650 TComPic** refPicSetStCurr [2] = { RefPicSetStCurr0, RefPicSetStCurr1 }; 651 Int numPocStCurr[2] = { NumPocStCurr0, NumPocStCurr1 }; 652 653 for (Int li = 0; li < ((m_eSliceType==B_SLICE) ? 2 : 1); li++) 654 { 655 rpsCurrList [li].resize(MAX_NUM_REF+1,NULL ); 656 usedAsLongTerm[li].resize(MAX_NUM_REF+1,false); 657 658 Int cIdx = 0; 659 for ( i=0; i < numPocStCurr[li]; i++, cIdx++) 660 { 661 rpsCurrList[li][cIdx] = refPicSetStCurr[li][i]; 662 usedAsLongTerm [li][cIdx] = false; 663 } 664 665 for ( i=0; i < numPocInterLayer[li]; i++, cIdx++) 666 { 667 rpsCurrList[li][cIdx] = (*refPicSetInterLayer[li])[i]; 668 usedAsLongTerm [li][cIdx] = true; 669 } 670 671 for ( i=0; i < numPocStCurr[1-li]; i++, cIdx++) 672 { 673 rpsCurrList[li][cIdx] = refPicSetStCurr[1-li][i]; 674 usedAsLongTerm [li][cIdx] = false; 675 } 676 677 for ( i=0; i<NumPocLtCurr; i++, cIdx++) 678 { 679 rpsCurrList[li][cIdx] = RefPicSetLtCurr[i]; 680 usedAsLongTerm [li][cIdx] = true; 681 } 682 683 for ( i=0; i < numPocInterLayer[1-li]; i++, cIdx++) 684 { 685 assert( cIdx < MAX_NUM_REF ); 686 rpsCurrList[li][cIdx] = (*refPicSetInterLayer[1-li])[i]; 687 usedAsLongTerm [li][cIdx] = true; 688 } 689 690 assert(cIdx == numPocTotalCurr); 691 } 692 } 693 694 Void TComSlice::setRefPicList( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr ) 695 696 { 697 if (!checkNumPocTotalCurr) 698 { 699 if (m_eSliceType == I_SLICE) 700 { 701 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 702 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 703 704 return; 705 } 706 } 707 708 ::memset(m_bIsUsedAsLongTerm, 0, sizeof(m_bIsUsedAsLongTerm)); 709 710 for (Int li = 0; li < 2; li++) 711 { 712 if ( m_eSliceType == P_SLICE && li == 1 ) 713 { 714 m_aiNumRefIdx[1] = 0; 715 ::memset( m_apcRefPicList[1], 0, sizeof(m_apcRefPicList[1])); 716 } 717 else 718 { 719 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[ li ] - 1 ); rIdx ++) 720 { 721 Bool listModified = m_RefPicListModification.getRefPicListModificationFlagL( li ); 722 Int orgIdx = listModified ? m_RefPicListModification.getRefPicSetIdxL(li, rIdx) : (rIdx % numPocTotalCurr); 723 724 assert( rpsCurrList[li][ orgIdx ] != NULL ); 725 m_apcRefPicList [li][rIdx] = rpsCurrList [li][ orgIdx ]; 726 m_bIsUsedAsLongTerm[li][rIdx] = usedAsLongTerm [li][ orgIdx ] ; 727 } 728 } 729 } 730 } 731 #endif 732 #else 733 #if H_MV 734 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr) 735 #else 736 #if FIX1071 737 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) 738 #else 739 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) 740 #endif 741 #endif 742 { 743 #if FIX1071 744 if (!checkNumPocTotalCurr) 745 #endif 746 { 747 if (m_eSliceType == I_SLICE) 748 { 749 ::memset( m_apcRefPicList, 0, sizeof (m_apcRefPicList)); 750 ::memset( m_aiNumRefIdx, 0, sizeof ( m_aiNumRefIdx )); 751 752 return; 753 } 754 755 #if !H_MV 756 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 757 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 758 #endif 759 } 760 761 TComPic* pcRefPic= NULL; 762 TComPic* RefPicSetStCurr0[16]; 763 TComPic* RefPicSetStCurr1[16]; 764 TComPic* RefPicSetLtCurr[16]; 765 UInt NumPocStCurr0 = 0; 766 UInt NumPocStCurr1 = 0; 767 UInt NumPocLtCurr = 0; 768 Int i; 769 770 for(i=0; i < m_pcRPS->getNumberOfNegativePictures(); i++) 771 { 772 if(m_pcRPS->getUsed(i)) 773 { 774 pcRefPic = xGetRefPic(rcListPic, getPOC()+m_pcRPS->getDeltaPOC(i)); 775 pcRefPic->setIsLongTerm(0); 776 pcRefPic->getPicYuvRec()->extendPicBorder(); 777 RefPicSetStCurr0[NumPocStCurr0] = pcRefPic; 778 NumPocStCurr0++; 779 pcRefPic->setCheckLTMSBPresent(false); 780 } 781 } 413 782 414 783 for(; i < m_pcRPS->getNumberOfNegativePictures()+m_pcRPS->getNumberOfPositivePictures(); i++) … … 458 827 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 459 828 #if H_MV 460 // –If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0.461 // –Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.829 // â If nuh_layer_id is equal to 0 and the current picture is a BLA picture or a CRA picture, the value of NumPocTotalCurr shall be equal to 0. 830 // â Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 462 831 if ( getRapPicFlag() && m_layerId == 0 ) 463 832 #else 464 // –If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.465 // –Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.833 // â If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0. 834 // â Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 466 835 if (getRapPicFlag()) 467 836 #endif … … 593 962 } 594 963 964 #endif 595 965 Int TComSlice::getNumRpsCurrTempList() 596 966 { … … 609 979 } 610 980 #if H_MV 981 #if !H_MV5 611 982 assert( ( numRpsCurrTempList == 0 ) || getInterRefEnabledInRPLFlag() ); 983 #endif 612 984 numRpsCurrTempList = numRpsCurrTempList + getNumActiveRefLayerPics(); 613 985 #endif … … 923 1295 #if H_MV 924 1296 // Additional slice header syntax elements 1297 #if H_MV5 1298 m_pocResetFlag = pSrc->m_pocResetFlag; 1299 #endif 925 1300 m_discardableFlag = pSrc->m_discardableFlag; 926 1301 m_interLayerPredEnabledFlag = pSrc->m_interLayerPredEnabledFlag; … … 931 1306 m_interLayerPredLayerIdc[ layer ] = pSrc->m_interLayerPredLayerIdc[ layer ]; 932 1307 } 933 1308 #if !H_MV5 934 1309 m_interLayerSamplePredOnlyFlag = pSrc->m_interLayerSamplePredOnlyFlag; 935 1310 m_altCollocatedIndicationFlag = pSrc->m_altCollocatedIndicationFlag ; … … 941 1316 m_interLayerPredLayerIdc[layer] = pSrc->m_interLayerPredLayerIdc[layer]; 942 1317 } 1318 #endif 943 1319 #endif 944 1320 #if H_3D_IC … … 1405 1781 : m_VPSId ( 0) 1406 1782 , m_uiMaxTLayers ( 1) 1783 #if H_MV5 1784 #if H_MV 1785 , m_uiMaxLayersMinus1 ( 0) 1786 #else 1407 1787 , m_uiMaxLayers ( 1) 1788 #endif 1789 #else 1790 , m_uiMaxLayers ( 1) 1791 #endif 1408 1792 , m_bTemporalIdNestingFlag (false) 1409 1793 , m_numHrdParameters ( 0) … … 1416 1800 , m_hrdOpSetIdx (NULL) 1417 1801 , m_cprmsPresentFlag (NULL) 1802 #if H_MV5 1803 #if H_MV 1804 , m_vpsVUI ( NULL ) 1805 #endif 1806 #endif 1418 1807 { 1419 1808 for( Int i = 0; i < MAX_TLAYER; i++) … … 1459 1848 1460 1849 m_avcBaseLayerFlag = false; 1850 #if H_MV5 1851 m_vpsVuiOffset = 0; 1852 #endif 1461 1853 m_splittingFlag = false; 1462 1854 1463 1855 for( Int i = 0; i < MAX_NUM_SCALABILITY_TYPES; i++ ) 1464 1856 { 1857 #if H_MV5 1858 m_scalabilityMaskFlag[i] = false; 1859 #else 1465 1860 m_scalabilityMask[i] = false; 1861 #endif 1466 1862 m_dimensionIdLen [i] = -1; 1467 1863 } … … 1489 1885 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1490 1886 m_numDirectRefLayers[i] = 0; 1887 #if H_MV5 1888 m_maxTidIlRefPicPlus1[i] = 7; 1889 m_vpsRepFormatIdx [i] = 0; 1890 m_repFormat [i] = NULL; 1891 m_viewIdVal [i] = 0; 1892 #else 1491 1893 m_maxTidIlRefPicPlus1[i] = -1; 1894 #endif 1895 1492 1896 #if H_3D 1493 1897 m_viewIndex [i] = -1; … … 1510 1914 } 1511 1915 #endif 1512 #if H_3D _TMVP1916 #if H_3D 1513 1917 m_ivMvScalingFlag = true; 1514 1918 #endif … … 1531 1935 #endif 1532 1936 } 1937 #if H_MV5 1938 m_vpsVUI = new TComVPSVUI; 1939 #endif 1533 1940 #if H_3D 1534 1941 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1556 1963 if( m_hrdOpSetIdx != NULL ) delete[] m_hrdOpSetIdx; 1557 1964 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1965 #if H_MV5 1966 #if H_MV 1967 if ( m_vpsVUI != NULL ) delete m_vpsVUI; 1968 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1969 { 1970 if (m_repFormat[ i ] != NULL ) delete m_repFormat[ i ]; 1971 #if H_3D_DIM_DLT 1972 if ( m_iDepthValue2Idx[i] != 0 ) 1973 { 1974 xFree( m_iDepthValue2Idx[i] ); 1975 m_iDepthValue2Idx[i] = 0; 1976 } 1977 1978 if ( m_iIdx2DepthValue[i] != 0 ) 1979 { 1980 xFree( m_iIdx2DepthValue[i] ); 1981 m_iIdx2DepthValue[i] = 0; 1982 } 1983 #endif 1984 } 1985 #endif 1986 #else 1558 1987 #if H_3D_DIM_DLT 1559 1988 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1572 2001 } 1573 2002 } 2003 #endif 1574 2004 #endif 1575 2005 } … … 1642 2072 Bool TComVPS::checkVPSExtensionSyntax() 1643 2073 { 2074 #if H_MV5 2075 for( Int layer = 1; layer <= getMaxLayersMinus1(); layer++ ) 2076 #else 1644 2077 for( Int layer = 1; layer < getMaxLayers(); layer++ ) 2078 #endif 1645 2079 { 1646 2080 // check layer_id_in_nuh constraint … … 1658 2092 { 1659 2093 assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES ); 2094 #if H_MV5 2095 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMaskFlag( scalType ) ); 2096 #else 1660 2097 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) ); 1661 2098 #endif 1662 2099 Int scalIdx = 0; 1663 2100 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 1664 2101 { 2102 #if H_MV5 2103 scalIdx += ( getScalabilityMaskFlag( curScalType ) ? 1 : 0 ); 2104 #else 1665 2105 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 ); 2106 #endif 2107 1666 2108 } 1667 2109 1668 2110 return scalIdx; 1669 2111 } 1670 2112 #if H_MV5 2113 Void TComVPS::setScalabilityMaskFlag( UInt val ) 2114 { 2115 for ( Int scalType = 0; scalType < MAX_NUM_SCALABILITY_TYPES; scalType++ ) 2116 { 2117 setScalabilityMaskFlag( scalType, ( val & (1 << scalType ) ) != 0 ); 2118 } 2119 } 2120 #else 1671 2121 Void TComVPS::setScalabilityMask( UInt val ) 1672 2122 { … … 1675 2125 } 1676 2126 2127 #endif 2128 2129 #if H_MV5 2130 Void TComVPS::setRefLayers() 2131 { 2132 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2133 { 2134 Int iNuhLId = getLayerIdInNuh( i ); 2135 m_numDirectRefLayers[ iNuhLId ] = 0; 2136 for( Int j = 0; j < i; j++ ) 2137 { 2138 if( getDirectDependencyFlag(i , j) ) 2139 { 2140 m_refLayerId[ iNuhLId ][m_numDirectRefLayers[ iNuhLId ]++ ] = getLayerIdInNuh( j ); 2141 } 2142 } 2143 } 2144 } 2145 2146 Int TComVPS::getRefLayerId( Int layerIdInNuh, Int idx ) 2147 { 2148 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInNuh] ); 2149 Int refLayerIdInNuh = m_refLayerId[ layerIdInNuh ][ idx ]; 2150 assert ( refLayerIdInNuh >= 0 ); 2151 return refLayerIdInNuh; 2152 } 2153 2154 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) 2155 { 2156 return getScalabilityMaskFlag( scalType ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0; 2157 } 2158 2159 #if H_3D 2160 Int TComVPS::getLayerIdInNuh( Int viewIndex, Bool depthFlag ) 2161 { 2162 Int foundLayerIdinNuh = -1; 2163 2164 for (Int layerIdInVps = 0 ; layerIdInVps <= getMaxLayersMinus1(); layerIdInVps++ ) 2165 { 2166 Int layerIdInNuh = getLayerIdInNuh( layerIdInVps ); 2167 if( ( getViewIndex( layerIdInNuh ) == viewIndex ) && ( getDepthId( layerIdInNuh ) == ( depthFlag ? 1 : 0 ) ) ) 2168 { 2169 foundLayerIdinNuh = layerIdInNuh; 2170 break; 2171 } 2172 } 2173 assert( foundLayerIdinNuh != -1 ); 2174 2175 return foundLayerIdinNuh; 2176 } 2177 #endif // H_3D 2178 #else 1677 2179 Void TComVPS::setRefLayers() 1678 2180 { … … 1793 2295 } 1794 2296 2297 #endif // H_MV5 2298 1795 2299 1796 2300 Int TComVPS::xGetDimBitOffset( Int j ) … … 1832 2336 return numLayersInIdList; 1833 2337 } 2338 #if H_MV5 2339 Int TComVPS::getNumViews() 2340 { 2341 Int numViews = 1; 2342 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2343 { 2344 Int lId = getLayerIdInNuh( i ); 2345 if ( i > 0 && ( getViewIndex( lId ) != getScalabilityId( i - 1, VIEW_ORDER_INDEX ) ) ) 2346 { 2347 numViews++; 2348 } 2349 } 2350 2351 return numViews; 2352 } 2353 2354 Bool TComVPS::getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth /*= 0 */ ) 2355 { 2356 assert( depth < 65 ); 2357 Bool dependentFlag = getDirectDependencyFlag( depLayeridInVps, refLayeridInVps ); 2358 2359 for( Int i = 0; i < depLayeridInVps && !dependentFlag; i++ ) 2360 { 2361 if ( getDirectDependencyFlag( depLayeridInVps, i ) ) 2362 { 2363 dependentFlag = getInDirectDependencyFlag( i, refLayeridInVps, depth++ ); 2364 } 2365 } 2366 return dependentFlag; 2367 } 2368 #endif 1834 2369 #endif // H_MV 1835 2370 … … 1882 2417 , m_vuiParameters () 1883 2418 #if H_MV 2419 #if H_MV5 2420 , m_pcVPS ( NULL ) 2421 , m_spsInferScalingListFlag ( false ) 2422 , m_spsScalingListRefLayerId ( 0 ) 2423 , m_updateRepFormatFlag ( true ) 2424 , m_interViewMvVertConstraintFlag (false) 2425 #else 1884 2426 , m_interViewMvVertConstraintFlag (false) 1885 2427 , m_numIlpRestrictedRefLayers ( 0 ) 2428 #endif 1886 2429 #endif 1887 2430 #if H_3D … … 1898 2441 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 1899 2442 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2443 #if !H_MV5 1900 2444 #if H_MV 1901 2445 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1905 2449 m_minHorizontalCtuOffsetPlus1 [ i ] = 0; 1906 2450 } 2451 #endif 1907 2452 #endif 1908 2453 } … … 2058 2603 , m_listsModificationPresentFlag( 0) 2059 2604 , m_numExtraSliceHeaderBits(0) 2605 #if H_MV5 2606 #if H_MV 2607 , m_ppsInferScalingListFlag(false) 2608 , m_ppsScalingListRefLayerId(0) 2609 #endif 2610 #endif 2060 2611 { 2061 2612 m_scalingList = new TComScalingList; … … 2077 2628 } 2078 2629 2630 #if H_MV5 2631 #if H_MV 2632 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) 2633 { 2634 if ( layerIdCurr > 0 ) 2635 { 2636 TComRepFormat* repFormat = vps->getRepFormat( vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ); 2637 if ( !getUpdateRepFormatFlag() ) 2638 { 2639 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 2640 //// ToDo: add when supported: 2641 // setSeperateColourPlaneFlag( repFormat->getSeparateColourPlaneVpsFlag() ) ; 2642 2643 setPicWidthInLumaSamples ( repFormat->getPicWidthVpsInLumaSamples() ); 2644 setPicHeightInLumaSamples( repFormat->getPicHeightVpsInLumaSamples() ); 2645 2646 setBitDepthY ( repFormat->getBitDepthVpsLumaMinus8() + 8 ); 2647 setQpBDOffsetY ( (Int) (6*( getBitDepthY() - 8 )) ); 2648 2649 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2650 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 2651 } 2652 else 2653 { 2654 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); 2655 //// ToDo: add when supported: 2656 // assert( getSeperateColourPlaneFlag() <= repFormat->getSeparateColourPlaneVpsFlag() ) ; 2657 2658 assert( getPicWidthInLumaSamples() <= repFormat->getPicWidthVpsInLumaSamples() ); 2659 assert( getPicHeightInLumaSamples() <= repFormat->getPicHeightVpsInLumaSamples() ); 2660 2661 assert( getBitDepthY() <= repFormat->getBitDepthVpsLumaMinus8() + 8 ); 2662 assert( getBitDepthC() <= repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2663 } 2664 } 2665 2666 // Set conformance window 2667 Int scal = TComSPS::getWinUnitX( getChromaFormatIdc() ) ; 2668 getConformanceWindow().scaleOffsets( scal ); 2669 getVuiParameters()->getDefaultDisplayWindow().scaleOffsets( scal ); 2670 } 2671 2672 Void TComSPS::inferScalingList( TComSPS* spsSrc ) 2673 { 2674 if ( getSpsInferScalingListFlag() ) 2675 { 2676 assert( spsSrc != NULL ); 2677 assert( !spsSrc->getSpsInferScalingListFlag() ); 2678 getScalingList()->inferFrom( spsSrc->getScalingList() ); 2679 } 2680 } 2681 #endif 2682 #endif 2079 2683 #if H_3D 2080 2684 Void … … 2346 2950 2347 2951 #if H_MV 2348 Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ) 2349 { 2350 refPicSetInterLayer.clear(); 2952 #if H_MV5 2953 Void TComSlice::createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ) 2954 { 2955 refPicSetInterLayer0.clear(); 2956 refPicSetInterLayer1.clear(); 2351 2957 2352 2958 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) … … 2360 2966 picRef->getSlice(0)->setReferenced( true ); 2361 2967 2968 Int viewIdCur = getVPS()->getViewId( getLayerId() ); 2969 Int viewIdZero = getVPS()->getViewId( 0 ); 2970 Int viewIdRef = getVPS()->getViewId( layerIdRef ); 2971 2972 if ( ( viewIdCur <= viewIdZero && viewIdCur <= viewIdRef ) || ( viewIdCur >= viewIdZero && viewIdCur >= viewIdRef ) ) 2973 { 2974 refPicSetInterLayer0.push_back( picRef ); 2975 } 2976 else 2977 { 2978 refPicSetInterLayer1.push_back( picRef ); 2979 } 2980 // Consider to check here: 2981 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer0 and RefPicSetInterLayer1 that is a RASL picture. " 2982 } 2983 } 2984 #else 2985 Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ) 2986 { 2987 refPicSetInterLayer.clear(); 2988 2989 for( Int i = 0; i < getNumActiveRefLayerPics(); i++ ) 2990 { 2991 Int layerIdRef = getRefPicLayerId( i ); 2992 TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 2993 assert ( picRef != 0 ); 2994 2995 picRef->getPicYuvRec()->extendPicBorder(); 2996 picRef->setIsLongTerm( true ); 2997 picRef->getSlice(0)->setReferenced( true ); 2998 2362 2999 // Consider to check here: 2363 3000 // "If the current picture is a RADL picture, there shall be no entry in the RefPicSetInterLayer that is a RASL picture. " … … 2365 3002 } 2366 3003 } 2367 3004 #endif 3005 3006 #if H_MV5 3007 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ) 3008 { 3009 // Mark as shortterm 3010 for ( Int i = 0; i < refPicSetInterLayer0.size(); i++ ) 3011 { 3012 refPicSetInterLayer0[i]->setIsLongTerm( false ); 3013 } 3014 3015 for ( Int i = 0; i < refPicSetInterLayer1.size(); i++ ) 3016 { 3017 refPicSetInterLayer1[i]->setIsLongTerm( false ); 3018 } 3019 3020 } 3021 #else 2368 3022 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer ) 2369 3023 { … … 2375 3029 } 2376 3030 3031 #endif 2377 3032 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ) 2378 3033 { … … 2380 3035 if (targetDecLayerIdSet.size() == 0 ) 2381 3036 { 3037 #if H_MV5 3038 for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ ) 3039 #else 2382 3040 for ( Int layerIdInVps = 0; layerIdInVps < vps->getMaxLayers(); layerIdInVps++ ) 3041 #endif 2383 3042 { 2384 3043 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) ); … … 2391 3050 { 2392 3051 if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId ) 3052 { 2393 3053 break; 3054 } 2394 3055 } 2395 3056 … … 2407 3068 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 2408 3069 { 3070 #if H_MV5 3071 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ ) 3072 { 3073 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) ) 3074 #else 2409 3075 Int targetDecLayerIdinVPS = vpsSlice->getLayerIdInVps( targetDecLayerIdSet[ j ] ); 2410 3076 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdinVPS ); k++ ) 3077 { 2411 3078 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdinVPS, k ) ) 3079 #endif 3080 { 2412 3081 remainingInterLayerReferencesFlag = true; 2413 3082 } 2414 3083 } 3084 } 3085 } 2415 3086 if( !remainingInterLayerReferencesFlag ) 3087 { 2416 3088 pcPic->getSlice(0)->setReferenced( false ); 2417 3089 } … … 2419 3091 } 2420 3092 } 2421 3093 } 3094 3095 #if H_MV5 3096 Void TComSlice::printRefPicList() 3097 #else 2422 3098 Void TComSlice::xPrintRefPicList() 3099 #endif 2423 3100 { 2424 3101 for ( Int li = 0; li < 2; li++) … … 2433 3110 } 2434 3111 } 3112 #if !H_MV5 2435 3113 Int TComSlice::xCeilLog2( Int val ) 2436 3114 { … … 2440 3118 return ceilLog2; 2441 3119 } 3120 #endif 2442 3121 2443 3122 Void TComSlice::markCurrPic( TComPic* currPic ) … … 2454 3133 } 2455 3134 3135 #if H_MV5 3136 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1 ) 3137 { 3138 m_refPicSetInterLayer0 = refPicSetInterLayer0; 3139 m_refPicSetInterLayer1 = refPicSetInterLayer1; 3140 } 3141 3142 TComPic* TComSlice::getPicFromRefPicSetInterLayer(Int setIdc, Int layerId ) 3143 { 3144 assert ( setIdc == 0 || setIdc == 1); 3145 std::vector<TComPic*>* refPicSetInterLayer = ( setIdc == 0 ? m_refPicSetInterLayer0 : m_refPicSetInterLayer1); 3146 assert( refPicSetInterLayer != 0 ); 3147 3148 TComPic* pcPic = NULL; 3149 for ( Int i = 0; i < (*refPicSetInterLayer).size(); i++ ) 3150 { 3151 if ((*refPicSetInterLayer)[ i ]->getLayerId() == layerId ) 3152 { 3153 pcPic = (*refPicSetInterLayer)[ i ]; 3154 } 3155 } 3156 3157 assert(pcPic != NULL); 3158 return pcPic; 3159 } 3160 #else 2456 3161 Void TComSlice::setRefPicSetInterLayer( std::vector<TComPic*>* refPicSetInterLayer ) 2457 3162 { … … 2474 3179 return pcPic; 2475 3180 } 2476 3181 #endif 2477 3182 Int TComSlice::getNumActiveRefLayerPics() 2478 3183 { 2479 3184 Int numActiveRefLayerPics; 2480 3185 3186 #if H_MV5 3187 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerId() ) == 0 ) 3188 { 3189 numActiveRefLayerPics = 0; 3190 } 3191 else if (getVPS()->getAllRefLayersActiveFlag() ) 3192 { 3193 numActiveRefLayerPics = getVPS()->getNumDirectRefLayers( getLayerId() ); 3194 } 3195 else if ( !getInterLayerPredEnabledFlag() ) 3196 { 3197 numActiveRefLayerPics = 0; 3198 } 3199 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3200 #else 2481 3201 if( getLayerId() == 0 || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 0 || !getInterLayerPredEnabledFlag() ) 2482 3202 { … … 2484 3204 } 2485 3205 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) == 1 ) 3206 #endif 2486 3207 { 2487 3208 numActiveRefLayerPics = 1; … … 2496 3217 Int TComSlice::getRefPicLayerId( Int i ) 2497 3218 { 3219 #if H_MV5 3220 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3221 #else 2498 3222 return getVPS()->getRefLayerId( getLayerIdInVps(), getInterLayerPredLayerIdc( i ) ); 2499 } 2500 3223 #endif 3224 } 3225 3226 #if !H_MV5 2501 3227 Void TComSlice::setActiveMotionPredRefLayers() 2502 3228 { … … 2527 3253 return interRefEnabledInRPLFlag; 2528 3254 } 3255 #endif 2529 3256 #if H_3D_ARP 2530 3257 Void TComSlice::setARPStepNum() … … 2804 3531 } 2805 3532 3533 #if H_MV5 3534 #if H_MV 3535 Void TComScalingList::inferFrom( TComScalingList* srcScLi ) 3536 { 3537 for(Int sizeId = 0; sizeId < SCALING_LIST_SIZE_NUM; sizeId++) 3538 { 3539 for(Int listId = 0; listId < g_scalingListNum[sizeId]; listId++) 3540 { 3541 setRefMatrixId (sizeId,listId, srcScLi->getRefMatrixId (sizeId,listId)); 3542 setScalingListDC(sizeId,listId, srcScLi->getScalingListDC(sizeId,listId)); 3543 ::memcpy(getScalingListAddress(sizeId, listId),srcScLi->getScalingListAddress(sizeId, listId),sizeof(Int)*min(MAX_MATRIX_COEF_NUM,(Int)g_scalingListSize[sizeId])); 3544 } 3545 } 3546 } 3547 #endif 3548 #endif 2806 3549 /** initialization process of quantization matrix array 2807 3550 */ … … 2893 3636 , m_ppsMap(MAX_NUM_PPS) 2894 3637 , m_activeVPSId(-1) 3638 #if H_MV5 3639 #if !H_MV 2895 3640 , m_activeSPSId(-1) 2896 3641 , m_activePPSId(-1) 2897 3642 { 3643 #else 3644 { 3645 for (Int i = 0; i < MAX_NUM_LAYERS; i++ ) 3646 { 3647 m_activeSPSId[ i ] = -1; 3648 m_activePPSId[ i ] = -1; 3649 } 3650 #endif 3651 #else 3652 , m_activeSPSId(-1) 3653 , m_activePPSId(-1) 3654 { 3655 #endif 2898 3656 } 2899 3657 … … 2905 3663 //! activate a SPS from a active parameter sets SEI message 2906 3664 //! \returns true, if activation is successful 3665 #if H_MV5 3666 #if H_MV 3667 Bool ParameterSetManager::activateSPSWithSEI(Int spsId, Int layerId ) 3668 #else 2907 3669 Bool ParameterSetManager::activateSPSWithSEI(Int spsId) 3670 #endif 3671 #else 3672 Bool ParameterSetManager::activateSPSWithSEI(Int spsId) 3673 #endif 2908 3674 { 2909 3675 TComSPS *sps = m_spsMap.getPS(spsId); … … 2914 3680 { 2915 3681 m_activeVPSId = vpsId; 3682 #if !H_MV5 2916 3683 m_activeSPSId = spsId; 3684 #else 3685 #if H_MV 3686 m_activeSPSId[ layerId ] = spsId; 3687 #else 3688 m_activeSPSId = spsId; 3689 #endif 3690 #endif 2917 3691 return true; 2918 3692 } … … 2931 3705 //! activate a PPS and depending on isIDR parameter also SPS and VPS 2932 3706 //! \returns true, if activation is successful 3707 #if H_MV5 3708 #if H_MV 3709 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP, Int layerId ) 3710 #else 3711 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP) 3712 #endif 3713 { 3714 TComPPS *pps = m_ppsMap.getPS(ppsId); 3715 if (pps) 3716 { 3717 Int spsId = pps->getSPSId(); 3718 #if H_MV 3719 if (!isIRAP && (spsId != m_activeSPSId[ layerId ])) 3720 #else 3721 if (!isIRAP && (spsId != m_activeSPSId)) 3722 #endif 3723 { 3724 printf("Warning: tried to activate PPS referring to a inactive SPS at non-IRAP."); 3725 return false; 3726 } 3727 3728 TComSPS *sps = m_spsMap.getPS(spsId); 3729 if (sps) 3730 { 3731 Int vpsId = sps->getVPSId(); 3732 if (!isIRAP && (vpsId != m_activeVPSId)) 3733 { 3734 printf("Warning: tried to activate PPS referring to a inactive VPS at non-IRAP."); 3735 return false; 3736 } 3737 if (m_vpsMap.getPS(vpsId)) 3738 { 3739 #if H_MV 3740 m_activePPSId[ layerId ] = ppsId; 3741 m_activeVPSId = vpsId; 3742 m_activeSPSId[ layerId ] = spsId; 3743 #else 3744 m_activePPSId = ppsId; 3745 m_activeVPSId = vpsId; 3746 m_activeSPSId = spsId; 3747 #endif 3748 #else 2933 3749 Bool ParameterSetManager::activatePPS(Int ppsId, Bool isIRAP) 2934 3750 { … … 2960 3776 m_activeVPSId = vpsId; 2961 3777 m_activeSPSId = spsId; 3778 #endif 2962 3779 return true; 2963 3780 } … … 3009 3826 } 3010 3827 #endif 3011 #if SIGNAL_BITRATE_PICRATE_IN_VPS3012 TComBitRatePicRateInfo::TComBitRatePicRateInfo()3013 {3014 ::memset(m_bitRateInfoPresentFlag, 0, sizeof(m_bitRateInfoPresentFlag));3015 ::memset(m_picRateInfoPresentFlag, 0, sizeof(m_picRateInfoPresentFlag));3016 ::memset(m_avgBitRate, 0, sizeof(m_avgBitRate));3017 ::memset(m_maxBitRate, 0, sizeof(m_maxBitRate));3018 ::memset(m_constantPicRateIdc, 0, sizeof(m_constantPicRateIdc));3019 ::memset(m_avgPicRate, 0, sizeof(m_avgPicRate));3020 }3021 #endif3022 3828 //! \} 3829 3830 #if H_MV5 3831 #if H_MV 3832 TComVPSVUI::TComVPSVUI() 3833 { 3834 m_bitRatePresentVpsFlag = false; 3835 m_picRatePresentVpsFlag = false; 3836 for ( Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++) 3837 { 3838 for ( Int j = 0; j < MAX_TLAYER; j++) 3839 { 3840 m_bitRatePresentFlag [i][j] = false; 3841 m_picRatePresentFlag [i][j] = false; 3842 m_avgBitRate [i][j] = -1; 3843 m_maxBitRate [i][j] = -1; 3844 m_constantPicRateIdc [i][j] = -1; 3845 m_avgPicRate [i][j] = -1; 3846 } 3847 } 3848 3849 m_ilpRestrictedRefLayersFlag = false; 3850 3851 for ( Int i = 0; i < MAX_NUM_LAYERS; i++) 3852 { 3853 for ( Int j = 0; j < MAX_NUM_LAYERS; j++) 3854 { 3855 m_tileBoundariesAlignedFlag [i][j] = false; 3856 m_minSpatialSegmentOffsetPlus1[i][j] = 0; 3857 m_ctuBasedOffsetEnabledFlag [i][j] = false; 3858 m_minHorizontalCtuOffsetPlus1 [i][j] = -1; 3859 } 3860 } 3861 } 3862 #endif 3863 #endif -
trunk/source/Lib/TLibCommon/TComSlice.h
r608 r622 169 169 Void processRefMatrix (UInt sizeId, UInt listId , UInt refListId ); 170 170 Bool xParseScalingList (Char* pchFile); 171 #if H_MV5 172 #if H_MV 173 Void inferFrom ( TComScalingList* srcScLi ); 174 #endif 175 #endif 171 176 172 177 private: … … 402 407 }; 403 408 409 #if H_MV5 410 #if H_MV 411 class TComVPSVUI 412 { 413 private: 414 Bool m_bitRatePresentVpsFlag; 415 Bool m_picRatePresentVpsFlag; 416 Bool m_bitRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 417 Bool m_picRatePresentFlag [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 418 Int m_avgBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 419 Int m_maxBitRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 420 Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 421 Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 422 Bool m_tileBoundariesAlignedFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 423 Bool m_ilpRestrictedRefLayersFlag; 424 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 425 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 426 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 427 428 public: 429 TComVPSVUI();; 430 431 Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } 432 Bool getBitRatePresentVpsFlag( ) { return m_bitRatePresentVpsFlag; } 433 434 Void setPicRatePresentVpsFlag( Bool flag ) { m_picRatePresentVpsFlag = flag; } 435 Bool getPicRatePresentVpsFlag( ) { return m_picRatePresentVpsFlag; } 436 437 Void setBitRatePresentFlag( Int i, Int j, Bool flag ) { m_bitRatePresentFlag[i][j] = flag; } 438 Bool getBitRatePresentFlag( Int i, Int j ) { return m_bitRatePresentFlag[i][j]; } 439 440 Void setPicRatePresentFlag( Int i, Int j, Bool flag ) { m_picRatePresentFlag[i][j] = flag; } 441 Bool getPicRatePresentFlag( Int i, Int j ) { return m_picRatePresentFlag[i][j]; } 442 443 Void setAvgBitRate( Int i, Int j, Int val ) { m_avgBitRate[i][j] = val; } 444 Int getAvgBitRate( Int i, Int j ) { return m_avgBitRate[i][j]; } 445 446 Void setMaxBitRate( Int i, Int j, Int val ) { m_maxBitRate[i][j] = val; } 447 Int getMaxBitRate( Int i, Int j ) { return m_maxBitRate[i][j]; } 448 449 Void setConstantPicRateIdc( Int i, Int j, Int val ) { m_constantPicRateIdc[i][j] = val; } 450 Int getConstantPicRateIdc( Int i, Int j ) { return m_constantPicRateIdc[i][j]; } 451 452 Void setAvgPicRate( Int i, Int j, Int val ) { m_avgPicRate[i][j] = val; } 453 Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 454 455 Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } 456 Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; } 457 458 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } 459 Bool getIlpRestrictedRefLayersFlag( ) { return m_ilpRestrictedRefLayersFlag; } 460 461 Void setMinSpatialSegmentOffsetPlus1( Int i, Int j, Int val ) { m_minSpatialSegmentOffsetPlus1[i][j] = val; } 462 Int getMinSpatialSegmentOffsetPlus1( Int i, Int j ) { return m_minSpatialSegmentOffsetPlus1[i][j]; } 463 464 Void setCtuBasedOffsetEnabledFlag( Int i, Int j, Bool flag ) { m_ctuBasedOffsetEnabledFlag[i][j] = flag; } 465 Bool getCtuBasedOffsetEnabledFlag( Int i, Int j ) { return m_ctuBasedOffsetEnabledFlag[i][j]; } 466 467 Void setMinHorizontalCtuOffsetPlus1( Int i, Int j, Int val ) { m_minHorizontalCtuOffsetPlus1[i][j] = val; } 468 Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 469 470 }; 471 472 class TComRepFormat 473 { 474 private: 475 Int m_chromaFormatVpsIdc; 476 Bool m_separateColourPlaneVpsFlag; 477 Int m_picWidthVpsInLumaSamples; 478 Int m_picHeightVpsInLumaSamples; 479 Int m_bitDepthVpsLumaMinus8; 480 Int m_bitDepthVpsChromaMinus8; 481 482 public: 483 TComRepFormat() { }; 484 485 Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } 486 Int getChromaFormatVpsIdc( ) { return m_chromaFormatVpsIdc; } 487 488 Void setSeparateColourPlaneVpsFlag( Bool flag ) { m_separateColourPlaneVpsFlag = flag; } 489 Bool getSeparateColourPlaneVpsFlag( ) { return m_separateColourPlaneVpsFlag; } 490 491 Void setPicWidthVpsInLumaSamples( Int val ) { m_picWidthVpsInLumaSamples = val; } 492 Int getPicWidthVpsInLumaSamples( ) { return m_picWidthVpsInLumaSamples; } 493 494 Void setPicHeightVpsInLumaSamples( Int val ) { m_picHeightVpsInLumaSamples = val; } 495 Int getPicHeightVpsInLumaSamples( ) { return m_picHeightVpsInLumaSamples; } 496 497 Void setBitDepthVpsLumaMinus8( Int val ) { m_bitDepthVpsLumaMinus8 = val; } 498 Int getBitDepthVpsLumaMinus8( ) { return m_bitDepthVpsLumaMinus8; } 499 500 Void setBitDepthVpsChromaMinus8( Int val ) { m_bitDepthVpsChromaMinus8 = val; } 501 Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } 502 }; 503 #endif 504 #endif 505 404 506 class TComVPS 405 507 { … … 407 509 Int m_VPSId; 408 510 UInt m_uiMaxTLayers; 511 512 #if H_MV5 513 #if H_MV 514 UInt m_uiMaxLayersMinus1; 515 #else 409 516 UInt m_uiMaxLayers; 517 #endif 518 #else 519 UInt m_uiMaxLayers; 520 #endif 410 521 Bool m_bTemporalIdNestingFlag; 411 522 … … 440 551 /// VPS EXTENSION SYNTAX ELEMENTS 441 552 Bool m_avcBaseLayerFlag; 553 #if H_MV5 554 Int m_vpsVuiOffset; 555 #endif 442 556 Bool m_splittingFlag; 557 #if H_MV5 558 Bool m_scalabilityMaskFlag [MAX_NUM_SCALABILITY_TYPES]; 559 #else 443 560 Bool m_scalabilityMask [MAX_NUM_SCALABILITY_TYPES]; 561 #endif 444 562 Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; 445 563 Bool m_vpsNuhLayerIdPresentFlag; 446 564 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 447 565 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 566 #if H_MV5 567 Int m_viewIdLenMinus1; 568 Int m_viewIdVal [MAX_NUM_LAYERS]; 569 #endif 448 570 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 571 #if H_MV5 572 Bool m_maxTidRefPresentFlag; 573 #endif 449 574 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS]; 575 #if H_MV5 576 Bool m_allRefLayersActiveFlag; 577 #endif 450 578 Int m_vpsNumberLayerSetsMinus1; 451 579 Int m_vpsNumProfileTierLevelMinus1; … … 458 586 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 459 587 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 588 #if H_MV5 589 Bool m_repFormatIdxPresentFlag; 590 Int m_vpsNumRepFormatsMinus1; 591 Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; 592 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 593 #endif 460 594 Bool m_maxOneActiveRefLayerFlag; 595 #if H_MV5 596 Bool m_crossLayerIrapAlignedFlag; 597 #endif 461 598 Int m_directDepTypeLenMinus2; 599 #if H_MV5 600 Bool m_vpsVuiPresentFlag; 601 TComVPSVUI* m_vpsVUI; 602 #endif 462 603 Int m_directDependencyType [MAX_NUM_LAYERS] [MAX_NUM_LAYERS]; 463 604 … … 475 616 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 476 617 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 618 #if H_MV5 619 Int m_viewIndex [MAX_NUM_LAYERS ]; 620 #else 477 621 #if H_3D 478 622 Int m_viewIndex [MAX_NUM_LAYERS ]; … … 480 624 481 625 Int xCeilLog2 ( Int val ); 626 #endif 482 627 Int xGetDimBitOffset( Int j ); 483 628 629 // VPS EXTENSION 2 SYNTAX ELEMENTS 484 630 #if H_3D_ARP 485 631 UInt m_uiUseAdvResPred [MAX_NUM_LAYERS ]; … … 504 650 Int* m_iIdx2DepthValue [MAX_NUM_LAYERS ]; 505 651 #endif 506 #if H_3D _TMVP652 #if H_3D 507 653 Bool m_ivMvScalingFlag; 508 654 #endif … … 535 681 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 536 682 683 #if H_MV5 684 #if H_MV 685 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; 686 Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } 687 #else 537 688 UInt getMaxLayers () { return m_uiMaxLayers; } 538 689 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } 690 #endif 691 #else 692 UInt getMaxLayers () { return m_uiMaxLayers; } 693 Void setMaxLayers (UInt l) { m_uiMaxLayers = l; } 694 #endif 539 695 540 696 Bool getTemporalNestingFlag () { return m_bTemporalIdNestingFlag; } … … 579 735 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 580 736 737 #if H_MV5 738 Void setVpsVuiOffset( Int val ) { m_vpsVuiOffset = val; } 739 Int getVpsVuiOffset( ) { return m_vpsVuiOffset; } 740 #endif 741 581 742 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 582 743 Bool getSplittingFlag() { return m_splittingFlag; } 583 744 745 #if H_MV5 746 Void setScalabilityMaskFlag( UInt val ); 747 Void setScalabilityMaskFlag( Int scalType, Bool val ) { m_scalabilityMaskFlag[scalType] = val; } 748 Bool getScalabilityMaskFlag( Int scalType ) { return m_scalabilityMaskFlag[scalType]; } 749 #else 584 750 Void setScalabilityMask( UInt val ); 585 751 586 752 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; } 587 753 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; } 588 754 #endif 589 755 Int getNumScalabilityTypes( ); 590 756 … … 603 769 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 604 770 771 #if H_MV5 772 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; } 773 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; } 774 775 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } 776 Int getViewIdVal( Int viewOrderIndex ) { return m_viewIdVal[viewOrderIndex]; } 777 #endif 605 778 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 606 779 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 607 780 781 #if H_MV5 782 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 783 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 784 #endif 608 785 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; } 609 786 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; } 610 787 #if H_MV5 788 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 789 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } 790 #endif 611 791 Void setVpsNumberLayerSetsMinus1( Int val ) { m_vpsNumberLayerSetsMinus1 = val; } 612 792 Int getVpsNumberLayerSetsMinus1( ) { return m_vpsNumberLayerSetsMinus1; } … … 639 819 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 640 820 821 #if H_MV5 822 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } 823 Bool getRepFormatIdxPresentFlag( ) { return m_repFormatIdxPresentFlag; } 824 825 Void setVpsNumRepFormatsMinus1( Int val ) { m_vpsNumRepFormatsMinus1 = val; } 826 Int getVpsNumRepFormatsMinus1( ) { return m_vpsNumRepFormatsMinus1; } 827 828 Void setVpsRepFormatIdx( Int i, Int val ) { m_vpsRepFormatIdx[i] = val; } 829 Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } 830 831 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } 832 TComRepFormat* getRepFormat( Int i ) { return m_repFormat[i]; } 833 #endif 641 834 Void setMaxOneActiveRefLayerFlag( Bool flag) { m_maxOneActiveRefLayerFlag = flag; } 642 835 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 643 836 #if H_MV5 837 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } 838 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 839 #endif 644 840 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 645 841 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } … … 647 843 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 648 844 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } 649 650 845 #if H_MV5 846 Void setVpsVuiPresentFlag( Bool flag ) { m_vpsVuiPresentFlag = flag; } 847 Bool getVpsVuiPresentFlag( ) { return m_vpsVuiPresentFlag; } 848 849 TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } 850 #endif 651 851 // VPS EXTENSION SEMANTICS VARIABLES 652 852 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } … … 654 854 655 855 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 856 #if H_MV5 857 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; } 858 #else 656 859 Int getViewId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, VIEW_ID ); } 657 860 861 #endif 658 862 Void setRefLayers(); 659 863 864 #if H_MV5 865 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 866 Int getNumViews(); 867 868 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 869 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 870 #else 660 871 Int getNumDirectRefLayers( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; }; 661 872 Int getRefLayerId ( Int layerIdInVps, Int idx );; … … 668 879 Bool getMotionPredEnabledFlag ( Int layerIdInVps, Int idx ) { return m_motionPredEnabledFlag [layerIdInVps][idx]; } 669 880 Int getMotionPredRefLayerId ( Int layerIdInVps, Int idx ) { return m_motionPredRefLayerId [layerIdInVps][idx]; } 670 881 #endif 671 882 Bool checkVPSExtensionSyntax(); 672 883 Int scalTypeToScalIdx ( ScalabilityType scalType ); 673 884 885 #if H_MV5 886 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 887 #else 674 888 Int getProfileLevelTierIdxLen() { return xCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 889 #endif 890 675 891 Int getNumLayersInIdList ( Int lsIdx );; 676 892 … … 679 895 Int inferLastDimsionIdLenMinus1(); 680 896 897 #if H_MV5 898 // helpers 899 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 900 #endif 901 /// VPS EXTENSION 2 SYNTAX ELEMENTS 681 902 #if H_3D 903 #if H_MV5 904 Int getDepthId ( Int layerIdInNuh) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPTH_ID ); } 905 #else 682 906 Void initViewIndex(); 683 907 Int getViewIndex ( Int layerIdInVps ) { return m_viewIndex[ layerIdInVps ]; } 684 908 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); } 909 #endif 685 910 Int getLayerIdInNuh( Int viewIndex, Bool depthFlag ); 686 911 … … 716 941 #endif 717 942 718 #if H_3D_TMVP719 943 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } 720 944 Void setIvMvScalingFlag ( Bool b ) { m_ivMvScalingFlag = b; } 721 #endif722 945 #if LGE_INTER_SDC_E0156 723 946 Bool getInterSDCFlag ( Int layerIdInVps ) { return m_bInterSDCFlag[layerIdInVps]; } … … 737 960 Int m_winTopOffset; 738 961 Int m_winBottomOffset; 962 #if H_MV5 963 #if H_MV 964 Bool m_scaledFlag; 965 #endif 966 #endif 739 967 public: 740 968 Window() … … 744 972 , m_winTopOffset (0) 745 973 , m_winBottomOffset (0) 974 #if H_MV5 975 #if H_MV 976 , m_scaledFlag(true) 977 #endif 978 #endif 746 979 { } 747 980 … … 757 990 Void setWindowBottomOffset(Int val) { m_winBottomOffset = val; m_enabledFlag = true; } 758 991 992 #if H_MV5 993 #if H_MV 994 Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } 995 Bool getScaledFlag() const { return m_scaledFlag; } 996 Void scaleOffsets( Int scal ) 997 { 998 if (! m_scaledFlag ) 999 { 1000 m_scaledFlag = true; 1001 m_winLeftOffset *= scal; 1002 m_winRightOffset *= scal; 1003 m_winTopOffset *= scal; 1004 m_winBottomOffset *= scal; 1005 } 1006 } 1007 #endif 1008 #endif 759 1009 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) 760 1010 { … … 804 1054 TComHRD m_hrdParameters; 805 1055 TimingInfo m_timingInfo; 1056 #if !H_MV5 806 1057 #if H_MV 807 1058 Bool m_tileBoundariesAlignedFlag; 1059 #endif 808 1060 #endif 809 1061 … … 839 1091 ,m_log2MaxMvLengthHorizontal(15) 840 1092 ,m_log2MaxMvLengthVertical(15) 1093 #if !H_MV5 841 1094 #if H_MV 842 1095 ,m_tileBoundariesAlignedFlag(true) 1096 #endif 843 1097 #endif 844 1098 {} … … 937 1191 TComHRD* getHrdParameters () { return &m_hrdParameters; } 938 1192 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1193 #if !H_MV5 939 1194 #if H_MV 940 1195 Bool getTileBoundariesAlignedFlag( ) { return m_tileBoundariesAlignedFlag; } 941 1196 Void setTileBoundariesAlignedFlag( Bool flag ) { m_tileBoundariesAlignedFlag = flag; } 942 1197 #endif 1198 #endif 1199 943 1200 }; 944 1201 … … 1024 1281 TComPTL m_pcPTL; 1025 1282 #if H_MV 1283 #if H_MV5 1284 TComVPS* m_pcVPS; 1285 // SPS 1286 Bool m_spsInferScalingListFlag; 1287 Int m_spsScalingListRefLayerId; 1288 Bool m_updateRepFormatFlag; 1289 #endif 1290 // SPS Extension 1026 1291 Bool m_interViewMvVertConstraintFlag; 1292 #if !H_MV5 1027 1293 Int m_numIlpRestrictedRefLayers ; 1028 1294 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS]; 1029 1295 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS]; 1030 1296 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS]; 1297 #endif 1031 1298 #endif 1032 1299 #if H_3D … … 1165 1432 TComPTL* getPTL() { return &m_pcPTL; } 1166 1433 #if H_MV 1434 #if H_MV5 1435 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1436 TComVPS* getVPS () { return m_pcVPS; } 1437 1438 Void setSpsInferScalingListFlag( Bool flag ) { m_spsInferScalingListFlag = flag; } 1439 Bool getSpsInferScalingListFlag( ) { return m_spsInferScalingListFlag; } 1440 1441 Void setSpsScalingListRefLayerId( Int val ) { m_spsScalingListRefLayerId = val; } 1442 Int getSpsScalingListRefLayerId( ) { return m_spsScalingListRefLayerId; } 1443 1444 Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } 1445 Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } 1446 #endif 1447 // SPS Extension 1167 1448 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1168 1449 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1169 1170 //// sps_extension_vui_parameters( ) 1450 #if H_MV5 1451 // Inference 1452 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1453 1454 Void inferScalingList( TComSPS* spsSrc ); 1455 #else 1171 1456 Void setNumIlpRestrictedRefLayers ( Int val ) { m_numIlpRestrictedRefLayers = val;} 1172 1457 Int getNumIlpRestrictedRefLayers ( ) { return m_numIlpRestrictedRefLayers ;} … … 1180 1465 Void setMinHorizontalCtuOffsetPlus1 ( Int i, Int val ) { m_minHorizontalCtuOffsetPlus1 [ i ] = val;} 1181 1466 Int getMinHorizontalCtuOffsetPlus1 ( Int i ) { return m_minHorizontalCtuOffsetPlus1 [ i ];} 1467 1468 #endif 1182 1469 #endif 1183 1470 #if H_3D_QTLPC … … 1295 1582 Int m_numExtraSliceHeaderBits; 1296 1583 1584 #if H_MV5 1585 #if H_MV 1586 Int m_layerId; 1587 Bool m_ppsInferScalingListFlag; 1588 Int m_ppsScalingListRefLayerId; 1589 #endif 1590 #endif 1297 1591 public: 1298 1592 TComPPS(); … … 1416 1710 Bool getSliceHeaderExtensionPresentFlag () { return m_sliceHeaderExtensionPresentFlag; } 1417 1711 Void setSliceHeaderExtensionPresentFlag (Bool val) { m_sliceHeaderExtensionPresentFlag = val; } 1712 #if H_MV5 1713 #if H_MV 1714 Void setLayerId( Int val ) { m_layerId = val; } 1715 Int getLayerId( ) { return m_layerId; } 1716 1717 Void setPpsInferScalingListFlag( Bool flag ) { m_ppsInferScalingListFlag = flag; } 1718 Bool getPpsInferScalingListFlag( ) { return m_ppsInferScalingListFlag; } 1719 1720 Void setPpsScalingListRefLayerId( Int val ) { m_ppsScalingListRefLayerId = val; } 1721 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 1722 #endif 1723 #endif 1418 1724 }; 1419 1725 … … 1448 1754 Bool m_PicOutputFlag; ///< pic_output_flag 1449 1755 Int m_iPOC; 1756 #if H_MV5 1757 #if H_MV 1758 Int m_iPOCBeforeReset; 1759 #endif 1760 #endif 1450 1761 Int m_iLastIDR; 1451 1762 static Int m_prevPOC; … … 1542 1853 Bool m_enableTMVPFlag; 1543 1854 #if H_MV 1855 #if H_MV5 1856 std::vector<TComPic*>* m_refPicSetInterLayer0; 1857 std::vector<TComPic*>* m_refPicSetInterLayer1; 1858 Int m_layerId; 1859 Int m_viewId; 1860 Int m_viewIndex; 1861 #if H_3D 1862 Bool m_isDepth; 1863 #endif 1864 #else 1544 1865 std::vector<TComPic*>* m_refPicSetInterLayer; 1545 1866 Int m_layerId; … … 1549 1870 Bool m_isDepth; 1550 1871 #endif 1872 #endif 1551 1873 1552 1874 // Additional slice header syntax elements 1875 #if H_MV5 1876 Bool m_pocResetFlag; 1877 #endif 1553 1878 Bool m_discardableFlag; 1554 1879 Bool m_interLayerPredEnabledFlag; 1555 1880 Int m_numInterLayerRefPicsMinus1; 1556 1881 Int m_interLayerPredLayerIdc [MAX_NUM_LAYERS]; 1882 #if !H_MV5 1557 1883 Bool m_interLayerSamplePredOnlyFlag; 1558 1884 Bool m_altCollocatedIndicationFlag; … … 1562 1888 Int m_activeMotionPredRefLayerId [ MAX_NUM_LAYER_IDS ]; 1563 1889 1890 #endif 1564 1891 Int m_aaiCodedScale [2][MAX_NUM_LAYERS]; 1565 1892 Int m_aaiCodedOffset[2][MAX_NUM_LAYERS]; … … 1640 1967 TComPic* getIvPic ( Bool depthFlag, Int viewIndex){ return m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; } 1641 1968 #endif 1642 #if H_3D _IV_MERGE1969 #if H_3D 1643 1970 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 1644 1971 #endif … … 1695 2022 1696 2023 #if H_MV 2024 #if H_MV5 2025 Void setPocBeforeReset ( Int i ) { m_iPOCBeforeReset = i; } 2026 Int getPocBeforeReset ( ) { return m_iPOCBeforeReset; } 2027 #endif 1697 2028 Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } 1698 2029 Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } 1699 #endif 1700 #if H_MV 2030 #if H_MV5 2031 Void getTempRefPicLists ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1, 2032 std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int& numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2033 2034 Void setRefPicList ( std::vector<TComPic*> rpsCurrList[2], std::vector<Bool> usedAsLongTerm[2], Int numPocTotalCurr, Bool checkNumPocTotalCurr = false ); 2035 #else 1701 2036 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false ); 2037 #endif 1702 2038 #else 1703 2039 #if FIX1071 … … 1748 2084 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 1749 2085 #if H_MV 2086 #if !H_MV5 1750 2087 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ); 1751 2088 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer ); 2089 #else 2090 Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); 2091 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2092 #endif 1752 2093 static Void markCurrPic ( TComPic* currPic );; 1753 2094 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 2095 #if H_MV5 2096 Void printRefPicList(); 2097 #else 1754 2098 Void xPrintRefPicList(); 2099 #endif 1755 2100 #endif 1756 2101 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); … … 1839 2184 Void setViewId ( Int viewId ) { m_viewId = viewId; } 1840 2185 Int getViewId () { return m_viewId; } 2186 #if H_MV5 2187 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 2188 Int getViewIndex () { return m_viewIndex; } 2189 #endif 1841 2190 #if H_3D 1842 2191 #if H_3D_TMVP … … 1845 2194 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 1846 2195 #endif 2196 #if !H_MV5 1847 2197 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 1848 2198 Int getViewIndex () { return m_viewIndex; } 2199 #endif 1849 2200 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 1850 2201 Bool getIsDepth () { return m_isDepth; } … … 1867 2218 #if H_MV 1868 2219 // Additional slice header syntax elements 2220 2221 #if H_MV5 2222 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2223 Bool getPocResetFlag( ) { return m_pocResetFlag; } 2224 #endif 2225 1869 2226 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } 1870 2227 Bool getDiscardableFlag( ) { return m_discardableFlag; } … … 1879 2236 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 1880 2237 2238 #if H_MV5 2239 // Additional variables derived in slice header semantics 2240 Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } 2241 Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } 2242 2243 Int getNumActiveRefLayerPics( ); 2244 2245 Int getNumActiveRefLayerPics0( ) { return (Int) m_refPicSetInterLayer0->size(); }; 2246 Int getNumActiveRefLayerPics1( ) { return (Int) m_refPicSetInterLayer1->size(); }; 2247 2248 Int getRefPicLayerId ( Int i ); 2249 2250 Void setRefPicSetInterLayer ( std::vector<TComPic*>* refPicSetInterLayer0, std::vector<TComPic*>* refPicSetInterLayer1); 2251 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2252 #else 1881 2253 Void setInterLayerSamplePredOnlyFlag( Bool flag ) { m_interLayerSamplePredOnlyFlag = flag; } 1882 2254 Bool getInterLayerSamplePredOnlyFlag( ) { return m_interLayerSamplePredOnlyFlag; } … … 1905 2277 TComPic* getPicFromRefPicSetInterLayer( Int layerId ); 1906 2278 2279 #endif 1907 2280 #endif 1908 2281 protected: … … 1911 2284 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 1912 2285 #if H_MV 2286 #if !H_MV5 1913 2287 Int xCeilLog2( Int val ); 2288 #endif 1914 2289 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 1915 2290 #endif … … 1993 2368 //! activate a SPS from a active parameter sets SEI message 1994 2369 //! \returns true, if activation is successful 2370 #if !H_MV5 1995 2371 Bool activateSPSWithSEI(Int SPSId); 1996 2372 … … 2012 2388 Int m_activeSPSId; 2013 2389 Int m_activePPSId; 2390 #else 2391 #if H_MV 2392 Bool activateSPSWithSEI(Int SPSId, Int layerId ); 2393 #else 2394 Bool activateSPSWithSEI(Int SPSId); 2395 #endif 2396 2397 //! activate a PPS and depending on isIDR parameter also SPS and VPS 2398 //! \returns true, if activation is successful 2399 #if H_MV 2400 Bool activatePPS(Int ppsId, Bool isIRAP, Int layerId ); 2401 #else 2402 Bool activatePPS(Int ppsId, Bool isIRAP); 2403 #endif 2404 2405 TComVPS* getActiveVPS(){ return m_vpsMap.getPS(m_activeVPSId); }; 2406 #if H_MV 2407 TComSPS* getActiveSPS( Int layerId ){ return m_spsMap.getPS( m_activeSPSId[ layerId ] ); }; 2408 TComPPS* getActivePPS( Int layerId ){ return m_ppsMap.getPS( m_activePPSId[ layerId ] ); }; 2409 #else 2410 TComSPS* getActiveSPS(){ return m_spsMap.getPS(m_activeSPSId); }; 2411 TComPPS* getActivePPS(){ return m_ppsMap.getPS(m_activePPSId); }; 2412 #endif 2413 protected: 2414 2415 ParameterSetMap<TComVPS> m_vpsMap; 2416 ParameterSetMap<TComSPS> m_spsMap; 2417 ParameterSetMap<TComPPS> m_ppsMap; 2418 2419 Int m_activeVPSId; 2420 #if H_MV 2421 Int m_activeSPSId[ MAX_NUM_LAYERS ]; 2422 Int m_activePPSId[ MAX_NUM_LAYERS ]; 2423 #else 2424 Int m_activeSPSId; 2425 Int m_activePPSId; 2426 #endif 2427 2428 #endif 2014 2429 }; 2015 2430 -
trunk/source/Lib/TLibCommon/TComWedgelet.cpp
r608 r622 175 175 } 176 176 177 #if !SEC_DMM2_E0146_HHIFIX 177 178 Bool TComWedgelet::checkPredDirAbovePossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset ) 178 179 { … … 642 643 } 643 644 } 645 #endif 644 646 645 647 Void TComWedgelet::xGenerateWedgePattern() -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r608 r622 50 50 enum DIM_IDX 51 51 { 52 #if SEC_DMM2_E0146 52 #if SEC_DMM2_E0146_HHIFIX 53 53 DMM1_IDX = 0, 54 54 DMM3_IDX = 1, … … 63 63 #endif 64 64 }; 65 #if SEC_DMM2_E0146 65 #if SEC_DMM2_E0146_HHIFIX 66 66 #define DMM_NUM_TYPE 3 67 67 #else … … 86 86 #define DMM_NO_WEDGEINDEX MAX_UINT 87 87 #define DMM_NUM_WEDGE_REFINES 8 88 #if !SEC_DMM2_E0146 88 #if !SEC_DMM2_E0146_HHIFIX 89 89 #define DMM2_DELTAEND_MAX 4 90 90 #endif … … 151 151 Bool checkInvIdentical( Bool* pbRefPattern ); 152 152 153 #if !SEC_DMM2_E0146_HHIFIX 153 154 // functions for DMM2 prediction 154 155 Bool checkPredDirAbovePossible( UInt uiPredDirBlockSize, UInt uiPredDirBlockOffsett ); … … 156 157 Void getPredDirStartEndAbove( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd ); 157 158 Void getPredDirStartEndLeft ( UChar& ruhXs, UChar& ruhYs, UChar& ruhXe, UChar& ruhYe, UInt uiPredDirBlockSize, UInt uiPredDirBlockOffset, Int iDeltaEnd ); 159 #endif 158 160 }; // END CLASS DEFINITION TComWedgelet 159 161 -
trunk/source/Lib/TLibCommon/TComYuv.cpp
r608 r622 110 110 { 111 111 ::memcpy( pDst, pSrc, sizeof(Pel)*iWidth); 112 113 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 114 if ( g_traceCopyBack && g_nSymbolCounter >= g_stopAtCounter ) 115 { 116 for ( Int x = 0; x < iWidth; x++) 117 { 118 std::cout << pSrc[ x ] << " " ; 119 } 120 std::cout << std::endl; 121 } 122 #endif 123 112 124 pDst += iDstStride; 113 125 pSrc += iSrcStride; -
trunk/source/Lib/TLibCommon/TypeDef.h
r608 r622 92 92 // QC_CU_NBDV_D0181 93 93 // SEC_DEFAULT_DV_D0112 94 // MTK_DVMCP_FIX_E0172 1 // fix the mismatch between software and WD for DV derivation from DVMCP blocks, issue 2 in JCT3V-E0172 94 95 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 95 96 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 … … 110 111 // QC_D0191: Clean up 111 112 // LG_D0092: Multiple VSP candidate allowed 112 113 // MTK_VSP_FIX_ALIGN_WD_E0172 113 114 #define H_3D_IV_MERGE 1 // Inter-view motion merge candidate 114 115 // HHI_INTER_VIEW_MOTION_PRED … … 119 120 // QC_AMVP_MRG_UNIFY_IVCAN_C0051 120 121 // TEXTURE MERGING CANDIDATE , JCT3V-C0137 122 // QC_INRIA_MTK_MRG_E0126 121 123 #define H_3D_TMVP 1 // QC_TMVP_C0047 122 124 // Sony_M23639 … … 161 163 #define MTK_DIVMC_FIX_E0172 1 // fix the issue of derivation of disparity inter-view merge candidate, issue 5 in JCT3V-E0172 162 164 #define MTK_NBDV_TN_FIX_E0172 1 // fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172 163 #define MTK_DVMCP_FIX_E0172 1 // fix the mismatch between software and WD for DV derivation from DVMCP blocks, issue 2 in JCT3V-E0172164 #define MTK_VSP_FIX_ALIGN_WD_E0172 1 // fix the issues related to VSP merge candidate, issue 3, 4 in JCT3V-E0172, using an implementation aligned with WD165 166 #if !MTK_VSP_FIX_ALIGN_WD_E0172167 #define MTK_VSP_FIX_E0172 1 // fix the issues related to VSP merge candidate, issue 3, 4 in JCT3V-E0172168 #endif169 165 #endif // MTK_RVS_BUGFIX_E0172 170 166 … … 175 171 #endif // H_3D_NBDV 176 172 177 #if H_3D_IV_MERGE178 #define QC_INRIA_MTK_MRG_E0126 1 // additional merge candidates JCT3V-E0126179 #endif180 181 173 #if H_3D_DIM 182 #define SEC_DMM2_E0146 174 #define SEC_DMM2_E0146_HHIFIX 1 // Removal of DMM2 from DMMs 183 175 #define ZJU_DEPTH_INTRA_MODE_E0204 1 // Simplified Binarization for depth_intra_mode 184 176 #define KWU_SDC_SIMPLE_DC_E0117 1 // Simplified DC calculation for SDC 185 177 #define SCU_HS_DMM4_REMOVE_DIV_E0242 1 // DMM4 Division Removal 186 #define SCU_HS_FAST_DEPTH_INTRA_E0238 1 // Fast DMM and RBC Mode Selection178 #define SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 1 // Fast DMM and RBC Mode Selection 187 179 #endif 188 180 … … 215 207 216 208 217 218 209 /// FIXES 210 #if H_MV 211 #define H_MV_FIX_LID_PIC_HASH_SEI_T40 1 // Fix wrong layer_id in decoded picture hash SEI 212 #define H_MV5 1 // Update to MV-HEVC 5 HLS 213 #endif 219 214 ///////////////////////////////////////////////////////////////////////////////////////// 220 215 /////////////////////////////////// DERIVED DEFINES /////////////////////////////////// … … 265 260 #endif 266 261 #if H_3D_DIM_DMM 267 #define LGE_PKU_DMM3_OVERLAP_E0159 262 #define LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1 // Removal of overlap between DMM3 and DMM1 268 263 #endif 269 264 #endif … … 271 266 ///// ***** VIEW SYNTHESIS PREDICTION ********* 272 267 #if H_3D_VSP 273 #define H_3D_VSP_POSITION 3 // The only supported position274 268 #define H_3D_VSP_BLOCKSIZE 4 // Supported values: 1, 2, and 4 275 269 #if H_3D_VSP_BLOCKSIZE == 1 … … 799 793 enum ScalabilityType 800 794 { 795 #if H_MV5 796 #if H_3D 797 DEPTH_ID = 0, 798 #endif 799 VIEW_ORDER_INDEX = 1, 800 #else 801 801 VIEW_ID = 0, 802 802 #if H_3D 803 803 DEPTH_ID = 1, 804 804 #endif 805 #endif 805 806 }; 806 807 #endif -
trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r608 r622 50 50 xReadCode (length, rValue); 51 51 #if H_MV_ENC_DEC_TRAC 52 if ( g_disableHLSTrace )52 if ( g_disableHLSTrace || !g_HLSTraceEnable ) 53 53 { 54 54 return; … … 71 71 xReadUvlc (rValue); 72 72 #if H_MV_ENC_DEC_TRAC 73 if ( g_disableHLSTrace )73 if ( g_disableHLSTrace || !g_HLSTraceEnable ) 74 74 { 75 75 return; … … 85 85 xReadSvlc(rValue); 86 86 #if H_MV_ENC_DEC_TRAC 87 if ( g_disableHLSTrace )87 if ( g_disableHLSTrace || !g_HLSTraceEnable ) 88 88 { 89 89 return; … … 99 99 xReadFlag(rValue); 100 100 #if H_MV_ENC_DEC_TRAC 101 if ( g_disableHLSTrace )101 if ( g_disableHLSTrace || !g_HLSTraceEnable ) 102 102 { 103 103 return; -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r608 r622 330 330 } 331 331 } 332 #if H_MV5 333 #if H_MV 334 if ( pcPPS->getLayerId() > 0 ) 335 { 336 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 337 } 338 339 if( pcPPS->getPpsInferScalingListFlag( ) ) 340 { 341 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 342 } 343 else 344 { 345 #endif 346 #endif 332 347 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 333 348 if(pcPPS->getScalingListPresentFlag ()) … … 335 350 parseScalingList( pcPPS->getScalingList() ); 336 351 } 352 #if H_MV5 353 #if H_MV 354 } 355 #endif 356 #endif 337 357 338 358 READ_FLAG( uiCode, "lists_modification_present_flag"); … … 410 430 { 411 431 Window &defDisp = pcVUI->getDefaultDisplayWindow(); 432 #if !H_MV5 412 433 READ_UVLC( uiCode, "def_disp_win_left_offset" ); defDisp.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) ); 413 434 READ_UVLC( uiCode, "def_disp_win_right_offset" ); defDisp.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) ); 414 435 READ_UVLC( uiCode, "def_disp_win_top_offset" ); defDisp.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 415 436 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 437 #else 438 #if H_MV 439 defDisp.setScaledFlag( false ); 440 READ_UVLC( uiCode, "def_disp_win_left_offset" ); defDisp.setWindowLeftOffset ( uiCode ); 441 READ_UVLC( uiCode, "def_disp_win_right_offset" ); defDisp.setWindowRightOffset ( uiCode ); 442 READ_UVLC( uiCode, "def_disp_win_top_offset" ); defDisp.setWindowTopOffset ( uiCode ); 443 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode ); 444 #else 445 READ_UVLC( uiCode, "def_disp_win_left_offset" ); defDisp.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) ); 446 READ_UVLC( uiCode, "def_disp_win_right_offset" ); defDisp.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc()) ); 447 READ_UVLC( uiCode, "def_disp_win_top_offset" ); defDisp.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 448 READ_UVLC( uiCode, "def_disp_win_bottom_offset" ); defDisp.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc()) ); 449 #endif 450 #endif 416 451 } 417 452 TimingInfo *timingInfo = pcVUI->getTimingInfo(); … … 436 471 { 437 472 READ_FLAG( uiCode, "tiles_fixed_structure_flag"); pcVUI->setTilesFixedStructureFlag(uiCode); 473 #if !H_MV5 438 474 #if H_MV 439 475 if ( pcSPS->getLayerId() > 0 ) … … 441 477 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVUI->setTileBoundariesAlignedFlag( uiCode == 1 ); 442 478 } 479 #endif 443 480 #endif 444 481 READ_FLAG( uiCode, "motion_vectors_over_pic_boundaries_flag"); pcVUI->setMotionVectorsOverPicBoundariesFlag(uiCode); … … 560 597 READ_UVLC( uiCode, "sps_seq_parameter_set_id" ); pcSPS->setSPSId( uiCode ); 561 598 assert(uiCode <= 15); 599 #if H_MV5 600 #if H_MV 601 if ( pcSPS->getLayerId() > 0 ) 602 { 603 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); 604 } 562 605 606 if ( pcSPS->getUpdateRepFormatFlag() ) 607 { 608 #endif 609 #endif 563 610 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 564 611 assert(uiCode <= 3); … … 572 619 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 573 620 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 621 #if H_MV5 622 #if H_MV 623 } 624 #endif 625 #endif 574 626 READ_FLAG( uiCode, "conformance_window_flag"); 575 627 if (uiCode != 0) 576 628 { 577 629 Window &conf = pcSPS->getConformanceWindow(); 630 #if H_MV5 631 #if H_MV 632 // Needs to be scaled later, when ChromaFormatIdc is known. 633 conf.setScaledFlag( false ); 634 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode ); 635 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode ); 636 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 637 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 638 #else 578 639 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 579 640 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 580 641 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 581 642 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 582 } 583 643 #endif 644 #else 645 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 646 READ_UVLC( uiCode, "conf_win_right_offset" ); conf.setWindowRightOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); 647 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 648 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode * TComSPS::getWinUnitY( pcSPS->getChromaFormatIdc() ) ); 649 #endif 650 } 651 652 #if H_MV5 653 #if H_MV 654 if ( pcSPS->getUpdateRepFormatFlag() ) 655 { 656 #endif 657 #endif 584 658 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 585 659 assert(uiCode <= 6); … … 591 665 pcSPS->setBitDepthC( uiCode + 8 ); 592 666 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 667 #if H_MV5 668 #if H_MV 669 } 670 #endif 671 #endif 593 672 594 673 READ_UVLC( uiCode, "log2_max_pic_order_cnt_lsb_minus4" ); pcSPS->setBitsForPOC( 4 + uiCode ); … … 613 692 pcSPS->setNumReorderPics(uiCode, i); 614 693 #if H_MV 694 #if H_MV5 695 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 696 #else 615 697 READ_UVLC ( uiCode, "sps_max_latency_increase[i]"); 698 #endif 616 699 #else 617 READ_UVLC ( uiCode, "sps_max_latency_increase ");700 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1"); 618 701 #endif 619 702 pcSPS->setMaxLatencyIncrease( uiCode, i ); … … 653 736 if(pcSPS->getScalingListFlag()) 654 737 { 738 #if H_MV5 739 #if H_MV 740 if ( pcSPS->getLayerId() > 0 ) 741 { 742 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 ); 743 } 744 745 if ( pcSPS->getSpsInferScalingListFlag() ) 746 { 747 READ_CODE( 6, uiCode, "sps_scaling_list_ref_layer_id" ); pcSPS->setSpsScalingListRefLayerId( uiCode ); 748 } 749 else 750 { 751 #endif 752 #endif 655 753 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 656 754 if(pcSPS->getScalingListPresentFlag ()) … … 658 756 parseScalingList( pcSPS->getScalingList() ); 659 757 } 758 #if H_MV5 759 #if H_MV 760 } 761 #endif 762 #endif 660 763 } 661 764 READ_FLAG( uiCode, "amp_enabled_flag" ); pcSPS->setUseAMP( uiCode ); … … 711 814 if (uiCode) 712 815 { 816 #if !H_MV5 713 817 #if !H_MV 714 818 while ( xMoreRbspData() ) … … 789 893 } 790 894 } 895 #else 896 #if H_MV 897 parseSPSExtension( pcSPS ); 898 READ_FLAG( uiCode, "sps_extension2_flag"); 899 if ( uiCode ) 900 { 901 #if H_3D 902 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 903 READ_FLAG( uiCode, "sps_extension3_flag"); 904 if ( uiCode ) 905 { 906 #endif 907 #endif 908 while ( xMoreRbspData() ) 909 { 910 READ_FLAG( uiCode, "sps_extension_data_flag"); 911 } 912 #if H_MV 913 #if H_3D 914 } 915 #endif 916 } 917 #endif 918 } 919 } 920 #endif 921 #if H_MV5 922 Void TDecCavlc::parseSPSExtension( TComSPS* pcSPS ) 923 { 924 UInt uiCode; 925 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 926 READ_UVLC( uiCode, "sps_shvc_reserved_zero_idc" ); 927 } 928 929 #if H_3D 930 Void TDecCavlc::parseSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 931 { 932 UInt uiCode; 933 #if H_3D_QTLPC 934 //GT: This has to go to VPS 935 if( depthFlag ) 936 { 937 READ_FLAG( uiCode, "use_qtl_flag" ); 938 pcSPS->setUseQTL( uiCode ); 939 READ_FLAG( uiCode, "use_pc_flag" ); 940 pcSPS->setUsePC( uiCode ); 941 } 942 #endif 943 944 UInt uiCamParPrecision = 0; 945 Bool bCamParSlice = false; 946 if ( !depthFlag ) 947 { 948 READ_UVLC( uiCamParPrecision, "cp_precision" ); 949 READ_FLAG( uiCode, "cp_in_slice_header_flag" ); bCamParSlice = ( uiCode == 1 ); 950 if( !bCamParSlice ) 951 { 952 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ ) 953 { 954 Int iCode; 955 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode; 956 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode; 957 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ]; 958 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ]; 959 } 960 } 961 } 962 pcSPS->initCamParaSPS( viewIndex, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset ); 963 } 964 #endif 965 #endif 791 966 792 967 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 797 972 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 798 973 #if H_MV 974 #if H_MV5 975 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( uiCode ); 976 #else 799 977 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayers( uiCode + 1 ); 978 #endif 800 979 #else 801 980 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); … … 882 1061 if (uiCode) 883 1062 { 1063 #if !H_MV5 884 1064 #if H_MV 885 1065 m_pcBitstream->readOutTrailingBits(); … … 1099 1279 return; 1100 1280 } 1281 #else 1282 #if H_MV 1283 m_pcBitstream->readOutTrailingBits(); 1284 parseVPSExtension( pcVPS ); 1285 READ_FLAG( uiCode, "vps_extension2_flag" ); 1286 if (uiCode) 1287 { 1288 #if H_3D 1289 m_pcBitstream->readOutTrailingBits(); 1290 parseVPSExtension2( pcVPS ); 1291 READ_FLAG( uiCode, "vps_extension3_flag" ); 1292 if (uiCode) 1293 { 1294 #endif 1295 #endif 1296 while ( xMoreRbspData() ) 1297 { 1298 READ_FLAG( uiCode, "vps_extension_data_flag"); 1299 } 1300 #if H_MV 1301 #if H_3D 1302 } 1303 #endif 1304 } 1305 #endif 1306 } 1307 } 1308 #endif 1309 1310 #if H_MV5 1311 #if H_MV 1312 Void TDecCavlc::parseVPSExtension( TComVPS* pcVPS ) 1313 { 1314 UInt uiCode; 1315 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1316 READ_CODE( 16, uiCode, "vps_vui_offset" ); pcVPS->setVpsVuiOffset( uiCode ); 1317 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); 1318 1319 for( Int sIdx = 0; sIdx < MAX_NUM_SCALABILITY_TYPES; sIdx++ ) 1320 { 1321 READ_FLAG( uiCode, "scalability_mask_flag[i]" ); pcVPS->setScalabilityMaskFlag( sIdx, uiCode == 1 ? true : false ); 1322 } 1323 1324 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ ) 1325 { 1326 READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); pcVPS->setDimensionIdLen( sIdx, uiCode + 1 ); 1327 } 1328 1329 if ( pcVPS->getSplittingFlag() ) 1330 { 1331 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1, pcVPS->inferLastDimsionIdLenMinus1() ); 1332 } 1333 1334 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); pcVPS->setVpsNuhLayerIdPresentFlag( uiCode == 1 ? true : false ); 1335 1336 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1337 { 1338 if ( pcVPS->getVpsNuhLayerIdPresentFlag() ) 1339 { 1340 READ_CODE( 6, uiCode, "layer_id_in_nuh[i]" ); pcVPS->setLayerIdInNuh( i, uiCode ); 1341 } 1342 else 1343 { 1344 pcVPS->setLayerIdInNuh( i, i );; 1345 } 1346 1347 pcVPS->setLayerIdInVps( pcVPS->getLayerIdInNuh( i ), i ); 1348 1349 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ ) 1350 { 1351 if ( !pcVPS->getSplittingFlag() ) 1352 { 1353 READ_CODE( pcVPS->getDimensionIdLen( j ), uiCode, "dimension_id[i][j]" ); pcVPS->setDimensionId( i, j, uiCode ); 1354 } 1355 else 1356 { 1357 pcVPS->setDimensionId( i, j, pcVPS->inferDimensionId( i, j) ); 1358 } 1359 } 1360 } 1361 1362 // GT spec says: trac #39 1363 // if ( pcVPS->getNumViews() > 1 ) 1364 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1365 { 1366 READ_CODE( 4, uiCode, "view_id_len_minus1" ); pcVPS->setViewIdLenMinus1( uiCode ); 1367 } 1368 1369 for( Int i = 0; i < pcVPS->getNumViews(); i++ ) 1370 { 1371 READ_CODE( pcVPS->getViewIdLenMinus1( ) + 1, uiCode, "view_id_val[i]" ); pcVPS->setViewIdVal( i, uiCode ); 1372 } 1373 1374 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1375 { 1376 for( Int j = 0; j < i; j++ ) 1377 { 1378 READ_FLAG( uiCode, "direct_dependency_flag[i][j]" ); pcVPS->setDirectDependencyFlag( i, j, uiCode ); 1379 } 1380 } 1381 1382 READ_FLAG( uiCode, "max_tid_ref_present_flag" ); pcVPS->setMaxTidRefPresentFlag( uiCode == 1 ); 1383 1384 if ( pcVPS->getMaxTidRefPresentFlag() ) 1385 { 1386 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1387 { 1388 READ_CODE( 3, uiCode, "max_tid_il_ref_pics_plus1[i]" ); pcVPS->setMaxTidIlRefPicPlus1( i , uiCode ); 1389 } 1390 } 1391 1392 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1393 READ_CODE( 10, uiCode, "vps_number_layer_sets_minus1" ); pcVPS->setVpsNumberLayerSetsMinus1 ( uiCode ); 1394 READ_CODE( 6, uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1395 1396 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1397 { 1398 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1399 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1400 { 1401 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); pcVPS->setProfileRefMinus1( i, uiCode ); 1402 } 1403 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1404 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1405 { 1406 TComPTL temp = *pcVPS->getPTL( i ); 1407 *pcVPS->getPTL( i ) = *pcVPS->getPTL( pcVPS->getProfileRefMinus1( i ) + 1 ); 1408 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1409 } 1410 } 1411 1412 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1413 1414 READ_FLAG( uiCode, "more_output_layer_sets_than_default_flag" ); pcVPS->setMoreOutputLayerSetsThanDefaultFlag( uiCode == 1 ); 1415 1416 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ) 1417 { 1418 READ_CODE( 10, uiCode, "num_add_output_layer_sets_minus1" ); pcVPS->setNumAddOutputLayerSetsMinus1( uiCode ); 1419 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1); 1420 } 1421 1422 if( numOutputLayerSets > 1) 1423 { 1424 READ_FLAG( uiCode, "default_one_target_output_layer_flag" ); pcVPS->setDefaultOneTargetOutputLayerFlag( uiCode == 1); 1425 } 1426 1427 for( Int i = 1; i < numOutputLayerSets; i++ ) 1428 { 1429 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1430 { 1431 READ_UVLC( uiCode, "output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode ); 1432 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1; j++ ) 1433 { 1434 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); 1435 } 1436 } 1437 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1438 { 1439 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1440 } 1441 } 1442 1443 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1444 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1445 { 1446 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1447 } 1448 1449 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1450 { 1451 assert( pcVPS->getRepFormat(i) == NULL ); 1452 TComRepFormat* repFormat = new TComRepFormat(); 1453 parseRepFormat( repFormat ); 1454 pcVPS->setRepFormat(i, repFormat ); 1455 } 1456 1457 if( pcVPS->getRepFormatIdxPresentFlag() ) 1458 { 1459 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1460 { 1461 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1462 { 1463 READ_CODE( 4, uiCode, "vps_rep_format_idx" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1464 } 1465 } 1466 } 1467 1468 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); 1469 READ_FLAG( uiCode, "cross_layer_irap_aligned_flag" ); pcVPS->setCrossLayerIrapAlignedFlag( uiCode == 1 ); 1470 READ_UVLC( uiCode, "direct_dep_type_len_minus2") ; pcVPS->setDirectDepTypeLenMinus2 ( uiCode ); 1471 1472 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1473 { 1474 for( Int j = 0; j < i; j++ ) 1475 { 1476 if (pcVPS->getDirectDependencyFlag( i, j) ) 1477 { 1478 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode); 1479 } 1480 } 1481 } 1482 1483 READ_FLAG( uiCode, "vps_shvc_reserved_zero_flag" ); 1484 READ_FLAG( uiCode, "vps_vui_present_flag" ) ; pcVPS->setVpsVuiPresentFlag( uiCode == 1 ); 1485 1486 if( pcVPS->getVpsVuiPresentFlag() ) 1487 { 1488 m_pcBitstream->readOutTrailingBits(); // vps_vui_alignment_bit_equal_to_one 1489 parseVPSVUI( pcVPS ); 1490 } 1491 1492 pcVPS->checkVPSExtensionSyntax(); 1493 pcVPS->setRefLayers(); 1494 } 1495 1496 Void TDecCavlc::parseRepFormat( TComRepFormat* pcRepFormat ) 1497 { 1498 assert( pcRepFormat ); 1499 1500 UInt uiCode; 1501 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1502 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1503 { 1504 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1505 } 1506 READ_CODE( 16, uiCode, "pic_width_vps_in_luma_samples" ); pcRepFormat->setPicWidthVpsInLumaSamples ( uiCode ); 1507 READ_CODE( 16, uiCode, "pic_height_vps_in_luma_samples" ); pcRepFormat->setPicHeightVpsInLumaSamples( uiCode ); 1508 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1509 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1510 } 1511 1512 1513 Void TDecCavlc::parseVPSVUI( TComVPS* pcVPS ) 1514 { 1515 assert( pcVPS ); 1516 1517 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1518 1519 assert( pcVPSVUI ); 1520 1521 UInt uiCode; 1522 READ_FLAG( uiCode, "bit_rate_present_vps_flag" ); pcVPSVUI->setBitRatePresentVpsFlag( uiCode == 1 ); 1523 READ_FLAG( uiCode, "pic_rate_present_vps_flag" ); pcVPSVUI->setPicRatePresentVpsFlag( uiCode == 1 ); 1524 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1525 { 1526 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1527 { 1528 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1529 { 1530 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) 1531 { 1532 READ_FLAG( uiCode, "bit_rate_present_flag" ); pcVPSVUI->setBitRatePresentFlag( i, j, uiCode == 1 ); 1533 } 1534 if( pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1535 { 1536 READ_FLAG( uiCode, "pic_rate_present_flag" ); pcVPSVUI->setPicRatePresentFlag( i, j, uiCode == 1 ); 1537 } 1538 if( pcVPSVUI->getBitRatePresentFlag( i, j ) ) 1539 { 1540 READ_CODE( 16, uiCode, "avg_bit_rate" ); pcVPSVUI->setAvgBitRate( i, j, uiCode ); 1541 READ_CODE( 16, uiCode, "max_bit_rate" ); pcVPSVUI->setMaxBitRate( i, j, uiCode ); 1542 } 1543 if( pcVPSVUI->getPicRatePresentFlag( i, j ) ) 1544 { 1545 READ_CODE( 2, uiCode, "constant_pic_rate_idc" ); pcVPSVUI->setConstantPicRateIdc( i, j, uiCode ); 1546 READ_CODE( 16, uiCode, "avg_pic_rate" ); pcVPSVUI->setAvgPicRate( i, j, uiCode ); 1547 } 1548 } 1549 } 1550 } 1551 1552 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1553 { 1554 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1555 { 1556 READ_FLAG( uiCode, "tile_boundaries_aligned_flag" ); pcVPSVUI->setTileBoundariesAlignedFlag( i, j, uiCode == 1 ); 1557 } 1558 } 1559 1560 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1561 1562 if( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ) 1563 { 1564 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1565 { 1566 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1567 { 1568 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1569 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1570 { 1571 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag" ); pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, uiCode == 1 ); 1572 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1573 { 1574 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1" ); pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, uiCode ); 1575 } 1576 } 1577 } 1578 } 1579 } 1580 } 1581 #endif 1582 1583 #if H_3D 1584 Void TDecCavlc::parseVPSExtension2( TComVPS* pcVPS ) 1585 { 1586 UInt uiCode; 1587 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1588 { 1589 #if H_3D_ARP 1590 pcVPS->setUseAdvRP ( i, 0 ); 1591 pcVPS->setARPStepNum( i, 1 ); 1592 #endif 1593 if ( i != 0 ) 1594 { 1595 if( !( pcVPS->getDepthId( i ) == 1 ) ) 1596 { 1597 #if H_3D_IV_MERGE 1598 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1599 #endif 1600 #if H_3D_ARP 1601 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 ); 1602 1603 #endif 1604 #if H_3D_NBDV_REF 1605 READ_FLAG( uiCode, "depth_refinement_flag[i]"); pcVPS->setDepthRefinementFlag ( i, uiCode == 1 ? true : false ); 1606 #endif 1607 #if H_3D_VSP 1608 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false ); 1609 #endif 1610 } 1611 else 1612 { 1613 1614 READ_FLAG( uiCode, "vps_depth_modes_flag[i]" ); pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false ); 1615 // READ_FLAG( uiCode, "lim_qt_pred_flag[i]"); pcVPS->setLimQtPreFlag ( i, uiCode == 1 ? true : false ); 1616 #if H_3D_DIM_DLT 1617 if( pcVPS->getVpsDepthModesFlag( i ) ) 1618 { 1619 READ_FLAG( uiCode, "dlt_flag[i]" ); pcVPS->setUseDLTFlag( i, uiCode == 1 ? true : false ); 1620 } 1621 if( pcVPS->getUseDLTFlag( i ) ) 1622 { 1623 // decode mapping 1624 UInt uiNumDepthValues; 1625 // parse number of values in DLT 1626 READ_UVLC(uiNumDepthValues, "num_depth_values_in_dlt[i]"); 1627 1628 // parse actual DLT values 1629 Int* aiIdx2DepthValue = (Int*) calloc(uiNumDepthValues, sizeof(Int)); 1630 for(Int d=0; d<uiNumDepthValues; d++) 1631 { 1632 READ_UVLC(uiCode, "dlt_depth_value[i][d]"); 1633 aiIdx2DepthValue[d] = (Int)uiCode; 1634 } 1635 1636 pcVPS->setDepthLUTs(i, aiIdx2DepthValue, uiNumDepthValues); 1637 1638 // clean memory 1639 free(aiIdx2DepthValue); 1640 } 1641 #endif 1642 #if LGE_INTER_SDC_E0156 1643 READ_FLAG( uiCode, "depth_inter_SDC_flag" ); pcVPS->setInterSDCFlag( i, uiCode ? true : false ); 1644 #endif 1645 } 1646 } 1647 } 1648 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 1649 } 1650 #endif 1651 #endif 1101 1652 1102 1653 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) … … 1129 1680 #if H_MV 1130 1681 vps = parameterSetManager->getPrefetchedVPS(sps->getVPSId()); 1682 #if H_MV5 1683 assert( vps != NULL ); 1684 1685 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 1686 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 1687 1688 rpcSlice->setVPS(vps); 1689 rpcSlice->setViewId ( vps->getViewId ( rpcSlice->getLayerId() ) ); 1690 rpcSlice->setViewIndex( vps->getViewIndex( rpcSlice->getLayerId() ) ); 1691 #if H_3D 1692 rpcSlice->setIsDepth ( vps->getDepthId ( rpcSlice->getLayerId() ) == 1 ); 1693 #endif 1694 #else 1131 1695 assert(vps!=0); 1132 1696 rpcSlice->setVPS(vps); … … 1137 1701 #endif 1138 1702 #endif 1703 #endif 1139 1704 rpcSlice->setSPS(sps); 1140 1705 rpcSlice->setPPS(pps); … … 1182 1747 { 1183 1748 #if H_MV 1749 #if H_MV5 1750 Int esb = 0; //Don't use i, otherwise will shadow something below 1751 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1752 { 1753 esb++; 1754 READ_FLAG( uiCode, "poc_reset_flag" ); rpcSlice->setPocResetFlag( uiCode == 1 ); 1755 } 1756 1757 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1758 { 1759 esb++; 1760 READ_FLAG( uiCode, "discardable_flag" ); rpcSlice->setDiscardableFlag( uiCode == 1 ); 1761 } 1762 1763 for (; esb < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1764 #else 1184 1765 if ( rpcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 1185 1766 { … … 1188 1769 1189 1770 for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1771 #endif 1190 1772 #else 1191 1773 for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1251 1833 } 1252 1834 rpcSlice->setPOC (iPOCmsb+iPOClsb); 1253 1835 #if H_MV5 1836 #if H_MV 1837 if ( rpcSlice->getPocResetFlag() ) 1838 { 1839 rpcSlice->setPocBeforeReset ( rpcSlice->getPOC() ); 1840 rpcSlice->setPOC ( 0 ); 1841 1842 } 1843 #endif 1844 #endif 1254 1845 TComReferencePictureSet* rps; 1255 1846 rps = rpcSlice->getLocalRPS(); … … 1379 1970 } 1380 1971 #if H_MV 1972 #if H_MV5 1973 Int layerId = rpcSlice->getLayerId(); 1974 if( rpcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) { 1975 READ_FLAG( uiCode, "inter_layer_pred_enabled_flag" ); rpcSlice->setInterLayerPredEnabledFlag( uiCode == 1 ); 1976 if( rpcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 1977 { 1978 if( !vps->getMaxOneActiveRefLayerFlag()) 1979 { 1980 READ_CODE( rpcSlice->getNumInterLayerRefPicsMinus1Len( ), uiCode, "num_inter_layer_ref_pics_minus1" ); rpcSlice->setNumInterLayerRefPicsMinus1( uiCode ); 1981 } 1982 if ( rpcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 1983 { 1984 for( Int idx = 0; idx < rpcSlice->getNumActiveRefLayerPics(); idx++ ) 1985 { 1986 READ_CODE( rpcSlice->getInterLayerPredLayerIdcLen( ), uiCode, "inter_layer_pred_layer_idc" ); rpcSlice->setInterLayerPredLayerIdc( idx, uiCode ); 1987 } 1988 } 1989 } 1990 } 1991 #else 1381 1992 Int layerIdInVps = rpcSlice->getLayerIdInVps(); 1382 1993 if( rpcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 ) … … 1402 2013 READ_FLAG( uiCode, "inter_layer_sample_pred_only_flag" ); rpcSlice->setInterLayerSamplePredOnlyFlag( uiCode == 1 ); 1403 2014 } 1404 2015 #endif 1405 2016 #endif 1406 2017 if(sps->getUseSAO()) … … 1544 2155 if ( rpcSlice->getEnableTMVPFlag() ) 1545 2156 { 2157 #if !H_MV5 1546 2158 #if H_MV 1547 2159 if( rpcSlice->getLayerId() > 0 && rpcSlice->getNumActiveMotionPredRefLayers() > 0 ) … … 1557 2169 { 1558 2170 #endif 2171 #endif 1559 2172 if ( rpcSlice->getSliceType() == B_SLICE ) 1560 2173 { … … 1578 2191 rpcSlice->setColRefIdx(0); 1579 2192 } 1580 #if H_MV 1581 } 2193 #if !H_MV5 2194 #if H_MV 2195 } 2196 #endif 1582 2197 #endif 1583 2198 } -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r608 r622 76 76 Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); 77 77 Void parseVPS ( TComVPS* pcVPS ); 78 #if H_MV5 79 #if H_MV 80 Void parseVPSExtension ( TComVPS* pcVPS ); 81 Void parseRepFormat ( TComRepFormat* pcRepFormat ); 82 Void parseVPSVUI ( TComVPS* pcVPS ); 83 #endif 84 85 #if H_MV 86 Void parseSPSExtension ( TComSPS* pcSPS ); 87 #endif 88 #endif 78 89 #if H_3D 90 #if H_MV5 91 Void parseVPSExtension2 ( TComVPS* pcVPS ); 92 Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 93 #endif 79 94 Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 80 95 #else -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r608 r622 315 315 #if H_3D_NBDV_REF 316 316 if(pcCU->getSlice()->getVPS()->getDepthRefinementFlag( pcCU->getSlice()->getLayerIdInVps() )) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 317 { 317 318 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); 319 } 318 320 else 319 321 #endif 322 { 320 323 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 324 } 325 326 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 327 if ( g_decTraceDispDer ) 328 { 329 DTRACE_CU( "RefViewIdx", DvInfo.m_aVIdxCan ); 330 DTRACE_CU( "MvDisp[x]", DvInfo.m_acNBDV.getHor() ); 331 DTRACE_CU( "MvDisp[y]", DvInfo.m_acNBDV.getVer() ); 332 DTRACE_CU( "MvRefinedDisp[x]", DvInfo.m_acDoNBDV.getHor() ); 333 DTRACE_CU( "MvRefinedDisp[y]", DvInfo.m_acDoNBDV.getVer() ); 334 } 335 #endif 321 336 322 337 pcCU->setDvInfoSubParts(DvInfo, uiAbsPartIdx, uiDepth); … … 366 381 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 367 382 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 368 #if MTK_VSP_FIX_ALIGN_WD_E0172369 383 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 370 384 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand, uiMergeIndex ); 371 #else372 #if MTK_VSP_FIX_E0172373 Int vspDir[MRG_MAX_NUM_CANDS_MEM];374 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);375 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag,vspDir, numValidMergeCand, uiMergeIndex );376 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );377 #else378 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex );379 #endif380 #endif// end of MTK_VSP_FIX_ALIGN_WD_E0172381 385 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 382 386 #else 383 387 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 384 388 #endif 385 #if MTK_VSP_FIX_ALIGN_WD_E0172389 #if H_3D_VSP 386 390 if(vspFlag[uiMergeIndex]) 387 391 { … … 400 404 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 401 405 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 406 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 407 if ( g_decTraceMvFromMerge ) 408 { 409 if ( uiRefListIdx == 0 ) 410 { 411 DTRACE_PU( "mvL0[0]", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getHor()); 412 DTRACE_PU( "mvL0[1]", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getVer()); 413 DTRACE_PU( "refIdxL0 ", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx()); 414 } 415 else 416 { 417 DTRACE_PU( "mvL1[0]", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getHor()); 418 DTRACE_PU( "mvL1[1]", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getVer()); 419 DTRACE_PU( "refIdxL1", cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx()); 420 } 421 } 422 #endif 402 423 } 403 424 } -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r608 r622 243 243 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 244 244 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 245 #if MTK_VSP_FIX_ALIGN_WD_E0172246 245 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 247 246 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand ); 248 #else249 #if MTK_VSP_FIX_E0172250 Int vspDir[MRG_MAX_NUM_CANDS_MEM];251 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);252 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, vspDir, numValidMergeCand );253 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );254 #else255 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand );256 #endif257 #endif//end of MTK_VSP_FIX_ALIGN_WD_E0172258 247 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 259 #if MTK_VSP_FIX_ALIGN_WD_E0172 248 260 249 if(vspFlag[uiMergeIndex]) 261 250 { 262 251 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth); 263 252 } 264 #endif265 253 #else 266 254 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); … … 272 260 else 273 261 { 274 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); // Redundant line262 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 275 263 #if H_3D_VSP 276 264 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 277 265 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 278 #if MTK_VSP_FIX_ALIGN_WD_E0172279 266 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 280 267 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex ); 281 #else282 #if MTK_VSP_FIX_E0172283 Int vspDir[MRG_MAX_NUM_CANDS_MEM];284 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);285 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, vspDir,numValidMergeCand, uiMergeIndex );286 pcCU->setVSPDirSubParts( vspDir[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );287 #else288 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, numValidMergeCand, uiMergeIndex );289 #endif290 #endif//end of MTK_VSP_FIX_ALIGN_WD_E0172291 268 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 292 #if MTK_VSP_FIX_ALIGN_WD_E0172293 269 if(vspFlag[uiMergeIndex]) 294 270 { 295 271 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth); 296 272 } 297 #endif298 273 #else 299 274 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); … … 327 302 } 328 303 } 329 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172304 #if H_3D_VSP 330 305 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == false)) 331 306 #else -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r608 r622 89 89 #if H_3D_DIM_DMM 90 90 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 91 #if !SEC_DMM2_E0146 91 #if !SEC_DMM2_E0146_HHIFIX 92 92 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 93 93 #endif … … 179 179 #if H_3D_DIM_DMM 180 180 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA ); 181 #if !SEC_DMM2_E0146 181 #if !SEC_DMM2_E0146_HHIFIX 182 182 m_cDmm2DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM2_DATA ); 183 183 #endif … … 255 255 #if H_3D_DIM_DMM 256 256 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 257 #if !SEC_DMM2_E0146 257 #if !SEC_DMM2_E0146_HHIFIX 258 258 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 259 259 #endif … … 444 444 ruiTabIdx = uiIdx; 445 445 } 446 #if !SEC_DMM2_E0146 446 #if !SEC_DMM2_E0146_HHIFIX 447 447 Void TDecSbac::xParseDmm2Offset( Int& riOffset ) 448 448 { … … 584 584 m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) ); 585 585 586 #if H_MV_ENC_DEC_TRAC 587 DTRACE_CU("sdc_residual_flag[i]", uiResidual) 588 #endif 589 586 590 if (uiResidual) 587 591 { 588 592 // decode residual sign bit 589 593 m_pcTDecBinIf->decodeBinEP(uiSign); 594 #if H_MV_ENC_DEC_TRAC 595 DTRACE_CU("sdc_residual_sign_flag[i]", uiSign) 596 #endif 590 597 591 598 // decode residual magnitude … … 617 624 } 618 625 else 626 { 619 627 uiAbsIdx = uiCount; 628 } 629 630 #if H_MV_ENC_DEC_TRAC 631 DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx) 632 #endif 620 633 621 634 uiAbsIdx += 1; … … 1162 1175 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth ); 1163 1176 } break; 1164 #if !SEC_DMM2_E0146 1177 #if !SEC_DMM2_E0146_HHIFIX 1165 1178 case( DMM2_IDX ): 1166 1179 { … … 1333 1346 binNum = 0; 1334 1347 #if LGE_SDC_REMOVE_DC_E0158 1335 #if !SEC_DMM2_E0146 1348 #if !SEC_DMM2_E0146_HHIFIX 1336 1349 while( symbol && binNum < 2 ) 1337 1350 #endif 1338 1351 #else 1339 #if SEC_DMM2_E0146 1352 #if SEC_DMM2_E0146_HHIFIX 1340 1353 while( symbol && binNum < 2 ) 1341 1354 #else … … 1358 1371 else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;} 1359 1372 #if LGE_SDC_REMOVE_DC_E0158 1360 #if SEC_DMM2_E0146 1373 #if SEC_DMM2_E0146_HHIFIX 1361 1374 else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1362 1375 #else … … 1366 1379 #else 1367 1380 else if( modeCode == 14 ) { dir = DC_IDX; sdcFlag = 1;} 1368 #if SEC_DMM2_E0146 1381 #if SEC_DMM2_E0146_HHIFIX 1369 1382 else if( modeCode == 15 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;} 1370 1383 #else -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r608 r622 102 102 #if H_3D_DIM_DMM 103 103 Void xParseDmm1WedgeIdx ( UInt& ruiTabIdx, Int iNumBit ); 104 #if !SEC_DMM2_E0146 104 #if !SEC_DMM2_E0146_HHIFIX 105 105 Void xParseDmm2Offset ( Int& riOffset ); 106 106 #endif … … 216 216 #if H_3D_DIM_DMM 217 217 ContextModel3DBuffer m_cDmm1DataSCModel; 218 #if !SEC_DMM2_E0146 218 #if !SEC_DMM2_E0146_HHIFIX 219 219 ContextModel3DBuffer m_cDmm2DataSCModel; 220 220 #endif -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r608 r622 436 436 Window defaultDisplayWindow = pcSlice->getSPS()->getVuiParametersPresentFlag() ? pcSlice->getSPS()->getVuiParameters()->getDefaultDisplayWindow() : Window(); 437 437 438 #if H_MV5 439 #if H_MV 440 assert( conformanceWindow .getScaledFlag() ); 441 assert( defaultDisplayWindow.getScaledFlag() ); 442 #endif 443 #endif 438 444 for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 439 445 { … … 512 518 m_cCuDecoder.destroy(); 513 519 #if H_MV 520 #if H_MV5 521 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 522 #else 514 523 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 524 #endif 515 525 TComSlice::markCurrPic( pcPic ); 516 526 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); … … 581 591 assert (sps != 0); 582 592 593 #if H_MV5 594 #if H_MV 595 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 596 assert (vps != 0); 597 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) ) 598 #else 583 599 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 600 #endif 601 #else 602 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 603 #endif 584 604 { 585 605 printf ("Parameter set activation failed!"); … … 607 627 m_apcSlicePilot->setSPS(sps); 608 628 #if H_MV 629 #if H_MV5 630 m_apcSlicePilot->setVPS(vps); 631 sps->inferRepFormat ( vps , m_layerId ); 632 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 633 #else 609 634 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() ); 635 #endif 610 636 #endif 611 637 pps->setSPS(sps); … … 669 695 670 696 #if H_MV 697 #if H_MV5 698 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 699 #else 671 700 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer ); 701 #endif 672 702 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 673 703 #endif … … 676 706 #if H_MV 677 707 TComVPS* vps = m_apcSlicePilot->getVPS(); 708 #if H_MV5 709 Int layerId = nalu.m_layerId; 710 setViewId ( vps->getViewId ( layerId ) ); 711 #if H_3D 712 setViewIndex( vps->getViewIndex( layerId ) ); 713 setIsDepth ( vps->getDepthId ( layerId ) == 1 ); 714 m_ivPicLists->setVPS( vps ); 715 #endif 716 #else 678 717 Int layerIdInVps = vps->getLayerIdInVps( nalu.m_layerId ); 679 718 setViewId ( vps->getViewId ( layerIdInVps ) ); … … 684 723 #endif 685 724 #endif 725 #endif 686 726 // Skip pictures due to random access 687 727 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 723 763 #endif 724 764 // actual decoding starts here 765 #if H_MV5 766 #if H_MV 767 // This part needs further testing ! 768 if ( m_apcSlicePilot->getPocResetFlag() ) 769 { 770 xResetPocInPicBuffer(); 771 } 772 #endif 773 #endif 725 774 xActivateParameterSets(); 726 775 … … 742 791 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 743 792 #if H_MV 793 #if H_MV5 794 m_apcSlicePilot->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 795 #else 744 796 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 797 #endif 745 798 #endif 746 799 // Get a new picture buffer … … 888 941 // Set reference list 889 942 #if H_MV 943 #if H_MV5 944 std::vector< TComPic* > tempRefPicLists[2]; 945 std::vector< Bool > usedAsLongTerm [2]; 946 Int numPocTotalCurr; 947 948 pcSlice->getTempRefPicLists( m_cListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr); 949 pcSlice->setRefPicList ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 950 #else 890 951 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true ); 952 #endif 891 953 #if H_3D_ARP 892 954 pcSlice->setARPStepNum(); 893 955 if( pcSlice->getARPStepNum() > 1 ) 894 956 { 957 // GT: This seems to be broken, not all nuh_layer_ids are necessarily present 895 958 for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ ) 896 959 { … … 1021 1084 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1022 1085 assert( vps != 0 ); 1086 #if H_MV5 1087 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1088 #else 1023 1089 Int layerIdInVPS = vps->getLayerIdInVps( m_layerId ); 1024 1090 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( layerIdInVPS ), ( vps->getDepthId( layerIdInVPS ) == 1 ) ); 1091 #endif 1025 1092 #else 1026 1093 m_cEntropyDecoder.decodeSPS( sps ); … … 1032 1099 { 1033 1100 TComPPS* pps = new TComPPS(); 1101 #if H_MV5 1102 #if H_MV 1103 pps->setLayerId( getLayerId() ); 1104 #endif 1105 #endif 1034 1106 m_cEntropyDecoder.decodePPS( pps ); 1035 1107 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); … … 1040 1112 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 1041 1113 { 1114 #if H_MV5 1115 #if H_MV 1116 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); 1117 #else 1042 1118 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1119 #endif 1120 #else 1121 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1122 #endif 1043 1123 } 1044 1124 else 1045 1125 { 1126 #if H_MV5 1127 #if H_MV 1128 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS( m_layerId ) ); 1129 #else 1046 1130 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1131 #endif 1132 #else 1133 m_seiReader.parseSEImessage( bs, m_SEIs, nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); 1134 #endif 1047 1135 SEIMessages activeParamSets = getSeisByType(m_SEIs, SEI::ACTIVE_PARAMETER_SETS); 1048 1136 if (activeParamSets.size()>0) … … 1051 1139 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1052 1140 assert(seiAps->activeSeqParamSetId.size()>0); 1141 #if H_MV5 1142 #if H_MV 1143 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0], m_layerId )) 1144 #else 1053 1145 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) 1146 #endif 1147 #else 1148 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParamSetId[0] )) 1149 #endif 1054 1150 { 1055 1151 printf ("Warning SPS activation with Active parameter set SEI failed"); … … 1210 1306 } 1211 1307 1308 #if H_MV5 1309 Void TDecTop::xResetPocInPicBuffer() 1310 { 1311 TComList<TComPic*>::iterator iterPic = m_cListPic.begin(); 1312 while (iterPic != m_cListPic.end()) 1313 { 1314 TComPic* pic = *(iterPic++); 1315 if ( pic->getReconMark() ) 1316 { 1317 for( Int i = 0; i < pic->getNumAllocatedSlice(); i++) 1318 { 1319 TComSlice* slice = pic->getSlice( i ); 1320 slice->setPOC ( slice->getPOC() - m_apcSlicePilot->getPocBeforeReset() ); 1321 } 1322 } 1323 } 1324 } 1325 #endif 1212 1326 #endif 1213 1327 //! \} -
trunk/source/Lib/TLibDecoder/TDecTop.h
r608 r622 216 216 Int m_viewId; 217 217 TComPicLists* m_ivPicLists; 218 #if H_MV5 219 std::vector<TComPic*> m_refPicSetInterLayer0; 220 std::vector<TComPic*> m_refPicSetInterLayer1; 221 #else 218 222 std::vector<TComPic*> m_refPicSetInterLayer; 223 #endif 219 224 #if H_3D 220 225 Int m_viewIndex; … … 274 279 TComPic* xGetPic( Int layerId, Int poc ); 275 280 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay, Bool newLayerFlag ); 281 #if H_MV5 282 Void xResetPocInPicBuffer(); 283 #endif 276 284 #else 277 285 Bool xDecodeSlice(InputNALUnit &nalu, Int &iSkipFrame, Int iPOCLastDisplay); -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r608 r622 229 229 } 230 230 } 231 #if H_MV5 232 #if H_MV 233 if ( pcPPS->getLayerId() > 0 ) 234 { 235 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" ); 236 } 237 238 if( pcPPS->getPpsInferScalingListFlag( ) ) 239 { 240 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" ); 241 } 242 else 243 { 244 #endif 245 #endif 231 246 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 232 247 if( pcPPS->getScalingListPresentFlag() ) … … 237 252 codeScalingList( m_pcSlice->getScalingList() ); 238 253 } 254 #if H_MV5 255 #if H_MV 256 } 257 #endif 258 #endif 239 259 WRITE_FLAG( pcPPS->getListsModificationPresentFlag(), "lists_modification_present_flag"); 240 260 WRITE_UVLC( pcPPS->getLog2ParallelMergeLevelMinus2(), "log2_parallel_merge_level_minus2"); … … 319 339 { 320 340 WRITE_FLAG(pcVUI->getTilesFixedStructureFlag(), "tiles_fixed_structure_flag"); 341 #if !H_MV5 321 342 #if H_MV 322 343 if ( pcSPS->getLayerId() > 0 ) … … 324 345 WRITE_FLAG( pcVUI->getTileBoundariesAlignedFlag( ) ? 1 : 0 , "tile_boundaries_aligned_flag" ); 325 346 } 347 #endif 326 348 #endif 327 349 WRITE_FLAG(pcVUI->getMotionVectorsOverPicBoundariesFlag(), "motion_vectors_over_pic_boundaries_flag"); … … 429 451 #endif 430 452 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 453 #if H_MV5 454 #if H_MV 455 if ( pcSPS->getLayerId() > 0 ) 456 { 457 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); 458 } 459 460 if ( pcSPS->getUpdateRepFormatFlag() ) 461 { 462 #endif 463 #endif 431 464 WRITE_UVLC( pcSPS->getChromaFormatIdc (), "chroma_format_idc" ); 432 465 assert(pcSPS->getChromaFormatIdc () == 1); … … 439 472 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 440 473 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 474 #if H_MV5 475 #if H_MV 476 } 477 #endif 478 #endif 441 479 Window conf = pcSPS->getConformanceWindow(); 442 480 … … 449 487 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 450 488 } 451 489 #if H_MV5 490 #if H_MV 491 if ( pcSPS->getUpdateRepFormatFlag() ) 492 { 493 #endif 494 #endif 452 495 WRITE_UVLC( pcSPS->getBitDepthY() - 8, "bit_depth_luma_minus8" ); 453 496 WRITE_UVLC( pcSPS->getBitDepthC() - 8, "bit_depth_chroma_minus8" ); 454 497 #if H_MV5 498 #if H_MV 499 } 500 #endif 501 #endif 455 502 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 456 503 … … 478 525 if(pcSPS->getScalingListFlag()) 479 526 { 527 #if H_MV5 528 #if H_MV 529 if ( pcSPS->getLayerId() > 0 ) 530 { 531 WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" ); 532 } 533 534 if ( pcSPS->getSpsInferScalingListFlag() ) 535 { 536 WRITE_CODE( pcSPS->getSpsScalingListRefLayerId( ), 6, "sps_scaling_list_ref_layer_id" ); 537 } 538 else 539 { 540 #endif 541 #endif 480 542 WRITE_FLAG( pcSPS->getScalingListPresentFlag() ? 1 : 0, "sps_scaling_list_data_present_flag" ); 481 543 if(pcSPS->getScalingListPresentFlag()) … … 486 548 codeScalingList( m_pcSlice->getScalingList() ); 487 549 } 550 #if H_MV5 551 #if H_MV 552 } 553 #endif 554 #endif 488 555 } 489 556 WRITE_FLAG( pcSPS->getUseAMP() ? 1 : 0, "amp_enabled_flag" ); … … 531 598 } 532 599 600 #if !H_MV5 533 601 #if H_MV 534 602 WRITE_FLAG( 1, "sps_extension_flag" ); … … 586 654 #endif 587 655 } 656 #else 657 #if !H_MV 658 WRITE_FLAG( 0, "sps_extension_flag" ); 659 #else 660 WRITE_FLAG( 1, "sps_extension_flag" ); 661 codeSPSExtension( pcSPS ); 662 #if !H_3D 663 WRITE_FLAG( 0, "sps_extension2_flag" ); 664 #else 665 WRITE_FLAG( 1, "sps_extension2_flag" ); 666 codeSPSExtension2( pcSPS, viewIndex, depthFlag ); 667 WRITE_FLAG( 0, "sps_extension3_flag" ); 668 #endif 669 #endif 670 } 671 672 #if H_MV 673 Void TEncCavlc::codeSPSExtension( TComSPS* pcSPS ) 674 { 675 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 676 WRITE_UVLC( 0, "sps_shvc_reserved_zero_idc" ); 677 } 678 #endif 679 680 #if H_3D 681 Void TEncCavlc::codeSPSExtension2( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) 682 { 683 #if H_3D_QTLPC 684 //GT: This has to go to VPS 685 if( depthFlag ) 686 { 687 WRITE_FLAG( pcSPS->getUseQTL() ? 1 : 0, "use_qtl_flag"); 688 WRITE_FLAG( pcSPS->getUsePC() ? 1 : 0, "use_pc_flag"); 689 } 690 #endif 691 if (!depthFlag ) 692 { 693 WRITE_UVLC( pcSPS->getCamParPrecision(), "cp_precision" ); 694 WRITE_FLAG( pcSPS->hasCamParInSliceHeader() ? 1 : 0, "cp_in_slice_header_flag" ); 695 if( !pcSPS->hasCamParInSliceHeader() ) 696 { 697 for( UInt uiIndex = 0; uiIndex < viewIndex; uiIndex++ ) 698 { 699 WRITE_SVLC( pcSPS->getCodedScale ()[ uiIndex ], "cp_scale" ); 700 WRITE_SVLC( pcSPS->getCodedOffset ()[ uiIndex ], "cp_off" ); 701 WRITE_SVLC( pcSPS->getInvCodedScale ()[ uiIndex ] + pcSPS->getCodedScale ()[ uiIndex ], "cp_inv_scale_plus_scale" ); 702 WRITE_SVLC( pcSPS->getInvCodedOffset()[ uiIndex ] + pcSPS->getCodedOffset()[ uiIndex ], "cp_inv_off_plus_off" ); 703 } 704 } 705 } 706 } 707 #endif 708 #endif 588 709 589 710 Void TEncCavlc::codeVPS( TComVPS* pcVPS ) … … 592 713 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 593 714 #if H_MV 715 #if H_MV5 716 WRITE_CODE( pcVPS->getMaxLayersMinus1(), 6, "vps_max_layers_minus1" ); 717 #else 594 718 WRITE_CODE( pcVPS->getMaxLayers() - 1, 6, "vps_max_layers_minus1" ); 719 #endif 595 720 #else 596 721 WRITE_CODE( 0, 6, "vps_reserved_zero_6bits" ); … … 675 800 } 676 801 } 802 #if !H_MV5 677 803 #if H_MV 678 804 WRITE_FLAG( 1, "vps_extension_flag" ); … … 848 974 } 849 975 } 850 #if H_3D_TMVP851 976 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); 852 #endif853 977 #else 854 978 WRITE_FLAG( 0, "vps_extension2_flag" ); … … 862 986 return; 863 987 } 988 #else 989 #if H_MV 990 WRITE_FLAG( 1, "vps_extension_flag" ); 991 m_pcBitIf->writeAlignOne(); 992 codeVPSExtension( pcVPS ); 993 #if H_3D 994 WRITE_FLAG( 1, "vps_extension2_flag" ); 995 m_pcBitIf->writeAlignOne(); 996 codeVPSExtension2( pcVPS ); 997 WRITE_FLAG( 0, "vps_extension3_flag" ); 998 #else 999 WRITE_FLAG( 0, "vps_extension2_flag" ); 1000 #endif 1001 #else 1002 WRITE_FLAG( 0, "vps_extension_flag" ); 1003 #endif 1004 //future extensions here.. 1005 } 1006 1007 #endif 1008 1009 1010 #if H_MV5 1011 #if H_MV 1012 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1013 { 1014 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1015 WRITE_CODE( pcVPS->getVpsVuiOffset( ), 16, "vps_vui_offset" ); // TBD 1016 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1017 1018 for( Int type = 0; type < MAX_NUM_SCALABILITY_TYPES; type++ ) 1019 { 1020 WRITE_FLAG( pcVPS->getScalabilityMaskFlag( type ) ? 1 : 0, "scalability_mask_flag[i]" ); 1021 } 1022 1023 for( Int sIdx = 0; sIdx < pcVPS->getNumScalabilityTypes( ) - ( pcVPS->getSplittingFlag() ? 1 : 0 ); sIdx++ ) 1024 { 1025 WRITE_CODE( pcVPS->getDimensionIdLen( sIdx ) - 1 , 3, "dimension_id_len_minus1[j]"); 1026 } 1027 1028 if ( pcVPS->getSplittingFlag() ) 1029 { // Ignore old dimension id length 1030 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 ); 1031 } 1032 1033 WRITE_FLAG( pcVPS->getVpsNuhLayerIdPresentFlag() ? 1 : 0, "vps_nuh_layer_id_present_flag"); 1034 1035 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1036 { 1037 if ( pcVPS->getVpsNuhLayerIdPresentFlag() ) 1038 { 1039 WRITE_CODE( pcVPS->getLayerIdInNuh( i ), 6, "layer_id_in_nuh[i]"); 1040 } 1041 else 1042 { 1043 assert( pcVPS->getLayerIdInNuh( i ) == i ); 1044 } 1045 1046 assert( pcVPS->getLayerIdInVps( pcVPS->getLayerIdInNuh( i ) ) == i ); 1047 1048 for( Int j = 0; j < pcVPS->getNumScalabilityTypes() ; j++ ) 1049 { 1050 if ( !pcVPS->getSplittingFlag() ) 1051 { 1052 WRITE_CODE( pcVPS->getDimensionId( i, j ), pcVPS->getDimensionIdLen( j ), "dimension_id[i][j]"); 1053 } 1054 else 1055 { 1056 assert( pcVPS->getDimensionId( i, j ) == pcVPS->inferDimensionId( i, j ) ); 1057 } 1058 } 1059 } 1060 1061 // GT spec says: trac #39 1062 // if ( pcVPS->getNumViews() > 1 ) 1063 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val. 1064 { 1065 WRITE_CODE( pcVPS->getViewIdLenMinus1( ), 4, "view_id_len_minus1" ); 1066 } 1067 1068 for( Int i = 0; i < pcVPS->getNumViews(); i++ ) 1069 { 1070 WRITE_CODE( pcVPS->getViewIdVal( i ), pcVPS->getViewIdLenMinus1( ) + 1, "view_id_val[i]" ); 1071 } 1072 1073 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1074 { 1075 for( Int j = 0; j < i; j++ ) 1076 { 1077 WRITE_FLAG( pcVPS->getDirectDependencyFlag( i, j ), "direct_dependency_flag[i][j]" ); 1078 } 1079 } 1080 1081 WRITE_FLAG( pcVPS->getMaxTidRefPresentFlag( ) ? 1 : 0 , "max_tid_ref_present_flag" ); 1082 1083 if ( pcVPS->getMaxTidRefPresentFlag() ) 1084 { 1085 for( Int i = 0; i < pcVPS->getMaxLayersMinus1(); i++ ) 1086 { 1087 WRITE_CODE( pcVPS->getMaxTidIlRefPicPlus1( i ), 3, "max_tid_il_ref_pics_plus1[i]" ); 1088 } 1089 } 1090 1091 WRITE_FLAG( pcVPS->getAllRefLayersActiveFlag( ) ? 1 : 0 , "all_ref_layers_active_flag" ); 1092 WRITE_CODE( pcVPS->getVpsNumberLayerSetsMinus1( ) , 10, "vps_number_layer_sets_minus1" ); 1093 WRITE_CODE( pcVPS->getVpsNumProfileTierLevelMinus1( ), 6, "vps_num_profile_tier_level_minus1" ); 1094 1095 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1096 { 1097 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1098 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1099 { 1100 WRITE_CODE( pcVPS->getProfileRefMinus1( i ), 6, "profile_ref_minus1[i]" ); 1101 } 1102 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1103 } 1104 1105 Int numOutputLayerSets = pcVPS->getVpsNumberLayerSetsMinus1( ) + 1; 1106 1107 WRITE_FLAG( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ? 1 : 0, "more_output_layer_sets_than_default_flag" ); 1108 1109 if ( pcVPS->getMoreOutputLayerSetsThanDefaultFlag( ) ) 1110 { 1111 WRITE_CODE( pcVPS->getNumAddOutputLayerSetsMinus1( ) , 10, "num_add_output_layer_sets_minus1" ); 1112 numOutputLayerSets += ( pcVPS->getNumAddOutputLayerSetsMinus1( ) + 1 ); 1113 } 1114 1115 if( numOutputLayerSets > 1) 1116 { 1117 WRITE_FLAG( pcVPS->getDefaultOneTargetOutputLayerFlag( ) ? 1 : 0, "default_one_target_output_layer_flag" ); 1118 } 1119 1120 for( Int i = 1; i < numOutputLayerSets; i++ ) 1121 { 1122 if( i > pcVPS->getVpsNumberLayerSetsMinus1( ) ) 1123 { 1124 WRITE_UVLC( pcVPS->getOutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" ); 1125 for( Int j = 0; j < pcVPS->getNumLayersInIdList( j ) - 1 ; j++ ) 1126 { 1127 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); 1128 } 1129 } 1130 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1131 { 1132 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1133 } 1134 } 1135 1136 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1137 if ( pcVPS->getRepFormatIdxPresentFlag() ) 1138 { 1139 WRITE_CODE( pcVPS->getVpsNumRepFormatsMinus1( ), 4, "vps_num_rep_formats_minus1" ); 1140 } 1141 1142 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1143 { 1144 TComRepFormat* pcRepFormat = pcVPS->getRepFormat(i); 1145 codeRepFormat( pcRepFormat ); 1146 } 1147 1148 if( pcVPS->getRepFormatIdxPresentFlag() ) 1149 { 1150 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1151 { 1152 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1153 { 1154 WRITE_CODE( pcVPS->getVpsRepFormatIdx( i ), 4, "vps_rep_format_idx" ); 1155 } 1156 } 1157 } 1158 1159 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); 1160 WRITE_FLAG( pcVPS->getCrossLayerIrapAlignedFlag( ) ? 1 : 0 , "cross_layer_irap_aligned_flag" ); 1161 WRITE_UVLC( pcVPS->getDirectDepTypeLenMinus2 ( ), "direct_dep_type_len_minus2"); 1162 1163 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1164 { 1165 for( Int j = 0; j < i; j++ ) 1166 { 1167 if (pcVPS->getDirectDependencyFlag( i, j) ) 1168 { 1169 assert ( pcVPS->getDirectDependencyType( i, j ) != -1 ); 1170 WRITE_CODE( pcVPS->getDirectDependencyType( i, j ),pcVPS->getDirectDepTypeLenMinus2( ) + 2, "direct_dependency_type[i][j]" ); 1171 } 1172 } 1173 } 1174 1175 WRITE_FLAG ( 0, "vps_shvc_reserved_zero_flag" ); 1176 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag( ) ? 1 : 0 , "vps_vui_present_flag" ); 1177 1178 if( pcVPS->getVpsVuiPresentFlag() ) 1179 { 1180 m_pcBitIf->writeAlignOne(); // vps_vui_alignment_bit_equal_to_one 1181 codeVPSVUI( pcVPS ); 1182 } 1183 } 1184 1185 Void TEncCavlc::codeRepFormat( TComRepFormat* pcRepFormat ) 1186 { 1187 assert( pcRepFormat ); 1188 1189 WRITE_CODE( pcRepFormat->getChromaFormatVpsIdc( ), 2, "chroma_format_vps_idc" ); 1190 1191 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1192 { 1193 WRITE_FLAG( pcRepFormat->getSeparateColourPlaneVpsFlag( ) ? 1 : 0 , "separate_colour_plane_vps_flag" ); 1194 } 1195 WRITE_CODE( pcRepFormat->getPicWidthVpsInLumaSamples( ), 16, "pic_width_vps_in_luma_samples" ); 1196 WRITE_CODE( pcRepFormat->getPicHeightVpsInLumaSamples( ), 16, "pic_height_vps_in_luma_samples" ); 1197 WRITE_CODE( pcRepFormat->getBitDepthVpsLumaMinus8( ), 4, "bit_depth_vps_luma_minus8" ); 1198 WRITE_CODE( pcRepFormat->getBitDepthVpsChromaMinus8( ), 4, "bit_depth_vps_chroma_minus8" ); 1199 } 1200 1201 Void TEncCavlc::codeVPSVUI( TComVPS* pcVPS ) 1202 { 1203 assert( pcVPS ); 1204 1205 TComVPSVUI* pcVPSVUI = pcVPS->getVPSVUI( ); 1206 1207 assert( pcVPSVUI ); 1208 1209 WRITE_FLAG( pcVPSVUI->getBitRatePresentVpsFlag( ) ? 1 : 0 , "bit_rate_present_vps_flag" ); 1210 WRITE_FLAG( pcVPSVUI->getPicRatePresentVpsFlag( ) ? 1 : 0 , "pic_rate_present_vps_flag" ); 1211 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1212 { 1213 for( Int i = 0; i <= pcVPS->getVpsNumberLayerSetsMinus1(); i++ ) 1214 { 1215 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1216 { 1217 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) 1218 { 1219 WRITE_FLAG( pcVPSVUI->getBitRatePresentFlag( i, j ) ? 1 : 0 , "bit_rate_present_flag" ); 1220 } 1221 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) 1222 { 1223 WRITE_FLAG( pcVPSVUI->getPicRatePresentFlag( i, j ) ? 1 : 0 , "pic_rate_present_flag" ); 1224 } 1225 if( pcVPSVUI->getBitRatePresentFlag( i, j ) ) 1226 { 1227 WRITE_CODE( pcVPSVUI->getAvgBitRate( i, j ), 16, "avg_bit_rate" ); 1228 WRITE_CODE( pcVPSVUI->getMaxBitRate( i, j ), 16, "max_bit_rate" ); 1229 } 1230 if( pcVPSVUI->getPicRatePresentFlag( i, j ) ) 1231 { 1232 WRITE_CODE( pcVPSVUI->getConstantPicRateIdc( i, j ), 2, "constant_pic_rate_idc" ); 1233 WRITE_CODE( pcVPSVUI->getAvgPicRate( i, j ), 16, "avg_pic_rate" ); 1234 } 1235 } 1236 } 1237 } 1238 1239 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1240 { 1241 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1242 { 1243 WRITE_FLAG( pcVPSVUI->getTileBoundariesAlignedFlag( i, j ) ? 1 : 0 , "tile_boundaries_aligned_flag" ); 1244 } 1245 } 1246 1247 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1248 1249 if( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ) 1250 { 1251 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1252 { 1253 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1254 { 1255 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1256 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1257 { 1258 WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" ); 1259 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1260 { 1261 WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" ); 1262 } 1263 } 1264 } 1265 } 1266 } 1267 } 1268 #endif 1269 1270 #if H_3D 1271 Void TEncCavlc::codeVPSExtension2( TComVPS* pcVPS ) 1272 { 1273 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1274 { 1275 if (i!= 0) 1276 { 1277 if ( !( pcVPS->getDepthId( i ) == 1 ) ) 1278 { 1279 #if H_3D_IV_MERGE 1280 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1281 #endif 1282 #if H_3D_ARP 1283 WRITE_FLAG( pcVPS->getUseAdvRP ( i ) ? 1 : 0, "iv_res_pred_flag[i]" ); 1284 #endif 1285 #if H_3D_NBDV_REF 1286 WRITE_FLAG( pcVPS->getDepthRefinementFlag ( i ) ? 1 : 0 , "depth_refinement_flag[i]"); 1287 #endif 1288 #if H_3D_VSP 1289 WRITE_FLAG( pcVPS->getViewSynthesisPredFlag( i ) ? 1 : 0 , "view_synthesis_pred_flag[i]"); 1290 #endif 1291 } 1292 else 1293 { 1294 WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 , "vps_depth_modes_flag[i]" ); 1295 //WRITE_FLAG( pcVPS->getLimQtPredFlag ( i ) ? 1 : 0 , "lim_qt_pred_flag[i]" ); 1296 #if H_3D_DIM_DLT 1297 if( pcVPS->getVpsDepthModesFlag( i ) ) 1298 { 1299 WRITE_FLAG( pcVPS->getUseDLTFlag( i ) ? 1 : 0, "dlt_flag[i]" ); 1300 } 1301 if( pcVPS->getUseDLTFlag( i ) ) 1302 { 1303 // code mapping 1304 WRITE_UVLC(pcVPS->getNumDepthValues(i), "num_depth_values_in_dlt[i]"); 1305 for(Int d=0; d<pcVPS->getNumDepthValues(i); d++) 1306 { 1307 WRITE_UVLC( pcVPS->idx2DepthValue(i, d), "dlt_depth_value[i][d]" ); 1308 } 1309 } 1310 #endif 1311 #if LGE_INTER_SDC_E0156 1312 WRITE_FLAG( pcVPS->getInterSDCFlag( i ) ? 1 : 0, "depth_inter_SDC_flag" ); 1313 #endif 1314 } 1315 } 1316 } 1317 #if H_3D_TMVP 1318 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); 1319 #endif 1320 } 1321 #endif 1322 #endif 864 1323 865 1324 Void TEncCavlc::codeSliceHeader ( TComSlice* pcSlice ) … … 911 1370 { 912 1371 #if H_MV 1372 #if H_MV5 1373 Int esb = 0; //Don't use i, otherwise will shadow something below 1374 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1375 { 1376 esb++; 1377 WRITE_FLAG( pcSlice->getPocResetFlag( ) ? 1 : 0 , "poc_reset_flag" ); 1378 } 1379 1380 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > esb ) 1381 { 1382 esb++; 1383 WRITE_FLAG( pcSlice->getDiscardableFlag( ) ? 1 : 0 , "discardable_flag" ); 1384 } 1385 1386 for (; esb < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); esb++) 1387 #else 913 1388 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 914 1389 { … … 917 1392 918 1393 for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) 1394 #endif 919 1395 #else 920 1396 for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++) … … 1054 1530 } 1055 1531 #if H_MV 1532 #if H_MV5 1533 Int layerId = pcSlice->getLayerId(); 1534 if( pcSlice->getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && vps->getNumDirectRefLayers( layerId ) > 0 ) 1535 { 1536 WRITE_FLAG( pcSlice->getInterLayerPredEnabledFlag( ) ? 1 : 0 , "inter_layer_pred_enabled_flag" ); 1537 if( pcSlice->getInterLayerPredEnabledFlag() && vps->getNumDirectRefLayers( layerId ) > 1 ) 1538 { 1539 if( !vps->getMaxOneActiveRefLayerFlag()) 1540 { 1541 WRITE_CODE( pcSlice->getNumInterLayerRefPicsMinus1( ), pcSlice->getNumInterLayerRefPicsMinus1Len( ), "num_inter_layer_ref_pics_minus1" ); 1542 } 1543 if ( pcSlice->getNumActiveRefLayerPics() != vps->getNumDirectRefLayers( layerId ) ) 1544 { 1545 for( Int idx = 0; idx < pcSlice->getNumActiveRefLayerPics(); idx++ ) 1546 { 1547 WRITE_CODE( pcSlice->getInterLayerPredLayerIdc( idx ), pcSlice->getInterLayerPredLayerIdcLen( ), "inter_layer_pred_layer_idc" ); 1548 } 1549 } 1550 } 1551 } 1552 #else 1056 1553 Int layerIdInVps = pcSlice->getLayerIdInVps(); 1057 1554 if( pcSlice->getLayerId() > 0 && vps->getNumDirectRefLayers( layerIdInVps ) > 0 ) … … 1076 1573 } 1077 1574 1575 #endif 1078 1576 #endif 1079 1577 if(pcSlice->getSPS()->getUseSAO()) … … 1180 1678 if ( pcSlice->getEnableTMVPFlag() ) 1181 1679 { 1680 #if !H_MV5 1182 1681 #if H_MV 1183 1682 if( pcSlice->getLayerId() > 0 && pcSlice->getNumActiveMotionPredRefLayers() > 0 ) … … 1192 1691 { 1193 1692 #endif 1693 #endif 1194 1694 if ( pcSlice->getSliceType() == B_SLICE ) 1195 1695 { … … 1204 1704 } 1205 1705 } 1706 #if !H_MV5 1206 1707 #if H_MV 1207 1708 } 1709 #endif 1208 1710 #endif 1209 1711 if ( (pcSlice->getPPS()->getUseWP() && pcSlice->getSliceType()==P_SLICE) || (pcSlice->getPPS()->getWPBiPred() && pcSlice->getSliceType()==B_SLICE) ) -
trunk/source/Lib/TLibEncoder/TEncCavlc.h
r608 r622 84 84 UInt getCoeffCost () { return m_uiCoeffCost; } 85 85 Void codeVPS ( TComVPS* pcVPS ); 86 #if H_MV5 87 #if H_MV 88 Void codeVPSExtension ( TComVPS *pcVPS ); 89 Void codeRepFormat ( TComRepFormat* pcRepFormat ); 90 Void codeVPSVUI ( TComVPS* pcVPS ); 91 #endif 92 #endif 86 93 Void codeVUI ( TComVUI *pcVUI, TComSPS* pcSPS ); 94 #if H_MV5 95 #if H_MV 96 Void codeSPSExtension ( TComSPS* pcSPS ); 97 #endif 98 #endif 87 99 #if H_3D 100 #if H_MV5 101 Void codeVPSExtension2 ( TComVPS* pcVPS ); 102 Void codeSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 103 #endif 88 104 Void codeSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); 89 105 #else -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r608 r622 77 77 Int m_interLayerPredLayerIdc [MAX_NUM_REF_PICS]; 78 78 Int m_interViewRefPosL[2][MAX_NUM_REF_PICS]; 79 #if !H_MV5 79 80 Int m_collocatedRefLayerIdx; 81 #endif 80 82 #endif 81 83 GOPEntry() … … 95 97 #if H_MV 96 98 , m_numActiveRefLayerPics(0) 99 #if !H_MV5 97 100 , m_collocatedRefLayerIdx(-1) 101 #endif 98 102 #endif 99 103 { … … 357 361 Int m_layerIdInVps; 358 362 Int m_viewId; 363 #if H_MV5 364 Int m_viewIndex; 365 #endif 359 366 #endif 360 367 361 368 #if H_3D 369 #if !H_MV5 362 370 Int m_viewIndex; 371 #endif 363 372 Bool m_isDepth; 364 373 … … 417 426 , m_layerIdInVps(-1) 418 427 , m_viewId(-1) 428 #if H_MV5 429 , m_viewIndex(-1) 430 #endif 419 431 #if H_3D 432 #if !H_MV5 420 433 , m_viewIndex(-1) 434 #endif 421 435 , m_isDepth(false) 422 436 , m_bUseVSO(false) … … 451 465 Void setViewId ( Int viewId ) { m_viewId = viewId; } 452 466 Int getViewId () { return m_viewId; } 453 #if H_ 3D467 #if H_MV5 454 468 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 455 469 Int getViewIndex () { return m_viewIndex; } 470 #endif 471 #if H_3D 472 #if !H_MV5 473 Void setViewIndex ( Int viewIndex ) { m_viewIndex = viewIndex; } 474 Int getViewIndex () { return m_viewIndex; } 475 #endif 456 476 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 457 477 Bool getIsDepth () { return m_isDepth; } -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r608 r622 416 416 417 417 Bool bTrySplitDQP = true; 418 #if MTK_VSP_FIX_ALIGN_WD_E0172418 #if H_3D_VSP 419 419 DisInfo DvInfo; 420 420 DvInfo.bDV = false; … … 530 530 531 531 #if H_3D_NBDV 532 #if !MTK_VSP_FIX_ALIGN_WD_E0172533 DisInfo DvInfo;534 DvInfo.bDV = false;535 DvInfo.m_acNBDV.setZero();536 DvInfo.m_aVIdxCan = 0;537 #if H_3D_NBDV_REF538 DvInfo.m_acDoNBDV.setZero();539 #endif540 #endif541 532 if( rpcTempCU->getSlice()->getSliceType() != I_SLICE ) 542 533 { … … 598 589 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP );//by Competition for inter_2Nx2N 599 590 #endif 600 #if MTK_VSP_FIX_ALIGN_WD_E0172591 #if H_3D_VSP 601 592 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 602 593 #endif … … 611 602 #endif 612 603 rpcTempCU->initEstData( uiDepth, iQP ); 613 #if MTK_VSP_FIX_ALIGN_WD_E0172604 #if H_3D_VSP 614 605 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 615 606 #endif … … 638 629 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N ); rpcTempCU->initEstData( uiDepth, iQP ); 639 630 #endif 640 #if MTK_VSP_FIX_ALIGN_WD_E0172631 #if H_3D_VSP 641 632 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 642 633 #endif … … 725 716 #endif 726 717 rpcTempCU->initEstData( uiDepth, iQP ); 727 #if MTK_VSP_FIX_ALIGN_WD_E0172718 #if H_3D_VSP 728 719 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 729 720 #endif … … 745 736 #endif 746 737 rpcTempCU->initEstData( uiDepth, iQP ); 747 #if MTK_VSP_FIX_ALIGN_WD_E0172738 #if H_3D_VSP 748 739 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 749 740 #endif … … 765 756 #endif 766 757 rpcTempCU->initEstData( uiDepth, iQP ); 767 #if MTK_VSP_FIX_ALIGN_WD_E0172758 #if H_3D_VSP 768 759 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 769 760 #endif … … 804 795 #endif 805 796 rpcTempCU->initEstData( uiDepth, iQP ); 806 #if MTK_VSP_FIX_ALIGN_WD_E0172797 #if H_3D_VSP 807 798 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 808 799 #endif … … 824 815 #endif 825 816 rpcTempCU->initEstData( uiDepth, iQP ); 826 #if MTK_VSP_FIX_ALIGN_WD_E0172817 #if H_3D_VSP 827 818 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 828 819 #endif … … 848 839 #endif 849 840 rpcTempCU->initEstData( uiDepth, iQP ); 850 #if MTK_VSP_FIX_ALIGN_WD_E0172841 #if H_3D_VSP 851 842 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 852 843 #endif … … 868 859 #endif 869 860 rpcTempCU->initEstData( uiDepth, iQP ); 870 #if MTK_VSP_FIX_ALIGN_WD_E0172861 #if H_3D_VSP 871 862 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 872 863 #endif … … 894 885 #endif 895 886 rpcTempCU->initEstData( uiDepth, iQP ); 896 #if MTK_VSP_FIX_ALIGN_WD_E0172887 #if H_3D_VSP 897 888 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 898 889 #endif … … 914 905 #endif 915 906 rpcTempCU->initEstData( uiDepth, iQP ); 916 #if MTK_VSP_FIX_ALIGN_WD_E0172907 #if H_3D_VSP 917 908 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 918 909 #endif … … 934 925 #endif 935 926 rpcTempCU->initEstData( uiDepth, iQP ); 936 #if MTK_VSP_FIX_ALIGN_WD_E0172927 #if H_3D_VSP 937 928 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 938 929 #endif … … 954 945 #endif 955 946 rpcTempCU->initEstData( uiDepth, iQP ); 956 #if MTK_VSP_FIX_ALIGN_WD_E0172947 #if H_3D_VSP 957 948 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 958 949 #endif … … 968 959 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnU ); 969 960 rpcTempCU->initEstData( uiDepth, iQP ); 970 #if MTK_VSP_FIX_ALIGN_WD_E0172961 #if H_3D_VSP 971 962 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 972 963 #endif 973 964 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2NxnD ); 974 965 rpcTempCU->initEstData( uiDepth, iQP ); 975 #if MTK_VSP_FIX_ALIGN_WD_E0172966 #if H_3D_VSP 976 967 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 977 968 #endif … … 983 974 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nLx2N ); 984 975 rpcTempCU->initEstData( uiDepth, iQP ); 985 #if MTK_VSP_FIX_ALIGN_WD_E0172976 #if H_3D_VSP 986 977 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 987 978 #endif 988 979 xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_nRx2N ); 989 980 rpcTempCU->initEstData( uiDepth, iQP ); 990 #if MTK_VSP_FIX_ALIGN_WD_E0172981 #if H_3D_VSP 991 982 rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth); 992 983 #endif … … 1761 1752 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 1762 1753 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 1763 #if MTK_VSP_FIX_ALIGN_WD_E01721764 1754 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 1765 1755 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,inheritedVSPDisInfo, numValidMergeCand ); 1766 #else1767 #if MTK_VSP_FIX_E01721768 Int vspDir[MRG_MAX_NUM_CANDS_MEM];1769 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);1770 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag,vspDir, numValidMergeCand );1771 #else1772 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );1773 #endif1774 #endif//end of MTK_VSP_FIX_ALIGN_WD_E01721775 1756 #else 1776 1757 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 1840 1821 #if H_3D_VSP 1841 1822 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1842 #if MTK_VSP_FIX_ALIGN_WD_E01721843 1823 rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth ); 1844 #endif1845 #if MTK_VSP_FIX_E01721846 rpcTempCU->setVSPDirSubParts( vspDir[uiMergeCand], 0, 0, uhDepth );1847 #endif1848 1824 #endif 1849 1825 rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r608 r622 471 471 pcPic->setCurrSliceIdx(0); 472 472 473 474 #if H_MV5 475 #if H_MV 476 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() ); 477 #else 478 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 479 #endif 480 #else 473 481 #if H_3D 474 482 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() ); 475 483 #else 476 484 m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() ); 485 #endif 477 486 #endif 478 487 pcSlice->setLastIDR(m_iLastIDR); 479 488 pcSlice->setSliceIdx(0); 480 489 #if H_MV 490 #if H_MV5 491 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 492 #else 481 493 pcSlice->setRefPicSetInterLayer ( &m_refPicSetInterLayer ); 494 #endif 482 495 pcPic ->setLayerId ( getLayerId() ); 483 496 pcPic ->setViewId ( getViewId() ); … … 642 655 refPicListModification->setRefPicListModificationFlagL1(0); 643 656 #if H_MV 657 #if H_MV5 658 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 1 ) 659 { 660 // Some more sophisticated algorithm to determine discardable_flag might be added here. 661 pcSlice->setDiscardableFlag ( false ); 662 } 663 664 TComVPS* vps = pcSlice->getVPS(); 665 Int numDirectRefLayers = vps ->getNumDirectRefLayers( getLayerId() ); 666 GOPEntry gopEntry = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && getLayerId() > 0) ? MAX_GOP : iGOPid ); 667 668 if ( getLayerId() > 0 && !vps->getAllRefLayersActiveFlag() && numDirectRefLayers > 0 ) 669 { 670 pcSlice->setInterLayerPredEnabledFlag ( gopEntry.m_numActiveRefLayerPics > 0 ); 671 if ( pcSlice->getInterLayerPredEnabledFlag() && numDirectRefLayers > 1 ) 672 { 673 if ( !vps->getMaxOneActiveRefLayerFlag() ) 674 { 675 pcSlice->setNumInterLayerRefPicsMinus1( gopEntry.m_numActiveRefLayerPics - 1 ); 676 } 677 if ( gopEntry.m_numActiveRefLayerPics != vps->getNumDirectRefLayers( getLayerId() ) ) 678 { 679 for (Int i = 0; i < gopEntry.m_numActiveRefLayerPics; i++ ) 680 { 681 pcSlice->setInterLayerPredLayerIdc( i, gopEntry.m_interLayerPredLayerIdc[ i ] ); 682 } 683 } 684 } 685 } 686 assert( pcSlice->getNumActiveRefLayerPics() == gopEntry.m_numActiveRefLayerPics ); 687 688 pcSlice->createInterLayerReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 689 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); 690 pcSlice->setNumRefIdx(REF_PIC_LIST_1,min(gopEntry.m_numRefPicsActive,( pcSlice->getRPS()->getNumberOfPictures() + (Int) m_refPicSetInterLayer0.size() + (Int) m_refPicSetInterLayer1.size()) ) ); 691 692 std::vector< TComPic* > tempRefPicLists[2]; 693 std::vector< Bool > usedAsLongTerm [2]; 694 Int numPocTotalCurr; 695 696 pcSlice->getTempRefPicLists( rcListPic, m_refPicSetInterLayer0, m_refPicSetInterLayer1, tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 697 698 699 xSetRefPicListModificationsMv( tempRefPicLists, pcSlice, iGOPid ); 700 #else 644 701 if ( pcSlice->getPPS()->getNumExtraSliceHeaderBits() > 0 ) 645 702 { … … 692 749 } 693 750 751 #endif 694 752 #else 695 753 pcSlice->setNumRefIdx(REF_PIC_LIST_0,min(m_pcCfg->getGOPEntry(iGOPid).m_numRefPicsActive,pcSlice->getRPS()->getNumberOfPictures())); … … 702 760 703 761 // Set reference list 762 #if H_MV5 763 #if H_MV 764 pcSlice->setRefPicList( tempRefPicLists, usedAsLongTerm, numPocTotalCurr ); 765 #else 766 pcSlice->setRefPicList ( rcListPic ); 767 #endif 768 769 #if H_3D_ARP 770 //GT: This seems to be broken when layerId in vps is not equal to layerId in nuh 771 pcSlice->setARPStepNum(); 772 if(pcSlice->getARPStepNum() > 1) 773 { 774 for(Int iLayerId = 0; iLayerId < getLayerId(); iLayerId ++ ) 775 { 776 Int iViewIdx = pcSlice->getVPS()->getViewIndex(iLayerId); 777 Bool bIsDepth = ( pcSlice->getVPS()->getDepthId ( iLayerId ) == 1 ); 778 if( iViewIdx<getViewIndex() && !bIsDepth ) 779 { 780 pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx ); 781 } 782 } 783 } 784 #endif 785 #else 704 786 #if H_MV 705 787 pcSlice->setRefPicList( rcListPic, m_refPicSetInterLayer ); … … 722 804 pcSlice->setRefPicList ( rcListPic ); 723 805 #endif 724 806 #endif 725 807 #if H_3D 726 808 pcSlice->setIvPicLists( m_ivPicLists ); … … 1816 1898 digestStr = digestToString(sei_recon_picture_digest.digest, 4); 1817 1899 } 1900 #if H_MV_FIX_LID_PIC_HASH_SEI_T40 1901 OutputNALUnit nalu(NAL_UNIT_SUFFIX_SEI, pcSlice->getTLayer(), getLayerId() ); 1902 #else 1818 1903 OutputNALUnit nalu(NAL_UNIT_SUFFIX_SEI, pcSlice->getTLayer()); 1904 #endif 1819 1905 1820 1906 /* write the SEI messages */ … … 2080 2166 pcPic->setReconMark ( true ); 2081 2167 #if H_MV 2168 #if H_MV5 2169 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 2170 #else 2082 2171 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer ); 2172 #endif 2083 2173 std::vector<Int> temp; 2084 2174 TComSlice::markCurrPic( pcPic ); … … 2912 3002 2913 3003 #if H_MV 3004 #if H_MV5 3005 Void TEncGOP::xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ) 3006 { 3007 3008 if( pcSlice->getSliceType() == I_SLICE || !(pcSlice->getPPS()->getListsModificationPresentFlag()) || pcSlice->getNumActiveRefLayerPics() == 0 ) 3009 { 3010 return; 3011 } 3012 3013 GOPEntry ge = m_pcCfg->getGOPEntry( (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId( ) > 0) ) ? MAX_GOP : iGOPid ); 3014 assert( ge.m_numActiveRefLayerPics == pcSlice->getNumActiveRefLayerPics() ); 3015 3016 Int numPicsInTempList = pcSlice->getNumRpsCurrTempList(); 3017 3018 // GT: check if SliceType should be checked here. 3019 for (Int li = 0; li < 2; li ++) // Loop over lists L0 and L1 3020 { 3021 Int numPicsInFinalRefList = pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); 3022 3023 Int finalIdxToTempIdxMap[16]; 3024 for( Int k = 0; k < 16; k++ ) 3025 { 3026 finalIdxToTempIdxMap[ k ] = -1; 3027 } 3028 3029 Bool isModified = false; 3030 if ( numPicsInTempList > 1 ) 3031 { 3032 for( Int k = 0; k < pcSlice->getNumActiveRefLayerPics(); k++ ) 3033 { 3034 // get position in temp. list 3035 Int refPicLayerId = pcSlice->getRefPicLayerId(k); 3036 Int idxInTempList = 0; 3037 for (; idxInTempList < numPicsInTempList; idxInTempList++) 3038 { 3039 if ( (tempPicLists[li][idxInTempList])->getLayerId() == refPicLayerId ) 3040 { 3041 break; 3042 } 3043 } 3044 3045 Int idxInFinalList = ge.m_interViewRefPosL[ li ][ k ]; 3046 3047 // Add negative from behind 3048 idxInFinalList = ( idxInFinalList < 0 )? ( numPicsInTempList + idxInFinalList ) : idxInFinalList; 3049 3050 Bool curIsModified = ( idxInFinalList != idxInTempList ) && ( ( idxInTempList < numPicsInFinalRefList ) || ( idxInFinalList < numPicsInFinalRefList ) ) ; 3051 if ( curIsModified ) 3052 { 3053 isModified = true; 3054 assert( finalIdxToTempIdxMap[ idxInFinalList ] == -1 ); // Assert when two inter layer reference pictures are sorted to the same position 3055 } 3056 finalIdxToTempIdxMap[ idxInFinalList ] = idxInTempList; 3057 } 3058 } 3059 3060 TComRefPicListModification* refPicListModification = pcSlice->getRefPicListModification(); 3061 refPicListModification->setRefPicListModificationFlagL( li, isModified ); 3062 3063 if( isModified ) 3064 { 3065 Int refIdx = 0; 3066 3067 for( Int i = 0; i < numPicsInFinalRefList; i++ ) 3068 { 3069 if( finalIdxToTempIdxMap[i] >= 0 ) 3070 { 3071 refPicListModification->setRefPicSetIdxL( li, i, finalIdxToTempIdxMap[i] ); 3072 } 3073 else 3074 { 3075 ///* Fill gaps with temporal references */// 3076 // Forward inter layer reference pictures 3077 while( ( refIdx < numPicsInTempList ) && ( tempPicLists[li][refIdx]->getLayerId() != getLayerId()) ) 3078 { 3079 refIdx++; 3080 } 3081 refPicListModification->setRefPicSetIdxL( li, i, refIdx ); 3082 refIdx++; 3083 } 3084 } 3085 } 3086 } 3087 } 3088 #else 2914 3089 Void TEncGOP::xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ) 2915 3090 { … … 2975 3150 } 2976 3151 #endif 3152 #endif 2977 3153 //! \} -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r608 r622 99 99 #if H_MV 100 100 TComPicLists* m_ivPicLists; 101 #if H_MV5 102 std::vector<TComPic*> m_refPicSetInterLayer0; 103 std::vector<TComPic*> m_refPicSetInterLayer1; 104 #else 101 105 std::vector<TComPic*> m_refPicSetInterLayer; 106 #endif 102 107 103 108 Int m_pocLastCoded; … … 211 216 } 212 217 #if H_MV 218 #if H_MV5 219 Void xSetRefPicListModificationsMv( std::vector<TComPic*> tempPicLists[2], TComSlice* pcSlice, UInt iGOPid ); 220 #else 213 221 Void xSetRefPicListModificationsMv( TComSlice* pcSlice, UInt iGOPid ); 222 #endif 214 223 #endif 215 224 Void dblMetric( TComPic* pcPic, UInt uiNumSlices ); -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r608 r622 95 95 #if H_3D_DIM_DMM 96 96 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 97 #if !SEC_DMM2_E0146 97 #if !SEC_DMM2_E0146_HHIFIX 98 98 , m_cDmm2DataSCModel ( 1, 1, NUM_DMM2_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 99 99 #endif … … 177 177 #if H_3D_DIM_DMM 178 178 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 179 #if !SEC_DMM2_E0146 179 #if !SEC_DMM2_E0146_HHIFIX 180 180 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 181 181 #endif … … 268 268 #if H_3D_DIM_DMM 269 269 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA ); 270 #if !SEC_DMM2_E0146 270 #if !SEC_DMM2_E0146_HHIFIX 271 271 curCost += m_cDmm2DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM2_DATA ); 272 272 #endif … … 340 340 #if H_3D_DIM_DMM 341 341 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA ); 342 #if !SEC_DMM2_E0146 342 #if !SEC_DMM2_E0146_HHIFIX 343 343 m_cDmm2DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM2_DATA ); 344 344 #endif … … 549 549 } 550 550 551 #if !SEC_DMM2_E0146 551 #if !SEC_DMM2_E0146_HHIFIX 552 552 Void TEncSbac::xCodeDmm2Offset( Int iOffset ) 553 553 { … … 649 649 // residual flag 650 650 m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) ); 651 #if H_MV_ENC_DEC_TRAC 652 DTRACE_CU("sdc_residual_flag[i]", uiResidual) 653 #endif 651 654 652 655 if (uiResidual) … … 654 657 // encode sign bit of residual 655 658 m_pcBinIf->encodeBinEP( uiSign ); 659 #if H_MV_ENC_DEC_TRAC 660 DTRACE_CU("sdc_residual_sign_flag[i]", uiSign) 661 #endif 656 662 657 663 #if H_3D_DIM_DLT … … 664 670 // encode residual magnitude 665 671 uiAbsIdx -= 1; 672 673 #if H_MV_ENC_DEC_TRAC 674 DTRACE_CU("sdc_residual_abs_minus1[i]", uiAbsIdx) 675 #endif 676 666 677 // prefix part 667 678 if ( uiAbsIdx == 0 ) 679 { 668 680 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 681 } 669 682 else 670 683 { … … 679 692 } 680 693 if ( uiAbsIdx < uiPrefixThreshold ) 694 { 681 695 m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) ); 682 // suffix part696 } 683 697 else 684 { 698 { // suffix part 685 699 uiAbsIdx -= uiPrefixThreshold; 686 700 UInt uiSuffixLength = numBitsForValue(uiNumDepthValues - uiPrefixThreshold); … … 1226 1240 xCodeDmm1WedgeIdx( pcCU->getDmmWedgeTabIdx( dimType, absPartIdx ), g_dmm1TabIdxBits[pcCU->getIntraSizeIdx(absPartIdx)] ); 1227 1241 } break; 1228 #if !SEC_DMM2_E0146 1242 #if !SEC_DMM2_E0146_HHIFIX 1229 1243 case( DMM2_IDX ): 1230 1244 { … … 1285 1299 #else 1286 1300 #if LGE_SDC_REMOVE_DC_E0158 1287 #if SEC_DMM2_E0146 1301 #if SEC_DMM2_E0146_HHIFIX 1288 1302 UInt codeWordTable[3][7] = {{0, 0, 0, 2, 0,6, 7},{0, 2, 3, 4, 5, 6, 7},{0, 1, 0, 0, 0, 0, 0}}; 1289 1303 UInt codeWordLenTable[3][7] = {{0, 1, 0, 2, 0,3, 3},{2, 3, 3, 3, 3, 3, 3},{1, 1, 0, 0, 0, 0, 0}}; … … 1293 1307 #endif 1294 1308 #else 1295 #if SEC_DMM2_E0146 1309 #if SEC_DMM2_E0146_HHIFIX 1296 1310 UInt codeWordTable[3][8] = {{0, 0, 0, 2, 0,6, 0, 7},{0, 2, 3, 4, 5, 6, 14, 15},{0, 2, 0, 0, 0, 0, 3, 0}}; 1297 1311 UInt codeWordLenTable[3][8] = {{0, 1, 0, 2, 0,3, 0, 3},{2, 3, 3, 3, 3, 3, 4, 4},{1, 2, 0, 0, 0, 0, 2, 0}}; … … 1318 1332 case DMM3_IDX: codeIdx = 5; break; 1319 1333 #if LGE_SDC_REMOVE_DC_E0158 1320 #if SEC_DMM2_E0146 1334 #if SEC_DMM2_E0146_HHIFIX 1321 1335 case RBC_IDX: codeIdx = 6; break; 1322 1336 #else … … 1325 1339 #endif 1326 1340 #else 1327 #if SEC_DMM2_E0146 1341 #if SEC_DMM2_E0146_HHIFIX 1328 1342 case RBC_IDX: codeIdx = 7; break; 1329 1343 #else -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r608 r622 121 121 #if H_3D_DIM_DMM 122 122 Void xCodeDmm1WedgeIdx ( UInt uiTabIdx, Int iNumBit ); 123 #if !SEC_DMM2_E0146 123 #if !SEC_DMM2_E0146_HHIFIX 124 124 Void xCodeDmm2Offset ( Int iOffset ); 125 125 #endif … … 256 256 #if H_3D_DIM_DMM 257 257 ContextModel3DBuffer m_cDmm1DataSCModel; 258 #if !SEC_DMM2_E0146 258 #if !SEC_DMM2_E0146_HHIFIX 259 259 ContextModel3DBuffer m_cDmm2DataSCModel; 260 260 #endif -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r608 r622 2851 2851 { 2852 2852 2853 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2853 #if SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 2854 2854 Int threshold = max(((pcCU->getQP(0))>>3)-1,3); 2855 2855 Int varThreshold = (Int)( threshold * threshold - 8 ); … … 2857 2857 #endif 2858 2858 2859 2860 2859 #if H_3D_DIM_DMM 2861 2860 if( m_pcEncCfg->getUseDMM() 2862 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2863 && (uiRdModeList[0] != 0|| varCU >= varThreshold)2861 #if SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 2862 && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold) 2864 2863 #endif 2865 2864 ) … … 2878 2877 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 2879 2878 } break; 2880 #if !SEC_DMM2_E0146 2879 #if !SEC_DMM2_E0146_HHIFIX 2881 2880 case( DMM2_IDX ): 2882 2881 { … … 2893 2892 case( DMM3_IDX ): 2894 2893 { 2895 #if LGE_PKU_DMM3_OVERLAP_E0159 2894 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 2896 2895 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 2897 2896 TComDataCU* pcColTexCU = pcPicTex->getCU( pcCU->getAddr() ); … … 2903 2902 #endif 2904 2903 UInt uiIntraTabIdx = 0; 2904 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 2905 xSearchDmm3Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, uiIntraTabIdx, uiColTexIntraDir ); 2906 #else 2905 2907 xSearchDmm3Wedge( pcCU, uiPartOffset, piOrg, uiStride, uiWidth, uiHeight, uiTabIdx, uiIntraTabIdx ); 2908 #endif 2906 2909 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dmmType, uiPartOffset, uiDepth + uiInitTrDepth ); 2907 2910 pcCU->setDmm3IntraTabIdxSubParts( uiIntraTabIdx, uiPartOffset, uiDepth + uiInitTrDepth ); 2908 2911 biSegmentation = &(g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])][uiTabIdx]); 2909 #if LGE_PKU_DMM3_OVERLAP_E0159 2912 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 2910 2913 } 2911 2914 #endif … … 2938 2941 #if H_3D_DIM_RBC 2939 2942 if( m_pcEncCfg->getUseRBC() 2940 #if SCU_HS_FAST_DEPTH_INTRA_E0238 2941 && (uiRdModeList[0] != 0|| varCU >= varThreshold)2943 #if SCU_HS_FAST_DEPTH_INTRA_E0238_HHIFIX 2944 && (uiRdModeList[0] != PLANAR_IDX || varCU >= varThreshold) 2942 2945 #endif 2943 2946 ) … … 3600 3603 #if H_3D_VSP 3601 3604 , Int* vspFlag 3602 #if MTK_VSP_FIX_ALIGN_WD_E01723603 3605 , InheritedVSPDisInfo* inheritedVSPDisInfo 3604 #endif3605 #if MTK_VSP_FIX_E01723606 , Int* vspDir3607 #endif3608 3606 #endif 3609 3607 , Int& numValidMergeCand … … 3625 3623 #if H_3D_VSP 3626 3624 , vspFlag 3627 #if MTK_VSP_FIX_ALIGN_WD_E01723628 3625 , inheritedVSPDisInfo 3629 #endif3630 #if MTK_VSP_FIX_E01723631 , vspDir3632 #endif3633 3626 #endif 3634 3627 , numValidMergeCand … … 3642 3635 #if H_3D_VSP 3643 3636 , vspFlag 3644 #if MTK_VSP_FIX_ALIGN_WD_E01723645 3637 , inheritedVSPDisInfo 3646 #endif3647 #if MTK_VSP_FIX_E01723648 , vspDir3649 #endif3650 3638 #endif 3651 3639 , numValidMergeCand 3652 3640 ); 3653 3641 } 3654 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E01723642 #if H_3D_VSP 3655 3643 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours,vspFlag, numValidMergeCand ); 3656 3644 #else 3657 3645 xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3658 3646 #endif 3647 3659 3648 3660 3649 ruiCost = MAX_UINT; … … 3672 3661 #if H_3D_VSP 3673 3662 pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3674 #if MTK_VSP_FIX_ALIGN_WD_E01723675 3663 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) ); 3676 #endif3677 #if MTK_VSP_FIX_E01723678 pcCU->setVSPDirSubParts( vspDir[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );3679 #endif3680 3664 #endif 3681 3665 … … 3707 3691 * \returns Void 3708 3692 */ 3709 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E01723693 #if H_3D_VSP 3710 3694 Void TEncSearch::xRestrictBipredMergeCand( TComDataCU* pcCU, UInt puIdx, TComMvField* mvFieldNeighbours, UChar* interDirNeighbours, Int* vspFlag, Int numValidMergeCand ) 3711 3695 #else … … 3717 3701 for( UInt mergeCand = 0; mergeCand < numValidMergeCand; ++mergeCand ) 3718 3702 { 3719 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E01723703 #if H_3D_VSP 3720 3704 if ( (interDirNeighbours[mergeCand] == 3) && (vspFlag[mergeCand] == false) ) 3721 3705 #else … … 3848 3832 #if H_3D_VSP 3849 3833 pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) ); 3850 #if MTK_VSP_FIX_E01723851 pcCU->setVSPDirSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );3852 #endif3853 3834 #endif 3854 3835 … … 4346 4327 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 4347 4328 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 4348 #if MTK_VSP_FIX_ALIGN_WD_E01724349 4329 InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM]; 4350 4330 UInt uiAbsPartIdx = 0; … … 4354 4334 DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx); 4355 4335 #endif 4356 #if MTK_VSP_FIX_E01724357 Int vspDir[MRG_MAX_NUM_CANDS_MEM];4358 memset(vspDir, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);4359 #endif4360 #endif4361 4336 4362 4337 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours 4363 4338 #if H_3D_VSP 4364 4339 , vspFlag 4365 #if MTK_VSP_FIX_ALIGN_WD_E01724366 4340 , inheritedVSPDisInfo 4367 #endif4368 #if MTK_VSP_FIX_E01724369 , vspDir4370 #endif4371 4341 #endif 4372 4342 , numValidMergeCand … … 4379 4349 #if H_3D_VSP 4380 4350 pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4381 #if MTK_VSP_FIX_ALIGN_WD_E01724382 4351 pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4383 #endif4384 #if MTK_VSP_FIX_E01724385 pcCU->setVSPDirSubParts( vspDir[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4386 #endif4387 4352 #endif 4388 4353 pcCU->setInterDirSubParts ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); … … 4407 4372 #if H_3D_VSP 4408 4373 pcCU->setVSPFlagSubParts ( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4409 #if MTK_VSP_FIX_ALIGN_WD_E01724410 4374 pcCU->setDvInfoSubParts(OriginalDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4411 #endif4412 #if MTK_VSP_FIX_E01724413 pcCU->setVSPDirSubParts ( 0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );4414 #endif4415 4375 #endif 4416 4376 { … … 7361 7321 } 7362 7322 7363 #if !SEC_DMM2_E0146 7323 #if !SEC_DMM2_E0146_HHIFIX 7364 7324 Void TEncSearch::xSearchDmm2Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ) 7365 7325 { … … 7429 7389 #endif 7430 7390 7431 Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx ) 7391 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 7392 Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx, UInt colTexIntraDir ) 7432 7393 { 7433 7394 ruiTabIdx = 0; … … 7446 7407 Pel refDC1 = 0; Pel refDC2 = 0; 7447 7408 7409 std::vector< std::vector<UInt> > pauiWdgLstSz = g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]]; 7410 std::vector<UInt>* pauiWdgLst = &pauiWdgLstSz[colTexIntraDir-2]; 7411 for( UInt uiIdxW = 0; uiIdxW < pauiWdgLst->size(); uiIdxW++ ) 7412 { 7413 UInt uiIdx = pauiWdgLst->at(uiIdxW); 7414 TComWedgelet* pcWedgelet = &(pacWedgeList->at(uiIdx)); 7415 xCalcBiSegDCs ( piRef, uiRefStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7416 xAssignBiSegDCs( piPred, uiPredStride, pcWedgelet->getPattern(), pcWedgelet->getStride(), refDC1, refDC2 ); 7417 7418 UInt uiActDist = m_pcRdCost->getDistPart( g_bitDepthY, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, TEXT_LUMA, DF_SAD ); 7419 if( uiActDist < uiBestDist || uiBestDist == MAX_UINT ) 7420 { 7421 uiBestDist = uiActDist; 7422 ruiTabIdx = uiIdx; 7423 ruiIntraTabIdx = uiIdxW; 7424 } 7425 } 7426 cPredYuv.destroy(); 7427 } 7428 #else 7429 Void TEncSearch::xSearchDmm3Wedge( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx ) 7430 { 7431 ruiTabIdx = 0; 7432 ruiIntraTabIdx = 0; 7433 7434 // local pred buffer 7435 TComYuv cPredYuv; 7436 cPredYuv.create( uiWidth, uiHeight ); 7437 cPredYuv.clear(); 7438 Pel* piPred = cPredYuv.getLumaAddr(); 7439 UInt uiPredStride = cPredYuv.getStride(); 7440 7441 // wedge search 7442 UInt uiBestDist = MAX_UINT; 7443 WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])]; 7444 Pel refDC1 = 0; Pel refDC2 = 0; 7445 7448 7446 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic(); 7449 7447 assert( pcPicTex != NULL ); … … 7496 7494 cPredYuv.destroy(); 7497 7495 } 7496 #endif 7498 7497 #endif 7499 7498 #if H_3D_DIM_RBC -
trunk/source/Lib/TLibEncoder/TEncSearch.h
r608 r622 352 352 Void xSearchDmmDeltaDCs ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piOrig, Pel* piPredic, UInt uiStride, Bool* biSegPattern, Int patternStride, UInt uiWidth, UInt uiHeight, Pel& rDeltaDC1, Pel& rDeltaDC2 ); 353 353 Void xSearchDmm1Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx ); 354 #if !SEC_DMM2_E0146 354 #if !SEC_DMM2_E0146_HHIFIX 355 355 Void xSearchDmm2Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, Int& riWedgeDeltaEnd ); 356 356 #endif 357 #if LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 358 Void xSearchDmm3Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx, UInt colTexIntraDir ); 359 #else 357 360 Void xSearchDmm3Wedge ( TComDataCU* pcCU, UInt uiAbsPtIdx, Pel* piRef, UInt uiRefStride, UInt uiWidth, UInt uiHeight, UInt& ruiTabIdx, UInt& ruiIntraTabIdx ); 361 #endif 358 362 #endif 359 363 #if H_3D_DIM_RBC … … 427 431 #if H_3D_VSP 428 432 , Int* vspFlag 429 #if MTK_VSP_FIX_ALIGN_WD_E0172430 433 , InheritedVSPDisInfo* inheritedVSPDisInfo 431 #endif432 #if MTK_VSP_FIX_E0172433 , Int* vspDir434 #endif435 434 #endif 436 435 , Int& numValidMergeCand … … 441 440 TComMvField* mvFieldNeighbours, 442 441 UChar* interDirNeighbours, 443 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172442 #if H_3D_VSP 444 443 Int* vspFlag, 445 444 #endif -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r608 r622 176 176 \param pPPS PPS associated with the slice 177 177 */ 178 #if H_MV5 179 #if H_MV 180 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ) 181 #else 182 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ) 183 #endif 184 #else 178 185 #if H_3D 179 186 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ) 180 187 #else 181 188 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ) 189 #endif 182 190 #endif 183 191 { … … 186 194 187 195 rpcSlice = pcPic->getSlice(0); 196 197 #if H_MV5 198 rpcSlice->setVPS( pVPS ); 199 200 rpcSlice->setLayerId ( layerId ); 201 rpcSlice->setViewId ( pVPS->getViewId ( layerId ) ); 202 rpcSlice->setViewIndex ( pVPS->getViewIndex ( layerId ) ); 203 #if H_3D 204 rpcSlice->setIsDepth ( pVPS->getDepthId ( layerId ) != 0 ); 205 #endif 206 #else 188 207 #if H_3D 189 208 // GT: Should also be activated for MV-HEVC at some stage … … 195 214 rpcSlice->setViewIndex ( pVPS->getViewIndex ( vpsLayerId ) ); 196 215 rpcSlice->setIsDepth ( pVPS->getDepthId ( vpsLayerId ) != 0 ); 216 #endif 197 217 #endif 198 218 rpcSlice->setSPS( pSPS ); -
trunk/source/Lib/TLibEncoder/TEncSlice.h
r608 r622 116 116 117 117 /// preparation of slice encoding (reference marking, QP and lambda) 118 #if H_MV5 119 #if H_MV 120 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 121 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ); 122 #else 123 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 124 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ); 125 #endif 126 #else 118 127 #if H_3D 119 128 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, … … 122 131 Void initEncSlice ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 123 132 Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS ); 133 #endif 124 134 #endif 125 135 #if RATE_CONTROL_LAMBDA_DOMAIN -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r608 r622 515 515 // mark it should be extended 516 516 rpcPic->getPicYuvRec()->setBorderExtension(false); 517 518 #if H_MV 517 519 rpcPic->getPicYuvOrg()->setBorderExtension(false); 520 #endif 518 521 } 519 522 … … 548 551 * that chooses the actual compatibility based upon options */ 549 552 553 #if H_MV5 554 #if H_MV 555 m_cSPS.setUpdateRepFormatFlag ( m_layerId == 0 ); 556 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 557 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 558 #endif 559 #endif 550 560 m_cSPS.setPicWidthInLumaSamples ( m_iSourceWidth ); 551 561 m_cSPS.setPicHeightInLumaSamples ( m_iSourceHeight ); … … 670 680 { 671 681 #if H_MV 682 #if H_MV5 683 m_cPPS.setLayerId( getLayerId() ); 684 if( getVPS()->getNumDirectRefLayers( getLayerId() ) > 0 ) 685 #else 672 686 if( getVPS()->getNumDirectRefLayers( getLayerIdInVps() ) > 0 ) 687 #endif 673 688 { 674 689 m_cPPS.setListsModificationPresentFlag( true ); … … 736 751 m_cPPS.setOutputFlagPresentFlag( false ); 737 752 #if H_MV 753 #if H_MV5 754 m_cPPS.setNumExtraSliceHeaderBits( 2 ); 755 #else 738 756 m_cPPS.setNumExtraSliceHeaderBits( 1 ); 739 757 #endif 758 #endif 740 759 m_cPPS.setSignHideFlag(getSignHideFlag()); 741 #if L0386_DB_METRIC742 if ( getDeblockingFilterMetric() )743 {744 m_cPPS.setDeblockingFilterControlPresentFlag (true);745 m_cPPS.setDeblockingFilterOverrideEnabledFlag(true);746 m_cPPS.setPicDisableDeblockingFilterFlag(false);747 m_cPPS.setDeblockingFilterBetaOffsetDiv2(0);748 m_cPPS.setDeblockingFilterTcOffsetDiv2(0);749 }750 else751 {752 760 m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent ); 753 }754 #else755 m_cPPS.setDeblockingFilterControlPresentFlag (m_DeblockingFilterControlPresent );756 #endif757 761 m_cPPS.setLog2ParallelMergeLevelMinus2 (m_log2ParallelMergeLevelMinus2 ); 758 762 m_cPPS.setCabacInitPresentFlag(CABAC_INIT_PRESENT_FLAG); -
trunk/source/Lib/TLibExtractor/TExtrTop.cpp
r608 r622 100 100 Void TExtrTop::dumpVpsInfo( std::ostream& rcVpsInfoHandle ) 101 101 { 102 #if H_MV5 103 rcVpsInfoHandle << "MaxLayers = " << m_cVPS.getMaxLayersMinus1() + 1 << std::endl; 104 rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getVpsMaxLayerId() << std::endl; 105 106 for ( Int layerIdxInVps = 0; layerIdxInVps <= m_cVPS.getMaxLayersMinus1(); layerIdxInVps++ ) 107 { 108 Int layerId = m_cVPS.getLayerIdInNuh( layerIdxInVps ); 109 rcVpsInfoHandle << "LayerIdxInVps = " << layerIdxInVps << std::endl; 110 rcVpsInfoHandle << "LayerIdInNuh = " << layerId << std::endl; 111 rcVpsInfoHandle << "ViewOrderIndex = " << m_cVPS.getViewIndex ( layerId ) << std::endl; 112 #if H_3D 113 rcVpsInfoHandle << "DepthFlag = " << m_cVPS.getDepthId ( layerId ) << std::endl; 114 #endif 115 rcVpsInfoHandle << "ViewId = " << m_cVPS.getViewId ( layerId ) << std::endl; 116 #else 102 117 rcVpsInfoHandle << "MaxLayers = " << m_cVPS.getMaxLayers() << std::endl; 103 118 rcVpsInfoHandle << "MaxNuhLayerId = " << m_cVPS.getVpsMaxLayerId() << std::endl; … … 112 127 rcVpsInfoHandle << "DepthFlag = " << m_cVPS.getDepthId ( layerIdxInVps ) << std::endl; 113 128 #endif 129 #endif 114 130 } 115 131 }
Note: See TracChangeset for help on using the changeset viewer.