w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

opts.h
Go to the documentation of this file.
1 /*
2  * opts.h - set optional parameters
3  */
4 
5 /*
6  * Copyright (c) 1995 The Regents of the University of California.
7  * All rights reserved.
8  *
9  * Permission to use, copy, modify, and distribute this software and its
10  * documentation for any purpose, without fee, and without written agreement is
11  * hereby granted, provided that the above copyright notice and the following
12  * two paragraphs appear in all copies of this software.
13  *
14  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
15  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
16  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
17  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18  *
19  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
20  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
23  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24  */
25 
26 /*
27  * $Header: /n/picasso/project/mpeg/mpeg_dist/mpeg_encode/headers/RCS/opts.h,v 1.3 1995/08/15 23:43:43 smoot Exp $
28  * $Log: opts.h,v $
29  * Revision 1.3 1995/08/15 23:43:43 smoot
30  * *** empty log message ***
31  *
32  * Revision 1.2 1995/05/02 22:00:51 smoot
33  * added TUNEing stuff
34  *
35  * Revision 1.1 1995/04/14 23:12:53 smoot
36  * Initial revision
37  *
38  */
39 
40 #include "general.h"
41 #include "ansi.h"
42 #include "mtypes.h"
43 
44 /*
45  TUNE b [limit] lower limit on how different a block must be to be DCT coded
46  TUNE c [file [color-diff]] Collect statistics on Quantization
47  TUNE d [RateScale DistortionScale] Do a DCT in the P search, not just DIFF
48  TUNE k [breakpt end [slope]] Squash small lum values
49  TUNE l Figure out Laplacian distrib and use them to dequantize and do snr calc
50  TUNE n Dont consider DC differenece in DCT searches
51  TUNE q Do MSE for distortion measure, not MAD
52  TUNE s [Max] | [LumMax ChromMax] Squash small differences in successive frames
53  TUNE u disallow skip blocks in B frames
54  TUNE w filename [c] Write I block distortion numbers to file [with bit-rates]
55  TUNE z Zaps Intra blocks in P/B frames.
56 
57  [ Note k and s make -snr numbers a lie, by playing with input ]
58  [ Note d n and q are contradictory (can only use one) ]
59  [ Note c will not work on parallel encodings ]
60 */
61 
62 extern boolean tuneingOn;
63 
64 /* Smash to no-change a motion block DCT with MAD less than: */
65 /* DETAL b value */
66 extern int block_bound;
67 
68 /* Collect info on quantization */
69 extern boolean collect_quant;
70 extern int collect_quant_detailed;
71 extern FILE *collect_quant_fp;
72 
73 /* Nuke dim areas */
75 extern float kill_dim_slope;
76 
77 
78 /* Stuff to control MV search comparisons */
79 #define DEFAULT_SEARCH 0
80 #define LOCAL_DCT 1 /* Do DCT in search (SLOW!!!!) */
81 #define NO_DC_SEARCH 2 /* Dont consider DC component in motion searches */
82 #define DO_Mean_Squared_Distortion 3 /* Do Squared distortion, not ABS */
83 
84 /* Parameters for special searches */
85 /* LOCAL_DCT */
87 
88 /* Search Type Variable */
89 extern int SearchCompareMode;
90 
91 /* squash small differences */
92 extern boolean squash_small_differences;
94 
95 /* Disallows Intra blocks in P/B code */
96 extern boolean IntraPBAllowed;
97 
98 /* Write out distortion numbers */
99 extern boolean WriteDistortionNumbers;
100 extern int collect_distortion_detailed;
101 extern FILE *distortion_fp;
102 extern FILE *fp_table_rate[31], *fp_table_dist[31];
103 
104 /* Laplacian Distrib */
105 extern boolean DoLaplace;
106 extern double **L1, **L2, **Lambdas;
108 
109 /* Turn on/off skipping in B frames */
110 extern boolean BSkipBlocks;
111 
112 /* Procedures Prototypes */
113 int GetIQScale _ANSI_ARGS_((void));
114 int GetPQScale _ANSI_ARGS_((void));
115 int GetBQScale _ANSI_ARGS_((void));
116 void Tune_Init _ANSI_ARGS_((void));
117 char *SkipSpacesTabs _ANSI_ARGS_((char *start));
119 void ParseTuneParam _ANSI_ARGS_((char *charPtr));
120 int mse _ANSI_ARGS_((Block blk1, Block blk2));
121 void Mpost_UnQuantZigBlockLaplace _ANSI_ARGS_((FlatBlock in, Block out, int qscale, boolean iblock));
122 
123 
124 
125 
FILE * out
Definition: hbf2gf.c:286
int16 FlatBlock[64]
Definition: mtypes.h:100
int16 Block[8][8]
Definition: mtypes.h:99
int kill_dim
Definition: opts.c:67
boolean squash_small_differences
Definition: opts.c:71
boolean collect_quant
Definition: opts.c:64
float LocalDCTRateScale
Definition: opts.c:73
int GetPQScale(void)
Definition: pframe.c:770
int mse(Block blk1, Block blk2)
Definition: opts.c:506
FILE * distortion_fp
Definition: opts.c:77
char * SkipSpacesTabs(char *start)
Definition: param.c:1234
int GetIQScale(void)
Definition: iframe.c:380
int CalcRLEHuffLength(FlatBlock in)
Definition: postdct.c:580
float kill_dim_slope
Definition: opts.c:69
FILE * fp_table_dist[31]
Definition: opts.h:102
boolean IntraPBAllowed
Definition: opts.c:74
float LocalDCTDistortScale
Definition: opts.h:86
double ** L1
Definition: opts.c:80
int kill_dim_break
Definition: opts.h:74
int LaplaceCnum
Definition: opts.h:107
void ParseTuneParam(char *charPtr)
Definition: opts.c:160
boolean WriteDistortionNumbers
Definition: opts.c:75
FILE * collect_quant_fp
Definition: opts.c:66
int kill_dim_end
Definition: opts.h:74
int block_bound
Definition: opts.c:63
int SearchCompareMode
Definition: opts.c:70
void Tune_Init(void)
Definition: opts.c:114
int collect_distortion_detailed
Definition: opts.c:76
int LaplaceNum
Definition: opts.c:81
double ** Lambdas
Definition: opts.h:106
int GetBQScale(void)
Definition: bframe.c:829
void Mpost_UnQuantZigBlockLaplace(FlatBlock in, Block out, int qscale, boolean iblock)
Definition: opts.c:413
FILE * fp_table_rate[31]
Definition: opts.c:78
int SquashMaxLum
Definition: opts.c:72
boolean tuneingOn
Definition: opts.c:62
boolean BSkipBlocks
Definition: opts.c:82
int collect_quant_detailed
Definition: opts.c:65
int SquashMaxChr
Definition: opts.h:93
double ** L2
Definition: opts.h:106
boolean DoLaplace
Definition: opts.c:79
#define _ANSI_ARGS_(x)
Definition: ppmtoeyuv.c:64
static FILE * in
Definition: squeeze.c:36
#define FILE
Definition: t1stdio.h:34
@ start
Definition: preamble.c:52