From 21f946840260da150affd9a20cc35b3d56194ba6 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Wed, 27 Jan 2016 15:19:38 +0000 Subject: 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 --- libavcodec/asvenc.c | 8 ++++---- libavcodec/ffv1dec.c | 4 ++-- libavcodec/ffv1enc.c | 4 ++-- libavcodec/h263dec.c | 4 ++-- libavcodec/h264_slice.c | 6 +++--- libavcodec/libwebpenc_common.c | 8 ++++---- libavcodec/libx264.c | 2 +- libavcodec/mimic.c | 2 +- libavcodec/mjpegdec.c | 16 ++++++++-------- libavcodec/mpegvideo.c | 12 ++++++------ libavcodec/smvjpegdec.c | 2 +- libavcodec/snow.c | 12 ++++++------ libavcodec/snowenc.c | 6 +++--- libavcodec/txd.c | 4 ++-- libavcodec/utils.c | 12 ++++++------ 15 files changed, 51 insertions(+), 51 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index d51df80331..ec98a0ce35 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -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; ydata[i][x + y*clone->linesize[i]] = diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 5f13df85e5..d2bf3a89fd 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -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); diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 0e88921eaa..4de29345ec 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -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; diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index ca7e5ebe9b..628546bb86 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -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; xf->format, &h_chroma_shift, &v_chroma_shift); - for(i=0; if->height, v_chroma_shift); i++) { + for(i=0; if->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)); } } diff --git a/libavcodec/libwebpenc_common.c b/libavcodec/libwebpenc_common.c index a76b6da5d6..21d7adaf56 100644 --- a/libavcodec/libwebpenc_common.c +++ b/libavcodec/libwebpenc_common.c @@ -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++) { diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 88406a3765..0c3ebd50ed 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -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; diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index d4959eacf1..06fb393b92 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -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) { diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index a51c580006..77a1ac2a59 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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); diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 6d9e265eef..16ec875c8e 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1175,11 +1175,11 @@ static void gray_frame(AVFrame *frame) for(i=0; iheight; i++) memset(frame->data[0] + frame->linesize[0]*i, 0x80, frame->width); - for(i=0; iheight, v_chroma_shift); i++) { + for(i=0; iheight, 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; iheight, v_chroma_shift); i++) { + for(i=0; iheight, 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)); } } diff --git a/libavcodec/smvjpegdec.c b/libavcodec/smvjpegdec.c index 9c2fb380e1..9057e86161 100644 --- a/libavcodec/smvjpegdec.c +++ b/libavcodec/smvjpegdec.c @@ -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); diff --git a/libavcodec/snow.c b/libavcodec/snow.c index fc2e7279f3..a3e6afc86a 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -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]; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 658515d525..7b1046c88c 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -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; yinput_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); diff --git a/libavcodec/txd.c b/libavcodec/txd.c index 0c95faaf89..d7fdde0872 100644 --- a/libavcodec/txd.c +++ b/libavcodec/txd.c @@ -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) { diff --git a/libavcodec/utils.c b/libavcodec/utils.c index abddd6f4a4..37326e41f6 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -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; pnb_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; xcodec_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; } } -- cgit v1.2.3