178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/*
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License.
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */
170c1bc742181ded4930842b46e9507372f0b1b963James Dong/**
180c1bc742181ded4930842b46e9507372f0b1b963James Dong *
190c1bc742181ded4930842b46e9507372f0b1b963James Dong * File Name:  omxVCM4P2_DecodeBlockCoef_Intra.c
200c1bc742181ded4930842b46e9507372f0b1b963James Dong * OpenMAX DL: v1.0.2
210c1bc742181ded4930842b46e9507372f0b1b963James Dong * Revision:   9641
220c1bc742181ded4930842b46e9507372f0b1b963James Dong * Date:       Thursday, February 7, 2008
230c1bc742181ded4930842b46e9507372f0b1b963James Dong *
240c1bc742181ded4930842b46e9507372f0b1b963James Dong *
250c1bc742181ded4930842b46e9507372f0b1b963James Dong *
260c1bc742181ded4930842b46e9507372f0b1b963James Dong *
270c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description:
280c1bc742181ded4930842b46e9507372f0b1b963James Dong * Contains modules for intra reconstruction
290c1bc742181ded4930842b46e9507372f0b1b963James Dong *
300c1bc742181ded4930842b46e9507372f0b1b963James Dong */
310c1bc742181ded4930842b46e9507372f0b1b963James Dong
320c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxtypes.h"
330c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armOMX.h"
340c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxVC.h"
350c1bc742181ded4930842b46e9507372f0b1b963James Dong
360c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armCOMM.h"
370c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armVC.h"
380c1bc742181ded4930842b46e9507372f0b1b963James Dong
390c1bc742181ded4930842b46e9507372f0b1b963James Dong/**
400c1bc742181ded4930842b46e9507372f0b1b963James Dong * Function:  omxVCM4P2_DecodeBlockCoef_Intra   (6.2.5.4.1)
410c1bc742181ded4930842b46e9507372f0b1b963James Dong *
420c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description:
430c1bc742181ded4930842b46e9507372f0b1b963James Dong * Decodes the INTRA block coefficients. Inverse quantization, inversely
440c1bc742181ded4930842b46e9507372f0b1b963James Dong * zigzag positioning, and IDCT, with appropriate clipping on each step, are
450c1bc742181ded4930842b46e9507372f0b1b963James Dong * performed on the coefficients. The results are then placed in the output
460c1bc742181ded4930842b46e9507372f0b1b963James Dong * frame/plane on a pixel basis.  Note: This function will be used only when
470c1bc742181ded4930842b46e9507372f0b1b963James Dong * at least one non-zero AC coefficient of current block exists in the bit
480c1bc742181ded4930842b46e9507372f0b1b963James Dong * stream. The DC only condition will be handled in another function.
490c1bc742181ded4930842b46e9507372f0b1b963James Dong *
500c1bc742181ded4930842b46e9507372f0b1b963James Dong *
510c1bc742181ded4930842b46e9507372f0b1b963James Dong * Input Arguments:
520c1bc742181ded4930842b46e9507372f0b1b963James Dong *
530c1bc742181ded4930842b46e9507372f0b1b963James Dong *   ppBitStream - pointer to the pointer to the current byte in the bit
540c1bc742181ded4930842b46e9507372f0b1b963James Dong *            stream buffer. There is no boundary check for the bit stream
550c1bc742181ded4930842b46e9507372f0b1b963James Dong *            buffer.
560c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pBitOffset - pointer to the bit position in the byte pointed to by
570c1bc742181ded4930842b46e9507372f0b1b963James Dong *            *ppBitStream. *pBitOffset is valid within [0-7].
580c1bc742181ded4930842b46e9507372f0b1b963James Dong *   step - width of the destination plane
590c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pCoefBufRow - pointer to the coefficient row buffer; must be aligned on
600c1bc742181ded4930842b46e9507372f0b1b963James Dong *            an 8-byte boundary.
610c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pCoefBufCol - pointer to the coefficient column buffer; must be aligned
620c1bc742181ded4930842b46e9507372f0b1b963James Dong *            on an 8-byte boundary.
630c1bc742181ded4930842b46e9507372f0b1b963James Dong *   curQP - quantization parameter of the macroblock which the current block
640c1bc742181ded4930842b46e9507372f0b1b963James Dong *            belongs to
650c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pQPBuf - pointer to the quantization parameter buffer
660c1bc742181ded4930842b46e9507372f0b1b963James Dong *   blockIndex - block index indicating the component type and position as
670c1bc742181ded4930842b46e9507372f0b1b963James Dong *            defined in [ISO14496-2], subclause 6.1.3.8, Figure 6-5.
680c1bc742181ded4930842b46e9507372f0b1b963James Dong *   intraDCVLC - a code determined by intra_dc_vlc_thr and QP. This allows a
690c1bc742181ded4930842b46e9507372f0b1b963James Dong *            mechanism to switch between two VLC for coding of Intra DC
700c1bc742181ded4930842b46e9507372f0b1b963James Dong *            coefficients as per [ISO14496-2], Table 6-21.
710c1bc742181ded4930842b46e9507372f0b1b963James Dong *   ACPredFlag - a flag equal to ac_pred_flag (of luminance) indicating if
720c1bc742181ded4930842b46e9507372f0b1b963James Dong *            the ac coefficients of the first row or first column are
730c1bc742181ded4930842b46e9507372f0b1b963James Dong *            differentially coded for intra coded macroblock.
740c1bc742181ded4930842b46e9507372f0b1b963James Dong *   shortVideoHeader - binary flag indicating presence of
750c1bc742181ded4930842b46e9507372f0b1b963James Dong *            short_video_header; shortVideoHeader==1 selects linear intra DC
760c1bc742181ded4930842b46e9507372f0b1b963James Dong *            mode, and shortVideoHeader==0 selects non linear intra DC mode.
770c1bc742181ded4930842b46e9507372f0b1b963James Dong *
780c1bc742181ded4930842b46e9507372f0b1b963James Dong * Output Arguments:
790c1bc742181ded4930842b46e9507372f0b1b963James Dong *
800c1bc742181ded4930842b46e9507372f0b1b963James Dong *   ppBitStream - *ppBitStream is updated after the block is decoded, so
810c1bc742181ded4930842b46e9507372f0b1b963James Dong *            that it points to the current byte in the bit stream buffer
820c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pBitOffset - *pBitOffset is updated so that it points to the current bit
830c1bc742181ded4930842b46e9507372f0b1b963James Dong *            position in the byte pointed by *ppBitStream
840c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pDst - pointer to the block in the destination plane; must be aligned on
850c1bc742181ded4930842b46e9507372f0b1b963James Dong *            an 8-byte boundary.
860c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pCoefBufRow - pointer to the updated coefficient row buffer.
870c1bc742181ded4930842b46e9507372f0b1b963James Dong *   pCoefBufCol - pointer to the updated coefficient column buffer  Note:
880c1bc742181ded4930842b46e9507372f0b1b963James Dong *            The coefficient buffers must be updated in accordance with the
890c1bc742181ded4930842b46e9507372f0b1b963James Dong *            update procedure defined in section 6.2.2.
900c1bc742181ded4930842b46e9507372f0b1b963James Dong *
910c1bc742181ded4930842b46e9507372f0b1b963James Dong * Return Value:
920c1bc742181ded4930842b46e9507372f0b1b963James Dong *
930c1bc742181ded4930842b46e9507372f0b1b963James Dong *    OMX_Sts_NoErr - no error
940c1bc742181ded4930842b46e9507372f0b1b963James Dong *    OMX_Sts_BadArgErr - bad arguments, if:
950c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    At least one of the following pointers is NULL:
960c1bc742181ded4930842b46e9507372f0b1b963James Dong *         ppBitStream, *ppBitStream, pBitOffset, pCoefBufRow, pCoefBufCol,
970c1bc742181ded4930842b46e9507372f0b1b963James Dong *         pQPBuf, pDst.
980c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    *pBitOffset exceeds [0,7]
990c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    curQP exceeds (1, 31)
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    blockIndex exceeds [0,5]
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    step is not the multiple of 8
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong *    -    a pointer alignment requirement was violated.
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong *    OMX_Sts_Err - status error. Refer to OMX_Sts_Err of DecodeVLCZigzag_Intra.
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong *
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong */
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong
1070c1bc742181ded4930842b46e9507372f0b1b963James DongOMXResult omxVCM4P2_DecodeBlockCoef_Intra(
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong     const OMX_U8 ** ppBitStream,
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_INT *pBitOffset,
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_U8 *pDst,
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_INT step,
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S16 *pCoefBufRow,
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_S16 *pCoefBufCol,
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_U8 curQP,
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong     const OMX_U8 *pQPBuf,
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_INT blockIndex,
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_INT intraDCVLC,
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong     OMX_INT ACPredFlag,
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong	 OMX_INT shortVideoHeader
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong )
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong{
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMX_S16 tempBuf1[79], tempBuf2[79];
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMX_S16 *pTempBuf1, *pTempBuf2;
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMX_INT predDir, predACDir, i, j, count;
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMX_INT  predQP;
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMXVCM4P2VideoComponent videoComp;
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong    OMXResult errorCode;
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Argument error checks */
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(ppBitStream == NULL, OMX_Sts_BadArgErr);
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(*ppBitStream == NULL, OMX_Sts_BadArgErr);
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(pBitOffset == NULL, OMX_Sts_BadArgErr);
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(pDst == NULL, OMX_Sts_BadArgErr);
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(pCoefBufRow == NULL, OMX_Sts_BadArgErr);
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(pCoefBufCol == NULL, OMX_Sts_BadArgErr);
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(pQPBuf == NULL, OMX_Sts_BadArgErr);
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(!armIs8ByteAligned(pDst), OMX_Sts_BadArgErr);
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(((curQP <= 0) || (curQP >= 32)), OMX_Sts_BadArgErr);
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf((*pBitOffset < 0) || (*pBitOffset >7), OMX_Sts_BadArgErr);
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf((blockIndex < 0) || (blockIndex > 5), OMX_Sts_BadArgErr);
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf((step % 8) != 0, OMX_Sts_BadArgErr);
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Aligning the local buffers */
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong    pTempBuf1 = armAlignTo16Bytes(tempBuf1);
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong    pTempBuf2 = armAlignTo16Bytes(tempBuf2);
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Setting the AC prediction direction and prediction direction */
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong    armVCM4P2_SetPredDir(
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong        blockIndex,
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong        pCoefBufRow,
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong        pCoefBufCol,
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong        &predDir,
1540c1bc742181ded4930842b46e9507372f0b1b963James Dong        &predQP,
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong        pQPBuf);
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong    predACDir = predDir;
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetArgErrIf(((predQP <= 0) || (predQP >= 32)), OMX_Sts_BadArgErr);
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong    if (ACPredFlag == 0)
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong        predACDir = OMX_VC_NONE;
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Setting the videoComp */
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong    if (blockIndex <= 3)
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong        videoComp = OMX_VC_LUMINANCE;
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong    else
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong        videoComp = OMX_VC_CHROMINANCE;
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* VLD and zigzag */
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong    if (intraDCVLC == 1)
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong        errorCode = omxVCM4P2_DecodeVLCZigzag_IntraDCVLC(
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong            ppBitStream,
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong            pBitOffset,
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong            pTempBuf1,
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong            predACDir,
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong            shortVideoHeader,
1860c1bc742181ded4930842b46e9507372f0b1b963James Dong            videoComp);
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong        armRetDataErrIf((errorCode != OMX_Sts_NoErr), errorCode);
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong    else
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong        errorCode = omxVCM4P2_DecodeVLCZigzag_IntraACVLC(
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong            ppBitStream,
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong            pBitOffset,
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong            pTempBuf1,
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong            predACDir,
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong            shortVideoHeader);
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong        armRetDataErrIf((errorCode != OMX_Sts_NoErr), errorCode);
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong
2000c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* AC DC prediction */
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong    errorCode = omxVCM4P2_PredictReconCoefIntra(
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong        pTempBuf1,
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong        pCoefBufRow,
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong        pCoefBufCol,
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong        curQP,
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong        predQP,
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong        predDir,
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong        ACPredFlag,
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong        videoComp);
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetDataErrIf((errorCode != OMX_Sts_NoErr), errorCode);
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong
2120c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Dequantization */
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong    errorCode = omxVCM4P2_QuantInvIntra_I(
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong     pTempBuf1,
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong     curQP,
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong     videoComp,
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong     shortVideoHeader);
2180c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetDataErrIf((errorCode != OMX_Sts_NoErr), errorCode);
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Inverse transform */
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong    errorCode = omxVCM4P2_IDCT8x8blk (pTempBuf1, pTempBuf2);
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong    armRetDataErrIf((errorCode != OMX_Sts_NoErr), errorCode);
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong
2240c1bc742181ded4930842b46e9507372f0b1b963James Dong    /* Placing the linear array into the destination plane and clipping
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong       it to 0 to 255 */
2260c1bc742181ded4930842b46e9507372f0b1b963James Dong    for (j = 0, count = 0; j < 8; j++)
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong    {
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong        for(i = 0; i < 8; i++, count++)
2290c1bc742181ded4930842b46e9507372f0b1b963James Dong        {
2300c1bc742181ded4930842b46e9507372f0b1b963James Dong            pDst[i] = armClip (0, 255, pTempBuf2[count]);
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong        }
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong        pDst += step;
2330c1bc742181ded4930842b46e9507372f0b1b963James Dong    }
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong
2350c1bc742181ded4930842b46e9507372f0b1b963James Dong    return OMX_Sts_NoErr;
2360c1bc742181ded4930842b46e9507372f0b1b963James Dong}
2370c1bc742181ded4930842b46e9507372f0b1b963James Dong
2380c1bc742181ded4930842b46e9507372f0b1b963James Dong/* End of file */
2390c1bc742181ded4930842b46e9507372f0b1b963James Dong
2400c1bc742181ded4930842b46e9507372f0b1b963James Dong
241