summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-12-19 12:04:32 +0100
committerwm4 <wm4@nowhere>2013-01-13 20:04:10 +0100
commitab94c64ed2d8b90bd7b0c348e79c2d8b8d055ee6 (patch)
treec58bbce7185bd003daad53472a8c49fafb4d769a /video/decode/vd_lavc.c
parent00653a3eb0520e9d2409929cd217a5c299be2f5c (diff)
downloadmpv-ab94c64ed2d8b90bd7b0c348e79c2d8b8d055ee6.tar.bz2
mpv-ab94c64ed2d8b90bd7b0c348e79c2d8b8d055ee6.tar.xz
mp_image: simplify image allocation
mp_image_alloc_planes() allocated images with minimal stride, even if the resulting stride was unaligned. It was the responsibility of vf_get_image() to set an image's width to something larger than required to get an aligned stride, and then crop it. Always allocate with aligned strides instead. Get rid of IMGFMT_IF09 special handling. This format is not used anymore. (IF09 has 4x4 chroma sub-sampling, and that is what it was mainly used for - this is still supported.) Get rid of swapped chroma plane allocation. This is not used anywhere, and VOs like vo_xv, vo_direct3d and vo_sdl do their own swapping. Always round chroma width/height up instead of down. Consider 4:2:0 and an uneven image size. For luma, the size was left uneven, and the chroma size was rounded down. This doesn't make sense, because chroma would be missing for the bottom/right border. Remove mp_image_new_empty() and mp_image_alloc_planes(), they were not used anymore, except in draw_bmp.c. (It's still allowed to setup mp_images manually, you just can't allocate image data with them anymore - this is also done in draw_bmp.c.)
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 7fd7437a3b..2d47cb9c88 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -61,8 +61,8 @@ static const vd_info_t info = {
#include "libavcodec/avcodec.h"
#include "lavc.h"
-#if AVPALETTE_SIZE > 1024
-#error palette too large, adapt libmpcodecs/vf.c:vf_get_image
+#if AVPALETTE_SIZE != MP_PALETTE_SIZE
+#error palette too large, adapt video/mp_image.h:MP_PALETTE_SIZE
#endif
#include "core/m_option.h"