[Bf-blender-cvs] [606f6b7] master: Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8

Sergey Sharybin noreply at git.blender.org
Thu Mar 10 09:22:37 CET 2016


Commit: 606f6b79eabca236b933dd76e5425162e26ba105
Author: Sergey Sharybin
Date:   Thu Mar 10 13:17:27 2016 +0500
Branches: master
https://developer.blender.org/rB606f6b79eabca236b933dd76e5425162e26ba105

Fix T47724: VSE crops video if horizontal resolution isn't divisible by 8

This is a bit annoying, but FFmpeg can't deal with unaligned arrays in some
cases. There seems to be an easy workaround with using SWS_ACCURATE_RND flag
which should be harmless since we don't really scaling frames, but only
using sws_scale to change color space.

Additionally, this is what VLC is also using.

===================================================================

M	source/blender/imbuf/intern/anim_movie.c

===================================================================

diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index 1b4ce42..1b3b9c2 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -600,7 +600,7 @@ static int startffmpeg(struct anim *anim)
 	        anim->x,
 	        anim->y,
 	        AV_PIX_FMT_RGBA,
-	        SWS_FAST_BILINEAR | SWS_PRINT_INFO | SWS_FULL_CHR_H_INT,
+	        SWS_FAST_BILINEAR | SWS_PRINT_INFO | SWS_FULL_CHR_H_INT | SWS_ACCURATE_RND,
 	        NULL, NULL, NULL);
 		
 	if (!anim->img_convert_ctx) {




More information about the Bf-blender-cvs mailing list