提交 77469e43 编写于 作者: J jsjzju

IssueNo:#I3E1FU

Description:Fix NEON transform bug caused by fixed number optimization
Sig:graphic
Feture or Bufix:Bugfix
Binary Source:No

Change-Id: Id60b2107313c24cf72236d23e40a9210c43af6f1
上级 8b6e8160
......@@ -900,13 +900,11 @@ void DrawUtils::DrawTriangleTrueColorBilinear888(const TriangleScanInfo& in)
static void DrawTriangleTrueColorBilinear8888Inner(const TriangleScanInfo& in,
uint8_t* screenBuffer,
int16_t len)
int16_t len,
int32_t u,
int32_t v)
{
ColorMode bufferMode = ScreenDeviceProxy::GetInstance()->GetBufferMode();
// parameters below are Q15 fixed-point number
int32_t u = in.init.verticalU;
int32_t v = in.init.verticalV;
// parameters above are Q15 fixed-point number
for (int16_t x = 0; x < len; ++x) {
int16_t intU = FO_TO_INTEGER(u);
int16_t intV = FO_TO_INTEGER(v);
......@@ -1070,13 +1068,17 @@ static void DrawTriangleTrueColorBilinear8888InnerNeon(const TriangleScanInfo& i
vOutA = NeonMulDiv255(vdup_n_u8(in.opaScale), vOutA);
pipeLine.Invoke(screenBuffer, vOutR, vOutG, vOutB, vOutA);
} else {
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, NEON_STEP_8);
int32_t fixedU = FO_TRANS_FLOAT_TO_FIXED(arrayU[0]);
int32_t fixedV = FO_TRANS_FLOAT_TO_FIXED(arrayV[0]);
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, NEON_STEP_8, fixedU, fixedV);
}
screenBuffer += step;
len -= NEON_STEP_8;
}
if (len > 0) {
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, len);
int32_t fixedU = FO_TRANS_FLOAT_TO_FIXED(u);
int32_t fixedV = FO_TRANS_FLOAT_TO_FIXED(v);
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, len, fixedU, fixedV);
}
}
#endif
......@@ -1120,8 +1122,10 @@ void DrawUtils::DrawTriangleTrueColorBilinear8888(const TriangleScanInfo& in)
}
#else
{
int32_t u = in.init.verticalU;
int32_t v = in.init.verticalV;
DEBUG_PERFORMANCE_TRACE("DrawTriangleTrueColorBilinear8888");
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, xMax - xMin + 1);
DrawTriangleTrueColorBilinear8888Inner(in, screenBuffer, xMax - xMin + 1, u, v);
}
#endif
StepToNextLine(in.edge1, in.edge2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册