diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-24 01:05:47 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-24 01:05:47 +0300 |
commit | 042d612df219c8f6a29afa235537380f227b5684 (patch) | |
tree | 310a2c859b99c559115bbcda0aa70f2543bf962c /source/blender/quicktime | |
parent | 5668480c99001a617fd59a2383deb858195ffb26 (diff) |
Giant commit!
A full detailed description of this will be done later... is several days
of work. Here's a summary:
Render:
- Full cleanup of render code, removing *all* globals and bad level calls
all over blender. Render module is now not called abusive anymore
- API-fied calls to rendering
- Full recode of internal render pipeline. Is now rendering tiles by
default, prepared for much smarter 'bucket' render later.
- Each thread now can render a full part
- Renders were tested with 4 threads, goes fine, apart from some lookup
tables in softshadow and AO still
- Rendering is prepared to do multiple layers and passes
- No single 32 bits trick in render code anymore, all 100% floats now.
Writing images/movies
- moved writing images to blender kernel (bye bye 'schrijfplaatje'!)
- made a new Movie handle system, also in kernel. This will enable much
easier use of movies in Blender
PreviewRender:
- Using new render API, previewrender (in buttons) now uses regular render
code to generate images.
- new datafile 'preview.blend.c' has the preview scenes in it
- previews get rendered in exact displayed size (1 pixel = 1 pixel)
3D Preview render
- new; press Pkey in 3d window, for a panel that continuously renders
(pkey is for games, i know... but we dont do that in orange now!)
- this render works nearly identical to buttons-preview render, so it stops
rendering on any event (mouse, keyboard, etc)
- on moving/scaling the panel, the render code doesn't recreate all geometry
- same for shifting/panning view
- all other operations (now) regenerate the full render database still.
- this is WIP... but big fun, especially for simple scenes!
Compositor
- Using same node system as now in use for shaders, you can composit images
- works pretty straightforward... needs much more options/tools and integration
with rendering still
- is not threaded yet, nor is so smart to only recalculate changes... will be
done soon!
- the "Render Result" node will get all layers/passes as output sockets
- The "Output" node renders to a builtin image, which you can view in the Image
window. (yes, output nodes to render-result, and to files, is on the list!)
The Bad News
- "Unified Render" is removed. It might come back in some stage, but this
system should be built from scratch. I can't really understand this code...
I expect it is not much needed, especially with advanced layer/passes
control
- Panorama render, Field render, Motion blur, is not coded yet... (I had to
recode every single feature in render, so...!)
- Lens Flare is also not back... needs total revision, might become composit
effect though (using zbuffer for visibility)
- Part render is gone! (well, thats obvious, its default now).
- The render window is only restored with limited functionality... I am going
to check first the option to render to a Image window, so Blender can become
a true single-window application. :)
For example, the 'Spare render buffer' (jkey) doesnt work.
- Render with border, now default creates a smaller image
- No zbuffers are written yet... on the todo!
- Scons files and MSVC will need work to get compiling again
OK... thats what I can quickly recall. Now go compiling!
Diffstat (limited to 'source/blender/quicktime')
-rw-r--r-- | source/blender/quicktime/apple/quicktime_export.c | 50 | ||||
-rw-r--r-- | source/blender/quicktime/quicktime_export.h | 5 |
2 files changed, 31 insertions, 24 deletions
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 5c59f734345..462ee77cf25 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -34,15 +34,21 @@ #ifdef WITH_QUICKTIME #if defined(_WIN32) || defined(__APPLE__) +#include "DNA_scene_types.h" + #include "BKE_global.h" #include "BKE_scene.h" + #include "BLI_blenlib.h" #include "BIF_toolbox.h" /* error() */ + #include "BLO_sys_types.h" + #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" + #include "MEM_guardedalloc.h" -#include "render.h" + #include "quicktime_import.h" #include "quicktime_export.h" @@ -69,10 +75,10 @@ #define kTrackStart 0 #define kMediaStart 0 -static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame); -static void QT_DoAddVideoSamplesToMedia (int frame); +static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, int recty); +static void QT_DoAddVideoSamplesToMedia (int frame, int *pixels, int rectx, int recty); static void QT_EndAddVideoSamplesToMedia (void); -static void QT_CreateMyVideoTrack (void); +static void QT_CreateMyVideoTrack (int rectx, int recty); static void QT_EndCreateMyVideoTrack (void); static void check_renderbutton_framerate(void); @@ -249,7 +255,7 @@ static OSErr QT_AddUserDataTextToMovie (Movie theMovie, char *theText, OSType th } -static void QT_CreateMyVideoTrack(void) +static void QT_CreateMyVideoTrack(int rectx, int recty) { OSErr err = noErr; Rect trackFrame; @@ -257,8 +263,8 @@ static void QT_CreateMyVideoTrack(void) trackFrame.top = 0; trackFrame.left = 0; - trackFrame.bottom = R.recty; - trackFrame.right = R.rectx; + trackFrame.bottom = recty; + trackFrame.right = rectx; qtexport->theTrack = NewMovieTrack (qtexport->theMovie, FixRatio(trackFrame.right,1), @@ -281,7 +287,7 @@ static void QT_CreateMyVideoTrack(void) err = BeginMediaEdits (qtexport->theMedia); CheckError( err, "BeginMediaEdits error" ); - QT_StartAddVideoSamplesToMedia (&trackFrame); + QT_StartAddVideoSamplesToMedia (&trackFrame, rectx, recty); } @@ -303,19 +309,19 @@ static void QT_EndCreateMyVideoTrack(void) } -static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame) +static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame, int rectx, int recty) { OSErr err = noErr; - qtexport->ibuf = IMB_allocImBuf (R.rectx, R.recty, 32, IB_rect, 0); - qtexport->ibuf2 = IMB_allocImBuf (R.rectx, R.recty, 32, IB_rect, 0); + qtexport->ibuf = IMB_allocImBuf (rectx, recty, 32, IB_rect, 0); + qtexport->ibuf2 = IMB_allocImBuf (rectx, recty, 32, IB_rect, 0); err = NewGWorldFromPtr( &qtexport->theGWorld, k32ARGBPixelFormat, trackFrame, NULL, NULL, 0, (unsigned char *)qtexport->ibuf->rect, - R.rectx * 4 ); + rectx * 4 ); CheckError (err, "NewGWorldFromPtr error"); qtexport->thePixMap = GetGWorldPixMap(qtexport->theGWorld); @@ -332,7 +338,7 @@ static void QT_StartAddVideoSamplesToMedia (const Rect *trackFrame) } -static void QT_DoAddVideoSamplesToMedia (int frame) +static void QT_DoAddVideoSamplesToMedia (int frame, int *pixels, int rectx, int recty) { OSErr err = noErr; Rect imageRect; @@ -348,7 +354,7 @@ static void QT_DoAddVideoSamplesToMedia (int frame) //copy and flip renderdata - memcpy(qtexport->ibuf2->rect, R.rectot, 4*R.rectx*R.recty); + memcpy(qtexport->ibuf2->rect, pixels, 4*rectx*recty); IMB_flipy(qtexport->ibuf2); //get pointers to parse bitmapdata @@ -359,7 +365,7 @@ static void QT_DoAddVideoSamplesToMedia (int frame) to = (unsigned char *) myPtr; //parse RGBA bitmap into Quicktime's ARGB GWorld - boxsize = R.rectx * R.recty; + boxsize = rectx * recty; for( index = 0; index < boxsize; index++) { to[0] = from[3]; to[1] = from[0]; @@ -415,7 +421,7 @@ void makeqtstring (char *string) { strcpy(string, G.scene->r.pic); BLI_convertstringcode(string, G.sce, G.scene->r.cfra); - RE_make_existing_file(string); + BLI_make_existing_file(string); if (BLI_strcasecmp(string + strlen(string) - 4, ".mov")) { sprintf(txt, "%04d_%04d.mov", (G.scene->r.sfra) , (G.scene->r.efra) ); @@ -424,7 +430,7 @@ void makeqtstring (char *string) { } -void start_qt(void) { +void start_qt(struct RenderData *rd, int rectx, int recty) { OSErr err = noErr; char name[2048]; @@ -446,7 +452,7 @@ void start_qt(void) { qtdata = MEM_callocN(sizeof(QuicktimeComponentData), "QuicktimeCodecDataExt"); - if(G.scene->r.qtcodecdata == NULL && G.scene->r.qtcodecdata->cdParms == NULL) { + if(rd->qtcodecdata == NULL && rd->qtcodecdata->cdParms == NULL) { get_qtcodec_settings(); } else { qtdata->theComponent = OpenDefaultComponent(StandardCompressionType, StandardCompressionSubType); @@ -456,7 +462,7 @@ void start_qt(void) { } if (G.afbreek != 1) { - sframe = (G.scene->r.sfra); + sframe = (rd->sfra); makeqtstring(name); @@ -499,14 +505,14 @@ void start_qt(void) { } else { printf("Created QuickTime movie: %s\n", name); - QT_CreateMyVideoTrack(); + QT_CreateMyVideoTrack(rectx, recty); } } } -void append_qt(int frame) { - QT_DoAddVideoSamplesToMedia(frame); +void append_qt(int frame, int *pixels, int rectx, int recty) { + QT_DoAddVideoSamplesToMedia(frame, pixels, rectx, recty); } diff --git a/source/blender/quicktime/quicktime_export.h b/source/blender/quicktime/quicktime_export.h index 3ecea889fa6..5962ae3d713 100644 --- a/source/blender/quicktime/quicktime_export.h +++ b/source/blender/quicktime/quicktime_export.h @@ -37,9 +37,10 @@ #define __AIFF__ // quicktime movie output functions +struct RenderData; -void start_qt(void); //for initrender.c -void append_qt(int frame); +void start_qt(struct RenderData *rd, int rectx, int recty); //for movie handle (BKE writeavi.c now) +void append_qt(int frame, int *pixels, int rectx, int recty); void end_qt(void); int get_qtcodec_settings(void); //for buttons.c |