00001 /* 00002 * ARM assembly optimized color format conversion functions 00003 * (YV12 -> YUY2, YV12 -> some custom YUV420 format used by 00004 * Epson graphics chip in Nokia N800) 00005 * 00006 * Copyright (C) 2007 Siarhei Siamashka <ssvb@users.sourceforge.net> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * version 2.1 as published by the Free Software Foundation. 00011 * 00012 * This library is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00020 * 02110-1301 USA 00021 */ 00022 00023 #ifndef __ARM_COLORCONV_H__ 00024 #define __ARM_COLORCONV_H__ 00025 00026 #include <stdint.h> 00027 00028 /** 00029 * Convert a line of pixels from YV12 to YUY2 color format 00030 * @param dst - destination buffer for YUY2 pixel data, it should be 32-bit aligned 00031 * @param src_y - pointer to Y plane 00032 * @param src_u - pointer to U plane 00033 * @param src_v - pointer to V plane 00034 * @param w - number of pixels to convert (should be multiple of 2) 00035 */ 00036 void yv12_to_yuy2_line_arm(uint32_t *dst, const uint16_t *src_y, const uint8_t *src_u, const uint8_t *src_v, int w); 00037 00038 /** 00039 * Convert a line of pixels from YV12 to YUV420 color format 00040 * @param dst - destination buffer for YUV420 pixel data, it should be at least 16-bit aligned 00041 * @param src_y - pointer to Y plane 00042 * @param src_c - pointer to chroma plane (U for even lines, V for odd lines) 00043 * @param w - number of pixels to convert (should be multiple of 4) 00044 */ 00045 void yv12_to_yuv420_line_arm(uint16_t *dst, const uint8_t *src_y, const uint8_t *src_c, int w); 00046 00047 /** 00048 * Convert a line of pixels from YV12 to YUV420 color format 00049 * @param dst - destination buffer for YUV420 pixel data, it should be at least 16-bit aligned 00050 * @param src_y - pointer to Y plane 00051 * @param src_c - pointer to chroma plane (U for even lines, V for odd lines) 00052 * @param w - number of pixels to convert (should be multiple of 4) 00053 */ 00054 void yv12_to_yuv420_line_armv5(uint16_t *dst, const uint8_t *src_y, const uint8_t *src_c, int w); 00055 00056 /** 00057 * Convert a line of pixels from YV12 to YUV420 color format 00058 * @param dst - destination buffer for YUV420 pixel data, it should be at least 16-bit aligned 00059 * @param src_y - pointer to Y plane, it should be 16-bit aligned 00060 * @param src_c - pointer to chroma plane (U for even lines, V for odd lines) 00061 * @param w - number of pixels to convert (should be multiple of 4) 00062 */ 00063 void yv12_to_yuv420_line_armv6(uint16_t *dst, const uint16_t *src_y, const uint8_t *src_c, int w); 00064 00065 #endif
1.5.6