videoeditorengine/h263decoder/inc/vdcaic.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 * Header for the aic (Advanced Intra Coding) module.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 #ifndef _VDCAIC_H_
       
    23 #define _VDCAIC_H_
       
    24 
       
    25 #include "epoclib.h"
       
    26 
       
    27 /*
       
    28  * Structs and typedefs
       
    29  */
       
    30 
       
    31 typedef struct {
       
    32    
       
    33     int16 *qpStore;    /* storage place for the QP values of MBs in the 
       
    34                            previous and current MB line */
       
    35 
       
    36     int ***dcStore;    /* storage place for the DC and first horizontal 
       
    37                            and vertical line of AC coefficients of the 
       
    38                            4+1+1 blocks of the MBs in the previous and 
       
    39                            current MB line */
       
    40 
       
    41     int numMBsInMBLine; /* number of MBs in a MB line for the calculation 
       
    42                            of the internal sorage index from currMBNum */
       
    43 
       
    44     int Xpos[6];        /* indexed by block number (0..5) of an MB gives 
       
    45                            relative MB index of left neighbor block */
       
    46 
       
    47     int Ypos[6];        /* indexed by block number (0..5) of an MB gives 
       
    48                            relative MB index of top neighbor block */
       
    49 
       
    50     int Xtab[6];        /* indexed by block number (0..5) of an MB gives 
       
    51                            block number of left neighbor block */
       
    52 
       
    53     int Ytab[6];        /* indexed by block number (0..5) of an MB gives 
       
    54                            block number of top neighbor block */
       
    55 
       
    56     int Ztab[6];        /* indexed by block number (0..5) of an MB gives 
       
    57                            block number of top-left neighbor block */
       
    58 
       
    59     u_char ACpred_flag; /* ON(1): AC prediction is used, OFF(0): only DC */
       
    60 
       
    61     int midGrey;       /* the grey value used for prediction direction
       
    62                            decision if prediction block is not available */
       
    63 } aicData_t;
       
    64 
       
    65 
       
    66 /*
       
    67  * Prototypes
       
    68  */
       
    69 
       
    70    void aicStart (aicData_t *aicData, int numMBsInMBLine, int16 *error);
       
    71 
       
    72    void aicFree (aicData_t *aicData);
       
    73 
       
    74    void aicBlockUpdate (aicData_t *aicData, int currMBNum, int blockNum, int *block,
       
    75                         int pquant, int DC_coeff);
       
    76 
       
    77    int aicIsBlockValid (aicData_t *aicData, int currMBNum);
       
    78 
       
    79    void aicDCACrecon (aicData_t *aicData, int QP, u_char fTopMBMissing, u_char fLeftMBMissing,
       
    80                       u_char fBBlockOut, int blockNum, int *qBlock, int currMBNum);
       
    81 
       
    82    int aicDCScaler (int QP, int type);
       
    83 
       
    84    u_char aicIntraDCSwitch (int intraDCVLCThr, int QP);
       
    85 
       
    86 #endif
       
    87 // End of File