Revision 8840ce92 doc/swscale.txt
doc/swscale.txt  

24  24 
output 
25  25  
26  26  
27 
Swscale has 2 scaler pathes, each side must be capable to handle


27 
Swscale has 2 scaler paths, each side must be capable to handle 

28  28 
slices, that is consecutive non overlapping rectangles of dimension 
29  29 
(0,slice_top)  (picture_width, slice_bottom) 
30  30  
...  ...  
51  51 
When the input to the main path is not planar 8bit per component yuv or 
52  52 
8bit gray then it is converted to planar 8bit YUV, 2 sets of converters 
53  53 
exist for this currently one performing horizontal downscaling by 2 
54 
before the convertion and the other leaving the full chroma resolution


54 
before the conversion and the other leaving the full chroma resolution


55  55 
but being slightly slower. The scaler will try to preserve full chroma 
56  56 
here when the output uses it, its possible to force full chroma with 
57  57 
SWS_FULL_CHR_H_INP though even for cases where the scaler thinks its 
...  ...  
59  59  
60  60 
Horizontal scaler 
61  61 
There are several horizontal scalers, a special case worth mentioning is 
62 
the fast bilinear scaler that is made of runtime generated mmx2 code


62 
the fast bilinear scaler that is made of runtime generated MMX2 code


63  63 
using specially tuned pshufw instructions. 
64  64 
The remaining scalers are specially tuned for various filter lengths 
65  65 
they scale 8bit unsigned planar data to 16bit signed planar data. 
66  66 
Future >8bit per component inputs will need to add a new scaler here 
67 
that preserves the input precission.


67 
that preserves the input precision. 

68  68  
69  69 
Vertical scaler and output converter 
70  70 
There is a large number of combined vertical scalers+output converters 
...  ...  
88  88 
 
89  89 
There are several different scalers (bilinear, bicubic, lanczos, area, sinc, ...) 
90  90 
Their coefficients are calculated in initFilter(). 
91 
Horinzontal filter coeffs have a 1.0 point at 1<<14, vertical ones at 1<<12.


92 
The 1.0 points have been choosen to maximize precission while leaving a


91 
Horizontal filter coeffs have a 1.0 point at 1<<14, vertical ones at 1<<12. 

92 
The 1.0 points have been chosen to maximize precision while leaving a


93  93 
little headroom for convolutional filters like sharpening filters and 
94  94 
minimizing SIMD instructions needed to apply them. 
95  95 
It would be trivial to use a different 1.0 point if some specific scaler 
Also available in: Unified diff