[Mplayer-cvslog] CVS: main/postproc postprocess.c,1.53,1.54 postprocess.h,1.19,1.20
Michael Niedermayer
michael at mplayer.dev.hu
Thu Jan 3 15:16:22 CET 2002
Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv32666
Modified Files:
postprocess.c postprocess.h
Log Message:
-npp fq:<quantizer>
force quantizer (for these lq movies which where reencoded at high bitrates)
(c) 2002
Index: postprocess.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/postprocess.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- postprocess.c 28 Dec 2001 13:56:04 -0000 1.53
+++ postprocess.c 3 Jan 2002 14:16:13 -0000 1.54
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Michael Niedermayer (michaelni at gmx.at)
+ Copyright (C) 2001-2002 Michael Niedermayer (michaelni at gmx.at)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -175,6 +175,7 @@
{"ci", "cubicipoldeint", 1, 1, 4, CUBIC_IPOL_DEINT_FILTER},
{"md", "mediandeint", 1, 1, 4, MEDIAN_DEINT_FILTER},
{"tn", "tmpnoise", 1, 7, 8, TEMP_NOISE_FILTER},
+ {"fq", "forcequant", 1, 0, 0, FORCE_QUANT},
{NULL, NULL,0,0,0,0} //End Marker
};
@@ -561,6 +562,7 @@
fa fast x1hdeblock:a,x1vdeblock:a,dering:a,autolevels
tn tmpnoise (3 Thresholds) Temporal Noise Reducer
1. <= 2. <= 3. Threshold, larger means stronger filtering
+fq forceQuant <quantizer> Force quantizer (for reencoded lq stuff)
*/
/**
@@ -720,6 +722,21 @@
vFlatnessThreshold= val;
}
}
+ else if(filters[i].mask == FORCE_QUANT)
+ {
+ int o;
+ ppMode.forcedQuant= 15;
+
+ for(o=0; options[o]!=NULL && o<1; o++)
+ {
+ char *tail;
+ int val= strtol(options[o], &tail, 0);
+ if(tail==options[o]) break;
+
+ numOfUnknownOptions--;
+ ppMode.forcedQuant= val;
+ }
+ }
}
}
if(!filterNameOk) ppMode.error++;
@@ -775,7 +792,7 @@
if(newPPFlag)
{
ppMode= gPPMode[mode];
-
+// printf("%d \n",QP_store[5]);
postprocess2(src, src_stride, dst, dst_stride,
horizontal_size, vertical_size, QP_store, QP_stride, &ppMode);
@@ -850,11 +867,16 @@
struct PPMode *mode)
{
- static QP_STORE_T zeroArray[2048/8];
- if(QP_store==NULL)
+ QP_STORE_T quantArray[2048/8];
+ if(QP_store==NULL || (mode->lumMode & FORCE_QUANT))
{
- QP_store= zeroArray;
+ int i;
+ QP_store= quantArray;
QP_stride= 0;
+ if(mode->lumMode & FORCE_QUANT)
+ for(i=0; i<2048/8; i++) quantArray[i]= mode->forcedQuant;
+ else
+ for(i=0; i<2048/8; i++) quantArray[i]= 1;
}
#ifdef HAVE_ODIVX_POSTPROCESS
Index: postprocess.h
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/postprocess.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- postprocess.h 28 Dec 2001 13:56:04 -0000 1.19
+++ postprocess.h 3 Jan 2002 14:16:13 -0000 1.20
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001 Michael Niedermayer (michaelni at gmx.at)
+ Copyright (C) 2001-2002 Michael Niedermayer (michaelni at gmx.at)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -57,6 +57,7 @@
#define MEDIAN_DEINT_FILTER 0x80000 // 524288
#define TEMP_NOISE_FILTER 0x100000
+#define FORCE_QUANT 0x200000
#define GET_PP_QUALITY_MAX 6
@@ -87,6 +88,7 @@
int maxTmpNoise[3]; // for Temporal Noise Reducing filter (Maximal sum of abs differences)
int maxDcDiff; // max abs diff between pixels to be considered flat
+ int forcedQuant; // quantizer if FORCE_QUANT is used
};
struct PPFilter{
More information about the MPlayer-cvslog
mailing list