blob: 569490cf7a72096aafeeb52dee0d243330c5aeec [file] [log] [blame]
bsalomon16921ec2015-07-30 15:34:56 -07001/*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "Test.h"
9#if SK_SUPPORT_GPU
bsalomon16921ec2015-07-30 15:34:56 -070010#include "GrCaps.h"
kkinnunen15302832015-12-01 04:35:26 -080011#include "GrContext.h"
Robert Phillips301431d2017-03-29 12:08:49 -040012#include "GrContextPriv.h"
Robert Phillips301431d2017-03-29 12:08:49 -040013#include "GrSurfaceContext.h"
kkinnunen15302832015-12-01 04:35:26 -080014#include "SkCanvas.h"
Robert Phillips301431d2017-03-29 12:08:49 -040015#include "SkGr.h"
kkinnunen15302832015-12-01 04:35:26 -080016#include "SkSurface.h"
bsalomon16921ec2015-07-30 15:34:56 -070017
18// using anonymous namespace because these functions are used as template params.
19namespace {
20/** convert 0..1 srgb value to 0..1 linear */
21float srgb_to_linear(float srgb) {
22 if (srgb <= 0.04045f) {
23 return srgb / 12.92f;
24 } else {
25 return powf((srgb + 0.055f) / 1.055f, 2.4f);
26 }
27}
28
29/** convert 0..1 linear value to 0..1 srgb */
30float linear_to_srgb(float linear) {
31 if (linear <= 0.0031308) {
32 return linear * 12.92f;
33 } else {
34 return 1.055f * powf(linear, 1.f / 2.4f) - 0.055f;
35 }
36}
37}
38
39/** tests a conversion with an error tolerance */
40template <float (*CONVERT)(float)> static bool check_conversion(uint32_t input, uint32_t output,
41 float error) {
42 // alpha should always be exactly preserved.
43 if ((input & 0xff000000) != (output & 0xff000000)) {
44 return false;
45 }
46
47 for (int c = 0; c < 3; ++c) {
48 uint8_t inputComponent = (uint8_t) ((input & (0xff << (c*8))) >> (c*8));
49 float lower = SkTMax(0.f, (float) inputComponent - error);
50 float upper = SkTMin(255.f, (float) inputComponent + error);
51 lower = CONVERT(lower / 255.f);
52 upper = CONVERT(upper / 255.f);
53 SkASSERT(lower >= 0.f && lower <= 255.f);
54 SkASSERT(upper >= 0.f && upper <= 255.f);
55 uint8_t outputComponent = (output & (0xff << (c*8))) >> (c*8);
56 if (outputComponent < SkScalarFloorToInt(lower * 255.f) ||
57 outputComponent > SkScalarCeilToInt(upper * 255.f)) {
58 return false;
59 }
60 }
61 return true;
62}
63
64/** tests a forward and backward conversion with an error tolerance */
65template <float (*FORWARD)(float), float (*BACKWARD)(float)>
66static bool check_double_conversion(uint32_t input, uint32_t output, float error) {
67 // alpha should always be exactly preserved.
68 if ((input & 0xff000000) != (output & 0xff000000)) {
69 return false;
70 }
71
72 for (int c = 0; c < 3; ++c) {
73 uint8_t inputComponent = (uint8_t) ((input & (0xff << (c*8))) >> (c*8));
74 float lower = SkTMax(0.f, (float) inputComponent - error);
75 float upper = SkTMin(255.f, (float) inputComponent + error);
76 lower = FORWARD(lower / 255.f);
77 upper = FORWARD(upper / 255.f);
78 SkASSERT(lower >= 0.f && lower <= 255.f);
79 SkASSERT(upper >= 0.f && upper <= 255.f);
80 uint8_t upperComponent = SkScalarCeilToInt(upper * 255.f);
81 uint8_t lowerComponent = SkScalarFloorToInt(lower * 255.f);
82 lower = SkTMax(0.f, (float) lowerComponent - error);
83 upper = SkTMin(255.f, (float) upperComponent + error);
84 lower = BACKWARD(lowerComponent / 255.f);
85 upper = BACKWARD(upperComponent / 255.f);
86 SkASSERT(lower >= 0.f && lower <= 255.f);
87 SkASSERT(upper >= 0.f && upper <= 255.f);
88 upperComponent = SkScalarCeilToInt(upper * 255.f);
89 lowerComponent = SkScalarFloorToInt(lower * 255.f);
90
91 uint8_t outputComponent = (output & (0xff << (c*8))) >> (c*8);
92 if (outputComponent < lowerComponent || outputComponent > upperComponent) {
93 return false;
94 }
95 }
96 return true;
97}
98
99static bool check_srgb_to_linear_conversion(uint32_t srgb, uint32_t linear, float error) {
100 return check_conversion<srgb_to_linear>(srgb, linear, error);
101}
102
103static bool check_linear_to_srgb_conversion(uint32_t linear, uint32_t srgb, float error) {
104 return check_conversion<linear_to_srgb>(linear, srgb, error);
105}
106
107static bool check_linear_to_srgb_to_linear_conversion(uint32_t input, uint32_t output, float error) {
108 return check_double_conversion<linear_to_srgb, srgb_to_linear>(input, output, error);
109}
110
111static bool check_srgb_to_linear_to_srgb_conversion(uint32_t input, uint32_t output, float error) {
112 return check_double_conversion<srgb_to_linear, linear_to_srgb>(input, output, error);
113}
114
Brian Salomonf802e752018-02-13 17:13:31 -0500115static bool check_no_conversion(uint32_t input, uint32_t output, float error) {
116 // This is a bit of a hack to check identity transformations that may lose precision.
117 return check_srgb_to_linear_to_srgb_conversion(input, output, error);
118}
119
bsalomon16921ec2015-07-30 15:34:56 -0700120typedef bool (*CheckFn) (uint32_t orig, uint32_t actual, float error);
121
Robert Phillips301431d2017-03-29 12:08:49 -0400122void read_and_check_pixels(skiatest::Reporter* reporter, GrSurfaceContext* context,
123 uint32_t* origData,
124 const SkImageInfo& dstInfo, CheckFn checker, float error,
bsalomon16921ec2015-07-30 15:34:56 -0700125 const char* subtestName) {
Robert Phillips301431d2017-03-29 12:08:49 -0400126 int w = dstInfo.width();
127 int h = dstInfo.height();
bsalomon16921ec2015-07-30 15:34:56 -0700128 SkAutoTMalloc<uint32_t> readData(w * h);
129 memset(readData.get(), 0, sizeof(uint32_t) * w * h);
Robert Phillips301431d2017-03-29 12:08:49 -0400130
131 if (!context->readPixels(dstInfo, readData.get(), 0, 0, 0)) {
bsalomon16921ec2015-07-30 15:34:56 -0700132 ERRORF(reporter, "Could not read pixels for %s.", subtestName);
133 return;
134 }
Robert Phillips301431d2017-03-29 12:08:49 -0400135
bsalomon16921ec2015-07-30 15:34:56 -0700136 for (int j = 0; j < h; ++j) {
137 for (int i = 0; i < w; ++i) {
138 uint32_t orig = origData[j * w + i];
139 uint32_t read = readData[j * w + i];
140
141 if (!checker(orig, read, error)) {
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400142 ERRORF(reporter, "Original 0x%08x, read back as 0x%08x in %s at %d, %d).", orig,
143 read, subtestName, i, j);
bsalomon16921ec2015-07-30 15:34:56 -0700144 return;
145 }
146 }
147 }
148}
149
Brian Salomonf802e752018-02-13 17:13:31 -0500150namespace {
151enum class Encoding {
152 kUntagged,
153 kLinear,
154 kSRGB,
155};
156}
157
158static sk_sp<SkColorSpace> encoding_as_color_space(Encoding encoding) {
159 switch (encoding) {
160 case Encoding::kUntagged: return nullptr;
161 case Encoding::kLinear: return SkColorSpace::MakeSRGBLinear();
162 case Encoding::kSRGB: return SkColorSpace::MakeSRGB();
163 }
164 return nullptr;
165}
166
167static GrPixelConfig encoding_as_pixel_config(Encoding encoding) {
168 switch (encoding) {
169 case Encoding::kUntagged: return kRGBA_8888_GrPixelConfig;
170 case Encoding::kLinear: return kRGBA_8888_GrPixelConfig;
171 case Encoding::kSRGB: return kSRGBA_8888_GrPixelConfig;
172 }
173 return kUnknown_GrPixelConfig;
174}
175
176static const char* encoding_as_str(Encoding encoding) {
177 switch (encoding) {
178 case Encoding::kUntagged: return "untagged";
179 case Encoding::kLinear: return "linear";
180 case Encoding::kSRGB: return "sRGB";
181 }
182 return nullptr;
183}
184
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500185static constexpr int kW = 255;
186static constexpr int kH = 255;
187
188static std::unique_ptr<uint32_t[]> make_data() {
189 std::unique_ptr<uint32_t[]> data(new uint32_t[kW * kH]);
bsalomon16921ec2015-07-30 15:34:56 -0700190 for (int j = 0; j < kH; ++j) {
191 for (int i = 0; i < kW; ++i) {
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500192 data[j * kW + i] = (j << 24) | (i << 16) | (i << 8) | i;
bsalomon16921ec2015-07-30 15:34:56 -0700193 }
194 }
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500195 return data;
196}
bsalomon16921ec2015-07-30 15:34:56 -0700197
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500198static sk_sp<GrSurfaceContext> make_surface_context(Encoding contextEncoding, GrContext* context,
199 skiatest::Reporter* reporter) {
kkinnunen15302832015-12-01 04:35:26 -0800200 GrSurfaceDesc desc;
201 desc.fFlags = kRenderTarget_GrSurfaceFlag;
202 desc.fWidth = kW;
203 desc.fHeight = kH;
Brian Salomonf802e752018-02-13 17:13:31 -0500204 desc.fConfig = encoding_as_pixel_config(contextEncoding);
bsalomon16921ec2015-07-30 15:34:56 -0700205
Brian Salomonf802e752018-02-13 17:13:31 -0500206 auto surfaceContext = context->contextPriv().makeDeferredSurfaceContext(
Brian Salomon2a4f9832018-03-03 22:43:43 -0500207 desc, kBottomLeft_GrSurfaceOrigin, GrMipMapped::kNo, SkBackingFit::kExact,
208 SkBudgeted::kNo, encoding_as_color_space(contextEncoding));
Brian Salomonf802e752018-02-13 17:13:31 -0500209 if (!surfaceContext) {
210 ERRORF(reporter, "Could not create %s surface context.", encoding_as_str(contextEncoding));
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500211 }
212 return surfaceContext;
213}
214
215#ifndef SK_LEGACY_GPU_PIXEL_OPS
216static void text_write_fails(Encoding contextEncoding, Encoding writeEncoding, GrContext* context,
217 skiatest::Reporter* reporter) {
218 auto surfaceContext = make_surface_context(contextEncoding, context, reporter);
219 if (!surfaceContext) {
Brian Salomonf802e752018-02-13 17:13:31 -0500220 return;
bsalomon16921ec2015-07-30 15:34:56 -0700221 }
Brian Salomonf802e752018-02-13 17:13:31 -0500222 auto writeII = SkImageInfo::Make(kW, kH, kRGBA_8888_SkColorType, kPremul_SkAlphaType,
223 encoding_as_color_space(writeEncoding));
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500224 auto data = make_data();
225 if (surfaceContext->writePixels(writeII, data.get(), 0, 0, 0)) {
226 ERRORF(reporter, "Expected %s write to %s surface context to fail.",
227 encoding_as_str(writeEncoding), encoding_as_str(contextEncoding));
228 }
229}
230#endif
Brian Salomonf802e752018-02-13 17:13:31 -0500231
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500232static void test_write_read(Encoding contextEncoding, Encoding writeEncoding, Encoding readEncoding,
233 float error, CheckFn check, GrContext* context,
234 skiatest::Reporter* reporter) {
235 auto surfaceContext = make_surface_context(contextEncoding, context, reporter);
236 if (!surfaceContext) {
237 return;
238 }
239 auto writeII = SkImageInfo::Make(kW, kH, kRGBA_8888_SkColorType, kPremul_SkAlphaType,
240 encoding_as_color_space(writeEncoding));
241 auto data = make_data();
242 if (!surfaceContext->writePixels(writeII, data.get(), 0, 0, 0)) {
Brian Salomonf802e752018-02-13 17:13:31 -0500243 ERRORF(reporter, "Could not write %s to %s surface context.",
244 encoding_as_str(writeEncoding), encoding_as_str(contextEncoding));
245 return;
246 }
247
248 auto readII = SkImageInfo::Make(kW, kH, kRGBA_8888_SkColorType, kPremul_SkAlphaType,
249 encoding_as_color_space(readEncoding));
250 SkString testName;
251 testName.printf("write %s data to a %s context and read as %s.", encoding_as_str(writeEncoding),
252 encoding_as_str(contextEncoding), encoding_as_str(readEncoding));
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500253 read_and_check_pixels(reporter, surfaceContext.get(), data.get(), readII, check, error,
Brian Salomonf802e752018-02-13 17:13:31 -0500254 testName.c_str());
255}
256
257// Test all combinations of writePixels/readPixels where the surface context/write source/read dst
258// are sRGB, linear, or untagged RGBA_8888.
259DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SRGBReadWritePixels, reporter, ctxInfo) {
260 GrContext* context = ctxInfo.grContext();
261 if (!context->caps()->isConfigRenderable(kSRGBA_8888_GrPixelConfig) &&
262 !context->caps()->isConfigTexturable(kSRGBA_8888_GrPixelConfig)) {
263 return;
264 }
265 // We allow more error on GPUs with lower precision shader variables.
266 float error = context->caps()->shaderCaps()->halfIs32Bits() ? 0.5f : 1.2f;
267 // For the all-sRGB case, we allow a small error only for devices that have
268 // precision variation because the sRGB data gets converted to linear and back in
269 // the shader.
270 float smallError = context->caps()->shaderCaps()->halfIs32Bits() ? 0.0f : 1.f;
271
272 ///////////////////////////////////////////////////////////////////////////////////////////////
273 // Write sRGB data to a sRGB context - no conversion on the write.
274
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400275 // back to sRGB - no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500276 test_write_read(Encoding::kSRGB, Encoding::kSRGB, Encoding::kSRGB, smallError,
277 check_no_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400278#ifdef SK_LEGACY_GPU_PIXEL_OPS
Brian Salomonf802e752018-02-13 17:13:31 -0500279 // Untagged read from sRGB is treated as a conversion back to linear. TODO: Fail or don't
280 // convert?
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500281 test_write_read(Encoding::kSRGB, Encoding::kSRGB, Encoding::kUntagged, error,
282 check_srgb_to_linear_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400283#else
284 // Reading back to untagged should be a pass through with no conversion.
285 test_write_read(Encoding::kSRGB, Encoding::kSRGB, Encoding::kUntagged, error,
286 check_no_conversion, context, reporter);
287#endif
288
Brian Salomonf802e752018-02-13 17:13:31 -0500289 // Converts back to linear
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500290 test_write_read(Encoding::kSRGB, Encoding::kSRGB, Encoding::kLinear, error,
291 check_srgb_to_linear_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500292
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500293#ifdef SK_LEGACY_GPU_PIXEL_OPS
Brian Salomonf802e752018-02-13 17:13:31 -0500294 ///////////////////////////////////////////////////////////////////////////////////////////////
295 // Write untagged data to a sRGB context - Currently this treats the untagged data as
296 // linear and converts to sRGB during the write. TODO: Fail or passthrough?
297
298 // read back to srgb, no additional conversion
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500299 test_write_read(Encoding::kSRGB, Encoding::kUntagged, Encoding::kSRGB, error,
300 check_linear_to_srgb_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500301 // read back to untagged. Currently converts back to linear. TODO: Fail or don't convert?
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500302 test_write_read(Encoding::kSRGB, Encoding::kUntagged, Encoding::kUntagged, error,
303 check_linear_to_srgb_to_linear_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500304 // Converts back to linear.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500305 test_write_read(Encoding::kSRGB, Encoding::kUntagged, Encoding::kLinear, error,
306 check_linear_to_srgb_to_linear_conversion, context, reporter);
307#else
308 // Currently writing untagged data to kSRGB fails because SkImageInfoValidConversion fails.
309 text_write_fails(Encoding::kSRGB, Encoding::kUntagged, context, reporter);
310#endif
Brian Salomonf802e752018-02-13 17:13:31 -0500311
312 ///////////////////////////////////////////////////////////////////////////////////////////////
313 // Write linear data to a sRGB context. It gets converted to sRGB on write. The reads
314 // are all the same as the above cases where the original data was untagged.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500315 test_write_read(Encoding::kSRGB, Encoding::kLinear, Encoding::kSRGB, error,
316 check_linear_to_srgb_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400317#ifdef SK_LEGACY_GPU_PIXEL_OPS
Brian Salomonf802e752018-02-13 17:13:31 -0500318 // TODO: Fail or don't convert?
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500319 test_write_read(Encoding::kSRGB, Encoding::kLinear, Encoding::kUntagged, error,
320 check_linear_to_srgb_to_linear_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400321#else
322 // When the dst buffer is untagged there should be no conversion on the read.
323 test_write_read(Encoding::kSRGB, Encoding::kLinear, Encoding::kUntagged, error,
324 check_linear_to_srgb_conversion, context, reporter);
325#endif
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500326 test_write_read(Encoding::kSRGB, Encoding::kLinear, Encoding::kLinear, error,
327 check_linear_to_srgb_to_linear_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500328
329 ///////////////////////////////////////////////////////////////////////////////////////////////
330 // Write data to an untagged context. The write does no conversion no matter what encoding the
331 // src data has.
332 for (auto writeEncoding : {Encoding::kSRGB, Encoding::kUntagged, Encoding::kLinear}) {
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400333 // The read from untagged to sRGB also does no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500334 test_write_read(Encoding::kUntagged, writeEncoding, Encoding::kSRGB, error,
335 check_no_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500336 // Reading untagged back as untagged should do no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500337 test_write_read(Encoding::kUntagged, writeEncoding, Encoding::kUntagged, error,
338 check_no_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400339 // Reading untagged back as linear does no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500340 test_write_read(Encoding::kUntagged, writeEncoding, Encoding::kLinear, error,
341 check_no_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500342 }
343
344 ///////////////////////////////////////////////////////////////////////////////////////////////
345 // Write sRGB data to a linear context - converts to sRGB on the write.
346
347 // converts back to sRGB on read.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500348 test_write_read(Encoding::kLinear, Encoding::kSRGB, Encoding::kSRGB, error,
349 check_srgb_to_linear_to_srgb_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400350 // Reading untagged data from linear currently does no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500351 test_write_read(Encoding::kLinear, Encoding::kSRGB, Encoding::kUntagged, error,
352 check_srgb_to_linear_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500353 // Stays linear when read.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500354 test_write_read(Encoding::kLinear, Encoding::kSRGB, Encoding::kLinear, error,
355 check_srgb_to_linear_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500356
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400357#ifdef SK_LEGACY_GPU_PIXEL_OPS
Brian Salomonf802e752018-02-13 17:13:31 -0500358 ///////////////////////////////////////////////////////////////////////////////////////////////
359 // Write untagged data to a linear context. Currently does no conversion. TODO: Should this
360 // fail?
361
362 // Reading to sRGB does a conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500363 test_write_read(Encoding::kLinear, Encoding::kUntagged, Encoding::kSRGB, error,
364 check_linear_to_srgb_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500365 // Reading to untagged does no conversion. TODO: Should it fail?
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500366 test_write_read(Encoding::kLinear, Encoding::kUntagged, Encoding::kUntagged, error,
367 check_no_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500368 // Stays linear when read.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500369 test_write_read(Encoding::kLinear, Encoding::kUntagged, Encoding::kLinear, error,
370 check_no_conversion, context, reporter);
371#else
372 // Currently writing untagged data to kLinear fails because SkImageInfoValidConversion fails.
373 text_write_fails(Encoding::kSRGB, Encoding::kUntagged, context, reporter);
374#endif
Brian Salomonf802e752018-02-13 17:13:31 -0500375
376 ///////////////////////////////////////////////////////////////////////////////////////////////
377 // Write linear data to a linear context. Does no conversion.
378
379 // Reading to sRGB does a conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500380 test_write_read(Encoding::kLinear, Encoding::kLinear, Encoding::kSRGB, error,
381 check_linear_to_srgb_conversion, context, reporter);
Brian Salomon19eaf2d2018-03-19 16:06:44 -0400382 // Reading to untagged does no conversion.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500383 test_write_read(Encoding::kLinear, Encoding::kLinear, Encoding::kUntagged, error,
384 check_no_conversion, context, reporter);
Brian Salomonf802e752018-02-13 17:13:31 -0500385 // Stays linear when read.
Brian Salomon5f33a8c2018-02-26 14:32:39 -0500386 test_write_read(Encoding::kLinear, Encoding::kLinear, Encoding::kLinear, error,
387 check_no_conversion, context, reporter);
bsalomon16921ec2015-07-30 15:34:56 -0700388}
389#endif