|
1 /* |
|
2 * Copyright (c) 2005 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: Video settings |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CTRSETTINGS_H |
|
22 #define CTRSETTINGS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <devvideoconstants.h> |
|
26 |
|
27 |
|
28 // MACROS |
|
29 #ifdef _DEBUG |
|
30 #define DEBUGPRINT |
|
31 #endif |
|
32 |
|
33 // Debug print macro |
|
34 #ifdef DEBUGPRINT |
|
35 #include <e32svr.h> |
|
36 #define PRINT(x) RDebug::Print x; |
|
37 #else |
|
38 #define PRINT(x) |
|
39 #endif |
|
40 |
|
41 // KTRCodecPriority specifies priority of decoder type |
|
42 // (ETrue - accelerated; EFalse - Non-accelerated) |
|
43 // to be loaded first; |
|
44 const TBool KTRAccelerationPriorityDecoder = ETrue; |
|
45 |
|
46 |
|
47 // CONSTANTS |
|
48 |
|
49 |
|
50 // Decoder states |
|
51 enum TRStates |
|
52 { |
|
53 ETRNone, |
|
54 ETROpened, |
|
55 ETRInitializing, |
|
56 ETRInitialized, |
|
57 ETRRunning, |
|
58 ETRPaused, |
|
59 ETRStopping, |
|
60 ETRStopped, |
|
61 ETRFatalError |
|
62 }; |
|
63 |
|
64 enum TRCodecTypes |
|
65 { |
|
66 EH263, |
|
67 EMpeg4, |
|
68 EH264 |
|
69 }; |
|
70 |
|
71 // Input format parameters |
|
72 // Planar (first Y frame, then U, then V) |
|
73 const TYuvDataLayout KTRYuvLayout = EYuvDataPlanar; |
|
74 |
|
75 // YUV-RGB conversion coefficients to use: YUV data with range 0 (Y [16-235]) and conversion coefficients according to BT.601.5 |
|
76 const TYuvCoefficients KTRYuvCoefficients = EYuvBt601Range0; |
|
77 |
|
78 // Aspect ratio, in H.263 default is 12:11, but camera probably provides 1:1 |
|
79 const TInt KTRAspectRatioNum = 12; |
|
80 const TInt KTRAspectRatioDenom = 11; |
|
81 |
|
82 |
|
83 // Quality is more important than delay in non real-time mode |
|
84 const TReal KTRLatencyQualityTradeoffNonRT = 1.0; |
|
85 |
|
86 // Tradeoff for real-time mode |
|
87 const TReal KTRLatencyQualityTradeoffRT = 0.3; |
|
88 |
|
89 // range is [0...100] |
|
90 const TUint KTRPictureQuality = 50; |
|
91 |
|
92 // (1.0 means the picture quality is sacrificed |
|
93 // "all the way" to match the target fps |
|
94 const TReal KTRQualityTemporalTradeoff = 0.8; |
|
95 |
|
96 |
|
97 // 720x576,720x288,360x288 |
|
98 // PAL 1, 2, 3 |
|
99 |
|
100 // KTRDefaultSrcRate |
|
101 const TReal KTRDefaultSrcRate = 15.0; |
|
102 |
|
103 // KTRDefaultAccessRate |
|
104 const TReal KTRDefaultAccessRate = 0.2; |
|
105 |
|
106 // Number of video segments |
|
107 const TUint KTRMinNumberOfBuffersVideoSegment = 25; |
|
108 const TUint KTRMinNumberOfBuffersCodedPicture = 4; |
|
109 |
|
110 // Min number of bitstream buffers for decoder |
|
111 // @@ YHK Incerasing buffer to 4 from 2 |
|
112 const TUint KTRDecoderMinNumberOfBuffers = 2; |
|
113 |
|
114 // Number of internal buffers for resampled uncompressed data |
|
115 const TUint KTRMinNumberOfResampledPictureBuffers = 4; |
|
116 |
|
117 // Codec levels |
|
118 const TUint KTRH263CodecLevel10 = 10; |
|
119 const TUint KTRH263CodecLevel20 = 20; |
|
120 const TUint KTRH263CodecLevel30 = 30; |
|
121 const TUint KTRH263CodecLevel40 = 40; |
|
122 const TUint KTRH263CodecLevel45 = 45; |
|
123 const TUint KTRH263CodecLevel50 = 50; |
|
124 const TUint KTRH263CodecLevel60 = 60; |
|
125 const TUint KTRH263CodecLevel70 = 70; |
|
126 |
|
127 const TUint KTRMPEG4CodecLevel0 = 0; |
|
128 const TUint KTRMPEG4CodecLevel1 = 1; |
|
129 const TUint KTRMPEG4CodecLevel2 = 2; |
|
130 const TUint KTRMPEG4CodecLevel3 = 3; |
|
131 const TUint KTRMPEG4CodecLevel0b = 9; |
|
132 const TUint KTRMPEG4CodecLevel4a = 4; |
|
133 |
|
134 // Bitstream buffer size |
|
135 const TUint KTRMaxBufferSizeLevel10 = 8192; |
|
136 const TUint KTRMaxBufferSizeLevel20 = 32768; |
|
137 const TUint KTRMaxBufferSizeLevel30 = 32768; |
|
138 const TUint KTRMaxBufferSizeLevel40 = 32768; // FIXME When supported by codecs |
|
139 const TUint KTRMaxBufferSizeLevel45 = 16384; |
|
140 const TUint KTRMaxBufferSizeLevel50 = 32768; // FIXME |
|
141 const TUint KTRMaxBufferSizeLevel60 = 32768; // FIXME |
|
142 const TUint KTRMaxBufferSizeLevel70 = 32768; // FIXME |
|
143 |
|
144 const TUint KTRMaxBufferSizeLevel0 = 20480; |
|
145 const TUint KTRMaxBufferSizeLevel0b = 40960; |
|
146 const TUint KTRMaxBufferSizeLevel1 = 20480; |
|
147 const TUint KTRMaxBufferSizeLevel2 = 40960; |
|
148 const TUint KTRMaxBufferSizeLevel3 = 40960; |
|
149 const TUint KTRMaxBufferSizeLevel4a = 163840; |
|
150 |
|
151 // Bit rates for different profiles / levels, [kbps] |
|
152 const TUint KTRMaxBitRateH263Level10 = 64000; |
|
153 const TUint KTRMaxBitRateH263Level20 = 128000; |
|
154 const TUint KTRMaxBitRateH263Level30 = 384000; |
|
155 const TUint KTRMaxBitRateH263Level40 = 384000; // FIXME !!! |
|
156 const TUint KTRMaxBitRateH263Level45 = 128000; |
|
157 const TUint KTRMaxBitRateH263Level50 = 384000; // FIXME !!! |
|
158 const TUint KTRMaxBitRateH263Level60 = 384000; // FIXME !!! |
|
159 const TUint KTRMaxBitRateH263Level70 = 384000; // FIXME !!! |
|
160 |
|
161 const TUint KTRMaxBitRateMPEG4Level0 = 64000; |
|
162 const TUint KTRMaxBitRateMPEG4Level0b = 128000; |
|
163 const TUint KTRMaxBitRateMPEG4Level1 = 64000; |
|
164 const TUint KTRMaxBitRateMPEG4Level2 = 128000; |
|
165 const TUint KTRMaxBitRateMPEG4Level3 = 384000; |
|
166 const TUint KTRMaxBitRateMPEG4Level4a = 4000000; |
|
167 |
|
168 |
|
169 // Target framerate default |
|
170 const TReal KTRTargetFrameRateDefault = 15.0; |
|
171 |
|
172 // Default segment size |
|
173 const TUint KTRDefaultSegmentSize = 256; |
|
174 |
|
175 // Min segment size |
|
176 const TUint KTRMinSegmentSize = 256; |
|
177 |
|
178 // Max desc8 length |
|
179 const TUint KMaxDesC8Length = 256; |
|
180 |
|
181 // Image size |
|
182 const TUint KTRQCIFWidth = 176; |
|
183 const TUint KTRQCIFHeight = 144; |
|
184 const TUint KTRSubQCIFWidth = 128; |
|
185 const TUint KTRSubQCIFHeight = 96; |
|
186 const TUint KTRCIFWidth = 352; |
|
187 const TUint KTRCIFHeight = 288; |
|
188 const TUint KTRPALWidth = 720; |
|
189 const TUint KTRPAL2Height = 288; |
|
190 const TUint KTRPAL1Height = 576; |
|
191 const TUint KTRQVGAWidth = 320; |
|
192 const TUint KTRQVGAHeight = 240; |
|
193 const TUint KTRVGAWidth = 640; |
|
194 const TUint KTRVGAHeight = 480; |
|
195 const TUint KTR4CIFWidth = 704; |
|
196 const TUint KTR4CIFHeight = 576; |
|
197 |
|
198 // Number of TVideoPictures in TranscoderPicture queue |
|
199 const TUint KTRPictureBuffersNumber = 2; |
|
200 |
|
201 // Number fo TTRVideoPicture containers in TRTranscoderQueue |
|
202 const TUint KTRPictureContainersNumber = 5; |
|
203 |
|
204 // Number of picture buffers allocated by encoder plugin (if BufferManagementCI is available) |
|
205 // Only few (one or two) buffers can be used: See mdf extensions spec for details |
|
206 const TUint KTRPictureBuffersNumberBMCI = 2; |
|
207 |
|
208 // X0 would be enough.. ? |
|
209 const TUint KNumberOfEvents = 50; |
|
210 |
|
211 #endif // CTRSETTINGS_H |