Changeset View
Changeset View
Standalone View
Standalone View
source/blender/sequencer/intern/render.c
| Show First 20 Lines • Show All 780 Lines • ▼ Show 20 Lines | static ImBuf *seq_render_preprocess_ibuf(const SeqRenderData *context, | ||||
| bool use_preprocess, | bool use_preprocess, | ||||
| const bool is_proxy_image) | const bool is_proxy_image) | ||||
| { | { | ||||
| if (context->is_proxy_render == false && | if (context->is_proxy_render == false && | ||||
| (ibuf->x != context->rectx || ibuf->y != context->recty)) { | (ibuf->x != context->rectx || ibuf->y != context->recty)) { | ||||
| use_preprocess = true; | use_preprocess = true; | ||||
| } | } | ||||
| if (use_preprocess) { | |||||
| float cost = seq_estimate_render_cost_end(context->scene, begin); | |||||
| /* TODO(Richard): It should be possible to store in cache if image is proxy, | /* TODO(Richard): It should be possible to store in cache if image is proxy, | ||||
| * but it adds quite a bit of complexity. Since proxies are fast to read, I would | * but it adds quite a bit of complexity. Since proxies are fast to read, I would | ||||
| * rather simplify existing code a bit. */ | * rather simplify existing code a bit. */ | ||||
| if (!is_proxy_image) { | if (!is_proxy_image) { | ||||
| float cost = seq_estimate_render_cost_end(context->scene, begin); | |||||
| BKE_sequencer_cache_put(context, seq, cfra, SEQ_CACHE_STORE_RAW, ibuf, cost, false); | BKE_sequencer_cache_put(context, seq, cfra, SEQ_CACHE_STORE_RAW, ibuf, cost, false); | ||||
| } | } | ||||
| if (use_preprocess) { | |||||
| /* Reset timer so we can get partial render time. */ | /* Reset timer so we can get partial render time. */ | ||||
| begin = seq_estimate_render_cost_begin(); | begin = seq_estimate_render_cost_begin(); | ||||
| ibuf = input_preprocess(context, seq, cfra, ibuf, is_proxy_image); | ibuf = input_preprocess(context, seq, cfra, ibuf, is_proxy_image); | ||||
| } | } | ||||
| float cost = seq_estimate_render_cost_end(context->scene, begin); | float cost = seq_estimate_render_cost_end(context->scene, begin); | ||||
| BKE_sequencer_cache_put(context, seq, cfra, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false); | BKE_sequencer_cache_put(context, seq, cfra, SEQ_CACHE_STORE_PREPROCESSED, ibuf, cost, false); | ||||
| return ibuf; | return ibuf; | ||||
| ▲ Show 20 Lines • Show All 1,300 Lines • Show Last 20 Lines | |||||