diff options
author | wm4 <wm4@nowhere> | 2012-11-22 19:22:38 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-11-22 19:22:38 +0100 |
commit | 1d3179a5f1dc2fdfeaac3582a925c2849ac265a9 (patch) | |
tree | 1c1dc8346a71a4b911023b231e750fac78b23490 /video/mp_image.h | |
parent | 11783b5edee8ce6efc8ee526433053afe3c14ed4 (diff) | |
download | mpv-1d3179a5f1dc2fdfeaac3582a925c2849ac265a9.tar.bz2 mpv-1d3179a5f1dc2fdfeaac3582a925c2849ac265a9.tar.xz |
mp_image: make alloc_mpi() always allocate with aligned stride
By "design", mplayer normally allocates aligned images only inside the
filter chain, via the vf_get_image() function. This function pads the
width of the requested image if a stride is allowed, sets that new width
before calling mp_image_alloc_planes().
However, newer code wants aligned images as well (basically to satisfy
libswscale). This affects all uses of alloc_mpi(). To get aligned
strides, simply change alloc_mpi() to request an aligned width.
Remove the old hack in mp_image_alloc_planes(), which special cases some
image formats to be allocated with aligned strides.
This is a temporary hack until mp_image_alloc_planes() is revised.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r-- | video/mp_image.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/mp_image.h b/video/mp_image.h index 8ce0b98edc..d2c7d38f50 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -26,6 +26,9 @@ #include "core/mp_msg.h" #include "csputils.h" +// Minimum stride alignment in pixels +#define MP_STRIDE_ALIGNMENT 32 + //--------- codec's requirements (filled by the codec/vf) --------- //--- buffer content restrictions: |