videoeditorengine/avcedit/inc/vld.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef _VLC_H_
       
    21 #define _VLC_H_
       
    22 
       
    23 
       
    24 #include "bitbuffer.h"
       
    25 
       
    26 
       
    27 #define VLD_OK                       0
       
    28 #define VLD_ERROR                   -1
       
    29 #define VLD_ERR_MAX_CW_LEN_EXCEEDED -2
       
    30 
       
    31 
       
    32 typedef struct _vldMBtype_s {
       
    33   int type;
       
    34   int intraType;
       
    35   int intraMode;
       
    36   int interMode;
       
    37   int inter8x8modes[4];
       
    38   int cbpY;
       
    39   int cbpC;
       
    40   int cbpChromaDC;
       
    41 } vldMBtype_s;
       
    42 
       
    43 
       
    44 unsigned int vldGetFLC(bitbuffer_s *bitbuf, int len);
       
    45 
       
    46 unsigned int vldGetUVLC(bitbuffer_s *bitbuf);
       
    47 
       
    48 int32 vldGetSignedUVLClong(bitbuffer_s *bitbuf);
       
    49 
       
    50 u_int32 vldGetUVLClong(bitbuffer_s *bitbuf);
       
    51 
       
    52 #ifdef VIDEOEDITORENGINE_AVC_EDITING
       
    53 
       
    54 void vldInvZigZagScan4x4(int *src, int dest[BLK_SIZE][BLK_SIZE]);
       
    55 
       
    56 int vldGetSignedUVLC(bitbuffer_s *bitbuf);
       
    57 
       
    58 int getLumaBlkCbp(int cbpY);
       
    59 
       
    60 void setChromaCbp(int nc, int *cbpDC, int *cbp);
       
    61 
       
    62 unsigned int vldGetRunIndicator(bitbuffer_s *bitbuf);
       
    63 
       
    64 int vldGetMBtype(bitbuffer_s *bitbuf, vldMBtype_s *hdr, int picType);
       
    65 
       
    66 int vldGetIntraPred(bitbuffer_s *bitbuf, int8 *ipTab);
       
    67 
       
    68 int vldGetChromaIntraPred(bitbuffer_s *bitbuf);
       
    69 
       
    70 int vldGetMotVecs(bitbuffer_s *bitbuf, int interMode, int numRefFrames,
       
    71                   int *refNum, int predVecs[][2], int numVecs);
       
    72 
       
    73 int vldGetCBP(bitbuffer_s *bitbuf, int type,
       
    74               int *cbpY, int *cbpChromaDC, int *cbpC);
       
    75 
       
    76 int vldGetDeltaqp(bitbuffer_s *bitbuf, int *delta_qp);
       
    77 
       
    78 int vldGetLumaDCcoeffs(bitbuffer_s *bitbuf, int coef[4][4],
       
    79                        int8 *numCoefUpPred, int8 *numCoefLeftPred,
       
    80                        int mbAvailBits);
       
    81 
       
    82 int vldGetLumaCoeffs(bitbuffer_s *bitbuf, int mbType, int intraType,
       
    83                      int *cbpY, int coef[4][4][4][4], int8 *numCoefUpPred,
       
    84                      int8 *numCoefLeftPred, int mbAvailBits);
       
    85 
       
    86 void vldGetZeroLumaCoeffs(int8 *numCoefUpPred, int8 *numCoefLeftPred);
       
    87 
       
    88 int vldGetChromaDCcoeffs(bitbuffer_s *bitbuf, int coef[2][2][2], int *cbpDC);
       
    89 
       
    90 int vldGetChromaCoeffs(bitbuffer_s *bitbuf, int coef[2][2][2][4][4], int *cbp,
       
    91                        int8 *numCoefUpPred, int8 *numCoefUpPredV,
       
    92                        int8 *numCoefLeftPred, int8 *numCoefLeftPredV,
       
    93                        int mbAvailBits);
       
    94 
       
    95 void vldGetZeroChromaCoeffs(int8 *numCoefUpPredU, int8 *numCoefUpPredV,
       
    96                             int8 numCoefLeftPred[2][2]);
       
    97 
       
    98 void vldGetAllCoeffs(int8 *numCoefUpPredY, int8 *numCoefUpPredU,
       
    99                      int8 *numCoefUpPredV, int8 *numCoefLeftPredY,
       
   100                      int8 numCoefLeftPredC[2][2]);
       
   101 
       
   102 int vldSetUVLC(int codeNumber, int* codeword, int* codewordLength);
       
   103 
       
   104 #endif  // VIDEOEDITORENGINE_AVC_EDITING
       
   105 
       
   106 #endif