# HG changeset patch # User iive # Date 1394056684 0 # Node ID e299b6fd7eaabc0eec16b4b4418c3bb2541e3e8f # Parent 89c3ef454d9e2e396e7e2f8328bcd3a2991f0ffe Fix image size restrictions set by r35242. Luma blocks are 16x16, but chroma blocks are (two interweaved) 8x16. Since chroma is at quarter resolution it means that the image width must be multiple of 16, while height must be multiple of 32. diff -r 89c3ef454d9e -r e299b6fd7eaa libmpcodecs/vd_hmblck.c --- a/libmpcodecs/vd_hmblck.c Wed Mar 05 18:48:23 2014 +0000 +++ b/libmpcodecs/vd_hmblck.c Wed Mar 05 21:58:04 2014 +0000 @@ -81,9 +81,14 @@ if(sh->format != IMGFMT_HM12) return 0; - if((sh->disp_w&31) != 0 || (sh->disp_h&31) != 0) { + if((sh->disp_w&15) != 0) { mp_msg(MSGT_DECVIDEO, MSGL_ERR, - "hmblck: Image size must be multiple of 32.\n"); + "hmblck: Image width must be multiple of 16.\n"); + return 0; + } + if((sh->disp_h&31) != 0) { + mp_msg(MSGT_DECVIDEO, MSGL_ERR, + "hmblck: Image height must be multiple of 32.\n"); return 0; } return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,sh->format);