@geastack/targets 0.1.87 → 0.1.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/package.json +7 -7
  2. package/targets/esp32/app_project.cmake +18 -1
  3. package/targets/esp32/chip_bindings/audio/echo_cancellation.cpp +213 -0
  4. package/targets/esp32/chip_bindings/audio/echo_cancellation.h +12 -0
  5. package/targets/esp32/chip_bindings/audio/es8311.cpp +265 -45
  6. package/targets/esp32/chip_bindings/displays/rgb_panel.cpp +115 -12
  7. package/targets/esp32/chip_bindings/expanders/io_expander.h +2 -0
  8. package/targets/esp32/chip_bindings/expanders/tca9554.cpp +74 -0
  9. package/targets/esp32/chip_bindings/touch/ft3168.cpp +23 -1
  10. package/targets/esp32/chip_bindings/touch/ft3168_controller.h +1 -0
  11. package/targets/esp32/chip_bindings/touch/gt911.cpp +4 -3
  12. package/targets/esp32/components/gea_framework/CMakeLists.txt +8 -1
  13. package/targets/esp32/components/gea_juice/CMakeLists.txt +46 -0
  14. package/targets/esp32/components/gea_juice/README.md +20 -0
  15. package/targets/esp32/components/gea_juice/juice_memory.c +19 -0
  16. package/targets/esp32/components/gea_juice/juice_memory.h +16 -0
  17. package/targets/esp32/components/gea_juice/patch_threads.py +50 -0
  18. package/targets/esp32/components/gea_vp8_peer/CMakeLists.txt +16 -0
  19. package/targets/esp32/components/gea_vp8_peer/README.md +39 -0
  20. package/targets/esp32/components/gea_vp8_peer/gea_vp8_peer.h +21 -0
  21. package/targets/esp32/components/gea_vp8_peer/vp8_peer.cpp +538 -0
  22. package/targets/esp32/components/gea_vpx/CMakeLists.txt +235 -0
  23. package/targets/esp32/components/gea_vpx/README.md +133 -0
  24. package/targets/esp32/components/gea_vpx/i420_rgb565_s3.S +169 -0
  25. package/targets/esp32/components/gea_vpx/vp8_blocks_s3.c +42 -0
  26. package/targets/esp32/components/gea_vpx/vp8_copy_s3.S +39 -0
  27. package/targets/esp32/components/gea_vpx/vp8_entropy_s3.c +76 -0
  28. package/targets/esp32/components/gea_vpx/vp8_filter_s3.S +58 -0
  29. package/targets/esp32/components/gea_vpx/vp8_idct_s3.S +269 -0
  30. package/targets/esp32/components/gea_vpx/vp8_intrapred_s3.S +65 -0
  31. package/targets/esp32/components/gea_vpx/vp8_loopfilter_s3.S +333 -0
  32. package/targets/esp32/components/gea_vpx/vp8_loopfilter_s3.c +62 -0
  33. package/targets/esp32/components/gea_vpx/vp8_profile_s3.c +22 -0
  34. package/targets/esp32/components/gea_vpx/vp8_profile_s3.h +20 -0
  35. package/targets/esp32/components/gea_vpx/vp8_s3.c +120 -0
  36. package/targets/esp32/components/gea_vpx/vp8_s3.h +58 -0
  37. package/targets/esp32/components/gea_vpx/vp8_workspace_s3.c +14 -0
  38. package/targets/esp32/components/gea_vpx/vpx_memory.c +41 -0
  39. package/targets/esp32/connectivity/diagnostics_transport.cpp +18 -0
  40. package/targets/esp32/connectivity/wifi.cpp +26 -13
  41. package/targets/esp32/crypto/srtp_hmac_psa.c +118 -0
  42. package/targets/esp32/display.cpp +13 -0
  43. package/targets/esp32/gea_framework.cmake +7 -0
  44. package/targets/esp32/host_sources.cmake +2 -0
  45. package/targets/esp32/i2c_completion_order.cmake +57 -0
  46. package/targets/esp32/patch_streaming_dependencies.py +233 -0
  47. package/targets/esp32/services/device_control.cpp +141 -5
  48. package/targets/esp32/services/frame_scheduler.cpp +29 -1
  49. package/targets/esp32/services/opus_benchmark.h +82 -0
  50. package/targets/esp32/services/pcm_simd_check.h +73 -0
  51. package/targets/esp32/services/srtp_benchmark.h +106 -0
  52. package/targets/esp32/services/video_simd_benchmark.h +477 -0
  53. package/targets/esp32/services/vp8_benchmark.h +147 -0
  54. package/targets/esp32/streaming_dependency_patches.cmake +103 -0
  55. package/targets/esp32-m5stack-m5paper/main/idf_component.yml +2 -0
  56. package/targets/esp32-p4-m5stack-tab5/main/idf_component.yml +2 -0
  57. package/targets/esp32-p4-waveshare-touch-lcd-3.5/main/idf_component.yml +2 -0
  58. package/targets/esp32-p4-waveshare-touch-lcd-7/main/idf_component.yml +2 -0
  59. package/targets/esp32-s3-elecrow-rotary-2.1/main/idf_component.yml +2 -0
  60. package/targets/esp32-s3-epaper-1.54/main/idf_component.yml +2 -0
  61. package/targets/esp32-s3-lilygo-t-display-s3-long/main/idf_component.yml +2 -0
  62. package/targets/esp32-s3-m5stack-papers3/main/idf_component.yml +2 -0
  63. package/targets/esp32-s3-m5stack-sticks3/main/idf_component.yml +2 -0
  64. package/targets/esp32-s3-touch-amoled-1.75/main/idf_component.yml +2 -0
  65. package/targets/esp32-s3-touch-amoled-1.8/dependencies.lock +110 -2
  66. package/targets/esp32-s3-touch-amoled-1.8/main/CMakeLists.txt +29 -3
  67. package/targets/esp32-s3-touch-amoled-1.8/main/app_main.cpp +6 -3
  68. package/targets/esp32-s3-touch-amoled-1.8/main/idf_component.yml +11 -0
  69. package/targets/esp32-s3-touch-amoled-1.8/sdkconfig.defaults +9 -1
  70. package/targets/esp32-s3-touch-amoled-2.06/CMakeLists.txt +2 -0
  71. package/targets/esp32-s3-touch-amoled-2.06/dependencies.lock +171 -8
  72. package/targets/esp32-s3-touch-amoled-2.06/main/CMakeLists.txt +8 -1
  73. package/targets/esp32-s3-touch-amoled-2.06/main/app_main.cpp +10 -3
  74. package/targets/esp32-s3-touch-amoled-2.06/main/idf_component.yml +16 -1
  75. package/targets/esp32-s3-touch-amoled-2.06/main/include/board.h +3 -0
  76. package/targets/esp32-s3-touch-amoled-2.06/main/touch.cpp +7 -0
  77. package/targets/esp32-s3-touch-amoled-2.41/dependencies.lock +57 -1
  78. package/targets/esp32-s3-touch-amoled-2.41/main/idf_component.yml +10 -0
  79. package/targets/esp32-s3-waveshare-touch-lcd-4b.json +504 -0
  80. package/targets.json +12 -1
