Fix T91992: Incorrect clip strip image size

When proxy size lower than 100% is used, clip strips are rendered with
incorrect image size.

This is because if proxies aren't enabled in movieclip, it automatically
falls back on rendering original media. Sequencer doesn't have knowledge
about this and since 9c99292a16 it assumes that image is proxy,
because it explicitly requested this size.

Check movieclip flag to see if proxies are enabled.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D13080
This commit is contained in:
Richard Antalik 2021-11-15 20:07:46 +01:00
parent 62da41d63d
commit ef8240e64c
Notes: blender-bot 2023-02-14 11:07:28 +01:00
Referenced by issue #91992, Proxy Render Size is cropping instead of lowering down the resolution
3 changed files with 8 additions and 1 deletions

View File

@ -95,6 +95,7 @@ void BKE_movieclip_build_proxy_frame_for_ibuf(struct MovieClip *clip,
int *build_sizes,
int build_count,
bool undistorted);
bool BKE_movieclip_proxy_enabled(struct MovieClip *clip);
float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr);
float BKE_movieclip_remap_clip_to_scene_frame(const struct MovieClip *clip, float framenr);

View File

@ -1925,6 +1925,11 @@ void BKE_movieclip_build_proxy_frame_for_ibuf(MovieClip *clip,
}
}
bool BKE_movieclip_proxy_enabled(MovieClip *clip)
{
return clip->flag & MCLIP_USE_PROXY;
}
float BKE_movieclip_remap_scene_to_clip_frame(const MovieClip *clip, float framenr)
{
return framenr - (float)clip->start_frame + 1.0f;

View File

@ -1181,7 +1181,8 @@ static ImBuf *seq_render_movieclip_strip(const SeqRenderData *context,
/* Try to get a proxy image. */
ibuf = seq_get_movieclip_ibuf(seq, user);
if (ibuf != NULL && psize != IMB_PROXY_NONE) {
/* If clip doesn't use proxies, it will fallback to full size render of original file. */
if (ibuf != NULL && psize != IMB_PROXY_NONE && BKE_movieclip_proxy_enabled(seq->clip)) {
*r_is_proxy_image = true;
}