diff options
author | Stefan Werner <stefan.werner@tangent-animation.com> | 2018-11-23 15:08:15 +0300 |
---|---|---|
committer | Stefan Werner <stefan.werner@tangent-animation.com> | 2018-11-23 15:19:53 +0300 |
commit | 071f4f4ce0b9520ab0c73d6d68365ad449ca8b80 (patch) | |
tree | 9f37bfcac669366b9ad5fb7605f2fbbed9b71b0a /source/blender/blenkernel/intern/writeffmpeg.c | |
parent | 0a2b2d59a5897212ba3771503feb6770fb636bc8 (diff) |
Cycles: Improved robustness of hair motion blur.motion_curve_fix
In some instances, the number of control vertices of a hair could change mid-frame.
Cycles would then be unable to calculate proper motion blur for those hairs. This adds
interpolated CVs to fill in for the missing data. While this will not necessarily result in
a fully accurate reconstruction of the guide hair, it preserves motion blur instead of disabling it.
Reviewers: #cycles, sergey
Reviewed By: #cycles, sergey
Subscribers: sergey, brecht, #cycles
Tags: #cycles
Differential Revision: https://developer.blender.org/D3695
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 2bee16a30c8..68083b499f3 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -736,6 +736,26 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, RenderData *rd, int c->sample_fmt = AV_SAMPLE_FMT_S16; c->channels = rd->ffcodecdata.audio_channels; +#ifdef FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT + switch (rd->ffcodecdata.audio_channels) { + case FFM_CHANNELS_MONO: + c->channel_layout = AV_CH_LAYOUT_MONO; + break; + case FFM_CHANNELS_STEREO: + c->channel_layout = AV_CH_LAYOUT_STEREO; + break; + case FFM_CHANNELS_SURROUND4: + c->channel_layout = AV_CH_LAYOUT_QUAD; + break; + case FFM_CHANNELS_SURROUND51: + c->channel_layout = AV_CH_LAYOUT_5POINT1_BACK; + break; + case FFM_CHANNELS_SURROUND71: + c->channel_layout = AV_CH_LAYOUT_7POINT1; + break; + } +#endif + if (request_float_audio_buffer(codec_id)) { /* mainly for AAC codec which is experimental */ c->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; |