@@ -0,0 +1,477 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // Offline differential tests execute the actual S3 instructions, not emulation.
3
+ #pragma once
4
+ #include <cstdio>
5
+ #if defined(GEA_VIDEO_SIMD_ESP32S3) && GEA_VIDEO_SIMD_ESP32S3 && \
6
+ defined(GEA_EMBEDDED_VP8_BENCHMARK) && GEA_EMBEDDED_VP8_BENCHMARK
7
+ #include "host/video_color.h"
8
+ #include "pixel.h"
9
+ #include "vp8_s3.h"
10
+ #include "esp_timer.h"
11
+ #include "esp_heap_caps.h"
12
+ #include "freertos/idf_additions.h"
13
+ #include "freertos/semphr.h"
14
+ #include <algorithm>
15
+ #include <cstring>
16
+ #include <stdexcept>
17
+
18
+ struct loop_filter_info {
19
+ const unsigned char *mblim, *blim, *lim, *hev_thr;
20
+ };
21
+ extern "C" {
22
+ #define GEA_DECLARE_COPY_REFERENCE(size) \
23
+ void vp8_copy_mem##size##_c(unsigned char*, int, unsigned char*, int);
24
+ GEA_DECLARE_COPY_REFERENCE(16x16)
25
+ GEA_DECLARE_COPY_REFERENCE(8x8)
26
+ GEA_DECLARE_COPY_REFERENCE(8x4)
27
+ #undef GEA_DECLARE_COPY_REFERENCE
28
+ #define GEA_DECLARE_REFERENCE(kind, size) \
29
+ void vp8_##kind##_predict##size##_c(unsigned char*, int, int, int, unsigned char*, int);
30
+ GEA_DECLARE_REFERENCE(sixtap, 4x4)
31
+ GEA_DECLARE_REFERENCE(sixtap, 8x4)
32
+ GEA_DECLARE_REFERENCE(sixtap, 8x8)
33
+ GEA_DECLARE_REFERENCE(sixtap, 16x16)
34
+ GEA_DECLARE_REFERENCE(bilinear, 4x4)
35
+ GEA_DECLARE_REFERENCE(bilinear, 8x4)
36
+ GEA_DECLARE_REFERENCE(bilinear, 8x8)
37
+ GEA_DECLARE_REFERENCE(bilinear, 16x16)
38
+ #undef GEA_DECLARE_REFERENCE
39
+ void vpx_tm_predictor_4x4_c(uint8_t*, ptrdiff_t, const uint8_t*, const uint8_t*);
40
+ void vpx_tm_predictor_8x8_c(uint8_t*, ptrdiff_t, const uint8_t*, const uint8_t*);
41
+ void vpx_tm_predictor_16x16_c(uint8_t*, ptrdiff_t, const uint8_t*, const uint8_t*);
42
+ void vp8_short_idct4x4llm_c(short*, unsigned char*, int, unsigned char*, int);
43
+ void vp8_dequant_idct_add_c(short*, short*, unsigned char*, int);
44
+ void vp8_dequant_idct_add_y_block_c(short*, short*, unsigned char*, int, char*);
45
+ void vp8_dequant_idct_add_uv_block_c(short*, short*, unsigned char*, unsigned char*, int, char*);
46
+ void vp8_dc_only_idct_add_c(short, unsigned char*, int, unsigned char*, int);
47
+ void vp8_short_inv_walsh4x4_c(short*, short*);
48
+ #define GEA_DECLARE_LOOP_REFERENCE(name) \
49
+ void vp8_loop_filter_##name##_c(unsigned char*, unsigned char*, unsigned char*, int, int, struct loop_filter_info*);
50
+ GEA_DECLARE_LOOP_REFERENCE(bh)
51
+ GEA_DECLARE_LOOP_REFERENCE(bv)
52
+ GEA_DECLARE_LOOP_REFERENCE(mbh)
53
+ GEA_DECLARE_LOOP_REFERENCE(mbv)
54
+ #undef GEA_DECLARE_LOOP_REFERENCE
55
+ void vp8_loop_filter_bhs_c(unsigned char*, int, const unsigned char*);
56
+ void vp8_loop_filter_bvs_c(unsigned char*, int, const unsigned char*);
57
+ void vp8_loop_filter_simple_horizontal_edge_c(unsigned char*, int, const unsigned char*);
58
+ void vp8_loop_filter_simple_vertical_edge_c(unsigned char*, int, const unsigned char*);
59
+ }
60
+
61
+ namespace gea::platform::esp32::services {
62
+ inline void benchmarkVideoSimd(unsigned mode = 0) {
63
+ namespace pixel = gea::framework::graphics::pixel;
64
+ struct Job { SemaphoreHandle_t done; unsigned mode; } job{xSemaphoreCreateBinary(), mode};
65
+ if (!job.done) { std::puts("GEADEV:ERR SIMDBENCH semaphore-allocation"); return; }
66
+ const auto run = [](void* context) {
67
+ auto& job = *static_cast<Job*>(context);
68
+ try {
69
+ if (job.mode != 1) {
70
+ alignas(16) pixel::native_t source[416], output[416];
71
+ unsigned cases = 0;
72
+ for (unsigned i = 0; i < 416; ++i) source[i] = pixel::native_t(i * 197u + 31u);
73
+ for (unsigned sourceOffset = 0; sourceOffset < 8; ++sourceOffset)
74
+ for (unsigned outputOffset = 0; outputOffset < 8; ++outputOffset)
75
+ for (unsigned count = 0; count <= 396; ++count) {
76
+ std::fill_n(output, 416, pixel::native_t(0xa55a));
77
+ pixel::copyNative(output + outputOffset, source + sourceOffset, count);
78
+ for (unsigned i = 0; i < 416; ++i) {
79
+ const auto expected = i >= outputOffset && i < outputOffset + count
80
+ ? source[sourceOffset + i - outputOffset] : pixel::native_t(0xa55a);
81
+ if (output[i] != expected) throw std::runtime_error("pixel-copy-or-guard");
82
+ }
83
+ ++cases;
84
+ if (!(cases & 127u)) vTaskDelay(1);
85
+ }
86
+ uint64_t scalarUs = 0, simdUs = 0;
87
+ for (unsigned round = 0; round < 128; ++round) {
88
+ const auto scalarStarted = esp_timer_get_time();
89
+ for (unsigned row = 0; row < 448; ++row) {
90
+ std::memcpy(output, source + 14, 368 * sizeof(pixel::native_t));
91
+ asm volatile("" : : "r"(output) : "memory");
92
+ }
93
+ scalarUs += esp_timer_get_time() - scalarStarted;
94
+ const auto simdStarted = esp_timer_get_time();
95
+ for (unsigned row = 0; row < 448; ++row) {
96
+ pixel::copyNative(output, source + 14, 368);
97
+ asm volatile("" : : "r"(output) : "memory");
98
+ }
99
+ simdUs += esp_timer_get_time() - simdStarted;
100
+ vTaskDelay(1);
101
+ }
102
+ std::printf("GEADEV:SIMDBENCH pixel_copy_cases=%u scalar_us=%llu simd_us=%llu exact=1\n",
103
+ cases, (unsigned long long)scalarUs, (unsigned long long)simdUs);
104
+ }
105
+ struct WorkspaceCheck {
106
+ uint8_t* allocation = static_cast<uint8_t*>(heap_caps_aligned_alloc(
107
+ 16, GEA_VP8_WORKSPACE_BYTES + 32, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT));
108
+ void* previous = nullptr;
109
+ WorkspaceCheck() {
110
+ if (!allocation) throw std::runtime_error("workspace-allocation");
111
+ std::memset(allocation, 0xa5, GEA_VP8_WORKSPACE_BYTES + 32);
112
+ previous = gea_vp8_bind_workspace_s3(allocation + 16);
113
+ }
114
+ ~WorkspaceCheck() {
115
+ gea_vp8_bind_workspace_s3(previous);
116
+ heap_caps_free(allocation);
117
+ }
118
+ void verify() {
119
+ for (unsigned i = 0; i < 16; ++i)
120
+ if (allocation[i] != 0xa5 || allocation[16 + GEA_VP8_WORKSPACE_BYTES + i] != 0xa5)
121
+ throw std::runtime_error("workspace-guard");
122
+ }
123
+ } workspace;
124
+ gea_vp8_entropy_result entropy{};
125
+ if (!gea_vp8_entropy_check_s3(&entropy)) throw std::runtime_error("entropy-state-mismatch");
126
+ std::printf("GEADEV:SIMDBENCH entropy_cases=%u exact=1 scalar_us=%llu native_us=%llu\n",
127
+ entropy.cases, (unsigned long long)entropy.scalar_us, (unsigned long long)entropy.native_us);
128
+ alignas(16) uint16_t swap[24];
129
+ for (unsigned base = 0; base < 65536; base += 8) {
130
+ std::fill_n(swap, 24, uint16_t(0xdead));
131
+ for (unsigned i = 0; i < 8; ++i) swap[8 + i] = uint16_t(base + i);
132
+ gea::host::media::rgb565SwapBytes(swap + 8, 8);
133
+ for (unsigned i = 0; i < 8; ++i) {
134
+ const auto value = uint16_t(base + i);
135
+ if (swap[8 + i] != uint16_t((value << 8) | (value >> 8)) ||
136
+ swap[i] != 0xdead || swap[16 + i] != 0xdead)
137
+ throw std::runtime_error("rgb565-swap-mismatch");
138
+ }
139
+ }
140
+ std::puts("GEADEV:SIMDBENCH swap_values=65536 exact=1");
141
+ // Exercise both byte orders, multi-iteration SIMD, scalar tails, odd
142
+ // heights/strides, unaligned fallback, distinct chroma and write guards.
143
+ alignas(16) uint8_t packedY[32*3], packedU[16*2], packedV[16*2];
144
+ alignas(16) uint16_t nativePixels[128], panelPixels[128];
145
+ uint32_t colorState = 0x29f914adu;
146
+ const auto colorReference = [](uint8_t y, uint8_t u, uint8_t v) {
147
+ const int c = 298 * (int(y) - 16), d = int(u) - 128, e = int(v) - 128;
148
+ const int r = std::clamp((c + 409*e + 128) >> 8, 0, 255);
149
+ const int g = std::clamp((c - 100*d - 208*e + 128) >> 8, 0, 255);
150
+ const int b = std::clamp((c + 516*d + 128) >> 8, 0, 255);
151
+ return uint16_t((r >> 3) << 11 | (g >> 2) << 5 | (b >> 3));
152
+ };
153
+ for (unsigned test = 0; test < 4096; ++test) {
154
+ for (auto* plane : {packedY, packedU, packedV}) {
155
+ const unsigned length = plane == packedY ? sizeof(packedY) : sizeof(packedU);
156
+ for (unsigned i = 0; i < length; ++i) {
157
+ colorState ^= colorState << 13; colorState ^= colorState >> 17; colorState ^= colorState << 5;
158
+ plane[i] = uint8_t(colorState);
159
+ }
160
+ }
161
+ std::fill_n(nativePixels, 128, uint16_t(0xdead));
162
+ std::fill_n(panelPixels, 128, uint16_t(0xdead));
163
+ const unsigned width = 8 + test % 17, offset = test % 2;
164
+ const unsigned ys = 32 - offset, us = 16 - offset;
165
+ gea::host::media::i420ToRgb565(packedY + offset, ys, packedU + offset, us,
166
+ packedV + offset, us, width, 3, nativePixels + 8 + offset);
167
+ gea::host::media::i420ToRgb565(packedY + offset, ys, packedU + offset, us,
168
+ packedV + offset, us, width, 3, panelPixels + 8 + offset, true);
169
+ for (unsigned i = 0; i < 128; ++i) {
170
+ const bool pixel = i >= 8 + offset && i < 8 + offset + width*3;
171
+ const auto value = nativePixels[i];
172
+ if (pixel) {
173
+ const auto index = i - 8 - offset, row = index / width, column = index % width;
174
+ if (value != colorReference(packedY[offset + row*ys + column],
175
+ packedU[offset + (row/2)*us + column/2],
176
+ packedV[offset + (row/2)*us + column/2]))
177
+ throw std::runtime_error("color-reference-mismatch");
178
+ } else if (value != 0xdead) {
179
+ throw std::runtime_error("color-native-guard");
180
+ }
181
+ if (panelPixels[i] != (pixel ? uint16_t((value << 8) | (value >> 8)) : uint16_t(0xdead)))
182
+ throw std::runtime_error("color-endian-mismatch");
183
+ }
184
+ if (!(test & 255)) vTaskDelay(1);
185
+ }
186
+ std::puts("GEADEV:SIMDBENCH color_endian_cases=4096 exact=1");
187
+ if (job.mode != 1) {
188
+ if (job.mode == 0) {
189
+ const auto reference = [](uint8_t y, uint8_t u, uint8_t v) {
190
+ const int c = 298 * (int(y) - 16), d = int(u) - 128, e = int(v) - 128;
191
+ const int r = std::clamp((c + 409*e + 128) >> 8, 0, 255);
192
+ const int g = std::clamp((c - 100*d - 208*e + 128) >> 8, 0, 255);
193
+ const int b = std::clamp((c + 516*d + 128) >> 8, 0, 255);
194
+ return uint16_t((r >> 3) << 11 | (g >> 2) << 5 | (b >> 3));
195
+ };
196
+ alignas(16) uint8_t y[8], u[4], v[4];
197
+ alignas(16) uint16_t out[8];
198
+ // All Y/U/V combinations, with distinct luma lanes to catch zip errors.
199
+ for (unsigned uu = 0; uu < 256; ++uu) {
200
+ std::memset(u, uu, sizeof(u));
201
+ for (unsigned vv = 0; vv < 256; ++vv) {
202
+ std::memset(v, vv, sizeof(v));
203
+ for (unsigned yy = 0; yy < 256; yy += 8) {
204
+ for (unsigned i = 0; i < 8; ++i) y[i] = yy+i;
205
+ gea::host::media::gea_i420_rgb565_row_s3(y, u, v, out, 8);
206
+ for (unsigned i = 0; i < 8; ++i)
207
+ if (out[i] != reference(y[i], uu, vv)) {
208
+ std::printf("GEADEV:SIMDBENCH mismatch y=%u u=%u v=%u actual=%04x expected=%04x\n",
209
+ y[i], uu, vv, out[i], reference(y[i], uu, vv));
210
+ throw std::runtime_error("color-mismatch");
211
+ }
212
+ }
213
+ }
214
+ if (!(uu & 15)) vTaskDelay(1);
215
+ }
216
+ std::puts("GEADEV:SIMDBENCH color_combinations=16777216 exact=1");
217
+ for (unsigned test = 0; test < 256; ++test) {
218
+ for (unsigned i = 0; i < 8; ++i) y[i] = uint8_t(test + i*31);
219
+ for (unsigned i = 0; i < 4; ++i) { u[i] = uint8_t(test + i*67); v[i] = uint8_t(test - i*47); }
220
+ gea::host::media::gea_i420_rgb565_row_s3(y, u, v, out, 8);
221
+ for (unsigned i = 0; i < 8; ++i)
222
+ if (out[i] != reference(y[i], u[i/2], v[i/2])) throw std::runtime_error("color-lane-mismatch");
223
+ }
224
+ }
225
+ using Filter = void (*)(unsigned char*, int, int, int, unsigned char*, int);
226
+ struct Pair { Filter scalar, simd; };
227
+ #define GEA_FILTER_PAIR(kind, size) Pair{vp8_##kind##_predict##size##_c, vp8_##kind##_predict##size##_s3}
228
+ const Pair pairs[]{GEA_FILTER_PAIR(sixtap, 4x4), GEA_FILTER_PAIR(sixtap, 8x4),
229
+ GEA_FILTER_PAIR(sixtap, 8x8), GEA_FILTER_PAIR(sixtap, 16x16),
230
+ GEA_FILTER_PAIR(bilinear, 4x4), GEA_FILTER_PAIR(bilinear, 8x4),
231
+ GEA_FILTER_PAIR(bilinear, 8x8), GEA_FILTER_PAIR(bilinear, 16x16)};
232
+ #undef GEA_FILTER_PAIR
233
+ alignas(16) uint8_t source[64*64], scalar[32*18], simd[32*18];
234
+ uint32_t state = 0x581ffadu;
235
+ for (auto& value : source) { state ^= state << 13; state ^= state >> 17; state ^= state << 5; value = state; }
236
+ {
237
+ using Copy = void (*)(unsigned char*, int, unsigned char*, int);
238
+ const Copy copies[][2] = {
239
+ {vp8_copy_mem16x16_c, vp8_copy_mem16x16_s3},
240
+ {vp8_copy_mem8x8_c, vp8_copy_mem8x8_s3},
241
+ {vp8_copy_mem8x4_c, vp8_copy_mem8x4_s3},
242
+ {[](unsigned char* src, int ss, unsigned char* dst, int ds) {
243
+ for (int y = 0; y < 4; ++y) std::memcpy(dst + y*ds, src + y*ss, 4);
244
+ }, [](unsigned char* src, int ss, unsigned char* dst, int ds) {
245
+ vp8_sixtap_predict4x4_s3(src, ss, 0, 0, dst, ds);
246
+ }}
247
+ };
248
+ alignas(16) uint8_t expected[40*18], actual[40*18];
249
+ uint64_t scalarCopyUs = 0, simdCopyUs = 0;
250
+ unsigned copyCases = 0;
251
+ for (const auto& pair : copies)
252
+ for (int sourceStride : {37, 64}) for (int pitch : {37, 40})
253
+ for (unsigned sourceOffset = 0; sourceOffset < 16; ++sourceOffset)
254
+ for (unsigned destinationOffset = 0; destinationOffset < 16; ++destinationOffset) {
255
+ std::memset(expected, 0xa5, sizeof(expected));
256
+ std::memset(actual, 0xa5, sizeof(actual));
257
+ auto* input = source + 8*sourceStride + 16 + sourceOffset;
258
+ auto before = esp_timer_get_time();
259
+ pair[0](input, sourceStride, expected + 32 + destinationOffset, pitch);
260
+ scalarCopyUs += esp_timer_get_time() - before;
261
+ before = esp_timer_get_time();
262
+ pair[1](input, sourceStride, actual + 32 + destinationOffset, pitch);
263
+ simdCopyUs += esp_timer_get_time() - before;
264
+ if (std::memcmp(expected, actual, sizeof(expected)))
265
+ throw std::runtime_error("vp8-copy-mismatch");
266
+ if (!(++copyCases & 255)) vTaskDelay(1);
267
+ }
268
+ std::printf("GEADEV:SIMDBENCH motion_copy_cases=%u scalar_us=%llu simd_us=%llu exact=1\n",
269
+ copyCases, (unsigned long long)scalarCopyUs, (unsigned long long)simdCopyUs);
270
+ }
271
+ uint64_t scalarUs = 0, simdUs = 0;
272
+ unsigned cases = 0;
273
+ for (const auto& pair : pairs) {
274
+ for (unsigned offset = 0; offset < 16; ++offset)
275
+ for (int yp = 0; yp < 8; ++yp) for (int xp = 0; xp < 8; ++xp) {
276
+ // Upstream bilinear asserts that at least one axis is fractional.
277
+ if (!(xp | yp)) continue;
278
+ std::memset(scalar, 0xa5, sizeof(scalar));
279
+ std::memset(simd, 0xa5, sizeof(simd));
280
+ auto* input = source + 8*64 + 16 + offset;
281
+ auto before = esp_timer_get_time();
282
+ pair.scalar(input, 64, xp, yp, scalar + 32, 32);
283
+ scalarUs += esp_timer_get_time() - before;
284
+ before = esp_timer_get_time();
285
+ pair.simd(input, 64, xp, yp, simd + 32, 32);
286
+ simdUs += esp_timer_get_time() - before;
287
+ if (std::memcmp(scalar, simd, sizeof(scalar)))
288
+ throw std::runtime_error("filter-mismatch");
289
+ ++cases;
290
+ }
291
+ vTaskDelay(1);
292
+ }
293
+ std::printf("GEADEV:SIMDBENCH filter_cases=%u scalar_us=%llu simd_us=%llu exact=1\n",
294
+ cases, (unsigned long long)scalarUs, (unsigned long long)simdUs);
295
+ using Intra = void (*)(uint8_t*, ptrdiff_t, const uint8_t*, const uint8_t*);
296
+ const Intra intra[][2] = {
297
+ {vpx_tm_predictor_4x4_c, vpx_tm_predictor_4x4_s3},
298
+ {vpx_tm_predictor_8x8_c, vpx_tm_predictor_8x8_s3},
299
+ {vpx_tm_predictor_16x16_c, vpx_tm_predictor_16x16_s3}
300
+ };
301
+ alignas(16) uint8_t above[48], left[16];
302
+ uint64_t intraScalarUs = 0, intraSimdUs = 0;
303
+ for (unsigned test = 0; test < 512; ++test) {
304
+ for (auto& value : above) { state ^= state << 13; state ^= state >> 17; state ^= state << 5; value = state; }
305
+ for (auto& value : left) { state ^= state << 13; state ^= state >> 17; state ^= state << 5; value = state; }
306
+ for (unsigned size = 0; size < 3; ++size) {
307
+ std::memset(scalar, 0xa5, sizeof(scalar));
308
+ std::memset(simd, 0xa5, sizeof(simd));
309
+ const unsigned offset = test % 16;
310
+ auto before = esp_timer_get_time();
311
+ intra[size][0](scalar + 32, 32, above + 16 + offset, left);
312
+ intraScalarUs += esp_timer_get_time() - before;
313
+ before = esp_timer_get_time();
314
+ intra[size][1](simd + 32, 32, above + 16 + offset, left);
315
+ intraSimdUs += esp_timer_get_time() - before;
316
+ if (std::memcmp(scalar, simd, sizeof(scalar))) throw std::runtime_error("intra-tm-mismatch");
317
+ }
318
+ if (!(test & 63)) vTaskDelay(1);
319
+ }
320
+ std::printf("GEADEV:SIMDBENCH intra_cases=1536 scalar_us=%llu simd_us=%llu exact=1\n",
321
+ (unsigned long long)intraScalarUs, (unsigned long long)intraSimdUs);
322
+ alignas(16) short coefficients[16], quantizers[16], copy[16], walshScalar[256], walshSimd[256];
323
+ scalarUs = simdUs = 0;
324
+ for (unsigned test = 0; test < 4096; ++test) {
325
+ for (unsigned i = 0; i < 16; ++i) {
326
+ state ^= state << 13; state ^= state >> 17; state ^= state << 5;
327
+ coefficients[i] = short(state); quantizers[i] = short(state >> 16);
328
+ }
329
+ if (test < 32) {
330
+ std::memset(coefficients, 0, sizeof(coefficients));
331
+ coefficients[test % 16] = test < 16 ? -32768 : 32767;
332
+ }
333
+ std::memset(walshScalar, 0x5a, sizeof(walshScalar));
334
+ std::memset(walshSimd, 0x5a, sizeof(walshSimd));
335
+ vp8_short_inv_walsh4x4_c(coefficients, walshScalar);
336
+ vp8_short_inv_walsh4x4_s3(coefficients, walshSimd);
337
+ if (std::memcmp(walshScalar, walshSimd, sizeof(walshScalar))) throw std::runtime_error("walsh-mismatch");
338
+ std::memset(scalar, 0xa5, sizeof(scalar));
339
+ std::memset(simd, 0xa5, sizeof(simd));
340
+ auto before = esp_timer_get_time();
341
+ vp8_short_idct4x4llm_c(coefficients, source + 32, 32, scalar + 32, 32);
342
+ scalarUs += esp_timer_get_time() - before;
343
+ before = esp_timer_get_time();
344
+ vp8_short_idct4x4llm_s3(coefficients, source + 32, 32, simd + 32, 32);
345
+ simdUs += esp_timer_get_time() - before;
346
+ if (std::memcmp(scalar, simd, sizeof(scalar))) {
347
+ std::printf("GEADEV:SIMDBENCH idct_mismatch case=%u coefficients=", test);
348
+ for (const auto coefficient : coefficients) std::printf("%d,", coefficient);
349
+ std::printf(" scalar=");
350
+ for (unsigned i=0;i<16;++i) std::printf("%u,", scalar[32+(i/4)*32+i%4]);
351
+ std::printf(" simd=");
352
+ for (unsigned i=0;i<16;++i) std::printf("%u,", simd[32+(i/4)*32+i%4]);
353
+ std::printf("\n");
354
+ throw std::runtime_error("idct-mismatch");
355
+ }
356
+ std::memcpy(copy, coefficients, sizeof(copy));
357
+ vp8_dequant_idct_add_c(coefficients, quantizers, scalar + 32, 32);
358
+ vp8_dequant_idct_add_s3(copy, quantizers, simd + 32, 32);
359
+ if (std::memcmp(scalar, simd, sizeof(scalar)) || std::memcmp(coefficients, copy, sizeof(copy)))
360
+ throw std::runtime_error("dequant-mismatch");
361
+ vp8_dc_only_idct_add_c(short(state), source + 32, 32, scalar + 32, 32);
362
+ vp8_dc_only_idct_add_s3(short(state), source + 32, 32, simd + 32, 32);
363
+ if (std::memcmp(scalar, simd, sizeof(scalar))) throw std::runtime_error("dc-idct-mismatch");
364
+ if (!(test & 255)) vTaskDelay(1);
365
+ }
366
+ std::printf("GEADEV:SIMDBENCH idct_cases=4096 dequant_cases=4096 walsh_cases=4096 dc_cases=4096 scalar_us=%llu simd_us=%llu exact=1\n",
367
+ (unsigned long long)scalarUs, (unsigned long long)simdUs);
368
+ {
369
+ alignas(16) short expectedQ[24*16], actualQ[24*16], dq[16];
370
+ alignas(16) uint8_t expectedPixels[3*32*20], actualPixels[3*32*20];
371
+ char eobs[24];
372
+ uint64_t scalarBlocksUs = 0, simdBlocksUs = 0;
373
+ for (unsigned test = 0; test < 1024; ++test) {
374
+ for (auto& q : expectedQ) {
375
+ state ^= state << 13; state ^= state >> 17; state ^= state << 5;
376
+ q = short(state);
377
+ }
378
+ for (auto& d : dq) {
379
+ state ^= state << 13; state ^= state >> 17; state ^= state << 5;
380
+ d = short(state);
381
+ }
382
+ for (unsigned block = 0; block < 24; ++block) {
383
+ eobs[block] = char((test + block) % 17);
384
+ // Exercise skipped zero DC and short-wrap-to-zero as well as
385
+ // mixed DC/full transforms and arbitrary extreme coefficients.
386
+ if (test % 4 == 0) expectedQ[block*16] = 0;
387
+ if (test % 4 == 1) { expectedQ[block*16] = -32768; dq[0] = 2; }
388
+ }
389
+ std::memcpy(actualQ, expectedQ, sizeof(expectedQ));
390
+ for (auto& p : expectedPixels) p = uint8_t(state++);
391
+ std::memcpy(actualPixels, expectedPixels, sizeof(expectedPixels));
392
+ auto before = esp_timer_get_time();
393
+ vp8_dequant_idct_add_y_block_c(expectedQ, dq, expectedPixels + 32, 32, eobs);
394
+ vp8_dequant_idct_add_uv_block_c(expectedQ + 256, dq, expectedPixels + 32*21,
395
+ expectedPixels + 32*41, 32, eobs + 16);
396
+ scalarBlocksUs += esp_timer_get_time() - before;
397
+ before = esp_timer_get_time();
398
+ vp8_dequant_idct_add_y_block_s3(actualQ, dq, actualPixels + 32, 32, eobs);
399
+ vp8_dequant_idct_add_uv_block_s3(actualQ + 256, dq, actualPixels + 32*21,
400
+ actualPixels + 32*41, 32, eobs + 16);
401
+ simdBlocksUs += esp_timer_get_time() - before;
402
+ if (std::memcmp(expectedPixels, actualPixels, sizeof(expectedPixels)) ||
403
+ std::memcmp(expectedQ, actualQ, sizeof(expectedQ)))
404
+ throw std::runtime_error("macroblock-idct-mismatch");
405
+ if (!(test & 63)) vTaskDelay(1);
406
+ }
407
+ std::printf("GEADEV:SIMDBENCH macroblock_cases=1024 scalar_us=%llu simd_us=%llu exact=1\n",
408
+ (unsigned long long)scalarBlocksUs, (unsigned long long)simdBlocksUs);
409
+ }
410
+ using Loop = void (*)(unsigned char*, unsigned char*, unsigned char*, int, int, loop_filter_info*);
411
+ using Simple = void (*)(unsigned char*, int, const unsigned char*);
412
+ const Loop loops[][2] = {{vp8_loop_filter_bh_c, vp8_loop_filter_bh_s3},
413
+ {vp8_loop_filter_bv_c, vp8_loop_filter_bv_s3}, {vp8_loop_filter_mbh_c, vp8_loop_filter_mbh_s3},
414
+ {vp8_loop_filter_mbv_c, vp8_loop_filter_mbv_s3}};
415
+ const Simple simple[][2] = {{vp8_loop_filter_bhs_c, vp8_loop_filter_simple_bh_s3},
416
+ {vp8_loop_filter_bvs_c, vp8_loop_filter_simple_bv_s3},
417
+ {vp8_loop_filter_simple_horizontal_edge_c, vp8_loop_filter_simple_mbh_s3},
418
+ {vp8_loop_filter_simple_vertical_edge_c, vp8_loop_filter_simple_mbv_s3}};
419
+ alignas(16) uint8_t frameScalar[3*1024], frameSimd[3*1024];
420
+ scalarUs = simdUs = 0;
421
+ for (unsigned test = 0; test < 768; ++test) {
422
+ uint8_t mblim = uint8_t(test / 2), blim = mblim, limit = uint8_t(test % 64), hev = uint8_t(test % 4);
423
+ loop_filter_info info{&mblim, &blim, &limit, &hev};
424
+ for (unsigned kind = 0; kind < 8; ++kind) {
425
+ for (unsigned i = 0; i < sizeof(frameScalar); ++i) {
426
+ state ^= state << 13; state ^= state >> 17; state ^= state << 5;
427
+ // Smooth ramps and small discontinuities exercise accepted filters;
428
+ // arbitrary noise exercises masks and extreme pixel values.
429
+ frameScalar[i] = frameSimd[i] = test >= 512 ? uint8_t(test - 512) :
430
+ uint8_t((test & 1) ? state : test + (i/32)*2 + (state & 7));
431
+ }
432
+ const unsigned offset = 8*32 + 8 + (test % 4);
433
+ auto before = esp_timer_get_time();
434
+ if (kind < 4) loops[kind][0](frameScalar+offset, frameScalar+1024+offset,
435
+ frameScalar+2048+offset, 32, 32, &info);
436
+ else simple[kind-4][0](frameScalar+offset, 32, &blim);
437
+ scalarUs += esp_timer_get_time() - before;
438
+ before = esp_timer_get_time();
439
+ if (kind < 4) loops[kind][1](frameSimd+offset, frameSimd+1024+offset,
440
+ frameSimd+2048+offset, 32, 32, &info);
441
+ else simple[kind-4][1](frameSimd+offset, 32, &blim);
442
+ simdUs += esp_timer_get_time() - before;
443
+ if (std::memcmp(frameScalar, frameSimd, sizeof(frameScalar))) {
444
+ std::printf("GEADEV:SIMDBENCH loop_mismatch case=%u kind=%u\n", test, kind);
445
+ throw std::runtime_error("loop-filter-mismatch");
446
+ }
447
+ }
448
+ if (!(test & 15)) vTaskDelay(1);
449
+ }
450
+ std::printf("GEADEV:SIMDBENCH loop_cases=6144 scalar_us=%llu simd_us=%llu exact=1\n",
451
+ (unsigned long long)scalarUs, (unsigned long long)simdUs);
452
+ }
453
+ workspace.verify();
454
+ std::printf("GEADEV:SIMDBENCH workspace_bytes=%u exact=1\n", GEA_VP8_WORKSPACE_BYTES);
455
+ std::puts("GEADEV:SIMDBENCH END");
456
+ } catch (const std::exception& error) { std::printf("GEADEV:ERR SIMDBENCH %s\n", error.what()); }
457
+ std::fflush(stdout);
458
+ xSemaphoreGive(job.done);
459
+ vTaskSuspend(nullptr);
460
+ };
461
+ TaskHandle_t task = nullptr;
462
+ if (xTaskCreatePinnedToCoreWithCaps(run, "gea_simd_bench", 32*1024, &job, 3, &task, 1,
463
+ MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT) != pdPASS)
464
+ std::puts("GEADEV:ERR SIMDBENCH task-allocation");
465
+ else {
466
+ xSemaphoreTake(job.done, portMAX_DELAY);
467
+ while (eTaskGetState(task) != eSuspended) vTaskDelay(1);
468
+ vTaskDeleteWithCaps(task);
469
+ }
470
+ vSemaphoreDelete(job.done);
471
+ }
472
+ }
473
+ #else
474
+ namespace gea::platform::esp32::services {
475
+ inline void benchmarkVideoSimd(unsigned = 0) { std::puts("GEADEV:ERR SIMDBENCH unavailable"); }
476
+ }
477
+ #endif
@@ -0,0 +1,147 @@
1
+ // Offline diagnostic; no signaling, microphone, audio playback or cloud room.
2
+ #pragma once
3
+ #include <cstdio>
4
+
5
+ #if defined(GEA_EMBEDDED_VP8_BENCHMARK) && GEA_EMBEDDED_VP8_BENCHMARK && __has_include(<vpx/vpx_decoder.h>)
6
+ #include "host/rtc_vp8_decoder.h"
7
+ #include "host/rtc_vp8_capture.h"
8
+ #include "esp_timer.h"
9
+ #include "freertos/idf_additions.h"
10
+ #include "freertos/semphr.h"
11
+ #include <cstdio>
12
+ #include <cstring>
13
+ #include <stdexcept>
14
+
15
+ namespace gea::platform::esp32::services {
16
+
17
+ inline void startVp8Capture() {
18
+ if (!gea::host::rtc::vp8::capture().start())
19
+ std::puts("GEADEV:ERR VP8CAPTURE stop-conversation-first");
20
+ else std::puts("GEADEV:VP8CAPTURE READY max_frames=12 max_bytes=131072");
21
+ }
22
+
23
+ inline void saveVp8Capture() {
24
+ auto& capture = gea::host::rtc::vp8::capture();
25
+ if (!capture.save("/storage/gea-vp8-live-benchmark.ivf"))
26
+ std::puts("GEADEV:ERR VP8CAPTURE save-failed-or-worker-active");
27
+ else capture.report();
28
+ }
29
+
30
+ inline void cancelVp8Capture() {
31
+ gea::host::rtc::vp8::capture().cancel();
32
+ std::puts("GEADEV:VP8CAPTURE CANCELLED");
33
+ }
34
+
35
+ inline configRUN_TIME_COUNTER_TYPE vp8BenchmarkTaskCpu() {
36
+ #if CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS
37
+ TaskStatus_t status{};
38
+ vTaskGetInfo(nullptr, &status, pdFALSE, eInvalid);
39
+ return status.ulRunTimeCounter;
40
+ #else
41
+ return 0;
42
+ #endif
43
+ }
44
+
45
+ // Runs synchronously from the diagnostic console, on a joined PSRAM worker
46
+ // with the same stack/core/priority as live video. Read flash from the console's
47
+ // internal stack first: SPIFFS disables caches and cannot run on a PSRAM stack.
48
+ inline void benchmarkVp8File(const char* path) {
49
+ if (!path) {
50
+ std::printf("GEADEV:ERR VP8BENCH usage=VP8BENCH_path.ivf\n");
51
+ return;
52
+ }
53
+ std::vector<uint8_t, gea::host::media::VideoAllocator<uint8_t>> bytes;
54
+ try {
55
+ using File = std::unique_ptr<std::FILE, decltype(&std::fclose)>;
56
+ File file(std::fopen(path, "rb"), std::fclose);
57
+ if (!file || std::fseek(file.get(), 0, SEEK_END)) throw std::runtime_error("open-failed");
58
+ const long size = std::ftell(file.get());
59
+ if (size < 32 || size > 1024*1024 || std::fseek(file.get(), 0, SEEK_SET))
60
+ throw std::runtime_error("invalid-file-size");
61
+ bytes.resize(size);
62
+ if (std::fread(bytes.data(), 1, bytes.size(), file.get()) != bytes.size())
63
+ throw std::runtime_error("file-read-failed");
64
+ } catch (const std::exception& error) {
65
+ std::printf("GEADEV:ERR VP8BENCH %s\n", error.what());
66
+ return;
67
+ }
68
+ struct Job { std::span<const uint8_t> bytes; SemaphoreHandle_t done; } job{bytes, xSemaphoreCreateBinary()};
69
+ if (!job.done) {
70
+ std::printf("GEADEV:ERR VP8BENCH semaphore-allocation\n");
71
+ return;
72
+ }
73
+ TaskHandle_t task = nullptr;
74
+ const auto run = [](void* context) {
75
+ auto& job = *static_cast<Job*>(context);
76
+ const auto work = [&] {
77
+ using namespace gea::host;
78
+ const auto* header = job.bytes.data();
79
+ if (std::memcmp(header, "DKIF", 4) ||
80
+ header[4] || header[5] || header[6] != 32 || header[7] || std::memcmp(header+8, "VP80", 4))
81
+ throw std::runtime_error("invalid-IVF-header");
82
+ rtc::vp8::Decoder decoder;
83
+ size_t cursor = 32;
84
+ const int64_t start = esp_timer_get_time();
85
+ unsigned frames = 0;
86
+ uint64_t decodeTotal = 0, convertTotal = 0;
87
+ while (frames < 300 && esp_timer_get_time() - start < 15'000'000) {
88
+ if (cursor == job.bytes.size()) break;
89
+ if (job.bytes.size() - cursor < 12) throw std::runtime_error("truncated-frame-header");
90
+ const auto* frameHeader = job.bytes.data() + cursor;
91
+ cursor += 12;
92
+ const uint32_t size = uint32_t(frameHeader[0]) | uint32_t(frameHeader[1]) << 8 |
93
+ uint32_t(frameHeader[2]) << 16 | uint32_t(frameHeader[3]) << 24;
94
+ if (!size || size > rtc::vp8::Assembler::maxFrameBytes) throw std::runtime_error("invalid-frame-size");
95
+ if (size > job.bytes.size() - cursor) throw std::runtime_error("truncated-frame");
96
+ const auto encoded = job.bytes.subspan(cursor, size);
97
+ cursor += size;
98
+ const auto cpuStarted = vp8BenchmarkTaskCpu();
99
+ const auto frame = decoder.decode(encoded, frames);
100
+ const auto cpuUs = configRUN_TIME_COUNTER_TYPE(vp8BenchmarkTaskCpu() - cpuStarted);
101
+ if (!frame) throw std::runtime_error("decode-failed");
102
+ const auto timing = decoder.timing();
103
+ decodeTotal += timing.decodeUs;
104
+ convertTotal += timing.convertUs;
105
+ std::printf("GEADEV:VP8BENCH FRAME n=%u key=%u bytes=%u width=%u height=%u decode_us=%llu convert_us=%llu allocate_us=%llu output_alignment=%u cpu_us=%llu\n",
106
+ frames++, unsigned(!(encoded[0]&1)), unsigned(size), unsigned(frame->width), unsigned(frame->height),
107
+ (unsigned long long)timing.decodeUs, (unsigned long long)timing.convertUs,
108
+ (unsigned long long)timing.allocateUs, unsigned(uintptr_t(frame->rgb565.data()) & 15),
109
+ (unsigned long long)cpuUs);
110
+ if (timing.macroblocks) std::printf("GEADEV:VP8BENCH STAGES tokens_us=%llu reconstruction_us=%llu loopfilter_us=%llu other_us=%llu macroblocks=%u token_blocks=%u filter_rows=%u\n",
111
+ (unsigned long long)timing.tokenUs,
112
+ (unsigned long long)(timing.macroblockUs >= timing.tokenUs ? timing.macroblockUs - timing.tokenUs : 0),
113
+ (unsigned long long)timing.filterUs,
114
+ (unsigned long long)(timing.decodeUs >= timing.macroblockUs + timing.filterUs ? timing.decodeUs - timing.macroblockUs - timing.filterUs : 0),
115
+ timing.macroblocks, timing.tokenBlocks, timing.filterRows);
116
+ vTaskDelay(1);
117
+ }
118
+ if (!frames) throw std::runtime_error("empty-IVF");
119
+ std::printf("GEADEV:VP8BENCH END frames=%u elapsed_us=%lld decode_us=%llu convert_us=%llu\n",
120
+ frames, (long long)(esp_timer_get_time()-start),
121
+ (unsigned long long)decodeTotal, (unsigned long long)convertTotal);
122
+ };
123
+ try { work(); }
124
+ catch (const std::exception& error) { std::printf("GEADEV:ERR VP8BENCH %s\n", error.what()); }
125
+ std::fflush(stdout);
126
+ xSemaphoreGive(job.done);
127
+ vTaskSuspend(nullptr);
128
+ };
129
+ if (xTaskCreatePinnedToCoreWithCaps(run, "gea_vp8_bench", 64*1024, &job, 3, &task, 1,
130
+ MALLOC_CAP_SPIRAM | MALLOC_CAP_8BIT) != pdPASS) {
131
+ std::printf("GEADEV:ERR VP8BENCH task-allocation\n");
132
+ } else {
133
+ xSemaphoreTake(job.done, portMAX_DELAY);
134
+ while (eTaskGetState(task) != eSuspended) vTaskDelay(1);
135
+ vTaskDeleteWithCaps(task);
136
+ }
137
+ vSemaphoreDelete(job.done);
138
+ }
139
+ } // namespace gea::platform::esp32::services
140
+ #else
141
+ namespace gea::platform::esp32::services {
142
+ inline void startVp8Capture() { std::puts("GEADEV:ERR VP8CAPTURE unavailable"); }
143
+ inline void saveVp8Capture() { std::puts("GEADEV:ERR VP8CAPTURE unavailable"); }
144
+ inline void cancelVp8Capture() { std::puts("GEADEV:ERR VP8CAPTURE unavailable"); }
145
+ inline void benchmarkVp8File(const char*) { std::printf("GEADEV:ERR VP8BENCH unavailable\n"); }
146
+ }
147
+ #endif