diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-02-21 20:40:59 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 01:47:59 +0200 |
commit | 81048def5872481a5ac8da67f616f94b9134a4d9 (patch) | |
tree | a28bedd5d45ea59f3b2211d41db77e7d43dabcc5 /libmpcodecs | |
parent | 3dc0cfc1fe388468426f12cf8e0ccc1f0220657f (diff) | |
download | mpv-81048def5872481a5ac8da67f616f94b9134a4d9.tar.bz2 mpv-81048def5872481a5ac8da67f616f94b9134a4d9.tar.xz |
vf.c: increase default alignment values
Adjust MPlayer default alignment values to match FFmpeg's.
Fixes "stride changed" errors when using e.g. MPEG-2 decoder
with -vf unsharp.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34753 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index 1954224359..a31ec9e734 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -292,8 +292,7 @@ mp_image_t *vf_get_image(vf_instance_t *vf, unsigned int outfmt, if (h == -1) h = vf->h; - w2 = (mp_imgflag & MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE) ? - ((w + 15) & (~15)) : w; + w2 = (mp_imgflag & MP_IMGFLAG_ACCEPT_ALIGNED_STRIDE) ? FFALIGN(w, 32) : w; if (vf->put_image == vf_next_put_image) { // passthru mode, if the filter uses the fallback/default put_image() @@ -398,8 +397,8 @@ mp_image_t *vf_get_image(vf_instance_t *vf, unsigned int outfmt, if (mp_imgflag & MP_IMGFLAG_PREFER_ALIGNED_STRIDE) { int align = (mpi->flags & MP_IMGFLAG_PLANAR && mpi->flags & MP_IMGFLAG_YUV) ? - (8 << mpi->chroma_x_shift) - 1 : 15; // OK? - w2 = ((w + align) & (~align)); + (16 << mpi->chroma_x_shift) - 1 : 32; // OK? + w2 = FFALIGN(w, align); if (mpi->width != w2) { // we have to change width... check if we CAN co it: int flags = vf->query_format(vf, outfmt); |