diff options
author | Peter Schlaile <peter@schlaile.de> | 2008-06-03 01:35:57 +0400 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2008-06-03 01:35:57 +0400 |
commit | ca8aa8c901934dc0e3eb1b65618d40bfb65f9111 (patch) | |
tree | 72e3ea5d2f5e224a683e064d34f6ee47eff90c59 /source/blender/imbuf/intern/util.c | |
parent | 8a5f36219214b4a5b8348b8e200ef5aac2297963 (diff) |
== RED one (redcode) ==
This adds redcode (the file format of RED one, R3D) support to blender.
Seems to work fine with the footage I found on the web, but keep in
mind, that because of the unoptimized nature of libopenjpeg, frame
decoding isn't that fast.
It is also a rather challenging task, to make 4k-float-footage realtime :)
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 632a471ecd0..4f6730db1f1 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -321,6 +321,19 @@ static int isffmpeg (char *filename) { } #endif +#ifdef WITH_REDCODE +static int isredcode(char * filename) +{ + struct redcode_handle * h = redcode_open(filename); + if (!h) { + return 0; + } + redcode_close(h); + return 1; +} + +#endif + int imb_get_anim_type(char * name) { int type; struct stat st; @@ -355,6 +368,9 @@ int imb_get_anim_type(char * name) { if (isffmpeg(name)) return (ANIM_FFMPEG); # endif #endif +#ifdef WITH_REDCODE + if (isredcode(name)) return (ANIM_REDCODE); +#endif type = IMB_ispic(name); if (type == ANIM) return (ANIM_ANIM5); if (type) return(ANIM_SEQUENCE); @@ -369,6 +385,7 @@ int IMB_isanim(char *filename) { if( BLI_testextensie(filename, ".avi") || BLI_testextensie(filename, ".flc") || BLI_testextensie(filename, ".dv") + || BLI_testextensie(filename, ".r3d") || BLI_testextensie(filename, ".mov") || BLI_testextensie(filename, ".movie") || BLI_testextensie(filename, ".mv")) { @@ -379,6 +396,7 @@ int IMB_isanim(char *filename) { } else { // no quicktime if( BLI_testextensie(filename, ".avi") || BLI_testextensie(filename, ".dv") + || BLI_testextensie(filename, ".r3d") || BLI_testextensie(filename, ".mv")) { type = imb_get_anim_type(filename); } |