Ticket #1207: copyToPic.patch
File copyToPic.patch, 8.1 KB (added by gordon, 11 years ago) |
---|
-
C:/users/gordon/work/265/HM-12.0-bbc-khoa/source/Lib/TLibCommon/TComDataCU.cpp
1066 1066 Int iSizeInBool = sizeof( Bool ) * uiQNumPart; 1067 1067 1068 1068 Int sizeInChar = sizeof( Char ) * uiQNumPart; 1069 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag , sizeof( *m_skipFlag ) * uiQNumPart );1069 memcpy( rpcCU->getSkipFlag() + uiPartOffset, m_skipFlag+uiPartStart, sizeof( *m_skipFlag ) * uiQNumPart ); 1070 1070 1071 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP , sizeInChar );1072 memcpy( rpcCU->getPartitionSize() + uiPartOffset, m_pePartSize , sizeof( *m_pePartSize ) * uiQNumPart );1073 memcpy( rpcCU->getPredictionMode() + uiPartOffset, m_pePredMode , sizeof( *m_pePredMode ) * uiQNumPart );1074 memcpy( rpcCU->getCUTransquantBypass()+ uiPartOffset, m_CUTransquantBypass , sizeof( *m_CUTransquantBypass ) * uiQNumPart );1075 memcpy( rpcCU->getMergeFlag() + uiPartOffset, m_pbMergeFlag , iSizeInBool );1076 memcpy( rpcCU->getMergeIndex() + uiPartOffset, m_puhMergeIndex , iSizeInUchar );1077 memcpy( rpcCU->getLumaIntraDir() + uiPartOffset, m_puhLumaIntraDir , iSizeInUchar );1078 memcpy( rpcCU->getChromaIntraDir() + uiPartOffset, m_puhChromaIntraDir , iSizeInUchar );1079 memcpy( rpcCU->getInterDir() + uiPartOffset, m_puhInterDir , iSizeInUchar );1080 memcpy( rpcCU->getTransformIdx() + uiPartOffset, m_puhTrIdx , iSizeInUchar );1081 memcpy( rpcCU->getTransformSkip(TEXT_LUMA) + uiPartOffset, m_puhTransformSkip[0] , iSizeInUchar );1082 memcpy( rpcCU->getTransformSkip(TEXT_CHROMA_U) + uiPartOffset, m_puhTransformSkip[1] , iSizeInUchar );1083 memcpy( rpcCU->getTransformSkip(TEXT_CHROMA_V) + uiPartOffset, m_puhTransformSkip[2] , iSizeInUchar );1084 memcpy( rpcCU->getCbf(TEXT_LUMA) + uiPartOffset, m_puhCbf[0] , iSizeInUchar );1085 memcpy( rpcCU->getCbf(TEXT_CHROMA_U) + uiPartOffset, m_puhCbf[1] , iSizeInUchar );1086 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2] , iSizeInUchar );1071 memcpy( rpcCU->getQP() + uiPartOffset, m_phQP+uiPartStart, sizeInChar ); 1072 memcpy( rpcCU->getPartitionSize() + uiPartOffset, m_pePartSize+uiPartStart, sizeof( *m_pePartSize ) * uiQNumPart ); 1073 memcpy( rpcCU->getPredictionMode() + uiPartOffset, m_pePredMode+uiPartStart, sizeof( *m_pePredMode ) * uiQNumPart ); 1074 memcpy( rpcCU->getCUTransquantBypass()+ uiPartOffset, m_CUTransquantBypass+uiPartStart, sizeof( *m_CUTransquantBypass ) * uiQNumPart ); 1075 memcpy( rpcCU->getMergeFlag() + uiPartOffset, m_pbMergeFlag+uiPartStart, iSizeInBool ); 1076 memcpy( rpcCU->getMergeIndex() + uiPartOffset, m_puhMergeIndex+uiPartStart, iSizeInUchar ); 1077 memcpy( rpcCU->getLumaIntraDir() + uiPartOffset, m_puhLumaIntraDir+uiPartStart, iSizeInUchar ); 1078 memcpy( rpcCU->getChromaIntraDir() + uiPartOffset, m_puhChromaIntraDir+uiPartStart, iSizeInUchar ); 1079 memcpy( rpcCU->getInterDir() + uiPartOffset, m_puhInterDir+uiPartStart, iSizeInUchar ); 1080 memcpy( rpcCU->getTransformIdx() + uiPartOffset, m_puhTrIdx+uiPartStart, iSizeInUchar ); 1081 memcpy( rpcCU->getTransformSkip(TEXT_LUMA) + uiPartOffset, m_puhTransformSkip[0]+uiPartStart, iSizeInUchar ); 1082 memcpy( rpcCU->getTransformSkip(TEXT_CHROMA_U) + uiPartOffset, m_puhTransformSkip[1]+uiPartStart, iSizeInUchar ); 1083 memcpy( rpcCU->getTransformSkip(TEXT_CHROMA_V) + uiPartOffset, m_puhTransformSkip[2]+uiPartStart, iSizeInUchar ); 1084 memcpy( rpcCU->getCbf(TEXT_LUMA) + uiPartOffset, m_puhCbf[0]+uiPartStart, iSizeInUchar ); 1085 memcpy( rpcCU->getCbf(TEXT_CHROMA_U) + uiPartOffset, m_puhCbf[1]+uiPartStart, iSizeInUchar ); 1086 memcpy( rpcCU->getCbf(TEXT_CHROMA_V) + uiPartOffset, m_puhCbf[2]+uiPartStart, iSizeInUchar ); 1087 1087 1088 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth , iSizeInUchar );1089 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth , iSizeInUchar );1090 memcpy( rpcCU->getHeight() + uiPartOffset, m_puhHeight , iSizeInUchar );1088 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth+uiPartStart, iSizeInUchar ); 1089 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth+uiPartStart, iSizeInUchar ); 1090 memcpy( rpcCU->getHeight() + uiPartOffset, m_puhHeight+uiPartStart, iSizeInUchar ); 1091 1091 1092 memcpy( rpcCU->getMVPIdx(REF_PIC_LIST_0) + uiPartOffset, m_apiMVPIdx[0] , iSizeInUchar );1093 memcpy( rpcCU->getMVPIdx(REF_PIC_LIST_1) + uiPartOffset, m_apiMVPIdx[1] , iSizeInUchar );1094 memcpy( rpcCU->getMVPNum(REF_PIC_LIST_0) + uiPartOffset, m_apiMVPNum[0] , iSizeInUchar );1095 memcpy( rpcCU->getMVPNum(REF_PIC_LIST_1) + uiPartOffset, m_apiMVPNum[1] , iSizeInUchar );1092 memcpy( rpcCU->getMVPIdx(REF_PIC_LIST_0) + uiPartOffset, m_apiMVPIdx[0]+uiPartStart, iSizeInUchar ); 1093 memcpy( rpcCU->getMVPIdx(REF_PIC_LIST_1) + uiPartOffset, m_apiMVPIdx[1]+uiPartStart, iSizeInUchar ); 1094 memcpy( rpcCU->getMVPNum(REF_PIC_LIST_0) + uiPartOffset, m_apiMVPNum[0]+uiPartStart, iSizeInUchar ); 1095 memcpy( rpcCU->getMVPNum(REF_PIC_LIST_1) + uiPartOffset, m_apiMVPNum[1]+uiPartStart, iSizeInUchar ); 1096 1096 m_acCUMvField[0].copyTo( rpcCU->getCUMvField( REF_PIC_LIST_0 ), m_uiAbsIdxInLCU, uiPartStart, uiQNumPart ); 1097 1097 m_acCUMvField[1].copyTo( rpcCU->getCUMvField( REF_PIC_LIST_1 ), m_uiAbsIdxInLCU, uiPartStart, uiQNumPart ); 1098 1098 1099 memcpy( rpcCU->getIPCMFlag() + uiPartOffset, m_pbIPCMFlag , iSizeInBool );1099 memcpy( rpcCU->getIPCMFlag() + uiPartOffset, m_pbIPCMFlag+uiPartStart, iSizeInBool ); 1100 1100 1101 1101 UInt uiTmp = (g_uiMaxCUWidth*g_uiMaxCUHeight)>>((uhDepth+uiPartDepth)<<1); 1102 1102 UInt uiTmp2 = uiPartOffset*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight(); 1103 memcpy( rpcCU->getCoeffY() + uiTmp2, m_pcTrCoeffY, sizeof(TCoeff)*uiTmp ); 1103 UInt uiTmp3 = uiPartStart*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight(); 1104 memcpy( rpcCU->getCoeffY() + uiTmp2, m_pcTrCoeffY+uiTmp3, sizeof(TCoeff)*uiTmp ); 1104 1105 #if ADAPTIVE_QP_SELECTION 1105 memcpy( rpcCU->getArlCoeffY() + uiTmp2, m_pcArlCoeffY , sizeof(Int)*uiTmp );1106 memcpy( rpcCU->getArlCoeffY() + uiTmp2, m_pcArlCoeffY+uiTmp3, sizeof(Int)*uiTmp ); 1106 1107 #endif 1107 1108 1108 memcpy( rpcCU->getPCMSampleY() + uiTmp2 , m_pcIPCMSampleY , sizeof( Pel ) * uiTmp );1109 memcpy( rpcCU->getPCMSampleY() + uiTmp2 , m_pcIPCMSampleY+uiTmp3, sizeof( Pel ) * uiTmp ); 1109 1110 1110 uiTmp >>= 2; uiTmp2 >>= 2; 1111 memcpy( rpcCU->getCoeffCb() + uiTmp2, m_pcTrCoeffCb , sizeof(TCoeff)*uiTmp );1112 memcpy( rpcCU->getCoeffCr() + uiTmp2, m_pcTrCoeffCr , sizeof(TCoeff)*uiTmp );1111 uiTmp >>= 2; uiTmp2 >>= 2; uiTmp3 >>= 2; 1112 memcpy( rpcCU->getCoeffCb() + uiTmp2, m_pcTrCoeffCb+uiTmp3, sizeof(TCoeff)*uiTmp ); 1113 memcpy( rpcCU->getCoeffCr() + uiTmp2, m_pcTrCoeffCr+uiTmp3, sizeof(TCoeff)*uiTmp ); 1113 1114 #if ADAPTIVE_QP_SELECTION 1114 memcpy( rpcCU->getArlCoeffCb() + uiTmp2, m_pcArlCoeffCb , sizeof(Int)*uiTmp );1115 memcpy( rpcCU->getArlCoeffCr() + uiTmp2, m_pcArlCoeffCr , sizeof(Int)*uiTmp );1115 memcpy( rpcCU->getArlCoeffCb() + uiTmp2, m_pcArlCoeffCb+uiTmp3, sizeof(Int)*uiTmp ); 1116 memcpy( rpcCU->getArlCoeffCr() + uiTmp2, m_pcArlCoeffCr+uiTmp3, sizeof(Int)*uiTmp ); 1116 1117 #endif 1117 1118 1118 memcpy( rpcCU->getPCMSampleCb() + uiTmp2 , m_pcIPCMSampleCb , sizeof( Pel ) * uiTmp );1119 memcpy( rpcCU->getPCMSampleCr() + uiTmp2 , m_pcIPCMSampleCr , sizeof( Pel ) * uiTmp );1119 memcpy( rpcCU->getPCMSampleCb() + uiTmp2 , m_pcIPCMSampleCb+uiTmp3, sizeof( Pel ) * uiTmp ); 1120 memcpy( rpcCU->getPCMSampleCr() + uiTmp2 , m_pcIPCMSampleCr+uiTmp3, sizeof( Pel ) * uiTmp ); 1120 1121 rpcCU->getTotalBins() = m_uiTotalBins; 1121 memcpy( rpcCU->m_sliceStartCU + uiPartOffset, m_sliceStartCU , sizeof( UInt ) * uiQNumPart );1122 memcpy( rpcCU->m_sliceSegmentStartCU + uiPartOffset, m_sliceSegmentStartCU , sizeof( UInt ) * uiQNumPart );1122 memcpy( rpcCU->m_sliceStartCU + uiPartOffset, m_sliceStartCU+uiPartStart, sizeof( UInt ) * uiQNumPart ); 1123 memcpy( rpcCU->m_sliceSegmentStartCU + uiPartOffset, m_sliceSegmentStartCU+uiPartStart, sizeof( UInt ) * uiQNumPart ); 1123 1124 } 1124 1125 1125 1126 // --------------------------------------------------------------------------------------------------------------------