From 1eaa5eae03ccd7bbd44dbafe19ce0da1026be04c Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 26 Dec 2001 19:45:49 +0000 Subject: new -pp options stuff (-npp ...) see line527@postproc/postprocess.c ;) for the documentation of the format git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3772 b3059339-0415-0410-9bf9-f77b7e298cf2 --- postproc/postprocess.c | 64 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 46 insertions(+), 18 deletions(-) (limited to 'postproc/postprocess.c') diff --git a/postproc/postprocess.c b/postproc/postprocess.c index 9011fbbb1b..979a9bbb59 100644 --- a/postproc/postprocess.c +++ b/postproc/postprocess.c @@ -143,6 +143,12 @@ static uint64_t packedYOffset= 0x0000000000000000LL; static uint64_t packedYScale= 0x0100010001000100LL; #endif +extern int divx_quality; +int newPPFlag=0; //is set if -npp is used +struct PPMode gPPMode[GET_PP_QUALITY_MAX+1]; + +extern int verbose; + int hFlatnessThreshold= 56 - 16; int vFlatnessThreshold= 56 - 16; int deringThreshold= 20; @@ -565,7 +571,7 @@ struct PPMode getPPModeByNameAndQuality(char *name, int quality) strncpy(temp, name, GET_MODE_BUFFER_SIZE); - printf("%s\n", name); + if(verbose) printf("%s\n", name); for(;;){ char *filterName; @@ -582,7 +588,7 @@ struct PPMode getPPModeByNameAndQuality(char *name, int quality) if(filterToken == NULL) break; p+= strlen(filterToken) + 1; // p points to next filterToken filterName= strtok(filterToken, optionDelimiters); - printf("%s::%s\n", filterToken, filterName); + if(verbose) printf("%s::%s\n", filterToken, filterName); if(*filterName == '-') { @@ -594,7 +600,7 @@ struct PPMode getPPModeByNameAndQuality(char *name, int quality) option= strtok(NULL, optionDelimiters); if(option == NULL) break; - printf("%s\n", option); + if(verbose) printf(" option: %s\n", option); if(!strcmp("autoq", option) || !strcmp("a", option)) q= quality; else if(!strcmp("nochrom", option) || !strcmp("y", option)) chrom=0; else if(!strcmp("chrom", option) || !strcmp("c", option)) chrom=1; @@ -700,11 +706,34 @@ struct PPMode getPPModeByNameAndQuality(char *name, int quality) if(ppMode.chromMode & DERING) ppMode.oldMode |= PP_DERING_C; #endif + if(verbose) printf("lumMode=%X, chromMode=%X\n", ppMode.lumMode, ppMode.chromMode); return ppMode; } +/** + * Check and load the -npp part of the cmd line + */ +int readPPOpt(void *conf, char *arg) +{ + int quality; + for(quality=0; quality