Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright (C) 2007-2008 ARM Limited
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  *
     16  */
     17 /* ----------------------------------------------------------------
     18  *
     19  *
     20  * File Name:  omxVCM4P10_DecodeCoeffsToPairCAVLC.c
     21  * OpenMAX DL: v1.0.2
     22  * Revision:   12290
     23  * Date:       Wednesday, April 9, 2008
     24  *
     25  *
     26  *
     27  *
     28  * H.264 decode coefficients module
     29  *
     30  */
     31 
     32 #include "omxtypes.h"
     33 #include "armOMX.h"
     34 #include "omxVC.h"
     35 
     36 #include "armCOMM.h"
     37 #include "armVC.h"
     38 
     39 /**
     40  * Function: omxVCM4P10_DecodeCoeffsToPairCAVLC
     41  *
     42  * Description:
     43  * Performs CAVLC decoding and inverse zigzag scan for 4x4 block of
     44  * Intra16x16DCLevel, Intra16x16ACLevel,LumaLevel, and ChromaACLevel.
     45  * Inverse field scan is not supported. The decoded coefficients in packed
     46  * position-coefficient buffer are stored in increasing zigzag order instead
     47  * of position order.
     48  *
     49  * Remarks:
     50  *
     51  * Parameters:
     52  * [in]	ppBitStream		Double pointer to current byte in bit stream buffer
     53  * [in]	pOffset			Pointer to current bit position in the byte pointed
     54  *								to by *ppBitStream
     55  * [in]	sMaxNumCoeff	Maximum number of non-zero coefficients in current
     56  *								block
     57  * [in]	sVLCSelect		VLC table selector, obtained from number of non-zero
     58  *								AC coefficients of above and left 4x4 blocks. It is
     59  *								equivalent to the variable nC described in H.264 standard
     60  *								table 9-5, except its value cant be less than zero.
     61  * [out]	ppBitStream		*ppBitStream is updated after each block is decoded
     62  * [out]	pOffset			*pOffset is updated after each block is decoded
     63  * [out]	pNumCoeff		Pointer to the number of nonzero coefficients in
     64  *								this block
     65  * [out]	ppPosCoefbuf	Double pointer to destination residual
     66  *								coefficient-position pair buffer
     67  * Return Value:
     68  * Standard omxError result. See enumeration for possible result codes.
     69  *
     70  */
     71 
     72 OMXResult omxVCM4P10_DecodeCoeffsToPairCAVLC(
     73      const OMX_U8** ppBitStream,
     74      OMX_S32* pOffset,
     75      OMX_U8* pNumCoeff,
     76      OMX_U8**ppPosCoefbuf,
     77      OMX_INT sVLCSelect,
     78      OMX_INT sMaxNumCoeff
     79  )
     80 {
     81     return armVCM4P10_DecodeCoeffsToPair(ppBitStream, pOffset, pNumCoeff,
     82                                          ppPosCoefbuf, sVLCSelect, sMaxNumCoeff);
     83 }
     84