zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=d7967b8395f556fa54dfe9bab8b2e83862de8204
commit d7967b8395f556fa54dfe9bab8b2e83862de8204 Author: Hermet Park <[email protected]> Date: Thu Apr 18 18:51:16 2019 +0900 evas common: small optimization. don't repeat computing every iteration. --- src/lib/evas/common/evas_convert_yuv.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/common/evas_convert_yuv.c b/src/lib/evas/common/evas_convert_yuv.c index d199ec5aa5..ee753d1961 100644 --- a/src/lib/evas/common/evas_convert_yuv.c +++ b/src/lib/evas/common/evas_convert_yuv.c @@ -1622,9 +1622,10 @@ _evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) unsigned char *yp1, *yp2, *up, *vp; unsigned char *dp1; unsigned char *dp2; + int stride = sizeof(DATA32) * w; dp1 = rgb; - dp2 = dp1 + sizeof (int) * w; + dp2 = dp1 + stride; for (yy = 0; yy < h; yy++) { @@ -1646,8 +1647,8 @@ _evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h) } /* jump one line */ - dp1 += sizeof (int) * w; - dp2 += sizeof (int) * w; + dp1 += stride; + dp2 += stride; } } --
