From e8bc642202c10beda1ea4e93ec8492b1e39805e5 Mon Sep 17 00:00:00 2001 From: Clément Bœsch Date: Fri, 8 Jan 2016 16:16:10 +0100 Subject: lavu: add AV_CEIL_RSHIFT and use it in various places Signed-off-by: Vittorio Giovara --- libswscale/x86/rgb2rgb_template.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libswscale/x86') diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index 5d34c21711..a67a8a6029 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -2397,7 +2397,7 @@ static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co int lumStride, int chromStride, int srcStride) { int y; - const int chromWidth= -((-width)>>1); + const int chromWidth = AV_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = AV_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = AV_CEIL_RSHIFT(width, 1); for (y=0; y>1); + const int chromWidth = AV_CEIL_RSHIFT(width, 1); for (y=0; y