# HG changeset patch # User michael # Date 1009395949 0 # Node ID a14b3a600b8134fe6d113b3a59f290bf36e50b5b # Parent 4f1a99fb9d9a3411c88276d3d4396afd70d1202f new -pp options stuff (-npp ...) see line527@postproc/postprocess.c ;) for the documentation of the format diff -r 4f1a99fb9d9a -r a14b3a600b81 cfg-common.h --- a/cfg-common.h Wed Dec 26 16:34:06 2001 +0000 +++ b/cfg-common.h Wed Dec 26 19:45:49 2001 +0000 @@ -77,6 +77,7 @@ {"divxq", "Option -divxq has been renamed to -pp (postprocessing), use -pp !\n", CONF_TYPE_PRINT, 0, 0, 0}, {"pp", &divx_quality, CONF_TYPE_INT, CONF_MIN, 0, 63}, + {"npp", readPPOpt, CONF_TYPE_FUNC_PARAM, 0, 0, 0}, #ifdef HAVE_ODIVX_POSTPROCESS {"oldpp", &use_old_pp, CONF_TYPE_FLAG, 0, 0, 1}, #else diff -r 4f1a99fb9d9a -r a14b3a600b81 cfg-mencoder.h --- a/cfg-mencoder.h Wed Dec 26 16:34:06 2001 +0000 +++ b/cfg-mencoder.h Wed Dec 26 19:45:49 2001 +0000 @@ -12,6 +12,7 @@ #endif extern int sws_flags; +extern int readPPOpt(void *, char *arg); #ifdef HAVE_DIVX4ENCORE struct config divx4opts_conf[]={ diff -r 4f1a99fb9d9a -r a14b3a600b81 cfg-mplayer.h --- a/cfg-mplayer.h Wed Dec 26 16:34:06 2001 +0000 +++ b/cfg-mplayer.h Wed Dec 26 19:45:49 2001 +0000 @@ -89,6 +89,8 @@ }; extern int sws_flags; +extern int readPPOpt(void *conf, char *arg); + /* * CONF_TYPE_FUNC_FULL : diff -r 4f1a99fb9d9a -r a14b3a600b81 postproc/postprocess.c --- a/postproc/postprocess.c Wed Dec 26 16:34:06 2001 +0000 +++ b/postproc/postprocess.c Wed Dec 26 19:45:49 2001 +0000 @@ -143,6 +143,12 @@ 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 @@ strncpy(temp, name, GET_MODE_BUFFER_SIZE); - printf("%s\n", name); + if(verbose) printf("%s\n", name); for(;;){ char *filterName; @@ -582,7 +588,7 @@ 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 @@ 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 @@ 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