comparison libpostproc/postprocess.c @ 2567:910cd8bd981f libavcodec

disable luma in postprocess filters patch by (Tuukka Toivonen |tuukkat ee.oulu fi) fixed by myself
author michael
date Sat, 19 Mar 2005 03:01:13 +0000
parents ace6e273f318
children e99703305233
comparison
equal deleted inserted replaced
2566:99bcd49a3677 2567:910cd8bd981f
723 "Filters Options\n" 723 "Filters Options\n"
724 "short long name short long option Description\n" 724 "short long name short long option Description\n"
725 "* * a autoq CPU power dependent enabler\n" 725 "* * a autoq CPU power dependent enabler\n"
726 " c chrom chrominance filtering enabled\n" 726 " c chrom chrominance filtering enabled\n"
727 " y nochrom chrominance filtering disabled\n" 727 " y nochrom chrominance filtering disabled\n"
728 " n noluma luma filtering disabled\n"
728 "hb hdeblock (2 threshold) horizontal deblocking filter\n" 729 "hb hdeblock (2 threshold) horizontal deblocking filter\n"
729 " 1. difference factor: default=32, higher -> more deblocking\n" 730 " 1. difference factor: default=32, higher -> more deblocking\n"
730 " 2. flatness threshold: default=39, lower -> more deblocking\n" 731 " 2. flatness threshold: default=39, lower -> more deblocking\n"
731 " the h & v deblocking filters share these\n" 732 " the h & v deblocking filters share these\n"
732 " so you can't set different thresholds for h / v\n" 733 " so you can't set different thresholds for h / v\n"
788 789
789 for(;;){ 790 for(;;){
790 char *filterName; 791 char *filterName;
791 int q= 1000000; //PP_QUALITY_MAX; 792 int q= 1000000; //PP_QUALITY_MAX;
792 int chrom=-1; 793 int chrom=-1;
794 int luma=-1;
793 char *option; 795 char *option;
794 char *options[OPTIONS_ARRAY_SIZE]; 796 char *options[OPTIONS_ARRAY_SIZE];
795 int i; 797 int i;
796 int filterNameOk=0; 798 int filterNameOk=0;
797 int numOfUnknownOptions=0; 799 int numOfUnknownOptions=0;
815 817
816 if(verbose>1) printf("pp: option: %s\n", option); 818 if(verbose>1) printf("pp: option: %s\n", option);
817 if(!strcmp("autoq", option) || !strcmp("a", option)) q= quality; 819 if(!strcmp("autoq", option) || !strcmp("a", option)) q= quality;
818 else if(!strcmp("nochrom", option) || !strcmp("y", option)) chrom=0; 820 else if(!strcmp("nochrom", option) || !strcmp("y", option)) chrom=0;
819 else if(!strcmp("chrom", option) || !strcmp("c", option)) chrom=1; 821 else if(!strcmp("chrom", option) || !strcmp("c", option)) chrom=1;
822 else if(!strcmp("noluma", option) || !strcmp("n", option)) luma=0;
820 else 823 else
821 { 824 {
822 options[numOfUnknownOptions] = option; 825 options[numOfUnknownOptions] = option;
823 numOfUnknownOptions++; 826 numOfUnknownOptions++;
824 } 827 }
861 ppMode->chromMode &= ~filters[i].mask; 864 ppMode->chromMode &= ~filters[i].mask;
862 865
863 filterNameOk=1; 866 filterNameOk=1;
864 if(!enable) break; // user wants to disable it 867 if(!enable) break; // user wants to disable it
865 868
866 if(q >= filters[i].minLumQuality) 869 if(q >= filters[i].minLumQuality && luma)
867 ppMode->lumMode|= filters[i].mask; 870 ppMode->lumMode|= filters[i].mask;
868 if(chrom==1 || (chrom==-1 && filters[i].chromDefault)) 871 if(chrom==1 || (chrom==-1 && filters[i].chromDefault))
869 if(q >= filters[i].minChromQuality) 872 if(q >= filters[i].minChromQuality)
870 ppMode->chromMode|= filters[i].mask; 873 ppMode->chromMode|= filters[i].mask;
871 874