Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 204 | chris | 1 | /* |
| 2 | (C) 2000 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
| 17 | |||
| 18 | */ |
||
| 19 | |||
| 20 | #ifndef CCVT_H |
||
| 21 | #define CCVT_H |
||
| 22 | |||
| 23 | #ifdef __cplusplus |
||
| 24 | extern "C" { |
||
| 25 | #endif |
||
| 26 | |||
| 27 | /* Colour ConVerT: going from one colour space to another |
||
| 28 | |||
| 29 | Format descriptions: |
||
| 30 | 420i = "4:2:0 interlaced" |
||
| 31 | YYYY UU YYYY UU even lines |
||
| 32 | YYYY VV YYYY VV odd lines |
||
| 33 | U/V data is subsampled by 2 both in horizontal |
||
| 34 | and vertical directions, and intermixed with the Y values. |
||
| 35 | |||
| 36 | 420p = "4:2:0 planar" |
||
| 37 | YYYYYYYY N lines |
||
| 38 | UUUU N/2 lines |
||
| 39 | VVVV N/2 lines |
||
| 40 | U/V is again subsampled, but all the Ys, Us and Vs are placed |
||
| 41 | together in separate buffers. The buffers may be placed in |
||
| 42 | one piece of contiguous memory though, with Y buffer first, |
||
| 43 | followed by U, followed by V. |
||
| 44 | |||
| 45 | yuyv = "4:2:2 interlaced" |
||
| 46 | YUYV YUYV YUYV ... N lines |
||
| 47 | The U/V data is subsampled by 2 in horizontal direction only. |
||
| 48 | |||
| 49 | bgr24 = 3 bytes per pixel, in the order Blue Green Red (whoever came up |
||
| 50 | with that idea...) |
||
| 51 | rgb24 = 3 bytes per pixel, in the order Red Green Blue (which is sensible) |
||
| 52 | rgb32 = 4 bytes per pixel, in the order Red Green Blue Alpha, with |
||
| 53 | Alpha really being a filler byte (0) |
||
| 54 | bgr32 = last but not least, 4 bytes per pixel, in the order Blue Green Red |
||
| 55 | Alpha, Alpha again a filler byte (0) |
||
| 56 | */ |
||
| 57 | |||
| 58 | /* Functions in ccvt_i386.S/ccvt_c.c */ |
||
| 59 | /* 4:2:0 YUV interlaced to RGB/BGR */ |
||
| 60 | void ccvt_420i_bgr24(int width, int height, void *src, void *dst); |
||
| 61 | void ccvt_420i_rgb24(int width, int height, void *src, void *dst); |
||
| 62 | void ccvt_420i_bgr32(int width, int height, void *src, void *dst); |
||
| 63 | void ccvt_420i_rgb32(int width, int height, void *src, void *dst); |
||
| 64 | |||
| 65 | /* 4:2:2 YUYV interlaced to RGB/BGR */ |
||
| 66 | void ccvt_yuyv_rgb32(int width, int height, void *src, void *dst); |
||
| 67 | void ccvt_yuyv_bgr32(int width, int height, void *src, void *dst); |
||
| 68 | |||
| 69 | /* 4:2:0 YUV planar to RGB/BGR */ |
||
| 70 | void ccvt_420p_rgb32(int width, int height, void *srcy, void *srcu, void *srcv, void *dst); |
||
| 71 | void ccvt_420p_bgr32(int width, int height, void *srcy, void *srcu, void *srcv, void *dst); |
||
| 72 | void ccvt_420p_rgb24(int width, int height, void *srcy, void *srcu, void *srcv, void *dst); |
||
| 73 | void ccvt_420p_bgr24(int width, int height, void *srcy, void *srcu, void *srcv, void *dst); |
||
| 74 | |||
| 75 | /* RGB/BGR to 4:2:0 YUV interlaced */ |
||
| 76 | |||
| 77 | /* RGB/BGR to 4:2:0 YUV planar */ |
||
| 78 | void ccvt_rgb24_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv); |
||
| 79 | void ccvt_bgr24_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv); |
||
| 80 | |||
| 81 | /* Go from 420i to other yuv formats */ |
||
| 82 | void ccvt_420i_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv); |
||
| 83 | void ccvt_420i_yuyv(int width, int height, void *src, void *dst); |
||
| 84 | |||
| 85 | #ifdef __cplusplus |
||
| 86 | } |
||
| 87 | #endif |
||
| 88 | |||
| 89 | #endif |