Ignore:
Timestamp:
25 Sep 2015, 06:51:14 (9 years ago)
Author:
chen
Message:

Commit the integration of 3D depth representation information SEI on behalf of Nokia.

by Yi-Wen Chen (yiwen.chen@…)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon/program_options_lite.h

    r1328 r1339  
    405405      xParseVec ( arg, opt_storage[ idcs[0] ][ idcs[1] ] );
    406406    };
     407#if SEI_DRI_F0169
     408    template<>
     409    inline void
     410    Option< std::vector<std::vector<double>> >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&)
     411    {
     412        // xParseVec ( arg, opt_storage[ idcs[0] ] );
     413        char* pcNextStart = (char*) arg.data();
     414        char* pcEnd = pcNextStart + arg.length();
     415
     416        char* pcOldStart = 0;
     417
     418        size_t iIdx = 0;
     419
     420        while (pcNextStart < pcEnd)
     421        {
     422            errno = 0;
     423
     424            if ( iIdx < opt_storage[idcs[0]].size() )
     425            {
     426                opt_storage[idcs[0]][iIdx] = strtod(pcNextStart, &pcNextStart);
     427            }
     428            else
     429            {
     430                opt_storage[idcs[0]].push_back( strtod(pcNextStart, &pcNextStart)) ;
     431            }
     432            iIdx++;
     433
     434            if ( errno == ERANGE || (pcNextStart == pcOldStart) )
     435            {
     436                std::cerr << "Error Parsing Doubles: `" << arg << "'" << std::endl;
     437                exit(EXIT_FAILURE);   
     438            };   
     439            while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++; 
     440            pcOldStart = pcNextStart;
     441
     442        }       
     443
     444
     445    }
     446#endif
    407447#else
    408448    template<>
Note: See TracChangeset for help on using the changeset viewer.