#include "fp_streamops.cpp"
#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>

#include <stdlib.h>

#define  lim 1024

#define size 1024

int  fourchannel = 0;;
#if 1

typedef float  __BrtFloat1;;
typedef float2  __BrtFloat2;;
typedef float4  __BrtFloat4;;
#endif


__BrtFloat1  pack_4ubyte(__BrtFloat4  input)
 {
unsigned char  array[sizeof(float ) ];
void  *tmp = array;
__BrtFloat1  ret;
array[0] = (unsigned char ) (input.x * 255.000000f);array[1] = (unsigned char ) (input.y * 255.000000f);array[2] = (unsigned char ) (input.z * 255.000000f);array[3] = (unsigned char ) (input.w * 255.000000f);
ret=(float ) (*(float *) (tmp));
return ret;


}

__BrtFloat4  unpack_4ubyte(__BrtFloat1  input)
 {
unsigned char  array[sizeof(float )  / sizeof(unsigned char ) ];
void  *tmp = array;
__BrtFloat4  ret;
__BrtFloat1  ttmpa;
__BrtFloat1  ttmpb;
__BrtFloat1  ttmpc;
__BrtFloat1  ttmpd;
memcpy(tmp,&input,sizeof(float ) );

ttmpa=(array[(int)(0)]) /(256.000000f);

ttmpb=(array[(int)(1)]) /(256.000000f);

ttmpc=(array[(int)(2)]) /(256.000000f);

ttmpd=(array[(int)(3)]) /(256.000000f);
