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

📄 omxipcs_ycbcr444tobgr888_u8_c3r.c

📁 The OpenMAX DL (Development Layer) APIs contain a comprehensive set of audio, video, signal processi
💻 C
字号:
/** * *  * File Name:  omxIPCS_YCbCr444ToBGR888_U8_C3R.c * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * * Description  : Colour Conversion Routine - YUV444 to BGR888 in floating point. *                Both source and destination images are three-channel format. * */#include "omxtypes.h"#include "armOMX.h"#include "omxIP.h"#include "armCOMM.h"#include "armIP.h"/** * Function:  omxIPCS_YCbCr444ToBGR888_U8_C3R   (4.4.3.1.2) * * Description: * Converts a pixel-oriented YCbCr444 image to BGR888 or BGR565 color space.   * The ROI of the source image is pointed to by pSrc, and the result is placed  * into the ROI of the destination image pointed to by pDst. The input and  * output images are organized, respectively, as specified by the Table 4-1  * entries labeled  YCbCr444  and  BGR888 / BGR565.   * * Input Arguments: *    *   pSrc - pointer to the source ROI  *   srcStep - distance in bytes between the starts of consecutive lines in  *            the source image  *   dstStep - distance in bytes between the starts of consecutive lines in  *            the destination image  *   roiSize - size of the source and destination ROI in pixels  * * Output Arguments: *    *   pDst - pointer to the destination ROI  * * Return Value: *     *    OMX_Sts_NoErr - no error  *    OMX_Sts_BadArgErr - bad arguments detected; at least one of the  *              following is true:  *    -   pSrc or pDst is NULL  *    -   srcStep/3 < roiSize.width  *    -   omxIPCS_YCbCr444ToBGR888_U8_C3R() only: dstStep/3 < roiSize.width  *    -   omxIPCS_YCbCr444ToBGR565_U8_U16_C3R() only: dstStep/2 < roiSize.width  *    -   roiSize has a field with zero or negative value  * */ OMXResult omxIPCS_YCbCr444ToBGR888_U8_C3R(        const OMX_U8 *pSrc,        OMX_INT srcStep,        OMX_U8 *pDst,        OMX_INT dstStep,        OMXSize roiSize       ){    OMX_INT convWidth   = 3 * roiSize.width; /* convWidth is the bytes to read */    OMX_INT convHeight  = roiSize.height;    OMX_U8  Ydata, Udata, Vdata;    OMX_INT i, j;        armRetArgErrIf(!pSrc, OMX_Sts_BadArgErr);    armRetArgErrIf(!pDst, OMX_Sts_BadArgErr);    armRetArgErrIf(srcStep <= 0, OMX_Sts_BadArgErr);    armRetArgErrIf(dstStep <= 0, OMX_Sts_BadArgErr);    armRetArgErrIf(roiSize.width <= 0, OMX_Sts_BadArgErr);    armRetArgErrIf(roiSize.height <= 0, OMX_Sts_BadArgErr);    armRetArgErrIf(srcStep/3 < roiSize.width, OMX_Sts_BadArgErr);    armRetArgErrIf(dstStep/3 < roiSize.width, OMX_Sts_BadArgErr);    for(i=0; i<convHeight; i++, pSrc+=srcStep, pDst+=dstStep)    {        for(j=0; j<convWidth; j+=3)        {            Ydata = pSrc[j];            Udata = pSrc[j+1];            Vdata = pSrc[j+2];            armIPCS_ComputeRGBFromYUV_F32_U8(Ydata, Udata, Vdata, &pDst[j+2], &pDst[j+1], &pDst[j]);        }    }    return OMX_Sts_NoErr;}/* End of file */

⌨️ 快捷键说明

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