Ticket #1392: replaceCharWithSCharAndTChar.patch
File replaceCharWithSCharAndTChar.patch, 83.9 KB (added by karlsharman, 10 years ago) |
---|
-
source/App/TAppDecoder/TAppDecCfg.cpp
58 58 /** \param argc number of arguments 59 59 \param argv array of arguments 60 60 */ 61 Bool TAppDecCfg::parseCfg( Int argc, Char* argv[] )61 Bool TAppDecCfg::parseCfg( Int argc, TChar* argv[] ) 62 62 { 63 63 Bool do_help = false; 64 64 string cfg_BitstreamFile; … … 96 96 97 97 po::setDefaults(opts); 98 98 po::ErrorReporter err; 99 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (constChar**) argv, err);99 const list<const TChar*>& argv_unhandled = po::scanArgv(opts, argc, (const TChar**) argv, err); 100 100 101 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)101 for (list<const TChar*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 102 102 { 103 103 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); 104 104 } -
source/App/TAppDecoder/TAppDecCfg.h
56 56 class TAppDecCfg 57 57 { 58 58 protected: 59 Char*m_pchBitstreamFile; ///< input bitstream file name60 Char*m_pchReconFile; ///< output reconstruction file name59 TChar* m_pchBitstreamFile; ///< input bitstream file name 60 TChar* m_pchReconFile; ///< output reconstruction file name 61 61 Int m_iSkipFrame; ///< counter for frames prior to the random access point to skip 62 62 Int m_outputBitDepth[MAX_NUM_CHANNEL_TYPE]; ///< bit depth used for writing output 63 63 InputColourSpaceConversion m_outputColourSpaceConvert; … … 95 95 96 96 virtual ~TAppDecCfg() {} 97 97 98 Bool parseCfg ( Int argc, Char* argv[] ); ///< initialize option class from configuration98 Bool parseCfg ( Int argc, TChar* argv[] ); ///< initialize option class from configuration 99 99 }; 100 100 101 101 //! \} -
source/App/TAppEncoder/TAppEncCfg.h
55 55 { 56 56 protected: 57 57 // file I/O 58 Char*m_pchInputFile; ///< source file name59 Char*m_pchBitstreamFile; ///< output bitstream file60 Char*m_pchReconFile; ///< output reconstruction file58 TChar* m_pchInputFile; ///< source file name 59 TChar* m_pchBitstreamFile; ///< output bitstream file 60 TChar* m_pchReconFile; ///< output reconstruction file 61 61 Double m_adLambdaModifier[ MAX_TLAYER ]; ///< Lambda modifier array for each temporal layer 62 62 // source specification 63 63 Int m_iFrameRate; ///< source frame-rates (Hz) … … 129 129 // coding quality 130 130 Double m_fQP; ///< QP value of key-picture (floating point) 131 131 Int m_iQP; ///< QP value of key-picture (integer) 132 Char*m_pchdQPFile; ///< QP offset for each slice (initialized from external file)132 TChar* m_pchdQPFile; ///< QP offset for each slice (initialized from external file) 133 133 Int* m_aidQP; ///< array of slice QP values 134 134 Int m_iMaxDeltaQP; ///< max. |delta QP| 135 135 UInt m_uiDeltaQpRD; ///< dQP range for multi-pass slice QP optimization … … 323 323 Int m_RCInitialQP; ///< inital QP for rate control 324 324 Bool m_RCForceIntraQP; ///< force all intra picture to use initial QP or not 325 325 ScalingListMode m_useScalingListId; ///< using quantization matrix 326 Char*m_scalingListFile; ///< quantization matrix file name326 TChar* m_scalingListFile; ///< quantization matrix file name 327 327 328 328 Bool m_TransquantBypassEnableFlag; ///< transquant_bypass_enable_flag setting in PPS. 329 329 Bool m_CUTransquantBypassFlagForce; ///< if transquant_bypass_enable_flag, then, if true, all CU transquant bypass flags will be set to true. … … 383 383 public: 384 384 Void create (); ///< create option handling class 385 385 Void destroy (); ///< destroy option handling class 386 Bool parseCfg ( Int argc, Char* argv[] );///< parse configuration file to fill member variables386 Bool parseCfg ( Int argc, TChar* argv[] ); ///< parse configuration file to fill member variables 387 387 388 388 };// END CLASS DEFINITION TAppEncCfg 389 389 -
source/App/TAppEncoder/TAppEncCfg.cpp
186 186 return in; 187 187 } 188 188 189 Bool confirmPara(Bool bflag, const Char* message);189 Bool confirmPara(Bool bflag, const TChar* message); 190 190 191 191 static inline ChromaFormat numberToChromaFormat(const Int val) 192 192 { … … 202 202 203 203 static const struct MapStrToProfile 204 204 { 205 const Char* str;205 const TChar* str; 206 206 Profile::Name value; 207 207 } 208 208 strToProfile[] = … … 217 217 218 218 static const struct MapStrToExtendedProfile 219 219 { 220 const Char* str;220 const TChar* str; 221 221 ExtendedProfileName value; 222 222 } 223 223 strToExtendedProfile[] = … … 276 276 277 277 static const struct MapStrToTier 278 278 { 279 const Char* str;279 const TChar* str; 280 280 Level::Tier value; 281 281 } 282 282 strToTier[] = … … 287 287 288 288 static const struct MapStrToLevel 289 289 { 290 const Char* str;290 const TChar* str; 291 291 Level::Name value; 292 292 } 293 293 strToLevel[] = … … 311 311 312 312 static const struct MapStrToCostMode 313 313 { 314 const Char* str;314 const TChar* str; 315 315 CostMode value; 316 316 } 317 317 strToCostMode[] = … … 324 324 325 325 static const struct MapStrToScalingListMode 326 326 { 327 const Char* str;327 const TChar* str; 328 328 ScalingListMode value; 329 329 } 330 330 strToScalingListMode[] = … … 428 428 } 429 429 if (!str.empty()) 430 430 { 431 const Char *pStr=str.c_str();431 const TChar *pStr=str.c_str(); 432 432 // soak up any whitespace 433 433 for(;isspace(*pStr);pStr++); 434 434 435 435 while (*pStr != 0) 436 436 { 437 Char *eptr;437 TChar *eptr; 438 438 UInt val=strtoul(pStr, &eptr, 0); 439 439 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 440 440 { … … 480 480 } 481 481 if (!str.empty()) 482 482 { 483 const Char *pStr=str.c_str();483 const TChar *pStr=str.c_str(); 484 484 // soak up any whitespace 485 485 for(;isspace(*pStr);pStr++); 486 486 487 487 while (*pStr != 0) 488 488 { 489 Char *eptr;489 TChar *eptr; 490 490 Int val=strtol(pStr, &eptr, 0); 491 491 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 492 492 { … … 532 532 } 533 533 if (!str.empty()) 534 534 { 535 const Char *pStr=str.c_str();535 const TChar *pStr=str.c_str(); 536 536 // soak up any whitespace 537 537 for(;isspace(*pStr);pStr++); 538 538 539 539 while (*pStr != 0) 540 540 { 541 Char *eptr;541 TChar *eptr; 542 542 Int val=strtol(pStr, &eptr, 0); 543 543 if (*eptr!=0 && !isspace(*eptr) && *eptr!=',') 544 544 { … … 657 657 \param argv array of arguments 658 658 \retval true when success 659 659 */ 660 Bool TAppEncCfg::parseCfg( Int argc, Char* argv[] )660 Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] ) 661 661 { 662 662 Bool do_help = false; 663 663 … … 1087 1087 } 1088 1088 po::setDefaults(opts); 1089 1089 po::ErrorReporter err; 1090 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (constChar**) argv, err);1090 const list<const TChar*>& argv_unhandled = po::scanArgv(opts, argc, (const TChar**) argv, err); 1091 1091 1092 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)1092 for (list<const TChar*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 1093 1093 { 1094 1094 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); 1095 1095 } … … 2291 2291 } 2292 2292 } 2293 2293 2294 const Char *profileToString(const Profile::Name profile)2294 const TChar *profileToString(const Profile::Name profile) 2295 2295 { 2296 2296 static const UInt numberOfProfiles = sizeof(strToProfile)/sizeof(*strToProfile); 2297 2297 … … 2484 2484 fflush(stdout); 2485 2485 } 2486 2486 2487 Bool confirmPara(Bool bflag, const Char* message)2487 Bool confirmPara(Bool bflag, const TChar* message) 2488 2488 { 2489 2489 if (!bflag) 2490 2490 { -
source/Lib/TLibCommon/TComDataCU.h
91 91 // ------------------------------------------------------------------------------------------------------------------- 92 92 93 93 Bool* m_skipFlag; ///< array of skip flags 94 Char*m_pePartSize; ///< array of partition sizes95 Char*m_pePredMode; ///< array of prediction modes96 Char*m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values94 SChar* m_pePartSize; ///< array of partition sizes 95 SChar* m_pePredMode; ///< array of prediction modes 96 SChar* m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values 97 97 Bool* m_CUTransquantBypass; ///< array of cu_transquant_bypass flags 98 Char*m_phQP; ///< array of QP values98 SChar* m_phQP; ///< array of QP values 99 99 UChar* m_ChromaQpAdj; ///< array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=value-1 100 100 UInt m_codedChromaQpAdj; 101 101 UChar* m_puhTrIdx; ///< array of transform indices … … 135 135 #endif 136 136 UChar* m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]; // 0-> Luma, 1-> Chroma 137 137 UChar* m_puhInterDir; ///< array of inter directions 138 Char*m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates139 Char*m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors138 SChar* m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates 139 SChar* m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors 140 140 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 141 141 142 142 // ------------------------------------------------------------------------------------------------------------------- … … 148 148 Distortion m_uiTotalDistortion; ///< sum of partition distortion 149 149 UInt m_uiTotalBits; ///< sum of partition bits 150 150 UInt m_uiTotalBins; ///< sum of partition bins 151 Charm_codedQP;151 SChar m_codedQP; 152 152 UChar* m_explicitRdpcmMode[MAX_NUM_COMPONENT]; ///< Stores the explicit RDPCM mode for all TUs belonging to this CU 153 153 154 154 protected: … … 215 215 // member functions for CU data 216 216 // ------------------------------------------------------------------------------------------------------------------- 217 217 218 Char*getPartitionSize () { return m_pePartSize; }218 SChar* getPartitionSize () { return m_pePartSize; } 219 219 PartSize getPartitionSize ( UInt uiIdx ) { return static_cast<PartSize>( m_pePartSize[uiIdx] ); } 220 220 Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; } 221 221 Void setPartSizeSubParts ( PartSize eMode, UInt uiAbsPartIdx, UInt uiDepth ); … … 226 226 Void setSkipFlag ( UInt idx, Bool skip) { m_skipFlag[idx] = skip; } 227 227 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 228 228 229 Char*getPredictionMode () { return m_pePredMode; }229 SChar* getPredictionMode () { return m_pePredMode; } 230 230 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } 231 231 Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } 232 232 Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); 233 233 234 Char*getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; }235 ChargetCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; }234 SChar* getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; } 235 SChar getCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; } 236 236 237 237 Bool* getCUTransquantBypass () { return m_CUTransquantBypass; } 238 238 Bool getCUTransquantBypass( UInt uiIdx ) { return m_CUTransquantBypass[uiIdx]; } … … 247 247 248 248 Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); 249 249 250 Char*getQP () { return m_phQP; }251 ChargetQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; }252 Void setQP ( UInt uiIdx, Char value){ m_phQP[uiIdx] = value; }250 SChar* getQP () { return m_phQP; } 251 SChar getQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; } 252 Void setQP ( UInt uiIdx, SChar value){ m_phQP[uiIdx] = value; } 253 253 Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth ); 254 254 Int getLastValidPartIdx ( Int iAbsPartIdx ); 255 ChargetLastCodedQP ( UInt uiAbsPartIdx );255 SChar getLastCodedQP ( UInt uiAbsPartIdx ); 256 256 Void setQPSubCUs ( Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf ); 257 Void setCodedQP ( Char qp ){ m_codedQP = qp; }258 ChargetCodedQP () { return m_codedQP; }257 Void setCodedQP ( SChar qp ) { m_codedQP = qp; } 258 SChar getCodedQP () { return m_codedQP; } 259 259 260 260 UChar* getChromaQpAdj () { return m_ChromaQpAdj; } ///< array of chroma QP adjustments (indexed). when value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=value-1 261 261 UChar getChromaQpAdj (Int idx) const { return m_ChromaQpAdj[idx]; } ///< When value = 0, cu_chroma_qp_offset_flag=0; when value>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=value-1 262 262 Void setChromaQpAdj (Int idx, UChar val) { m_ChromaQpAdj[idx] = val; } ///< When val = 0, cu_chroma_qp_offset_flag=0; when val>0, indicates cu_chroma_qp_offset_flag=1 and cu_chroma_qp_offset_idx=val-1 263 263 Void setChromaQpAdjSubParts( UChar val, Int absPartIdx, Int depth ); 264 Void setCodedChromaQpAdj ( Char qp ){ m_codedChromaQpAdj = qp; }265 ChargetCodedChromaQpAdj () { return m_codedChromaQpAdj; }264 Void setCodedChromaQpAdj ( SChar qp ) { m_codedChromaQpAdj = qp; } 265 SChar getCodedChromaQpAdj () { return m_codedChromaQpAdj; } 266 266 267 267 Bool isLosslessCoded ( UInt absPartIdx ); 268 268 … … 281 281 282 282 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); } 283 283 284 Void setCrossComponentPredictionAlphaPartRange ( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );284 Void setCrossComponentPredictionAlphaPartRange ( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 285 285 Void setTransformSkipPartRange ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 286 286 287 287 UInt getQuadtreeTULog2MinSizeInCU( UInt uiIdx ); … … 367 367 368 368 Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } 369 369 Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; } 370 Char*getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; }370 SChar* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; } 371 371 372 372 Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; } 373 373 Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx]; } 374 Char*getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; }374 SChar* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; } 375 375 376 376 Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); 377 377 Void setMVPNumSubParts ( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); … … 412 412 413 413 TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInCtu ); 414 414 TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx , UInt uiCurrAbsIdxInCtu ); 415 ChargetRefQP ( UInt uiCurrAbsIdxInCtu );415 SChar getRefQP ( UInt uiCurrAbsIdxInCtu ); 416 416 417 417 /// returns CU and part index of the PU above the top row of the current uiCurrPartUnitIdx of the CU, at a horizontal offset (to the right) of uiPartUnitOffset (in parts) 418 418 TComDataCU* getPUAboveRight ( UInt& uiARPartUnitIdx, UInt uiCurrPartUnitIdx, UInt uiPartUnitOffset = 1, Bool bEnforceSliceRestriction=true ); -
source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
95 95 96 96 97 97 Int m_lineBufWidth; 98 Char* m_signLineBuf1;99 Char* m_signLineBuf2;98 SChar* m_signLineBuf1; 99 SChar* m_signLineBuf2; 100 100 ChromaFormat m_chromaFormatIDC; 101 101 private: 102 102 Bool m_picSAOEnabled[MAX_NUM_COMPONENT]; -
source/Lib/TLibCommon/TComRom.cpp
50 50 //! \ingroup TLibCommon 51 51 //! \{ 52 52 53 const Char* nalUnitTypeToString(NalUnitType type)53 const TChar* nalUnitTypeToString(NalUnitType type) 54 54 { 55 55 switch (type) 56 56 { … … 569 569 // Misc. 570 570 // ==================================================================================================================== 571 571 572 Char g_aucConvertToBit [ MAX_CU_SIZE+1 ];572 SChar g_aucConvertToBit [ MAX_CU_SIZE+1 ]; 573 573 574 574 #if ENC_DEC_TRACE 575 575 FILE* g_hTrace = NULL; // Set to NULL to open up a file. Set to stdout to use the current output … … 597 597 const UInt g_uiMinInGroup[ LAST_SIGNIFICANT_GROUPS ] = {0,1,2,3,4,6,8,12,16,24}; 598 598 const UInt g_uiGroupIdx[ MAX_TU_SIZE ] = {0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9}; 599 599 600 const Char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =600 const TChar *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = 601 601 { 602 602 { 603 603 "INTRA4X4_LUMA", … … 633 633 }, 634 634 }; 635 635 636 const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =636 const TChar *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = 637 637 { 638 638 { 639 639 }, -
source/Lib/TLibCommon/TComBitStream.cpp
90 90 m_numBitsRead=0; 91 91 } 92 92 93 Char* TComOutputBitstream::getByteStream() const93 UChar* TComOutputBitstream::getByteStream() const 94 94 { 95 return ( Char*) &m_fifo.front();95 return (UChar*) &m_fifo.front(); 96 96 } 97 97 98 98 UInt TComOutputBitstream::getByteStreamLength() -
source/Lib/TLibCommon/TComPicYuv.cpp
246 246 247 247 248 248 // NOTE: This function is never called, but may be useful for developers. 249 Void TComPicYuv::dump (const Char* pFileName, const BitDepths &bitDepths, Bool bAdd) const249 Void TComPicYuv::dump (const TChar* pFileName, const BitDepths &bitDepths, Bool bAdd) const 250 250 { 251 251 FILE* pFile; 252 252 if (!bAdd) -
source/Lib/TLibCommon/TComMotionInfo.h
93 93 private: 94 94 TComMv* m_pcMv; 95 95 TComMv* m_pcMvd; 96 Char*m_piRefIdx;96 SChar* m_piRefIdx; 97 97 UInt m_uiNumPartition; 98 98 AMVPInfo m_cAMVPInfo; 99 99 … … 152 152 m_piRefIdx = src->m_piRefIdx + offset; 153 153 } 154 154 155 Void compress( Char* pePredMode, Int scale);155 Void compress(SChar* pePredMode, Int scale); 156 156 }; 157 157 158 158 //! \} -
source/Lib/TLibCommon/TComMotionInfo.cpp
59 59 60 60 m_pcMv = new TComMv[ uiNumPartition ]; 61 61 m_pcMvd = new TComMv[ uiNumPartition ]; 62 m_piRefIdx = new Char[ uiNumPartition ];62 m_piRefIdx = new SChar [ uiNumPartition ]; 63 63 64 64 m_uiNumPartition = uiNumPartition; 65 65 } … … 314 314 315 315 Void TComCUMvField::setAllRefIdx ( Int iRefIdx, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx ) 316 316 { 317 setAll(m_piRefIdx, static_cast< Char>(iRefIdx), eCUMode, iPartAddr, uiDepth, iPartIdx);317 setAll(m_piRefIdx, static_cast<SChar>(iRefIdx), eCUMode, iPartAddr, uiDepth, iPartIdx); 318 318 } 319 319 320 320 Void TComCUMvField::setAllMvField( TComMvField const & mvField, PartSize eCUMode, Int iPartAddr, UInt uiDepth, Int iPartIdx ) … … 327 327 * \param pePredMode Pointer to prediction modes 328 328 * \param scale Factor by which to subsample motion information 329 329 */ 330 Void TComCUMvField::compress( Char* pePredMode, Int scale)330 Void TComCUMvField::compress(SChar* pePredMode, Int scale) 331 331 { 332 332 Int N = scale * scale; 333 333 assert( N > 0 && N <= m_uiNumPartition); -
source/Lib/TLibCommon/TComCodingStatistics.h
94 94 STATS__NUM_STATS 95 95 }; 96 96 97 static inline const Char* getName(TComCodingStatisticsType name)97 static inline const TChar* getName(TComCodingStatisticsType name) 98 98 { 99 static const Char *statNames[]=99 static const TChar *statNames[]= 100 100 { 101 101 "NAL_UNIT_TOTAL_BODY", // This is a special case and is not included in the total sums. 102 102 "NAL_UNIT_PACKING", … … 142 142 "CABAC_BITS__ALIGNED_SIGN_BIT", 143 143 "CABAC_BITS__ALIGNED_ESCAPE_BITS" 144 144 }; 145 assert(STATS__NUM_STATS == sizeof(statNames)/sizeof( Char *) && name < STATS__NUM_STATS);145 assert(STATS__NUM_STATS == sizeof(statNames)/sizeof(TChar *) && name < STATS__NUM_STATS); 146 146 return statNames[name]; 147 147 } 148 148 … … 182 182 return subClass%CODING_STATS_NUM_WIDTHS; 183 183 } 184 184 185 static const Char *GetSubClassString(const UInt subClass)185 static const TChar *GetSubClassString(const UInt subClass) 186 186 { 187 187 assert (subClass<CODING_STATS_NUM_SUBCLASSES); 188 static const Char *strings[1+MAX_NUM_COMPONENT+MAX_NUM_CHANNEL_TYPE]={"-", "Y", "Cb", "Cr", "Luma", "Chroma"};188 static const TChar *strings[1+MAX_NUM_COMPONENT+MAX_NUM_CHANNEL_TYPE]={"-", "Y", "Cb", "Cr", "Luma", "Chroma"}; 189 189 return strings[subClass/CODING_STATS_NUM_WIDTHS]; 190 190 } 191 191 … … 242 242 TComCodingStatistics() : data() 243 243 { } 244 244 245 static Void OutputLine(const Char *pName, const Char sep, UInt width, constChar *pSubClassStr, const SStat &sCABAC, const SStat &sEP)245 static Void OutputLine(const TChar *pName, const TChar sep, UInt width, const TChar *pSubClassStr, const SStat &sCABAC, const SStat &sEP) 246 246 { 247 247 if (width==0) 248 248 { … … 255 255 sCABAC.count, sCABAC.sum, sCABAC.bits, sEP.count, sEP.sum, sEP.bits, sCABAC.bits+sEP.bits, (sCABAC.bits+sEP.bits)/8, sep=='~'?']':' '); 256 256 } 257 257 } 258 static Void OutputLine(const Char *pName, const Char sep, const Char *pWidthString, constChar *pSubClassStr, const SStat &sCABAC, const SStat &sEP)258 static Void OutputLine(const TChar *pName, const TChar sep, const TChar *pWidthString, const TChar *pSubClassStr, const SStat &sCABAC, const SStat &sEP) 259 259 { 260 260 printf("%c%-45s%c %6s %6s %12lld %12lld %12lld %12lld %12lld %12lld %12lld (%12lld)%c\n", 261 261 sep=='~'?'[':' ', pName, sep, pWidthString, pSubClassStr, 262 262 sCABAC.count, sCABAC.sum, sCABAC.bits, sEP.count, sEP.sum, sEP.bits, sCABAC.bits+sEP.bits, (sCABAC.bits+sEP.bits)/8, sep=='~'?']':' '); 263 263 } 264 static Void OutputLine(const Char *pName, const Char sep, const Char *pWidthString, constChar *pSubClassStr, const SStat &sEP)264 static Void OutputLine(const TChar *pName, const TChar sep, const TChar *pWidthString, const TChar *pSubClassStr, const SStat &sEP) 265 265 { 266 266 printf("%c%-45s%c %6s %6s %12s %12s %12s %12lld %12lld %12lld %12lld (%12lld)%c\n", 267 267 sep=='~'?'[':' ', pName, sep, pWidthString, pSubClassStr, 268 268 "", "", "", sEP.count, sEP.sum, sEP.bits, sEP.bits, (sEP.bits)/8, sep=='~'?']':' '); 269 269 } 270 270 271 static Void OutputDashedLine(const Char *pText)271 static Void OutputDashedLine(const TChar *pText) 272 272 { 273 273 printf("--%s",pText); 274 274 UInt tot=0; … … 313 313 { 314 314 SStat cabacSubTotal, epSubTotal; 315 315 Bool bHadClassifiedEntry=false; 316 const Char *pName=getName(TComCodingStatisticsType(i));316 const TChar *pName=getName(TComCodingStatisticsType(i)); 317 317 318 318 for(UInt c=0; c<CODING_STATS_NUM_SUBCLASSES; c++) 319 319 { … … 441 441 442 442 static SStat &GetStatisticEP(const std::string &str) { return GetSingletonInstance().data.mappings_ep[str]; } 443 443 444 static SStat &GetStatisticEP(const Char *pKey) {return GetStatisticEP(std::string(pKey)); }444 static SStat &GetStatisticEP(const TChar *pKey) {return GetStatisticEP(std::string(pKey)); } 445 445 446 446 static Void IncrementStatisticEP(const TComCodingStatisticsClassType &stat, const Int numBits, const Int value) 447 447 { … … 459 459 s.sum+=value; 460 460 } 461 461 462 static Void IncrementStatisticEP(const Char *pKey, const Int numBits, const Int value)462 static Void IncrementStatisticEP(const TChar *pKey, const Int numBits, const Int value) 463 463 { 464 464 SStat &s=GetStatisticEP(pKey); 465 465 s.bits+=numBits; -
source/Lib/TLibCommon/SEI.cpp
114 114 } 115 115 116 116 // Static member 117 const Char *SEI::getSEIMessageString(SEI::PayloadType payloadType)117 const TChar *SEI::getSEIMessageString(SEI::PayloadType payloadType) 118 118 { 119 119 switch (payloadType) 120 120 { -
source/Lib/TLibCommon/Debug.h
47 47 #include <TLibCommon/CommonDef.h> 48 48 49 49 #if DEBUG_STRING 50 extern const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1];51 extern const Char *partSizeToString[NUMBER_OF_PART_SIZES];50 extern const TChar *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1]; 51 extern const TChar *partSizeToString[NUMBER_OF_PART_SIZES]; 52 52 #endif 53 53 54 54 // ---------------------------------------------------------------------------------------------- // … … 149 149 UInt getDecimalWidth(const Double value); 150 150 UInt getZScanIndex(const UInt x, const UInt y); 151 151 152 //template specialisation for Char types to get it to render as a number152 //template specialisation for SChar/UChar types to get it to render as a number 153 153 template <typename ValueType> inline Void writeValueToStream (const ValueType &value, std::ostream &stream, const UInt outputWidth) { stream << std::setw(outputWidth) << value; } 154 template <> inline Void writeValueToStream< Char >(const Char&value, std::ostream &stream, const UInt outputWidth) { stream << std::setw(outputWidth) << Int(value); }154 template <> inline Void writeValueToStream<SChar>(const SChar &value, std::ostream &stream, const UInt outputWidth) { stream << std::setw(outputWidth) << Int(value); } 155 155 template <> inline Void writeValueToStream<UChar>(const UChar &value, std::ostream &stream, const UInt outputWidth) { stream << std::setw(outputWidth) << UInt(value); } 156 156 157 157 template <typename ValueType> … … 231 231 232 232 233 233 template <typename T> 234 Void printBlockToStream( std::ostream &ss, const Char *pLinePrefix, const T * blkSrc, const UInt width, const UInt height, const UInt stride, const UInt subBlockWidth=0, const UInt subBlockHeight=0, const UInt defWidth=3 )234 Void printBlockToStream( std::ostream &ss, const TChar *pLinePrefix, const T * blkSrc, const UInt width, const UInt height, const UInt stride, const UInt subBlockWidth=0, const UInt subBlockHeight=0, const UInt defWidth=3 ) 235 235 { 236 236 for (UInt y=0; y<height; y++) 237 237 { … … 255 255 } 256 256 257 257 class TComYuv; 258 Void printBlockToStream( std::ostream &ss, const Char *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross=1, const UInt numSubBlocksUp=1, const UInt defWidth=3 );258 Void printBlockToStream( std::ostream &ss, const TChar *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross=1, const UInt numSubBlocksUp=1, const UInt defWidth=3 ); 259 259 260 260 // ---------------------------------------------------------------------------------------------- // 261 261 -
source/Lib/TLibCommon/TComBitStream.h
114 114 * NB, data is arranged such that subsequent bytes in the 115 115 * bytestream are stored in ascending addresses. 116 116 */ 117 Char* getByteStream() const;117 UChar* getByteStream() const; 118 118 119 119 /** 120 120 * Return the number of valid bytes available from getByteStream() -
source/Lib/TLibCommon/Debug.cpp
48 48 49 49 #if DEBUG_STRING 50 50 // these strings are used to reorder the debug output so that the encoder and decoder match. 51 const Char *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1]51 const TChar *debug_reorder_data_inter_token[MAX_NUM_COMPONENT+1] 52 52 = {"Start of channel 0 inter debug\n", "Start of channel 1 inter debug\n", "Start of channel 2 inter debug\n", "End of inter residual debug\n"} ; 53 const Char *partSizeToString[NUMBER_OF_PART_SIZES]={"2Nx2N(0)", "2NxN(1)", "Nx2N(2)", "NxN(3)", "2Nx(N/2+3N/2)(4)", "2Nx(3N/2+N/2)(5)", "(N/2+3N/2)x2N(6)", "(3N/2+N/2)x2N(7)"};53 const TChar *partSizeToString[NUMBER_OF_PART_SIZES]={"2Nx2N(0)", "2NxN(1)", "Nx2N(2)", "NxN(3)", "2Nx(N/2+3N/2)(4)", "2Nx(3N/2+N/2)(5)", "(N/2+3N/2)x2N(6)", "(3N/2+N/2)x2N(7)"}; 54 54 #endif 55 55 56 56 // --------------------------------------------------------------------------------------------------------------------- // … … 417 417 // --------------------------------------------------------------------------------------------------------------------- // 418 418 419 419 420 Void printBlockToStream( std::ostream &ss, const Char *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross, const UInt numSubBlocksUp, const UInt defWidth )420 Void printBlockToStream( std::ostream &ss, const TChar *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross, const UInt numSubBlocksUp, const UInt defWidth ) 421 421 { 422 422 const UInt numValidComp=src.getNumberValidComponents(); 423 423 -
source/Lib/TLibCommon/SEI.h
89 89 SEI() {} 90 90 virtual ~SEI() {} 91 91 92 static const Char *getSEIMessageString(SEI::PayloadType payloadType);92 static const TChar *getSEIMessageString(SEI::PayloadType payloadType); 93 93 94 94 virtual PayloadType payloadType() const = 0; 95 95 }; -
source/Lib/TLibCommon/TComPicYuvMD5.cpp
208 208 209 209 std::string hashToString(const TComPictureHash &digest, Int numChar) 210 210 { 211 static const Char* hex = "0123456789abcdef";211 static const TChar* hex = "0123456789abcdef"; 212 212 std::string result; 213 213 214 214 for(Int pos=0; pos<Int(digest.hash.size()); pos++) -
source/Lib/TLibCommon/TComSlice.h
170 170 171 171 Void checkDcOfMatrix(); 172 172 Void processRefMatrix(UInt sizeId, UInt listId , UInt refListId ); 173 Bool xParseScalingList( Char* pchFile);173 Bool xParseScalingList(TChar* pchFile); 174 174 Void setDefaultScalingList(); 175 175 Bool checkDefaultScalingList(); 176 176 -
source/Lib/TLibCommon/TypeDef.h
170 170 typedef void Void; 171 171 typedef bool Bool; 172 172 173 #ifdef __arm__ 174 typedef signed char Char; 175 #else 176 typedef char Char; 177 #endif 178 typedef unsigned char UChar; 173 typedef char TChar; // Used for text/characters 174 typedef signed char SChar; // Signed 8-bit values 175 typedef unsigned char UChar; // Unsigned 8-bit values 179 176 typedef short Short; 180 177 typedef unsigned short UShort; 181 178 typedef int Int; -
source/Lib/TLibCommon/TComDataCU.cpp
122 122 123 123 if ( !bDecSubCu ) 124 124 { 125 m_phQP = ( Char* )xMalloc(Char,uiNumPartition);125 m_phQP = (SChar* )xMalloc(SChar, uiNumPartition); 126 126 m_puhDepth = (UChar* )xMalloc(UChar, uiNumPartition); 127 127 m_puhWidth = (UChar* )xMalloc(UChar, uiNumPartition); 128 128 m_puhHeight = (UChar* )xMalloc(UChar, uiNumPartition); 129 129 130 130 m_ChromaQpAdj = new UChar[ uiNumPartition ]; 131 131 m_skipFlag = new Bool[ uiNumPartition ]; 132 m_pePartSize = new Char[ uiNumPartition ];132 m_pePartSize = new SChar[ uiNumPartition ]; 133 133 memset( m_pePartSize, NUMBER_OF_PART_SIZES,uiNumPartition * sizeof( *m_pePartSize ) ); 134 m_pePredMode = new Char[ uiNumPartition ];134 m_pePredMode = new SChar[ uiNumPartition ]; 135 135 m_CUTransquantBypass = new Bool[ uiNumPartition ]; 136 136 137 137 m_pbMergeFlag = (Bool* )xMalloc(Bool, uiNumPartition); … … 148 148 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++) 149 149 { 150 150 const RefPicList rpl=RefPicList(i); 151 m_apiMVPIdx[rpl] = new Char[ uiNumPartition ];152 m_apiMVPNum[rpl] = new Char[ uiNumPartition ];153 memset( m_apiMVPIdx[rpl], -1,uiNumPartition * sizeof( Char ) );151 m_apiMVPIdx[rpl] = new SChar[ uiNumPartition ]; 152 m_apiMVPNum[rpl] = new SChar[ uiNumPartition ]; 153 memset( m_apiMVPIdx[rpl], -1,uiNumPartition * sizeof( SChar ) ); 154 154 } 155 155 156 156 for (UInt comp=0; comp<MAX_NUM_COMPONENT; comp++) … … 159 159 const UInt chromaShift = getComponentScaleX(compID, chromaFormatIDC) + getComponentScaleY(compID, chromaFormatIDC); 160 160 const UInt totalSize = (uiWidth * uiHeight) >> chromaShift; 161 161 162 m_crossComponentPredictionAlpha[compID] = ( Char* )xMalloc(Char,uiNumPartition);162 m_crossComponentPredictionAlpha[compID] = (SChar* )xMalloc(SChar, uiNumPartition); 163 163 m_puhTransformSkip[compID] = (UChar* )xMalloc(UChar, uiNumPartition); 164 164 m_explicitRdpcmMode[compID] = (UChar* )xMalloc(UChar, uiNumPartition); 165 165 m_puhCbf[compID] = (UChar* )xMalloc(UChar, uiNumPartition); … … 645 645 646 646 Int iSizeInUchar = sizeof( UChar ) * m_uiNumPartition; 647 647 Int iSizeInBool = sizeof( Bool ) * m_uiNumPartition; 648 Int sizeInChar = sizeof( Char ) * m_uiNumPartition;648 Int sizeInChar = sizeof( SChar ) * m_uiNumPartition; 649 649 650 650 memset( m_phQP, qp, sizeInChar ); 651 651 memset( m_pbMergeFlag, 0, iSizeInBool ); … … 872 872 Int iSizeInUchar = sizeof( UChar ) * uiNumPartition; 873 873 Int iSizeInBool = sizeof( Bool ) * uiNumPartition; 874 874 875 Int sizeInChar = sizeof( Char ) * uiNumPartition;875 Int sizeInChar = sizeof( SChar ) * uiNumPartition; 876 876 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 877 877 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); 878 878 memcpy( m_pePartSize + uiOffset, pcCU->getPartitionSize(), sizeof( *m_pePartSize ) * uiNumPartition ); … … 954 954 955 955 Int iSizeInUchar = sizeof( UChar ) * m_uiNumPartition; 956 956 Int iSizeInBool = sizeof( Bool ) * m_uiNumPartition; 957 Int sizeInChar = sizeof( Char ) * m_uiNumPartition;957 Int sizeInChar = sizeof( SChar ) * m_uiNumPartition; 958 958 959 959 memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); 960 960 … … 1295 1295 1296 1296 /** Get reference QP from left QpMinCu or latest coded QP 1297 1297 *\param uiCurrAbsIdxInCtu 1298 *\returns Char reference QP value1298 *\returns SChar reference QP value 1299 1299 */ 1300 Char TComDataCU::getRefQP( UInt uiCurrAbsIdxInCtu )1300 SChar TComDataCU::getRefQP( UInt uiCurrAbsIdxInCtu ) 1301 1301 { 1302 1302 UInt lPartIdx = MAX_UINT; 1303 1303 UInt aPartIdx = MAX_UINT; … … 1318 1318 return iLastValidPartIdx; 1319 1319 } 1320 1320 1321 Char TComDataCU::getLastCodedQP( UInt uiAbsPartIdx )1321 SChar TComDataCU::getLastCodedQP( UInt uiAbsPartIdx ) 1322 1322 { 1323 1323 UInt uiQUPartIdxMask = ~((1<<((getSlice()->getSPS()->getMaxTotalCUDepth() - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))-1); 1324 1324 Int iLastValidPartIdx = getLastValidPartIdx( uiAbsPartIdx&uiQUPartIdxMask ); // A idx will be invalid if it is off the right or bottom edge of the picture. … … 1813 1813 1814 1814 Void TComDataCU::setMVPIdxSubParts( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1815 1815 { 1816 setSubPart< Char>( iMVPIdx, m_apiMVPIdx[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx );1816 setSubPart<SChar>( iMVPIdx, m_apiMVPIdx[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx ); 1817 1817 } 1818 1818 1819 1819 Void TComDataCU::setMVPNumSubParts( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1820 1820 { 1821 setSubPart< Char>( iMVPNum, m_apiMVPNum[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx );1821 setSubPart<SChar>( iMVPNum, m_apiMVPNum[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx ); 1822 1822 } 1823 1823 1824 1824 … … 1851 1851 memset((m_puhTransformSkip[compID] + uiAbsPartIdx), useTransformSkip, (sizeof(UChar) * uiCoveredPartIdxes)); 1852 1852 } 1853 1853 1854 Void TComDataCU::setCrossComponentPredictionAlphaPartRange( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes )1854 Void TComDataCU::setCrossComponentPredictionAlphaPartRange( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ) 1855 1855 { 1856 memset((m_crossComponentPredictionAlpha[compID] + uiAbsPartIdx), alphaValue, (sizeof( Char) * uiCoveredPartIdxes));1856 memset((m_crossComponentPredictionAlpha[compID] + uiAbsPartIdx), alphaValue, (sizeof(SChar) * uiCoveredPartIdxes)); 1857 1857 } 1858 1858 1859 1859 Void TComDataCU::setExplicitRdpcmModePartRange ( UInt rdpcmMode, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ) -
source/Lib/TLibCommon/TComPicYuv.h
150 150 Void extendPicBorder (); 151 151 152 152 // Dump picture 153 Void dump (const Char* pFileName, const BitDepths &bitDepths, Bool bAdd = false) const ;153 Void dump (const TChar* pFileName, const BitDepths &bitDepths, Bool bAdd = false) const ; 154 154 155 155 // Set border extension flag 156 156 Void setBorderExtension(Bool b) { m_bIsBorderExtended = b; } -
source/Lib/TLibCommon/TComRom.h
124 124 // Misc. 125 125 // ==================================================================================================================== 126 126 127 extern Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; // from width to log2(width)-2127 extern SChar g_aucConvertToBit [ MAX_CU_SIZE+1 ]; // from width to log2(width)-2 128 128 129 129 130 130 #if ENC_DEC_TRACE … … 158 158 159 159 #endif 160 160 161 const Char* nalUnitTypeToString(NalUnitType type);161 const TChar* nalUnitTypeToString(NalUnitType type); 162 162 163 extern const Char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM];164 extern const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM];163 extern const TChar *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 164 extern const TChar *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM]; 165 165 166 166 extern const Int g_quantTSDefault4x4[4*4]; 167 167 extern const Int g_quantIntraDefault8x8[8*8]; -
source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
323 323 delete[] m_signLineBuf1; 324 324 m_signLineBuf1 = NULL; 325 325 } 326 m_signLineBuf1 = new Char[m_lineBufWidth+1];326 m_signLineBuf1 = new SChar[m_lineBufWidth+1]; 327 327 328 328 if (m_signLineBuf2) 329 329 { 330 330 delete[] m_signLineBuf2; 331 331 m_signLineBuf2 = NULL; 332 332 } 333 m_signLineBuf2 = new Char[m_lineBufWidth+1];333 m_signLineBuf2 = new SChar[m_lineBufWidth+1]; 334 334 } 335 335 336 336 const Int maxSampleValueIncl = (1<< channelBitDepth )-1; 337 337 338 338 Int x,y, startX, startY, endX, endY, edgeType; 339 339 Int firstLineStartX, firstLineEndX, lastLineStartX, lastLineEndX; 340 Char signLeft, signRight, signDown;340 SChar signLeft, signRight, signDown; 341 341 342 342 Pel* srcLine = srcBlk; 343 343 Pel* resLine = resBlk; … … 351 351 endX = isRightAvail ? width : (width -1); 352 352 for (y=0; y< height; y++) 353 353 { 354 signLeft = ( Char)sgn(srcLine[startX] - srcLine[startX-1]);354 signLeft = (SChar)sgn(srcLine[startX] - srcLine[startX-1]); 355 355 for (x=startX; x< endX; x++) 356 356 { 357 signRight = ( Char)sgn(srcLine[x] - srcLine[x+1]);357 signRight = (SChar)sgn(srcLine[x] - srcLine[x+1]); 358 358 edgeType = signRight + signLeft; 359 359 signLeft = -signRight; 360 360 … … 369 369 case SAO_TYPE_EO_90: 370 370 { 371 371 offset += 2; 372 Char *signUpLine = m_signLineBuf1;372 SChar *signUpLine = m_signLineBuf1; 373 373 374 374 startY = isAboveAvail ? 0 : 1; 375 375 endY = isBelowAvail ? height : height-1; … … 382 382 Pel* srcLineAbove= srcLine- srcStride; 383 383 for (x=0; x< width; x++) 384 384 { 385 signUpLine[x] = ( Char)sgn(srcLine[x] - srcLineAbove[x]);385 signUpLine[x] = (SChar)sgn(srcLine[x] - srcLineAbove[x]); 386 386 } 387 387 388 388 Pel* srcLineBelow; … … 392 392 393 393 for (x=0; x< width; x++) 394 394 { 395 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x]);395 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x]); 396 396 edgeType = signDown + signUpLine[x]; 397 397 signUpLine[x]= -signDown; 398 398 … … 407 407 case SAO_TYPE_EO_135: 408 408 { 409 409 offset += 2; 410 Char *signUpLine, *signDownLine, *signTmpLine;410 SChar *signUpLine, *signDownLine, *signTmpLine; 411 411 412 412 signUpLine = m_signLineBuf1; 413 413 signDownLine= m_signLineBuf2; … … 419 419 Pel* srcLineBelow= srcLine+ srcStride; 420 420 for (x=startX; x< endX+1; x++) 421 421 { 422 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x- 1]);422 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x- 1]); 423 423 } 424 424 425 425 //1st line … … 443 443 444 444 for (x=startX; x<endX; x++) 445 445 { 446 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x+ 1]);446 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x+ 1]); 447 447 edgeType = signDown + signUpLine[x]; 448 448 resLine[x] = Clip3<Int>(0, maxSampleValueIncl, srcLine[x] + offset[edgeType]); 449 449 450 450 signDownLine[x+1] = -signDown; 451 451 } 452 signDownLine[startX] = ( Char)sgn(srcLineBelow[startX] - srcLine[startX-1]);452 signDownLine[startX] = (SChar)sgn(srcLineBelow[startX] - srcLine[startX-1]); 453 453 454 454 signTmpLine = signUpLine; 455 455 signUpLine = signDownLine; … … 474 474 case SAO_TYPE_EO_45: 475 475 { 476 476 offset += 2; 477 Char *signUpLine = m_signLineBuf1+1;477 SChar *signUpLine = m_signLineBuf1+1; 478 478 479 479 startX = isLeftAvail ? 0 : 1; 480 480 endX = isRightAvail ? width : (width -1); … … 483 483 Pel* srcLineBelow= srcLine+ srcStride; 484 484 for (x=startX-1; x< endX; x++) 485 485 { 486 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x+1]);486 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x+1]); 487 487 } 488 488 489 489 … … 506 506 507 507 for(x= startX; x< endX; x++) 508 508 { 509 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x-1]);509 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x-1]); 510 510 edgeType = signDown + signUpLine[x]; 511 511 resLine[x] = Clip3<Int>(0, maxSampleValueIncl, srcLine[x] + offset[edgeType]); 512 512 signUpLine[x-1] = -signDown; 513 513 } 514 signUpLine[endX-1] = ( Char)sgn(srcLineBelow[endX-1] - srcLine[endX]);514 signUpLine[endX-1] = (SChar)sgn(srcLineBelow[endX-1] - srcLine[endX]); 515 515 srcLine += srcStride; 516 516 resLine += resStride; 517 517 } -
source/Lib/TLibCommon/TComSlice.cpp
1919 1919 } 1920 1920 } 1921 1921 1922 Bool TComScalingList::xParseScalingList( Char* pchFile)1922 Bool TComScalingList::xParseScalingList(TChar* pchFile) 1923 1923 { 1924 1924 static const Int LINE_SIZE=1024; 1925 1925 FILE *fp = NULL; 1926 Char line[LINE_SIZE];1926 TChar line[LINE_SIZE]; 1927 1927 1928 1928 if (pchFile == NULL) 1929 1929 { … … 1964 1964 Bool bFound=false; 1965 1965 while ((!feof(fp)) && (!bFound)) 1966 1966 { 1967 Char *ret = fgets(line, LINE_SIZE, fp);1968 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]);1967 TChar *ret = fgets(line, LINE_SIZE, fp); 1968 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]); 1969 1969 // This could be a match against the DC string as well, so verify it isn't 1970 1970 if (findNamePosition!= NULL && (MatrixType_DC[sizeIdc][listIdc]==NULL || strstr(line, MatrixType_DC[sizeIdc][listIdc])==NULL)) 1971 1971 { … … 2004 2004 Bool bFound=false; 2005 2005 while ((!feof(fp)) && (!bFound)) 2006 2006 { 2007 Char *ret = fgets(line, LINE_SIZE, fp);2008 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]);2007 TChar *ret = fgets(line, LINE_SIZE, fp); 2008 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]); 2009 2009 if (findNamePosition!= NULL) 2010 2010 { 2011 2011 // This won't be a match against the non-DC string. -
source/Lib/TLibVideoIO/TVideoIOYuv.h
63 63 TVideoIOYuv() {} 64 64 virtual ~TVideoIOYuv() {} 65 65 66 Void open ( Char* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] ); ///< open or create file66 Void open ( TChar* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] ); ///< open or create file 67 67 Void close (); ///< close file 68 68 69 69 Void skipFrames(UInt numFrames, UInt width, UInt height, ChromaFormat format); -
source/Lib/TLibVideoIO/TVideoIOYuv.cpp
115 115 * \param MSBExtendedBitDepth 116 116 * \param internalBitDepth bit-depth array to scale image data to/from when reading/writing. 117 117 */ 118 Void TVideoIOYuv::open( Char* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] )118 Void TVideoIOYuv::open( TChar* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] ) 119 119 { 120 120 //NOTE: files cannot have bit depth greater than 16 121 121 for(UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++) … … 216 216 m_cHandle.clear(); 217 217 218 218 /* fall back to consuming the input */ 219 Char buf[512];219 UChar buf[512]; 220 220 const streamoff offset_mod_bufsize = offset % sizeof(buf); 221 221 for (streamoff i = 0; i < offset - offset_mod_bufsize; i += sizeof(buf)) 222 222 { 223 m_cHandle.read( buf, sizeof(buf));223 m_cHandle.read(reinterpret_cast<char*>(buf), sizeof(buf)); 224 224 } 225 m_cHandle.read( buf, offset_mod_bufsize);225 m_cHandle.read(reinterpret_cast<char*>(buf), offset_mod_bufsize); 226 226 } 227 227 228 228 /** … … 310 310 if ((y444&mask_y_file)==0) 311 311 { 312 312 // read a new line 313 fd.read(reinterpret_cast< Char*>(buf), stride_file);313 fd.read(reinterpret_cast<char*>(buf), stride_file); 314 314 if (fd.eof() || fd.fail() ) 315 315 { 316 316 delete[] buf; … … 446 446 } 447 447 } 448 448 449 fd.write(reinterpret_cast< Char*>(buf), stride_file);449 fd.write(reinterpret_cast<const char*>(buf), stride_file); 450 450 if (fd.eof() || fd.fail() ) 451 451 { 452 452 delete[] buf; … … 505 505 } 506 506 } 507 507 508 fd.write(reinterpret_cast< Char*>(buf), stride_file);508 fd.write(reinterpret_cast<const char*>(buf), stride_file); 509 509 if (fd.eof() || fd.fail() ) 510 510 { 511 511 delete[] buf; … … 576 576 } 577 577 } 578 578 579 fd.write(reinterpret_cast< Char*>(buf), (stride_file * 2));579 fd.write(reinterpret_cast<const char*>(buf), (stride_file * 2)); 580 580 if (fd.eof() || fd.fail() ) 581 581 { 582 582 delete[] buf; … … 641 641 } 642 642 } 643 643 644 fd.write(reinterpret_cast< Char*>(buf), (stride_file * 2));644 fd.write(reinterpret_cast<const char*>(buf), (stride_file * 2)); 645 645 if (fd.eof() || fd.fail() ) 646 646 { 647 647 delete[] buf; -
source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
89 89 90 90 if (g_debugCounter >= debugEncoderSearchBinTargetLine) 91 91 { 92 Char breakPointThis;92 UChar breakPointThis; 93 93 breakPointThis = 7; 94 94 } 95 95 if (g_debugCounter >= (debugEncoderSearchBinTargetLine + debugEncoderSearchBinWindow)) -
source/Lib/TLibEncoder/TEncAnalyze.h
136 136 } 137 137 138 138 139 Void printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths )139 Void printOut ( TChar cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ) 140 140 { 141 141 Double dFps = m_dFrmRate; //--CFG_KDY 142 142 Double dScale = dFps / 1000 / (Double)m_uiNumPic; -
source/Lib/TLibEncoder/SyntaxElementWriter.h
82 82 Void xWriteSvlc ( Int iCode ); 83 83 Void xWriteFlag ( UInt uiCode ); 84 84 #if ENC_DEC_TRACE 85 Void xWriteCodeTr ( UInt value, UInt length, const Char *pSymbolName);86 Void xWriteUvlcTr ( UInt value, const Char *pSymbolName);87 Void xWriteSvlcTr ( Int value, const Char *pSymbolName);88 Void xWriteFlagTr ( UInt value, const Char *pSymbolName);85 Void xWriteCodeTr ( UInt value, UInt length, const TChar *pSymbolName); 86 Void xWriteUvlcTr ( UInt value, const TChar *pSymbolName); 87 Void xWriteSvlcTr ( Int value, const TChar *pSymbolName); 88 Void xWriteFlagTr ( UInt value, const TChar *pSymbolName); 89 89 #endif 90 90 Void xWriteRbspTrailingBits(); 91 91 -
source/Lib/TLibEncoder/TEncGOP.cpp
794 794 const std::size_t numberOfAdditionalCabacZeroBytes=numberOfAdditionalCabacZeroWords*3; 795 795 if (cabacZeroWordPaddingEnabled) 796 796 { 797 std::vector< Char> zeroBytesPadding(numberOfAdditionalCabacZeroBytes,Char(0));797 std::vector<UChar> zeroBytesPadding(numberOfAdditionalCabacZeroBytes, UChar(0)); 798 798 for(std::size_t i=0; i<numberOfAdditionalCabacZeroWords; i++) 799 799 { 800 800 zeroBytesPadding[i*3+2]=3; // 00 00 03 801 801 } 802 nalUnitData.write( &(zeroBytesPadding[0]), numberOfAdditionalCabacZeroBytes);802 nalUnitData.write(reinterpret_cast<const char*>(&(zeroBytesPadding[0])), numberOfAdditionalCabacZeroBytes); 803 803 printf("Adding %d bytes of padding\n", UInt(numberOfAdditionalCabacZeroWords*3)); 804 804 } 805 805 else … … 2033 2033 m_gcAnalyzeB.addResult (dPSNR, (Double)uibits, MSEyuvframe); 2034 2034 } 2035 2035 2036 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');2036 TChar c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); 2037 2037 if (!pcSlice->isReferenced()) 2038 2038 { 2039 2039 c += 32; -
source/Lib/TLibEncoder/TEncSearch.h
80 80 TComYuv* m_pcQTTempTComYuv; 81 81 TComYuv m_tmpYuvPred; // To be used in xGetInterPredictionError() to avoid constant memory allocation/deallocation 82 82 83 Char*m_phQTTempCrossComponentPredictionAlpha[MAX_NUM_COMPONENT];83 SChar* m_phQTTempCrossComponentPredictionAlpha[MAX_NUM_COMPONENT]; 84 84 Pel* m_pSharedPredTransformSkip[MAX_NUM_COMPONENT]; 85 85 TCoeff* m_pcQTTempTUCoeff[MAX_NUM_COMPONENT]; 86 86 UChar* m_puhQTTempTransformSkipFlag[MAX_NUM_COMPONENT]; … … 274 274 const Int strideResi, 275 275 const Int strideBest ); 276 276 277 Char xCalcCrossComponentPredictionAlpha( TComTU &rTu,277 SChar xCalcCrossComponentPredictionAlpha ( TComTU &rTu, 278 278 const ComponentID compID, 279 279 const Pel* piResiL, 280 280 const Pel* piResiC, -
source/Lib/TLibEncoder/AnnexBwrite.h
59 59 const NALUnitEBSP& nalu = **it; 60 60 UInt size = 0; /* size of annexB unit in bytes */ 61 61 62 static const Char start_code_prefix[] = {0,0,0,1};62 static const UChar start_code_prefix[] = {0,0,0,1}; 63 63 if (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_SPS || nalu.m_nalUnitType == NAL_UNIT_PPS) 64 64 { 65 65 /* From AVC, When any of the following conditions are fulfilled, the … … 70 70 * unit of an access unit in decoding order, as specified by subclause 71 71 * 7.4.1.2.3. 72 72 */ 73 out.write( start_code_prefix, 4);73 out.write(reinterpret_cast<const char*>(start_code_prefix), 4); 74 74 size += 4; 75 75 } 76 76 else 77 77 { 78 out.write( start_code_prefix+1, 3);78 out.write(reinterpret_cast<const char*>(start_code_prefix+1), 3); 79 79 size += 3; 80 80 } 81 81 out << nalu.m_nalUnitData.str(); -
source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
235 235 236 236 if (g_debugCounter >= debugCabacBinTargetLine) 237 237 { 238 Char breakPointThis;238 UChar breakPointThis; 239 239 breakPointThis = 7; 240 240 } 241 241 if (g_debugCounter >= (debugCabacBinTargetLine + debugCabacBinWindow)) -
source/Lib/TLibEncoder/TEncSearch.cpp
276 276 #endif 277 277 } 278 278 279 m_phQTTempCrossComponentPredictionAlpha[ch] = new Char [uiNumPartitions];279 m_phQTTempCrossComponentPredictionAlpha[ch] = new SChar [uiNumPartitions]; 280 280 m_pSharedPredTransformSkip[ch] = new Pel [MAX_CU_SIZE*MAX_CU_SIZE]; 281 281 m_pcQTTempTUCoeff[ch] = new TCoeff[MAX_CU_SIZE*MAX_CU_SIZE]; 282 282 #if ADAPTIVE_QP_SELECTION … … 1862 1862 } 1863 1863 } 1864 1864 1865 Char1865 SChar 1866 1866 TEncSearch::xCalcCrossComponentPredictionAlpha( TComTU &rTu, 1867 1867 const ComponentID compID, 1868 1868 const Pel* piResiL, … … 1879 1879 const Int absPartIdx = rTu.GetAbsPartIdxTU( compID ); 1880 1880 const Int diffBitDepth = pCU->getSlice()->getSPS()->getDifferentialLumaChromaBitDepth(); 1881 1881 1882 Char alpha = 0;1882 SChar alpha = 0; 1883 1883 Int SSxy = 0; 1884 1884 Int SSxx = 0; 1885 1885 … … 1899 1899 if( SSxx != 0 ) 1900 1900 { 1901 1901 Double dAlpha = SSxy / Double( SSxx ); 1902 alpha = Char(Clip3<Int>(-16, 16, (Int)(dAlpha * 16)));1902 alpha = SChar(Clip3<Int>(-16, 16, (Int)(dAlpha * 16))); 1903 1903 1904 static const Char alphaQuant[17] = {0, 1, 1, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8};1904 static const SChar alphaQuant[17] = {0, 1, 1, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8}; 1905 1905 1906 1906 alpha = (alpha < 0) ? -alphaQuant[Int(-alpha)] : alphaQuant[Int(alpha)]; 1907 1907 } … … 1980 1980 Distortion singleDistCTmp = 0; 1981 1981 Double singleCostTmp = 0; 1982 1982 UInt singleCbfCTmp = 0; 1983 CharbestCrossCPredictionAlpha = 0;1983 SChar bestCrossCPredictionAlpha = 0; 1984 1984 Int bestTransformSkipMode = 0; 1985 1985 1986 1986 const Bool checkCrossComponentPrediction = (pcCU->getIntraDir(CHANNEL_TYPE_CHROMA, subTUAbsPartIdx) == DM_CHROMA_IDX) … … 2643 2643 const ComponentID compID = ComponentID(componentIndex); 2644 2644 ::memcpy( m_puhQTTempCbf[compID], pcCU->getCbf( compID )+uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2645 2645 ::memcpy( m_puhQTTempTransformSkipFlag[compID], pcCU->getTransformSkip( compID )+uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2646 ::memcpy( m_phQTTempCrossComponentPredictionAlpha[compID], pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, uiQPartNum * sizeof( Char ) );2646 ::memcpy( m_phQTTempCrossComponentPredictionAlpha[compID], pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, uiQPartNum * sizeof( SChar ) ); 2647 2647 } 2648 2648 } 2649 2649 } … … 2656 2656 const ComponentID compID = ComponentID(componentIndex); 2657 2657 ::memcpy( pcCU->getCbf( compID )+uiPartOffset, m_puhQTTempCbf[compID], uiQPartNum * sizeof( UChar ) ); 2658 2658 ::memcpy( pcCU->getTransformSkip( compID )+uiPartOffset, m_puhQTTempTransformSkipFlag[compID], uiQPartNum * sizeof( UChar ) ); 2659 ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( Char ) );2659 ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( SChar ) ); 2660 2660 } 2661 2661 } 2662 2662 … … 4371 4371 { 4372 4372 const ComponentID component = ComponentID(comp); 4373 4373 ::memset( pcCU->getCbf( component ) , 0, uiQPartNum * sizeof(UChar) ); 4374 ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof( Char) ) );4374 ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof(SChar) ) ); 4375 4375 } 4376 4376 static const UInt useTS[MAX_NUM_COMPONENT]={0,0,0}; 4377 4377 pcCU->setTransformSkipSubParts ( useTS, 0, pcCU->getDepth(0) ); … … 4471 4471 UInt uiBestTransformMode [MAX_NUM_COMPONENT][2/*0 = top (or whole TU for non-4:2:2) sub-TU, 1 = bottom sub-TU*/] = {{0,0},{0,0},{0,0}}; 4472 4472 // Stores the best explicit RDPCM mode for a TU encoded without split 4473 4473 UInt bestExplicitRdpcmModeUnSplit[MAX_NUM_COMPONENT][2/*0 = top (or whole TU for non-4:2:2) sub-TU, 1 = bottom sub-TU*/] = {{3,3}, {3,3}, {3,3}}; 4474 CharbestCrossCPredictionAlpha [MAX_NUM_COMPONENT][2/*0 = top (or whole TU for non-4:2:2) sub-TU, 1 = bottom sub-TU*/] = {{0,0},{0,0},{0,0}};4474 SChar bestCrossCPredictionAlpha [MAX_NUM_COMPONENT][2/*0 = top (or whole TU for non-4:2:2) sub-TU, 1 = bottom sub-TU*/] = {{0,0},{0,0},{0,0}}; 4475 4475 4476 4476 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); 4477 4477 … … 4538 4538 && pcCU->getSlice()->getPPS()->getPpsRangeExtension().getCrossComponentPredictionEnabledFlag() 4539 4539 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrMode) != 0); 4540 4540 4541 Char preCalcAlpha = 0;4541 SChar preCalcAlpha = 0; 4542 4542 const Pel *pLumaResi = m_pcQTTempTComYuv[uiQTTempAccessLayer].getAddrPix( COMPONENT_Y, rTu.getRect( COMPONENT_Y ).x0, rTu.getRect( COMPONENT_Y ).y0 ); 4543 4543 4544 4544 if (isCrossCPredictionAvailable) -
source/Lib/TLibEncoder/SEIwrite.cpp
209 209 */ 210 210 Void SEIWriter::xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei) 211 211 { 212 const Char *traceString="\0";212 const TChar *traceString="\0"; 213 213 switch (sei.method) 214 214 { 215 215 case SEIDecodedPictureHash::MD5: traceString="picture_md5"; break; -
source/Lib/TLibEncoder/NALwrite.cpp
44 44 //! \ingroup TLibEncoder 45 45 //! \{ 46 46 47 static const Char emulation_prevention_three_byte[] = {3};47 static const UChar emulation_prevention_three_byte[] = {3}; 48 48 49 49 Void writeNalUnitHeader(ostream& out, OutputNALUnit& nalu) // nal_unit_header() 50 50 { … … 55 55 bsNALUHeader.write(nalu.m_nuhLayerId, 6); // nuh_layer_id 56 56 bsNALUHeader.write(nalu.m_temporalId+1, 3); // nuh_temporal_id_plus1 57 57 58 out.write( bsNALUHeader.getByteStream(), bsNALUHeader.getByteStreamLength());58 out.write(reinterpret_cast<const char*>(bsNALUHeader.getByteStream()), bsNALUHeader.getByteStreamLength()); 59 59 } 60 60 /** 61 61 * write nalu to bytestream out, performing RBSP anti startcode … … 119 119 { 120 120 outputBuffer[outputAmount++]=emulation_prevention_three_byte[0]; 121 121 } 122 out.write( (Char*)&(*outputBuffer.begin()), outputAmount);122 out.write(reinterpret_cast<const char*>(&(*outputBuffer.begin())), outputAmount); 123 123 } 124 124 125 125 //! \} -
source/Lib/TLibEncoder/SyntaxElementWriter.cpp
43 43 44 44 #if ENC_DEC_TRACE 45 45 46 Void SyntaxElementWriter::xWriteCodeTr (UInt value, UInt length, const Char *pSymbolName)46 Void SyntaxElementWriter::xWriteCodeTr (UInt value, UInt length, const TChar *pSymbolName) 47 47 { 48 48 xWriteCode (value,length); 49 49 if( g_HLSTraceEnable ) … … 60 60 } 61 61 } 62 62 63 Void SyntaxElementWriter::xWriteUvlcTr (UInt value, const Char *pSymbolName)63 Void SyntaxElementWriter::xWriteUvlcTr (UInt value, const TChar *pSymbolName) 64 64 { 65 65 xWriteUvlc (value); 66 66 if( g_HLSTraceEnable ) … … 70 70 } 71 71 } 72 72 73 Void SyntaxElementWriter::xWriteSvlcTr (Int value, const Char *pSymbolName)73 Void SyntaxElementWriter::xWriteSvlcTr (Int value, const TChar *pSymbolName) 74 74 { 75 75 xWriteSvlc(value); 76 76 if( g_HLSTraceEnable ) … … 80 80 } 81 81 } 82 82 83 Void SyntaxElementWriter::xWriteFlagTr(UInt value, const Char *pSymbolName)83 Void SyntaxElementWriter::xWriteFlagTr(UInt value, const TChar *pSymbolName) 84 84 { 85 85 xWriteFlag(value); 86 86 if( g_HLSTraceEnable ) -
source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
904 904 delete[] m_signLineBuf1; 905 905 m_signLineBuf1 = NULL; 906 906 } 907 m_signLineBuf1 = new Char[m_lineBufWidth+1];907 m_signLineBuf1 = new SChar[m_lineBufWidth+1]; 908 908 909 909 if (m_signLineBuf2) 910 910 { 911 911 delete[] m_signLineBuf2; 912 912 m_signLineBuf2 = NULL; 913 913 } 914 m_signLineBuf2 = new Char[m_lineBufWidth+1];914 m_signLineBuf2 = new SChar[m_lineBufWidth+1]; 915 915 } 916 916 917 917 Int x,y, startX, startY, endX, endY, edgeType, firstLineStartX, firstLineEndX; 918 Char signLeft, signRight, signDown;918 SChar signLeft, signRight, signDown; 919 919 Int64 *diff, *count; 920 920 Pel *srcLine, *orgLine; 921 921 Int* skipLinesR = m_skipLinesR[compIdx]; … … 945 945 ; 946 946 for (y=0; y<endY; y++) 947 947 { 948 signLeft = ( Char)sgn(srcLine[startX] - srcLine[startX-1]);948 signLeft = (SChar)sgn(srcLine[startX] - srcLine[startX-1]); 949 949 for (x=startX; x<endX; x++) 950 950 { 951 signRight = ( Char)sgn(srcLine[x] - srcLine[x+1]);951 signRight = (SChar)sgn(srcLine[x] - srcLine[x+1]); 952 952 edgeType = signRight + signLeft; 953 953 signLeft = -signRight; 954 954 … … 967 967 968 968 for(y=0; y<skipLinesB[typeIdx]; y++) 969 969 { 970 signLeft = ( Char)sgn(srcLine[startX] - srcLine[startX-1]);970 signLeft = (SChar)sgn(srcLine[startX] - srcLine[startX-1]); 971 971 for (x=startX; x<endX; x++) 972 972 { 973 signRight = ( Char)sgn(srcLine[x] - srcLine[x+1]);973 signRight = (SChar)sgn(srcLine[x] - srcLine[x+1]); 974 974 edgeType = signRight + signLeft; 975 975 signLeft = -signRight; 976 976 … … 988 988 { 989 989 diff +=2; 990 990 count+=2; 991 Char *signUpLine = m_signLineBuf1;991 SChar *signUpLine = m_signLineBuf1; 992 992 993 993 startX = (!isCalculatePreDeblockSamples) ? 0 994 994 : (isRightAvail ? (width - skipLinesR[typeIdx]) : width) … … 1007 1007 Pel* srcLineAbove = srcLine - srcStride; 1008 1008 for (x=startX; x<endX; x++) 1009 1009 { 1010 signUpLine[x] = ( Char)sgn(srcLine[x] - srcLineAbove[x]);1010 signUpLine[x] = (SChar)sgn(srcLine[x] - srcLineAbove[x]); 1011 1011 } 1012 1012 1013 1013 Pel* srcLineBelow; … … 1017 1017 1018 1018 for (x=startX; x<endX; x++) 1019 1019 { 1020 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x]);1020 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x]); 1021 1021 edgeType = signDown + signUpLine[x]; 1022 1022 signUpLine[x]= -signDown; 1023 1023 … … 1057 1057 { 1058 1058 diff +=2; 1059 1059 count+=2; 1060 Char *signUpLine, *signDownLine, *signTmpLine;1060 SChar *signUpLine, *signDownLine, *signTmpLine; 1061 1061 1062 1062 signUpLine = m_signLineBuf1; 1063 1063 signDownLine= m_signLineBuf2; … … 1075 1075 Pel* srcLineBelow = srcLine + srcStride; 1076 1076 for (x=startX; x<endX+1; x++) 1077 1077 { 1078 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x-1]);1078 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x-1]); 1079 1079 } 1080 1080 1081 1081 //1st line … … 1099 1099 1100 1100 for (x=startX; x<endX; x++) 1101 1101 { 1102 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x+1]);1102 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x+1]); 1103 1103 edgeType = signDown + signUpLine[x]; 1104 1104 diff [edgeType] += (orgLine[x] - srcLine[x]); 1105 1105 count[edgeType] ++; 1106 1106 1107 1107 signDownLine[x+1] = -signDown; 1108 1108 } 1109 signDownLine[startX] = ( Char)sgn(srcLineBelow[startX] - srcLine[startX-1]);1109 signDownLine[startX] = (SChar)sgn(srcLineBelow[startX] - srcLine[startX-1]); 1110 1110 1111 1111 signTmpLine = signUpLine; 1112 1112 signUpLine = signDownLine; … … 1144 1144 { 1145 1145 diff +=2; 1146 1146 count+=2; 1147 Char *signUpLine = m_signLineBuf1+1;1147 SChar *signUpLine = m_signLineBuf1+1; 1148 1148 1149 1149 startX = (!isCalculatePreDeblockSamples) ? (isLeftAvail ? 0 : 1) 1150 1150 : (isRightAvail ? (width - skipLinesR[typeIdx]) : (width - 1)) … … 1158 1158 Pel* srcLineBelow = srcLine + srcStride; 1159 1159 for (x=startX-1; x<endX; x++) 1160 1160 { 1161 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x+1]);1161 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x+1]); 1162 1162 } 1163 1163 1164 1164 … … 1187 1187 1188 1188 for(x=startX; x<endX; x++) 1189 1189 { 1190 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x-1]);1190 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x-1]); 1191 1191 edgeType = signDown + signUpLine[x]; 1192 1192 1193 1193 diff [edgeType] += (orgLine[x] - srcLine[x]); … … 1195 1195 1196 1196 signUpLine[x-1] = -signDown; 1197 1197 } 1198 signUpLine[endX-1] = ( Char)sgn(srcLineBelow[endX-1] - srcLine[endX]);1198 signUpLine[endX-1] = (SChar)sgn(srcLineBelow[endX-1] - srcLine[endX]); 1199 1199 srcLine += srcStride; 1200 1200 orgLine += orgStride; 1201 1201 } -
source/Lib/TLibEncoder/TEncCfg.h
56 56 Int m_temporalId; 57 57 Bool m_refPic; 58 58 Int m_numRefPicsActive; 59 Char m_sliceType;59 SChar m_sliceType; 60 60 Int m_numRefPics; 61 61 Int m_referencePics[MAX_NUM_REF_PICS]; 62 62 Int m_usedByCurrPic[MAX_NUM_REF_PICS]; … … 321 321 UInt m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region 322 322 UInt m_maxNumMergeCand; ///< Maximum number of merge candidates 323 323 ScalingListMode m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. 324 Char*m_scalingListFile; ///< quantization matrix file name324 TChar* m_scalingListFile; ///< quantization matrix file name 325 325 Int m_TMVPModeId; 326 326 Bool m_signHideFlag; 327 327 Bool m_RCEnableRateControl; … … 795 795 UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } 796 796 Void setUseScalingListId ( ScalingListMode u ) { m_useScalingListId = u; } 797 797 ScalingListMode getUseScalingListId () { return m_useScalingListId; } 798 Void setScalingListFile ( Char* pch ){ m_scalingListFile = pch; }799 Char*getScalingListFile () { return m_scalingListFile; }798 Void setScalingListFile ( TChar* pch ) { m_scalingListFile = pch; } 799 TChar* getScalingListFile () { return m_scalingListFile; } 800 800 Void setTMVPModeId ( Int u ) { m_TMVPModeId = u; } 801 801 Int getTMVPModeId () { return m_TMVPModeId; } 802 802 Void setSignHideFlag( Bool signHideFlag ) { m_signHideFlag = signHideFlag; } -
source/Lib/TLibDecoder/SEIread.cpp
62 62 } 63 63 #endif 64 64 65 Void SEIReader::sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const Char *pSymbolName)65 Void SEIReader::sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const TChar *pSymbolName) 66 66 { 67 67 READ_CODE(uiLength, ruiCode, pSymbolName); 68 68 if (pOS) … … 71 71 } 72 72 } 73 73 74 Void SEIReader::sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName)74 Void SEIReader::sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName) 75 75 { 76 76 READ_UVLC(ruiCode, pSymbolName); 77 77 if (pOS) … … 80 80 } 81 81 } 82 82 83 Void SEIReader::sei_read_svlc(std::ostream *pOS, Int& ruiCode, const Char *pSymbolName)83 Void SEIReader::sei_read_svlc(std::ostream *pOS, Int& ruiCode, const TChar *pSymbolName) 84 84 { 85 85 READ_SVLC(ruiCode, pSymbolName); 86 86 if (pOS) … … 89 89 } 90 90 } 91 91 92 Void SEIReader::sei_read_flag(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName)92 Void SEIReader::sei_read_flag(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName) 93 93 { 94 94 READ_FLAG(ruiCode, pSymbolName); 95 95 if (pOS) … … 415 415 sei_read_code( pDecodedMessageOutputStream, 8, val, "hash_type"); 416 416 sei.method = static_cast<SEIDecodedPictureHash::Method>(val); bytesRead++; 417 417 418 const Char *traceString="\0";418 const TChar *traceString="\0"; 419 419 switch (sei.method) 420 420 { 421 421 case SEIDecodedPictureHash::MD5: traceString="picture_md5"; break; -
source/Lib/TLibDecoder/SEIread.h
80 80 Void xParseSEIKneeFunctionInfo (SEIKneeFunctionInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 81 81 Void xParseSEIMasteringDisplayColourVolume (SEIMasteringDisplayColourVolume& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 82 82 83 Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const Char *pSymbolName);84 Void sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName);85 Void sei_read_svlc(std::ostream *pOS, Int& ruiCode, const Char *pSymbolName);86 Void sei_read_flag(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName);83 Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const TChar *pSymbolName); 84 Void sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName); 85 Void sei_read_svlc(std::ostream *pOS, Int& ruiCode, const TChar *pSymbolName); 86 Void sei_read_flag(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName); 87 87 }; 88 88 89 89 -
source/Lib/TLibDecoder/SyntaxElementParser.h
89 89 virtual ~SyntaxElementParser() {}; 90 90 91 91 #if RExt__DECODER_DEBUG_BIT_STATISTICS 92 Void xReadCode ( UInt length, UInt& val, const Char *pSymbolName );93 Void xReadUvlc ( UInt& val, const Char *pSymbolName );94 Void xReadSvlc ( Int& val, const Char *pSymbolName );95 Void xReadFlag ( UInt& val, const Char *pSymbolName );92 Void xReadCode ( UInt length, UInt& val, const TChar *pSymbolName ); 93 Void xReadUvlc ( UInt& val, const TChar *pSymbolName ); 94 Void xReadSvlc ( Int& val, const TChar *pSymbolName ); 95 Void xReadFlag ( UInt& val, const TChar *pSymbolName ); 96 96 #else 97 97 Void xReadCode ( UInt length, UInt& val ); 98 98 Void xReadUvlc ( UInt& val ); … … 100 100 Void xReadFlag ( UInt& val ); 101 101 #endif 102 102 #if ENC_DEC_TRACE 103 Void xReadCodeTr (UInt length, UInt& rValue, const Char *pSymbolName);104 Void xReadUvlcTr ( UInt& rValue, const Char *pSymbolName);105 Void xReadSvlcTr ( Int& rValue, const Char *pSymbolName);106 Void xReadFlagTr ( UInt& rValue, const Char *pSymbolName);103 Void xReadCodeTr (UInt length, UInt& rValue, const TChar *pSymbolName); 104 Void xReadUvlcTr ( UInt& rValue, const TChar *pSymbolName); 105 Void xReadSvlcTr ( Int& rValue, const TChar *pSymbolName); 106 Void xReadFlagTr ( UInt& rValue, const TChar *pSymbolName); 107 107 #endif 108 108 public: 109 109 Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; } -
source/Lib/TLibDecoder/TDecGop.cpp
152 152 } 153 153 154 154 pcPic->compressMotion(); 155 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');155 TChar c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); 156 156 if (!pcSlice->isReferenced()) 157 157 { 158 158 c += 32; … … 210 210 /* calculate MD5sum for entire reconstructed picture */ 211 211 TComPictureHash recon_digest; 212 212 Int numChar=0; 213 const Char* hashType = "\0";213 const TChar* hashType = "\0"; 214 214 215 215 if (pictureHashSEI) 216 216 { … … 243 243 } 244 244 245 245 /* compare digest against received version */ 246 const Char* ok = "(unk)";246 const TChar* ok = "(unk)"; 247 247 Bool mismatch = false; 248 248 249 249 if (pictureHashSEI) -
source/Lib/TLibDecoder/TDecSbac.cpp
859 859 860 860 if (!pcCU->isIntra(uiAbsPartIdx) || (pcCU->getIntraDir( CHANNEL_TYPE_CHROMA, uiAbsPartIdx ) == DM_CHROMA_IDX)) 861 861 { 862 Char alpha = 0;862 SChar alpha = 0; 863 863 UInt symbol = 0; 864 864 865 865 DTRACE_CABAC_VL( g_nSymbolCounter++ ) -
source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
168 168 169 169 if (g_debugCounter >= debugCabacBinTargetLine) 170 170 { 171 Char breakPointThis;171 UChar breakPointThis; 172 172 breakPointThis = 7; 173 173 } 174 174 if (g_debugCounter >= (debugCabacBinTargetLine + debugCabacBinWindow)) -
source/Lib/TLibDecoder/SyntaxElementParser.cpp
48 48 49 49 #if ENC_DEC_TRACE 50 50 51 Void SyntaxElementParser::xReadCodeTr (UInt length, UInt& rValue, const Char *pSymbolName)51 Void SyntaxElementParser::xReadCodeTr (UInt length, UInt& rValue, const TChar *pSymbolName) 52 52 { 53 53 #if RExt__DECODER_DEBUG_BIT_STATISTICS 54 54 xReadCode (length, rValue, pSymbolName); … … 67 67 fflush ( g_hTrace ); 68 68 } 69 69 70 Void SyntaxElementParser::xReadUvlcTr (UInt& rValue, const Char *pSymbolName)70 Void SyntaxElementParser::xReadUvlcTr (UInt& rValue, const TChar *pSymbolName) 71 71 { 72 72 #if RExt__DECODER_DEBUG_BIT_STATISTICS 73 73 xReadUvlc (rValue, pSymbolName); … … 79 79 fflush ( g_hTrace ); 80 80 } 81 81 82 Void SyntaxElementParser::xReadSvlcTr (Int& rValue, const Char *pSymbolName)82 Void SyntaxElementParser::xReadSvlcTr (Int& rValue, const TChar *pSymbolName) 83 83 { 84 84 #if RExt__DECODER_DEBUG_BIT_STATISTICS 85 85 xReadSvlc (rValue, pSymbolName); … … 91 91 fflush ( g_hTrace ); 92 92 } 93 93 94 Void SyntaxElementParser::xReadFlagTr (UInt& rValue, const Char *pSymbolName)94 Void SyntaxElementParser::xReadFlagTr (UInt& rValue, const TChar *pSymbolName) 95 95 { 96 96 #if RExt__DECODER_DEBUG_BIT_STATISTICS 97 97 xReadFlag (rValue, pSymbolName); … … 120 120 // Protected member functions 121 121 // ==================================================================================================================== 122 122 #if RExt__DECODER_DEBUG_BIT_STATISTICS 123 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode, const Char *pSymbolName)123 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode, const TChar *pSymbolName) 124 124 #else 125 125 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode) 126 126 #endif … … 133 133 } 134 134 135 135 #if RExt__DECODER_DEBUG_BIT_STATISTICS 136 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal, const Char *pSymbolName)136 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal, const TChar *pSymbolName) 137 137 #else 138 138 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal) 139 139 #endif … … 171 171 } 172 172 173 173 #if RExt__DECODER_DEBUG_BIT_STATISTICS 174 Void SyntaxElementParser::xReadSvlc( Int& riVal, const Char *pSymbolName)174 Void SyntaxElementParser::xReadSvlc( Int& riVal, const TChar *pSymbolName) 175 175 #else 176 176 Void SyntaxElementParser::xReadSvlc( Int& riVal) 177 177 #endif … … 209 209 } 210 210 211 211 #if RExt__DECODER_DEBUG_BIT_STATISTICS 212 Void SyntaxElementParser::xReadFlag (UInt& ruiCode, const Char *pSymbolName)212 Void SyntaxElementParser::xReadFlag (UInt& ruiCode, const TChar *pSymbolName) 213 213 #else 214 214 Void SyntaxElementParser::xReadFlag (UInt& ruiCode) 215 215 #endif