videoeditorengine/vedengine/inc/vedqualitysettingsvariation.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 __VEDQUALITYSETTINGSVARIATION_H__
       
    21 #define __VEDQUALITYSETTINGSVARIATION_H__
       
    22 
       
    23 
       
    24 #include "vedqualitysettingsapi.h"
       
    25 
       
    26 #if 0
       
    27 
       
    28 /*
       
    29  *  This is a sample configuration
       
    30  */
       
    31 
       
    32 /*
       
    33  *  Enumerations for video levels.
       
    34  *  Each configuration MUST have the following enumerations defined. They can be overlapping, but they must exist. Otherwise the compiling of
       
    35  *  of video applications will fail.
       
    36  */
       
    37 enum TVideoInternalQualityLevels
       
    38     {
       
    39     EQualityLegacy = 0,     // If a set exist that is lower than the default MMS, e.g. subQCIF
       
    40     EQualityLow = 0,        // Low / MMS quality
       
    41     EQualityMedium = 1,     // Medium/normal quality
       
    42     EQualityHigh = 2,       // Highest quality
       
    43     ENumberOfQualitySets = 3
       
    44     };
       
    45 
       
    46 /*
       
    47  *  Definition of video quality sets.
       
    48  *  Each configuration MUST have the following variable with size ENumberOfQualitySets
       
    49  *  For explanation of the members, please see vedqualitysettingsapi.h
       
    50  */
       
    51 static const SVideoQualitySet KVideoQualitySets[ENumberOfQualitySets] =
       
    52     {
       
    53         //a sample set for MMS == EQualityLow
       
    54         { ETrue, "video/3gpp", "video/H263-2000", 176, 144, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
    55             // other sets for other levels
       
    56     };
       
    57 
       
    58 
       
    59 #endif
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 
       
    65 
       
    66 
       
    67 
       
    68 
       
    69 /*
       
    70  *  Actual variations of video settings for different configurations
       
    71  */
       
    72  
       
    73 #ifdef NCP_COMMON_TEFLON_FAMILY
       
    74 // Quality sets for 
       
    75 
       
    76 enum TVideoInternalQualityLevels
       
    77     {
       
    78     EQualityLegacy = 0,
       
    79     EQualityLow = 1,
       
    80     EQualityMedium = 2,
       
    81     EQualityHigh = 6,
       
    82     ENumberOfQualitySets = 7,
       
    83     ENumberOfWideQualitySets = 0
       
    84     };
       
    85 
       
    86 static const SVideoQualitySet KVideoQualitySets[ENumberOfQualitySets] =
       
    87     {
       
    88         // Legacy subQCIF support
       
    89         { ETrue, "video/3gpp", "video/H263-2000", 128, 96, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
    90         // MMS
       
    91         { ETrue, "video/3gpp", "video/H263-2000", 176, 144, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
    92         // Normal
       
    93         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 320, 240, 15.0, 512000, 0.5, " AAC", 48000, 16000, 1 },
       
    94         // Normal+
       
    95         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=3", 320, 240, 30.0, 1024000, 0.5, " AAC", 48000, 16000, 1 },
       
    96         // CIF settings in case of CIF input is dominating, to avoid transcoding to QVGA
       
    97         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 352, 288, 15.0, 512000, 0.5, " AAC", 48000, 16000, 1 },
       
    98         // HighMinus; level 4a
       
    99         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 480, 15.0, 2048000, 1.0, " AAC", 96000, 48000, 1 },
       
   100         // High; level 4a
       
   101         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 480, 30.0, 3072000, 1.0, " AAC", 96000, 48000, 1 }
       
   102     };
       
   103 
       
   104 static const SVideoQualitySet KVideoQualitySetsWide[1] = {{ EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 }};
       
   105 
       
   106 #else
       
   107 // Quality sets e.g. for , WINSCW
       
   108 
       
   109 #ifndef SPP_VSW_VIDEOEDITORENGINE_AVC_EDITING
       
   110 enum TVideoInternalQualityLevels
       
   111     {
       
   112     EQualityLegacy = 0,
       
   113     EQualityLow = 1,
       
   114     EQualityMedium = 2,
       
   115     EQualityHigh = 3,
       
   116     ENumberOfQualitySets = 5,
       
   117     ENumberOfWideQualitySets = 4
       
   118     };
       
   119 
       
   120 static const SVideoQualitySet KVideoQualitySets[ENumberOfQualitySets] =
       
   121     {
       
   122         // Legacy subQCIF support
       
   123         { ETrue, "video/3gpp", "video/H263-2000", 128, 96, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
   124         // MMS
       
   125         { ETrue, "video/3gpp", "video/H263-2000", 176, 144, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
   126         // Normal; H.263 level 45
       
   127         { ETrue, "video/3gpp", "video/H263-2000; profile=0; level=45", 176, 144, 15.0, 124000, 0.2, " AMR", 12200, 8000, 1 },
       
   128         // High
       
   129         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 320, 240, 15.0, 512000, 0.5, " AAC", 72000, 48000, 1 },
       
   130         // High+
       
   131         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 352, 288, 15.0, 512000, 0.5, " AAC", 72000, 48000, 1 },
       
   132     };
       
   133     
       
   134 static const SVideoQualitySet KVideoQualitySetsWide[ENumberOfWideQualitySets] =
       
   135     {
       
   136         // Legacy 
       
   137         { ETrue, "video/3gpp", "video/H263-2000", 128, 96, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },        
       
   138         // Low
       
   139         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 10.0, 256000, 1.0, " AAC", 72000, 48000, 1 },        
       
   140         // Medium
       
   141         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 15.0, 1024000, 1.0, " AAC", 72000, 48000, 1 },        
       
   142         // High
       
   143         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 15.0, 2048000, 1.0, " AAC", 72000, 48000, 1 },
       
   144     };    
       
   145 
       
   146     
       
   147 #else // AVC support
       
   148 
       
   149 enum TVideoInternalQualityLevels
       
   150     {
       
   151     EQualityLegacy = 0,
       
   152     EQualityLow = 1,
       
   153     EQualityMedium = 3,
       
   154     EQualityHigh = 7,
       
   155     ENumberOfQualitySets = 9,
       
   156     ENumberOfWideQualitySets = 8
       
   157     };
       
   158 
       
   159 static const SVideoQualitySet KVideoQualitySets[ENumberOfQualitySets] =
       
   160     {
       
   161     
       
   162         // Legacy subQCIF support
       
   163         { ETrue, "video/3gpp", "video/H263-2000", 128, 96, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
   164         // MMS
       
   165         { ETrue, "video/3gpp", "video/H263-2000", 176, 144, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },
       
   166         // MMS+1
       
   167         { ETrue, "video/3gpp", "video/H264; profile-level-id=42900B", 176, 144, 15.0, 124000, 0.2, " AMR", 12200, 8000, 1 },
       
   168         // Medium
       
   169         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 320, 240, 15.0, 512000, 0.5, " AAC", 72000, 48000, 1 },
       
   170         // Medium+
       
   171         { ETrue, "video/mp4", "video/H264; profile-level-id=42800C", 320, 240, 15.0, 384000, 0.5, " AAC", 72000, 48000, 1 },
       
   172         // Medium++
       
   173         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=2", 352, 288, 15.0, 512000, 0.5, " AAC", 72000, 48000, 1 },
       
   174         // Medium+++
       
   175         { ETrue, "video/mp4", "video/H264; profile-level-id=42800C", 352, 288, 15.0, 384000, 0.5, " AAC", 72000, 48000, 1 },
       
   176         // High
       
   177         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 480, 15.0, 2048000, 1.0, " AAC", 72000, 48000, 1 },
       
   178         // High+
       
   179         { ETrue, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 480, 30.0, 3072000, 1.0, " AAC", 72000, 48000, 1 },
       
   180         
       
   181     };
       
   182     
       
   183 static const SVideoQualitySet KVideoQualitySetsWide[ENumberOfWideQualitySets] =
       
   184     {        
       
   185         
       
   186         // Legacy 
       
   187         { ETrue, "video/3gpp", "video/H263-2000", 128, 96, 15.0, 60000, 0.2, " AMR", 12200, 8000, 1 },        
       
   188         // Low
       
   189         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 10.0, 256000, 1.0, " AAC", 72000, 48000, 1 },
       
   190         // dummy       
       
   191         { EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 },        
       
   192         // Medium
       
   193         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 15.0, 1024000, 1.0, " AAC", 72000, 48000, 1 },
       
   194         // dummy
       
   195         { EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 },
       
   196         // dummy
       
   197         { EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 },
       
   198         // dummy
       
   199         { EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 },                
       
   200         // High
       
   201         { EFalse, "video/mp4", "video/mp4v-es; profile-level-id=4", 640, 352, 25.0, 2048000, 1.0, " AAC", 72000, 48000, 1 },                
       
   202         
       
   203     };    
       
   204 
       
   205 #endif
       
   206 
       
   207 
       
   208 //static const SVideoQualitySet KVideoQualitySetsWide[1] = {{ EFalse, "", "", 0, 0, 0.0, 0, 0, "", 0, 0, 0 }};
       
   209 
       
   210 #endif
       
   211 
       
   212 #endif