comparison libpostproc/postprocess_internal.h @ 1109:3644e555a20a libavcodec

doxy / cosmetics
author michaelni
date Thu, 06 Mar 2003 13:51:18 +0000
parents 8a95bda80fdc
children 57fe9c4e0c6e
comparison
equal deleted inserted replaced
1108:bfc18110d4b6 1109:3644e555a20a
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18 18
19 /**
20 * @file postprocess_internal.h
21 * internal api header.
22 */
23
19 #define V_DEBLOCK 0x01 24 #define V_DEBLOCK 0x01
20 #define H_DEBLOCK 0x02 25 #define H_DEBLOCK 0x02
21 #define DERING 0x04 26 #define DERING 0x04
22 #define LEVEL_FIX 0x08 /* Brightness & Contrast */ 27 #define LEVEL_FIX 0x08 ///< Brightness & Contrast
23 28
24 #define LUM_V_DEBLOCK V_DEBLOCK // 1 29 #define LUM_V_DEBLOCK V_DEBLOCK // 1
25 #define LUM_H_DEBLOCK H_DEBLOCK // 2 30 #define LUM_H_DEBLOCK H_DEBLOCK // 2
26 #define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16 31 #define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16
27 #define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32 32 #define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32
34 #define V_X1_FILTER 0x0200 // 512 39 #define V_X1_FILTER 0x0200 // 512
35 40
36 // Experimental horizontal filters 41 // Experimental horizontal filters
37 #define H_X1_FILTER 0x2000 // 8192 42 #define H_X1_FILTER 0x2000 // 8192
38 43
39 // select between full y range (255-0) or standart one (234-16) 44 /// select between full y range (255-0) or standart one (234-16)
40 #define FULL_Y_RANGE 0x8000 // 32768 45 #define FULL_Y_RANGE 0x8000 // 32768
41 46
42 //Deinterlacing Filters 47 //Deinterlacing Filters
43 #define LINEAR_IPOL_DEINT_FILTER 0x10000 // 65536 48 #define LINEAR_IPOL_DEINT_FILTER 0x10000 // 65536
44 #define LINEAR_BLEND_DEINT_FILTER 0x20000 // 131072 49 #define LINEAR_BLEND_DEINT_FILTER 0x20000 // 131072
54 //cant differentiate between chroma & luma filters (both on or both off) 59 //cant differentiate between chroma & luma filters (both on or both off)
55 //obviosly the -pp option at the commandline has no effect except turning the here selected 60 //obviosly the -pp option at the commandline has no effect except turning the here selected
56 //filters on 61 //filters on
57 //#define COMPILE_TIME_MODE 0x77 62 //#define COMPILE_TIME_MODE 0x77
58 63
64 /**
65 * Postprocessng filter.
66 */
59 struct PPFilter{ 67 struct PPFilter{
60 char *shortName; 68 char *shortName;
61 char *longName; 69 char *longName;
62 int chromDefault; // is chrominance filtering on by default if this filter is manually activated 70 int chromDefault; ///< is chrominance filtering on by default if this filter is manually activated
63 int minLumQuality; // minimum quality to turn luminance filtering on 71 int minLumQuality; ///< minimum quality to turn luminance filtering on
64 int minChromQuality; // minimum quality to turn chrominance filtering on 72 int minChromQuality; ///< minimum quality to turn chrominance filtering on
65 int mask; // Bitmask to turn this filter on 73 int mask; ///< Bitmask to turn this filter on
66 }; 74 };
67 75
76 /**
77 * Postprocessng mode.
78 */
68 typedef struct PPMode{ 79 typedef struct PPMode{
69 int lumMode; // acivates filters for luminance 80 int lumMode; ///< acivates filters for luminance
70 int chromMode; // acivates filters for chrominance 81 int chromMode; ///< acivates filters for chrominance
71 int error; // non zero on error 82 int error; ///< non zero on error
72 83
73 int minAllowedY; // for brigtness correction 84 int minAllowedY; ///< for brigtness correction
74 int maxAllowedY; // for brihtness correction 85 int maxAllowedY; ///< for brihtness correction
75 float maxClippedThreshold; // amount of "black" u r willing to loose to get a brightness corrected picture 86 float maxClippedThreshold; ///< amount of "black" u r willing to loose to get a brightness corrected picture
76 87
77 int maxTmpNoise[3]; // for Temporal Noise Reducing filter (Maximal sum of abs differences) 88 int maxTmpNoise[3]; ///< for Temporal Noise Reducing filter (Maximal sum of abs differences)
78 89
79 int baseDcDiff; 90 int baseDcDiff;
80 int flatnessThreshold; 91 int flatnessThreshold;
81 92
82 int forcedQuant; // quantizer if FORCE_QUANT is used 93 int forcedQuant; ///< quantizer if FORCE_QUANT is used
83 } PPMode; 94 } PPMode;
84 95
96 /**
97 * postprocess context.
98 */
85 typedef struct PPContext{ 99 typedef struct PPContext{
86 uint8_t *tempBlocks; //used for the horizontal code 100 uint8_t *tempBlocks; ///<used for the horizontal code
87 101
88 /* we need 64bit here otherwise weŽll going to have a problem 102 /**
89 after watching a black picture for 5 hours*/ 103 * luma histogram.
104 * we need 64bit here otherwise we'll going to have a problem
105 * after watching a black picture for 5 hours
106 */
90 uint64_t *yHistogram; 107 uint64_t *yHistogram;
91 108
92 uint64_t __attribute__((aligned(8))) packedYOffset; 109 uint64_t __attribute__((aligned(8))) packedYOffset;
93 uint64_t __attribute__((aligned(8))) packedYScale; 110 uint64_t __attribute__((aligned(8))) packedYScale;
94 111
95 /* Temporal noise reducing buffers */ 112 /** Temporal noise reducing buffers */
96 uint8_t *tempBlured[3]; 113 uint8_t *tempBlured[3];
97 int32_t *tempBluredPast[3]; 114 int32_t *tempBluredPast[3];
98 115
99 /* Temporary buffers for handling the last row(s) */ 116 /** Temporary buffers for handling the last row(s) */
100 uint8_t *tempDst; 117 uint8_t *tempDst;
101 uint8_t *tempSrc; 118 uint8_t *tempSrc;
102 119
103 uint8_t *deintTemp; 120 uint8_t *deintTemp;
104 121
116 133
117 int frameNum; 134 int frameNum;
118 135
119 int cpuCaps; 136 int cpuCaps;
120 137
121 int stride; //size of some buffers (needed to realloc them if needed) 138 int stride; ///<size of some buffers (needed to realloc them if needed)
122 139
123 int hChromaSubSample; 140 int hChromaSubSample;
124 int vChromaSubSample; 141 int vChromaSubSample;
125 142
126 PPMode ppMode; 143 PPMode ppMode;