summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 15:19:38 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-01-27 16:36:46 +0000
commit21f946840260da150affd9a20cc35b3d56194ba6 (patch)
tree5ca004c2ff6cf737f6858a56ce17602c339d80e6 /libavfilter
parent0aada30510d809bccfd539a90ea37b61188f2cb4 (diff)
downloadffmpeg-21f946840260da150affd9a20cc35b3d56194ba6.tar.gz
avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/deshake_opencl.c2
-rw-r--r--libavfilter/drawutils.c18
-rw-r--r--libavfilter/framepool.c2
-rw-r--r--libavfilter/unsharp_opencl.c6
-rw-r--r--libavfilter/vf_atadenoise.c4
-rw-r--r--libavfilter/vf_blend.c4
-rw-r--r--libavfilter/vf_boxblur.c2
-rw-r--r--libavfilter/vf_codecview.c4
-rw-r--r--libavfilter/vf_convolution.c2
-rw-r--r--libavfilter/vf_cover_rect.c12
-rw-r--r--libavfilter/vf_deband.c4
-rw-r--r--libavfilter/vf_decimate.c4
-rw-r--r--libavfilter/vf_delogo.c8
-rw-r--r--libavfilter/vf_deshake.c4
-rw-r--r--libavfilter/vf_detelecine.c2
-rw-r--r--libavfilter/vf_displace.c4
-rw-r--r--libavfilter/vf_eq.c4
-rw-r--r--libavfilter/vf_extractplanes.c4
-rw-r--r--libavfilter/vf_fade.c4
-rw-r--r--libavfilter/vf_fftfilt.c4
-rw-r--r--libavfilter/vf_fieldmatch.c8
-rw-r--r--libavfilter/vf_framepack.c4
-rw-r--r--libavfilter/vf_fspp.c10
-rw-r--r--libavfilter/vf_geq.c8
-rw-r--r--libavfilter/vf_gradfun.c4
-rw-r--r--libavfilter/vf_hflip.c4
-rw-r--r--libavfilter/vf_histogram.c8
-rw-r--r--libavfilter/vf_hqdn3d.c4
-rw-r--r--libavfilter/vf_hue.c4
-rw-r--r--libavfilter/vf_idet.c4
-rw-r--r--libavfilter/vf_il.c2
-rw-r--r--libavfilter/vf_interlace.c2
-rw-r--r--libavfilter/vf_kerndeint.c2
-rw-r--r--libavfilter/vf_lut.c8
-rw-r--r--libavfilter/vf_maskedmerge.c4
-rw-r--r--libavfilter/vf_mcdeint.c4
-rw-r--r--libavfilter/vf_mergeplanes.c8
-rw-r--r--libavfilter/vf_mpdecimate.c4
-rw-r--r--libavfilter/vf_neighbor.c2
-rw-r--r--libavfilter/vf_noise.c2
-rw-r--r--libavfilter/vf_overlay.c8
-rw-r--r--libavfilter/vf_owdenoise.c4
-rw-r--r--libavfilter/vf_perspective.c2
-rw-r--r--libavfilter/vf_phase.c2
-rw-r--r--libavfilter/vf_pixdesctest.c4
-rw-r--r--libavfilter/vf_pp7.c4
-rw-r--r--libavfilter/vf_psnr.c4
-rw-r--r--libavfilter/vf_pullup.c4
-rw-r--r--libavfilter/vf_removegrain.c4
-rw-r--r--libavfilter/vf_repeatfields.c2
-rw-r--r--libavfilter/vf_rotate.c8
-rw-r--r--libavfilter/vf_sab.c8
-rw-r--r--libavfilter/vf_showinfo.c2
-rw-r--r--libavfilter/vf_signalstats.c4
-rw-r--r--libavfilter/vf_smartblur.c8
-rw-r--r--libavfilter/vf_spp.c8
-rw-r--r--libavfilter/vf_ssim.c4
-rw-r--r--libavfilter/vf_stack.c2
-rw-r--r--libavfilter/vf_stereo3d.c10
-rw-r--r--libavfilter/vf_telecine.c2
-rw-r--r--libavfilter/vf_tinterlace.c6
-rw-r--r--libavfilter/vf_transpose.c6
-rw-r--r--libavfilter/vf_unsharp.c6
-rw-r--r--libavfilter/vf_uspp.c20
-rw-r--r--libavfilter/vf_vectorscope.c4
-rw-r--r--libavfilter/vf_vflip.c4
-rw-r--r--libavfilter/vf_vignette.c4
-rw-r--r--libavfilter/vf_w3fdif.c2
-rw-r--r--libavfilter/vf_waveform.c28
-rw-r--r--libavfilter/vf_yadif.c4
-rw-r--r--libavfilter/vf_zoompan.c4
-rw-r--r--libavfilter/vsrc_mptestsrc.c2
-rw-r--r--libavfilter/vsrc_testsrc.c4
73 files changed, 191 insertions, 191 deletions
diff --git a/libavfilter/deshake_opencl.c b/libavfilter/deshake_opencl.c
index 2821248218..91ae7d5859 100644
--- a/libavfilter/deshake_opencl.c
+++ b/libavfilter/deshake_opencl.c
@@ -160,7 +160,7 @@ int ff_opencl_deshake_process_inout_buf(AVFilterContext *ctx, AVFrame *in, AVFra
AVFilterLink *link = ctx->inputs[0];
DeshakeContext *deshake = ctx->priv;
const int hshift = av_pix_fmt_desc_get(link->format)->log2_chroma_h;
- int chroma_height = FF_CEIL_RSHIFT(link->h, hshift);
+ int chroma_height = AV_CEIL_RSHIFT(link->h, hshift);
if ((!deshake->opencl_ctx.cl_inbuf) || (!deshake->opencl_ctx.cl_outbuf)) {
deshake->opencl_ctx.in_plane_size[0] = (in->linesize[0] * in->height);
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index f9a5eb8b7a..23a0eb5d87 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -104,7 +104,7 @@ int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t
int hsub1 = (plane == 1 || plane == 2) ? hsub : 0;
pixel_step[plane] = 1;
- line_size = FF_CEIL_RSHIFT(w, hsub1) * pixel_step[plane];
+ line_size = AV_CEIL_RSHIFT(w, hsub1) * pixel_step[plane];
line[plane] = av_malloc(line_size);
if (!line[plane]) {
while(plane && line[plane-1])
@@ -128,8 +128,8 @@ void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4],
for (plane = 0; plane < 4 && dst[plane]; plane++) {
int hsub1 = plane == 1 || plane == 2 ? hsub : 0;
int vsub1 = plane == 1 || plane == 2 ? vsub : 0;
- int width = FF_CEIL_RSHIFT(w, hsub1);
- int height = FF_CEIL_RSHIFT(h, vsub1);
+ int width = AV_CEIL_RSHIFT(w, hsub1);
+ int height = AV_CEIL_RSHIFT(h, vsub1);
p = dst[plane] + (y >> vsub1) * dst_linesize[plane];
for (i = 0; i < height; i++) {
@@ -150,8 +150,8 @@ void ff_copy_rectangle(uint8_t *dst[4], int dst_linesize[4],
for (plane = 0; plane < 4 && dst[plane]; plane++) {
int hsub1 = plane == 1 || plane == 2 ? hsub : 0;
int vsub1 = plane == 1 || plane == 2 ? vsub : 0;
- int width = FF_CEIL_RSHIFT(w, hsub1);
- int height = FF_CEIL_RSHIFT(h, vsub1);
+ int width = AV_CEIL_RSHIFT(w, hsub1);
+ int height = AV_CEIL_RSHIFT(h, vsub1);
p = dst[plane] + (y >> vsub1) * dst_linesize[plane];
for (i = 0; i < height; i++) {
@@ -256,8 +256,8 @@ void ff_copy_rectangle2(FFDrawContext *draw,
for (plane = 0; plane < draw->nb_planes; plane++) {
p = pointer_at(draw, src, src_linesize, plane, src_x, src_y);
q = pointer_at(draw, dst, dst_linesize, plane, dst_x, dst_y);
- wp = FF_CEIL_RSHIFT(w, draw->hsub[plane]) * draw->pixelstep[plane];
- hp = FF_CEIL_RSHIFT(h, draw->vsub[plane]);
+ wp = AV_CEIL_RSHIFT(w, draw->hsub[plane]) * draw->pixelstep[plane];
+ hp = AV_CEIL_RSHIFT(h, draw->vsub[plane]);
for (y = 0; y < hp; y++) {
memcpy(q, p, wp);
p += src_linesize[plane];
@@ -275,8 +275,8 @@ void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color,
for (plane = 0; plane < draw->nb_planes; plane++) {
p0 = pointer_at(draw, dst, dst_linesize, plane, dst_x, dst_y);
- wp = FF_CEIL_RSHIFT(w, draw->hsub[plane]);
- hp = FF_CEIL_RSHIFT(h, draw->vsub[plane]);
+ wp = AV_CEIL_RSHIFT(w, draw->hsub[plane]);
+ hp = AV_CEIL_RSHIFT(h, draw->vsub[plane]);
if (!hp)
return;
p = p0;
diff --git a/libavfilter/framepool.c b/libavfilter/framepool.c
index ff3a4f7444..6df574ea41 100644
--- a/libavfilter/framepool.c
+++ b/libavfilter/framepool.c
@@ -82,7 +82,7 @@ FFVideoFramePool *ff_video_frame_pool_init(AVBufferRef* (*alloc)(int size),
for (i = 0; i < 4 && pool->linesize[i]; i++) {
int h = FFALIGN(pool->height, 32);
if (i == 1 || i == 2)
- h = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
+ h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
pool->pools[i] = av_buffer_pool_init(pool->linesize[i] * h + 16 + 16 - 1,
alloc);
diff --git a/libavfilter/unsharp_opencl.c b/libavfilter/unsharp_opencl.c
index 2cc0704afa..d84920c590 100644
--- a/libavfilter/unsharp_opencl.c
+++ b/libavfilter/unsharp_opencl.c
@@ -170,8 +170,8 @@ int ff_opencl_apply_unsharp(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
FFOpenclParam kernel2 = {0};
int width = link->w;
int height = link->h;
- int cw = FF_CEIL_RSHIFT(link->w, unsharp->hsub);
- int ch = FF_CEIL_RSHIFT(link->h, unsharp->vsub);
+ int cw = AV_CEIL_RSHIFT(link->w, unsharp->hsub);
+ int ch = AV_CEIL_RSHIFT(link->h, unsharp->vsub);
size_t globalWorkSize1d = width * height + 2 * ch * cw;
size_t globalWorkSize2dLuma[2];
size_t globalWorkSize2dChroma[2];
@@ -385,7 +385,7 @@ int ff_opencl_unsharp_process_inout_buf(AVFilterContext *ctx, AVFrame *in, AVFra
int ret = 0;
AVFilterLink *link = ctx->inputs[0];
UnsharpContext *unsharp = ctx->priv;
- int ch = FF_CEIL_RSHIFT(link->h, unsharp->vsub);
+ int ch = AV_CEIL_RSHIFT(link->h, unsharp->vsub);
if ((!unsharp->opencl_ctx.cl_inbuf) || (!unsharp->opencl_ctx.cl_outbuf)) {
unsharp->opencl_ctx.in_plane_size[0] = (in->linesize[0] * in->height);
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c
index 799a027173..aa09021ca3 100644
--- a/libavfilter/vf_atadenoise.c
+++ b/libavfilter/vf_atadenoise.c
@@ -264,9 +264,9 @@ static int config_input(AVFilterLink *inlink)
s->nb_planes = desc->nb_components;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
depth = desc->comp[0].depth;
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index f2c4b84f01..7bad31105d 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -369,8 +369,8 @@ static AVFrame *blend_frame(AVFilterContext *ctx, AVFrame *top_buf,
for (plane = 0; plane < s->nb_planes; plane++) {
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
- int outw = FF_CEIL_RSHIFT(dst_buf->width, hsub);
- int outh = FF_CEIL_RSHIFT(dst_buf->height, vsub);
+ int outw = AV_CEIL_RSHIFT(dst_buf->width, hsub);
+ int outh = AV_CEIL_RSHIFT(dst_buf->height, vsub);
FilterParams *param = &s->params[plane];
ThreadData td = { .top = top_buf, .bottom = bottom_buf, .dst = dst_buf,
.w = outw, .h = outh, .param = param, .plane = plane,
diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c
index 6934076d86..8e43986846 100644
--- a/libavfilter/vf_boxblur.c
+++ b/libavfilter/vf_boxblur.c
@@ -326,7 +326,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int plane;
- int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub), ch = FF_CEIL_RSHIFT(in->height, s->vsub);
+ int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub), ch = AV_CEIL_RSHIFT(in->height, s->vsub);
int w[4] = { inlink->w, cw, cw, inlink->w };
int h[4] = { in->height, ch, ch, in->height };
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c
index 086a56c5b9..e70b397ee3 100644
--- a/libavfilter/vf_codecview.c
+++ b/libavfilter/vf_codecview.c
@@ -206,8 +206,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
if (qp_table) {
int x, y;
- const int w = FF_CEIL_RSHIFT(frame->width, s->hsub);
- const int h = FF_CEIL_RSHIFT(frame->height, s->vsub);
+ const int w = AV_CEIL_RSHIFT(frame->width, s->hsub);
+ const int h = AV_CEIL_RSHIFT(frame->height, s->vsub);
uint8_t *pu = frame->data[1];
uint8_t *pv = frame->data[2];
const int lzu = frame->linesize[1];
diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c
index 0622cf8d40..2380cdca07 100644
--- a/libavfilter/vf_convolution.c
+++ b/libavfilter/vf_convolution.c
@@ -103,7 +103,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->planewidth, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c
index a84203abc7..f7f61038e3 100644
--- a/libavfilter/vf_cover_rect.c
+++ b/libavfilter/vf_cover_rect.c
@@ -78,8 +78,8 @@ static void cover_rect(CoverContext *cover, AVFrame *in, int offx, int offy)
for (p = 0; p < 3; p++) {
uint8_t *data = in->data[p] + (offx>>!!p) + (offy>>!!p) * in->linesize[p];
const uint8_t *src = cover->cover_frame->data[p];
- int w = FF_CEIL_RSHIFT(cover->cover_frame->width , !!p);
- int h = FF_CEIL_RSHIFT(cover->cover_frame->height, !!p);
+ int w = AV_CEIL_RSHIFT(cover->cover_frame->width , !!p);
+ int h = AV_CEIL_RSHIFT(cover->cover_frame->height, !!p);
for (y = 0; y < h; y++) {
for (x = 0; x < w; x++) {
data[x] = src[x];
@@ -98,10 +98,10 @@ static void blur(CoverContext *cover, AVFrame *in, int offx, int offy)
int oy = offy>>!!p;
int stride = in->linesize[p];
uint8_t *data = in->data[p] + ox + oy * stride;
- int w = FF_CEIL_RSHIFT(cover->width , !!p);
- int h = FF_CEIL_RSHIFT(cover->height, !!p);
- int iw = FF_CEIL_RSHIFT(in->width , !!p);
- int ih = FF_CEIL_RSHIFT(in->height, !!p);
+ int w = AV_CEIL_RSHIFT(cover->width , !!p);
+ int h = AV_CEIL_RSHIFT(cover->height, !!p);
+ int iw = AV_CEIL_RSHIFT(in->width , !!p);
+ int ih = AV_CEIL_RSHIFT(in->height, !!p);
for (y = 0; y < h; y++) {
for (x = 0; x < w; x++) {
int c = 0;
diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c
index f25cbdd593..01728b191f 100644
--- a/libavfilter/vf_deband.c
+++ b/libavfilter/vf_deband.c
@@ -218,9 +218,9 @@ static int config_input(AVFilterLink *inlink)
s->nb_components = desc->nb_components;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
s->deband = desc->comp[0].depth > 8 ? deband_16_c : deband_8_c;
diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c
index 8b950b496c..e2c0a32dbe 100644
--- a/libavfilter/vf_decimate.c
+++ b/libavfilter/vf_decimate.c
@@ -93,8 +93,8 @@ static void calc_diffs(const DecimateContext *dm, struct qitem *q,
const int linesize2 = f2->linesize[plane];
const uint8_t *f1p = f1->data[plane];
const uint8_t *f2p = f2->data[plane];
- int width = plane ? FF_CEIL_RSHIFT(f1->width, dm->hsub) : f1->width;
- int height = plane ? FF_CEIL_RSHIFT(f1->height, dm->vsub) : f1->height;
+ int width = plane ? AV_CEIL_RSHIFT(f1->width, dm->hsub) : f1->width;
+ int height = plane ? AV_CEIL_RSHIFT(f1->height, dm->vsub) : f1->height;
int hblockx = dm->blockx / 2;
int hblocky = dm->blocky / 2;
diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c
index 118caa649f..63c3539467 100644
--- a/libavfilter/vf_delogo.c
+++ b/libavfilter/vf_delogo.c
@@ -262,13 +262,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
apply_delogo(out->data[plane], out->linesize[plane],
in ->data[plane], in ->linesize[plane],
- FF_CEIL_RSHIFT(inlink->w, hsub),
- FF_CEIL_RSHIFT(inlink->h, vsub),
+ AV_CEIL_RSHIFT(inlink->w, hsub),
+ AV_CEIL_RSHIFT(inlink->h, vsub),
sar, s->x>>hsub, s->y>>vsub,
/* Up and left borders were rounded down, inject lost bits
* into width and height to avoid error accumulation */
- FF_CEIL_RSHIFT(s->w + (s->x & ((1<<hsub)-1)), hsub),
- FF_CEIL_RSHIFT(s->h + (s->y & ((1<<vsub)-1)), vsub),
+ AV_CEIL_RSHIFT(s->w + (s->x & ((1<<hsub)-1)), hsub),
+ AV_CEIL_RSHIFT(s->h + (s->y & ((1<<vsub)-1)), vsub),
s->band>>FFMIN(hsub, vsub),
s->show, direct);
}
diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c
index e7ece443c3..4eae9885c6 100644
--- a/libavfilter/vf_deshake.c
+++ b/libavfilter/vf_deshake.c
@@ -437,8 +437,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
char tmp[256];
int ret = 0;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
- const int chroma_width = FF_CEIL_RSHIFT(link->w, desc->log2_chroma_w);
- const int chroma_height = FF_CEIL_RSHIFT(link->h, desc->log2_chroma_h);
+ const int chroma_width = AV_CEIL_RSHIFT(link->w, desc->log2_chroma_w);
+ const int chroma_height = AV_CEIL_RSHIFT(link->h, desc->log2_chroma_h);
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c
index 9af2a133ac..6fd9aade07 100644
--- a/libavfilter/vf_detelecine.c
+++ b/libavfilter/vf_detelecine.c
@@ -147,7 +147,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->stride, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c
index b72f043521..9daa0c9ddb 100644
--- a/libavfilter/vf_displace.c
+++ b/libavfilter/vf_displace.c
@@ -257,9 +257,9 @@ static int config_input(AVFilterLink *inlink)
s->step = av_get_padded_bits_per_pixel(desc) >> 3;
hsub = desc->log2_chroma_w;
vsub = desc->log2_chroma_h;
- s->height[1] = s->height[2] = FF_CEIL_RSHIFT(inlink->h, vsub);
+ s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, vsub);
s->height[0] = s->height[3] = inlink->h;
- s->width[1] = s->width[2] = FF_CEIL_RSHIFT(inlink->w, hsub);
+ s->width[1] = s->width[2] = AV_CEIL_RSHIFT(inlink->w, hsub);
s->width[0] = s->width[3] = inlink->w;
return 0;
diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c
index 1519d3d569..0b929f33b6 100644
--- a/libavfilter/vf_eq.c
+++ b/libavfilter/vf_eq.c
@@ -281,8 +281,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int h = inlink->h;
if (i == 1 || i == 2) {
- w = FF_CEIL_RSHIFT(w, desc->log2_chroma_w);
- h = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
+ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w);
+ h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
}
if (eq->param[i].adjust)
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
index 6da3b2db66..099c00f290 100644
--- a/libavfilter/vf_extractplanes.c
+++ b/libavfilter/vf_extractplanes.c
@@ -176,8 +176,8 @@ static int config_output(AVFilterLink *outlink)
const int output = outlink->srcpad - ctx->output_pads;
if (s->map[output] == 1 || s->map[output] == 2) {
- outlink->h = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
- outlink->w = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ outlink->h = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ outlink->w = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
}
return 0;
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 040e3fdc53..f7b2b6a238 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -244,8 +244,8 @@ static int filter_slice_chroma(AVFilterContext *ctx, void *arg, int jobnr,
FadeContext *s = ctx->priv;
AVFrame *frame = arg;
int i, j, plane;
- const int width = FF_CEIL_RSHIFT(frame->width, s->hsub);
- const int height= FF_CEIL_RSHIFT(frame->height, s->vsub);
+ const int width = AV_CEIL_RSHIFT(frame->width, s->hsub);
+ const int height= AV_CEIL_RSHIFT(frame->height, s->vsub);
int slice_start = (height * jobnr ) / nb_jobs;
int slice_end = (height * (jobnr+1)) / nb_jobs;
diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c
index 8cbfa35142..307b41a733 100644
--- a/libavfilter/vf_fftfilt.c
+++ b/libavfilter/vf_fftfilt.c
@@ -266,8 +266,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int h = inlink->h;
if (plane == 1 || plane == 2) {
- w = FF_CEIL_RSHIFT(w, desc->log2_chroma_w);
- h = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
+ w = AV_CEIL_RSHIFT(w, desc->log2_chroma_w);
+ h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
}
rdft_horizontal(s, in, w, h, plane);
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 4225801f9d..7e277626f7 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -153,12 +153,12 @@ AVFILTER_DEFINE_CLASS(fieldmatch);
static int get_width(const FieldMatchContext *fm, const AVFrame *f, int plane)
{
- return plane ? FF_CEIL_RSHIFT(f->width, fm->hsub) : f->width;
+ return plane ? AV_CEIL_RSHIFT(f->width, fm->hsub) : f->width;
}
static int get_height(const FieldMatchContext *fm, const AVFrame *f, int plane)
{
- return plane ? FF_CEIL_RSHIFT(f->height, fm->vsub) : f->height;
+ return plane ? AV_CEIL_RSHIFT(f->height, fm->vsub) : f->height;
}
static int64_t luma_abs_diff(const AVFrame *f1, const AVFrame *f2)
@@ -270,8 +270,8 @@ static int calc_combed_score(const FieldMatchContext *fm, const AVFrame *src)
uint8_t *cmkp = fm->cmask_data[0];
uint8_t *cmkpU = fm->cmask_data[1];
uint8_t *cmkpV = fm->cmask_data[2];
- const int width = FF_CEIL_RSHIFT(src->width, fm->hsub);
- const int height = FF_CEIL_RSHIFT(src->height, fm->vsub);
+ const int width = AV_CEIL_RSHIFT(src->width, fm->hsub);
+ const int height = AV_CEIL_RSHIFT(src->height, fm->vsub);
const int cmk_linesize = fm->cmask_linesize[0] << 1;
const int cmk_linesizeUV = fm->cmask_linesize[2];
uint8_t *cmkpp = cmkp - (cmk_linesize>>1);
diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c
index 5533c44c82..dc9f38bccc 100644
--- a/libavfilter/vf_framepack.c
+++ b/libavfilter/vf_framepack.c
@@ -160,8 +160,8 @@ static void horizontal_frame_pack(AVFilterLink *outlink,
for (plane = 0; plane < s->pix_desc->nb_components; plane++) {
if (plane == 1 || plane == 2) {
- length = FF_CEIL_RSHIFT(out->width / 2, s->pix_desc->log2_chroma_w);
- lines = FF_CEIL_RSHIFT(out->height, s->pix_desc->log2_chroma_h);
+ length = AV_CEIL_RSHIFT(out->width / 2, s->pix_desc->log2_chroma_w);
+ lines = AV_CEIL_RSHIFT(out->height, s->pix_desc->log2_chroma_h);
}
for (i = 0; i < lines; i++) {
int j;
diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c
index e346294eee..c6989046c4 100644
--- a/libavfilter/vf_fspp.c
+++ b/libavfilter/vf_fspp.c
@@ -526,7 +526,7 @@ static int config_input(AVFilterLink *inlink)
return AVERROR(ENOMEM);
if (!fspp->use_bframe_qp && !fspp->qp) {
- fspp->non_b_qp_alloc_size = FF_CEIL_RSHIFT(inlink->w, 4) * FF_CEIL_RSHIFT(inlink->h, 4);
+ fspp->non_b_qp_alloc_size = AV_CEIL_RSHIFT(inlink->w, 4) * AV_CEIL_RSHIFT(inlink->h, 4);
fspp->non_b_qp_table = av_calloc(fspp->non_b_qp_alloc_size, sizeof(*fspp->non_b_qp_table));
if (!fspp->non_b_qp_table)
return AVERROR(ENOMEM);
@@ -590,11 +590,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
/* if the qp stride is not set, it means the QP are only defined on
* a line basis */
if (!qp_stride) {
- w = FF_CEIL_RSHIFT(inlink->w, 4);
+ w = AV_CEIL_RSHIFT(inlink->w, 4);
h = 1;
} else {
w = qp_stride;
- h = FF_CEIL_RSHIFT(inlink->h, 4);
+ h = AV_CEIL_RSHIFT(inlink->h, 4);
}
if (w * h > fspp->non_b_qp_alloc_size) {
int ret = av_reallocp_array(&fspp->non_b_qp_table, w, h);
@@ -615,8 +615,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
qp_table = fspp->non_b_qp_table;
if (qp_table || fspp->qp) {
- const int cw = FF_CEIL_RSHIFT(inlink->w, fspp->hsub);
- const int ch = FF_CEIL_RSHIFT(inlink->h, fspp->vsub);
+ const int cw = AV_CEIL_RSHIFT(inlink->w, fspp->hsub);
+ const int ch = AV_CEIL_RSHIFT(inlink->h, fspp->vsub);
/* get a new frame if in-place is not possible or if the dimensions
* are not multiple of 8 */
diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 40e71e05de..88d3b75af1 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -75,8 +75,8 @@ static inline double getpix(void *priv, double x, double y, int plane)
AVFrame *picref = geq->picref;
const uint8_t *src = picref->data[plane];
const int linesize = picref->linesize[plane];
- const int w = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(picref->width, geq->hsub) : picref->width;
- const int h = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(picref->height, geq->vsub) : picref->height;
+ const int w = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->width, geq->hsub) : picref->width;
+ const int h = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(picref->height, geq->vsub) : picref->height;
if (!src)
return 0;
@@ -224,8 +224,8 @@ static int geq_filter_frame(AVFilterLink *inlink, AVFrame *in)
int x, y;
uint8_t *dst = out->data[plane];
const int linesize = out->linesize[plane];
- const int w = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(inlink->w, geq->hsub) : inlink->w;
- const int h = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(inlink->h, geq->vsub) : inlink->h;
+ const int w = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->w, geq->hsub) : inlink->w;
+ const int h = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->h, geq->vsub) : inlink->h;
values[VAR_W] = w;
values[VAR_H] = h;
diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c
index 8c11bda457..e9af24fad3 100644
--- a/libavfilter/vf_gradfun.c
+++ b/libavfilter/vf_gradfun.c
@@ -173,8 +173,8 @@ static int config_input(AVFilterLink *inlink)
if (!s->buf)
return AVERROR(ENOMEM);
- s->chroma_w = FF_CEIL_RSHIFT(inlink->w, hsub);
- s->chroma_h = FF_CEIL_RSHIFT(inlink->h, vsub);
+ s->chroma_w = AV_CEIL_RSHIFT(inlink->w, hsub);
+ s->chroma_h = AV_CEIL_RSHIFT(inlink->h, vsub);
s->chroma_r = av_clip(((((s->radius >> hsub) + (s->radius >> vsub)) / 2 ) + 1) & ~1, 4, 32);
return 0;
diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 96ffca880b..6f922847e7 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -68,9 +68,9 @@ static int config_props(AVFilterLink *inlink)
av_image_fill_max_pixsteps(s->max_step, NULL, pix_desc);
s->planewidth[0] = s->planewidth[3] = inlink->w;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, hsub);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, hsub);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, vsub);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, vsub);
return 0;
}
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 3f50f12e7c..3a4725beef 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -183,9 +183,9 @@ static int config_input(AVFilterLink *inlink)
h->fg_color = white_yuva_color;
}
- h->planeheight[1] = h->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, h->desc->log2_chroma_h);
+ h->planeheight[1] = h->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, h->desc->log2_chroma_h);
h->planeheight[0] = h->planeheight[3] = inlink->h;
- h->planewidth[1] = h->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, h->desc->log2_chroma_w);
+ h->planewidth[1] = h->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, h->desc->log2_chroma_w);
h->planewidth[0] = h->planewidth[3] = inlink->w;
return 0;
@@ -228,8 +228,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (k = 0; k < 4 && out->data[k]; k++) {
const int is_chroma = (k == 1 || k == 2);
- const int dst_h = FF_CEIL_RSHIFT(outlink->h, (is_chroma ? h->odesc->log2_chroma_h : 0));
- const int dst_w = FF_CEIL_RSHIFT(outlink->w, (is_chroma ? h->odesc->log2_chroma_w : 0));
+ const int dst_h = AV_CEIL_RSHIFT(outlink->h, (is_chroma ? h->odesc->log2_chroma_h : 0));
+ const int dst_w = AV_CEIL_RSHIFT(outlink->w, (is_chroma ? h->odesc->log2_chroma_w : 0));
if (h->histogram_size <= 256) {
for (i = 0; i < dst_h ; i++)
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 5b367fff79..3fb69fc09d 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -311,8 +311,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (c = 0; c < 3; c++) {
denoise(s, in->data[c], out->data[c],
s->line, &s->frame_prev[c],
- FF_CEIL_RSHIFT(in->width, (!!c * s->hsub)),
- FF_CEIL_RSHIFT(in->height, (!!c * s->vsub)),
+ AV_CEIL_RSHIFT(in->width, (!!c * s->hsub)),
+ AV_CEIL_RSHIFT(in->height, (!!c * s->vsub)),
in->linesize[c], out->linesize[c],
s->coefs[c ? CHROMA_SPATIAL : LUMA_SPATIAL],
s->coefs[c ? CHROMA_TMP : LUMA_TMP]);
diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c
index 92607f163b..b5d72136a1 100644
--- a/libavfilter/vf_hue.c
+++ b/libavfilter/vf_hue.c
@@ -377,8 +377,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
apply_lut(hue, outpic->data[1], outpic->data[2], outpic->linesize[1],
inpic->data[1], inpic->data[2], inpic->linesize[1],
- FF_CEIL_RSHIFT(inlink->w, hue->hsub),
- FF_CEIL_RSHIFT(inlink->h, hue->vsub));
+ AV_CEIL_RSHIFT(inlink->w, hue->hsub),
+ AV_CEIL_RSHIFT(inlink->h, hue->vsub));
if (hue->brightness)
apply_luma_lut(hue, outpic->data[0], outpic->linesize[0],
inpic->data[0], inpic->linesize[0], inlink->w, inlink->h);
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 60ec23a05d..87d4144e9e 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -128,8 +128,8 @@ static void filter(AVFilterContext *ctx)
int refs = idet->cur->linesize[i];
if (i && i<3) {
- w = FF_CEIL_RSHIFT(w, idet->csp->log2_chroma_w);
- h = FF_CEIL_RSHIFT(h, idet->csp->log2_chroma_h);
+ w = AV_CEIL_RSHIFT(w, idet->csp->log2_chroma_w);
+ h = AV_CEIL_RSHIFT(h, idet->csp->log2_chroma_h);
}
for (y = 2; y < h - 2; y++) {
diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c
index 7aedb87d89..e0bf8d5941 100644
--- a/libavfilter/vf_il.c
+++ b/libavfilter/vf_il.c
@@ -109,7 +109,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->chroma_height = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->chroma_height = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
return 0;
}
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c
index c92f67b74e..efa3128727 100644
--- a/libavfilter/vf_interlace.c
+++ b/libavfilter/vf_interlace.c
@@ -139,7 +139,7 @@ static void copy_picture_field(InterlaceContext *s,
for (plane = 0; plane < desc->nb_components; plane++) {
int cols = (plane == 1 || plane == 2) ? -(-inlink->w) >> hsub : inlink->w;
- int lines = (plane == 1 || plane == 2) ? FF_CEIL_RSHIFT(inlink->h, vsub) : inlink->h;
+ int lines = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->h, vsub) : inlink->h;
uint8_t *dstp = dst_frame->data[plane];
const uint8_t *srcp = src_frame->data[plane];
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index d2ef070973..4825ed5e3e 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -152,7 +152,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
outpic->interlaced_frame = 0;
for (plane = 0; plane < 4 && inpic->data[plane] && inpic->linesize[plane]; plane++) {
- h = plane == 0 ? inlink->h : FF_CEIL_RSHIFT(inlink->h, kerndeint->vsub);
+ h = plane == 0 ? inlink->h : AV_CEIL_RSHIFT(inlink->h, kerndeint->vsub);
bwidth = kerndeint->tmp_bwidth[plane];
srcp_saved = inpic->data[plane];
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 38a25fe1eb..514866342e 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -418,8 +418,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
- int h = FF_CEIL_RSHIFT(inlink->h, vsub);
- int w = FF_CEIL_RSHIFT(inlink->w, hsub);
+ int h = AV_CEIL_RSHIFT(inlink->h, vsub);
+ int w = AV_CEIL_RSHIFT(inlink->w, hsub);
const uint16_t *tab = s->lut[plane];
const int in_linesize = in->linesize[plane] / 2;
const int out_linesize = out->linesize[plane] / 2;
@@ -446,8 +446,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane]; plane++) {
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
- int h = FF_CEIL_RSHIFT(inlink->h, vsub);
- int w = FF_CEIL_RSHIFT(inlink->w, hsub);
+ int h = AV_CEIL_RSHIFT(inlink->h, vsub);
+ int w = AV_CEIL_RSHIFT(inlink->w, hsub);
const uint16_t *tab = s->lut[plane];
const int in_linesize = in->linesize[plane];
const int out_linesize = out->linesize[plane];
diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c
index 38a4663a2c..66f8fa56d2 100644
--- a/libavfilter/vf_maskedmerge.c
+++ b/libavfilter/vf_maskedmerge.c
@@ -163,9 +163,9 @@ static int config_input(AVFilterLink *inlink)
hsub = desc->log2_chroma_w;
vsub = desc->log2_chroma_h;
- s->height[1] = s->height[2] = FF_CEIL_RSHIFT(inlink->h, vsub);
+ s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, vsub);
s->height[0] = s->height[3] = inlink->h;
- s->width[1] = s->width[2] = FF_CEIL_RSHIFT(inlink->w, hsub);
+ s->width[1] = s->width[2] = AV_CEIL_RSHIFT(inlink->w, hsub);
s->width[0] = s->width[3] = inlink->w;
s->depth = desc->comp[0].depth;
diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c
index e1c865a30a..ea32a240bb 100644
--- a/libavfilter/vf_mcdeint.c
+++ b/libavfilter/vf_mcdeint.c
@@ -197,8 +197,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
for (i = 0; i < 3; i++) {
int is_chroma = !!i;
- int w = FF_CEIL_RSHIFT(inlink->w, is_chroma);
- int h = FF_CEIL_RSHIFT(inlink->h, is_chroma);
+ int w = AV_CEIL_RSHIFT(inlink->w, is_chroma);
+ int h = AV_CEIL_RSHIFT(inlink->h, is_chroma);
int fils = frame_dec->linesize[i];
int srcs = inpic ->linesize[i];
int dsts = outpic ->linesize[i];
diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c
index 2d9db843f4..8128f33704 100644
--- a/libavfilter/vf_mergeplanes.c
+++ b/libavfilter/vf_mergeplanes.c
@@ -192,11 +192,11 @@ static int config_output(AVFilterLink *outlink)
outlink->sample_aspect_ratio = ctx->inputs[0]->sample_aspect_ratio;
s->planewidth[1] =
- s->planewidth[2] = FF_CEIL_RSHIFT(outlink->w, s->outdesc->log2_chroma_w);
+ s->planewidth[2] = AV_CEIL_RSHIFT(outlink->w, s->outdesc->log2_chroma_w);
s->planewidth[0] =
s->planewidth[3] = outlink->w;
s->planeheight[1] =
- s->planeheight[2] = FF_CEIL_RSHIFT(outlink->h, s->outdesc->log2_chroma_h);
+ s->planeheight[2] = AV_CEIL_RSHIFT(outlink->h, s->outdesc->log2_chroma_h);
s->planeheight[0] =
s->planeheight[3] = outlink->h;
@@ -220,11 +220,11 @@ static int config_output(AVFilterLink *outlink)
}
inputp->planewidth[1] =
- inputp->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, indesc->log2_chroma_w);
+ inputp->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, indesc->log2_chroma_w);
inputp->planewidth[0] =
inputp->planewidth[3] = inlink->w;
inputp->planeheight[1] =
- inputp->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, indesc->log2_chroma_h);
+ inputp->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, indesc->log2_chroma_h);
inputp->planeheight[0] =
inputp->planeheight[3] = inlink->h;
inputp->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c
index c0c498bd65..dc345114cd 100644
--- a/libavfilter/vf_mpdecimate.c
+++ b/libavfilter/vf_mpdecimate.c
@@ -130,8 +130,8 @@ static int decimate_frame(AVFilterContext *ctx,
if (diff_planes(ctx,
cur->data[plane], cur->linesize[plane],
ref->data[plane], ref->linesize[plane],
- FF_CEIL_RSHIFT(ref->width, hsub),
- FF_CEIL_RSHIFT(ref->height, vsub))) {
+ AV_CEIL_RSHIFT(ref->width, hsub),
+ AV_CEIL_RSHIFT(ref->height, vsub))) {
emms_c();
return 0;
}
diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c
index c6bb67d036..de4a12f048 100644
--- a/libavfilter/vf_neighbor.c
+++ b/libavfilter/vf_neighbor.c
@@ -151,7 +151,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->planewidth, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c
index dbdae7d90f..fa3863ed9d 100644
--- a/libavfilter/vf_noise.c
+++ b/libavfilter/vf_noise.c
@@ -156,7 +156,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(n->bytewidth, inlink->format, inlink->w)) < 0)
return ret;
- n->height[1] = n->height[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ n->height[1] = n->height[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
n->height[0] = n->height[3] = inlink->h;
return 0;
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 3eac7f07fc..37f19ea01c 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -520,10 +520,10 @@ static void blend_image(AVFilterContext *ctx,
for (i = 0; i < 3; i++) {
int hsub = i ? s->hsub : 0;
int vsub = i ? s->vsub : 0;
- 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 src_wp = AV_CEIL_RSHIFT(src_w, hsub);
+ int src_hp = AV_CEIL_RSHIFT(src_h, vsub);
+ int dst_wp = AV_CEIL_RSHIFT(dst_w, hsub);
+ int dst_hp = AV_CEIL_RSHIFT(dst_h, vsub);
int yp = y>>vsub;
int xp = x>>hsub;
uint8_t *s, *sp, *d, *dp, *a, *ap;
diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c
index d4e90f860d..3a77f8967e 100644
--- a/libavfilter/vf_owdenoise.c
+++ b/libavfilter/vf_owdenoise.c
@@ -227,8 +227,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
OWDenoiseContext *s = ctx->priv;
AVFilterLink *outlink = ctx->outputs[0];
AVFrame *out;
- const int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub);
- const int ch = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ const int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+ const int ch = AV_CEIL_RSHIFT(inlink->h, s->vsub);
if (av_frame_is_writable(in)) {
direct = 1;
diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c
index 13053f1b77..4949ee82c3 100644
--- a/libavfilter/vf_perspective.c
+++ b/libavfilter/vf_perspective.c
@@ -150,7 +150,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->height[1] = s->height[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->height[0] = s->height[3] = inlink->h;
s->pv = av_realloc_f(s->pv, w * h, 2 * sizeof(*s->pv));
diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c
index 35c343fbec..7249388fc0 100644
--- a/libavfilter/vf_phase.c
+++ b/libavfilter/vf_phase.c
@@ -92,7 +92,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 790dd0d9c2..d6423acb91 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -59,8 +59,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *out;
int i, c, w = inlink->w, h = inlink->h;
- const int cw = FF_CEIL_RSHIFT(w, priv->pix_desc->log2_chroma_w);
- const int ch = FF_CEIL_RSHIFT(h, priv->pix_desc->log2_chroma_h);
+ const int cw = AV_CEIL_RSHIFT(w, priv->pix_desc->log2_chroma_w);
+ const int ch = AV_CEIL_RSHIFT(h, priv->pix_desc->log2_chroma_h);
out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!out) {
diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c
index 9e78c39ac7..570a1c90b9 100644
--- a/libavfilter/vf_pp7.c
+++ b/libavfilter/vf_pp7.c
@@ -328,8 +328,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
qp_table = av_frame_get_qp_table(in, &qp_stride, &pp7->qscale_type);
if (!ctx->is_disabled) {
- const int cw = FF_CEIL_RSHIFT(inlink->w, pp7->hsub);
- const int ch = FF_CEIL_RSHIFT(inlink->h, pp7->vsub);
+ const int cw = AV_CEIL_RSHIFT(inlink->w, pp7->hsub);
+ const int ch = AV_CEIL_RSHIFT(inlink->h, pp7->vsub);
/* get a new frame if in-place is not possible or if the dimensions
* are not multiple of 8 */
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index bce5c515c8..89acd3ca76 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -266,9 +266,9 @@ static int config_input_ref(AVFilterLink *inlink)
s->comps[2] = s->is_rgb ? 'b' : 'v' ;
s->comps[3] = 'a';
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
sum = 0;
for (j = 0; j < s->nb_components; j++)
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index 100546dabf..fa76caad03 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -194,9 +194,9 @@ static int config_input(AVFilterLink *inlink)
return AVERROR(EINVAL);
}
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
s->metric_w = (s->planewidth[mp] - ((s->junk_left + s->junk_right) << 3)) >> 3;
diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c
index 898e50f101..8ef097403a 100644
--- a/libavfilter/vf_removegrain.c
+++ b/libavfilter/vf_removegrain.c
@@ -471,9 +471,9 @@ static int config_input(AVFilterLink *inlink)
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
for (i = 0; i < s->nb_planes; i++) {
diff --git a/libavfilter/vf_repeatfields.c b/libavfilter/vf_repeatfields.c
index b9e73ec6de..3ac432b5bc 100644
--- a/libavfilter/vf_repeatfields.c
+++ b/libavfilter/vf_repeatfields.c
@@ -65,7 +65,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 36c4a7a32b..47dc01e7d8 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -494,11 +494,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (plane = 0; plane < rot->nb_planes; plane++) {
int hsub = plane == 1 || plane == 2 ? rot->hsub : 0;
int vsub = plane == 1 || plane == 2 ? rot->vsub : 0;
- const int outw = FF_CEIL_RSHIFT(outlink->w, hsub);
- const int outh = FF_CEIL_RSHIFT(outlink->h, vsub);
+ const int outw = AV_CEIL_RSHIFT(outlink->w, hsub);
+ const int outh = AV_CEIL_RSHIFT(outlink->h, vsub);
ThreadData td = { .in = in, .out = out,
- .inw = FF_CEIL_RSHIFT(inlink->w, hsub),
- .inh = FF_CEIL_RSHIFT(inlink->h, vsub),
+ .inw = AV_CEIL_RSHIFT(inlink->w, hsub),
+ .inh = AV_CEIL_RSHIFT(inlink->h, vsub),
.outh = outh, .outw = outw,
.xi = -(outw-1) * c / 2, .yi = (outw-1) * s / 2,
.xprime = -(outh-1) * s / 2,
diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c
index 6b88c86281..3f0951f32a 100644
--- a/libavfilter/vf_sab.c
+++ b/libavfilter/vf_sab.c
@@ -214,8 +214,8 @@ static int config_props(AVFilterLink *inlink)
close_filter_param(&s->chroma);
ret = open_filter_param(&s->chroma,
- FF_CEIL_RSHIFT(inlink->w, s->hsub),
- FF_CEIL_RSHIFT(inlink->h, s->vsub), s->sws_flags);
+ AV_CEIL_RSHIFT(inlink->w, s->hsub),
+ AV_CEIL_RSHIFT(inlink->h, s->vsub), s->sws_flags);
return ret;
}
@@ -295,8 +295,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
blur(outpic->data[0], outpic->linesize[0], inpic->data[0], inpic->linesize[0],
inlink->w, inlink->h, &s->luma);
if (inpic->data[2]) {
- int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub);
- int ch = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+ int ch = AV_CEIL_RSHIFT(inlink->h, s->vsub);
blur(outpic->data[1], outpic->linesize[1], inpic->data[1], inpic->linesize[1], cw, ch, &s->chroma);
blur(outpic->data[2], outpic->linesize[2], inpic->data[2], inpic->linesize[2], cw, ch, &s->chroma);
}
diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
index 464d92daac..5146995c23 100644
--- a/libavfilter/vf_showinfo.c
+++ b/libavfilter/vf_showinfo.c
@@ -87,7 +87,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
for (plane = 0; plane < 4 && frame->data[plane] && frame->linesize[plane]; plane++) {
uint8_t *data = frame->data[plane];
- int h = plane == 1 || plane == 2 ? FF_CEIL_RSHIFT(inlink->h, vsub) : inlink->h;
+ int h = plane == 1 || plane == 2 ? AV_CEIL_RSHIFT(inlink->h, vsub) : inlink->h;
int linesize = av_image_get_linesize(frame->format, frame->width, plane);
if (linesize < 0)
diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c
index 88b715e698..c340d6b48d 100644
--- a/libavfilter/vf_signalstats.c
+++ b/libavfilter/vf_signalstats.c
@@ -154,8 +154,8 @@ static int config_props(AVFilterLink *outlink)
outlink->w = inlink->w;
outlink->h = inlink->h;
- s->chromaw = FF_CEIL_RSHIFT(inlink->w, s->hsub);
- s->chromah = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ s->chromaw = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+ s->chromah = AV_CEIL_RSHIFT(inlink->h, s->vsub);
s->fs = inlink->w * inlink->h;
s->cfs = s->chromaw * s->chromah;
diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c
index c3b12d9e40..117e0ec601 100644
--- a/libavfilter/vf_smartblur.c
+++ b/libavfilter/vf_smartblur.c
@@ -167,8 +167,8 @@ static int config_props(AVFilterLink *inlink)
alloc_sws_context(&s->luma, inlink->w, inlink->h, s->sws_flags);
alloc_sws_context(&s->chroma,
- FF_CEIL_RSHIFT(inlink->w, s->hsub),
- FF_CEIL_RSHIFT(inlink->h, s->vsub),
+ AV_CEIL_RSHIFT(inlink->w, s->hsub),
+ AV_CEIL_RSHIFT(inlink->h, s->vsub),
s->sws_flags);
return 0;
@@ -243,8 +243,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
SmartblurContext *s = inlink->dst->priv;
AVFilterLink *outlink = inlink->dst->outputs[0];
AVFrame *outpic;
- int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub);
- int ch = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+ int ch = AV_CEIL_RSHIFT(inlink->h, s->vsub);
outpic = ff_get_video_buffer(outlink, outlink->w, outlink->h);
if (!outpic) {
diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
index 11954542bb..fe579cedb1 100644
--- a/libavfilter/vf_spp.c
+++ b/libavfilter/vf_spp.c
@@ -374,11 +374,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
/* if the qp stride is not set, it means the QP are only defined on
* a line basis */
if (!qp_stride) {
- w = FF_CEIL_RSHIFT(inlink->w, 4);
+ w = AV_CEIL_RSHIFT(inlink->w, 4);
h = 1;
} else {
w = qp_stride;
- h = FF_CEIL_RSHIFT(inlink->h, 4);
+ h = AV_CEIL_RSHIFT(inlink->h, 4);
}
if (w * h > s->non_b_qp_alloc_size) {
@@ -400,8 +400,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
qp_table = s->non_b_qp_table;
if (qp_table || s->qp) {
- const int cw = FF_CEIL_RSHIFT(inlink->w, s->hsub);
- const int ch = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ const int cw = AV_CEIL_RSHIFT(inlink->w, s->hsub);
+ const int ch = AV_CEIL_RSHIFT(inlink->h, s->vsub);
/* get a new frame if in-place is not possible or if the dimensions
* are not multiple of 8 */
diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
index 7c43e98854..dd8f264812 100644
--- a/libavfilter/vf_ssim.c
+++ b/libavfilter/vf_ssim.c
@@ -288,9 +288,9 @@ static int config_input_ref(AVFilterLink *inlink)
s->comps[2] = s->is_rgb ? 'B' : 'V';
s->comps[3] = 'A';
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
for (i = 0; i < s->nb_components; i++)
sum += s->planeheight[i] * s->planewidth[i];
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 2fe371275d..b6243ebdb8 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -123,7 +123,7 @@ static int process_frame(FFFrameSync *fs)
return ret;
}
- height[1] = height[2] = FF_CEIL_RSHIFT(inlink->h, s->desc->log2_chroma_h);
+ height[1] = height[2] = AV_CEIL_RSHIFT(inlink->h, s->desc->log2_chroma_h);
height[0] = height[3] = inlink->h;
for (p = 0; p < s->nb_planes; p++) {
diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c
index 85a5258616..2036c9432c 100644
--- a/libavfilter/vf_stereo3d.c
+++ b/libavfilter/vf_stereo3d.c
@@ -582,7 +582,7 @@ static int config_output(AVFilterLink *outlink)
return ret;
s->nb_planes = av_pix_fmt_count_planes(outlink->format);
av_image_fill_max_pixsteps(s->pixstep, NULL, desc);
- s->pheight[1] = s->pheight[2] = FF_CEIL_RSHIFT(s->height, desc->log2_chroma_h);
+ s->pheight[1] = s->pheight[2] = AV_CEIL_RSHIFT(s->height, desc->log2_chroma_h);
s->pheight[0] = s->pheight[3] = s->height;
s->hsub = desc->log2_chroma_w;
s->vsub = desc->log2_chroma_h;
@@ -781,10 +781,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
for (i = 0; i < 4; i++) {
int hsub = i == 1 || i == 2 ? s->hsub : 0;
int vsub = i == 1 || i == 2 ? s->vsub : 0;
- s->in_off_left[i] = (FF_CEIL_RSHIFT(s->in.row_left, vsub) + s->in.off_lstep) * ileft->linesize[i] + FF_CEIL_RSHIFT(s->in.off_left * s->pixstep[i], hsub);
- s->in_off_right[i] = (FF_CEIL_RSHIFT(s->in.row_right, vsub) + s->in.off_rstep) * iright->linesize[i] + FF_CEIL_RSHIFT(s->in.off_right * s->pixstep[i], hsub);
- out_off_left[i] = (FF_CEIL_RSHIFT(s->out.row_left, vsub) + s->out.off_lstep) * oleft->linesize[i] + FF_CEIL_RSHIFT(s->out.off_left * s->pixstep[i], hsub);
- out_off_right[i] = (FF_CEIL_RSHIFT(s->out.row_right, vsub) + s->out.off_rstep) * oright->linesize[i] + FF_CEIL_RSHIFT(s->out.off_right * s->pixstep[i], hsub);
+ s->in_off_left[i] = (AV_CEIL_RSHIFT(s->in.row_left, vsub) + s->in.off_lstep) * ileft->linesize[i] + AV_CEIL_RSHIFT(s->in.off_left * s->pixstep[i], hsub);
+ s->in_off_right[i] = (AV_CEIL_RSHIFT(s->in.row_right, vsub) + s->in.off_rstep) * iright->linesize[i] + AV_CEIL_RSHIFT(s->in.off_right * s->pixstep[i], hsub);
+ out_off_left[i] = (AV_CEIL_RSHIFT(s->out.row_left, vsub) + s->out.off_lstep) * oleft->linesize[i] + AV_CEIL_RSHIFT(s->out.off_left * s->pixstep[i], hsub);
+ out_off_right[i] = (AV_CEIL_RSHIFT(s->out.row_right, vsub) + s->out.off_rstep) * oright->linesize[i] + AV_CEIL_RSHIFT(s->out.off_right * s->pixstep[i], hsub);
}
switch (s->out.format) {
diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c
index 37343bc134..182c670849 100644
--- a/libavfilter/vf_telecine.c
+++ b/libavfilter/vf_telecine.c
@@ -134,7 +134,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->stride, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 3d6140fcc7..835ece3ebb 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -137,7 +137,7 @@ static int config_out_props(AVFilterLink *outlink)
/* fill black picture with black */
for (i = 0; i < 4 && tinterlace->black_data[i]; i++) {
- int h = i == 1 || i == 2 ? FF_CEIL_RSHIFT(outlink->h, desc->log2_chroma_h) : outlink->h;
+ int h = i == 1 || i == 2 ? AV_CEIL_RSHIFT(outlink->h, desc->log2_chroma_h) : outlink->h;
memset(tinterlace->black_data[i], black[i],
tinterlace->black_linesize[i] * h);
}
@@ -211,8 +211,8 @@ void copy_picture_field(TInterlaceContext *tinterlace,
int h;
for (plane = 0; plane < desc->nb_components; plane++) {
- int lines = plane == 1 || plane == 2 ? FF_CEIL_RSHIFT(src_h, vsub) : src_h;
- int cols = plane == 1 || plane == 2 ? FF_CEIL_RSHIFT( w, hsub) : w;
+ int lines = plane == 1 || plane == 2 ? AV_CEIL_RSHIFT(src_h, vsub) : src_h;
+ int cols = plane == 1 || plane == 2 ? AV_CEIL_RSHIFT( w, hsub) : w;
uint8_t *dstp = dst[plane];
const uint8_t *srcp = src[plane];
diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c
index 3b6e36ad8f..9555ff20c8 100644
--- a/libavfilter/vf_transpose.c
+++ b/libavfilter/vf_transpose.c
@@ -152,9 +152,9 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr,
int hsub = plane == 1 || plane == 2 ? s->hsub : 0;
int vsub = plane == 1 || plane == 2 ? s->vsub : 0;
int pixstep = s->pixsteps[plane];
- int inh = FF_CEIL_RSHIFT(in->height, vsub);
- int outw = FF_CEIL_RSHIFT(out->width, hsub);
- int outh = FF_CEIL_RSHIFT(out->height, vsub);
+ int inh = AV_CEIL_RSHIFT(in->height, vsub);
+ int outw = AV_CEIL_RSHIFT(out->width, hsub);
+ int outh = AV_CEIL_RSHIFT(out->height, vsub);
int start = (outh * jobnr ) / nb_jobs;
int end = (outh * (jobnr+1)) / nb_jobs;
uint8_t *dst, *src;
diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c
index a56b023460..d264e24e3c 100644
--- a/libavfilter/vf_unsharp.c
+++ b/libavfilter/vf_unsharp.c
@@ -109,9 +109,9 @@ static int apply_unsharp_c(AVFilterContext *ctx, AVFrame *in, AVFrame *out)
int i, plane_w[3], plane_h[3];
UnsharpFilterParam *fp[3];
plane_w[0] = inlink->w;
- plane_w[1] = plane_w[2] = FF_CEIL_RSHIFT(inlink->w, s->hsub);
+ plane_w[1] = plane_w[2] = AV_CEIL_RSHIFT(inlink->w, s->hsub);
plane_h[0] = inlink->h;
- plane_h[1] = plane_h[2] = FF_CEIL_RSHIFT(inlink->h, s->vsub);
+ plane_h[1] = plane_h[2] = AV_CEIL_RSHIFT(inlink->h, s->vsub);
fp[0] = &s->luma;
fp[1] = fp[2] = &s->chroma;
for (i = 0; i < 3; i++) {
@@ -204,7 +204,7 @@ static int config_props(AVFilterLink *link)
ret = init_filter_param(link->dst, &s->luma, "luma", link->w);
if (ret < 0)
return ret;
- ret = init_filter_param(link->dst, &s->chroma, "chroma", FF_CEIL_RSHIFT(link->w, s->hsub));
+ ret = init_filter_param(link->dst, &s->chroma, "chroma", AV_CEIL_RSHIFT(link->w, s->hsub));
if (ret < 0)
return ret;
diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c
index bd6c680eed..f963254e11 100644
--- a/libavfilter/vf_uspp.c
+++ b/libavfilter/vf_uspp.c
@@ -189,8 +189,8 @@ static void filter(USPPContext *p, uint8_t *dst[3], uint8_t *src[3],
for (i = 0; i < 3; i++) {
int is_chroma = !!i;
- int w = FF_CEIL_RSHIFT(width, is_chroma ? p->hsub : 0);
- int h = FF_CEIL_RSHIFT(height, is_chroma ? p->vsub : 0);
+ int w = AV_CEIL_RSHIFT(width, is_chroma ? p->hsub : 0);
+ int h = AV_CEIL_RSHIFT(height, is_chroma ? p->vsub : 0);
int stride = p->temp_stride[i];
int block = BLOCK >> (is_chroma ? p->hsub : 0);
@@ -263,8 +263,8 @@ static void filter(USPPContext *p, uint8_t *dst[3], uint8_t *src[3],
offset = (BLOCKc-x1c) + (BLOCKc-y1c) * p->frame_dec->linesize[1];
- for (y = 0; y < FF_CEIL_RSHIFT(height, p->vsub); y++) {
- for (x = 0; x < FF_CEIL_RSHIFT(width, p->hsub); x++) {
+ for (y = 0; y < AV_CEIL_RSHIFT(height, p->vsub); y++) {
+ for (x = 0; x < AV_CEIL_RSHIFT(width, p->hsub); x++) {
p->temp[1][x + y * p->temp_stride[1]] += p->frame_dec->data[1][x + y * p->frame_dec->linesize[1] + offset];
p->temp[2][x + y * p->temp_stride[2]] += p->frame_dec->data[2][x + y * p->frame_dec->linesize[2] + offset];
}
@@ -276,8 +276,8 @@ static void filter(USPPContext *p, uint8_t *dst[3], uint8_t *src[3],
if (!dst[j])
continue;
store_slice_c(dst[j], p->temp[j], dst_stride[j], p->temp_stride[j],
- FF_CEIL_RSHIFT(width, is_chroma ? p->hsub : 0),
- FF_CEIL_RSHIFT(height, is_chroma ? p->vsub : 0),
+ AV_CEIL_RSHIFT(width, is_chroma ? p->hsub : 0),
+ AV_CEIL_RSHIFT(height, is_chroma ? p->vsub : 0),
8-p->log2_count);
}
}
@@ -325,8 +325,8 @@ static int config_input(AVFilterLink *inlink)
int h = (height + 4 * BLOCK-1) & (~(2 * BLOCK-1));
if (is_chroma) {
- w = FF_CEIL_RSHIFT(w, uspp->hsub);
- h = FF_CEIL_RSHIFT(h, uspp->vsub);
+ w = AV_CEIL_RSHIFT(w, uspp->hsub);
+ h = AV_CEIL_RSHIFT(h, uspp->vsub);
}
uspp->temp_stride[i] = w;
@@ -394,11 +394,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
/* if the qp stride is not set, it means the QP are only defined on
* a line basis */
if (!qp_stride) {
- w = FF_CEIL_RSHIFT(inlink->w, 4);
+ w = AV_CEIL_RSHIFT(inlink->w, 4);
h = 1;
} else {
w = qp_stride;
- h = FF_CEIL_RSHIFT(inlink->h, 4);
+ h = AV_CEIL_RSHIFT(inlink->h, 4);
}
if (w * h > uspp->non_b_qp_alloc_size) {
diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c
index 5f7cd56565..2112b80a5d 100644
--- a/libavfilter/vf_vectorscope.c
+++ b/libavfilter/vf_vectorscope.c
@@ -694,9 +694,9 @@ static int config_input(AVFilterLink *inlink)
s->hsub = desc->log2_chroma_w;
s->vsub = desc->log2_chroma_h;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
- s->planewidth[1] = s->planewidth[2] = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
+ s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w);
s->planewidth[0] = s->planewidth[3] = inlink->w;
return 0;
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 4a4ae0e5e1..cb085e8317 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -55,7 +55,7 @@ static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h)
for (i = 0; i < 4; i ++) {
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
- int height = FF_CEIL_RSHIFT(h, vsub);
+ int height = AV_CEIL_RSHIFT(h, vsub);
if (frame->data[i]) {
frame->data[i] += (height - 1) * frame->linesize[i];
@@ -73,7 +73,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
for (i = 0; i < 4; i ++) {
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
- int height = FF_CEIL_RSHIFT(link->h, vsub);
+ int height = AV_CEIL_RSHIFT(link->h, vsub);
if (frame->data[i]) {
frame->data[i] += (height - 1) * frame->linesize[i];
diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c
index 54515e6087..1d66c5025d 100644
--- a/libavfilter/vf_vignette.c
+++ b/libavfilter/vf_vignette.c
@@ -267,8 +267,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
const int chroma = plane == 1 || plane == 2;
const int hsub = chroma ? s->desc->log2_chroma_w : 0;
const int vsub = chroma ? s->desc->log2_chroma_h : 0;
- const int w = FF_CEIL_RSHIFT(inlink->w, hsub);
- const int h = FF_CEIL_RSHIFT(inlink->h, vsub);
+ const int w = AV_CEIL_RSHIFT(inlink->w, hsub);
+ const int h = AV_CEIL_RSHIFT(inlink->h, vsub);
for (y = 0; y < h; y++) {
uint8_t *dstp = dst;
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c
index a07efe4c39..e6f6628abe 100644
--- a/libavfilter/vf_w3fdif.c
+++ b/libavfilter/vf_w3fdif.c
@@ -166,7 +166,7 @@ static int config_input(AVFilterLink *inlink)
if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0)
return ret;
- s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
+ s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = inlink->h;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c
index d384258b83..4fb78bd715 100644
--- a/libavfilter/vf_waveform.c
+++ b/libavfilter/vf_waveform.c
@@ -158,8 +158,8 @@ static void envelope_instant16(WaveformContext *s, AVFrame *out, int plane, int
const int is_chroma = (component == 1 || component == 2);
const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
- const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h);
- const int dst_w = FF_CEIL_RSHIFT(out->width, shift_w);
+ const int dst_h = AV_CEIL_RSHIFT(out->height, shift_h);
+ const int dst_w = AV_CEIL_RSHIFT(out->width, shift_w);
const int start = s->estart[plane];
const int end = s->eend[plane];
uint16_t *dst;
@@ -208,8 +208,8 @@ static void envelope_instant(WaveformContext *s, AVFrame *out, int plane, int co
const int is_chroma = (component == 1 || component == 2);
const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
- const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h);
- const int dst_w = FF_CEIL_RSHIFT(out->width, shift_w);
+ const int dst_h = AV_CEIL_RSHIFT(out->height, shift_h);
+ const int dst_w = AV_CEIL_RSHIFT(out->width, shift_w);
const int start = s->estart[plane];
const int end = s->eend[plane];
uint8_t *dst;
@@ -259,8 +259,8 @@ static void envelope_peak16(WaveformContext *s, AVFrame *out, int plane, int com
const int is_chroma = (component == 1 || component == 2);
const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
- const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h);
- const int dst_w = FF_CEIL_RSHIFT(out->width, shift_w);
+ const int dst_h = AV_CEIL_RSHIFT(out->height, shift_h);
+ const int dst_w = AV_CEIL_RSHIFT(out->width, shift_w);
const int start = s->estart[plane];
const int end = s->eend[plane];
int *emax = s->emax[plane][component];
@@ -331,8 +331,8 @@ static void envelope_peak(WaveformContext *s, AVFrame *out, int plane, int compo
const int is_chroma = (component == 1 || component == 2);
const int shift_w = (is_chroma ? s->desc->log2_chroma_w : 0);
const int shift_h = (is_chroma ? s->desc->log2_chroma_h : 0);
- const int dst_h = FF_CEIL_RSHIFT(out->height, shift_h);
- const int dst_w = FF_CEIL_RSHIFT(out->width, shift_w);
+ const int dst_h = AV_CEIL_RSHIFT(out->height, shift_h);
+ const int dst_w = AV_CEIL_RSHIFT(out->width, shift_w);
const int start = s->estart[plane];
const int end = s->eend[plane];
int *emax = s->emax[plane][component];
@@ -447,8 +447,8 @@ static void lowpass16(WaveformContext *s, AVFrame *in, AVFrame *out,
const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
const int limit = s->max - 1;
const int max = limit - intensity;
- const int src_h = FF_CEIL_RSHIFT(in->height, shift_h);
- const int src_w = FF_CEIL_RSHIFT(in->width, shift_w);
+ const int src_h = AV_CEIL_RSHIFT(in->height, shift_h);
+ const int src_w = AV_CEIL_RSHIFT(in->width, shift_w);
const uint16_t *src_data = (const uint16_t *)in->data[plane];
uint16_t *dst_data = (uint16_t *)out->data[plane] + (column ? (offset >> shift_h) * dst_linesize : offset >> shift_w);
uint16_t * const dst_bottom_line = dst_data + dst_linesize * ((s->size >> shift_h) - 1);
@@ -496,8 +496,8 @@ static void lowpass(WaveformContext *s, AVFrame *in, AVFrame *out,
const int dst_linesize = out->linesize[plane];
const int dst_signed_linesize = dst_linesize * (mirror == 1 ? -1 : 1);
const int max = 255 - intensity;
- const int src_h = FF_CEIL_RSHIFT(in->height, shift_h);
- const int src_w = FF_CEIL_RSHIFT(in->width, shift_w);
+ const int src_h = AV_CEIL_RSHIFT(in->height, shift_h);
+ const int src_w = AV_CEIL_RSHIFT(in->width, shift_w);
const uint8_t *src_data = in->data[plane];
uint8_t *dst_data = out->data[plane] + (column ? (offset >> shift_h) * dst_linesize : offset >> shift_w);
uint8_t * const dst_bottom_line = dst_data + dst_linesize * ((s->size >> shift_h) - 1);
@@ -1205,8 +1205,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (k = 0; k < s->ncomp; k++) {
const int is_chroma = (k == 1 || k == 2);
- const int dst_h = FF_CEIL_RSHIFT(outlink->h, (is_chroma ? s->desc->log2_chroma_h : 0));
- const int dst_w = FF_CEIL_RSHIFT(outlink->w, (is_chroma ? s->desc->log2_chroma_w : 0));
+ const int dst_h = AV_CEIL_RSHIFT(outlink->h, (is_chroma ? s->desc->log2_chroma_h : 0));
+ const int dst_w = AV_CEIL_RSHIFT(outlink->w, (is_chroma ? s->desc->log2_chroma_w : 0));
if (s->bits <= 8) {
for (i = 0; i < dst_h ; i++)
memset(out->data[s->desc->comp[k].plane] +
diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c
index 8791129201..d9668d0858 100644
--- a/libavfilter/vf_yadif.c
+++ b/libavfilter/vf_yadif.c
@@ -233,8 +233,8 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic,
int h = dstpic->height;
if (i == 1 || i == 2) {
- w = FF_CEIL_RSHIFT(w, yadif->csp->log2_chroma_w);
- h = FF_CEIL_RSHIFT(h, yadif->csp->log2_chroma_h);
+ w = AV_CEIL_RSHIFT(w, yadif->csp->log2_chroma_w);
+ h = AV_CEIL_RSHIFT(h, yadif->csp->log2_chroma_h);
}
diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
index 208d4d6ded..5acbe42950 100644
--- a/libavfilter/vf_zoompan.c
+++ b/libavfilter/vf_zoompan.c
@@ -178,10 +178,10 @@ static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_va
return ret;
}
- px[1] = px[2] = FF_CEIL_RSHIFT(x, s->desc->log2_chroma_w);
+ px[1] = px[2] = AV_CEIL_RSHIFT(x, s->desc->log2_chroma_w);
px[0] = px[3] = x;
- py[1] = py[2] = FF_CEIL_RSHIFT(y, s->desc->log2_chroma_h);
+ py[1] = py[2] = AV_CEIL_RSHIFT(y, s->desc->log2_chroma_h);
py[0] = py[3] = y;
s->sws = sws_alloc_context();
diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c
index 1cdd3a4370..25ad2ad08a 100644
--- a/libavfilter/vsrc_mptestsrc.c
+++ b/libavfilter/vsrc_mptestsrc.c
@@ -302,7 +302,7 @@ static int request_frame(AVFilterLink *outlink)
MPTestContext *test = outlink->src->priv;
AVFrame *picref;
int w = WIDTH, h = HEIGHT,
- cw = FF_CEIL_RSHIFT(w, test->hsub), ch = FF_CEIL_RSHIFT(h, test->vsub);
+ cw = AV_CEIL_RSHIFT(w, test->hsub), ch = AV_CEIL_RSHIFT(h, test->vsub);
unsigned int frame = outlink->frame_count;
enum test_type tt = test->test;
int i;
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 181e2a785a..54d8b26ebb 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -1145,9 +1145,9 @@ static void draw_bar(TestSourceContext *test, const uint8_t color[4],
if (plane == 1 || plane == 2) {
px = x >> desc->log2_chroma_w;
- pw = FF_CEIL_RSHIFT(w, desc->log2_chroma_w);
+ pw = AV_CEIL_RSHIFT(w, desc->log2_chroma_w);
py = y >> desc->log2_chroma_h;
- ph = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
+ ph = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
} else {
px = x;
pw = w;