# HG changeset patch # User michael # Date 1003793795 0 # Node ID 1895a8fa81eac7fb05672a6f74153941370702c7 # Parent 4514b8e7f0f17f5712b32f111439119299ad309d auto brightness/ contrast bugfix getPPModeByNameAndQuality diff -r 4514b8e7f0f1 -r 1895a8fa81ea libpostproc/postprocess.c --- a/libpostproc/postprocess.c Fri Oct 19 17:03:51 2001 +0000 +++ b/libpostproc/postprocess.c Mon Oct 22 23:36:35 2001 +0000 @@ -71,6 +71,7 @@ #include #include #include +#include #include "../config.h" //#undef HAVE_MMX2 //#define HAVE_3DNOW @@ -88,6 +89,10 @@ #define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t" #endif +#define GET_MODE_BUFFER_SIZE 500 +#define OPTIONS_ARRAY_SIZE 10 + + static uint64_t packedYOffset= 0x0000000000000000LL; static uint64_t packedYScale= 0x0100010001000100LL; static uint64_t w05= 0x0005000500050005LL; @@ -130,10 +135,35 @@ //amount of "black" u r willing to loose to get a brightness corrected picture double maxClippedThreshold= 0.01; -int maxAllowedY=255; +int maxAllowedY=234; //FIXME can never make a movie´s black brighter (anyone needs that?) int minAllowedY=16; +static struct PPFilter filters[]= +{ + {"hb", "hdeblock", 1, 1, 3, H_DEBLOCK}, + {"vb", "vdeblock", 1, 2, 4, V_DEBLOCK}, + {"vr", "rkvdeblock", 1, 2, 4, H_RK1_FILTER}, + {"h1", "x1hdeblock", 1, 1, 3, H_X1_FILTER}, + {"v1", "x1vdeblock", 1, 2, 4, V_X1_FILTER}, + {"dr", "dering", 1, 5, 6, DERING}, + {"al", "autolevels", 0, 1, 2, LEVEL_FIX}, + {"lb", "linblenddeint", 0, 1, 6, LINEAR_BLEND_DEINT_FILTER}, + {"li", "linipoldeint", 0, 1, 6, LINEAR_IPOL_DEINT_FILTER}, + {"ci", "cubicipoldeint", 0, 1, 6, CUBIC_IPOL_DEINT_FILTER}, + {"md", "mediandeint", 0, 1, 6, MEDIAN_DEINT_FILTER}, + {NULL, NULL,0,0,0,0} //End Marker +}; + +static char *replaceTable[]= +{ + "default", "hdeblock:a,vdeblock:a,dering:a,autolevels", + "de", "hdeblock:a,vdeblock:a,dering:a,autolevels", + "fast", "x1hdeblock:a,x1vdeblock:a,dering:a,autolevels", + "fa", "x1hdeblock:a,x1vdeblock:a,dering:a,autolevels", + NULL //End Marker +}; + #ifdef TIMING static inline long long rdtsc() { @@ -2163,6 +2193,165 @@ static void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, QP_STORE_T QPs[], int QPStride, int isColor, int mode); +/* -pp Command line Help +NOTE/FIXME: put this at an appropriate place (--help, html docs, man mplayer)? + +-pp [: