00001 /*
00002 (C) 2000 Nemosoft Unv. nemosoft@smcc.demon.nl
00003
00004 This program is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation; either version 2 of the License, or
00007 (at your option) any later version.
00008
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00012 GNU General Public License for more details.
00013
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00017
00018 */
00019
00020 #ifndef CCVT_H
00021 #define CCVT_H
00022
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026
00027 /* Colour ConVerT: going from one colour space to another
00028
00029 Format descriptions:
00030 420i = "4:2:0 interlaced"
00031 YYYY UU YYYY UU even lines
00032 YYYY VV YYYY VV odd lines
00033 U/V data is subsampled by 2 both in horizontal
00034 and vertical directions, and intermixed with the Y values.
00035
00036 420p = "4:2:0 planar"
00037 YYYYYYYY N lines
00038 UUUU N/2 lines
00039 VVVV N/2 lines
00040 U/V is again subsampled, but all the Ys, Us and Vs are placed
00041 together in separate buffers. The buffers may be placed in
00042 one piece of contiguous memory though, with Y buffer first,
00043 followed by U, followed by V.
00044
00045 yuyv = "4:2:2 interlaced"
00046 YUYV YUYV YUYV ... N lines
00047 The U/V data is subsampled by 2 in horizontal direction only.
00048
00049 bgr24 = 3 bytes per pixel, in the order Blue Green Red (whoever came up
00050 with that idea...)
00051 rgb24 = 3 bytes per pixel, in the order Red Green Blue (which is sensible)
00052 rgb32 = 4 bytes per pixel, in the order Red Green Blue Alpha, with
00053 Alpha really being a filler byte (0)
00054 bgr32 = last but not least, 4 bytes per pixel, in the order Blue Green Red
00055 Alpha, Alpha again a filler byte (0)
00056 */
00057
00058 /* Functions in ccvt_i386.S/ccvt_c.c */
00059 /* 4:2:0 YUV interlaced to RGB/BGR */
00060 void ccvt_420i_bgr24(int width, int height, void *src, void *dst);
00061 void ccvt_420i_rgb24(int width, int height, void *src, void *dst);
00062 void ccvt_420i_bgr32(int width, int height, void *src, void *dst);
00063 void ccvt_420i_rgb32(int width, int height, void *src, void *dst);
00064
00065 /* 4:2:2 YUYV interlaced to RGB/BGR */
00066 void ccvt_yuyv_rgb32(int width, int height, void *src, void *dst);
00067 void ccvt_yuyv_bgr32(int width, int height, void *src, void *dst);
00068
00069 /* 4:2:0 YUV planar to RGB/BGR */
00070 void ccvt_420p_rgb32(int width, int height, void *srcy, void *srcu, void *srcv, void *dst);
00071 void ccvt_420p_bgr32(int width, int height, void *srcy, void *srcu, void *srcv, void *dst);
00072
00073 /* RGB/BGR to 4:2:0 YUV interlaced */
00074
00075 /* RGB/BGR to 4:2:0 YUV planar */
00076 void ccvt_rgb24_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv);
00077 void ccvt_bgr24_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv);
00078
00079 /* Go from 420i to other yuv formats */
00080 void ccvt_420i_420p(int width, int height, void *src, void *dsty, void *dstu, void *dstv);
00081 void ccvt_420i_yuyv(int width, int height, void *src, void *dst);
00082
00083 #ifdef __cplusplus
00084 }
00085 #endif
00086
00087 #endif
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001