multimediacommscontroller/mmccg729payloadformat/inc/g729payloadformatutil.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 *
       
    14 * Description:    Provides G729 payload format spesific definitions.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef G729PAYLOADFORMATUTIL_H
       
    22 #define G729PAYLOADFORMATUTIL_H
       
    23 
       
    24 //  INCLUDES
       
    25 #ifdef _DEBUG
       
    26     #include <e32svr.h>
       
    27     #define TRACE_G729_PAYLOAD_FORMAT_WRITE
       
    28     #define TRACE_G729_PAYLOAD_FORMAT_READ
       
    29 #endif
       
    30 
       
    31 // CONSTANTS
       
    32 const TUint KG729SampleRate = 8000;
       
    33 const TUint8 KDefNumOfChannels = 1;
       
    34 
       
    35 // Codec header bytes indicating type of the frame
       
    36 const TUint8 KAudioFrameHeaderByte( 1 );
       
    37 const TUint8 KCNoiseFrameHeaderByte( 2 );
       
    38 
       
    39 // Number of header bytes
       
    40 const TUint8 KG729NumOfHeaderBytes = 2;
       
    41 
       
    42 // Size of the speech parameter buffer codec uses
       
    43 const TUint8 KG729CodecEncBufSize = 24;
       
    44 const TUint8 KG729CodecDecBufSize = 24;
       
    45 
       
    46 // Number of 16-bit speech parameters codec uses
       
    47 const TUint8 KG729NumOfAudioParams = 11;
       
    48 const TUint8 KG729NumOfCNoiseParams = 4;
       
    49 
       
    50 // Number of bits used for each codec input/output speech parameter
       
    51 const TUint8 KG729CodecBufAudioBits[] = { 8, 10, 8, 1, 13, 4, 7, 5, 13, 4, 7 };
       
    52 const TUint8 KG729CodecBufCNoiseBits[] = { 1, 5, 4, 5 };
       
    53 
       
    54 // RFC3551
       
    55 const TInt KG729FrameSize10ms       = 10;
       
    56 const TInt KG729CNFrameSize         = 2;
       
    57 const TInt KG729FrameTimeInMs       = 10;
       
    58 
       
    59 // Bits in one byte
       
    60 const TUint8 KBitsInByte = 8;
       
    61 
       
    62 #endif      // G729PAYLOADFORMATUTIL_H
       
    63             
       
    64 // End of File