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/draw_bmp.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/draw_bmp.c')
-rw-r--r-- | sub/draw_bmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 245d1edd2b..79b44bfa66 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -274,8 +274,8 @@ static void draw_rgba(struct mp_draw_sub_cache **cache, struct mp_rect bb, part->imgs[i].i = talloc_steal(part, sbi); part->imgs[i].a = talloc_steal(part, sba); } else { - free_mp_image(sbi); - free_mp_image(sba); + talloc_free(sbi); + talloc_free(sba); } } } @@ -520,7 +520,7 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, if (dst->imgfmt == format) { temp = &dst_region; } else { - temp = alloc_mpi(bb.x1 - bb.x0, bb.y1 - bb.y0, format); + temp = mp_image_alloc(format, bb.x1 - bb.x0, bb.y1 - bb.y0); // temp is always YUV, dst_region not // reduce amount of conversions in YUV case (upsampling/shifting only) if (dst_region.flags & MP_IMGFLAG_YUV) { @@ -538,7 +538,7 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, if (temp != &dst_region) { mp_image_swscale(&dst_region, temp, SWS_AREA); // chroma down - free_mp_image(temp); + talloc_free(temp); } } @@ -581,7 +581,7 @@ static void backup_realloc(struct mp_draw_sub_backup *backup, return; talloc_free_children(backup); - backup->image = alloc_mpi(img->w, img->h, img->imgfmt); + backup->image = mp_image_alloc(img->imgfmt, img->w, img->h); talloc_steal(backup, backup->image); for (int p = 0; p < MP_MAX_PLANES; p++) { backup->lines[p] = talloc_array(backup, struct line_ext, |