videoeditorengine/avcedit/inc/macroblock.h
branchRCL_3
changeset 3 e0b5df5c0969
parent 0 951a5db380a0
child 5 4c409de21d23
equal deleted inserted replaced
0:951a5db380a0 3:e0b5df5c0969
     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 _MACROBLOCK_H_
       
    21 #define _MACROBLOCK_H_
       
    22 
       
    23 
       
    24 #include "globals.h"
       
    25 #include "framebuffer.h"
       
    26 #include "bitbuffer.h"
       
    27 
       
    28 
       
    29 #define MBK_ERROR  -1
       
    30 #define MBK_OK      0
       
    31 #define MBK_PCM_FOUND  2
       
    32 
       
    33 
       
    34 typedef struct _macroblock_s
       
    35 {
       
    36   int type;
       
    37   int numSkipped;
       
    38 
       
    39   int intraType;
       
    40   int intraMode;
       
    41   int intraModeChroma;
       
    42 
       
    43   int interMode;
       
    44   int inter8x8modes[4];
       
    45   int refNum[4];
       
    46   int numMotVecs;
       
    47 
       
    48   int qp, qpC;
       
    49   int idxX, idxY;
       
    50   int blkX, blkY;
       
    51   int pixX, pixY;
       
    52 
       
    53   int cbpY, cbpC, cbpChromaDC;
       
    54 
       
    55   u_int8 predY[MBK_SIZE][MBK_SIZE];
       
    56   u_int8 predC[MBK_SIZE/2][MBK_SIZE];
       
    57 
       
    58   int dcCoefY[BLK_PER_MB][BLK_PER_MB];
       
    59   int dcCoefC[2][BLK_PER_MB/2][BLK_PER_MB/2];
       
    60 
       
    61   int coefY[BLK_PER_MB][BLK_PER_MB][BLK_SIZE][BLK_SIZE];
       
    62   int coefC[2][BLK_PER_MB/2][BLK_PER_MB/2][BLK_SIZE][BLK_SIZE];
       
    63 
       
    64   int mbAvailBits;
       
    65 
       
    66   int8 numCoefLeftPred[BLK_PER_MB];
       
    67   int8 numCoefLeftPredC[2][BLK_PER_MB/2];
       
    68 
       
    69   int8 ipModesLeftPred[BLK_PER_MB];
       
    70 
       
    71 } macroblock_s;
       
    72 
       
    73 
       
    74 void mbkSetInitialQP(macroblock_s *mb, int qp, int chromaQpIdx);
       
    75 
       
    76 TInt mbkParse(macroblock_s *mb, 
       
    77               TInt numRefFrames, mbAttributes_s *mbData, TInt picWidth, 
       
    78               TInt picType, TInt constIpred, TInt chromaQpIdx,
       
    79               TInt mbIdxX, TInt mbIdxY, void *streamBuf, TInt aBitOffset);
       
    80 
       
    81 #endif