Changeset 1442 in SHVCSoftware
- Timestamp:
- 13 Aug 2015, 19:11:53 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.cpp
r1377 r1442 63 63 \param argv array of arguments 64 64 */ 65 Bool TAppDecCfg::parseCfg( Int argc, Char* argv[] )65 Bool TAppDecCfg::parseCfg( Int argc, TChar* argv[] ) 66 66 { 67 67 Bool do_help = false; 68 string cfg_BitstreamFile; 69 #if SVC_EXTENSION 70 string cfg_ReconFile [MAX_LAYERS]; 68 #if SVC_EXTENSION 71 69 Int layerNum, targetLayerId; 72 70 Int olsIdx; … … 74 72 string cfg_confPrefix; 75 73 #endif 76 #if AVC_BASE77 string cfg_BLReconFile;78 #endif79 #else80 string cfg_ReconFile;81 74 #endif 82 75 … … 90 83 91 84 ("help", do_help, false, "this help text") 92 ("BitstreamFile,b", cfg_BitstreamFile,string(""), "bitstream input file name")93 #if SVC_EXTENSION 94 ("ReconFileL%d,-o%d", cfg_ReconFile, string(""), MAX_LAYERS, "Layer %d reconstructed YUV output file name\n"85 ("BitstreamFile,b", m_bitstreamFileName, string(""), "bitstream input file name") 86 #if SVC_EXTENSION 87 ("ReconFileL%d,-o%d", m_reconFileName, string(""), MAX_LAYERS, "Layer %d reconstructed YUV output file name\n" 95 88 "YUV writing is skipped if omitted") 96 89 #if AVC_BASE 97 ("BLReconFile,-ibl", cfg_BLReconFile,string(""), "BL reconstructed YUV input file name")90 ("BLReconFile,-ibl", m_reconFileNameBL, string(""), "BL reconstructed YUV input file name") 98 91 #endif 99 92 ("TargetLayerId,-lid", targetLayerId, -1, "Target layer id") … … 105 98 #endif 106 99 #else 107 ("ReconFile,o", cfg_ReconFile,string(""), "reconstructed YUV output file name\n"100 ("ReconFile,o", m_reconFileName, string(""), "reconstructed YUV output file name\n" 108 101 "YUV writing is skipped if omitted") 109 102 #endif … … 134 127 po::setDefaults(opts); 135 128 po::ErrorReporter err; 136 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (constChar**) argv, err);137 138 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)129 const list<const TChar*>& argv_unhandled = po::scanArgv(opts, argc, (const TChar**) argv, err); 130 131 for (list<const TChar*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 139 132 { 140 133 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); … … 163 156 } 164 157 165 /* convert std::string to c string for compatability */166 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());167 158 #if SVC_EXTENSION 168 159 if( targetLayerId < 0 ) … … 204 195 m_commonDecoderParams.setTargetOutputLayerSetIdx( olsIdx ); 205 196 m_commonDecoderParams.setTargetLayerId( targetLayerId ); 206 207 #if CONFORMANCE_BITSTREAM_MODE 208 for(Int layer = 0; layer < MAX_VPS_LAYER_IDX_PLUS1; layer++ ) 209 { 210 #else 211 for(UInt layer=0; layer<= m_tgtLayerId; layer++) 212 { 213 assert( layer < MAX_LAYERS ); 214 #endif 215 m_pchReconFile[layer] = cfg_ReconFile[layer].empty() ? NULL : strdup(cfg_ReconFile[layer].c_str()); 216 } 217 #if AVC_BASE 218 m_pchBLReconFile = cfg_BLReconFile.empty() ? NULL : strdup(cfg_BLReconFile.c_str()); 219 #endif 220 #else 221 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str()); 222 #endif 223 224 if (!m_pchBitstreamFile) 197 #endif 198 199 if (m_bitstreamFileName.empty()) 225 200 { 226 201 fprintf(stderr, "No input file specified, aborting\n"); -
branches/SHM-dev/source/App/TAppDecoder/TAppDecCfg.h
r1323 r1442 57 57 { 58 58 protected: 59 Char* m_pchBitstreamFile;///< input bitstream file name59 std::string m_bitstreamFileName; ///< input bitstream file name 60 60 #if SVC_EXTENSION 61 Char* m_pchReconFile [MAX_LAYERS];///< output reconstruction file name61 std::string m_reconFileName[MAX_LAYERS]; ///< output reconstruction file name 62 62 #else 63 Char* m_pchReconFile;///< output reconstruction file name63 std::string m_reconFileName; ///< output reconstruction file name 64 64 #endif 65 65 Int m_iSkipFrame; ///< counter for frames prior to the random access point to skip … … 84 84 #if SVC_EXTENSION 85 85 #if AVC_BASE 86 Char* m_pchBLReconFile; ///< input BL reconstruction file name86 std::string m_reconFileNameBL; ///< input BL reconstruction file name 87 87 #endif 88 88 CommonDecoderParams m_commonDecoderParams; … … 99 99 public: 100 100 TAppDecCfg() 101 : m_ pchBitstreamFile(NULL)101 : m_bitstreamFileName() 102 102 #if !SVC_EXTENSION 103 , m_ pchReconFile(NULL)103 , m_reconFileName() 104 104 #endif 105 105 , m_iSkipFrame(0) 106 // m_outputBitDepth array initialised below 106 107 , m_outputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 107 108 , m_iMaxTemporalLayer(-1) 108 109 , m_decodedPictureHashSEIEnabled(0) 109 110 , m_decodedNoDisplaySEIEnabled(false) 111 , m_targetDecLayerIdSet() 110 112 #if Q0074_COLOUR_REMAPPING_SEI 111 113 , m_colourRemapSEIEnabled(0) … … 115 117 , m_forceDecodeBitDepth(0) 116 118 #endif 119 , m_outputDecodedSEIMessagesFilename() 120 , m_bClipOutputVideoToRec709Range(false) 117 121 { 118 122 for (UInt channelTypeIndex = 0; channelTypeIndex < MAX_NUM_CHANNEL_TYPE; channelTypeIndex++) … … 124 128 virtual ~TAppDecCfg() {} 125 129 126 Bool parseCfg ( Int argc, Char* argv[] ); ///< initialize option class from configuration130 Bool parseCfg ( Int argc, TChar* argv[] ); ///< initialize option class from configuration 127 131 128 132 #if SVC_EXTENSION -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1420 r1442 90 90 Void TAppDecTop::destroy() 91 91 { 92 if (m_pchBitstreamFile) 93 { 94 free (m_pchBitstreamFile); 95 m_pchBitstreamFile = NULL; 96 } 92 m_bitstreamFileName.clear(); 97 93 #if SVC_EXTENSION 98 94 #if CONFORMANCE_BITSTREAM_MODE … … 102 98 #endif 103 99 { 104 if( m_pchReconFile[i] ) 105 { 106 free ( m_pchReconFile[i] ); 107 m_pchReconFile[i] = NULL; 108 } 100 m_reconFileName[i].clear(); 109 101 110 102 if( m_apcTDecTop[i] ) … … 121 113 } 122 114 #if AVC_BASE 123 if( m_pchBLReconFile ) 124 { 125 free ( m_pchBLReconFile ); 126 m_pchBLReconFile = NULL; 127 } 128 #endif 129 #else 130 if (m_pchReconFile) 131 { 132 free (m_pchReconFile); 133 m_pchReconFile = NULL; 134 } 115 m_reconFileNameBL.clear(); 116 #endif 117 #else 118 m_reconFileName.clear(); 135 119 #endif 136 120 #if Q0074_COLOUR_REMAPPING_SEI … … 160 144 TComList<TComPic*>* pcListPic = NULL; 161 145 162 ifstream bitstreamFile(m_ pchBitstreamFile, ifstream::in | ifstream::binary);146 ifstream bitstreamFile(m_bitstreamFileName.c_str(), ifstream::in | ifstream::binary); 163 147 if (!bitstreamFile) 164 148 { 165 fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_ pchBitstreamFile);149 fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_bitstreamFileName.c_str()); 166 150 exit(EXIT_FAILURE); 167 151 } … … 203 187 TComPic pcBLPic; 204 188 fstream streamYUV; 205 if( m_pchBLReconFile)206 { 207 streamYUV.open( m_ pchBLReconFile, fstream::in | fstream::binary );189 if( !m_reconFileNameBL.empty() ) 190 { 191 streamYUV.open( m_reconFileNameBL, fstream::in | fstream::binary ); 208 192 } 209 193 TComList<TComPic*> *cListPic = m_apcTDecTop[0]->getListPic(); … … 329 313 if( pcListPic ) 330 314 { 331 if ( m_pchReconFile[curLayerId]&& !openedReconFile[curLayerId] )315 if ( !m_reconFileName[curLayerId].empty() && !openedReconFile[curLayerId] ) 332 316 { 333 317 const BitDepths &bitDepths=pcListPic->front()->getSlice(0)->getBitDepths(); // use bit depths of first reconstructed picture. … … 339 323 } 340 324 } 341 m_apcTVideoIOYuvReconFile[curLayerId]->open( m_ pchReconFile[curLayerId], true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon ); // write mode325 m_apcTVideoIOYuvReconFile[curLayerId]->open( m_reconFileName[curLayerId], true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon ); // write mode 342 326 343 327 openedReconFile[curLayerId] = true; … … 442 426 TComList<TComPic*>* pcListPic = NULL; 443 427 444 ifstream bitstreamFile(m_ pchBitstreamFile, ifstream::in | ifstream::binary);428 ifstream bitstreamFile(m_bitstreamFileName.c_str(), ifstream::in | ifstream::binary); 445 429 if (!bitstreamFile) 446 430 { 447 fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_ pchBitstreamFile);431 fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_bitstreamFileName.c_str()); 448 432 exit(EXIT_FAILURE); 449 433 } … … 548 532 if( pcListPic ) 549 533 { 550 if ( m_pchReconFile && !openedReconFile)534 if ( (!m_reconFileName.empty()) && (!openedReconFile) ) 551 535 { 552 536 const BitDepths &bitDepths=pcListPic->front()->getPicSym()->getSPS().getBitDepths(); // use bit depths of first reconstructed picture. … … 559 543 } 560 544 561 m_cTVideoIOYuvReconFile.open( m_ pchReconFile, true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon ); // write mode545 m_cTVideoIOYuvReconFile.open( m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, bitDepths.recon ); // write mode 562 546 openedReconFile = true; 563 547 } … … 648 632 #endif 649 633 { 650 if ( m_pchReconFile[layer])634 if ( !m_reconFileName[layer].empty() ) 651 635 { 652 636 m_apcTVideoIOYuvReconFile[layer]->close(); … … 657 641 } 658 642 #else 659 if ( m_pchReconFile)660 { 661 m_cTVideoIOYuvReconFile. 643 if ( !m_reconFileName.empty() ) 644 { 645 m_cTVideoIOYuvReconFile.close(); 662 646 } 663 647 … … 792 776 numPicsNotYetDisplayed = numPicsNotYetDisplayed-2; 793 777 #if SVC_EXTENSION 794 if ( m_pchReconFile[layerId])778 if ( !m_reconFileName[layerId].empty() ) 795 779 { 796 780 const Window &conf = pcPicTop->getConformanceWindow(); … … 826 810 m_aiPOCLastDisplay[layerId] = pcPicBottom->getPOC(); 827 811 #else 828 if ( m_pchReconFile)812 if ( !m_reconFileName.empty() ) 829 813 { 830 814 const Window &conf = pcPicTop->getConformanceWindow(); … … 901 885 } 902 886 #if SVC_EXTENSION 903 if ( m_pchReconFile[layerId])887 if ( !m_reconFileName[layerId].empty() ) 904 888 { 905 889 const Window &conf = pcPic->getConformanceWindow(); … … 920 904 m_aiPOCLastDisplay[layerId] = pcPic->getPOC(); 921 905 #else 922 if ( m_pchReconFile)906 if ( !m_reconFileName.empty() ) 923 907 { 924 908 const Window &conf = pcPic->getConformanceWindow(); … … 1024 1008 // write to file 1025 1009 #if SVC_EXTENSION 1026 if ( m_pchReconFile[layerId])1010 if ( !m_reconFileName[layerId].empty() ) 1027 1011 { 1028 1012 const Window &conf = pcPicTop->getConformanceWindow(); … … 1043 1027 m_aiPOCLastDisplay[layerId] = pcPicBottom->getPOC(); 1044 1028 #else 1045 if ( m_pchReconFile)1029 if ( !m_reconFileName.empty() ) 1046 1030 { 1047 1031 const Window &conf = pcPicTop->getConformanceWindow(); … … 1103 1087 // write to file 1104 1088 #if SVC_EXTENSION 1105 if ( m_pchReconFile[layerId])1089 if ( !m_reconFileName[layerId].empty() ) 1106 1090 { 1107 1091 const Window &conf = pcPic->getConformanceWindow(); … … 1123 1107 m_aiPOCLastDisplay[layerId] = pcPic->getPOC(); 1124 1108 #else 1125 if ( m_pchReconFile)1109 if ( !m_reconFileName.empty() ) 1126 1110 { 1127 1111 const Window &conf = pcPic->getConformanceWindow(); … … 1234 1218 #if ALIGNED_BUMPING 1235 1219 // Function outputs a picture, and marks it as not needed for output. 1236 Void TAppDecTop::xOutputAndMarkPic( TComPic *pic, const Char *reconFile, const Int layerId, Int &pocLastDisplay, DpbStatus &dpbStatus )1237 { 1238 if ( reconFile)1220 Void TAppDecTop::xOutputAndMarkPic( TComPic *pic, std::string& reconFileName, const Int layerId, Int &pocLastDisplay, DpbStatus &dpbStatus ) 1221 { 1222 if( !reconFileName.empty() ) 1239 1223 { 1240 1224 const Window &conf = pic->getConformanceWindow(); … … 1488 1472 TComPic *pic = *iterPic; 1489 1473 1490 xOutputAndMarkPic( pic, m_ pchReconFile[layerId], layerId, m_aiPOCLastDisplay[layerId], dpbStatus );1474 xOutputAndMarkPic( pic, m_reconFileName[layerId], layerId, m_aiPOCLastDisplay[layerId], dpbStatus ); 1491 1475 1492 1476 #if CONFORMANCE_BITSTREAM_MODE … … 1961 1945 1962 1946 //Write remapped picture in decoding order 1963 Char cTemp[255];1947 TChar cTemp[255]; 1964 1948 sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, iWidth, iHeight, storeCriSEI[layerId].m_colourRemapBitDepth ); 1965 1949 picColourRemapped.dump( cTemp, true, storeCriSEI[layerId].m_colourRemapBitDepth ); … … 1974 1958 if (storeCriSEI[layerId].m_colourRemapBitDepth == 8 || storeCriSEI[layerId].m_colourRemapBitDepth == 10) 1975 1959 { 1976 Char cTemp[255];1960 TChar cTemp[255]; 1977 1961 sprintf(cTemp, "seiColourRemappedPic_L%d_%dx%d_%dbits.yuv", layerId, pic.getWidth(COMPONENT_Y), pic.getHeight(COMPONENT_Y), storeCriSEI[layerId].m_colourRemapBitDepth ); 1978 1962 pic.dump( cTemp, true, storeCriSEI[layerId].m_colourRemapBitDepth ); -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r1378 r1442 136 136 Void flushAllPictures(Int layerId, Bool outputPictures); 137 137 138 Void xOutputAndMarkPic( TComPic *pic, const Char *reconFile, const Int layerId, Int &pocLastDisplay, DpbStatus &dpbStatus);138 Void xOutputAndMarkPic( TComPic *pic, std::string& reconFileName, const Int layerId, Int &pocLastDisplay, DpbStatus &dpbStatus); 139 139 Void outputAllPictures(Int layerId, Bool notOutputCurrAu); 140 140 Void xFindDPBStatus( std::vector<Int> &listOfPocs -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1441 r1442 110 110 TAppEncCfg::TAppEncCfg() 111 111 #if AVC_BASE 112 : m_nonHEVCBaseLayerFlag( 0)112 : m_nonHEVCBaseLayerFlag(false) 113 113 #endif 114 114 , m_maxTidRefPresentFlag(1) 115 115 , m_defaultTargetOutputLayerIdc (-1) 116 116 , m_numOutputLayerSets (-1) 117 , m_pchBitstreamFile()118 117 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 119 118 , m_snrInternalColourSpace(false) … … 126 125 #else 127 126 TAppEncCfg::TAppEncCfg() 128 : m_pchInputFile() 129 , m_pchBitstreamFile() 130 , m_pchReconFile() 131 , m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 127 : m_inputColourSpaceConvert(IPCOLOURSPACE_UNCHANGED) 132 128 , m_snrInternalColourSpace(false) 133 129 , m_outputInternalColourSpace(false) 134 , m_pchdQPFile()135 , m_scalingListFile()136 130 { 137 131 m_aidQP = NULL; … … 164 158 m_targetPivotValue = NULL; 165 159 } 166 167 free(m_pchInputFile); 168 #endif 169 free(m_pchBitstreamFile); 170 #if !SVC_EXTENSION 171 free(m_pchReconFile); 172 free(m_pchdQPFile); 173 free(m_scalingListFile); 174 #endif 160 #endif 175 161 } 176 162 … … 240 226 } 241 227 242 Bool confirmPara(Bool bflag, const Char* message);228 Bool confirmPara(Bool bflag, const TChar* message); 243 229 244 230 static inline ChromaFormat numberToChromaFormat(const Int val) … … 254 240 } 255 241 256 #if SVC_EXTENSION257 void TAppEncCfg::getDirFilename(string& filename, string& dir, const string path)258 {259 size_t pos = path.find_last_of("\\");260 if(pos != std::string::npos)261 {262 filename.assign(path.begin() + pos + 1, path.end());263 dir.assign(path.begin(), path.begin() + pos + 1);264 }265 else266 {267 pos = path.find_last_of("/");268 if(pos != std::string::npos)269 {270 filename.assign(path.begin() + pos + 1, path.end());271 dir.assign(path.begin(), path.begin() + pos + 1);272 }273 else274 {275 filename = path;276 dir.assign("");277 }278 }279 }280 #endif281 282 242 static const struct MapStrToProfile 283 243 { 284 const Char* str;244 const TChar* str; 285 245 Profile::Name value; 286 246 } … … 302 262 static const struct MapStrToExtendedProfile 303 263 { 304 const Char* str;264 const TChar* str; 305 265 ExtendedProfileName value; 306 266 } … … 366 326 static const struct MapStrToTier 367 327 { 368 const Char* str;328 const TChar* str; 369 329 Level::Tier value; 370 330 } … … 377 337 static const struct MapStrToLevel 378 338 { 379 const Char* str;339 const TChar* str; 380 340 Level::Name value; 381 341 } … … 410 370 static const struct MapStrToCostMode 411 371 { 412 const Char* str;372 const TChar* str; 413 373 CostMode value; 414 374 } … … 423 383 static const struct MapStrToScalingListMode 424 384 { 425 const Char* str;385 const TChar* str; 426 386 ScalingListMode value; 427 387 } … … 526 486 SMultiValueInput<T> &operator=(const SMultiValueInput<T> &userValues) { values=userValues.values; return *this; } 527 487 528 T readValue(const Char *&pStr, Bool &bSuccess);488 T readValue(const TChar *&pStr, Bool &bSuccess); 529 489 530 490 istream& readValues(std::istream &in); … … 538 498 539 499 template<> 540 UInt SMultiValueInput<UInt>::readValue(const Char *&pStr, Bool &bSuccess)500 UInt SMultiValueInput<UInt>::readValue(const TChar *&pStr, Bool &bSuccess) 541 501 { 542 Char *eptr;502 TChar *eptr; 543 503 UInt val=strtoul(pStr, &eptr, 0); 544 504 pStr=eptr; … … 548 508 549 509 template<> 550 Int SMultiValueInput<Int>::readValue(const Char *&pStr, Bool &bSuccess)510 Int SMultiValueInput<Int>::readValue(const TChar *&pStr, Bool &bSuccess) 551 511 { 552 Char *eptr;512 TChar *eptr; 553 513 Int val=strtol(pStr, &eptr, 0); 554 514 pStr=eptr; … … 558 518 559 519 template<> 560 Double SMultiValueInput<Double>::readValue(const Char *&pStr, Bool &bSuccess)520 Double SMultiValueInput<Double>::readValue(const TChar *&pStr, Bool &bSuccess) 561 521 { 562 Char *eptr;522 TChar *eptr; 563 523 Double val=strtod(pStr, &eptr); 564 524 pStr=eptr; … … 568 528 569 529 template<> 570 Bool SMultiValueInput<Bool>::readValue(const Char *&pStr, Bool &bSuccess)530 Bool SMultiValueInput<Bool>::readValue(const TChar *&pStr, Bool &bSuccess) 571 531 { 572 Char *eptr;532 TChar *eptr; 573 533 Int val=strtol(pStr, &eptr, 0); 574 534 pStr=eptr; … … 588 548 if (!str.empty()) 589 549 { 590 const Char *pStr=str.c_str();550 const TChar *pStr=str.c_str(); 591 551 // soak up any whitespace 592 552 for(;isspace(*pStr);pStr++); … … 703 663 // ==================================================================================================================== 704 664 705 #if SVC_EXTENSION706 665 /** \param argc number of arguments 707 666 \param argv array of arguments 708 667 \retval true when success 709 668 */ 710 Bool TAppEncCfg::parseCfgNumLayersAndInit( Int argc, Char* argv[] ) 711 { 712 po::Options opts; 713 opts.addOptions() 714 ("c", po::parseConfigFile, "configuration file name") 715 ("NumLayers", m_numLayers, 1, "Number of layers to code") 716 ; 717 718 po::setDefaults(opts); 719 po::ErrorReporter err; 720 err.verbose = false; 721 po::scanArgv(opts, argc, (const Char**) argv, err); 722 723 if( m_numLayers <= 0 ) 724 { 725 printf("Wrong number of layers %d\n", m_numLayers); 726 return false; 727 } 728 729 for( Int layer = 0; layer < m_numLayers; layer++ ) 730 { 731 m_apcLayerCfg[layer] = new TAppEncLayerCfg; 732 m_apcLayerCfg[layer]->setAppEncCfg(this); 733 } 734 735 return true; 736 } 737 #endif 738 739 /** \param argc number of arguments 740 \param argv array of arguments 741 \retval true when success 742 */ 743 Bool TAppEncCfg::parseCfg( Int argc, Char* argv[] ) 669 Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] ) 744 670 { 745 671 Bool do_help = false; 746 672 747 #if SVC_EXTENSION 748 string cfg_BitstreamFile;749 string* cfg_ InputFile[MAX_LAYERS];750 string* cfg_ ReconFile[MAX_LAYERS];751 Double* cfg_fQP 752 Int* cfg_layerId 673 #if SVC_EXTENSION 674 string* cfg_InputFile [MAX_LAYERS]; 675 string* cfg_ReconFile [MAX_LAYERS]; 676 string* cfg_dQPFileName [MAX_LAYERS]; 677 Double* cfg_fQP [MAX_LAYERS]; 678 Int* cfg_layerId [MAX_LAYERS]; 753 679 Int* cfg_repFormatIdx [MAX_LAYERS]; 754 680 Int* cfg_SourceWidth [MAX_LAYERS]; … … 848 774 Int* cfg_maxTidIlRefPicsPlus1[MAX_LAYERS]; 849 775 #if Q0074_COLOUR_REMAPPING_SEI 850 string* cfg_colourRemapSEIFile Root[MAX_LAYERS];776 string* cfg_colourRemapSEIFileName[MAX_LAYERS]; 851 777 #endif 852 778 Int* cfg_waveFrontSynchro[MAX_LAYERS]; … … 861 787 for( UInt layer = 0; layer < m_numLayers; layer++ ) 862 788 { 863 cfg_InputFile[layer] = &m_apcLayerCfg[layer]->m_cInputFile; 864 cfg_ReconFile[layer] = &m_apcLayerCfg[layer]->m_cReconFile; 789 cfg_InputFile[layer] = &m_apcLayerCfg[layer]->m_inputFileName; 790 cfg_ReconFile[layer] = &m_apcLayerCfg[layer]->m_reconFileName; 791 cfg_dQPFileName[layer] = &m_apcLayerCfg[layer]->m_dQPFileName; 865 792 cfg_fQP[layer] = &m_apcLayerCfg[layer]->m_fQP; 866 793 #if Q0074_COLOUR_REMAPPING_SEI 867 cfg_colourRemapSEIFile Root[layer] = &m_apcLayerCfg[layer]->m_colourRemapSEIFileRoot;794 cfg_colourRemapSEIFileName[layer] = &m_apcLayerCfg[layer]->m_colourRemapSEIFileName; 868 795 #endif 869 796 cfg_repFormatIdx[layer] = &m_apcLayerCfg[layer]->m_repFormatIdx; … … 979 906 string* cfg_listOfLayerPTLOfOlss = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 980 907 #if AVC_BASE 981 string cfg_BLInputFile;908 string m_inputFileNameBL; 982 909 #endif 983 910 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 984 string cfg_tileSets; 985 #endif 986 #else //SVC_EXTENSION 987 string cfg_InputFile; 988 string cfg_BitstreamFile; 989 string cfg_ReconFile; 990 string cfg_dQPFile; 991 #if Q0074_COLOUR_REMAPPING_SEI 992 string cfg_colourRemapSEIFileRoot; 993 #endif 994 string cfg_ScalingListFile; 911 string m_tileSets; 912 #endif 995 913 #endif //SVC_EXTENSION 996 914 … … 1121 1039 ("ScalabilityMask3", m_scalabilityMask[AUX_ID], 0, "scalability_mask[3] (auxiliary pictures)" ) 1122 1040 #endif 1123 ("BitstreamFile,b", cfg_BitstreamFile,string(""), "Bitstream output file name")1124 ("NumRefLocationOffsets%d", cfg_numRefLayerLocationOffsets, 0, m_numLayers, 1041 ("BitstreamFile,b", m_bitstreamFileName, string(""), "Bitstream output file name") 1042 ("NumRefLocationOffsets%d", cfg_numRefLayerLocationOffsets, 0, m_numLayers, "Number of reference layer offset sets ") 1125 1043 ("RefLocationOffsetLayerId%d", cfg_refLocationOffsetLayerIdPtr, string(""), m_numLayers, "Layer ID of reference location offset") 1126 1044 ("ScaledRefLayerLeftOffset%d", cfg_scaledRefLayerLeftOffsetPtr, string(""), m_numLayers, "Horizontal offset of top-left luma sample of scaled base layer picture with respect to" … … 1148 1066 ("PhaseVerChroma%d", cfg_phaseVerChromaPtr, string(""), m_numLayers, "chroma shift in the vertical direction used in resampling proces") 1149 1067 #if Q0074_COLOUR_REMAPPING_SEI 1150 ("SEIColourRemappingInfoFileRoot%d", cfg_colourRemapSEIFile Root, string(""), m_numLayers, "Colour Remapping Information SEI parameters file name for layer %d")1068 ("SEIColourRemappingInfoFileRoot%d", cfg_colourRemapSEIFileName, string(""), m_numLayers, "Colour Remapping Information SEI parameters file name for layer %d") 1151 1069 #endif 1152 1070 ("InputBitDepth%d", cfg_InputBitDepth[CHANNEL_TYPE_LUMA], 8, m_numLayers, "Bit-depth of input file for layer %d") … … 1165 1083 ("InterLayerWeightedPred", m_useInterLayerWeightedPred, false, "enable IL WP parameters estimation at encoder" ) 1166 1084 #if AVC_BASE 1167 ("NonHEVCBase,-nonhevc", m_nonHEVCBaseLayerFlag, 0, "BL is available but not internal")1168 ("InputBLFile,-ibl", cfg_BLInputFile,string(""), "Base layer rec YUV input file name")1085 ("NonHEVCBase,-nonhevc", m_nonHEVCBaseLayerFlag, false, "BL is available but not internal") 1086 ("InputBLFile,-ibl", m_inputFileNameBL, string(""), "Base layer rec YUV input file name") 1169 1087 #endif 1170 1088 ("EnableElRapB,-use-rap-b", m_elRapSliceBEnabled, false, "Set ILP over base-layer I picture to B picture (default is P picture)") … … 1172 1090 ("ChromaFormatIDC,-cf", tmpChromaFormat, 0, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat)") 1173 1091 #else //SVC_EXTENSION 1174 ("InputFile,i", cfg_InputFile,string(""), "Original YUV input file name")1175 ("BitstreamFile,b", cfg_BitstreamFile,string(""), "Bitstream output file name")1176 ("ReconFile,o", cfg_ReconFile,string(""), "Reconstructed YUV output file name")1092 ("InputFile,i", m_inputFileName, string(""), "Original YUV input file name") 1093 ("BitstreamFile,b", m_bitstreamFileName, string(""), "Bitstream output file name") 1094 ("ReconFile,o", m_reconFileName, string(""), "Reconstructed YUV output file name") 1177 1095 ("SourceWidth,-wdt", m_iSourceWidth, 0, "Source picture width") 1178 1096 ("SourceHeight,-hgt", m_iSourceHeight, 0, "Source picture height") … … 1217 1135 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 1218 1136 #if Q0074_COLOUR_REMAPPING_SEI 1219 ("SEIColourRemappingInfoFileRoot", cfg_colourRemapSEIFileRoot,string(""), "Colour Remapping Information SEI parameters file name")1137 ("SEIColourRemappingInfoFileRoot", m_colourRemapSEIFileName, string(""), "Colour Remapping Information SEI parameters file name") 1220 1138 #endif 1221 1139 #endif //SVC_EXTENSION … … 1362 1280 ("AdaptiveQP,-aq", m_bUseAdaptiveQP, false, "QP adaptation based on a psycho-visual model") 1363 1281 ("MaxQPAdaptationRange,-aqr", m_iQPAdaptationRange, 6, "QP adaptation range") 1364 #if !SVC_EXTENSION 1365 ("dQPFile,m", cfg_dQPFile, string(""), "dQP file name") 1282 #if SVC_EXTENSION 1283 ("dQPFile,m", cfg_dQPFileName, string(""), m_numLayers, "dQP file name") 1284 #else 1285 ("dQPFile,m", m_dQPFileName, string(""), "dQP file name") 1366 1286 #endif 1367 1287 ("RDOQ", m_useRDOQ, true) … … 1452 1372 ("WaveFrontSynchro", m_iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with top-right-right") 1453 1373 ("ScalingList", m_useScalingListId, SCALING_LIST_OFF, "0/off: no scaling list, 1/default: default scaling lists, 2/file: scaling lists specified in ScalingListFile") 1454 ("ScalingListFile", cfg_ScalingListFile,string(""), "Scaling list file name. Use an empty string to produce help.")1374 ("ScalingListFile", m_scalingListFileName, string(""), "Scaling list file name. Use an empty string to produce help.") 1455 1375 #endif 1456 1376 ("SignHideFlag,-SBH", m_signHideFlag, true) … … 1714 1634 ("SEIInterLayerConstrainedTileSets", m_interLayerConstrainedTileSetsSEIEnabled, false, "Control generation of inter layer constrained tile sets SEI message") 1715 1635 ("IlNumSetsInMessage", m_ilNumSetsInMessage, 0u, "Number of inter layer constrained tile sets") 1716 ("TileSetsArray", cfg_tileSets,string(""), "Array containing tile sets params (TopLeftTileIndex, BottonRightTileIndex and ilcIdc for each set) ")1636 ("TileSetsArray", m_tileSets, string(""), "Array containing tile sets params (TopLeftTileIndex, BottonRightTileIndex and ilcIdc for each set) ") 1717 1637 #endif 1718 1638 ("AltOutputLayerFlag", m_altOutputLayerFlag, false, "Specifies the value of alt_output_layer_flag in VPS extension") … … 1753 1673 po::setDefaults(opts); 1754 1674 po::ErrorReporter err; 1755 const list<const Char*>& argv_unhandled = po::scanArgv(opts, argc, (const Char**) argv, err); 1756 1757 #if SVC_EXTENSION 1675 const list<const TChar*>& argv_unhandled = po::scanArgv(opts, argc, (const TChar**) argv, err); 1676 1677 #if SVC_EXTENSION 1678 #if AVC_BASE 1679 if( m_nonHEVCBaseLayerFlag ) 1680 { 1681 *cfg_InputFile[0] = m_inputFileNameBL; 1682 } 1683 #endif 1684 1758 1685 for (Int i=1; i<m_numLayers; i++) 1759 1686 { … … 1775 1702 #endif 1776 1703 1777 for (list<const Char*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++)1704 for (list<const TChar*>::const_iterator it = argv_unhandled.begin(); it != argv_unhandled.end(); it++) 1778 1705 { 1779 1706 fprintf(stderr, "Unhandled argument ignored: `%s'\n", *it); … … 1799 1726 * Set any derived parameters 1800 1727 */ 1801 /* convert std::string to c string for compatability */1802 #if SVC_EXTENSION1803 #if AVC_BASE1804 if( m_nonHEVCBaseLayerFlag )1805 {1806 *cfg_InputFile[0] = cfg_BLInputFile;1807 }1808 #endif1809 #else //SVC_EXTENSION1810 m_pchInputFile = cfg_InputFile.empty() ? NULL : strdup(cfg_InputFile.c_str());1811 #endif1812 m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());1813 #if !SVC_EXTENSION1814 m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());1815 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str());1816 #if Q0074_COLOUR_REMAPPING_SEI1817 if( !cfg_colourRemapSEIFileRoot.empty() )1818 {1819 m_colourRemapSEIFileRoot = strdup(cfg_colourRemapSEIFileRoot.c_str());1820 }1821 #endif1822 #endif //SVC_EXTENSION1823 1824 1728 1825 1729 m_adIntraLambdaModifier = cfg_adIntraLambdaModifier.values; … … 1895 1799 m_tileRowHeight.clear(); 1896 1800 } 1897 1898 /* rules for input, output and internal bitdepths as per help text */ 1801 1899 1802 #if SVC_EXTENSION 1900 1803 for( Int layer = 0; layer < m_numLayers; layer++ ) 1901 1804 { 1902 m_apcLayerCfg[layer]->m_scalingListFile = cfg_ScalingListFile[layer].empty() ? NULL : strdup(cfg_ScalingListFile[layer].c_str());1805 m_apcLayerCfg[layer]->m_scalingListFileName = cfg_ScalingListFile[layer].empty() ? NULL : strdup(cfg_ScalingListFile[layer].c_str()); 1903 1806 1904 1807 if( m_apcLayerCfg[layer]->m_layerId < 0 ) … … 2034 1937 } 2035 1938 #else 2036 m_scalingListFile = cfg_ScalingListFile.empty() ? NULL : strdup(cfg_ScalingListFile.c_str());2037 2038 1939 /* rules for input, output and internal bitdepths as per help text */ 2039 1940 if (m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) … … 2436 2337 } 2437 2338 2438 Char* pSamplePredRefLayerIds = cfg_samplePredRefLayerIds[layer].empty() ? NULL: strdup(cfg_samplePredRefLayerIds[layer].c_str());2339 TChar* pSamplePredRefLayerIds = cfg_samplePredRefLayerIds[layer].empty() ? NULL: strdup(cfg_samplePredRefLayerIds[layer].c_str()); 2439 2340 if( m_apcLayerCfg[layer]->m_numSamplePredRefLayers > 0 ) 2440 2341 { … … 2471 2372 } 2472 2373 2473 Char* pMotionPredRefLayerIds = cfg_motionPredRefLayerIds[layer].empty() ? NULL: strdup(cfg_motionPredRefLayerIds[layer].c_str());2374 TChar* pMotionPredRefLayerIds = cfg_motionPredRefLayerIds[layer].empty() ? NULL: strdup(cfg_motionPredRefLayerIds[layer].c_str()); 2474 2375 if( m_apcLayerCfg[layer]->m_numMotionPredRefLayers > 0 ) 2475 2376 { … … 2506 2407 } 2507 2408 2508 Char* pPredLayerIds = cfg_predLayerIds[layer].empty() ? NULL: strdup(cfg_predLayerIds[layer].c_str());2409 TChar* pPredLayerIds = cfg_predLayerIds[layer].empty() ? NULL: strdup(cfg_predLayerIds[layer].c_str()); 2509 2410 if( m_apcLayerCfg[layer]->m_numActiveRefLayers > 0 ) 2510 2411 { 2511 char *refLayerId;2512 int i=0;2412 TChar *refLayerId; 2413 Int i=0; 2513 2414 m_apcLayerCfg[layer]->m_predLayerIds = new Int[m_apcLayerCfg[layer]->m_numActiveRefLayers]; 2514 2415 refLayerId = strtok(pPredLayerIds, " ,-"); … … 2661 2562 Double& m_fQP = m_apcLayerCfg[layer]->m_fQP; 2662 2563 2663 Char* m_pchdQPFile = m_apcLayerCfg[layer]->m_pchdQPFile;2564 string& m_dQPFileName = m_apcLayerCfg[layer]->m_dQPFileName; 2664 2565 Int* m_internalBitDepth = m_apcLayerCfg[layer]->m_internalBitDepth; 2665 2566 #endif //SVC_EXTENSION 2567 2666 2568 switch (m_conformanceWindowMode) 2667 2569 { … … 2778 2680 2779 2681 // reading external dQP description from file 2780 if ( m_pchdQPFile ) 2781 { 2782 FILE* fpt=fopen( m_pchdQPFile, "r" ); 2682 if ( !m_dQPFileName.empty() ) 2683 { 2684 FILE* fpt=fopen( m_dQPFileName.c_str(), "r" ); 2685 2783 2686 if ( fpt ) 2784 2687 { … … 2965 2868 exit( EXIT_FAILURE ); 2966 2869 } 2967 Char* pTileSets = cfg_tileSets.empty() ? NULL : strdup(cfg_tileSets.c_str());2870 TChar* pTileSets = m_tileSets.empty() ? NULL : strdup(m_tileSets.c_str()); 2968 2871 int i = 0; 2969 char *topLeftTileIndex = strtok(pTileSets, " ,");2872 TChar *topLeftTileIndex = strtok(pTileSets, " ,"); 2970 2873 while(topLeftTileIndex != NULL) 2971 2874 { … … 3161 3064 #define xConfirmPara(a,b) check_failed |= confirmPara(a,b) 3162 3065 3163 xConfirmPara(m_ pchBitstreamFile==NULL, "A bitstream file name must be specified (BitstreamFile)");3066 xConfirmPara(m_bitstreamFileName.empty(), "A bitstream file name must be specified (BitstreamFile)"); 3164 3067 const UInt maxBitDepth=(m_chromaFormatIDC==CHROMA_400) ? m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_internalBitDepth[CHANNEL_TYPE_LUMA], m_internalBitDepth[CHANNEL_TYPE_CHROMA]); 3165 3068 xConfirmPara(m_bitDepthConstraint<maxBitDepth, "The internalBitDepth must not be greater than the bitDepthConstraint value"); … … 4394 4297 } 4395 4298 4396 const Char *profileToString(const Profile::Name profile)4299 const TChar *profileToString(const Profile::Name profile) 4397 4300 { 4398 4301 static const UInt numberOfProfiles = sizeof(strToProfile)/sizeof(*strToProfile); … … 4454 4357 Int& m_iSourceHeight = m_apcLayerCfg[layerIdx]->m_iSourceHeight; 4455 4358 4456 const Char* m_pchInputFile = m_apcLayerCfg[layerIdx]->m_cInputFile.c_str();4457 const Char* m_pchReconFile = m_apcLayerCfg[layerIdx]->m_cReconFile.c_str();4359 string& m_inputFileName = m_apcLayerCfg[layerIdx]->m_inputFileName; 4360 string& m_reconFileName = m_apcLayerCfg[layerIdx]->m_reconFileName; 4458 4361 4459 4362 Int& m_iFrameRate = m_apcLayerCfg[layerIdx]->m_iFrameRate; … … 4499 4402 #endif 4500 4403 4501 printf("Input File : %s\n", m_ pchInputFile);4404 printf("Input File : %s\n", m_inputFileName.c_str() ); 4502 4405 4503 4406 #if SVC_EXTENSION … … 4507 4410 #endif 4508 4411 4509 printf("Bitstream File : %s\n", m_ pchBitstreamFile);4412 printf("Bitstream File : %s\n", m_bitstreamFileName.c_str() ); 4510 4413 4511 4414 #if SVC_EXTENSION … … 4514 4417 { 4515 4418 #endif 4516 4517 printf("Reconstruction File : %s\n", m_ pchReconFile);4419 4420 printf("Reconstruction File : %s\n", m_reconFileName.c_str() ); 4518 4421 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 4519 4422 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); … … 4801 4704 } 4802 4705 4803 printf(" \nSHVC TOOL CFG: ");4706 printf("SHVC TOOL CFG: "); 4804 4707 printf("ElRapSliceType: %c-slice ", m_elRapSliceBEnabled ? 'B' : 'P'); 4805 4708 printf("REF_IDX_ME_ZEROMV: %d ", REF_IDX_ME_ZEROMV); … … 4822 4725 } 4823 4726 4824 Bool confirmPara(Bool bflag, const Char* message)4727 Bool confirmPara(Bool bflag, const TChar* message) 4825 4728 { 4826 4729 if (!bflag) … … 4836 4739 Void TAppEncCfg::cfgStringToArray(Int **arr, string const cfgString, Int const numEntries, const char* logString) 4837 4740 { 4838 Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str());4741 TChar *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str()); 4839 4742 if( numEntries > 0 ) 4840 4743 { 4841 Char *arrayEntry;4744 TChar *arrayEntry; 4842 4745 Int i = 0; 4843 4746 *arr = new Int[numEntries]; … … 4918 4821 Void TAppEncCfg::cfgStringToArrayNumEntries(Int **arr, string const cfgString, Int &numEntries, const char* logString) 4919 4822 { 4920 Char *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str());4823 TChar *tempChar = cfgString.empty() ? NULL : strdup(cfgString.c_str()); 4921 4824 if (numEntries > 0) 4922 4825 { 4923 Char *arrayEntry;4826 TChar *arrayEntry; 4924 4827 Int i = 0; 4925 4828 *arr = new Int[numEntries]; … … 4983 4886 return false; 4984 4887 } 4888 4889 void TAppEncCfg::getDirFilename(string& filename, string& dir, const string path) 4890 { 4891 size_t pos = path.find_last_of("\\"); 4892 if(pos != std::string::npos) 4893 { 4894 filename.assign(path.begin() + pos + 1, path.end()); 4895 dir.assign(path.begin(), path.begin() + pos + 1); 4896 } 4897 else 4898 { 4899 pos = path.find_last_of("/"); 4900 if(pos != std::string::npos) 4901 { 4902 filename.assign(path.begin() + pos + 1, path.end()); 4903 dir.assign(path.begin(), path.begin() + pos + 1); 4904 } 4905 else 4906 { 4907 filename = path; 4908 dir.assign(""); 4909 } 4910 } 4911 } 4912 4913 /** \param argc number of arguments 4914 \param argv array of arguments 4915 \retval true when success 4916 */ 4917 Bool TAppEncCfg::parseCfgNumLayersAndInit( Int argc, TChar* argv[] ) 4918 { 4919 po::Options opts; 4920 opts.addOptions() 4921 ("c", po::parseConfigFile, "configuration file name") 4922 ("NumLayers", m_numLayers, 1, "Number of layers to code") 4923 ; 4924 4925 po::setDefaults(opts); 4926 po::ErrorReporter err; 4927 err.verbose = false; 4928 po::scanArgv(opts, argc, (const TChar**) argv, err); 4929 4930 if( m_numLayers <= 0 ) 4931 { 4932 printf("Wrong number of layers %d\n", m_numLayers); 4933 return false; 4934 } 4935 4936 for( Int layer = 0; layer < m_numLayers; layer++ ) 4937 { 4938 m_apcLayerCfg[layer] = new TAppEncLayerCfg; 4939 m_apcLayerCfg[layer]->setAppEncCfg(this); 4940 } 4941 4942 return true; 4943 } 4985 4944 #endif //SVC_EXTENSION 4986 4945 //! \} -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1437 r1442 65 65 Int m_scalabilityMask[MAX_VPS_NUM_SCALABILITY_TYPES]; ///< scalability_mask 66 66 #if AVC_BASE 67 Intm_nonHEVCBaseLayerFlag; ///< non HEVC BL67 Bool m_nonHEVCBaseLayerFlag; ///< non HEVC BL 68 68 #endif 69 69 Bool m_maxTidRefPresentFlag; … … 82 82 std::vector< std::vector<Int> > m_listOfOutputLayers; 83 83 #else 84 Char* m_pchInputFile;///< source file name85 #endif 86 Char* m_pchBitstreamFile;///< output bitstream file87 #if !SVC_EXTENSION 88 Char* m_pchReconFile;///< output reconstruction file84 std::string m_inputFileName; ///< source file name 85 #endif 86 std::string m_bitstreamFileName; ///< output bitstream file 87 #if !SVC_EXTENSION 88 std::string m_reconFileName; ///< output reconstruction file 89 89 #endif 90 90 // Lambda modifiers … … 199 199 Double m_fQP; ///< QP value of key-picture (floating point) 200 200 Int m_iQP; ///< QP value of key-picture (integer) 201 Char* m_pchdQPFile;///< QP offset for each slice (initialized from external file)201 std::string m_dQPFileName; ///< QP offset for each slice (initialized from external file) 202 202 Int* m_aidQP; ///< array of slice QP values 203 203 #endif … … 419 419 #if !SVC_EXTENSION 420 420 ScalingListMode m_useScalingListId; ///< using quantization matrix 421 Char* m_scalingListFile;///< quantization matrix file name421 std::string m_scalingListFileName; ///< quantization matrix file name 422 422 #endif 423 423 … … 495 495 #if Q0074_COLOUR_REMAPPING_SEI 496 496 #if !SVC_EXTENSION 497 string m_colourRemapSEIFile Root;497 string m_colourRemapSEIFileName; 498 498 #endif 499 499 #endif … … 567 567 Void create (); ///< create option handling class 568 568 Void destroy (); ///< destroy option handling class 569 Bool parseCfg ( Int argc, Char* argv[] );///< parse configuration file to fill member variables569 Bool parseCfg ( Int argc, TChar* argv[] ); ///< parse configuration file to fill member variables 570 570 571 571 #if SVC_EXTENSION 572 Bool parseCfgNumLayersAndInit( Int argc, Char* argv[] );///< parse configuration file to to get number of layers and allocate memory572 Bool parseCfgNumLayersAndInit( Int argc, TChar* argv[] ); ///< parse configuration file to to get number of layers and allocate memory 573 573 Int getNumFrameToBeEncoded() { return m_framesToBeEncoded; } 574 574 Int getNumLayer() { return m_numLayers; } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1437 r1442 42 42 #if SVC_EXTENSION 43 43 TAppEncLayerCfg::TAppEncLayerCfg() 44 : m_cInputFile(string("")) 45 , m_cReconFile(string("")) 46 , m_conformanceWindowMode(0) 47 , m_scalingListFile(NULL) 48 , m_pchdQPFile(NULL) 44 : m_conformanceWindowMode(0) 49 45 , m_aidQP(NULL) 50 46 , m_repFormatIdx(-1) 51 #if Q0074_COLOUR_REMAPPING_SEI52 , m_colourRemapSEIFileRoot(string(""))53 #endif54 47 { 55 48 #if Q0074_COLOUR_REMAPPING_SEI … … 107 100 } 108 101 #endif 109 free(m_scalingListFile);110 102 } 111 103 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1437 r1442 28 28 protected: 29 29 // file I/O0 30 string m_ cInputFile; ///< source file name31 string m_ cReconFile; ///< output reconstruction file30 string m_inputFileName; ///< source file name 31 string m_reconFileName; ///< output reconstruction file 32 32 Int m_layerId; ///< layer Id 33 33 Int m_iFrameRate; ///< source frame-rates (Hz) … … 95 95 96 96 ScalingListMode m_useScalingListId; ///< using quantization matrix 97 Char* m_scalingListFile;///< quantization matrix file name97 std::string m_scalingListFileName; ///< quantization matrix file name 98 98 99 99 Int m_maxTidIlRefPicsPlus1; … … 102 102 103 103 Int m_iQP; ///< QP value of key-picture (integer) 104 Char* m_pchdQPFile;///< QP offset for each slice (initialized from external file)104 std::string m_dQPFileName; ///< QP offset for each slice (initialized from external file) 105 105 Int* m_aidQP; ///< array of slice QP values 106 106 TAppEncCfg* m_cAppEncCfg; ///< pointer to app encoder config … … 130 130 Int m_repFormatIdx; 131 131 #if Q0074_COLOUR_REMAPPING_SEI 132 string m_colourRemapSEIFile Root;///< Colour Remapping Information SEI message parameters file132 string m_colourRemapSEIFileName; ///< Colour Remapping Information SEI message parameters file 133 133 Int m_colourRemapSEIId; 134 134 Bool m_colourRemapSEICancelFlag; … … 168 168 Void setAppEncCfg(TAppEncCfg* p) {m_cAppEncCfg = p; } 169 169 170 string getInputFile() {return m_cInputFile; }171 string getReconFile() {return m_cReconFile; }172 Double getFloatQP() {return m_fQP; }170 string& getInputFileName() {return m_inputFileName; } 171 string& getReconFileName() {return m_reconFileName; } 172 Double getFloatQP() {return m_fQP; } 173 173 Int getConfWinLeft() {return m_confWinLeft; } 174 174 Int getConfWinRight() {return m_confWinRight; } -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1437 r1442 499 499 500 500 ScalingListMode& m_useScalingListId = m_apcLayerCfg[layer]->m_useScalingListId; 501 Char* m_scalingListFile = m_apcLayerCfg[layer]->m_scalingListFile;501 string& m_scalingListFileName = m_apcLayerCfg[layer]->m_scalingListFileName; 502 502 Bool& m_bUseSAO = m_apcLayerCfg[layer]->m_bUseSAO; 503 504 string& m_colourRemapSEIFileName = m_apcLayerCfg[layer]->m_colourRemapSEIFileName; 503 505 #endif 504 506 … … 785 787 m_cTEncTop.setTMVPModeId ( m_TMVPModeId ); 786 788 m_cTEncTop.setUseScalingListId ( m_useScalingListId ); 787 m_cTEncTop.setScalingListFile ( m_scalingListFile);789 m_cTEncTop.setScalingListFileName ( m_scalingListFileName ); 788 790 m_cTEncTop.setSignHideFlag ( m_signHideFlag); 789 791 m_cTEncTop.setUseRateCtrl ( m_RCEnableRateControl ); … … 843 845 844 846 #if Q0074_COLOUR_REMAPPING_SEI 845 #if SVC_EXTENSION 846 m_cTEncTop.xSetCRISEIFileRoot ( const_cast<Char*>(m_apcLayerCfg[layer]->m_colourRemapSEIFileRoot.c_str()) ); 847 #else 848 m_cTEncTop.xSetCRISEIFileRoot ( const_cast<Char*>(m_colourRemapSEIFileRoot.c_str()) ); 849 #endif 847 m_cTEncTop.xSetCRISEIFileRoot ( m_colourRemapSEIFileName ); 850 848 #endif 851 849 #if LAYERS_NOT_PRESENT_SEI … … 877 875 //2 878 876 // Video I/O 879 m_apcTVideoIOYuvInputFile[layer]->open( (Char *)m_apcLayerCfg[layer]->getInputFile().c_str(), false, m_apcLayerCfg[layer]->m_inputBitDepth, m_apcLayerCfg[layer]->m_MSBExtendedBitDepth, m_apcLayerCfg[layer]->m_internalBitDepth ); // read mode877 m_apcTVideoIOYuvInputFile[layer]->open( m_apcLayerCfg[layer]->getInputFileName(), false, m_apcLayerCfg[layer]->m_inputBitDepth, m_apcLayerCfg[layer]->m_MSBExtendedBitDepth, m_apcLayerCfg[layer]->m_internalBitDepth ); // read mode 880 878 m_apcTVideoIOYuvInputFile[layer]->skipFrames(m_FrameSkip, m_apcLayerCfg[layer]->m_iSourceWidth - m_apcLayerCfg[layer]->m_aiPad[0], m_apcLayerCfg[layer]->m_iSourceHeight - m_apcLayerCfg[layer]->m_aiPad[1], m_apcLayerCfg[layer]->m_InputChromaFormatIDC); 881 879 882 if( !m_apcLayerCfg[layer]->getReconFile ().empty() )883 { 884 m_apcTVideoIOYuvReconFile[layer]->open( (Char *)m_apcLayerCfg[layer]->getReconFile().c_str(), true, m_apcLayerCfg[layer]->m_outputBitDepth, m_apcLayerCfg[layer]->m_MSBExtendedBitDepth, m_apcLayerCfg[layer]->m_internalBitDepth ); // write mode880 if( !m_apcLayerCfg[layer]->getReconFileName().empty() ) 881 { 882 m_apcTVideoIOYuvReconFile[layer]->open( m_apcLayerCfg[layer]->getReconFileName(), true, m_apcLayerCfg[layer]->m_outputBitDepth, m_apcLayerCfg[layer]->m_MSBExtendedBitDepth, m_apcLayerCfg[layer]->m_internalBitDepth ); // write mode 885 883 } 886 884 … … 890 888 #else //SVC_EXTENSION 891 889 // Video I/O 892 m_cTVideoIOYuvInputFile.open( m_ pchInputFile, false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode890 m_cTVideoIOYuvInputFile.open( m_inputFileName, false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth ); // read mode 893 891 m_cTVideoIOYuvInputFile.skipFrames(m_FrameSkip, m_iSourceWidth - m_aiPad[0], m_iSourceHeight - m_aiPad[1], m_InputChromaFormatIDC); 894 892 895 if ( m_pchReconFile)896 { 897 m_cTVideoIOYuvReconFile.open(m_ pchReconFile, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode893 if (!m_reconFileName.empty()) 894 { 895 m_cTVideoIOYuvReconFile.open(m_reconFileName, true, m_outputBitDepth, m_outputBitDepth, m_internalBitDepth); // write mode 898 896 } 899 897 … … 1439 1437 Void TAppEncTop::encode() 1440 1438 { 1441 fstream bitstreamFile(m_ pchBitstreamFile, fstream::binary | fstream::out);1439 fstream bitstreamFile(m_bitstreamFileName.c_str(), fstream::binary | fstream::out); 1442 1440 if (!bitstreamFile) 1443 1441 { 1444 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_ pchBitstreamFile);1442 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_bitstreamFileName.c_str()); 1445 1443 exit(EXIT_FAILURE); 1446 1444 } … … 1801 1799 Void TAppEncTop::encode() 1802 1800 { 1803 fstream bitstreamFile(m_ pchBitstreamFile, fstream::binary | fstream::out);1801 fstream bitstreamFile(m_bitstreamFileName.c_str(), fstream::binary | fstream::out); 1804 1802 if (!bitstreamFile) 1805 1803 { 1806 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_ pchBitstreamFile);1804 fprintf(stderr, "\nfailed to open bitstream file `%s' for writing\n", m_bitstreamFileName.c_str()); 1807 1805 exit(EXIT_FAILURE); 1808 1806 } … … 1973 1971 TComPicYuv* pcPicYuvRecBottom = *(iterPicYuvRec++); 1974 1972 1975 if( !m_apcLayerCfg[layer]->getReconFile ().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() )1973 if( !m_apcLayerCfg[layer]->getReconFileName().empty() && pcPicYuvRecTop->isReconstructed() && pcPicYuvRecBottom->isReconstructed() ) 1976 1974 { 1977 1975 m_apcTVideoIOYuvReconFile[layer]->write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_apcLayerCfg[layer]->getConfWinLeft() * xScal, m_apcLayerCfg[layer]->getConfWinRight() * xScal, … … 1994 1992 { 1995 1993 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 1996 if( !m_apcLayerCfg[layer]->getReconFile ().empty() && pcPicYuvRec->isReconstructed() )1994 if( !m_apcLayerCfg[layer]->getReconFileName().empty() && pcPicYuvRec->isReconstructed() ) 1997 1995 { 1998 1996 m_apcTVideoIOYuvReconFile[layer]->write( pcPicYuvRec, ipCSC, m_apcLayerCfg[layer]->getConfWinLeft() * xScal, m_apcLayerCfg[layer]->getConfWinRight() * xScal, … … 2101 2099 TComPicYuv* pcPicYuvRecBottom = *(iterPicYuvRec++); 2102 2100 2103 if ( m_pchReconFile)2101 if (!m_reconFileName.empty()) 2104 2102 { 2105 2103 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst ); … … 2130 2128 { 2131 2129 TComPicYuv* pcPicYuvRec = *(iterPicYuvRec++); 2132 if ( m_pchReconFile)2130 if (!m_reconFileName.empty()) 2133 2131 { 2134 2132 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, -
branches/SHM-dev/source/Lib/TLibCommon/Debug.cpp
r1398 r1442 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 … … 421 421 422 422 423 Void printBlockToStream( std::ostream &ss, const Char *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross, const UInt numSubBlocksUp, const UInt defWidth )423 Void printBlockToStream( std::ostream &ss, const TChar *pLinePrefix, TComYuv &src, const UInt numSubBlocksAcross, const UInt numSubBlocksUp, const UInt defWidth ) 424 424 { 425 425 const UInt numValidComp=src.getNumberValidComponents(); -
branches/SHM-dev/source/Lib/TLibCommon/Debug.h
r1335 r1442 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 … … 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 … … 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++) … … 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 // ---------------------------------------------------------------------------------------------- // -
branches/SHM-dev/source/Lib/TLibCommon/SEI.cpp
r1434 r1442 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) -
branches/SHM-dev/source/Lib/TLibCommon/SEI.h
r1434 r1442 124 124 virtual ~SEI() {} 125 125 126 static const Char *getSEIMessageString(SEI::PayloadType payloadType);126 static const TChar *getSEIMessageString(SEI::PayloadType payloadType); 127 127 128 128 virtual PayloadType payloadType() const = 0; -
branches/SHM-dev/source/Lib/TLibCommon/TComBitStream.cpp
r1347 r1442 91 91 } 92 92 93 Char* TComOutputBitstream::getByteStream() const94 { 95 return ( Char*) &m_fifo.front();93 UChar* TComOutputBitstream::getByteStream() const 94 { 95 return (UChar*) &m_fifo.front(); 96 96 } 97 97 -
branches/SHM-dev/source/Lib/TLibCommon/TComBitStream.h
r1352 r1442 115 115 * bytestream are stored in ascending addresses. 116 116 */ 117 Char* getByteStream() const;117 UChar* getByteStream() const; 118 118 119 119 /** -
branches/SHM-dev/source/Lib/TLibCommon/TComCodingStatistics.h
r1335 r1442 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. … … 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 } … … 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 } … … 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) … … 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", … … 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", … … 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); … … 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++) … … 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) … … 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); -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1421 r1442 127 127 if ( !bDecSubCu ) 128 128 { 129 m_phQP = ( Char* )xMalloc(Char,uiNumPartition);129 m_phQP = (SChar* )xMalloc(SChar, uiNumPartition); 130 130 m_puhDepth = (UChar* )xMalloc(UChar, uiNumPartition); 131 131 m_puhWidth = (UChar* )xMalloc(UChar, uiNumPartition); … … 134 134 m_ChromaQpAdj = new UChar[ uiNumPartition ]; 135 135 m_skipFlag = new Bool[ uiNumPartition ]; 136 m_pePartSize = new Char[ uiNumPartition ];136 m_pePartSize = new SChar[ uiNumPartition ]; 137 137 memset( m_pePartSize, NUMBER_OF_PART_SIZES,uiNumPartition * sizeof( *m_pePartSize ) ); 138 m_pePredMode = new Char[ uiNumPartition ];138 m_pePredMode = new SChar[ uiNumPartition ]; 139 139 m_CUTransquantBypass = new Bool[ uiNumPartition ]; 140 140 … … 153 153 { 154 154 const RefPicList rpl=RefPicList(i); 155 m_apiMVPIdx[rpl] = new Char[ uiNumPartition ];156 m_apiMVPNum[rpl] = new Char[ uiNumPartition ];157 memset( m_apiMVPIdx[rpl], -1,uiNumPartition * sizeof( Char ) );155 m_apiMVPIdx[rpl] = new SChar[ uiNumPartition ]; 156 m_apiMVPNum[rpl] = new SChar[ uiNumPartition ]; 157 memset( m_apiMVPIdx[rpl], -1,uiNumPartition * sizeof( SChar ) ); 158 158 } 159 159 … … 164 164 const UInt totalSize = (uiWidth * uiHeight) >> chromaShift; 165 165 166 m_crossComponentPredictionAlpha[compID] = ( Char* )xMalloc(Char,uiNumPartition);166 m_crossComponentPredictionAlpha[compID] = (SChar* )xMalloc(SChar, uiNumPartition); 167 167 m_puhTransformSkip[compID] = (UChar* )xMalloc(UChar, uiNumPartition); 168 168 m_explicitRdpcmMode[compID] = (UChar* )xMalloc(UChar, uiNumPartition); … … 660 660 Int iSizeInUchar = sizeof( UChar ) * m_uiNumPartition; 661 661 Int iSizeInBool = sizeof( Bool ) * m_uiNumPartition; 662 Int sizeInChar = sizeof( Char ) * m_uiNumPartition;662 Int sizeInChar = sizeof( SChar ) * m_uiNumPartition; 663 663 664 664 memset( m_phQP, qp, sizeInChar ); … … 887 887 Int iSizeInBool = sizeof( Bool ) * uiNumPartition; 888 888 889 Int sizeInChar = sizeof( Char ) * uiNumPartition;889 Int sizeInChar = sizeof( SChar ) * uiNumPartition; 890 890 memcpy( m_skipFlag + uiOffset, pcCU->getSkipFlag(), sizeof( *m_skipFlag ) * uiNumPartition ); 891 891 memcpy( m_phQP + uiOffset, pcCU->getQP(), sizeInChar ); … … 969 969 Int iSizeInUchar = sizeof( UChar ) * m_uiNumPartition; 970 970 Int iSizeInBool = sizeof( Bool ) * m_uiNumPartition; 971 Int sizeInChar = sizeof( Char ) * m_uiNumPartition;971 Int sizeInChar = sizeof( SChar ) * m_uiNumPartition; 972 972 973 973 memcpy( pCtu->getSkipFlag() + m_absZIdxInCtu, m_skipFlag, sizeof( *m_skipFlag ) * m_uiNumPartition ); … … 1158 1158 const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth(); 1159 1159 UInt uiAbsZorderCUIdxLB = g_auiZscanToRaster[ m_absZIdxInCtu ] + ((m_puhHeight[0] / m_pcPic->getMinCUHeight()) - 1)*numPartInCtuWidth; 1160 1160 1161 1161 #if SVC_EXTENSION 1162 1162 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxLB] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicHeightInLumaSamples()) … … 1206 1206 UInt uiAbsZorderCUIdx = g_auiZscanToRaster[ m_absZIdxInCtu ] + (m_puhWidth[0] / m_pcPic->getMinCUWidth()) - 1; 1207 1207 const UInt numPartInCtuWidth = m_pcPic->getNumPartInCtuWidth(); 1208 1208 1209 1209 #if SVC_EXTENSION 1210 1210 if( ( m_pcPic->getCtu(m_ctuRsAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxRT] + (m_pcPic->getPicSym()->getMinCUHeight() * uiPartUnitOffset)) >= m_pcSlice->getPicWidthInLumaSamples() ) … … 1318 1318 /** Get reference QP from left QpMinCu or latest coded QP 1319 1319 *\param uiCurrAbsIdxInCtu 1320 *\returns Char reference QP value1320 *\returns SChar reference QP value 1321 1321 */ 1322 Char TComDataCU::getRefQP( UInt uiCurrAbsIdxInCtu )1322 SChar TComDataCU::getRefQP( UInt uiCurrAbsIdxInCtu ) 1323 1323 { 1324 1324 UInt lPartIdx = MAX_UINT; … … 1341 1341 } 1342 1342 1343 Char TComDataCU::getLastCodedQP( UInt uiAbsPartIdx )1343 SChar TComDataCU::getLastCodedQP( UInt uiAbsPartIdx ) 1344 1344 { 1345 1345 UInt uiQUPartIdxMask = ~((1<<((getSlice()->getSPS()->getMaxTotalCUDepth() - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))-1); … … 1836 1836 Void TComDataCU::setMVPIdxSubParts( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1837 1837 { 1838 setSubPart< Char>( iMVPIdx, m_apiMVPIdx[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx );1838 setSubPart<SChar>( iMVPIdx, m_apiMVPIdx[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx ); 1839 1839 } 1840 1840 1841 1841 Void TComDataCU::setMVPNumSubParts( Int iMVPNum, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 1842 1842 { 1843 setSubPart< Char>( iMVPNum, m_apiMVPNum[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx );1843 setSubPart<SChar>( iMVPNum, m_apiMVPNum[eRefPicList], uiAbsPartIdx, uiDepth, uiPartIdx ); 1844 1844 } 1845 1845 … … 1874 1874 } 1875 1875 1876 Void TComDataCU::setCrossComponentPredictionAlphaPartRange( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes )1877 { 1878 memset((m_crossComponentPredictionAlpha[compID] + uiAbsPartIdx), alphaValue, (sizeof( Char) * uiCoveredPartIdxes));1876 Void TComDataCU::setCrossComponentPredictionAlphaPartRange( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ) 1877 { 1878 memset((m_crossComponentPredictionAlpha[compID] + uiAbsPartIdx), alphaValue, (sizeof(SChar) * uiCoveredPartIdxes)); 1879 1879 } 1880 1880 -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1421 r1442 86 86 UChar* m_puhDepth; ///< array of depths 87 87 Int m_unitSize; ///< size of a "minimum partition" 88 88 89 89 #if SVC_EXTENSION 90 90 UInt m_layerId; ///< layer id … … 99 99 100 100 Bool* m_skipFlag; ///< array of skip flags 101 Char*m_pePartSize; ///< array of partition sizes102 Char*m_pePredMode; ///< array of prediction modes103 Char*m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values101 SChar* m_pePartSize; ///< array of partition sizes 102 SChar* m_pePredMode; ///< array of prediction modes 103 SChar* m_crossComponentPredictionAlpha[MAX_NUM_COMPONENT]; ///< array of cross-component prediction alpha values 104 104 Bool* m_CUTransquantBypass; ///< array of cu_transquant_bypass flags 105 Char*m_phQP; ///< array of QP values105 SChar* m_phQP; ///< array of QP values 106 106 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 107 107 UInt m_codedChromaQpAdj; … … 143 143 UChar* m_puhIntraDir[MAX_NUM_CHANNEL_TYPE]; // 0-> Luma, 1-> Chroma 144 144 UChar* m_puhInterDir; ///< array of inter directions 145 Char*m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates146 Char*m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors145 SChar* m_apiMVPIdx[NUM_REF_PIC_LIST_01]; ///< array of motion vector predictor candidates 146 SChar* m_apiMVPNum[NUM_REF_PIC_LIST_01]; ///< array of number of possible motion vectors predictors 147 147 Bool* m_pbIPCMFlag; ///< array of intra_pcm flags 148 148 … … 156 156 UInt m_uiTotalBits; ///< sum of partition bits 157 157 UInt m_uiTotalBins; ///< sum of partition bins 158 Charm_codedQP;158 SChar m_codedQP; 159 159 UChar* m_explicitRdpcmMode[MAX_NUM_COMPONENT]; ///< Stores the explicit RDPCM mode for all TUs belonging to this CU 160 160 … … 223 223 // ------------------------------------------------------------------------------------------------------------------- 224 224 225 Char*getPartitionSize () { return m_pePartSize; }225 SChar* getPartitionSize () { return m_pePartSize; } 226 226 PartSize getPartitionSize ( UInt uiIdx ) { return static_cast<PartSize>( m_pePartSize[uiIdx] ); } 227 227 Void setPartitionSize ( UInt uiIdx, PartSize uh){ m_pePartSize[uiIdx] = uh; } … … 234 234 Void setSkipFlagSubParts ( Bool skip, UInt absPartIdx, UInt depth ); 235 235 236 Char*getPredictionMode () { return m_pePredMode; }236 SChar* getPredictionMode () { return m_pePredMode; } 237 237 PredMode getPredictionMode ( UInt uiIdx ) { return static_cast<PredMode>( m_pePredMode[uiIdx] ); } 238 238 Void setPredictionMode ( UInt uiIdx, PredMode uh){ m_pePredMode[uiIdx] = uh; } 239 239 Void setPredModeSubParts ( PredMode eMode, UInt uiAbsPartIdx, UInt uiDepth ); 240 240 241 Char*getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; }242 ChargetCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; }241 SChar* getCrossComponentPredictionAlpha( ComponentID compID ) { return m_crossComponentPredictionAlpha[compID]; } 242 SChar getCrossComponentPredictionAlpha( UInt uiIdx, ComponentID compID ) { return m_crossComponentPredictionAlpha[compID][uiIdx]; } 243 243 244 244 Bool* getCUTransquantBypass () { return m_CUTransquantBypass; } … … 255 255 Void setSizeSubParts ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, UInt uiDepth ); 256 256 257 Char*getQP () { return m_phQP; }258 ChargetQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; }259 Void setQP ( UInt uiIdx, Char value){ m_phQP[uiIdx] = value; }257 SChar* getQP () { return m_phQP; } 258 SChar getQP ( UInt uiIdx ) const { return m_phQP[uiIdx]; } 259 Void setQP ( UInt uiIdx, SChar value){ m_phQP[uiIdx] = value; } 260 260 Void setQPSubParts ( Int qp, UInt uiAbsPartIdx, UInt uiDepth ); 261 261 Int getLastValidPartIdx ( Int iAbsPartIdx ); 262 ChargetLastCodedQP ( UInt uiAbsPartIdx );262 SChar getLastCodedQP ( UInt uiAbsPartIdx ); 263 263 Void setQPSubCUs ( Int qp, UInt absPartIdx, UInt depth, Bool &foundNonZeroCbf ); 264 Void setCodedQP ( Char qp ){ m_codedQP = qp; }265 ChargetCodedQP () { return m_codedQP; }264 Void setCodedQP ( SChar qp ) { m_codedQP = qp; } 265 SChar getCodedQP () { return m_codedQP; } 266 266 267 267 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 … … 269 269 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 270 270 Void setChromaQpAdjSubParts( UChar val, Int absPartIdx, Int depth ); 271 Void setCodedChromaQpAdj ( Char qp ){ m_codedChromaQpAdj = qp; }272 ChargetCodedChromaQpAdj () { return m_codedChromaQpAdj; }271 Void setCodedChromaQpAdj ( SChar qp ) { m_codedChromaQpAdj = qp; } 272 SChar getCodedChromaQpAdj () { return m_codedChromaQpAdj; } 273 273 274 274 Bool isLosslessCoded ( UInt absPartIdx ); … … 289 289 Bool isRDPCMEnabled ( UInt uiAbsPartIdx ) { return getSlice()->getSPS()->getSpsRangeExtension().getRdpcmEnabledFlag(isIntra(uiAbsPartIdx) ? RDPCM_SIGNAL_IMPLICIT : RDPCM_SIGNAL_EXPLICIT); } 290 290 291 Void setCrossComponentPredictionAlphaPartRange ( Char alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes );291 Void setCrossComponentPredictionAlphaPartRange ( SChar alphaValue, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 292 292 Void setTransformSkipPartRange ( UInt useTransformSkip, ComponentID compID, UInt uiAbsPartIdx, UInt uiCoveredPartIdxes ); 293 293 … … 375 375 Void setMVPIdx ( RefPicList eRefPicList, UInt uiIdx, Int iMVPIdx) { m_apiMVPIdx[eRefPicList][uiIdx] = iMVPIdx; } 376 376 Int getMVPIdx ( RefPicList eRefPicList, UInt uiIdx) { return m_apiMVPIdx[eRefPicList][uiIdx]; } 377 Char*getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; }377 SChar* getMVPIdx ( RefPicList eRefPicList ) { return m_apiMVPIdx[eRefPicList]; } 378 378 379 379 Void setMVPNum ( RefPicList eRefPicList, UInt uiIdx, Int iMVPNum ) { m_apiMVPNum[eRefPicList][uiIdx] = iMVPNum; } 380 380 Int getMVPNum ( RefPicList eRefPicList, UInt uiIdx ) { return m_apiMVPNum[eRefPicList][uiIdx]; } 381 Char*getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; }381 SChar* getMVPNum ( RefPicList eRefPicList ) { return m_apiMVPNum[eRefPicList]; } 382 382 383 383 Void setMVPIdxSubParts ( Int iMVPIdx, RefPicList eRefPicList, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ); … … 420 420 TComDataCU* getQpMinCuLeft ( UInt& uiLPartUnitIdx , UInt uiCurrAbsIdxInCtu ); 421 421 TComDataCU* getQpMinCuAbove ( UInt& uiAPartUnitIdx , UInt uiCurrAbsIdxInCtu ); 422 ChargetRefQP ( UInt uiCurrAbsIdxInCtu );422 SChar getRefQP ( UInt uiCurrAbsIdxInCtu ); 423 423 424 424 /// 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) … … 475 475 476 476 UInt getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const ; 477 477 478 478 #if SVC_EXTENSION 479 479 Void setLayerId (UInt layerId) { m_layerId = layerId; } -
branches/SHM-dev/source/Lib/TLibCommon/TComMotionInfo.cpp
r1259 r1442 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; … … 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 … … 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; -
branches/SHM-dev/source/Lib/TLibCommon/TComMotionInfo.h
r1259 r1442 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; … … 153 153 } 154 154 155 Void compress( Char* pePredMode, Int scale);155 Void compress(SChar* pePredMode, Int scale); 156 156 157 157 #if SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.cpp
r1428 r1442 363 363 } 364 364 } 365 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof( Char)*numPartitions );365 memset( pcCUDes->getPartitionSize(), SIZE_2Nx2N, sizeof(SChar)*numPartitions ); 366 366 } 367 367 } -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.cpp
r1427 r1442 296 296 297 297 // NOTE: This function is never called, but may be useful for developers. 298 Void TComPicYuv::dump (const Char* pFileName, const BitDepths &bitDepths, Bool bAdd) const 299 { 300 FILE* pFile; 301 if (!bAdd) 302 { 303 pFile = fopen (pFileName, "wb"); 304 } 305 else 306 { 307 pFile = fopen (pFileName, "ab"); 308 } 309 298 Void TComPicYuv::dump (const std::string &fileName, const BitDepths &bitDepths, Bool bAdd) const 299 { 300 FILE* pFile = fopen (fileName.c_str(), bAdd?"ab":"wb"); 310 301 311 302 for(Int comp = 0; comp < getNumberValidComponents(); comp++) … … 333 324 } 334 325 335 Void TComPicYuv::dump( Char* pFileName, Bool bAdd, Int bitDepth ) 336 { 337 FILE* pFile; 338 if (!bAdd) 339 { 340 pFile = fopen (pFileName, "wb"); 341 } 342 else 343 { 344 pFile = fopen (pFileName, "ab"); 345 } 326 Void TComPicYuv::dump( const std::string &fileName, const Bool bAdd, const Int bitDepth ) 327 { 328 FILE* pFile = fopen (fileName.c_str(), bAdd?"ab":"wb"); 346 329 347 330 if( bitDepth == 8 ) 348 331 { 349 dump( pFileName, bitDepth, bAdd );332 dump( fileName, bitDepth, bAdd ); 350 333 return; 351 334 } … … 378 361 379 362 #if AUXILIARY_PICTURES 380 Void TComPicYuv::convertToMonochrome( Int bitDepthChroma)363 Void TComPicYuv::convertToMonochrome(const Int bitDepthChroma) 381 364 { 382 365 Pel grayVal = (1 << (bitDepthChroma - 1)); -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuv.h
r1428 r1442 180 180 181 181 // Dump picture 182 Void dump (const Char* pFileName, const BitDepths &bitDepths, Bool bAdd = false) const ;182 Void dump (const std::string &fileName, const BitDepths &bitDepths, Bool bAdd = false) const ; 183 183 184 184 // Set border extension flag … … 192 192 Bool isReconstructed() { return m_isReconstructed; } 193 193 #if AUXILIARY_PICTURES 194 Void convertToMonochrome( Int bitDepthChroma);195 #endif 196 #endif 197 198 Void dump( Char* pFileName, Bool bAdd,Int bitDepth );194 Void convertToMonochrome(const Int bitDepthChroma); 195 #endif 196 #endif 197 198 Void dump( const std::string &fileName, const Bool bAdd, const Int bitDepth ); 199 199 200 200 };// END CLASS DEFINITION TComPicYuv -
branches/SHM-dev/source/Lib/TLibCommon/TComPicYuvMD5.cpp
r1287 r1442 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 -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp
r1419 r1442 51 51 //! \{ 52 52 53 const Char* nalUnitTypeToString(NalUnitType type)53 const TChar* nalUnitTypeToString(NalUnitType type) 54 54 { 55 55 #if SVC_EXTENSION … … 602 602 // ==================================================================================================================== 603 603 604 Char g_aucConvertToBit [ MAX_CU_SIZE+1 ];604 SChar g_aucConvertToBit [ MAX_CU_SIZE+1 ]; 605 605 606 606 #if ENC_DEC_TRACE … … 630 630 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}; 631 631 632 const Char *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =632 const TChar *MatrixType[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = 633 633 { 634 634 { … … 666 666 }; 667 667 668 const Char *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] =668 const TChar *MatrixType_DC[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM] = 669 669 { 670 670 { -
branches/SHM-dev/source/Lib/TLibCommon/TComRom.h
r1419 r1442 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 … … 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]; -
branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r1289 r1442 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) … … 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 … … 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; … … 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; … … 370 370 { 371 371 offset += 2; 372 Char *signUpLine = m_signLineBuf1;372 SChar *signUpLine = m_signLineBuf1; 373 373 374 374 startY = isAboveAvail ? 0 : 1; … … 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 … … 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; … … 408 408 { 409 409 offset += 2; 410 Char *signUpLine, *signDownLine, *signTmpLine;410 SChar *signUpLine, *signDownLine, *signTmpLine; 411 411 412 412 signUpLine = m_signLineBuf1; … … 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 … … 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]); … … 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; … … 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; … … 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 … … 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; -
branches/SHM-dev/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
r1287 r1442 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: -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1439 r1442 2444 2444 } 2445 2445 2446 Bool TComScalingList::xParseScalingList( Char* pchFile)2446 Bool TComScalingList::xParseScalingList(const std::string &fileName) 2447 2447 { 2448 2448 static const Int LINE_SIZE=1024; 2449 2449 FILE *fp = NULL; 2450 Char line[LINE_SIZE];2451 2452 if ( pchFile == NULL)2450 TChar line[LINE_SIZE]; 2451 2452 if (fileName.empty()) 2453 2453 { 2454 2454 fprintf(stderr, "Error: no scaling list file specified. Help on scaling lists being output\n"); … … 2459 2459 return true; 2460 2460 } 2461 else if ((fp = fopen( pchFile,"r")) == (FILE*)NULL)2462 { 2463 fprintf(stderr, "Error: cannot open scaling list file %s for reading\n", pchFile);2461 else if ((fp = fopen(fileName.c_str(),"r")) == (FILE*)NULL) 2462 { 2463 fprintf(stderr, "Error: cannot open scaling list file %s for reading\n", fileName.c_str()); 2464 2464 return true; 2465 2465 } … … 2489 2489 while ((!feof(fp)) && (!bFound)) 2490 2490 { 2491 Char *ret = fgets(line, LINE_SIZE, fp);2492 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]);2491 TChar *ret = fgets(line, LINE_SIZE, fp); 2492 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType[sizeIdc][listIdc]); 2493 2493 // This could be a match against the DC string as well, so verify it isn't 2494 2494 if (findNamePosition!= NULL && (MatrixType_DC[sizeIdc][listIdc]==NULL || strstr(line, MatrixType_DC[sizeIdc][listIdc])==NULL)) … … 2499 2499 if (!bFound) 2500 2500 { 2501 fprintf(stderr, "Error: cannot find Matrix %s from scaling list file %s\n", MatrixType[sizeIdc][listIdc], pchFile);2501 fprintf(stderr, "Error: cannot find Matrix %s from scaling list file %s\n", MatrixType[sizeIdc][listIdc], fileName.c_str()); 2502 2502 return true; 2503 2503 } … … 2508 2508 if (fscanf(fp, "%d,", &data)!=1) 2509 2509 { 2510 fprintf(stderr, "Error: cannot read value #%d for Matrix %s from scaling list file %s at file position %ld\n", i, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));2510 fprintf(stderr, "Error: cannot read value #%d for Matrix %s from scaling list file %s at file position %ld\n", i, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 2511 2511 return true; 2512 2512 } 2513 2513 if (data<0 || data>255) 2514 2514 { 2515 fprintf(stderr, "Error: QMatrix entry #%d of value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", i, data, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));2515 fprintf(stderr, "Error: QMatrix entry #%d of value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", i, data, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 2516 2516 return true; 2517 2517 } … … 2529 2529 while ((!feof(fp)) && (!bFound)) 2530 2530 { 2531 Char *ret = fgets(line, LINE_SIZE, fp);2532 Char *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]);2531 TChar *ret = fgets(line, LINE_SIZE, fp); 2532 TChar *findNamePosition= ret==NULL ? NULL : strstr(line, MatrixType_DC[sizeIdc][listIdc]); 2533 2533 if (findNamePosition!= NULL) 2534 2534 { … … 2539 2539 if (!bFound) 2540 2540 { 2541 fprintf(stderr, "Error: cannot find DC Matrix %s from scaling list file %s\n", MatrixType_DC[sizeIdc][listIdc], pchFile);2541 fprintf(stderr, "Error: cannot find DC Matrix %s from scaling list file %s\n", MatrixType_DC[sizeIdc][listIdc], fileName.c_str()); 2542 2542 return true; 2543 2543 } … … 2546 2546 if (fscanf(fp, "%d,", &data)!=1) 2547 2547 { 2548 fprintf(stderr, "Error: cannot read DC %s from scaling list file %s at file position %ld\n", MatrixType_DC[sizeIdc][listIdc], pchFile, ftell(fp));2548 fprintf(stderr, "Error: cannot read DC %s from scaling list file %s at file position %ld\n", MatrixType_DC[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 2549 2549 return true; 2550 2550 } 2551 2551 if (data<0 || data>255) 2552 2552 { 2553 fprintf(stderr, "Error: DC value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", data, MatrixType[sizeIdc][listIdc], pchFile, ftell(fp));2553 fprintf(stderr, "Error: DC value %d for Matrix %s from scaling list file %s at file position %ld is out of range (0 to 255)\n", data, MatrixType[sizeIdc][listIdc], fileName.c_str(), ftell(fp)); 2554 2554 return true; 2555 2555 } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1439 r1442 176 176 Void checkDcOfMatrix(); 177 177 Void processRefMatrix(UInt sizeId, UInt listId , UInt refListId ); 178 Bool xParseScalingList( Char* pchFile);178 Bool xParseScalingList(const std::string &fileName); 179 179 Void setDefaultScalingList(); 180 180 Bool checkDefaultScalingList(); … … 789 789 UInt getNumHrdParameters() const { return m_numHrdParameters; } 790 790 Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } 791 791 792 792 #if !SVC_EXTENSION 793 793 UInt getMaxNuhReservedZeroLayerId() const { return m_maxNuhReservedZeroLayerId; } … … 1140 1140 #endif //SVC_EXTENSION 1141 1141 }; 1142 1142 1143 1143 1144 class TComVUI -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1433 r1442 259 259 typedef bool Bool; 260 260 261 #ifdef __arm__ 262 typedef signed char Char; 263 #else 264 typedef char Char; 265 #endif 266 typedef unsigned char UChar; 261 typedef char TChar; // Used for text/characters 262 typedef signed char SChar; // Signed 8-bit values 263 typedef unsigned char UChar; // Unsigned 8-bit values 267 264 typedef short Short; 268 265 typedef unsigned short UShort; -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.cpp
r1434 r1442 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); … … 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); … … 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); … … 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); … … 522 522 sei.method = static_cast<SEIDecodedPictureHash::Method>(val); bytesRead++; 523 523 524 const Char *traceString="\0";524 const TChar *traceString="\0"; 525 525 switch (sei.method) 526 526 { -
branches/SHM-dev/source/Lib/TLibDecoder/SEIread.h
r1434 r1442 109 109 Void xParseSEIMasteringDisplayColourVolume (SEIMasteringDisplayColourVolume& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream); 110 110 111 Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const Char *pSymbolName);112 Void sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName);113 Void sei_read_svlc(std::ostream *pOS, Int& ruiCode, const Char *pSymbolName);114 Void sei_read_flag(std::ostream *pOS, UInt& ruiCode, const Char *pSymbolName);111 Void sei_read_code(std::ostream *pOS, UInt uiLength, UInt& ruiCode, const TChar *pSymbolName); 112 Void sei_read_uvlc(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName); 113 Void sei_read_svlc(std::ostream *pOS, Int& ruiCode, const TChar *pSymbolName); 114 Void sei_read_flag(std::ostream *pOS, UInt& ruiCode, const TChar *pSymbolName); 115 115 116 116 #if Q0074_COLOUR_REMAPPING_SEI -
branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.cpp
r1351 r1442 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 … … 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 … … 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 … … 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 … … 135 135 // ==================================================================================================================== 136 136 #if RExt__DECODER_DEBUG_BIT_STATISTICS 137 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode, const Char *pSymbolName)137 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode, const TChar *pSymbolName) 138 138 #else 139 139 Void SyntaxElementParser::xReadCode (UInt uiLength, UInt& ruiCode) … … 148 148 149 149 #if RExt__DECODER_DEBUG_BIT_STATISTICS 150 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal, const Char *pSymbolName)150 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal, const TChar *pSymbolName) 151 151 #else 152 152 Void SyntaxElementParser::xReadUvlc( UInt& ruiVal) … … 186 186 187 187 #if RExt__DECODER_DEBUG_BIT_STATISTICS 188 Void SyntaxElementParser::xReadSvlc( Int& riVal, const Char *pSymbolName)188 Void SyntaxElementParser::xReadSvlc( Int& riVal, const TChar *pSymbolName) 189 189 #else 190 190 Void SyntaxElementParser::xReadSvlc( Int& riVal) … … 224 224 225 225 #if RExt__DECODER_DEBUG_BIT_STATISTICS 226 Void SyntaxElementParser::xReadFlag (UInt& ruiCode, const Char *pSymbolName)226 Void SyntaxElementParser::xReadFlag (UInt& ruiCode, const TChar *pSymbolName) 227 227 #else 228 228 Void SyntaxElementParser::xReadFlag (UInt& ruiCode) … … 281 281 #if Q0096_OVERLAY_SEI 282 282 #if RExt__DECODER_DEBUG_BIT_STATISTICS 283 Void SyntaxElementParser::xReadString (UInt bufSize, UChar *pVal, UInt& rLength, const Char *pSymbolName)283 Void SyntaxElementParser::xReadString (UInt bufSize, UChar *pVal, UInt& rLength, const TChar *pSymbolName) 284 284 #else 285 285 Void SyntaxElementParser::xReadString (UInt bufSize, UChar *pVal, UInt& rLength) -
branches/SHM-dev/source/Lib/TLibDecoder/SyntaxElementParser.h
r1351 r1442 98 98 99 99 #if RExt__DECODER_DEBUG_BIT_STATISTICS 100 Void xReadCode ( UInt length, UInt& val, const Char *pSymbolName );101 Void xReadUvlc ( UInt& val, const Char *pSymbolName );102 Void xReadSvlc ( Int& val, const Char *pSymbolName );103 Void xReadFlag ( UInt& val, const Char *pSymbolName );100 Void xReadCode ( UInt length, UInt& val, const TChar *pSymbolName ); 101 Void xReadUvlc ( UInt& val, const TChar *pSymbolName ); 102 Void xReadSvlc ( Int& val, const TChar *pSymbolName ); 103 Void xReadFlag ( UInt& val, const TChar *pSymbolName ); 104 104 #if Q0096_OVERLAY_SEI 105 Void xReadString (UInt bufSize, UChar *pValue, UInt& rLength, const Char *pSymbolName);105 Void xReadString (UInt bufSize, UChar *pValue, UInt& rLength, const TChar *pSymbolName); 106 106 #endif 107 107 #else … … 115 115 #endif 116 116 #if ENC_DEC_TRACE 117 Void xReadCodeTr (UInt length, UInt& rValue, const Char *pSymbolName);118 Void xReadUvlcTr ( UInt& rValue, const Char *pSymbolName);119 Void xReadSvlcTr ( Int& rValue, const Char *pSymbolName);120 Void xReadFlagTr ( UInt& rValue, const Char *pSymbolName);117 Void xReadCodeTr (UInt length, UInt& rValue, const TChar *pSymbolName); 118 Void xReadUvlcTr ( UInt& rValue, const TChar *pSymbolName); 119 Void xReadSvlcTr ( Int& rValue, const TChar *pSymbolName); 120 Void xReadFlagTr ( UInt& rValue, const TChar *pSymbolName); 121 121 #if Q0096_OVERLAY_SEI 122 122 Void xReadStringTr(UInt bufSize, UChar *pValue, UInt& rLength, const Char *pSymbolName); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp
r1335 r1442 169 169 if (g_debugCounter >= debugCabacBinTargetLine) 170 170 { 171 Char breakPointThis;171 UChar breakPointThis; 172 172 breakPointThis = 7; 173 173 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1439 r1442 343 343 { 344 344 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS 345 static const char *syntaxStrings[]={ "pps_range_extension_flag",346 "pps_multilayer_extension_flag",347 "pps_extension_6bits[0]",348 "pps_extension_6bits[1]",349 "pps_extension_6bits[2]",350 "pps_extension_6bits[3]",351 "pps_extension_6bits[4]",352 "pps_extension_6bits[5]" };345 static const TChar *syntaxStrings[]={ "pps_range_extension_flag", 346 "pps_multilayer_extension_flag", 347 "pps_extension_6bits[0]", 348 "pps_extension_6bits[1]", 349 "pps_extension_6bits[2]", 350 "pps_extension_6bits[3]", 351 "pps_extension_6bits[4]", 352 "pps_extension_6bits[5]" }; 353 353 #endif 354 354 … … 969 969 { 970 970 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS 971 static const char *syntaxStrings[]={ "sps_range_extension_flag",972 "sps_multilayer_extension_flag",973 "sps_extension_6bits[0]",974 "sps_extension_6bits[1]",975 "sps_extension_6bits[2]",976 "sps_extension_6bits[3]",977 "sps_extension_6bits[4]",978 "sps_extension_6bits[5]" };971 static const TChar *syntaxStrings[]={ "sps_range_extension_flag", 972 "sps_multilayer_extension_flag", 973 "sps_extension_6bits[0]", 974 "sps_extension_6bits[1]", 975 "sps_extension_6bits[2]", 976 "sps_extension_6bits[3]", 977 "sps_extension_6bits[4]", 978 "sps_extension_6bits[5]" }; 979 979 #endif 980 980 Bool sps_extension_flags[NUM_SPS_EXTENSION_FLAGS]; -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1431 r1442 181 181 182 182 pcPic->compressMotion(); 183 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');183 TChar c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); 184 184 if (!pcSlice->isReferenced()) 185 185 { … … 284 284 TComPictureHash recon_digest; 285 285 Int numChar=0; 286 const Char* hashType = "\0";286 const TChar* hashType = "\0"; 287 287 288 288 if (pictureHashSEI) … … 317 317 318 318 /* compare digest against received version */ 319 const Char* ok = "(unk)";319 const TChar* ok = "(unk)"; 320 320 Bool mismatch = false; 321 321 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1316 r1442 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 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1431 r1442 1386 1386 for( Int i = 0; i < uiHeight; i++ ) 1387 1387 { 1388 pFile->read(reinterpret_cast< Char*>(buf), len);1388 pFile->read(reinterpret_cast<TChar*>(buf), len); 1389 1389 1390 1390 if( !is16bit ) … … 1415 1415 for( Int i = 0; i < uiHeight; i++ ) 1416 1416 { 1417 pFile->read(reinterpret_cast< Char*>(buf), len);1417 pFile->read(reinterpret_cast<TChar*>(buf), len); 1418 1418 1419 1419 if( !is16bit ) … … 1440 1440 for( Int i = 0; i < uiHeight; i++ ) 1441 1441 { 1442 pFile->read(reinterpret_cast< Char*>(buf), len);1442 pFile->read(reinterpret_cast<TChar*>(buf), len); 1443 1443 1444 1444 if( !is16bit ) -
branches/SHM-dev/source/Lib/TLibEncoder/AnnexBwrite.h
r1259 r1442 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 { … … 71 71 * 7.4.1.2.3. 72 72 */ 73 out.write( start_code_prefix, 4);73 out.write(reinterpret_cast<const TChar*>(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 TChar*>(start_code_prefix+1), 3); 79 79 size += 3; 80 80 } -
branches/SHM-dev/source/Lib/TLibEncoder/NALwrite.cpp
r1352 r1442 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() … … 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 TChar*>(bsNALUHeader.getByteStream()), bsNALUHeader.getByteStreamLength()); 59 59 } 60 60 /** … … 120 120 outputBuffer[outputAmount++]=emulation_prevention_three_byte[0]; 121 121 } 122 out.write( (Char*)&(*outputBuffer.begin()), outputAmount);122 out.write(reinterpret_cast<const TChar*>(&(*outputBuffer.begin())), outputAmount); 123 123 } 124 124 -
branches/SHM-dev/source/Lib/TLibEncoder/SEIwrite.cpp
r1434 r1442 306 306 Void SEIWriter::xWriteSEIDecodedPictureHash(const SEIDecodedPictureHash& sei) 307 307 { 308 const Char *traceString="\0";308 const TChar *traceString="\0"; 309 309 switch (sei.method) 310 310 { -
branches/SHM-dev/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
r1352 r1442 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); … … 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); … … 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); … … 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); -
branches/SHM-dev/source/Lib/TLibEncoder/SyntaxElementWriter.h
r1352 r1442 92 92 #endif 93 93 #if ENC_DEC_TRACE 94 Void xWriteCodeTr ( UInt value, UInt length, const Char *pSymbolName);95 Void xWriteUvlcTr ( UInt value, const Char *pSymbolName);96 Void xWriteSvlcTr ( Int value, const Char *pSymbolName);97 Void xWriteFlagTr ( UInt value, const Char *pSymbolName);94 Void xWriteCodeTr ( UInt value, UInt length, const TChar *pSymbolName); 95 Void xWriteUvlcTr ( UInt value, const TChar *pSymbolName); 96 Void xWriteSvlcTr ( Int value, const TChar *pSymbolName); 97 Void xWriteFlagTr ( UInt value, const TChar *pSymbolName); 98 98 #if Q0096_OVERLAY_SEI 99 99 Void xWriteStringTr ( UChar* value, UInt length, const Char *pSymbolName); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncAnalyze.h
r1333 r1442 137 137 138 138 #if SVC_EXTENSION 139 Void printOut ( Char cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths, UInt layer = 0 )140 #else 141 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, UInt layer = 0 ) 140 #else 141 Void printOut ( TChar cDelim, const ChromaFormat chFmt, const Bool printMSEBasedSNR, const Bool printSequenceMSE, const BitDepths &bitDepths ) 142 142 #endif 143 143 { -
branches/SHM-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp
r1335 r1442 236 236 if (g_debugCounter >= debugCabacBinTargetLine) 237 237 { 238 Char breakPointThis;238 UChar breakPointThis; 239 239 breakPointThis = 7; 240 240 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncBinCoderCABACCounter.cpp
r1335 r1442 90 90 if (g_debugCounter >= debugEncoderSearchBinTargetLine) 91 91 { 92 Char breakPointThis;92 UChar breakPointThis; 93 93 breakPointThis = 7; 94 94 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1434 r1442 269 269 { 270 270 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS 271 static const char *syntaxStrings[]={ "pps_range_extension_flag",272 "pps_multilayer_extension_flag",273 "pps_extension_6bits[0]",274 "pps_extension_6bits[1]",275 "pps_extension_6bits[2]",276 "pps_extension_6bits[3]",277 "pps_extension_6bits[4]",278 "pps_extension_6bits[5]" };271 static const TChar *syntaxStrings[]={ "pps_range_extension_flag", 272 "pps_multilayer_extension_flag", 273 "pps_extension_6bits[0]", 274 "pps_extension_6bits[1]", 275 "pps_extension_6bits[2]", 276 "pps_extension_6bits[3]", 277 "pps_extension_6bits[4]", 278 "pps_extension_6bits[5]" }; 279 279 #endif 280 280 … … 748 748 { 749 749 #if ENC_DEC_TRACE || RExt__DECODER_DEBUG_BIT_STATISTICS 750 static const char *syntaxStrings[]={ "sps_range_extension_flag",751 "sps_multilayer_extension_flag",752 "sps_extension_6bits[0]",753 "sps_extension_6bits[1]",754 "sps_extension_6bits[2]",755 "sps_extension_6bits[3]",756 "sps_extension_6bits[4]",757 "sps_extension_6bits[5]" };750 static const TChar *syntaxStrings[]={ "sps_range_extension_flag", 751 "sps_multilayer_extension_flag", 752 "sps_extension_6bits[0]", 753 "sps_extension_6bits[1]", 754 "sps_extension_6bits[2]", 755 "sps_extension_6bits[3]", 756 "sps_extension_6bits[4]", 757 "sps_extension_6bits[5]" }; 758 758 #endif 759 759 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCfg.h
r1434 r1442 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]; … … 328 328 UInt m_log2ParallelMergeLevelMinus2; ///< Parallel merge estimation region 329 329 UInt m_maxNumMergeCand; ///< Maximum number of merge candidates 330 ScalingListMode m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file.331 Char* m_scalingListFile;///< quantization matrix file name330 ScalingListMode m_useScalingListId; ///< Using quantization matrix i.e. 0=off, 1=default, 2=file. 331 std::string m_scalingListFileName; ///< quantization matrix file name 332 332 Int m_TMVPModeId; 333 333 Bool m_signHideFlag; … … 484 484 #endif //SVC_EXTENSION 485 485 #if Q0074_COLOUR_REMAPPING_SEI 486 Char* m_colourRemapSEIFileRoot; ///< SEI Colour Remapping File (initialized from external file)486 string m_colourRemapSEIFileName; ///< SEI Colour Remapping File (initialized from external file) 487 487 #endif 488 488 … … 492 492 , m_tileRowHeight() 493 493 #if Q0074_COLOUR_REMAPPING_SEI 494 , m_colourRemapSEIFile Root(NULL)494 , m_colourRemapSEIFileName() 495 495 #endif 496 496 { … … 919 919 Void setUseScalingListId ( ScalingListMode u ) { m_useScalingListId = u; } 920 920 ScalingListMode getUseScalingListId () { return m_useScalingListId; } 921 Void setScalingListFile ( Char* pch ) { m_scalingListFile = pch;}922 Char* getScalingListFile () { return m_scalingListFile;}921 Void setScalingListFileName ( const std::string &s ) { m_scalingListFileName = s; } 922 const std::string& getScalingListFileName () const { return m_scalingListFileName; } 923 923 Void setTMVPModeId ( Int u ) { m_TMVPModeId = u; } 924 924 Int getTMVPModeId () { return m_TMVPModeId; } … … 1100 1100 #endif 1101 1101 #if Q0074_COLOUR_REMAPPING_SEI 1102 Void xSetCRISEIFileRoot( Char* pch ) { m_colourRemapSEIFileRoot= pch; }1103 Char* getCRISEIFileRoot() { return m_colourRemapSEIFileRoot; }1102 Void xSetCRISEIFileRoot( std::string pch ) { m_colourRemapSEIFileName = pch; } 1103 std::string& getCRISEIFileRoot() { return m_colourRemapSEIFileName; } 1104 1104 #endif 1105 1105 #if SVC_EXTENSION -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r1435 r1442 814 814 return 1; 815 815 } 816 Bool confirmParameter(Bool bflag, const Char* message); 816 817 Bool confirmParameter(Bool bflag, const TChar* message); 817 818 // ==================================================================================================================== 818 819 // Private member functions … … 939 940 string colourRemapSEIFileWithPoc(m_pcCfg->getCRISEIFileRoot()); 940 941 colourRemapSEIFileWithPoc.append(suffix); 941 xSetCRISEIFile( co nst_cast<Char*>(colourRemapSEIFileWithPoc.c_str()));942 xSetCRISEIFile( colourRemapSEIFileWithPoc ); 942 943 943 944 Int ret = xReadingCRIparameters(); 944 945 945 if(ret != -1 && m_pcCfg->getCRISEIFileRoot())946 if(ret != -1 && !m_pcCfg->getCRISEIFileRoot().empty()) 946 947 { 947 948 // check validity of input parameters … … 1269 1270 if (cabacZeroWordPaddingEnabled) 1270 1271 { 1271 std::vector< Char> zeroBytesPadding(numberOfAdditionalCabacZeroBytes,Char(0));1272 std::vector<UChar> zeroBytesPadding(numberOfAdditionalCabacZeroBytes, UChar(0)); 1272 1273 for(std::size_t i=0; i<numberOfAdditionalCabacZeroWords; i++) 1273 1274 { 1274 1275 zeroBytesPadding[i*3+2]=3; // 00 00 03 1275 1276 } 1276 nalUnitData.write( &(zeroBytesPadding[0]), numberOfAdditionalCabacZeroBytes);1277 nalUnitData.write(reinterpret_cast<const TChar*>(&(zeroBytesPadding[0])), numberOfAdditionalCabacZeroBytes); 1277 1278 printf("Adding %d bytes of padding\n", UInt(numberOfAdditionalCabacZeroWords*3)); 1278 1279 } … … 3295 3296 } 3296 3297 3297 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B');3298 TChar c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); 3298 3299 if (!pcSlice->isReferenced()) 3299 3300 { … … 4571 4572 4572 4573 #if Q0074_COLOUR_REMAPPING_SEI 4573 Bool confirmParameter(Bool bflag, const Char* message)4574 Bool confirmParameter(Bool bflag, const TChar* message) 4574 4575 { 4575 4576 if (!bflag) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.h
r1433 r1442 152 152 TComPicYuv* m_pColorMappedPic; 153 153 154 Charm_cgsFilterLength;155 Charm_cgsFilterPhases;154 UChar m_cgsFilterLength; 155 UChar m_cgsFilterPhases; 156 156 Int m_iN; 157 157 Int **m_temp; … … 276 276 #if Q0074_COLOUR_REMAPPING_SEI 277 277 TComSEIColourRemappingInfo* xGetSEIColourRemappingInfo() { return &m_seiColourRemappingInfo; } 278 Void xSetCRISEIFile( Char* pch ){ m_seiColourRemappingInfo.m_colourRemapSEIFile = pch; }278 Void xSetCRISEIFile( std::string pch ) { m_seiColourRemappingInfo.m_colourRemapSEIFile = pch; } 279 279 280 280 Void xFreeColourCRI(); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r1344 r1442 917 917 m_signLineBuf1 = NULL; 918 918 } 919 m_signLineBuf1 = new Char[m_lineBufWidth+1];919 m_signLineBuf1 = new SChar[m_lineBufWidth+1]; 920 920 921 921 if (m_signLineBuf2) … … 924 924 m_signLineBuf2 = NULL; 925 925 } 926 m_signLineBuf2 = new Char[m_lineBufWidth+1];926 m_signLineBuf2 = new SChar[m_lineBufWidth+1]; 927 927 } 928 928 929 929 Int x,y, startX, startY, endX, endY, edgeType, firstLineStartX, firstLineEndX; 930 Char signLeft, signRight, signDown;930 SChar signLeft, signRight, signDown; 931 931 Int64 *diff, *count; 932 932 Pel *srcLine, *orgLine; … … 958 958 for (y=0; y<endY; y++) 959 959 { 960 signLeft = ( Char)sgn(srcLine[startX] - srcLine[startX-1]);960 signLeft = (SChar)sgn(srcLine[startX] - srcLine[startX-1]); 961 961 for (x=startX; x<endX; x++) 962 962 { 963 signRight = ( Char)sgn(srcLine[x] - srcLine[x+1]);963 signRight = (SChar)sgn(srcLine[x] - srcLine[x+1]); 964 964 edgeType = signRight + signLeft; 965 965 signLeft = -signRight; … … 980 980 for(y=0; y<skipLinesB[typeIdx]; y++) 981 981 { 982 signLeft = ( Char)sgn(srcLine[startX] - srcLine[startX-1]);982 signLeft = (SChar)sgn(srcLine[startX] - srcLine[startX-1]); 983 983 for (x=startX; x<endX; x++) 984 984 { 985 signRight = ( Char)sgn(srcLine[x] - srcLine[x+1]);985 signRight = (SChar)sgn(srcLine[x] - srcLine[x+1]); 986 986 edgeType = signRight + signLeft; 987 987 signLeft = -signRight; … … 1001 1001 diff +=2; 1002 1002 count+=2; 1003 Char *signUpLine = m_signLineBuf1;1003 SChar *signUpLine = m_signLineBuf1; 1004 1004 1005 1005 startX = (!isCalculatePreDeblockSamples) ? 0 … … 1020 1020 for (x=startX; x<endX; x++) 1021 1021 { 1022 signUpLine[x] = ( Char)sgn(srcLine[x] - srcLineAbove[x]);1022 signUpLine[x] = (SChar)sgn(srcLine[x] - srcLineAbove[x]); 1023 1023 } 1024 1024 … … 1030 1030 for (x=startX; x<endX; x++) 1031 1031 { 1032 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x]);1032 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x]); 1033 1033 edgeType = signDown + signUpLine[x]; 1034 1034 signUpLine[x]= -signDown; … … 1070 1070 diff +=2; 1071 1071 count+=2; 1072 Char *signUpLine, *signDownLine, *signTmpLine;1072 SChar *signUpLine, *signDownLine, *signTmpLine; 1073 1073 1074 1074 signUpLine = m_signLineBuf1; … … 1088 1088 for (x=startX; x<endX+1; x++) 1089 1089 { 1090 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x-1]);1090 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x-1]); 1091 1091 } 1092 1092 … … 1112 1112 for (x=startX; x<endX; x++) 1113 1113 { 1114 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x+1]);1114 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x+1]); 1115 1115 edgeType = signDown + signUpLine[x]; 1116 1116 diff [edgeType] += (orgLine[x] - srcLine[x]); … … 1119 1119 signDownLine[x+1] = -signDown; 1120 1120 } 1121 signDownLine[startX] = ( Char)sgn(srcLineBelow[startX] - srcLine[startX-1]);1121 signDownLine[startX] = (SChar)sgn(srcLineBelow[startX] - srcLine[startX-1]); 1122 1122 1123 1123 signTmpLine = signUpLine; … … 1157 1157 diff +=2; 1158 1158 count+=2; 1159 Char *signUpLine = m_signLineBuf1+1;1159 SChar *signUpLine = m_signLineBuf1+1; 1160 1160 1161 1161 startX = (!isCalculatePreDeblockSamples) ? (isLeftAvail ? 0 : 1) … … 1171 1171 for (x=startX-1; x<endX; x++) 1172 1172 { 1173 signUpLine[x] = ( Char)sgn(srcLineBelow[x] - srcLine[x+1]);1173 signUpLine[x] = (SChar)sgn(srcLineBelow[x] - srcLine[x+1]); 1174 1174 } 1175 1175 … … 1200 1200 for(x=startX; x<endX; x++) 1201 1201 { 1202 signDown = ( Char)sgn(srcLine[x] - srcLineBelow[x-1]);1202 signDown = (SChar)sgn(srcLine[x] - srcLineBelow[x-1]); 1203 1203 edgeType = signDown + signUpLine[x]; 1204 1204 … … 1208 1208 signUpLine[x-1] = -signDown; 1209 1209 } 1210 signUpLine[endX-1] = ( Char)sgn(srcLineBelow[endX-1] - srcLine[endX]);1210 signUpLine[endX-1] = (SChar)sgn(srcLineBelow[endX-1] - srcLine[endX]); 1211 1211 srcLine += srcStride; 1212 1212 orgLine += orgStride; -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1424 r1442 305 305 } 306 306 307 m_phQTTempCrossComponentPredictionAlpha[ch] = new Char [uiNumPartitions];307 m_phQTTempCrossComponentPredictionAlpha[ch] = new SChar [uiNumPartitions]; 308 308 m_pSharedPredTransformSkip[ch] = new Pel [MAX_CU_SIZE*MAX_CU_SIZE]; 309 309 m_pcQTTempTUCoeff[ch] = new TCoeff[MAX_CU_SIZE*MAX_CU_SIZE]; … … 1884 1884 } 1885 1885 1886 Char1886 SChar 1887 1887 TEncSearch::xCalcCrossComponentPredictionAlpha( TComTU &rTu, 1888 1888 const ComponentID compID, … … 1901 1901 const Int diffBitDepth = pCU->getSlice()->getSPS()->getDifferentialLumaChromaBitDepth(); 1902 1902 1903 Char alpha = 0;1903 SChar alpha = 0; 1904 1904 Int SSxy = 0; 1905 1905 Int SSxx = 0; … … 1921 1921 { 1922 1922 Double dAlpha = SSxy / Double( SSxx ); 1923 alpha = Char(Clip3<Int>(-16, 16, (Int)(dAlpha * 16)));1924 1925 static const Char alphaQuant[17] = {0, 1, 1, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8};1923 alpha = SChar(Clip3<Int>(-16, 16, (Int)(dAlpha * 16))); 1924 1925 static const SChar alphaQuant[17] = {0, 1, 1, 2, 2, 2, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8}; 1926 1926 1927 1927 alpha = (alpha < 0) ? -alphaQuant[Int(-alpha)] : alphaQuant[Int(alpha)]; … … 2002 2002 Double singleCostTmp = 0; 2003 2003 UInt singleCbfCTmp = 0; 2004 CharbestCrossCPredictionAlpha = 0;2004 SChar bestCrossCPredictionAlpha = 0; 2005 2005 Int bestTransformSkipMode = 0; 2006 2006 … … 2701 2701 ::memcpy( m_puhQTTempCbf[compID], pcCU->getCbf( compID )+uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2702 2702 ::memcpy( m_puhQTTempTransformSkipFlag[compID], pcCU->getTransformSkip( compID )+uiPartOffset, uiQPartNum * sizeof( UChar ) ); 2703 ::memcpy( m_phQTTempCrossComponentPredictionAlpha[compID], pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, uiQPartNum * sizeof( Char ) );2703 ::memcpy( m_phQTTempCrossComponentPredictionAlpha[compID], pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, uiQPartNum * sizeof( SChar ) ); 2704 2704 } 2705 2705 } … … 2714 2714 ::memcpy( pcCU->getCbf( compID )+uiPartOffset, m_puhQTTempCbf[compID], uiQPartNum * sizeof( UChar ) ); 2715 2715 ::memcpy( pcCU->getTransformSkip( compID )+uiPartOffset, m_puhQTTempTransformSkipFlag[compID], uiQPartNum * sizeof( UChar ) ); 2716 ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( Char ) );2716 ::memcpy( pcCU->getCrossComponentPredictionAlpha(compID)+uiPartOffset, m_phQTTempCrossComponentPredictionAlpha[compID], uiQPartNum * sizeof( SChar ) ); 2717 2717 } 2718 2718 } … … 3325 3325 3326 3326 Bool bChanged = false; 3327 3327 3328 3328 #if ENCODER_FAST_MODE 3329 3329 Bool testIter = true; … … 3414 3414 } // for loop-iRefIdxTemp 3415 3415 #endif 3416 3416 3417 3417 if ( !bChanged ) 3418 3418 { … … 3963 3963 } 3964 3964 #endif 3965 3965 3966 3966 m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) ); 3967 3967 m_pcRdCost->setCostScale ( 1 ); … … 4739 4739 const ComponentID component = ComponentID(comp); 4740 4740 ::memset( pcCU->getCbf( component ) , 0, uiQPartNum * sizeof(UChar) ); 4741 ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof( Char) ) );4741 ::memset( pcCU->getCrossComponentPredictionAlpha(component), 0, ( uiQPartNum * sizeof(SChar) ) ); 4742 4742 } 4743 4743 static const UInt useTS[MAX_NUM_COMPONENT]={0,0,0}; … … 4847 4847 // Stores the best explicit RDPCM mode for a TU encoded without split 4848 4848 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}}; 4849 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}};4849 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}}; 4850 4850 4851 4851 m_pcRDGoOnSbacCoder->store( m_pppcRDSbacCoder[ uiDepth ][ CI_QT_TRAFO_ROOT ] ); … … 4918 4918 && (pcCU->getCbf(subTUAbsPartIdx, COMPONENT_Y, uiTrMode) != 0); 4919 4919 4920 Char preCalcAlpha = 0;4920 SChar preCalcAlpha = 0; 4921 4921 const Pel *pLumaResi = m_pcQTTempTComYuv[uiQTTempAccessLayer].getAddrPix( COMPONENT_Y, rTu.getRect( COMPONENT_Y ).x0, rTu.getRect( COMPONENT_Y ).y0 ); 4922 4922 -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h
r1407 r1442 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]; … … 297 297 const Int strideBest ); 298 298 299 Char xCalcCrossComponentPredictionAlpha( TComTU &rTu,299 SChar xCalcCrossComponentPredictionAlpha ( TComTU &rTu, 300 300 const ComponentID compID, 301 301 const Pel* piResiL, -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1433 r1442 350 350 #endif 351 351 m_cSPS.getScalingList().setDefaultScalingList (); 352 if(m_cSPS.getScalingList().xParseScalingList(getScalingListFile ()))352 if(m_cSPS.getScalingList().xParseScalingList(getScalingListFileName())) 353 353 { 354 354 Bool bParsedScalingList=false; // Use of boolean so that assertion outputs useful string -
branches/SHM-dev/source/Lib/TLibVideoIO/TVideoIOYuv.cpp
r1427 r1442 118 118 * \param internalBitDepth bit-depth array to scale image data to/from when reading/writing. 119 119 */ 120 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] )120 Void TVideoIOYuv::open( const std::string &fileName, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] ) 121 121 { 122 122 //NOTE: files cannot have bit depth greater than 16 … … 143 143 if ( bWriteMode ) 144 144 { 145 m_cHandle.open( pchFile, ios::binary | ios::out );145 m_cHandle.open( fileName.c_str(), ios::binary | ios::out ); 146 146 147 147 if( m_cHandle.fail() ) … … 153 153 else 154 154 { 155 m_cHandle.open( pchFile, ios::binary | ios::in );155 m_cHandle.open( fileName.c_str(), ios::binary | ios::in ); 156 156 157 157 if( m_cHandle.fail() ) … … 219 219 220 220 /* fall back to consuming the input */ 221 Char buf[512];221 TChar buf[512]; 222 222 const streamoff offset_mod_bufsize = offset % sizeof(buf); 223 223 for (streamoff i = 0; i < offset - offset_mod_bufsize; i += sizeof(buf)) … … 275 275 276 276 const UInt stride_file = (width444 * (is16bit ? 2 : 1)) >> csx_file; 277 278 UChar *buf = new UChar[stride_file];277 std::vector<UChar> bufVec(stride_file); 278 UChar *buf=&(bufVec[0]); 279 279 280 280 if (compID!=COMPONENT_Y && (fileFormat==CHROMA_400 || destFormat==CHROMA_400)) … … 299 299 if (fd.eof() || fd.fail() ) 300 300 { 301 delete[] buf;302 301 return false; 303 302 } … … 313 312 { 314 313 // read a new line 315 fd.read(reinterpret_cast< Char*>(buf), stride_file);314 fd.read(reinterpret_cast<TChar*>(buf), stride_file); 316 315 if (fd.eof() || fd.fail() ) 317 316 { 318 delete[] buf;319 317 return false; 320 318 } … … 383 381 } 384 382 } 385 delete[] buf;386 383 return true; 387 384 } … … 421 418 const UInt height_file = height444>>csy_file; 422 419 423 UChar *buf = new UChar[stride_file]; 420 std::vector<UChar> bufVec(stride_file); 421 UChar *buf=&(bufVec[0]); 424 422 425 423 if (compID!=COMPONENT_Y && (fileFormat==CHROMA_400 || srcFormat==CHROMA_400)) … … 449 447 } 450 448 451 fd.write(reinterpret_cast< Char*>(buf), stride_file);449 fd.write(reinterpret_cast<const TChar*>(buf), stride_file); 452 450 if (fd.eof() || fd.fail() ) 453 451 { 454 delete[] buf;455 452 return false; 456 453 } … … 508 505 } 509 506 510 fd.write(reinterpret_cast< Char*>(buf), stride_file);507 fd.write(reinterpret_cast<const TChar*>(buf), stride_file); 511 508 if (fd.eof() || fd.fail() ) 512 509 { 513 delete[] buf;514 510 return false; 515 511 } … … 523 519 } 524 520 } 525 delete[] buf;526 521 return true; 527 522 } … … 546 541 const UInt height_file = height444>>csy_file; 547 542 548 UChar *buf = new UChar[stride_file * 2]; 543 std::vector<UChar> bufVec(stride_file * 2); 544 UChar *buf=&(bufVec[0]); 549 545 550 546 if (compID!=COMPONENT_Y && (fileFormat==CHROMA_400 || srcFormat==CHROMA_400)) … … 579 575 } 580 576 581 fd.write(reinterpret_cast< Char*>(buf), (stride_file * 2));577 fd.write(reinterpret_cast<const TChar*>(buf), (stride_file * 2)); 582 578 if (fd.eof() || fd.fail() ) 583 579 { 584 delete[] buf;585 580 return false; 586 581 } … … 644 639 } 645 640 646 fd.write(reinterpret_cast< Char*>(buf), (stride_file * 2));641 fd.write(reinterpret_cast<const TChar*>(buf), (stride_file * 2)); 647 642 if (fd.eof() || fd.fail() ) 648 643 { 649 delete[] buf;650 644 return false; 651 645 } … … 660 654 } 661 655 } 662 delete[] buf;663 656 return true; 664 657 } -
branches/SHM-dev/source/Lib/TLibVideoIO/TVideoIOYuv.h
r1323 r1442 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 ( const std::string &fileName, 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
Note: See TracChangeset for help on using the changeset viewer.