Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-01 16:46:00 +0400
committerClément Bœsch <ubitux@gmail.com>2013-05-09 18:59:43 +0400
commitf0250cc4636619fc00406f520a02c36efc24c5e2 (patch)
tree1d20dc39a640bdf372f1d698bd1dfc9be2db36cb /libavfilter/vf_overlay.c
parent570d63eef3f911869672cd20fa9c2abedb11093d (diff)
lavfi/overlay: simpler up-rounded w/h computations.
Diffstat (limited to 'libavfilter/vf_overlay.c')
-rw-r--r--libavfilter/vf_overlay.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 1681979e86..6494bada3c 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -478,10 +478,10 @@ static void blend_image(AVFilterContext *ctx,
for (i = 0; i < 3; i++) {
int hsub = i ? over->hsub : 0;
int vsub = i ? over->vsub : 0;
- int src_wp = FFALIGN(src_w, 1<<hsub) >> hsub;
- int src_hp = FFALIGN(src_h, 1<<vsub) >> vsub;
- int dst_wp = FFALIGN(dst_w, 1<<hsub) >> hsub;
- int dst_hp = FFALIGN(dst_h, 1<<vsub) >> vsub;
+ int src_wp = FF_CEIL_RSHIFT(src_w, hsub);
+ int src_hp = FF_CEIL_RSHIFT(src_h, vsub);
+ int dst_wp = FF_CEIL_RSHIFT(dst_w, hsub);
+ int dst_hp = FF_CEIL_RSHIFT(dst_h, vsub);
int yp = y>>vsub;
int xp = x>>hsub;
uint8_t *s, *sp, *d, *dp, *a, *ap;