Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/sequencer.c
| Show First 20 Lines • Show All 1,628 Lines • ▼ Show 20 Lines | typedef struct SeqIndexBuildContext { | ||||
| Sequence *seq, *orig_seq; | Sequence *seq, *orig_seq; | ||||
| } SeqIndexBuildContext; | } SeqIndexBuildContext; | ||||
| #define PROXY_MAXFILE (2 * FILE_MAXDIR + FILE_MAXFILE) | #define PROXY_MAXFILE (2 * FILE_MAXDIR + FILE_MAXFILE) | ||||
| static IMB_Proxy_Size seq_rendersize_to_proxysize(int render_size) | static IMB_Proxy_Size seq_rendersize_to_proxysize(int render_size) | ||||
| { | { | ||||
| switch (render_size) { | switch (render_size) { | ||||
| case SEQ_PROXY_RENDER_SIZE_25: | case SEQ_RENDER_SIZE_PROXY_25: | ||||
| return IMB_PROXY_25; | return IMB_PROXY_25; | ||||
| case SEQ_PROXY_RENDER_SIZE_50: | case SEQ_RENDER_SIZE_PROXY_50: | ||||
| return IMB_PROXY_50; | return IMB_PROXY_50; | ||||
| case SEQ_PROXY_RENDER_SIZE_75: | case SEQ_RENDER_SIZE_PROXY_75: | ||||
| return IMB_PROXY_75; | return IMB_PROXY_75; | ||||
| case SEQ_PROXY_RENDER_SIZE_100: | case SEQ_RENDER_SIZE_PROXY_100: | ||||
| return IMB_PROXY_100; | return IMB_PROXY_100; | ||||
| } | } | ||||
| return IMB_PROXY_NONE; | return IMB_PROXY_NONE; | ||||
| } | } | ||||
| double BKE_sequencer_rendersize_to_scale_factor(int render_size) | double BKE_sequencer_rendersize_to_scale_factor(int render_size) | ||||
| { | { | ||||
| switch (render_size) { | switch (render_size) { | ||||
| case SEQ_PROXY_RENDER_SIZE_25: | case SEQ_RENDER_SIZE_PROXY_25: | ||||
| return 0.25; | return 0.25; | ||||
| case SEQ_PROXY_RENDER_SIZE_50: | case SEQ_RENDER_SIZE_PROXY_50: | ||||
| return 0.50; | return 0.50; | ||||
| case SEQ_PROXY_RENDER_SIZE_75: | case SEQ_RENDER_SIZE_PROXY_75: | ||||
| return 0.75; | return 0.75; | ||||
| } | } | ||||
| return 1.0; | return 1.0; | ||||
| } | } | ||||
| /* the number of files will vary according to the stereo format */ | /* the number of files will vary according to the stereo format */ | ||||
| static int seq_num_files(Scene *scene, char views_format, const bool is_multiview) | static int seq_num_files(Scene *scene, char views_format, const bool is_multiview) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 1,045 Lines • ▼ Show 20 Lines | if (seq->flag & SEQ_USE_CROP && seq->strip->crop) { | ||||
| c = *seq->strip->crop; | c = *seq->strip->crop; | ||||
| } | } | ||||
| if (seq->flag & SEQ_USE_TRANSFORM && seq->strip->transform) { | if (seq->flag & SEQ_USE_TRANSFORM && seq->strip->transform) { | ||||
| t = *seq->strip->transform; | t = *seq->strip->transform; | ||||
| } | } | ||||
| /* Calculate scale factor for current image if needed. */ | /* Calculate scale factor for current image if needed. */ | ||||
| double scale_factor, image_scale_factor = 1.0; | double scale_factor, image_scale_factor = 1.0; | ||||
| if (context->preview_render_size == SEQ_PROXY_RENDER_SIZE_SCENE) { | if (context->preview_render_size == SEQ_RENDER_SIZE_SCENE) { | ||||
| scale_factor = image_scale_factor = (double)scene->r.size / 100; | scale_factor = image_scale_factor = (double)scene->r.size / 100; | ||||
| } | } | ||||
| else { | else { | ||||
| scale_factor = BKE_sequencer_rendersize_to_scale_factor(context->preview_render_size); | scale_factor = BKE_sequencer_rendersize_to_scale_factor(context->preview_render_size); | ||||
| if (!is_proxy_image) { | if (!is_proxy_image) { | ||||
| image_scale_factor = scale_factor; | image_scale_factor = scale_factor; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,466 Lines • Show Last 20 Lines | |||||