diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 15:15:40 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-09 15:15:40 (GMT) |
commit | c7c96a90bcf1366ac6f350f5506d0afee611e351 (patch) | |
tree | 4134c189d25fe972f2717f4b642a26e5f323a922 /Modules/yuvconvert.c | |
parent | ba32864b2d97018c71ce90926c853a67e79becf7 (diff) | |
download | cpython-c7c96a90bcf1366ac6f350f5506d0afee611e351.zip cpython-c7c96a90bcf1366ac6f350f5506d0afee611e351.tar.gz cpython-c7c96a90bcf1366ac6f350f5506d0afee611e351.tar.bz2 |
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
Diffstat (limited to 'Modules/yuvconvert.c')
-rw-r--r-- | Modules/yuvconvert.c | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/Modules/yuvconvert.c b/Modules/yuvconvert.c index e5333d9..a0fa639 100644 --- a/Modules/yuvconvert.c +++ b/Modules/yuvconvert.c @@ -4,115 +4,115 @@ void yuv_sv411_to_cl422dc(int invert, void *data, void *yuv, int width, int height) { - struct yuv411 *in = data; - struct yuv422 *out_even = yuv; - struct yuv422 *out_odd = out_even + width / 2; - int i, j; /* counters */ + struct yuv411 *in = data; + struct yuv422 *out_even = yuv; + struct yuv422 *out_odd = out_even + width / 2; + int i, j; /* counters */ - for (i = height / 2; i--; ) { - for (j = width / 4; j--; ) { - YUV422_Y0(*out_even) = YUV411_Y00(*in); - YUV422_U0(*out_even) = YUV411_U00(*in); - YUV422_V0(*out_even) = YUV411_V00(*in); - YUV422_Y1(*out_even) = YUV411_Y01(*in); - out_even++; - YUV422_Y0(*out_even) = YUV411_Y02(*in); - YUV422_U0(*out_even) = YUV411_U02(*in); - YUV422_V0(*out_even) = YUV411_V02(*in); - YUV422_Y1(*out_even) = YUV411_Y03(*in); - out_even++; - YUV422_Y0(*out_odd) = YUV411_Y10(*in); - YUV422_U0(*out_odd) = YUV411_U10(*in); - YUV422_V0(*out_odd) = YUV411_V10(*in); - YUV422_Y1(*out_odd) = YUV411_Y11(*in); - out_odd++; - YUV422_Y0(*out_odd) = YUV411_Y12(*in); - YUV422_U0(*out_odd) = YUV411_U12(*in); - YUV422_V0(*out_odd) = YUV411_V12(*in); - YUV422_Y1(*out_odd) = YUV411_Y13(*in); - out_odd++; - in++; - } - out_even += width / 2; - out_odd += width / 2; - } + for (i = height / 2; i--; ) { + for (j = width / 4; j--; ) { + YUV422_Y0(*out_even) = YUV411_Y00(*in); + YUV422_U0(*out_even) = YUV411_U00(*in); + YUV422_V0(*out_even) = YUV411_V00(*in); + YUV422_Y1(*out_even) = YUV411_Y01(*in); + out_even++; + YUV422_Y0(*out_even) = YUV411_Y02(*in); + YUV422_U0(*out_even) = YUV411_U02(*in); + YUV422_V0(*out_even) = YUV411_V02(*in); + YUV422_Y1(*out_even) = YUV411_Y03(*in); + out_even++; + YUV422_Y0(*out_odd) = YUV411_Y10(*in); + YUV422_U0(*out_odd) = YUV411_U10(*in); + YUV422_V0(*out_odd) = YUV411_V10(*in); + YUV422_Y1(*out_odd) = YUV411_Y11(*in); + out_odd++; + YUV422_Y0(*out_odd) = YUV411_Y12(*in); + YUV422_U0(*out_odd) = YUV411_U12(*in); + YUV422_V0(*out_odd) = YUV411_V12(*in); + YUV422_Y1(*out_odd) = YUV411_Y13(*in); + out_odd++; + in++; + } + out_even += width / 2; + out_odd += width / 2; + } } void yuv_sv411_to_cl422dc_quartersize(int invert, void *data, void *yuv, - int width, int height) + int width, int height) { - int w4 = width / 4; /* quarter of width is used often */ - struct yuv411 *in_even = data; - struct yuv411 *in_odd = in_even + w4; - struct yuv422 *out_even = yuv; - struct yuv422 *out_odd = out_even + w4; - int i, j; /* counters */ - int u, v; /* U and V values */ + int w4 = width / 4; /* quarter of width is used often */ + struct yuv411 *in_even = data; + struct yuv411 *in_odd = in_even + w4; + struct yuv422 *out_even = yuv; + struct yuv422 *out_odd = out_even + w4; + int i, j; /* counters */ + int u, v; /* U and V values */ - for (i = height / 4; i--; ) { - for (j = w4; j--; ) { - u = YUV411_U00(*in_even); - v = YUV411_V00(*in_even); + for (i = height / 4; i--; ) { + for (j = w4; j--; ) { + u = YUV411_U00(*in_even); + v = YUV411_V00(*in_even); - YUV422_Y0(*out_even) = YUV411_Y00(*in_even); - YUV422_U0(*out_even) = u; - YUV422_V0(*out_even) = v; - YUV422_Y1(*out_even) = YUV411_Y02(*in_even); + YUV422_Y0(*out_even) = YUV411_Y00(*in_even); + YUV422_U0(*out_even) = u; + YUV422_V0(*out_even) = v; + YUV422_Y1(*out_even) = YUV411_Y02(*in_even); - YUV422_Y0(*out_odd) = YUV411_Y10(*in_odd); - YUV422_U0(*out_odd) = u; - YUV422_V0(*out_odd) = v; - YUV422_Y1(*out_odd) = YUV411_Y12(*in_odd); + YUV422_Y0(*out_odd) = YUV411_Y10(*in_odd); + YUV422_U0(*out_odd) = u; + YUV422_V0(*out_odd) = v; + YUV422_Y1(*out_odd) = YUV411_Y12(*in_odd); - in_even++; - in_odd++; - out_even++; - out_odd++; - } - in_even += w4; - in_odd += w4; - out_even += w4; - out_odd += w4; - } + in_even++; + in_odd++; + out_even++; + out_odd++; + } + in_even += w4; + in_odd += w4; + out_even += w4; + out_odd += w4; + } } void yuv_sv411_to_cl422dc_sixteenthsize(int invert, void *data, void *yuv, - int width, int height) + int width, int height) { - int w4_3 = 3 * width / 4; /* three quarters of width is used often */ - int w8 = width / 8; /* and so is one eighth */ - struct yuv411 *in_even = data; - struct yuv411 *in_odd = in_even + width / 2; - struct yuv422 *out_even = yuv; - struct yuv422 *out_odd = out_even + w8; - int i, j; /* counters */ - int u, v; /* U and V values */ + int w4_3 = 3 * width / 4; /* three quarters of width is used often */ + int w8 = width / 8; /* and so is one eighth */ + struct yuv411 *in_even = data; + struct yuv411 *in_odd = in_even + width / 2; + struct yuv422 *out_even = yuv; + struct yuv422 *out_odd = out_even + w8; + int i, j; /* counters */ + int u, v; /* U and V values */ - for (i = height / 8; i--; ) { - for (j = w8; j--; ) { - u = YUV411_U00(in_even[0]); - v = YUV411_V00(in_even[0]); + for (i = height / 8; i--; ) { + for (j = w8; j--; ) { + u = YUV411_U00(in_even[0]); + v = YUV411_V00(in_even[0]); - YUV422_Y0(*out_even) = YUV411_Y00(in_even[0]); - YUV422_U0(*out_even) = u; - YUV422_V0(*out_even) = v; - YUV422_Y1(*out_even) = YUV411_Y00(in_even[1]); + YUV422_Y0(*out_even) = YUV411_Y00(in_even[0]); + YUV422_U0(*out_even) = u; + YUV422_V0(*out_even) = v; + YUV422_Y1(*out_even) = YUV411_Y00(in_even[1]); - YUV422_Y0(*out_odd) = YUV411_Y00(in_odd[0]); - YUV422_U0(*out_odd) = u; - YUV422_V0(*out_odd) = v; - YUV422_Y1(*out_odd) = YUV411_Y00(in_even[1]); + YUV422_Y0(*out_odd) = YUV411_Y00(in_odd[0]); + YUV422_U0(*out_odd) = u; + YUV422_V0(*out_odd) = v; + YUV422_Y1(*out_odd) = YUV411_Y00(in_even[1]); - in_even += 2; - in_odd += 2; - out_even++; - out_odd++; - } - in_even += w4_3; - in_odd += w4_3; - out_even += w8; - out_odd += w8; - } + in_even += 2; + in_odd += 2; + out_even++; + out_odd++; + } + in_even += w4_3; + in_odd += w4_3; + out_even += w8; + out_odd += w8; + } } |