diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-22 17:00:03 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-11-22 17:00:03 +0000 |
commit | 6e736f6cac9678092f1a8036bc85dc7875239742 (patch) | |
tree | b81ecdf8fdd24f3da811cc57025c76281a2d2bed /libmpcodecs | |
parent | a576d63a1bba218812a7f6cef6570b6b6be4a219 (diff) | |
download | mpv-6e736f6cac9678092f1a8036bc85dc7875239742.tar.bz2 mpv-6e736f6cac9678092f1a8036bc85dc7875239742.tar.xz |
Fix incorrect stride used in vf_ass.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21170 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_ass.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libmpcodecs/vf_ass.c b/libmpcodecs/vf_ass.c index 3fed4f159c..88fbd2eab5 100644 --- a/libmpcodecs/vf_ass.c +++ b/libmpcodecs/vf_ass.c @@ -218,7 +218,7 @@ static void copy_from_image(struct vf_instance_s* vf, int first_row, int last_ro chroma_rows = (last_row - first_row) / 2; for (pl = 1; pl < 3; ++pl) { - int dst_stride = vf->dmpi->stride[pl] * 2; + int dst_stride = vf->priv->outw; int src_stride = vf->dmpi->stride[pl]; unsigned char* src = vf->dmpi->planes[pl] + (first_row/2) * src_stride; @@ -254,7 +254,7 @@ static void copy_to_image(struct vf_instance_s* vf) int i, j, k; for (pl = 1; pl < 3; ++pl) { int dst_stride = vf->dmpi->stride[pl]; - int src_stride = vf->dmpi->stride[pl] * 2; + int src_stride = vf->priv->outw; unsigned char* dst = vf->dmpi->planes[pl]; unsigned char* src = vf->priv->planes[pl]; @@ -291,8 +291,8 @@ static void my_draw_bitmap(struct vf_instance_s* vf, unsigned char* bitmap, int src = bitmap; dsty = dmpi->planes[0] + dst_x + dst_y * dmpi->stride[0]; - dstu = vf->priv->planes[1] + dst_x + dst_y * 2 * dmpi->chroma_width; - dstv = vf->priv->planes[2] + dst_x + dst_y * 2 * dmpi->chroma_width; + dstu = vf->priv->planes[1] + dst_x + dst_y * vf->priv->outw; + dstv = vf->priv->planes[2] + dst_x + dst_y * vf->priv->outw; for (i = 0; i < bitmap_h; ++i) { for (j = 0; j < bitmap_w; ++j) { unsigned k = ((unsigned)src[j]) * opacity / 255; @@ -302,8 +302,8 @@ static void my_draw_bitmap(struct vf_instance_s* vf, unsigned char* bitmap, int } src += stride; dsty += dmpi->stride[0]; - dstu += 2 * dmpi->chroma_width; - dstv += 2 * dmpi->chroma_width; + dstu += vf->priv->outw; + dstv += vf->priv->outw; } } |