diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-09 16:27:11 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-04-09 16:27:11 +0300 |
commit | 7e39d151d850590fbabc9870bc5134d9421c5c2c (patch) | |
tree | 3f9a81d25bb2638c62bd4d308cc51a06015a7511 /source/blender/blenloader/intern/versioning_270.c | |
parent | 39116a434038cadafbfb7e63106ff45fefdd56d8 (diff) |
Added support for the WEBM/VP9 video codec
WEBM is the codec name, and VP9 is the encoder (the older encoder "VP8"
is less efficient than VP9).
WEBM/VP9 and h.264 both have options to control the file size versus
compression time (e.g. fast but big, or slow and small, for the same
output quality). Since WEBM/VP9 only has three choices, I've chosen to
map those to 3 of the 9 possible choices of h.264:
- BEST → SLOWER
- GOOD → MEDIUM
- REALTIME → SUPERFAST
The VERYSLOW and ULTRAFAST options give very little extra benefit.
Reviewed by: @Severin
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index f1c40aae399..e9de7919d25 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1796,6 +1796,23 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + for (Scene *scene = main->scene.first; scene; scene = scene->id.next) { + int preset = scene->r.ffcodecdata.ffmpeg_preset; + if (preset == FFM_PRESET_NONE || preset >= FFM_PRESET_GOOD) { + continue; + } + if (preset <= FFM_PRESET_FAST) { + preset = FFM_PRESET_REALTIME; + } + else if (preset >= FFM_PRESET_SLOW) { + preset = FFM_PRESET_BEST; + } + else { + preset = FFM_PRESET_GOOD; + } + scene->r.ffcodecdata.ffmpeg_preset = preset; + } } } |