videoeditorengine/vedengine/inc/vedvideosettings.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 file for video related settings/constants.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __VEDVIDEOSETTINGS_H__
       
    22 #define __VEDVIDEOSETTINGS_H__
       
    23 
       
    24 // VIDEO ENCODER RELATED SETTINGS / DEFAULTS
       
    25 
       
    26 // Maximum supported resolution
       
    27 //WVGA task
       
    28 const TUint KVedMaxVideoWidth = 864;
       
    29 //const TUint KVedMaxVideoWidth = 640;
       
    30 const TUint KVedMaxVideoHeight = 480;
       
    31 
       
    32 // Max duration for video frame in microseconds. This limits the slow motion effect.
       
    33 // This now limits the duration to 30 seconds which is already a very extreme case. This has impact to MPEG4's module_time_base variable 
       
    34 // which should not be longer than 32 bits since there are some variables e.g. in video decoder than can handle only 32-bit fields. 
       
    35 const TInt KVedMaxFrameDuration(30000000);
       
    36 
       
    37 // target/maximum bitrates  
       
    38 const TUint KVedBitRateH263Level10 = 64000;
       
    39 const TUint KVedBitRateH263Level20 = 512000;
       
    40 const TUint KVedBitRateH263Level45 = 128000;
       
    41 const TUint KVedBitRateMPEG4Level0 = 64000;
       
    42 const TUint KVedBitRateMPEG4Level0B = 128000;
       
    43 const TUint KVedBitRateMPEG4Level1 = 64000;
       
    44 const TUint KVedBitRateMPEG4Level2 = 512000;
       
    45 const TUint KVedBitRateMPEG4Level3 = 1024000;
       
    46 const TUint KVedBitRateMPEG4Level4A = 4000000;
       
    47 
       
    48 const TUint KVedBitRateAVCLevel1 = 64000;
       
    49 const TUint KVedBitRateAVCLevel1b = 128000;
       
    50 const TUint KVedBitRateAVCLevel1_1 = 192000;
       
    51 const TUint KVedBitRateAVCLevel1_2 = 384000;
       
    52 const TUint KVedBitRateAVCLevel1_3 = 768000;
       
    53 const TUint KVedBitRateAVCLevel2 = 2000000;
       
    54 //WVGA task
       
    55 const TUint KVedBitRateAVCLevel2_1 = 4000000;
       
    56 const TUint KVedBitRateAVCLevel2_2 = 4000000;
       
    57 const TUint KVedBitRateAVCLevel3 = 10000000;
       
    58 const TUint KVedBitRateAVCLevel3_1 = 14000000;
       
    59 
       
    60 
       
    61 const TReal KVedMaxVideoFrameRate = 15.0;
       
    62 
       
    63 // number of frames for transition effect - NOTE: This must be an even number !!!
       
    64 const TUint KNumTransitionFrames = 10; 
       
    65 
       
    66 #define KVedResolutionSubQCIF       (TSize(128,96))
       
    67 #define KVedResolutionQCIF          (TSize(176,144))
       
    68 #define KVedResolutionCIF           (TSize(352,288))
       
    69 #define KVedResolutionQVGA          (TSize(320,240))
       
    70 #define KVedResolutionVGA16By9      (TSize(640,352))
       
    71 #define KVedResolutionVGA           (TSize(640,480))
       
    72 //WVGA task
       
    73 #define KVedResolutionWVGA           (TSize(864,480))
       
    74 
       
    75 
       
    76 const TUint KMaxCodedPictureSizeQCIF = 16384; // QCIF and smaller
       
    77 const TUint KMaxCodedPictureSizeCIF = 65536; // CIF and smaller
       
    78 const TUint KMaxCodedPictureSizeMPEG4QCIF = 20480; // QCIF and smaller
       
    79 const TUint KMaxCodedPictureSizeMPEG4L0BQCIF = 40960; // QCIF and smaller
       
    80 const TUint KMaxCodedPictureSizeMPEG4CIF = 81920; // MPEG-4 CIF
       
    81 const TUint KMaxCodedPictureSizeVGA = 163840; // For vga support
       
    82 //WVGA task
       
    83 const TUint KMaxCodedPictureSizeWVGA = 327680; // For WVGA support
       
    84 
       
    85 const TUint KMaxCodedPictureSizeAVCLevel1 = 21875;
       
    86 const TUint KMaxCodedPictureSizeAVCLevel1B = 43750;
       
    87 const TUint KMaxCodedPictureSizeAVCLevel1_1 = 62500;
       
    88 const TUint KMaxCodedPictureSizeAVCLevel1_2 = 125000;
       
    89 const TUint KMaxCodedPictureSizeAVCLevel1_3 = 250000;
       
    90 const TUint KMaxCodedPictureSizeAVCLevel2 = 250000;
       
    91 //WVGA task
       
    92 const TUint KMaxCodedPictureSizeAVCLevel2_1 = 500000;
       
    93 const TUint KMaxCodedPictureSizeAVCLevel2_2 = 1000000;
       
    94 const TUint KMaxCodedPictureSizeAVCLevel3 = 2000000;
       
    95 const TUint KMaxCodedPictureSizeAVCLevel3_1 = 4000000;
       
    96 
       
    97 _LIT8(KVedMimeTypeH263, "video/H263-2000");
       
    98 _LIT8(KVedMimeTypeH263BaselineProfile, "video/H263-2000; profile=0");
       
    99 _LIT8(KVedMimeTypeH263Level10, "video/H263-2000; profile=0; level=10");
       
   100 _LIT8(KVedMimeTypeH263Level45, "video/H263-2000; profile=0; level=45");
       
   101 
       
   102 _LIT8(KVedMimeTypeMPEG4Visual, "video/mp4v-es");
       
   103 _LIT8(KVedMimeTypeMPEG4SimpleVisualProfile, "video/mp4v-es; profile-level-id=8");
       
   104 _LIT8(KVedMimeTypeMPEG4SimpleVisualProfileLevel2, "video/mp4v-es; profile-level-id=2");
       
   105 _LIT8(KVedMimeTypeMPEG4SimpleVisualProfileLevel3, "video/mp4v-es; profile-level-id=3");
       
   106 _LIT8(KVedMimeTypeMPEG4SimpleVisualProfileLevel4A, "video/mp4v-es; profile-level-id=4");
       
   107 
       
   108 _LIT8(KVedMimeTypeAVC, "video/H264");
       
   109 _LIT8(KVedMimeTypeAVCBaselineProfileLevel1, "video/H264; profile-level-id=42800A");
       
   110 _LIT8(KVedMimeTypeAVCBaselineProfileLevel1B, "video/H264; profile-level-id=42900B");
       
   111 _LIT8(KVedMimeTypeAVCBaselineProfileLevel1_1, "video/H264; profile-level-id=42800B");
       
   112 _LIT8(KVedMimeTypeAVCBaselineProfileLevel1_2, "video/H264; profile-level-id=42800C");
       
   113 _LIT8(KVedMimeTypeAVCBaselineProfileLevel1_3, "video/H264; profile-level-id=42800D");
       
   114 _LIT8(KVedMimeTypeAVCBaselineProfileLevel2, "video/H264; profile-level-id=428014");
       
   115 
       
   116 //WVGA task
       
   117 _LIT8(KVedMimeTypeAVCBaselineProfileLevel2_1, "video/H264; profile-level-id=428015");
       
   118 _LIT8(KVedMimeTypeAVCBaselineProfileLevel2_2, "video/H264; profile-level-id=428016");
       
   119 _LIT8(KVedMimeTypeAVCBaselineProfileLevel3, "video/H264; profile-level-id=42801E");
       
   120 _LIT8(KVedMimeTypeAVCBaselineProfileLevel3_1, "video/H264; profile-level-id=42801F");
       
   121 
       
   122 // 3gpmp4 buffer sizes
       
   123 const TInt K3gpMp4ComposerWriteBufferSize = 65536;
       
   124 const TInt K3gpMp4ComposerNrOfWriteBuffers = 10;
       
   125 const TInt K3gpMp4ParserReadBufferSize = 8192;
       
   126 
       
   127 #endif