diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-27 15:19:38 +0000 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-01-27 16:36:46 +0000 |
commit | 21f946840260da150affd9a20cc35b3d56194ba6 (patch) | |
tree | 5ca004c2ff6cf737f6858a56ce17602c339d80e6 /libswscale | |
parent | 0aada30510d809bccfd539a90ea37b61188f2cb4 (diff) | |
download | ffmpeg-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 'libswscale')
-rw-r--r-- | libswscale/alphablend.c | 2 | ||||
-rw-r--r-- | libswscale/hscale.c | 6 | ||||
-rw-r--r-- | libswscale/rgb2rgb_template.c | 8 | ||||
-rw-r--r-- | libswscale/swscale.c | 8 | ||||
-rw-r--r-- | libswscale/swscale_unscaled.c | 6 | ||||
-rw-r--r-- | libswscale/utils.c | 10 | ||||
-rw-r--r-- | libswscale/vscale.c | 2 | ||||
-rw-r--r-- | libswscale/x86/rgb2rgb_template.c | 8 |
8 files changed, 25 insertions, 25 deletions
diff --git a/libswscale/alphablend.c b/libswscale/alphablend.c index 1f63493bdc..b5686599c0 100644 --- a/libswscale/alphablend.c +++ b/libswscale/alphablend.c @@ -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; diff --git a/libswscale/hscale.c b/libswscale/hscale.c index 9f9d35bbf5..eca0635338 100644 --- a/libswscale/hscale.c +++ b/libswscale/hscale.c @@ -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; diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 1cc28cdd13..499d25b26d 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -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); diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1b39577efb..8d20577013 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -373,7 +373,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], yuv2packedX_fn yuv2packedX = c->yuv2packedX; yuv2anyX_fn yuv2anyX = c->yuv2anyX; const int chrSrcSliceY = srcSliceY >> c->chrSrcVSubSample; - const int chrSrcSliceH = FF_CEIL_RSHIFT(srcSliceH, c->chrSrcVSubSample); + const int chrSrcSliceH = AV_CEIL_RSHIFT(srcSliceH, c->chrSrcVSubSample); int should_dither = is9_OR_10BPS(c->srcFormat) || is16BPS(c->srcFormat); int lastDstY; @@ -479,7 +479,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], ff_init_slice_from_src(vout_slice, (uint8_t**)dst, dstStride, c->dstW, dstY, dstH, dstY >> c->chrDstVSubSample, - FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample), 0); + AV_CEIL_RSHIFT(dstH, c->chrDstVSubSample), 0); if (srcSliceY == 0) { hout_slice->plane[0].sliceY = lastInLumBuf + 1; hout_slice->plane[1].sliceY = lastInChrBuf + 1; @@ -558,7 +558,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], // Do we have enough lines in this slice to output the dstY line enough_lines = lastLumSrcY2 < srcSliceY + srcSliceH && - lastChrSrcY < FF_CEIL_RSHIFT(srcSliceY + srcSliceH, c->chrSrcVSubSample); + lastChrSrcY < AV_CEIL_RSHIFT(srcSliceY + srcSliceH, c->chrSrcVSubSample); if (!enough_lines) { lastLumSrcY = srcSliceY + srcSliceH - 1; @@ -580,7 +580,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], cPosY = hout_slice->plane[1].sliceY + hout_slice->plane[1].sliceH; if (cPosY <= lastChrSrcY && !hasChrHoles) { firstCPosY = FFMAX(firstChrSrcY, cPosY); - lastCPosY = FFMIN(lastChrSrcY + MAX_LINES_AHEAD, FF_CEIL_RSHIFT(srcSliceY + srcSliceH, c->chrSrcVSubSample) - 1); + lastCPosY = FFMIN(lastChrSrcY + MAX_LINES_AHEAD, AV_CEIL_RSHIFT(srcSliceY + srcSliceH, c->chrSrcVSubSample) - 1); } else { firstCPosY = lastInChrBuf + 1; lastCPosY = lastChrSrcY; diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 89d513156a..74f3467428 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -1413,9 +1413,9 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], const AVPixFmtDescriptor *desc_dst = av_pix_fmt_desc_get(c->dstFormat); int plane, i, j; for (plane = 0; plane < 4; plane++) { - int length = (plane == 0 || plane == 3) ? c->srcW : FF_CEIL_RSHIFT(c->srcW, c->chrDstHSubSample); - int y = (plane == 0 || plane == 3) ? srcSliceY: FF_CEIL_RSHIFT(srcSliceY, c->chrDstVSubSample); - int height = (plane == 0 || plane == 3) ? srcSliceH: FF_CEIL_RSHIFT(srcSliceH, c->chrDstVSubSample); + int length = (plane == 0 || plane == 3) ? c->srcW : AV_CEIL_RSHIFT(c->srcW, c->chrDstHSubSample); + int y = (plane == 0 || plane == 3) ? srcSliceY: AV_CEIL_RSHIFT(srcSliceY, c->chrDstVSubSample); + int height = (plane == 0 || plane == 3) ? srcSliceH: AV_CEIL_RSHIFT(srcSliceH, c->chrDstVSubSample); const uint8_t *srcPtr = src[plane]; uint8_t *dstPtr = dst[plane] + dstStride[plane] * y; int shiftonly = plane == 1 || plane == 2 || (!c->srcRange && plane == 0); diff --git a/libswscale/utils.c b/libswscale/utils.c index 73aefc503d..ef4241ac37 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1358,11 +1358,11 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, (flags & SWS_FAST_BILINEAR))) c->chrSrcHSubSample = 1; - // Note the FF_CEIL_RSHIFT is so that we always round toward +inf. - c->chrSrcW = FF_CEIL_RSHIFT(srcW, c->chrSrcHSubSample); - c->chrSrcH = FF_CEIL_RSHIFT(srcH, c->chrSrcVSubSample); - c->chrDstW = FF_CEIL_RSHIFT(dstW, c->chrDstHSubSample); - c->chrDstH = FF_CEIL_RSHIFT(dstH, c->chrDstVSubSample); + // Note the AV_CEIL_RSHIFT is so that we always round toward +inf. + c->chrSrcW = AV_CEIL_RSHIFT(srcW, c->chrSrcHSubSample); + c->chrSrcH = AV_CEIL_RSHIFT(srcH, c->chrSrcVSubSample); + c->chrDstW = AV_CEIL_RSHIFT(dstW, c->chrDstHSubSample); + c->chrDstH = AV_CEIL_RSHIFT(dstH, c->chrDstVSubSample); FF_ALLOCZ_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail); diff --git a/libswscale/vscale.c b/libswscale/vscale.c index 39e1eec9bb..72f799de1a 100644 --- a/libswscale/vscale.c +++ b/libswscale/vscale.c @@ -70,7 +70,7 @@ static int chr_planar_vscale(SwsContext *c, SwsFilterDescriptor *desc, int slice return 0; else { VScalerContext *inst = desc->instance; - int dstW = FF_CEIL_RSHIFT(desc->dst->width, desc->dst->h_chr_sub_sample); + int dstW = AV_CEIL_RSHIFT(desc->dst->width, desc->dst->h_chr_sub_sample); int chrSliceY = sliceY >> desc->dst->v_chr_sub_sample; int first = FFMAX(1-inst->filter_size, inst->filter_pos[chrSliceY]); diff --git a/libswscale/x86/rgb2rgb_template.c b/libswscale/x86/rgb2rgb_template.c index b56e15cf36..95d4f8fd8a 100644 --- a/libswscale/x86/rgb2rgb_template.c +++ b/libswscale/x86/rgb2rgb_template.c @@ -2457,7 +2457,7 @@ static void RENAME(yuyvtoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co 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++) { RENAME(extract_even)(src, ydst, width); @@ -2483,7 +2483,7 @@ static void RENAME(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co 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++) { RENAME(extract_even)(src, ydst, width); @@ -2507,7 +2507,7 @@ static void RENAME(uyvytoyuv420)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co 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++) { RENAME(extract_odd)(src, ydst, width); @@ -2533,7 +2533,7 @@ static void RENAME(uyvytoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, co 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++) { RENAME(extract_odd)(src, ydst, width); |