@@ -36,6 +36,7 @@ namespace coder {
3636 using hwy::HWY_NAMESPACE::ShiftLeft;
3737 using hwy::HWY_NAMESPACE::ShiftRight;
3838 using hwy::float32_t ;
39+ using hwy::float16_t ;
3940
4041 FixedTag<float32_t , 4 > fixedFloatTag;
4142
@@ -197,8 +198,6 @@ namespace coder {
197198 FixedTag<uint16_t , 4 > d;
198199
199200 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;
202201
203202 const Rebind<float32_t , decltype (signed32)> rebind32;
204203 const FixedTag<uint16_t , 4 > du16;
@@ -209,8 +208,6 @@ namespace coder {
209208
210209 auto ptr16 = reinterpret_cast <uint16_t *>(data);
211210
212- VF32 vColors = Set (df32, (float ) maxColors);
213-
214211 int pixels = 4 ;
215212
216213 int x = 0 ;
@@ -234,7 +231,7 @@ namespace coder {
234231 VU16 bNew = BitCast (du16, DemoteTo (rebind16, pqB));
235232
236233 StoreInterleaved4 (rNew, gNew , bNew, AURow, d,
237- reinterpret_cast <uint8_t *>(ptr16));
234+ reinterpret_cast <uint16_t *>(ptr16));
238235 ptr16 += 4 * 4 ;
239236 }
240237
@@ -335,14 +332,7 @@ namespace coder {
335332 HWY_EXPORT (ProcessHLG);
336333 HWY_DLLEXPORT void
337334 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);
346336 }
347337}
348338#endif
0 commit comments