Revision b304569a

View differences:

libavcodec/libpostproc/postprocess.c
16 16
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 17
*/
18 18

  
19
/**
20
 * @file postprocess.c
21
 * postprocessing.
22
 */
23
 
19 24
/*
20 25
			C	MMX	MMX2	3DNow
21 26
isVertDC		Ec	Ec
libavcodec/libpostproc/postprocess.h
36 36
typedef void pp_context_t;
37 37
typedef void pp_mode_t;
38 38

  
39
extern char *pp_help; //a simple help text
39
extern char *pp_help; ///< a simple help text
40 40

  
41 41
void  pp_postprocess(uint8_t * src[3], int srcStride[3],
42 42
                 uint8_t * dst[3], int dstStride[3],
libavcodec/libpostproc/postprocess_internal.h
16 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 24
#define V_DEBLOCK	0x01
20 25
#define H_DEBLOCK	0x02
21 26
#define DERING		0x04
22
#define LEVEL_FIX	0x08 /* Brightness & Contrast */
27
#define LEVEL_FIX	0x08 ///< Brightness & Contrast
23 28

  
24 29
#define LUM_V_DEBLOCK	V_DEBLOCK		//   1
25 30
#define LUM_H_DEBLOCK	H_DEBLOCK		//   2
......
36 41
// Experimental horizontal filters
37 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 45
#define FULL_Y_RANGE	0x8000			// 32768
41 46

  
42 47
//Deinterlacing Filters
......
56 61
//filters on
57 62
//#define COMPILE_TIME_MODE 0x77
58 63

  
64
/**
65
 * Postprocessng filter.
66
 */
59 67
struct PPFilter{
60 68
	char *shortName;
61 69
	char *longName;
62
	int chromDefault; 	// is chrominance filtering on by default if this filter is manually activated
63
	int minLumQuality; 	// minimum quality to turn luminance filtering on
64
	int minChromQuality;	// minimum quality to turn chrominance filtering on
65
	int mask; 		// Bitmask to turn this filter on
70
	int chromDefault; 	///< is chrominance filtering on by default if this filter is manually activated
71
	int minLumQuality; 	///< minimum quality to turn luminance filtering on
72
	int minChromQuality;	///< minimum quality to turn chrominance filtering on
73
	int mask; 		///< Bitmask to turn this filter on
66 74
};
67 75

  
76
/**
77
 * Postprocessng mode.
78
 */
68 79
typedef struct PPMode{
69
	int lumMode; 			// acivates filters for luminance
70
	int chromMode; 			// acivates filters for chrominance
71
	int error; 			// non zero on error
80
	int lumMode; 			///< acivates filters for luminance
81
	int chromMode; 			///< acivates filters for chrominance
82
	int error; 			///< non zero on error
72 83

  
73
	int minAllowedY; 		// for brigtness correction
74
	int maxAllowedY; 		// for brihtness correction
75
	float maxClippedThreshold;	// amount of "black" u r willing to loose to get a brightness corrected picture
84
	int minAllowedY; 		///< for brigtness correction
85
	int maxAllowedY; 		///< for brihtness correction
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 90
	int baseDcDiff;
80 91
	int flatnessThreshold;
81 92

  
82
	int forcedQuant; 		// quantizer if FORCE_QUANT is used
93
	int forcedQuant; 		///< quantizer if FORCE_QUANT is used
83 94
} PPMode;
84 95

  
96
/**
97
 * postprocess context.
98
 */
85 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
89
	   after watching a black picture for 5 hours*/
102
	/**
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 107
	uint64_t *yHistogram;
91 108

  
92 109
	uint64_t __attribute__((aligned(8))) packedYOffset;
93 110
	uint64_t __attribute__((aligned(8))) packedYScale;
94 111

  
95
	/* Temporal noise reducing buffers */
112
	/** Temporal noise reducing buffers */
96 113
	uint8_t *tempBlured[3];
97 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 117
	uint8_t *tempDst;
101 118
	uint8_t *tempSrc;
102 119

  
......
118 135
	
119 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 140
	int hChromaSubSample;
124 141
	int vChromaSubSample;
libavcodec/libpostproc/postprocess_template.c
16 16
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 17
*/
18 18

  
19
/**
20
 * @file postprocess_template.c
21
 * mmx/mmx2/3dnow postprocess code.
22
 */
23

  
24

  
19 25
#undef PAVGB
20 26
#undef PMINUB
21 27
#undef PMAXUB
......
1523 1529
}
1524 1530

  
1525 1531
/**
1526
 * Deinterlaces the given block
1532
 * Deinterlaces the given block by linearly interpolating every second line.
1527 1533
 * will be called for every 8x8 block and can read & write from line 4-15
1528 1534
 * lines 0-3 have been passed through the deblock / dering filters allready, but can be read too
1529 1535
 * lines 4-12 will be read into the deblocking filter and should be deinterlaced
......
1570 1576
}
1571 1577

  
1572 1578
/**
1573
 * Deinterlaces the given block
1579
 * Deinterlaces the given block by cubic interpolating every second line.
1574 1580
 * will be called for every 8x8 block and can read & write from line 4-15
1575 1581
 * lines 0-3 have been passed through the deblock / dering filters allready, but can be read too
1576 1582
 * lines 4-12 will be read into the deblocking filter and should be deinterlaced
......
1635 1641
}
1636 1642

  
1637 1643
/**
1638
 * Deinterlaces the given block
1644
 * Deinterlaces the given block by filtering every second line with a (-1 4 2 4 -1) filter.
1639 1645
 * will be called for every 8x8 block and can read & write from line 4-15
1640 1646
 * lines 0-3 have been passed through the deblock / dering filters allready, but can be read too
1641 1647
 * lines 4-12 will be read into the deblocking filter and should be deinterlaced
......
1714 1720
}
1715 1721

  
1716 1722
/**
1717
 * Deinterlaces the given block
1723
 * Deinterlaces the given block by filtering all lines with a (1 2 1) filter.
1718 1724
 * will be called for every 8x8 block and can read & write from line 4-15
1719 1725
 * lines 0-3 have been passed through the deblock / dering filters allready, but can be read too
1720 1726
 * lines 4-12 will be read into the deblocking filter and should be deinterlaced
......
1789 1795
}
1790 1796

  
1791 1797
/**
1792
 * Deinterlaces the given block
1798
 * Deinterlaces the given block by applying a median filter to every second line.
1793 1799
 * will be called for every 8x8 block and can read & write from line 4-15,
1794 1800
 * lines 0-3 have been passed through the deblock / dering filters allready, but can be read too
1795 1801
 * lines 4-12 will be read into the deblocking filter and should be deinterlaced

Also available in: Unified diff