diff options
author | wm4 <wm4@nowhere> | 2012-12-22 21:46:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-01-13 20:04:11 +0100 |
commit | 0c5311f17cb9078f0ddde7c41cad61d00aea4a94 (patch) | |
tree | e8254feab42d21e0c6932ce68a34228529247f66 /sub/img_convert.c | |
parent | 15c7f7a33968edebe305e2845b32eb2383457d46 (diff) | |
download | mpv-0c5311f17cb9078f0ddde7c41cad61d00aea4a94.tar.bz2 mpv-0c5311f17cb9078f0ddde7c41cad61d00aea4a94.tar.xz |
video: cleanup: replace old mp_image function names
mp_image_alloc() also changes argument order compared to alloc_mpi().
The format now comes first, then width/height.
Diffstat (limited to 'sub/img_convert.c')
-rw-r--r-- | sub/img_convert.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sub/img_convert.c b/sub/img_convert.c index 0560b66aab..5e74ba9e84 100644 --- a/sub/img_convert.c +++ b/sub/img_convert.c @@ -73,7 +73,7 @@ bool osd_conv_idx_to_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs) rgba_to_premultiplied_rgba(sb.palette, 256); *d = *s; - struct mp_image *image = alloc_mpi(s->w, s->h, IMGFMT_BGRA); + struct mp_image *image = mp_image_alloc(IMGFMT_BGRA, s->w, s->h); talloc_steal(c->parts, image); d->stride = image->stride[0]; d->bitmap = image->planes[0]; @@ -104,8 +104,8 @@ bool osd_conv_blur_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs, // add a transparent padding border to reduce artifacts int pad = 5; - struct mp_image *temp = alloc_mpi(s->w + pad * 2, s->h + pad * 2, - IMGFMT_BGRA); + struct mp_image *temp = mp_image_alloc(IMGFMT_BGRA, s->w + pad * 2, + s->h + pad * 2); memset_pic(temp->planes[0], 0, temp->w * 4, temp->h, temp->stride[0]); uint8_t *p0 = temp->planes[0] + pad * 4 + pad * temp->stride[0]; memcpy_pic(p0, s->bitmap, s->w * 4, s->h, temp->stride[0], s->stride); @@ -117,7 +117,7 @@ bool osd_conv_blur_rgba(struct osd_conv_cache *c, struct sub_bitmaps *imgs, d->y = s->y - pad * sy; d->w = d->dw = s->dw + pad * 2 * sx; d->h = d->dh = s->dh + pad * 2 * sy; - struct mp_image *image = alloc_mpi(d->w, d->h, IMGFMT_BGRA); + struct mp_image *image = mp_image_alloc(IMGFMT_BGRA, d->w, d->h); talloc_steal(c->parts, image); d->stride = image->stride[0]; d->bitmap = image->planes[0]; |