summaryrefslogtreecommitdiff
path: root/apps/recorder/resize.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder/resize.c')
-rw-r--r--apps/recorder/resize.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/recorder/resize.c b/apps/recorder/resize.c
index e75638140b..79be59804a 100644
--- a/apps/recorder/resize.c
+++ b/apps/recorder/resize.c
@@ -253,7 +253,7 @@ static inline bool scale_v_area(struct rowset *rset, struct scaler_context *ctx)
253 /* Set up rounding and scale factors */ 253 /* Set up rounding and scale factors */
254 ctx->divisor *= ctx->src->height; 254 ctx->divisor *= ctx->src->height;
255 ctx->round = ctx->divisor >> 1; 255 ctx->round = ctx->divisor >> 1;
256 ctx->divisor = (((ctx->divisor >> 1) + SC_NUM) / ctx->divisor) << SC_FIX; 256 ctx->divisor = 1 + (-((ctx->divisor + 1) >> 1)) / ctx->divisor;
257 mul = 0; 257 mul = 0;
258 oy = rset->rowstart; 258 oy = rset->rowstart;
259 oye = 0; 259 oye = 0;
@@ -451,7 +451,7 @@ static inline bool scale_v_linear(struct rowset *rset,
451 /* Set up scale and rounding factors, the divisor is bm->height - 1 */ 451 /* Set up scale and rounding factors, the divisor is bm->height - 1 */
452 ctx->divisor *= (ctx->bm->height - 1); 452 ctx->divisor *= (ctx->bm->height - 1);
453 ctx->round = ctx->divisor >> 1; 453 ctx->round = ctx->divisor >> 1;
454 ctx->divisor = (((ctx->divisor >> 1) + SC_NUM) / ctx->divisor) << SC_FIX; 454 ctx->divisor = 1 + (-((ctx->divisor + 1) >> 1)) / ctx->divisor;
455 /* Set up our two temp buffers. The names are generic because they'll be 455 /* Set up our two temp buffers. The names are generic because they'll be
456 swapped each time a new input row is read 456 swapped each time a new input row is read
457 */ 457 */