|
|
@ -24,18 +24,18 @@ Current (simplified) Architecture: |
|
|
|
output |
|
|
|
output |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Swscale has 2 scaler paths, each side must be capable to handle |
|
|
|
Swscale has 2 scaler paths. Each side must be capable of handling |
|
|
|
slices, that is consecutive non overlapping rectangles of dimension |
|
|
|
slices, that is, consecutive non-overlapping rectangles of dimension |
|
|
|
(0,slice_top) - (picture_width, slice_bottom) |
|
|
|
(0,slice_top) - (picture_width, slice_bottom) |
|
|
|
|
|
|
|
|
|
|
|
special converter |
|
|
|
special converter |
|
|
|
This generally are unscaled converters of common |
|
|
|
These generally are unscaled converters of common |
|
|
|
formats, like YUV 4:2:0/4:2:2 -> RGB15/16/24/32. Though it could also |
|
|
|
formats, like YUV 4:2:0/4:2:2 -> RGB15/16/24/32. Though it could also |
|
|
|
in principle contain scalers optimized for specific common cases. |
|
|
|
in principle contain scalers optimized for specific common cases. |
|
|
|
|
|
|
|
|
|
|
|
Main path |
|
|
|
Main path |
|
|
|
The main path is used when no special converter can be used, the code |
|
|
|
The main path is used when no special converter can be used. The code |
|
|
|
is designed as a destination line pull architecture. That is for each |
|
|
|
is designed as a destination line pull architecture. That is, for each |
|
|
|
output line the vertical scaler pulls lines from a ring buffer. When |
|
|
|
output line the vertical scaler pulls lines from a ring buffer. When |
|
|
|
the ring buffer does not contain the wanted line then it is pulled from |
|
|
|
the ring buffer does not contain the wanted line then it is pulled from |
|
|
|
the input slice through the input converter and horizontal scaler, and |
|
|
|
the input slice through the input converter and horizontal scaler, and |
|
|
@ -49,20 +49,20 @@ Main path |
|
|
|
|
|
|
|
|
|
|
|
Input to YUV Converter |
|
|
|
Input to YUV Converter |
|
|
|
When the input to the main path is not planar 8bit per component yuv or |
|
|
|
When the input to the main path is not planar 8bit per component yuv or |
|
|
|
8bit gray then it is converted to planar 8bit YUV, 2 sets of converters |
|
|
|
8bit gray then it is converted to planar 8bit YUV. 2 sets of converters |
|
|
|
exist for this currently one performing horizontal downscaling by 2 |
|
|
|
exist for this currently, one performing horizontal downscaling by 2 |
|
|
|
before the conversion and the other leaving the full chroma resolution |
|
|
|
before the conversion and the other leaving the full chroma resolution |
|
|
|
but being slightly slower. The scaler will try to preserve full chroma |
|
|
|
but being slightly slower. The scaler will try to preserve full chroma |
|
|
|
here when the output uses it, its possible to force full chroma with |
|
|
|
here when the output uses it. It is possible to force full chroma with |
|
|
|
SWS_FULL_CHR_H_INP though even for cases where the scaler thinks its |
|
|
|
SWS_FULL_CHR_H_INP though even for cases where the scaler thinks it is |
|
|
|
useless. |
|
|
|
useless. |
|
|
|
|
|
|
|
|
|
|
|
Horizontal scaler |
|
|
|
Horizontal scaler |
|
|
|
There are several horizontal scalers, a special case worth mentioning is |
|
|
|
There are several horizontal scalers. A special case worth mentioning is |
|
|
|
the fast bilinear scaler that is made of runtime generated MMX2 code |
|
|
|
the fast bilinear scaler that is made of runtime generated MMX2 code |
|
|
|
using specially tuned pshufw instructions. |
|
|
|
using specially tuned pshufw instructions. |
|
|
|
The remaining scalers are specially tuned for various filter lengths |
|
|
|
The remaining scalers are specially tuned for various filter lengths. |
|
|
|
they scale 8bit unsigned planar data to 16bit signed planar data. |
|
|
|
They scale 8bit unsigned planar data to 16bit signed planar data. |
|
|
|
Future >8bit per component inputs will need to add a new scaler here |
|
|
|
Future >8bit per component inputs will need to add a new scaler here |
|
|
|
that preserves the input precision. |
|
|
|
that preserves the input precision. |
|
|
|
|
|
|
|
|
|
|
|