@@ -36,6 +36,7 @@ namespace coder {
36
36
using hwy::HWY_NAMESPACE::ShiftLeft;
37
37
using hwy::HWY_NAMESPACE::ShiftRight;
38
38
using hwy::float32_t ;
39
+ using hwy::float16_t ;
39
40
40
41
FixedTag<float32_t , 4 > fixedFloatTag;
41
42
@@ -197,8 +198,6 @@ namespace coder {
197
198
FixedTag<uint16_t , 4 > d;
198
199
199
200
const Rebind<uint32_t , decltype (d)> signed32;
200
- const Rebind<int32_t , decltype (df32)> floatToSigned;
201
- const Rebind<uint8_t , FixedTag<float32_t , 4 >> rebindOrigin;
202
201
203
202
const Rebind<float32_t , decltype (signed32)> rebind32;
204
203
const FixedTag<uint16_t , 4 > du16;
@@ -209,8 +208,6 @@ namespace coder {
209
208
210
209
auto ptr16 = reinterpret_cast <uint16_t *>(data);
211
210
212
- VF32 vColors = Set (df32, (float ) maxColors);
213
-
214
211
int pixels = 4 ;
215
212
216
213
int x = 0 ;
@@ -234,7 +231,7 @@ namespace coder {
234
231
VU16 bNew = BitCast (du16, DemoteTo (rebind16, pqB));
235
232
236
233
StoreInterleaved4 (rNew, gNew , bNew, AURow, d,
237
- reinterpret_cast <uint8_t *>(ptr16));
234
+ reinterpret_cast <uint16_t *>(ptr16));
238
235
ptr16 += 4 * 4 ;
239
236
}
240
237
@@ -335,14 +332,7 @@ namespace coder {
335
332
HWY_EXPORT (ProcessHLG);
336
333
HWY_DLLEXPORT void
337
334
ProcessHLG (uint8_t *data, bool halfFloats, int stride, int width, int height, int depth) {
338
- if (halfFloats) {
339
- // auto ptr16 = reinterpret_cast<uint16_t *>(data + y * stride);
340
- // if (halfFloats) {
341
- // HWY_DYNAMIC_DISPATCH(ProcessHLGu8Row)(reinterpret_cast<uint16_t *>(ptr16), width);
342
- // }
343
- } else {
344
- HWY_DYNAMIC_DISPATCH (ProcessHLG)(data, halfFloats, stride, width, height, depth);
345
- }
335
+ HWY_DYNAMIC_DISPATCH (ProcessHLG)(data, halfFloats, stride, width, height, depth);
346
336
}
347
337
}
348
338
#endif
0 commit comments