Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zed9h/819449 to your computer and use it in GitHub Desktop.
Save zed9h/819449 to your computer and use it in GitHub Desktop.
Fix the jagged MOV output on Blender 2.49a (something to do with libscale 0.7.1 BGR32 format, that does not happen with RGB32)
--- blender-2.49a+dfsg/source/blender/imbuf/intern/anim.c.orig 2010-02-17 01:29:57.221381687 -0200
+++ blender-2.49a+dfsg/source/blender/imbuf/intern/anim.c 2010-02-17 01:30:01.810124170 -0200
@@ -640,11 +640,11 @@
anim->pCodecCtx->width,
anim->pCodecCtx->height,
anim->pCodecCtx->pix_fmt,
anim->pCodecCtx->width,
anim->pCodecCtx->height,
- PIX_FMT_BGR32,
+ PIX_FMT_RGB32,
SWS_FAST_BILINEAR | SWS_PRINT_INFO,
NULL, NULL, NULL);
if (!anim->img_convert_ctx) {
fprintf (stderr,
@@ -860,13 +860,17 @@
/* workaround: sws_scale
sets alpha = 0... */
r = (unsigned char*) ibuf->rect;
+ unsigned char s;
for (i = 0; i < ibuf->x * ibuf->y;i++){
r[3] = 0xff;
+ s = r[0];
+ r[0] = r[2];
+ r[2] = s;
r+=4;
}
av_free_packet(&packet);
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment