Home | History | Annotate | Download | only in src
      1 /* ----------------------------------------------------------------
      2  *
      3  *
      4  * File Name:  omxVCM4P10_DecodeCoeffsToPairCAVLC.c
      5  * OpenMAX DL: v1.0.2
      6  * Revision:   12290
      7  * Date:       Wednesday, April 9, 2008
      8  *
      9  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
     10  *
     11  *
     12  *
     13  * H.264 decode coefficients module
     14  *
     15  */
     16 
     17 #include "omxtypes.h"
     18 #include "armOMX.h"
     19 #include "omxVC.h"
     20 
     21 #include "armCOMM.h"
     22 #include "armVC.h"
     23 
     24 /**
     25  * Function: omxVCM4P10_DecodeCoeffsToPairCAVLC
     26  *
     27  * Description:
     28  * Performs CAVLC decoding and inverse zigzag scan for 4x4 block of
     29  * Intra16x16DCLevel, Intra16x16ACLevel,LumaLevel, and ChromaACLevel.
     30  * Inverse field scan is not supported. The decoded coefficients in packed
     31  * position-coefficient buffer are stored in increasing zigzag order instead
     32  * of position order.
     33  *
     34  * Remarks:
     35  *
     36  * Parameters:
     37  * [in]	ppBitStream		Double pointer to current byte in bit stream buffer
     38  * [in]	pOffset			Pointer to current bit position in the byte pointed
     39  *								to by *ppBitStream
     40  * [in]	sMaxNumCoeff	Maximum number of non-zero coefficients in current
     41  *								block
     42  * [in]	sVLCSelect		VLC table selector, obtained from number of non-zero
     43  *								AC coefficients of above and left 4x4 blocks. It is
     44  *								equivalent to the variable nC described in H.264 standard
     45  *								table 9-5, except its value cant be less than zero.
     46  * [out]	ppBitStream		*ppBitStream is updated after each block is decoded
     47  * [out]	pOffset			*pOffset is updated after each block is decoded
     48  * [out]	pNumCoeff		Pointer to the number of nonzero coefficients in
     49  *								this block
     50  * [out]	ppPosCoefbuf	Double pointer to destination residual
     51  *								coefficient-position pair buffer
     52  * Return Value:
     53  * Standard omxError result. See enumeration for possible result codes.
     54  *
     55  */
     56 
     57 OMXResult omxVCM4P10_DecodeCoeffsToPairCAVLC(
     58      const OMX_U8** ppBitStream,
     59      OMX_S32* pOffset,
     60      OMX_U8* pNumCoeff,
     61      OMX_U8**ppPosCoefbuf,
     62      OMX_INT sVLCSelect,
     63      OMX_INT sMaxNumCoeff
     64  )
     65 {
     66     return armVCM4P10_DecodeCoeffsToPair(ppBitStream, pOffset, pNumCoeff,
     67                                          ppPosCoefbuf, sVLCSelect, sMaxNumCoeff);
     68 }
     69