Changeset 29
- Timestamp:
- 01/26/08 00:40:52
(8 months ago)
- Author:
- sip
- Message:
Size check
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6 |
r29 |
|
| 16 | 16 | int FrameScaler::SetResize(int srcWidth,int srcHeight,int srcLineWidth,int dstWidth,int dstHeight,int dstLineWidth) |
|---|
| 17 | 17 | { |
|---|
| | 18 | // Check Size |
|---|
| | 19 | if (!srcWidth || !srcHeight || !srcLineWidth || !dstWidth || !dstHeight || !dstLineWidth) |
|---|
| | 20 | return 0; |
|---|
| | 21 | |
|---|
| 18 | 22 | // Check if we already have a scaler for this |
|---|
| 19 | 23 | if (resizeCtx && (resizeWidth==srcWidth) && (srcHeight==resizeHeight) && (dstWidth==resizeDstWidth) && (dstHeight==resizeDstHeight)) |
|---|
| … | … | |
| 53 | 57 | BYTE* dst[3]; |
|---|
| 54 | 58 | |
|---|
| | 59 | // Check |
|---|
| | 60 | if (!resizeCtx) |
|---|
| | 61 | //Error |
|---|
| | 62 | return 0; |
|---|
| | 63 | |
|---|
| 55 | 64 | // Set input picture data |
|---|
| 56 | 65 | int numPixels = resizeWidth*resizeHeight; |
|---|
Download in other formats:
|
|