summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-04-20 21:27:45 +0200
committerwm4 <wm4@nowhere>2014-04-21 02:57:16 +0200
commit5e4e248dc200606e75bc382bebe045afc1962571 (patch)
tree5484bf360536a81ae344e49b9c6d009a08c4c2f0 /sub
parent44096073e96c623f3e3c80bed7ee13d58869cecd (diff)
downloadmpv-5e4e248dc200606e75bc382bebe045afc1962571.tar.bz2
mpv-5e4e248dc200606e75bc382bebe045afc1962571.tar.xz
video: make mp_image use mp_image_params directly
Minor cleanup, so that we can stuff more information into mp_image_params later.
Diffstat (limited to 'sub')
-rw-r--r--sub/draw_bmp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c
index 2e92bdaaa5..0b24689313 100644
--- a/sub/draw_bmp.c
+++ b/sub/draw_bmp.c
@@ -229,8 +229,8 @@ static void scale_sb_rgba(struct sub_bitmap *sb, struct mp_image *dst_format,
unpremultiply_and_split_BGR32(sbisrc2, sba);
struct mp_image *sbi = mp_image_alloc(dst_format->imgfmt, sb->dw, sb->dh);
- sbi->colorspace = dst_format->colorspace;
- sbi->levels = dst_format->levels;
+ sbi->params.colorspace = dst_format->params.colorspace;
+ sbi->params.colorlevels = dst_format->params.colorlevels;
mp_image_swscale(sbi, sbisrc2, SWS_BILINEAR);
talloc_free(sbisrc2);
@@ -280,8 +280,8 @@ static void draw_ass(struct mp_draw_sub_cache *cache, struct mp_rect bb,
struct mp_image *temp, int bits, struct sub_bitmaps *sbs)
{
struct mp_csp_params cspar = MP_CSP_PARAMS_DEFAULTS;
- cspar.colorspace.format = temp->colorspace;
- cspar.colorspace.levels_in = temp->levels;
+ cspar.colorspace.format = temp->params.colorspace;
+ cspar.colorspace.levels_in = temp->params.colorlevels;
cspar.colorspace.levels_out = MP_CSP_LEVELS_PC; // RGB (libass.color)
cspar.int_bits_in = bits;
cspar.int_bits_out = 8;
@@ -393,8 +393,8 @@ static struct part *get_cache(struct mp_draw_sub_cache *cache,
if (part) {
if (part->bitmap_pos_id != sbs->bitmap_pos_id
|| part->imgfmt != format->imgfmt
- || part->colorspace != format->colorspace
- || part->levels != format->levels)
+ || part->colorspace != format->params.colorspace
+ || part->levels != format->params.colorlevels)
{
talloc_free(part);
part = NULL;
@@ -406,8 +406,8 @@ static struct part *get_cache(struct mp_draw_sub_cache *cache,
.bitmap_pos_id = sbs->bitmap_pos_id,
.num_imgs = sbs->num_parts,
.imgfmt = format->imgfmt,
- .levels = format->levels,
- .colorspace = format->colorspace,
+ .levels = format->params.colorlevels,
+ .colorspace = format->params.colorspace,
};
part->imgs = talloc_zero_array(part, struct sub_cache,
part->num_imgs);
@@ -461,8 +461,8 @@ static struct mp_image *chroma_up(struct mp_draw_sub_cache *cache, int imgfmt,
// The temp image is always YUV, but src not necessarily.
// Reduce amount of conversions in YUV case (upsampling/shifting only)
if (src->flags & MP_IMGFLAG_YUV) {
- temp->colorspace = src->colorspace;
- temp->levels = src->levels;
+ temp->params.colorspace = src->params.colorspace;
+ temp->params.colorlevels = src->params.colorlevels;
}
if (src->imgfmt == IMGFMT_420P) {