diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-05-07 16:31:02 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-09 16:59:42 +0200 |
commit | 570d63eef3f911869672cd20fa9c2abedb11093d (patch) | |
tree | 2b993b08de62362e2e59e8049e28a92e6c2bb0af /libswscale/rgb2rgb_template.c | |
parent | d9cb1e0e15e5cabb0b36f10cba079ea6532ed8e7 (diff) | |
download | ffmpeg-570d63eef3f911869672cd20fa9c2abedb11093d.tar.gz |
lavu: add FF_CEIL_RSHIFT and use it in various places.
Diffstat (limited to 'libswscale/rgb2rgb_template.c')
-rw-r--r-- | libswscale/rgb2rgb_template.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 545c59add8..98e3a1472e 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -823,7 +823,7 @@ static void yuyvtoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int lumStride, int chromStride, int srcStride) { int y; - const int chromWidth = -((-width) >> 1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y = 0; y < height; y++) { extract_even_c(src, ydst, width); @@ -843,7 +843,7 @@ static void yuyvtoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int lumStride, int chromStride, int srcStride) { int y; - const int chromWidth = -((-width) >> 1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y = 0; y < height; y++) { extract_even_c(src, ydst, width); @@ -861,7 +861,7 @@ static void uyvytoyuv420_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int lumStride, int chromStride, int srcStride) { int y; - const int chromWidth = -((-width) >> 1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y = 0; y < height; y++) { extract_even_c(src + 1, ydst, width); @@ -881,7 +881,7 @@ static void uyvytoyuv422_c(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int lumStride, int chromStride, int srcStride) { int y; - const int chromWidth = -((-width) >> 1); + const int chromWidth = FF_CEIL_RSHIFT(width, 1); for (y = 0; y < height; y++) { extract_even_c(src + 1, ydst, width); |