10c1bc742181ded4930842b46e9507372f0b1b963James Dong/** 20c1bc742181ded4930842b46e9507372f0b1b963James Dong * 30c1bc742181ded4930842b46e9507372f0b1b963James Dong * File Name: omxVCM4P2_TransRecBlockCoef_intra.c 40c1bc742181ded4930842b46e9507372f0b1b963James Dong * OpenMAX DL: v1.0.2 50c1bc742181ded4930842b46e9507372f0b1b963James Dong * Revision: 9641 60c1bc742181ded4930842b46e9507372f0b1b963James Dong * Date: Thursday, February 7, 2008 70c1bc742181ded4930842b46e9507372f0b1b963James Dong * 80c1bc742181ded4930842b46e9507372f0b1b963James Dong * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. 90c1bc742181ded4930842b46e9507372f0b1b963James Dong * 100c1bc742181ded4930842b46e9507372f0b1b963James Dong * 110c1bc742181ded4930842b46e9507372f0b1b963James Dong * 120c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description: 130c1bc742181ded4930842b46e9507372f0b1b963James Dong * Contains modules DCT->quant and reconstructing the intra texture data 140c1bc742181ded4930842b46e9507372f0b1b963James Dong * 150c1bc742181ded4930842b46e9507372f0b1b963James Dong */ 160c1bc742181ded4930842b46e9507372f0b1b963James Dong 170c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxtypes.h" 180c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armOMX.h" 190c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "omxVC.h" 200c1bc742181ded4930842b46e9507372f0b1b963James Dong 210c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armCOMM.h" 220c1bc742181ded4930842b46e9507372f0b1b963James Dong#include "armVC.h" 230c1bc742181ded4930842b46e9507372f0b1b963James Dong 240c1bc742181ded4930842b46e9507372f0b1b963James Dong 250c1bc742181ded4930842b46e9507372f0b1b963James Dong/** 260c1bc742181ded4930842b46e9507372f0b1b963James Dong * Function: omxVCM4P2_TransRecBlockCoef_intra (6.2.4.4.4) 270c1bc742181ded4930842b46e9507372f0b1b963James Dong * 280c1bc742181ded4930842b46e9507372f0b1b963James Dong * Description: 290c1bc742181ded4930842b46e9507372f0b1b963James Dong * Quantizes the DCT coefficients, implements intra block AC/DC coefficient 300c1bc742181ded4930842b46e9507372f0b1b963James Dong * prediction, and reconstructs the current intra block texture for prediction 310c1bc742181ded4930842b46e9507372f0b1b963James Dong * on the next frame. Quantized row and column coefficients are returned in 320c1bc742181ded4930842b46e9507372f0b1b963James Dong * the updated coefficient buffers. 330c1bc742181ded4930842b46e9507372f0b1b963James Dong * 340c1bc742181ded4930842b46e9507372f0b1b963James Dong * Input Arguments: 350c1bc742181ded4930842b46e9507372f0b1b963James Dong * 360c1bc742181ded4930842b46e9507372f0b1b963James Dong * pSrc - pointer to the pixels of current intra block; must be aligned on 370c1bc742181ded4930842b46e9507372f0b1b963James Dong * an 8-byte boundary. 380c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPredBufRow - pointer to the coefficient row buffer containing 390c1bc742181ded4930842b46e9507372f0b1b963James Dong * ((num_mb_per_row * 2 + 1) * 8) elements of type OMX_S16. 400c1bc742181ded4930842b46e9507372f0b1b963James Dong * Coefficients are organized into blocks of eight as described 410c1bc742181ded4930842b46e9507372f0b1b963James Dong * below (Internal Prediction Coefficient Update Procedures). The 420c1bc742181ded4930842b46e9507372f0b1b963James Dong * DC coefficient is first, and the remaining buffer locations 430c1bc742181ded4930842b46e9507372f0b1b963James Dong * contain the quantized AC coefficients. Each group of eight row 440c1bc742181ded4930842b46e9507372f0b1b963James Dong * buffer elements combined with one element eight elements ahead 450c1bc742181ded4930842b46e9507372f0b1b963James Dong * contains the coefficient predictors of the neighboring block 460c1bc742181ded4930842b46e9507372f0b1b963James Dong * that is spatially above or to the left of the block currently to 470c1bc742181ded4930842b46e9507372f0b1b963James Dong * be decoded. A negative-valued DC coefficient indicates that this 480c1bc742181ded4930842b46e9507372f0b1b963James Dong * neighboring block is not INTRA-coded or out of bounds, and 490c1bc742181ded4930842b46e9507372f0b1b963James Dong * therefore the AC and DC coefficients are invalid. Pointer must 500c1bc742181ded4930842b46e9507372f0b1b963James Dong * be aligned on an 8-byte boundary. 510c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPredBufCol - pointer to the prediction coefficient column buffer 520c1bc742181ded4930842b46e9507372f0b1b963James Dong * containing 16 elements of type OMX_S16. Coefficients are 530c1bc742181ded4930842b46e9507372f0b1b963James Dong * organized as described in section 6.2.2.5. Pointer must be 540c1bc742181ded4930842b46e9507372f0b1b963James Dong * aligned on an 8-byte boundary. 550c1bc742181ded4930842b46e9507372f0b1b963James Dong * pSumErr - pointer to a flag indicating whether or not AC prediction is 560c1bc742181ded4930842b46e9507372f0b1b963James Dong * required; AC prediction is enabled if *pSumErr >=0, but the 570c1bc742181ded4930842b46e9507372f0b1b963James Dong * value is not used for coefficient prediction, i.e., the sum of 580c1bc742181ded4930842b46e9507372f0b1b963James Dong * absolute differences starts from 0 for each call to this 590c1bc742181ded4930842b46e9507372f0b1b963James Dong * function. Otherwise AC prediction is disabled if *pSumErr < 0 . 600c1bc742181ded4930842b46e9507372f0b1b963James Dong * blockIndex - block index indicating the component type and position, as 610c1bc742181ded4930842b46e9507372f0b1b963James Dong * defined in [ISO14496-2], subclause 6.1.3.8. 620c1bc742181ded4930842b46e9507372f0b1b963James Dong * curQp - quantization parameter of the macroblock to which the current 630c1bc742181ded4930842b46e9507372f0b1b963James Dong * block belongs 640c1bc742181ded4930842b46e9507372f0b1b963James Dong * pQpBuf - pointer to a 2-element quantization parameter buffer; pQpBuf[0] 650c1bc742181ded4930842b46e9507372f0b1b963James Dong * contains the quantization parameter associated with the 8x8 660c1bc742181ded4930842b46e9507372f0b1b963James Dong * block left of the current block (QPa), and pQpBuf[1] contains 670c1bc742181ded4930842b46e9507372f0b1b963James Dong * the quantization parameter associated with the 8x8 block above 680c1bc742181ded4930842b46e9507372f0b1b963James Dong * the current block (QPc). In the event that the corresponding 690c1bc742181ded4930842b46e9507372f0b1b963James Dong * block is outside of the VOP bound, the Qp value will not affect 700c1bc742181ded4930842b46e9507372f0b1b963James Dong * the intra prediction process, as described in [ISO14496-2], 710c1bc742181ded4930842b46e9507372f0b1b963James Dong * sub-clause 7.4.3.3, Adaptive AC Coefficient Prediction. 720c1bc742181ded4930842b46e9507372f0b1b963James Dong * srcStep - width of the source buffer; must be a multiple of 8. 730c1bc742181ded4930842b46e9507372f0b1b963James Dong * dstStep - width of the reconstructed destination buffer; must be a 740c1bc742181ded4930842b46e9507372f0b1b963James Dong * multiple of 16. 750c1bc742181ded4930842b46e9507372f0b1b963James Dong * shortVideoHeader - binary flag indicating presence of 760c1bc742181ded4930842b46e9507372f0b1b963James Dong * short_video_header; shortVideoHeader==1 selects linear intra DC 770c1bc742181ded4930842b46e9507372f0b1b963James Dong * mode, and shortVideoHeader==0 selects non linear intra DC mode. 780c1bc742181ded4930842b46e9507372f0b1b963James Dong * 790c1bc742181ded4930842b46e9507372f0b1b963James Dong * Output Arguments: 800c1bc742181ded4930842b46e9507372f0b1b963James Dong * 810c1bc742181ded4930842b46e9507372f0b1b963James Dong * pDst - pointer to the quantized DCT coefficient buffer; pDst[0] contains 820c1bc742181ded4930842b46e9507372f0b1b963James Dong * the predicted DC coefficient; the remaining entries contain the 830c1bc742181ded4930842b46e9507372f0b1b963James Dong * quantized AC coefficients (without prediction). The pointer 840c1bc742181ded4930842b46e9507372f0b1b963James Dong * pDstmust be aligned on a 16-byte boundary. 850c1bc742181ded4930842b46e9507372f0b1b963James Dong * pRec - pointer to the reconstructed texture; must be aligned on an 860c1bc742181ded4930842b46e9507372f0b1b963James Dong * 8-byte boundary. 870c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPredBufRow - pointer to the updated coefficient row buffer 880c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPredBufCol - pointer to the updated coefficient column buffer 890c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPreACPredict - if prediction is enabled, the parameter points to the 900c1bc742181ded4930842b46e9507372f0b1b963James Dong * start of the buffer containing the coefficient differences for 910c1bc742181ded4930842b46e9507372f0b1b963James Dong * VLC encoding. The entry pPreACPredict[0]indicates prediction 920c1bc742181ded4930842b46e9507372f0b1b963James Dong * direction for the current block and takes one of the following 930c1bc742181ded4930842b46e9507372f0b1b963James Dong * values: OMX_VC_NONE (prediction disabled), OMX_VC_HORIZONTAL, or 940c1bc742181ded4930842b46e9507372f0b1b963James Dong * OMX_VC_VERTICAL. The entries 950c1bc742181ded4930842b46e9507372f0b1b963James Dong * pPreACPredict[1]-pPreACPredict[7]contain predicted AC 960c1bc742181ded4930842b46e9507372f0b1b963James Dong * coefficients. If prediction is disabled (*pSumErr<0) then the 970c1bc742181ded4930842b46e9507372f0b1b963James Dong * contents of this buffer are undefined upon return from the 980c1bc742181ded4930842b46e9507372f0b1b963James Dong * function 990c1bc742181ded4930842b46e9507372f0b1b963James Dong * pSumErr - pointer to the value of the accumulated AC coefficient errors, 1000c1bc742181ded4930842b46e9507372f0b1b963James Dong * i.e., sum of the absolute differences between predicted and 1010c1bc742181ded4930842b46e9507372f0b1b963James Dong * unpredicted AC coefficients 1020c1bc742181ded4930842b46e9507372f0b1b963James Dong * 1030c1bc742181ded4930842b46e9507372f0b1b963James Dong * Return Value: 1040c1bc742181ded4930842b46e9507372f0b1b963James Dong * 1050c1bc742181ded4930842b46e9507372f0b1b963James Dong * OMX_Sts_NoErr - no error 1060c1bc742181ded4930842b46e9507372f0b1b963James Dong * OMX_Sts_BadArgErr - Bad arguments: 1070c1bc742181ded4930842b46e9507372f0b1b963James Dong * - At least one of the following pointers is NULL: pSrc, pDst, pRec, 1080c1bc742181ded4930842b46e9507372f0b1b963James Dong * pCoefBufRow, pCoefBufCol, pQpBuf, pPreACPredict, pSumErr. 1090c1bc742181ded4930842b46e9507372f0b1b963James Dong * - blockIndex < 0 or blockIndex >= 10; 1100c1bc742181ded4930842b46e9507372f0b1b963James Dong * - curQP <= 0 or curQP >= 32. 1110c1bc742181ded4930842b46e9507372f0b1b963James Dong * - srcStep, or dstStep <= 0 or not a multiple of 8. 1120c1bc742181ded4930842b46e9507372f0b1b963James Dong * - pDst is not 16-byte aligned: . 1130c1bc742181ded4930842b46e9507372f0b1b963James Dong * - At least one of the following pointers is not 8-byte aligned: 1140c1bc742181ded4930842b46e9507372f0b1b963James Dong * pSrc, pRec. 1150c1bc742181ded4930842b46e9507372f0b1b963James Dong * 1160c1bc742181ded4930842b46e9507372f0b1b963James Dong * Note: The coefficient buffers must be updated in accordance with the 1170c1bc742181ded4930842b46e9507372f0b1b963James Dong * update procedures defined in section in 6.2.2. 1180c1bc742181ded4930842b46e9507372f0b1b963James Dong * 1190c1bc742181ded4930842b46e9507372f0b1b963James Dong */ 1200c1bc742181ded4930842b46e9507372f0b1b963James Dong 1210c1bc742181ded4930842b46e9507372f0b1b963James DongOMXResult omxVCM4P2_TransRecBlockCoef_intra( 1220c1bc742181ded4930842b46e9507372f0b1b963James Dong const OMX_U8 *pSrc, 1230c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 * pDst, 1240c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_U8 * pRec, 1250c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 *pPredBufRow, 1260c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 *pPredBufCol, 1270c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 * pPreACPredict, 1280c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT *pSumErr, 1290c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT blockIndex, 1300c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_U8 curQp, 1310c1bc742181ded4930842b46e9507372f0b1b963James Dong const OMX_U8 *pQpBuf, 1320c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT srcStep, 1330c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT dstStep, 1340c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT shortVideoHeader 1350c1bc742181ded4930842b46e9507372f0b1b963James Dong) 1360c1bc742181ded4930842b46e9507372f0b1b963James Dong{ 1370c1bc742181ded4930842b46e9507372f0b1b963James Dong /* 64 elements are needed but to align it to 16 bytes need 1380c1bc742181ded4930842b46e9507372f0b1b963James Dong 8 more elements of padding */ 1390c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 tempBuf1[79], tempBuf2[79]; 1400c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 tempBuf3[79]; 1410c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_S16 *pTempBuf1, *pTempBuf2,*pTempBuf3; 1420c1bc742181ded4930842b46e9507372f0b1b963James Dong OMXVCM4P2VideoComponent videoComp; 1430c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_U8 flag; 1440c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT x, y, count, predDir; 1450c1bc742181ded4930842b46e9507372f0b1b963James Dong OMX_INT predQP, ACPredFlag; 1460c1bc742181ded4930842b46e9507372f0b1b963James Dong 1470c1bc742181ded4930842b46e9507372f0b1b963James Dong 1480c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Aligning the local buffers */ 1490c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf1 = armAlignTo16Bytes(tempBuf1); 1500c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf2 = armAlignTo16Bytes(tempBuf2); 1510c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf3 = armAlignTo16Bytes(tempBuf3); 1520c1bc742181ded4930842b46e9507372f0b1b963James Dong 1530c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Argument error checks */ 1540c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pSrc == NULL, OMX_Sts_BadArgErr); 1550c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pRec == NULL, OMX_Sts_BadArgErr); 1560c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pDst == NULL, OMX_Sts_BadArgErr); 1570c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(!armIs8ByteAligned(pSrc), OMX_Sts_BadArgErr); 1580c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(!armIs8ByteAligned(pRec), OMX_Sts_BadArgErr); 1590c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(!armIs16ByteAligned(pDst), OMX_Sts_BadArgErr); 1600c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pPredBufRow == NULL, OMX_Sts_BadArgErr); 1610c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pPredBufCol == NULL, OMX_Sts_BadArgErr); 1620c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pPreACPredict == NULL, OMX_Sts_BadArgErr); 1630c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pSumErr == NULL, OMX_Sts_BadArgErr); 1640c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf(pQpBuf == NULL, OMX_Sts_BadArgErr); 1650c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf((srcStep <= 0) || (dstStep <= 0) || 1660c1bc742181ded4930842b46e9507372f0b1b963James Dong (dstStep & 7) || (srcStep & 7) 1670c1bc742181ded4930842b46e9507372f0b1b963James Dong , OMX_Sts_BadArgErr); 1680c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf((blockIndex < 0) || (blockIndex > 9), OMX_Sts_BadArgErr); 1690c1bc742181ded4930842b46e9507372f0b1b963James Dong 1700c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetArgErrIf((curQp <= 0) || (curQp >=32), OMX_Sts_BadArgErr); 1710c1bc742181ded4930842b46e9507372f0b1b963James Dong 1720c1bc742181ded4930842b46e9507372f0b1b963James Dong 1730c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Setting the videoComp */ 1740c1bc742181ded4930842b46e9507372f0b1b963James Dong if (blockIndex <= 3) 1750c1bc742181ded4930842b46e9507372f0b1b963James Dong { 1760c1bc742181ded4930842b46e9507372f0b1b963James Dong videoComp = OMX_VC_LUMINANCE; 1770c1bc742181ded4930842b46e9507372f0b1b963James Dong } 1780c1bc742181ded4930842b46e9507372f0b1b963James Dong else 1790c1bc742181ded4930842b46e9507372f0b1b963James Dong { 1800c1bc742181ded4930842b46e9507372f0b1b963James Dong videoComp = OMX_VC_CHROMINANCE; 1810c1bc742181ded4930842b46e9507372f0b1b963James Dong } 1820c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Converting from 2-d to 1-d buffer */ 1830c1bc742181ded4930842b46e9507372f0b1b963James Dong for (y = 0, count = 0; y < 8; y++) 1840c1bc742181ded4930842b46e9507372f0b1b963James Dong { 1850c1bc742181ded4930842b46e9507372f0b1b963James Dong for(x= 0; x < 8; x++, count++) 1860c1bc742181ded4930842b46e9507372f0b1b963James Dong { 1870c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf1[count] = pSrc[(y*srcStep) + x]; 1880c1bc742181ded4930842b46e9507372f0b1b963James Dong } 1890c1bc742181ded4930842b46e9507372f0b1b963James Dong } 1900c1bc742181ded4930842b46e9507372f0b1b963James Dong 1910c1bc742181ded4930842b46e9507372f0b1b963James Dong omxVCM4P2_DCT8x8blk (pTempBuf1, pTempBuf2); 1920c1bc742181ded4930842b46e9507372f0b1b963James Dong omxVCM4P2_QuantIntra_I( 1930c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf2, 1940c1bc742181ded4930842b46e9507372f0b1b963James Dong curQp, 1950c1bc742181ded4930842b46e9507372f0b1b963James Dong blockIndex, 1960c1bc742181ded4930842b46e9507372f0b1b963James Dong shortVideoHeader); 1970c1bc742181ded4930842b46e9507372f0b1b963James Dong 1980c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Converting from 1-D to 2-D buffer */ 1990c1bc742181ded4930842b46e9507372f0b1b963James Dong for (y = 0, count = 0; y < 8; y++) 2000c1bc742181ded4930842b46e9507372f0b1b963James Dong { 2010c1bc742181ded4930842b46e9507372f0b1b963James Dong for(x = 0; x < 8; x++, count++) 2020c1bc742181ded4930842b46e9507372f0b1b963James Dong { 2030c1bc742181ded4930842b46e9507372f0b1b963James Dong /* storing tempbuf2 to tempbuf1 */ 2040c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf1[count] = pTempBuf2[count]; 2050c1bc742181ded4930842b46e9507372f0b1b963James Dong pDst[(y*dstStep) + x] = pTempBuf2[count]; 2060c1bc742181ded4930842b46e9507372f0b1b963James Dong } 2070c1bc742181ded4930842b46e9507372f0b1b963James Dong } 2080c1bc742181ded4930842b46e9507372f0b1b963James Dong 2090c1bc742181ded4930842b46e9507372f0b1b963James Dong /* AC and DC prediction */ 2100c1bc742181ded4930842b46e9507372f0b1b963James Dong armVCM4P2_SetPredDir( 2110c1bc742181ded4930842b46e9507372f0b1b963James Dong blockIndex, 2120c1bc742181ded4930842b46e9507372f0b1b963James Dong pPredBufRow, 2130c1bc742181ded4930842b46e9507372f0b1b963James Dong pPredBufCol, 2140c1bc742181ded4930842b46e9507372f0b1b963James Dong &predDir, 2150c1bc742181ded4930842b46e9507372f0b1b963James Dong &predQP, 2160c1bc742181ded4930842b46e9507372f0b1b963James Dong pQpBuf); 2170c1bc742181ded4930842b46e9507372f0b1b963James Dong 2180c1bc742181ded4930842b46e9507372f0b1b963James Dong armRetDataErrIf(((predQP <= 0) || (predQP >= 32)), OMX_Sts_BadArgErr); 2190c1bc742181ded4930842b46e9507372f0b1b963James Dong 2200c1bc742181ded4930842b46e9507372f0b1b963James Dong flag = 1; 2210c1bc742181ded4930842b46e9507372f0b1b963James Dong if (*pSumErr < 0) 2220c1bc742181ded4930842b46e9507372f0b1b963James Dong { 2230c1bc742181ded4930842b46e9507372f0b1b963James Dong ACPredFlag = 0; 2240c1bc742181ded4930842b46e9507372f0b1b963James Dong } 2250c1bc742181ded4930842b46e9507372f0b1b963James Dong else 2260c1bc742181ded4930842b46e9507372f0b1b963James Dong { 2270c1bc742181ded4930842b46e9507372f0b1b963James Dong ACPredFlag = 1; 2280c1bc742181ded4930842b46e9507372f0b1b963James Dong } 2290c1bc742181ded4930842b46e9507372f0b1b963James Dong 2300c1bc742181ded4930842b46e9507372f0b1b963James Dong armVCM4P2_ACDCPredict( 2310c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf2, 2320c1bc742181ded4930842b46e9507372f0b1b963James Dong pPreACPredict, 2330c1bc742181ded4930842b46e9507372f0b1b963James Dong pPredBufRow, 2340c1bc742181ded4930842b46e9507372f0b1b963James Dong pPredBufCol, 2350c1bc742181ded4930842b46e9507372f0b1b963James Dong curQp, 2360c1bc742181ded4930842b46e9507372f0b1b963James Dong predQP, 2370c1bc742181ded4930842b46e9507372f0b1b963James Dong predDir, 2380c1bc742181ded4930842b46e9507372f0b1b963James Dong ACPredFlag, 2390c1bc742181ded4930842b46e9507372f0b1b963James Dong videoComp, 2400c1bc742181ded4930842b46e9507372f0b1b963James Dong flag, 2410c1bc742181ded4930842b46e9507372f0b1b963James Dong pSumErr); 2420c1bc742181ded4930842b46e9507372f0b1b963James Dong 2430c1bc742181ded4930842b46e9507372f0b1b963James Dong /* Reconstructing the texture data */ 2440c1bc742181ded4930842b46e9507372f0b1b963James Dong omxVCM4P2_QuantInvIntra_I( 2450c1bc742181ded4930842b46e9507372f0b1b963James Dong pTempBuf1, 2460c1bc742181ded4930842b46e9507372f0b1b963James Dong curQp, 2470c1bc742181ded4930842b46e9507372f0b1b963James Dong videoComp, 2480c1bc742181ded4930842b46e9507372f0b1b963James Dong shortVideoHeader); 2490c1bc742181ded4930842b46e9507372f0b1b963James Dong omxVCM4P2_IDCT8x8blk (pTempBuf1, pTempBuf3); 2500c1bc742181ded4930842b46e9507372f0b1b963James Dong for(count = 0; count < 64; count++) 2510c1bc742181ded4930842b46e9507372f0b1b963James Dong { 2520c1bc742181ded4930842b46e9507372f0b1b963James Dong pRec[count] = armMax(0,pTempBuf3[count]); 2530c1bc742181ded4930842b46e9507372f0b1b963James Dong } 2540c1bc742181ded4930842b46e9507372f0b1b963James Dong 2550c1bc742181ded4930842b46e9507372f0b1b963James Dong return OMX_Sts_NoErr; 2560c1bc742181ded4930842b46e9507372f0b1b963James Dong} 2570c1bc742181ded4930842b46e9507372f0b1b963James Dong 2580c1bc742181ded4930842b46e9507372f0b1b963James Dong/* End of file */ 2590c1bc742181ded4930842b46e9507372f0b1b963James Dong 2600c1bc742181ded4930842b46e9507372f0b1b963James Dong 261