ngl: Make the C half-float implementation accessible

Make this accessible for tests.
This commit is contained in:
Matthias Clasen
2021-07-13 09:02:35 -04:00
parent 2d092ea280
commit fc9c34897a
2 changed files with 8 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ float_to_half (const float x)
return (b&0x80000000)>>16 | (e>112)*((((e-112)<<10)&0x7C00)|m>>13) | ((e<113)&(e>101))*((((0x007FF000+m)>>(125-e))+1)>>1) | (e>143)*0x7FFF; // sign : normalized : denormalized : saturate
}
static void
void
float_to_half4_c (const float f[4],
guint16 h[4])
{
@@ -64,7 +64,7 @@ float_to_half4_c (const float f[4],
h[3] = float_to_half (f[3]);
}
static void
void
half_to_float4_c (const guint16 h[4],
float f[4])
{

View File

@@ -41,6 +41,12 @@ void float_to_half4_f16c (const float f[4],
void half_to_float4_f16c (const guint16 h[4],
float f[4]);
void float_to_half4_c (const float f[4],
guint16 h[4]);
void half_to_float4_c (const guint16 h[4],
float f[4]);
G_END_DECLS
#endif