⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yuvtorgbinit.h

📁 Freescale ARM11系列CPU MX31的WINCE 5.0下的BSP
💻 H
字号:
/*------------------------------------------------------------------------------
--                                                                            --
--       This software is confidential and proprietary and may be used        --
--         only as expressly authorized by a licensing agreement from         --
--                                                                            --
--                            Hantro Products Oy.                             --
--                                                                            --
--      In the event of publication, the following notice is applicable:      --
--                                                                            --
--                   (C) COPYRIGHT 2003 HANTRO PRODUCTS OY                    --
--                            ALL RIGHTS RESERVED                             --
--                                                                            --
--          The entire notice above must be reproduced on all copies.         --
--                                                                            --
--------------------------------------------------------------------------------
--
--  Abstract : YUV to RGB conversion initialization.
--
-------------------------------------------------------------------------------*/

#ifndef YUVTORGBINIT_H
#define YUVTORGBINIT_H


#include "basetype.h"


#ifdef __cplusplus
extern "C"
    {
#endif


/* Type for color conversion lookup table */
/* Note: 16-bit table uses 2,5kB of memory
 *       32-bit table uses 5kB of memory but may be faster 
 *              (depends on bus and processor) */
typedef i16 cct;


/* Enumeration for input YUV color space type */
typedef enum
{
    YUVTORGB_BT601_RANGE_0 = 0,   /* BT.601, YUV range 0 [16, 235] (H.263)   */
    YUVTORGB_BT601_RANGE_1 = 1,   /* BT.601, YUV range 1 [0, 255]            */
    YUVTORGB_BT709_RANGE_0 = 2,   /* BT.709, YUV range 0 [16, 235]           */
    YUVTORGB_BT709_RANGE_1 = 3    /* BT.709, YUV range 1 [0, 255]            */
} YuvType;


/* Color conversion lookup table size in bytes */
#define YUVTORGB_CCT_SIZE (sizeof(cct) * 1280)

/* Scaling bits for color conversion lookup table */
#define CCTSCALE 6

/* Indices in color conversion lookup table */
#define CCT_RV      256
#define CCT_GU      512
#define CCT_GV      768
#define CCT_BU     1024



/*  Color conversion initialization.

    Inputs:     table           pointer to lookup table,
                                    size is YUVTORGB_CCT_SIZE bytes
                yuvType         the type of the input YUV color space,
                                    defines the color conversion coefficients

    Returns:    0               success
                -1              error: null input pointer
                -2              error: invalid yuvType


*/
i32 YuvToRgbInit(cct * YUVTable, YuvType yuvType);

/* Color conversion helper function for calculating the processed area */
void YuvToRgbDimensions(i32 yuvWidth, i32 yuvHeight, i32 rgbWidth, 
        i32 rgbHeight, i32 xOffset, i32 yOffset, u32 * w, u32 * h);

#ifdef __cplusplus
    }
#endif


#endif /* YUVTORGBINIT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -