| 1 | /*
|
|---|
| 2 | (C) 2001 Nemosoft Unv. <nemosoft@smcc.demon.nl>
|
|---|
| 3 |
|
|---|
| 4 | This program is free software; you can redistribute it and/or modify
|
|---|
| 5 | it under the terms of the GNU General Public License as published by
|
|---|
| 6 | the Free Software Foundation; either version 2 of the License, or
|
|---|
| 7 | (at your option) any later version.
|
|---|
| 8 |
|
|---|
| 9 | This program is distributed in the hope that it will be useful,
|
|---|
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 12 | GNU General Public License for more details.
|
|---|
| 13 |
|
|---|
| 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
|
|---|
| 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|---|
| 17 |
|
|---|
| 18 | */
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | /* 'Viewport' conversion routines. These functions convert from one colour
|
|---|
| 22 | space to another, taking into account that the source image has a smaller
|
|---|
| 23 | size than the view, and is placed inside the view:
|
|---|
| 24 |
|
|---|
| 25 | +-------view.x------------+
|
|---|
| 26 | | |
|
|---|
| 27 | | +---image.x---+ |
|
|---|
| 28 | | | | |
|
|---|
| 29 | | | | |
|
|---|
| 30 | | +-------------+ |
|
|---|
| 31 | | |
|
|---|
| 32 | +-------------------------+
|
|---|
| 33 |
|
|---|
| 34 | The image should always be smaller than the view. The offset (top-left
|
|---|
| 35 | corner of the image) should be precomputed, so you can place the image
|
|---|
| 36 | anywhere in the view.
|
|---|
| 37 |
|
|---|
| 38 | The functions take these parameters:
|
|---|
| 39 | - width image width (in pixels)
|
|---|
| 40 | - height image height (in pixels)
|
|---|
| 41 | - plus view width (in pixels)
|
|---|
| 42 | *src pointer at start of image
|
|---|
| 43 | *dst pointer at offset (!) in view
|
|---|
| 44 | */
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 | #ifndef VCVT_H
|
|---|
| 48 | #define VCVT_H
|
|---|
| 49 |
|
|---|
| 50 | #ifdef __cplusplus
|
|---|
| 51 | extern "C" {
|
|---|
| 52 | #endif
|
|---|
| 53 |
|
|---|
| 54 | /* Functions in vcvt_i386.S/vcvt_c.c */
|
|---|
| 55 | /* 4:2:0 YUV interlaced to RGB/BGR */
|
|---|
| 56 | void vcvt_420i_bgr24(int width, int height, int plus, void *src, void *dst);
|
|---|
| 57 | void vcvt_420i_rgb24(int width, int height, int plus, void *src, void *dst);
|
|---|
| 58 | void vcvt_420i_bgr32(int width, int height, int plus, void *src, void *dst);
|
|---|
| 59 | void vcvt_420i_rgb32(int width, int height, int plus, void *src, void *dst);
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | /* Go from 420i to other yuv formats */
|
|---|
| 63 | void vcvt_420i_420p(int width, int height, int plus, void *src, void *dsty, void *dstu, void *dstv);
|
|---|
| 64 | void vcvt_420i_yuyv(int width, int height, int plus, void *src, void *dst);
|
|---|
| 65 |
|
|---|
| 66 | #if 0
|
|---|
| 67 | #endif
|
|---|
| 68 |
|
|---|
| 69 | #ifdef __cplusplus
|
|---|
| 70 | }
|
|---|
| 71 | #endif
|
|---|
| 72 |
|
|---|
| 73 | #endif
|
|---|