| 446 | } |
| 447 | |
| 448 | int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamExt& pSvcParam, SFilesSet& sFileSet) { |
| 449 | char* pCommand = NULL; |
| 450 | SLayerPEncCtx sLayerCtx[MAX_SPATIAL_LAYER_NUM]; |
| 451 | int n = 0; |
| 452 | string str_ ("SlicesAssign"); |
| 453 | |
| 454 | while (n < argc) { |
| 455 | pCommand = argv[n++]; |
| 456 | |
| 457 | if (!strcmp (pCommand, "-bf") && (n < argc)) |
| 458 | sFileSet.strBsFile.assign (argv[n++]); |
| 459 | else if (!strcmp (pCommand, "-utype") && (n < argc)) |
| 460 | pSvcParam.iUsageType = (EUsageType)atoi (argv[n++]); |
| 461 | |
| 462 | else if (!strcmp (pCommand, "-savc") && (n < argc)) |
| 463 | pSvcParam.bSimulcastAVC = atoi (argv[n++]) ? true : false; |
| 464 | |
| 465 | else if (!strcmp (pCommand, "-org") && (n < argc)) |
| 466 | sFileSet.strSeqFile.assign (argv[n++]); |
| 467 | |
| 468 | else if (!strcmp (pCommand, "-sw") && (n < argc))//source width |
| 469 | pSrcPic->iPicWidth = atoi (argv[n++]); |
| 470 | |
| 471 | else if (!strcmp (pCommand, "-sh") && (n < argc))//source height |
| 472 | pSrcPic->iPicHeight = atoi (argv[n++]); |
| 473 | |
| 474 | else if (!strcmp (pCommand, "-frms") && (n < argc)) |
| 475 | sFileSet.uiFrameToBeCoded = atoi (argv[n++]); |
| 476 | |
| 477 | else if (!strcmp (pCommand, "-frin") && (n < argc)) |
| 478 | pSvcParam.fMaxFrameRate = (float) atof (argv[n++]); |
| 479 | |
| 480 | else if (!strcmp (pCommand, "-numtl") && (n < argc)) |
| 481 | pSvcParam.iTemporalLayerNum = atoi (argv[n++]); |
| 482 | |
| 483 | else if (!strcmp (pCommand, "-mfile") && (n < argc)) |
| 484 | sFileSet.bEnableMultiBsFile = atoi (argv[n++]) ? true : false; |
| 485 | |
| 486 | else if (!strcmp (pCommand, "-iper") && (n < argc)) |
| 487 | pSvcParam.uiIntraPeriod = atoi (argv[n++]); |
| 488 | |
| 489 | else if (!strcmp (pCommand, "-nalsize") && (n < argc)) |
| 490 | pSvcParam.uiMaxNalSize = atoi (argv[n++]); |
| 491 | |
| 492 | else if (!strcmp (pCommand, "-spsid") && (n < argc)) { |
| 493 | int32_t iValue = atoi (argv[n++]); |
| 494 | switch (iValue) { |
| 495 | case 0: |
| 496 | pSvcParam.eSpsPpsIdStrategy = CONSTANT_ID; |
| 497 | break; |
| 498 | case 0x01: |
| 499 | pSvcParam.eSpsPpsIdStrategy = INCREASING_ID; |
| 500 | break; |
| 501 | case 0x02: |
| 502 | pSvcParam.eSpsPpsIdStrategy = SPS_LISTING; |
| 503 | break; |
| 504 | case 0x03: |
| 505 | pSvcParam.eSpsPpsIdStrategy = SPS_LISTING_AND_PPS_INCREASING; |
no test coverage detected