Skip to content

Commit

Permalink
scaling factor typo in 24 bit output conversion fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
spectralcode committed Feb 16, 2024
1 parent eee5a2d commit 4726acc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octproz_project/octproz/src/cuda_code.cu
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ __global__ void floatToOutput(void *output, const float *input, const int output
out[index] = (unsigned short)(input[index] * (65535.0)); //16 bit
}else if(outputBitdepth > 16 && outputBitdepth <= 24){
unsigned int* out = (unsigned int*)output;
out[index] = (unsigned int)(input[index] * (167772165.0f)); //24 bit
out[index] = (unsigned int)(input[index] * (16777215.0f)); //24 bit
}else{
unsigned int* out = (unsigned int*)output;
out[index] = (unsigned int)(input[index] * (4294967295.0f)); //32 bit
Expand Down

0 comments on commit 4726acc

Please sign in to comment.