summaryrefslogtreecommitdiffstats
path: root/sub
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-10 21:02:16 +0200
committerwm4 <wm4@nowhere>2015-04-10 21:02:16 +0200
commit41151122e73f82d0bc9a806c80165878e930dc07 (patch)
tree6db2f28cf57cba6fcfe20f9229c4b9e27343cca1 /sub
parentb3495d9ccf5ad1d5d84284affed1083eee5887ee (diff)
downloadmpv-41151122e73f82d0bc9a806c80165878e930dc07.tar.bz2
mpv-41151122e73f82d0bc9a806c80165878e930dc07.tar.xz
mp_image: remove redundant chroma_x/y_shift fields
Diffstat (limited to 'sub')
-rw-r--r--sub/draw_bmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c
index 228d8a2dde..78fb33ca9f 100644
--- a/sub/draw_bmp.c
+++ b/sub/draw_bmp.c
@@ -334,13 +334,13 @@ static void draw_ass(struct mp_draw_sub_cache *cache, struct mp_rect bb,
static void get_swscale_alignment(const struct mp_image *img, int *out_xstep,
int *out_ystep)
{
- int sx = (1 << img->chroma_x_shift);
- int sy = (1 << img->chroma_y_shift);
+ int sx = (1 << img->fmt.chroma_xs);
+ int sy = (1 << img->fmt.chroma_ys);
for (int p = 0; p < img->num_planes; ++p) {
int bits = img->fmt.bpp[p];
// the * 2 fixes problems with writing past the destination width
- while (((sx >> img->chroma_x_shift) * bits) % (SWS_MIN_BYTE_ALIGN * 8 * 2))
+ while (((sx >> img->fmt.chroma_xs) * bits) % (SWS_MIN_BYTE_ALIGN * 8 * 2))
sx *= 2;
}