Skip to content

Commit

Permalink
Fix variable names in SharpYuvComputeConversionMatrix
Browse files Browse the repository at this point in the history
Change-Id: Ia07e71aae42396100a4f50dc104e828239522d77
  • Loading branch information
maryla-uc committed Nov 7, 2024
1 parent a3ba6f1 commit 2ddaaf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sharpyuv/sharpyuv_csp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ void SharpYuvComputeConversionMatrix(const SharpYuvColorSpace* yuv_color_space,
const float kr = yuv_color_space->kr;
const float kb = yuv_color_space->kb;
const float kg = 1.0f - kr - kb;
const float cr = 0.5f / (1.0f - kb);
const float cb = 0.5f / (1.0f - kr);
const float cb = 0.5f / (1.0f - kb);
const float cr = 0.5f / (1.0f - kr);

const int shift = yuv_color_space->bit_depth - 8;

const float denom = (float)((1 << yuv_color_space->bit_depth) - 1);
float scale_y = 1.0f;
float add_y = 0.0f;
float scale_u = cr;
float scale_v = cb;
float scale_u = cb;
float scale_v = cr;
float add_uv = (float)(128 << shift);
assert(yuv_color_space->bit_depth >= 8);

Expand Down

0 comments on commit 2ddaaf0

Please sign in to comment.