Page Menu
Home
Search
Configure Global Search
Log In
Paste
P728
T55422 snippet
Active
Public
Actions
Authored by
Philipp Oeser (lichtwerk)
on Jun 14 2018, 2:09 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index f842b69418e..36c198f97d6 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -1161,7 +1161,8 @@ static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position,
}
IMB_freeImBuf(anim->last_frame);
- anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
+ bool use_float = (anim->pCodecCtx->bits_per_raw_sample > 8);
+ anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, use_float ? IB_rectfloat : IB_rect);
anim->last_frame->rect_colorspace = colormanage_colorspace_get_named(anim->colorspace);
ffmpeg_postprocess(anim);
@@ -1264,7 +1265,8 @@ static ImBuf *anim_getnew(struct anim *anim)
#ifdef WITH_FFMPEG
case ANIM_FFMPEG:
if (startffmpeg(anim)) return (0);
- ibuf = IMB_allocImBuf(anim->x, anim->y, 24, 0);
+ bool use_float = (anim->pCodecCtx->bits_per_raw_sample > 8);
+ ibuf = IMB_allocImBuf(anim->x, anim->y, 24, use_float ? IB_rectfloat : IB_rect);
break;
#endif
}
Event Timeline
Philipp Oeser (lichtwerk)
created this paste.
Jun 14 2018, 2:09 PM
Philipp Oeser (lichtwerk)
mentioned this in
T55422: Motion JPEG 2000 with 16bit color channels lose color resolution.
.
Jun 14 2018, 2:14 PM
Log In to Comment