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>
This commit is contained in:
Derek Buitenhuis 2016-01-27 15:19:38 +00:00
parent 0aada30510
commit 21f9468402
105 changed files with 286 additions and 283 deletions

View File

@ -245,10 +245,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for (i = 0; i<3; i++) {
int x, y;
int w = FF_CEIL_RSHIFT(pict->width, !!i);
int h = FF_CEIL_RSHIFT(pict->height, !!i);
int w2 = FF_CEIL_RSHIFT(clone->width, !!i);
int h2 = FF_CEIL_RSHIFT(clone->height, !!i);
int w = AV_CEIL_RSHIFT(pict->width, !!i);
int h = AV_CEIL_RSHIFT(pict->height, !!i);
int w2 = AV_CEIL_RSHIFT(clone->width, !!i);
int h2 = AV_CEIL_RSHIFT(clone->height, !!i);
for (y=0; y<h; y++)
for (x=w; x<w2; x++)
clone->data[i][x + y*clone->linesize[i]] =

View File

@ -435,8 +435,8 @@ static int decode_slice(AVCodecContext *c, void *arg)
av_assert1(width && height);
if (f->colorspace == 0 && (f->chroma_planes || !fs->transparency)) {
const int chroma_width = FF_CEIL_RSHIFT(width, f->chroma_h_shift);
const int chroma_height = FF_CEIL_RSHIFT(height, f->chroma_v_shift);
const int chroma_width = AV_CEIL_RSHIFT(width, f->chroma_h_shift);
const int chroma_height = AV_CEIL_RSHIFT(height, f->chroma_v_shift);
const int cx = x >> f->chroma_h_shift;
const int cy = y >> f->chroma_v_shift;
decode_plane(fs, p->data[0] + ps*x + y*p->linesize[0], width, height, p->linesize[0], 0, 1);

View File

@ -1176,8 +1176,8 @@ retry:
}
if (f->colorspace == 0 && c->pix_fmt != AV_PIX_FMT_YA8) {
const int chroma_width = FF_CEIL_RSHIFT(width, f->chroma_h_shift);
const int chroma_height = FF_CEIL_RSHIFT(height, f->chroma_v_shift);
const int chroma_width = AV_CEIL_RSHIFT(width, f->chroma_h_shift);
const int chroma_height = AV_CEIL_RSHIFT(height, f->chroma_v_shift);
const int cx = x >> f->chroma_h_shift;
const int cy = y >> f->chroma_v_shift;

View File

@ -699,8 +699,8 @@ frame_end:
int x, y, p;
av_frame_make_writable(pict);
for (p=0; p<3; p++) {
int w = FF_CEIL_RSHIFT(pict-> width, !!p);
int h = FF_CEIL_RSHIFT(pict->height, !!p);
int w = AV_CEIL_RSHIFT(pict-> width, !!p);
int h = AV_CEIL_RSHIFT(pict->height, !!p);
int linesize = pict->linesize[p];
for (y=0; y<(h>>1); y++)
for (x=0; x<w; x++)

View File

@ -251,11 +251,11 @@ static int alloc_picture(H264Context *h, H264Picture *pic)
av_pix_fmt_get_chroma_sub_sample(pic->f->format,
&h_chroma_shift, &v_chroma_shift);
for(i=0; i<FF_CEIL_RSHIFT(pic->f->height, v_chroma_shift); i++) {
for(i=0; i<AV_CEIL_RSHIFT(pic->f->height, v_chroma_shift); i++) {
memset(pic->f->data[1] + pic->f->linesize[1]*i,
0x80, FF_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
memset(pic->f->data[2] + pic->f->linesize[2]*i,
0x80, FF_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(pic->f->width, h_chroma_shift));
}
}

View File

@ -167,8 +167,8 @@ int ff_libwebp_get_frame(AVCodecContext *avctx, LibWebPContextCommon *s,
int sse = 0;
for (p = 0; p < 3; p++) {
int bs2 = bs >> !!p;
int w = FF_CEIL_RSHIFT(frame->width , !!p);
int h = FF_CEIL_RSHIFT(frame->height, !!p);
int w = AV_CEIL_RSHIFT(frame->width , !!p);
int h = AV_CEIL_RSHIFT(frame->height, !!p);
int xs = x >> !!p;
int ys = y >> !!p;
for (y2 = ys; y2 < FFMIN(ys + bs2, h); y2++) {
@ -183,8 +183,8 @@ int ff_libwebp_get_frame(AVCodecContext *avctx, LibWebPContextCommon *s,
if (!skip)
for (p = 0; p < 3; p++) {
int bs2 = bs >> !!p;
int w = FF_CEIL_RSHIFT(frame->width , !!p);
int h = FF_CEIL_RSHIFT(frame->height, !!p);
int w = AV_CEIL_RSHIFT(frame->width , !!p);
int h = AV_CEIL_RSHIFT(frame->height, !!p);
int xs = x >> !!p;
int ys = y >> !!p;
for (y2 = ys; y2 < FFMIN(ys + bs2, h); y2++) {

View File

@ -552,7 +552,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.i_frame_reference = avctx->refs;
else if (x4->level) {
int i;
int mbn = FF_CEIL_RSHIFT(avctx->width, 4) * FF_CEIL_RSHIFT(avctx->height, 4);
int mbn = AV_CEIL_RSHIFT(avctx->width, 4) * AV_CEIL_RSHIFT(avctx->height, 4);
int level_id = -1;
char *tail;
int scale = X264_BUILD < 129 ? 384 : 1;

View File

@ -395,7 +395,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
avctx->height = height;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
for (i = 0; i < 3; i++) {
ctx->num_vblocks[i] = FF_CEIL_RSHIFT(height, 3 + !!i);
ctx->num_vblocks[i] = AV_CEIL_RSHIFT(height, 3 + !!i);
ctx->num_hblocks[i] = width >> (3 + !!i);
}
} else if (width != ctx->avctx->width || height != ctx->avctx->height) {

View File

@ -1266,8 +1266,8 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt, &chroma_h_shift,
&chroma_v_shift);
chroma_width = FF_CEIL_RSHIFT(s->width, chroma_h_shift);
chroma_height = FF_CEIL_RSHIFT(s->height, chroma_v_shift);
chroma_width = AV_CEIL_RSHIFT(s->width, chroma_h_shift);
chroma_height = AV_CEIL_RSHIFT(s->height, chroma_v_shift);
for (i = 0; i < nb_components; i++) {
int c = s->comp_index[i];
@ -2241,8 +2241,8 @@ the_end:
if (!s->upscale_h[p])
continue;
if (p==1 || p==2) {
w = FF_CEIL_RSHIFT(w, hshift);
h = FF_CEIL_RSHIFT(h, vshift);
w = AV_CEIL_RSHIFT(w, hshift);
h = AV_CEIL_RSHIFT(h, vshift);
}
if (s->upscale_v[p])
h = (h+1)>>1;
@ -2299,8 +2299,8 @@ the_end:
if (!s->upscale_v[p])
continue;
if (p==1 || p==2) {
w = FF_CEIL_RSHIFT(w, hshift);
h = FF_CEIL_RSHIFT(h, vshift);
w = AV_CEIL_RSHIFT(w, hshift);
h = AV_CEIL_RSHIFT(h, vshift);
}
dst = &((uint8_t *)s->picture_ptr->data[p])[(h - 1) * s->linesize[p]];
for (i = h - 1; i; i--) {
@ -2324,8 +2324,8 @@ the_end:
int w = s->picture_ptr->width;
int h = s->picture_ptr->height;
if(index && index<3){
w = FF_CEIL_RSHIFT(w, hshift);
h = FF_CEIL_RSHIFT(h, vshift);
w = AV_CEIL_RSHIFT(w, hshift);
h = AV_CEIL_RSHIFT(h, vshift);
}
if(dst){
uint8_t *dst2 = dst + s->picture_ptr->linesize[index]*(h-1);

View File

@ -1175,11 +1175,11 @@ static void gray_frame(AVFrame *frame)
for(i=0; i<frame->height; i++)
memset(frame->data[0] + frame->linesize[0]*i, 0x80, frame->width);
for(i=0; i<FF_CEIL_RSHIFT(frame->height, v_chroma_shift); i++) {
for(i=0; i<AV_CEIL_RSHIFT(frame->height, v_chroma_shift); i++) {
memset(frame->data[1] + frame->linesize[1]*i,
0x80, FF_CEIL_RSHIFT(frame->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(frame->width, h_chroma_shift));
memset(frame->data[2] + frame->linesize[2]*i,
0x80, FF_CEIL_RSHIFT(frame->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(frame->width, h_chroma_shift));
}
}
@ -1323,11 +1323,11 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
memset(s->last_picture_ptr->f->data[0] + s->last_picture_ptr->f->linesize[0]*i,
0x80, avctx->width);
if (s->last_picture_ptr->f->data[2]) {
for(i=0; i<FF_CEIL_RSHIFT(avctx->height, v_chroma_shift); i++) {
for(i=0; i<AV_CEIL_RSHIFT(avctx->height, v_chroma_shift); i++) {
memset(s->last_picture_ptr->f->data[1] + s->last_picture_ptr->f->linesize[1]*i,
0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(avctx->width, h_chroma_shift));
memset(s->last_picture_ptr->f->data[2] + s->last_picture_ptr->f->linesize[2]*i,
0x80, FF_CEIL_RSHIFT(avctx->width, h_chroma_shift));
0x80, AV_CEIL_RSHIFT(avctx->width, h_chroma_shift));
}
}

View File

@ -65,7 +65,7 @@ static inline void smv_img_pnt(uint8_t *dst_data[4], uint8_t *src_data[4],
for (i = 0; i < planes_nb; i++) {
int h = height;
if (i == 1 || i == 2) {
h = FF_CEIL_RSHIFT(height, desc->log2_chroma_h);
h = AV_CEIL_RSHIFT(height, desc->log2_chroma_h);
}
smv_img_pnt_plane(&dst_data[i], src_data[i],
src_linesizes[i], h, nlines);

View File

@ -108,8 +108,8 @@ void ff_snow_reset_contexts(SnowContext *s){ //FIXME better initial contexts
}
int ff_snow_alloc_blocks(SnowContext *s){
int w= FF_CEIL_RSHIFT(s->avctx->width, LOG2_MB_SIZE);
int h= FF_CEIL_RSHIFT(s->avctx->height, LOG2_MB_SIZE);
int w= AV_CEIL_RSHIFT(s->avctx->width, LOG2_MB_SIZE);
int h= AV_CEIL_RSHIFT(s->avctx->height, LOG2_MB_SIZE);
s->b_width = w;
s->b_height= h;
@ -535,8 +535,8 @@ int ff_snow_common_init_after_header(AVCodecContext *avctx) {
int h= s->avctx->height;
if(plane_index){
w = FF_CEIL_RSHIFT(w, s->chroma_h_shift);
h = FF_CEIL_RSHIFT(h, s->chroma_v_shift);
w = AV_CEIL_RSHIFT(w, s->chroma_h_shift);
h = AV_CEIL_RSHIFT(h, s->chroma_v_shift);
}
s->plane[plane_index].width = w;
s->plane[plane_index].height= h;
@ -590,8 +590,8 @@ static int halfpel_interpol(SnowContext *s, uint8_t *halfpel[4][4], AVFrame *fra
for(p=0; p < s->nb_planes; p++){
int is_chroma= !!p;
int w= is_chroma ? FF_CEIL_RSHIFT(s->avctx->width, s->chroma_h_shift) : s->avctx->width;
int h= is_chroma ? FF_CEIL_RSHIFT(s->avctx->height, s->chroma_v_shift) : s->avctx->height;
int w= is_chroma ? AV_CEIL_RSHIFT(s->avctx->width, s->chroma_h_shift) : s->avctx->width;
int h= is_chroma ? AV_CEIL_RSHIFT(s->avctx->height, s->chroma_v_shift) : s->avctx->height;
int ls= frame->linesize[p];
uint8_t *src= frame->data[p];

View File

@ -1574,12 +1574,12 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for(i=0; i < s->nb_planes; i++){
int hshift= i ? s->chroma_h_shift : 0;
int vshift= i ? s->chroma_v_shift : 0;
for(y=0; y<FF_CEIL_RSHIFT(height, vshift); y++)
for(y=0; y<AV_CEIL_RSHIFT(height, vshift); y++)
memcpy(&s->input_picture->data[i][y * s->input_picture->linesize[i]],
&pict->data[i][y * pict->linesize[i]],
FF_CEIL_RSHIFT(width, hshift));
AV_CEIL_RSHIFT(width, hshift));
s->mpvencdsp.draw_edges(s->input_picture->data[i], s->input_picture->linesize[i],
FF_CEIL_RSHIFT(width, hshift), FF_CEIL_RSHIFT(height, vshift),
AV_CEIL_RSHIFT(width, hshift), AV_CEIL_RSHIFT(height, vshift),
EDGE_WIDTH >> hshift, EDGE_WIDTH >> vshift,
EDGE_TOP | EDGE_BOTTOM);

View File

@ -104,7 +104,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if (!(flags & 1))
goto unsupported;
case TXD_DXT1:
if (bytestream2_get_bytes_left(&gb) < FF_CEIL_RSHIFT(w, 2) * FF_CEIL_RSHIFT(h, 2) * 8)
if (bytestream2_get_bytes_left(&gb) < AV_CEIL_RSHIFT(w, 2) * AV_CEIL_RSHIFT(h, 2) * 8)
return AVERROR_INVALIDDATA;
for (j = 0; j < avctx->height; j += 4) {
for (i = 0; i < avctx->width; i += 4) {
@ -115,7 +115,7 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
break;
case TXD_DXT3:
if (bytestream2_get_bytes_left(&gb) < FF_CEIL_RSHIFT(w, 2) * FF_CEIL_RSHIFT(h, 2) * 16)
if (bytestream2_get_bytes_left(&gb) < AV_CEIL_RSHIFT(w, 2) * AV_CEIL_RSHIFT(h, 2) * 16)
return AVERROR_INVALIDDATA;
for (j = 0; j < avctx->height; j += 4) {
for (i = 0; i < avctx->width; i += 4) {

View File

@ -215,8 +215,8 @@ int ff_set_dimensions(AVCodecContext *s, int width, int height)
s->coded_width = width;
s->coded_height = height;
s->width = FF_CEIL_RSHIFT(width, s->lowres);
s->height = FF_CEIL_RSHIFT(height, s->lowres);
s->width = AV_CEIL_RSHIFT(width, s->lowres);
s->height = AV_CEIL_RSHIFT(height, s->lowres);
return ret;
}
@ -700,8 +700,8 @@ void ff_color_frame(AVFrame *frame, const int c[4])
for (p = 0; p<desc->nb_components; p++) {
uint8_t *dst = frame->data[p];
int is_chroma = p == 1 || p == 2;
int bytes = is_chroma ? FF_CEIL_RSHIFT(frame->width, desc->log2_chroma_w) : frame->width;
int height = is_chroma ? FF_CEIL_RSHIFT(frame->height, desc->log2_chroma_h) : frame->height;
int bytes = is_chroma ? AV_CEIL_RSHIFT(frame->width, desc->log2_chroma_w) : frame->width;
int height = is_chroma ? AV_CEIL_RSHIFT(frame->height, desc->log2_chroma_h) : frame->height;
for (y = 0; y < height; y++) {
if (desc->comp[0].depth >= 9) {
for (x = 0; x<bytes; x++)
@ -859,8 +859,8 @@ static int get_buffer_internal(AVCodecContext *avctx, AVFrame *frame, int flags)
}
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
if (frame->width <= 0 || frame->height <= 0) {
frame->width = FFMAX(avctx->width, FF_CEIL_RSHIFT(avctx->coded_width, avctx->lowres));
frame->height = FFMAX(avctx->height, FF_CEIL_RSHIFT(avctx->coded_height, avctx->lowres));
frame->width = FFMAX(avctx->width, AV_CEIL_RSHIFT(avctx->coded_width, avctx->lowres));
frame->height = FFMAX(avctx->height, AV_CEIL_RSHIFT(avctx->coded_height, avctx->lowres));
override_dimensions = 0;
}
}

View File

@ -1032,8 +1032,8 @@ static av_cold int opengl_init_context(OpenGLContext *opengl)
for (i = 1; i < num_planes; i++)
if (opengl->non_pow_2_textures)
opengl_configure_texture(opengl, opengl->texture_name[i],
FF_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w),
FF_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h));
AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w),
AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h));
else
opengl_configure_texture(opengl, opengl->texture_name[i], opengl->width, opengl->height);
if (has_alpha)
@ -1135,8 +1135,8 @@ static uint8_t* opengl_get_plane_pointer(OpenGLContext *opengl, AVPacket *pkt, i
{
uint8_t *data = pkt->data;
int wordsize = opengl_type_size(opengl->type);
int width_chroma = FF_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w);
int height_chroma = FF_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h);
int width_chroma = AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w);
int height_chroma = AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h);
int plane = desc->comp[comp_index].plane;
switch(plane) {
@ -1161,8 +1161,8 @@ static uint8_t* opengl_get_plane_pointer(OpenGLContext *opengl, AVPacket *pkt, i
#define LOAD_TEXTURE_DATA(comp_index, sub) \
{ \
int width = sub ? FF_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w) : opengl->width; \
int height = sub ? FF_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h): opengl->height; \
int width = sub ? AV_CEIL_RSHIFT(opengl->width, desc->log2_chroma_w) : opengl->width; \
int height = sub ? AV_CEIL_RSHIFT(opengl->height, desc->log2_chroma_h): opengl->height; \
uint8_t *data; \
int plane = desc->comp[comp_index].plane; \
\

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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,

View File

@ -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);

View File

@ -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];

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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) {

View File

@ -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);

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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++)

View File

@ -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]);

View File

@ -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);

View File

@ -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++) {

View File

@ -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;
}

View File

@ -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];

View File

@ -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];

View File

@ -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];

View File

@ -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;

View File

@ -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];

View File

@ -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);

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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));

View File

@ -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);

View File

@ -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) {

View File

@ -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 */

View File

@ -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++)

View File

@ -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;

View File

@ -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++) {

View File

@ -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);

View File

@ -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,

View File

@ -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);
}

View File

@ -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)

View File

@ -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;

View File

@ -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) {

View File

@ -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 */

View File

@ -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];

View File

@ -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++) {

View File

@ -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) {

View File

@ -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);

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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);

View File

@ -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] +

View File

@ -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);
}

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -129,7 +129,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
if (img->split_planes) {
int ysize = codec->width * codec->height;
int usize = FF_CEIL_RSHIFT(codec->width, desc->log2_chroma_w) * FF_CEIL_RSHIFT(codec->height, desc->log2_chroma_h);
int usize = AV_CEIL_RSHIFT(codec->width, desc->log2_chroma_w) * AV_CEIL_RSHIFT(codec->height, desc->log2_chroma_h);
if (desc->comp[0].depth >= 9) {
ysize *= 2;
usize *= 2;

View File

@ -42,8 +42,8 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
s->timestamp = s->cur_timestamp;
/* convert video pixel dimensions from pixels to blocks */
w = FF_CEIL_RSHIFT(s1->streams[0]->codec->width, 3);
h = FF_CEIL_RSHIFT(s1->streams[0]->codec->height, 3);
w = AV_CEIL_RSHIFT(s1->streams[0]->codec->width, 3);
h = AV_CEIL_RSHIFT(s1->streams[0]->codec->height, 3);
/* get the pixel format type or fail */
if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ422P ||

View File

@ -64,7 +64,7 @@ static void video_frame_cksum(AVBPrint *bp, AVFrame *frame)
unsigned cksum = 0;
int h = frame->height;
if ((i == 1 || i == 2) && desc->nb_components >= 3)
h = FF_CEIL_RSHIFT(h, desc->log2_chroma_h);
h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
data = frame->data[i];
for (y = 0; y < h; y++) {
cksum = av_adler32_update(cksum, data, linesize[i]);

View File

@ -209,8 +209,8 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
// Adjust for smaller Cb and Cr planes
av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
&v_chroma_shift);
width = FF_CEIL_RSHIFT(width, h_chroma_shift);
height = FF_CEIL_RSHIFT(height, v_chroma_shift);
width = AV_CEIL_RSHIFT(width, h_chroma_shift);
height = AV_CEIL_RSHIFT(height, v_chroma_shift);
ptr1 = frame->data[1];
ptr2 = frame->data[2];

View File

@ -55,8 +55,11 @@
/* assume b>0 */
#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
/* Fast a/(1<<b) rounded toward +inf. Assume a>=0 and b>=0 */
#define FF_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
: ((a) + (1<<(b)) - 1) >> (b))
/* Backwards compat. */
#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))

View File

@ -188,7 +188,7 @@ static int get_video_buffer(AVFrame *frame, int align)
for (i = 0; i < 4 && frame->linesize[i]; i++) {
int h = FFALIGN(frame->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);
frame->buf[i] = av_buffer_alloc(frame->linesize[i] * h + 16 + 16/*STRIDE_ALIGN*/ - 1);
if (!frame->buf[i])

View File

@ -325,7 +325,7 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],
return;
}
if (i == 1 || i == 2) {
h = FF_CEIL_RSHIFT(height, desc->log2_chroma_h);
h = AV_CEIL_RSHIFT(height, desc->log2_chroma_h);
}
av_image_copy_plane(dst_data[i], dst_linesizes[i],
src_data[i], src_linesizes[i],

View File

@ -64,7 +64,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 15
#define LIBAVUTIL_VERSION_MINOR 16
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

View File

@ -50,7 +50,7 @@ int ff_sws_alphablendaway(SwsContext *c, const uint8_t *src[],
int w = plane ? c->chrSrcW : c->srcW;
int x_subsample = plane ? desc->log2_chroma_w: 0;
int y_subsample = plane ? desc->log2_chroma_h: 0;
for (y = srcSliceY >> y_subsample; y < FF_CEIL_RSHIFT(srcSliceH, y_subsample); y++) {
for (y = srcSliceY >> y_subsample; y < AV_CEIL_RSHIFT(srcSliceH, y_subsample); y++) {
if (x_subsample || y_subsample) {
int alpha;
unsigned u;

View File

@ -166,8 +166,8 @@ int ff_init_desc_hscale(SwsFilterDescriptor *desc, SwsSlice *src, SwsSlice *dst,
static int chr_h_scale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
{
FilterContext *instance = desc->instance;
int srcW = FF_CEIL_RSHIFT(desc->src->width, desc->src->h_chr_sub_sample);
int dstW = FF_CEIL_RSHIFT(desc->dst->width, desc->dst->h_chr_sub_sample);
int srcW = AV_CEIL_RSHIFT(desc->src->width, desc->src->h_chr_sub_sample);
int dstW = AV_CEIL_RSHIFT(desc->dst->width, desc->dst->h_chr_sub_sample);
int xInc = instance->xInc;
uint8_t ** src1 = desc->src->plane[1].line;
@ -201,7 +201,7 @@ static int chr_h_scale(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int
static int chr_convert(SwsContext *c, SwsFilterDescriptor *desc, int sliceY, int sliceH)
{
int srcW = FF_CEIL_RSHIFT(desc->src->width, desc->src->h_chr_sub_sample);
int srcW = AV_CEIL_RSHIFT(desc->src->width, desc->src->h_chr_sub_sample);
ColorContext * instance = desc->instance;
uint32_t * pal = instance->pal;

View File

@ -855,7 +855,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 = FF_CEIL_RSHIFT(width, 1);
const int chromWidth = AV_CEIL_RSHIFT(width, 1);
for (y = 0; y < height; y++) {
extract_even_c(src, ydst, width);
@ -875,7 +875,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 = FF_CEIL_RSHIFT(width, 1);
const int chromWidth = AV_CEIL_RSHIFT(width, 1);
for (y = 0; y < height; y++) {
extract_even_c(src, ydst, width);
@ -893,7 +893,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 = FF_CEIL_RSHIFT(width, 1);
const int chromWidth = AV_CEIL_RSHIFT(width, 1);
for (y = 0; y < height; y++) {
extract_even_c(src + 1, ydst, width);
@ -913,7 +913,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 = FF_CEIL_RSHIFT(width, 1);
const int chromWidth = AV_CEIL_RSHIFT(width, 1);
for (y = 0; y < height; y++) {
extract_even_c(src + 1, ydst, width);

Some files were not shown because too many files have changed in this diff Show More